diff --git a/lib/include/srslte/asn1/asn1_utils.h b/lib/include/srslte/asn1/asn1_utils.h new file mode 100644 index 000000000..e4b96d596 --- /dev/null +++ b/lib/include/srslte/asn1/asn1_utils.h @@ -0,0 +1,975 @@ +/* +Copyright 2013-2017 Software Radio Systems Limited + +This file is part of srsLTE + +srsLTE is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +srsLTE is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +A copy of the GNU Affero General Public License can be found in +the LICENSE file in the top-level directory of this distribution +and at http://www.gnu.org/licenses/. +*/ + +#ifndef SRSASN_COMMON_UTILS_H +#define SRSASN_COMMON_UTILS_H + +#include +#include +#include +#include +#include /* va_list, va_start, va_arg, va_end */ +#include +#include + +// TODOS/FIXME: +// - ext flag as an template arg? +// - custom allocators? + +namespace asn1 { + +#define ASN_16K 16383 + +/************************ + logging +************************/ + +typedef enum { LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_WARN, LOG_LEVEL_ERROR } srsasn_logger_level_t; + +typedef void (*log_handler_t)(srsasn_logger_level_t log_level, void* ctx, const char* str); + +void vlog_print(log_handler_t handler, void* ctx, srsasn_logger_level_t log_level, const char* format, va_list args); + +void srsasn_log_register_handler(void* ctx, log_handler_t handler); + +void srsasn_log_print(srsasn_logger_level_t log_level, const char* format, ...); + +/************************ + error handling +************************/ + +enum SRSASN_CODE { SRSASN_SUCCESS, SRSASN_ERROR_ENCODE_FAIL, SRSASN_ERROR_DECODE_FAIL }; + +void log_error_code(SRSASN_CODE code, const char* filename, int line); + +#define HANDLE_CODE(ret) \ + { \ + SRSASN_CODE macrocode = (ret); \ + if (macrocode != SRSASN_SUCCESS) { \ + log_error_code(macrocode, __FILE__, __LINE__); \ + return macrocode; \ + } \ + } + +/************************ + bit_ref +************************/ + +struct ValOrError { + uint32_t val; + SRSASN_CODE code; + ValOrError() : val(0), code(SRSASN_SUCCESS) {} + ValOrError(uint32_t val_, SRSASN_CODE code_) : val(val_), code(code_) {} +}; +ValOrError unpack_bits(uint8_t*& ptr, uint8_t& offset, uint8_t* max_ptr, uint32_t n_bits); + +class bit_ref +{ +public: + bit_ref(); + bit_ref(uint8_t* start_ptr_, uint32_t max_size_); + + int distance(const bit_ref& other) const; + int distance(uint8_t* ref_ptr) const; + int distance() const; + int distance_bytes(uint8_t* ref_ptr) const; + int distance_bytes() const; + + SRSASN_CODE pack(uint32_t val, uint32_t n_bits); + template + SRSASN_CODE unpack(T& val, uint32_t n_bits) + { + ValOrError ret = unpack_bits(ptr, offset, max_ptr, n_bits); + val = ret.val; + return ret.code; + } + SRSASN_CODE align_bytes(); + SRSASN_CODE align_bytes_zero(); + void set(uint8_t* start_ptr_, uint32_t max_size_); + +private: + uint8_t* ptr; + uint8_t offset; + uint8_t* start_ptr; + uint8_t* max_ptr; +}; + +/********************* + function helpers +*********************/ +template +class dyn_array +{ +public: + typedef T item_type; + dyn_array() : data_(NULL), size_(0), cap_(0) {} + dyn_array(uint32_t new_size) : size_(new_size), cap_(new_size) { data_ = new T[size_]; } + dyn_array(const dyn_array& other) + { + size_ = other.size_; + cap_ = other.cap_; + data_ = new T[cap_]; + std::copy(&other[0], &other[size_], data_); + } + ~dyn_array() + { + if (data_ != NULL) { + delete[] data_; + } + } + uint32_t size() const { return size_; } + uint32_t capacity() const { return cap_; } + T& operator[](uint32_t idx) { return data_[idx]; } + const T& operator[](uint32_t idx) const { return data_[idx]; } + dyn_array& operator=(const dyn_array& other) + { + if (this == &other) { + return *this; + } + resize(other.size()); + std::copy(&other[0], &other[size_], data_); + return *this; + } + void resize(uint32_t new_size, uint32_t new_cap = 0) + { + if (new_size == size_) { + return; + } + if (cap_ >= new_size) { + size_ = new_size; + return; + } + T* old_data = data_; + cap_ = new_size > new_cap ? new_size : new_cap; + if (cap_ > 0) { + data_ = new T[cap_]; + if (old_data != NULL) { + std::copy(&old_data[0], &old_data[size_], data_); + } + } else { + data_ = NULL; + } + size_ = new_size; + if (old_data != NULL) { + delete[] old_data; + } + } + bool operator==(const dyn_array& other) const + { + return size() == other.size() and std::equal(data_, data_ + size(), other.data_); + } + void push_back(const T& elem) + { + resize(size() + 1, size() * 2); + data_[size() - 1] = elem; + } + T& back() { return data_[size() - 1]; } + const T& back() const { return data_[size() - 1]; } + T* data() { return &data_[0]; } + const T* data() const { return &data_[0]; } + +private: + T* data_; + uint32_t size_, cap_; +}; + +template +class bounded_array +{ +public: + typedef T item_type; + bounded_array(uint32_t size_ = 0) : current_size(size_) {} + static uint32_t capacity() { return MAX_N; } + uint32_t size() const { return current_size; } + T& operator[](uint32_t idx) { return data_[idx]; } + const T& operator[](uint32_t idx) const { return data_[idx]; } + bool operator==(const bounded_array& other) const + { + return size() == other.size() and std::equal(data_, data_ + size(), other.data_); + } + void resize(uint32_t new_size) { current_size = new_size; } + void push_back(const T& elem) + { + if (current_size >= MAX_N) { + srsasn_log_print(LOG_LEVEL_ERROR, "Maximum size %d achieved for bounded_array.\n", MAX_N); + } + data_[current_size++] = elem; + } + T& back() { return data_[current_size - 1]; } + const T& back() const { return data_[current_size - 1]; } + T* data() { return &data_[0]; } + const T* data() const { return &data_[0]; } + +private: + T data_[MAX_N]; + uint32_t current_size; +}; + +template +class fixed_array +{ +public: + typedef T item_type; + static uint32_t size() { return N; } + T& operator[](uint32_t idx) { return data_[idx]; } + const T& operator[](uint32_t idx) const { return data_[idx]; } + bool operator==(const fixed_array& other) const { return std::equal(data_, data_ + size(), other.data_); } + T& back() { return data_[size() - 1]; } + const T& back() const { return data_[size() - 1]; } + T* data() { return &data_[0]; } + const T* data() const { return &data_[0]; } + +private: + T data_[N]; +}; + +/********************* + ext packing +*********************/ + +SRSASN_CODE pack_unsupported_ext_flag(bit_ref& bref, bool ext); +SRSASN_CODE unpack_unsupported_ext_flag(bool& ext, bit_ref& bref); + +/************************ + enum packing +************************/ + +SRSASN_CODE pack_enum(bit_ref& bref, uint32_t enum_val, uint32_t nbits); +SRSASN_CODE pack_enum(bit_ref& bref, uint32_t enum_val, uint32_t nbits, uint32_t nof_noext); +SRSASN_CODE pack_enum(bit_ref& bref, uint32_t e, uint32_t nof_types, uint32_t nof_exts, bool has_ext); +ValOrError unpack_enum(uint32_t nof_types, uint32_t nof_exts, bool has_ext, bit_ref& bref); +template +SRSASN_CODE pack_enum(bit_ref& bref, EnumType e) +{ + return pack_enum(bref, e, EnumType::nof_types, EnumType::nof_exts, EnumType::has_ext); +} +template +SRSASN_CODE unpack_enum(EnumType& e, bit_ref& bref) +{ + ValOrError ret = unpack_enum(EnumType::nof_types, EnumType::nof_exts, EnumType::has_ext, bref); + e = (typename EnumType::options)ret.val; + return ret.code; +} + +struct EnumPacker { + template + SRSASN_CODE pack(bit_ref& bref, EnumType e) + { + return pack_enum(bref, e); + } + template + SRSASN_CODE unpack(EnumType& e, bit_ref& bref) + { + return unpack_enum(e, bref); + } +}; +template +bool string_to_enum(EnumType& e, const std::string& s) +{ + for (uint32_t i = 0; i < EnumType::nof_types; ++i) { + e = (typename EnumType::options)i; + if (e.to_string() == s) { + return true; + } + } + return false; +} +template +bool number_to_enum(EnumType& e, NumberType val) +{ + for (uint32_t i = 0; i < e.nof_types; ++i) { + e = (typename EnumType::options)i; + if (e.to_number() == val) { + return true; + } + } + return false; +} +template +bool number_string_to_enum(EnumType& e, const std::string& val) +{ + for (uint32_t i = 0; i < e.nof_types; ++i) { + e = (typename EnumType::options)i; + if (e.to_number_string() == val) { + return true; + } + } + return false; +} + +/************************ + integer packing +************************/ + +// Constrained Whole Number +template +SRSASN_CODE pack_unalign_integer(bit_ref& bref, IntType n, IntType lb, IntType ub); +template +SRSASN_CODE unpack_unalign_integer(IntType& n, bit_ref& bref, IntType lb, IntType ub); +template +struct UnalignedIntegerPacker { + UnalignedIntegerPacker(IntType, IntType); + IntType lb; + IntType ub; + SRSASN_CODE pack(bit_ref& bref, IntType n); + SRSASN_CODE unpack(IntType& n, bit_ref& bref); +}; + +template +SRSASN_CODE pack_align_integer(bit_ref& bref, IntType n, IntType lb, IntType ub); +template +SRSASN_CODE unpack_align_integer(IntType& intval, bit_ref& bref, IntType lb, IntType ub); +template +struct AlignedIntegerPacker { + AlignedIntegerPacker(IntType lb_, IntType ub_); + IntType lb; + IntType ub; + SRSASN_CODE pack(bit_ref& bref, IntType n); + SRSASN_CODE unpack(IntType& n, bit_ref& bref); +}; + +// Normally Small non-negative whole number +template +SRSASN_CODE pack_norm_small_integer(bit_ref& bref, UintType n); +template +SRSASN_CODE unpack_norm_small_integer(UintType& n, bit_ref& bref); + +// Unconstrained Whole Number +// FIXME: Implement +inline SRSASN_CODE pack_unconstrained_integer(bit_ref& bref, int64_t n) +{ + // TODO + srsasn_log_print(LOG_LEVEL_ERROR, "Not implemented\n"); + return SRSASN_SUCCESS; +} +inline SRSASN_CODE unpack_unconstrained_integer(int64_t& n, bit_ref& bref) +{ + // TODO + srsasn_log_print(LOG_LEVEL_ERROR, "Not implemented\n"); + return SRSASN_SUCCESS; +} + +/************************ + length determinant +************************/ + +// Pack as whole constrained number +template +SRSASN_CODE pack_length(bit_ref& bref, IntType n, IntType lb, IntType ub); +template +SRSASN_CODE unpack_length(IntType& n, bit_ref& bref, IntType lb, IntType ub); + +// Pack as a small non-negative whole number +SRSASN_CODE pack_length(bit_ref& ref, uint32_t val); +SRSASN_CODE unpack_length(uint32_t& val, bit_ref& ref); + +/************************ + General Packer/Unpacker +************************/ + +struct BitPacker { + BitPacker(uint32_t nof_bits_) : nof_bits(nof_bits_) {} + template + SRSASN_CODE pack(bit_ref& bref, const T& topack) + { + bref.pack(topack, nof_bits); + return SRSASN_SUCCESS; + } + template + SRSASN_CODE unpack(T& tounpack, bit_ref& bref) + { + return bref.unpack(tounpack, nof_bits); + } + uint32_t nof_bits; +}; + +struct Packer { + template + SRSASN_CODE pack(bit_ref& bref, const T& topack) + { + return topack.pack(bref); + } + template + SRSASN_CODE unpack(T& tounpack, bit_ref& bref) + { + return tounpack.unpack(bref); + } +}; + +/********************* + common octstring +*********************/ + +// helper functions common to all octstring implementations +uint64_t octstring_to_number(const uint8_t* ptr, uint32_t nbytes); +void number_to_octstring(uint8_t* ptr, uint64_t number, uint32_t nbytes); +std::string octstring_to_string(const uint8_t* ptr, uint32_t N); +void string_to_octstring(uint8_t* ptr, const std::string& str); + +/************************ + fixed_octstring +************************/ + +template +class fixed_octstring +{ +public: + const uint8_t& operator[](uint32_t idx) const { return octets_[idx]; } + uint8_t& operator[](uint32_t idx) { return octets_[idx]; } + bool operator==(const fixed_octstring& other) const { return octets_ == other.octets_; } + uint8_t* data() { return &octets_[0]; } + const uint8_t* data() const { return &octets_[0]; } + + static uint32_t size() { return N; } + std::string to_string() const { return octstring_to_string(&octets_[0], N); } + fixed_octstring& from_string(const std::string& hexstr) + { + if (hexstr.size() != 2 * N) { + srsasn_log_print(LOG_LEVEL_ERROR, "The provided hex string size is not valid (%d!=2*%d).\n", hexstr.size(), N); + } else { + string_to_octstring(&octets_[0], hexstr); + } + return *this; + } + uint64_t to_number() const { return octstring_to_number(&octets_[0], size()); } + fixed_octstring& from_number(uint64_t val) + { + number_to_octstring(&octets_[0], val, size()); + return *this; + } + + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + +private: + fixed_array octets_; +}; + +template +SRSASN_CODE fixed_octstring::pack(bit_ref& bref) const +{ + // if(N > 2) { // X.691 Sec.16 + // bref.align_bytes_zero(); + // } + for (uint32_t i = 0; i < size(); ++i) { + bref.pack(octets_[i], 8); + } + return SRSASN_SUCCESS; +} + +template +SRSASN_CODE fixed_octstring::unpack(bit_ref& bref) +{ + // if(N > 2) { // X.691 Sec.16 + // bref.align_bytes_zero(); + // } + for (uint32_t i = 0; i < size(); ++i) { + HANDLE_CODE(bref.unpack(octets_[i], 8)); + } + return SRSASN_SUCCESS; +} + +/************************ + dyn_octstring +************************/ + +class dyn_octstring +{ +public: + dyn_octstring() {} + dyn_octstring(uint32_t new_size) : octets_(new_size) {} + + const uint8_t& operator[](uint32_t idx) const { return octets_[idx]; } + uint8_t& operator[](uint32_t idx) { return octets_[idx]; } + bool operator==(const dyn_octstring& other) const { return octets_ == other.octets_; } + void resize(uint32_t new_size) { octets_.resize(new_size); } + uint32_t size() const { return octets_.size(); } + uint8_t* data() { return &octets_[0]; } + const uint8_t* data() const { return &octets_[0]; } + + SRSASN_CODE pack(bit_ref& ie_ref) const; + SRSASN_CODE unpack(bit_ref& ie_ref); + std::string to_string() const; + dyn_octstring& from_string(const std::string& hexstr); + uint64_t to_number() const { return octstring_to_number(&octets_[0], size()); } + dyn_octstring& from_number(uint64_t val) + { + number_to_octstring(&octets_[0], val, size()); + return *this; + } + +private: + dyn_array octets_; +}; + +/********************* + common bitstring +*********************/ + +// helper functions common to all bitstring implementations +uint64_t bitstring_to_number(const uint8_t* ptr, uint32_t nbits); +void number_to_bitstring(uint8_t* ptr, uint64_t number, uint32_t nbits); +std::string bitstring_to_string(const uint8_t* ptr, uint32_t nbits); +inline bool bitstring_get(const uint8_t* ptr, uint32_t idx) +{ + uint32_t byte_idx = idx / 8; + uint32_t offset = idx % 8; + return (ptr[byte_idx] & (1 << offset)) > 0; +} +inline void bitstring_set(uint8_t* ptr, uint32_t idx, bool value) +{ + uint32_t byte_idx = idx / 8; + uint32_t offset = idx % 8; + if (value) { + ptr[byte_idx] |= (1 << offset); + } else { + ptr[byte_idx] &= ((uint16_t)(1 << 8) - 1) - (1 << offset); + } +} + +/********************* + fixed_bitstring +*********************/ + +// fixed bitstring pack/unpack helpers +SRSASN_CODE pack_fixed_bitstring(bit_ref& bref, const uint8_t* buf, uint32_t nbits); +SRSASN_CODE pack_fixed_bitstring(bit_ref& bref, const uint8_t* buf, uint32_t nbits, bool ext); +SRSASN_CODE unpack_fixed_bitstring(uint8_t* buf, bit_ref& bref, uint32_t nbits); +SRSASN_CODE unpack_fixed_bitstring(uint8_t* buf, bool& ext, bit_ref& bref, uint32_t nbits); + +template +class fixed_bitstring +{ +public: + fixed_bitstring() { memset(&octets_[0], 0, nof_octets()); } + fixed_bitstring(const std::string& s) + { + if (s.size() != N) { + srsasn_log_print(LOG_LEVEL_ERROR, "The provided string size=%d does not match the bit string size=%d\n", s.size(), + N); + } + memset(&octets_[0], 0, nof_octets()); + for (uint32_t i = 0; i < N; ++i) + this->set(N - i - 1, s[i] == '1'); + } + bool get(uint32_t idx) const { return bitstring_get(&octets_[0], idx); } + void set(uint32_t idx, bool value) { bitstring_set(&octets_[0], idx, value); } + bool operator==(const fixed_bitstring& other) const { return octets_ == other.octets_; } + bool operator==(const char* other_str) const + { + return strlen(other_str) == N and (*this) == fixed_bitstring(other_str); + } + uint32_t nof_octets() const { return (uint32_t)ceilf(N / 8.0f); } + uint32_t length() const { return N; } + std::string to_string() const { return bitstring_to_string(&octets_[0], length()); } + uint64_t to_number() const { return bitstring_to_number(&octets_[0], length()); } + fixed_bitstring& from_number(uint64_t val) + { + number_to_bitstring(&octets_[0], val, length()); + return *this; + } + uint8_t* data() { return &octets_[0]; } + const uint8_t* data() const { return &octets_[0]; } + + SRSASN_CODE pack(bit_ref& bref) const { return pack_fixed_bitstring(bref, data(), N); } + SRSASN_CODE pack(bit_ref& bref, bool ext) const { return pack_fixed_bitstring(bref, data(), N, ext); } + SRSASN_CODE unpack(bit_ref& bref) { return unpack_fixed_bitstring(data(), bref, N); } + SRSASN_CODE unpack(bit_ref& bref, bool& ext) { return unpack_fixed_bitstring(data(), ext, bref, N); } + +private: + fixed_array octets_; // ceil(N/8.0) +}; + +/********************* + dyn_bitstring +*********************/ + +class dyn_bitstring +{ +public: + dyn_bitstring() : n_bits(0) {} + dyn_bitstring(uint32_t n_bits_); + dyn_bitstring(const char* s); + + bool operator==(const dyn_bitstring& other) const { return octets_ == other.octets_; } + bool operator==(const char* other_str) const; + bool get(uint32_t idx) const { return bitstring_get(&octets_[0], idx); } + void set(uint32_t idx, bool value) { bitstring_set(&octets_[0], idx, value); } + + void resize(uint32_t new_size); + uint32_t length() const { return n_bits; } + uint32_t nof_octets() const { return (uint32_t)ceilf(length() / 8.0f); } + std::string to_string() const { return bitstring_to_string(&octets_[0], length()); } + uint64_t to_number() const { return bitstring_to_number(&octets_[0], length()); } + dyn_bitstring& from_number(uint64_t val) + { + number_to_bitstring(&octets_[0], val, length()); + return *this; + } + const uint8_t* data() const { return &octets_[0]; } + uint8_t* data() { return &octets_[0]; } + + SRSASN_CODE pack(bit_ref& bref, uint32_t lb = 0, uint32_t ub = 0) const; + SRSASN_CODE pack(bit_ref& bref, bool ext, uint32_t lb = 0, uint32_t ub = 0) const; + SRSASN_CODE unpack(bit_ref& bref, uint32_t lb = 0, uint32_t ub = 0); + SRSASN_CODE unpack(bit_ref& bref, bool& ext, uint32_t lb = 0, uint32_t ub = 0); + +private: + dyn_array octets_; + uint32_t n_bits; +}; + +/********************* + fixed sequence of +*********************/ + +// packers/unpackers for fixed_length sequence-of +template +SRSASN_CODE pack_fixed_seq_of(bit_ref& bref, const T* item_array, uint32_t nof_items, ItemPacker packer) +{ + for (uint32_t i = 0; i < nof_items; ++i) { + HANDLE_CODE(packer.pack(bref, item_array[i])); + } + return SRSASN_SUCCESS; +} +template +SRSASN_CODE pack_fixed_seq_of(bit_ref& bref, const T* item_array, uint32_t nof_items) +{ + for (uint32_t i = 0; i < nof_items; ++i) { + HANDLE_CODE(item_array[i].pack(bref)); + } + return SRSASN_SUCCESS; +} +template +SRSASN_CODE unpack_fixed_seq_of(T* item_array, bit_ref& bref, uint32_t nof_items, ItemUnpacker unpacker) +{ + for (uint32_t i = 0; i < nof_items; ++i) { + HANDLE_CODE(unpacker.unpack(item_array[i], bref)); + } + return SRSASN_SUCCESS; +} +template +SRSASN_CODE unpack_fixed_seq_of(T* item_array, bit_ref& bref, uint32_t nof_items) +{ + for (uint32_t i = 0; i < nof_items; ++i) { + HANDLE_CODE(item_array[i].unpack(bref)); + } + return SRSASN_SUCCESS; +} + +template +struct FixedSeqOfPacker { + FixedSeqOfPacker(uint32_t nof_items_, ItemPacker packer_) : nof_items(nof_items_), packer(packer_) {} + FixedSeqOfPacker(uint32_t nof_items_) : nof_items(nof_items_), packer(Packer()) {} + template + SRSASN_CODE pack(bit_ref& bref, const T* topack) + { + return pack_fixed_seq_of(bref, topack, nof_items, packer); + } + template + SRSASN_CODE unpack(T* tounpack, bit_ref& bref) + { + return unpack_fixed_seq_of(tounpack, bref, nof_items, packer); + } + uint32_t nof_items; + ItemPacker packer; +}; + +/********************* + dyn sequence of +*********************/ + +template +SRSASN_CODE pack_dyn_seq_of(bit_ref& bref, const ArrayType& seqof, uint32_t lb, uint32_t ub, ItemPacker packer) +{ + HANDLE_CODE(pack_length(bref, seqof.size(), lb, ub)); + for (uint32_t i = 0; i < seqof.size(); ++i) { + HANDLE_CODE(packer.pack(bref, seqof[i])); + } + return SRSASN_SUCCESS; +} + +template +SRSASN_CODE pack_dyn_seq_of(bit_ref& bref, const ArrayType& seqof, uint32_t lb, uint32_t ub) +{ + HANDLE_CODE(pack_length(bref, seqof.size(), lb, ub)); + for (uint32_t i = 0; i < seqof.size(); ++i) { + HANDLE_CODE(seqof[i].pack(bref)); + } + return SRSASN_SUCCESS; +} + +template +SRSASN_CODE unpack_dyn_seq_of(ArrayType& seqof, bit_ref& bref, uint32_t lb, uint32_t ub, ItemUnpacker unpacker) +{ + uint32_t nof_items; + HANDLE_CODE(unpack_length(nof_items, bref, lb, ub)); + seqof.resize(nof_items); + for (uint32_t i = 0; i < nof_items; ++i) { + HANDLE_CODE(unpacker.unpack(seqof[i], bref)); + } + return SRSASN_SUCCESS; +} + +template +SRSASN_CODE unpack_dyn_seq_of(ArrayType& seqof, bit_ref& bref, uint32_t lb, uint32_t ub) +{ + uint32_t nof_items; + HANDLE_CODE(unpack_length(nof_items, bref, lb, ub)); + seqof.resize(nof_items); + for (uint32_t i = 0; i < nof_items; ++i) { + HANDLE_CODE(seqof[i].unpack(bref)); + } + return SRSASN_SUCCESS; +} + +template +struct SeqOfPacker { + SeqOfPacker(uint32_t lb_, uint32_t ub_, InnerPacker packer_) : lb(lb_), ub(ub_), packer(packer_) {} + template + SRSASN_CODE pack(bit_ref& bref, const T& topack) + { + return pack_dyn_seq_of(bref, topack, lb, ub, packer); + } + template + SRSASN_CODE unpack(T& tounpack, bit_ref& bref) + { + return unpack_dyn_seq_of(tounpack, bref, lb, ub, packer); + } + InnerPacker packer; + uint32_t lb; + uint32_t ub; +}; + +/********************* + choice utils +*********************/ + +union alignment_t { + char c; + float f; + uint32_t i; + uint64_t i2; + double d; + long double d2; + uint32_t* ptr; +}; +#define MAX2(a, b) ((a) > (b)) ? (a) : (b) +#define MAX4(a, b, c, d) MAX2((MAX2(a, b)), MAX2(c, d)) +#define MAX8(a, b, c, d, e, f, g, h) MAX2((MAX4(a, b, c, d)), (MAX4(e, f, g, h))) +#define MAX12(a, b, c, d, e, f, g, h, i, j, k, l) MAX2((MAX8(a, b, c, d, e, f, g, h)), (MAX4(i, j, k, l))) +#define MAX16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \ + MAX2((MAX8(a, b, c, d, e, f, g, h)), (MAX8(i, j, k, l, m, n, o, p))) +#define MAX32(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, \ + o1, p1) \ + MAX2((MAX16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)), \ + (MAX16(a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1))) + +template +class choice_buffer_t +{ +public: + struct __attribute__((__may_alias__)) bytes { + uint8_t buf_[MAX2(SIZE, 8)]; + uint8_t* data() { return &buf_[0]; } + const uint8_t* data() const { return &buf_[0]; } + }; + + template + T& get() + { + return *((T*)buffer.buf_.data()); + } + template + const T& get() const + { + return *((T*)buffer.buf_.data()); + } + template + void destroy() + { + ((T*)buffer.buf_.data())->~T(); + } + template + void init() + { + new (buffer.buf_.data()) T(); + } + template + void init(const T& other) + { + new (buffer.buf_.data()) T(other); + } + template + void set(const T& other) + { + get() = other; + } + +private: + union { + alignment_t a_; + bytes buf_; + } buffer; +}; + +/********************* + copy_ptr +*********************/ + +template +class copy_ptr +{ +public: + copy_ptr() : ptr(NULL) {} + explicit copy_ptr(T* ptr_) : + ptr(ptr_) {} // it takes hold of the pointer (including destruction). You should use make_copy_ptr() in most cases + // instead of this ctor + copy_ptr(const copy_ptr& other) { ptr = other.make_obj_(); } // it allocates new memory for the new object + ~copy_ptr() { destroy_(); } + inline copy_ptr& operator=(const copy_ptr& other) + { + if (this != &other) { + acquire(other.make_obj_()); + } + return *this; + } + inline bool operator==(const copy_ptr& other) const { return *ptr == *other; } + inline T* operator->() { return ptr; } + inline const T* operator->() const { return ptr; } + inline T& operator*() { return *ptr; } // like pointers, don't call this if ptr==NULL + inline const T& operator*() const { return *ptr; } // like pointers, don't call this if ptr==NULL + inline T* get() { return ptr; } + inline const T* get() const { return ptr; } + inline T* release() + { + T* ret = ptr; + ptr = NULL; + return ret; + } + inline void acquire(T* ptr_) + { + destroy_(); + ptr = ptr_; + } + inline void reset() { acquire(NULL); } + +private: + inline void destroy_() + { + if (ptr != NULL) { + delete ptr; + } + } + inline T* make_obj_() const { return (ptr == NULL) ? NULL : new T(*ptr); } + T* ptr; +}; + +template +copy_ptr make_copy_ptr(const T& t) +{ + return copy_ptr(new T(t)); +} + +/********************* + ext group +*********************/ + +class ext_groups_header +{ +public: + ext_groups_header(uint32_t max_nof_groups, uint32_t nof_nogroups_ = 0); + bool& operator[](uint32_t idx); + + SRSASN_CODE pack_nof_groups(bit_ref& bref) const; + SRSASN_CODE pack_group_flags(bit_ref& bref) const; + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack_nof_groups(bit_ref& bref); + SRSASN_CODE unpack_group_flags(bit_ref& bref); + SRSASN_CODE unpack(bit_ref& bref); + +private: + mutable uint32_t nof_groups; + const uint32_t nof_nogroups; + bounded_array groups; +}; + +/********************* + Var Length Field +*********************/ + +class varlength_field_pack_guard +{ +public: + varlength_field_pack_guard(bit_ref& bref); + ~varlength_field_pack_guard(); + +private: + bit_ref brefstart; + // bit_ref bref0; + bit_ref* bref_tracker; + uint8_t buffer[1024]; +}; + +class varlength_field_unpack_guard +{ +public: + varlength_field_unpack_guard(bit_ref& bref); + ~varlength_field_unpack_guard(); + +private: + bit_ref bref0; + bit_ref* bref_tracker; + uint32_t len; +}; + +/******************* + JsonWriter +*******************/ + +class json_writer +{ +public: + json_writer(); + void write_fieldname(const std::string& fieldname); + void write_str(const std::string& fieldname, const std::string& value); + void write_str(const std::string& value); + void write_int(const std::string& fieldname, int64_t value); + void write_int(int64_t value); + void write_bool(const std::string& fieldname, bool value); + void write_bool(bool value); + void write_null(const std::string& fieldname); + void write_null(); + void start_obj(const std::string& fieldname = ""); + void end_obj(); + void start_array(const std::string& fieldname = ""); + void end_array(); + std::string to_string() const; + +private: + std::stringstream ss; + std::string ident; + enum separator_t { COMMA, NEWLINE, NONE }; + separator_t sep; +}; + +} // namespace asn1 + +#endif // SRSASN_COMMON_UTILS_H diff --git a/lib/include/srslte/asn1/liblte_rrc.h b/lib/include/srslte/asn1/liblte_rrc.h deleted file mode 100644 index 15afb3cab..000000000 --- a/lib/include/srslte/asn1/liblte_rrc.h +++ /dev/null @@ -1,7143 +0,0 @@ -/******************************************************************************* - - Copyright 2012-2014 Ben Wojtowicz - Copyright 2014 Andrew Murphy (SIB13 unpack) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -******************************************************************************* - - File: liblte_rrc.h - - Description: Contains all the definitions for the LTE Radio Resource - Control Layer library. - - Revision History - ---------- ------------- -------------------------------------------- - 03/24/2012 Ben Wojtowicz Created file. - 04/21/2012 Ben Wojtowicz Added SIB1 parameters, IEs, and messages - 05/28/2012 Ben Wojtowicz Added SIB1 pack functionality - 08/19/2012 Ben Wojtowicz Added functionality to support SIB2, SIB3, - SIB4, and SIB8 packing and unpacking - 10/06/2012 Ben Wojtowicz Added more decoding/encoding. - 12/26/2012 Ben Wojtowicz Added text versions of some enums. - 03/03/2013 Ben Wojtowicz Added a test fill pattern, text and number - mappings for all enums, carrier_freqs_geran, - SIB5, SIB6, SIB7, and paging packing and - unpacking. - 07/21/2013 Ben Wojtowicz Using the common msg structure. - 03/26/2014 Ben Wojtowicz Added support for RRC Connection Request, - RRC Connection Reestablishment Request, - and UL CCCH Messages. - 05/04/2014 Ben Wojtowicz Added support for DL CCCH Messages. - 06/15/2014 Ben Wojtowicz Added support for UL DCCH Messages. - 08/03/2014 Ben Wojtowicz Added more decoding/encoding. - 09/19/2014 Andrew Murphy Added SIB13 unpack. - 11/01/2014 Ben Wojtowicz Added more decoding/encoding. - 11/09/2014 Ben Wojtowicz Added SIB13 pack. - 11/29/2014 Ben Wojtowicz Fixed a bug in RRC connection reestablishment - UE identity. - -*******************************************************************************/ - -#ifndef SRSLTE_LIBLTE_RRC_H -#define SRSLTE_LIBLTE_RRC_H - -/******************************************************************************* - INCLUDES -*******************************************************************************/ - -#include "liblte_common.h" - -/******************************************************************************* - DEFINES -*******************************************************************************/ - - -/******************************************************************************* - TYPEDEFS -*******************************************************************************/ - -static const uint8 liblte_rrc_test_fill[8] = {1,0,1,0,0,1,0,1}; - -typedef void (*log_handler_t)(void *ctx, char *str); - -void liblte_rrc_log_register_handler(void *ctx, log_handler_t handler); - -/******************************************************************************* - INFORMATION ELEMENT DECLARATIONS -*******************************************************************************/ - -/********************************************************************* - IE Name: MBSFN Notification Config - - Description: Specifies the MBMS notification related configuration - parameters, that are applicable for all MBSFN areas - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_N2 = 0, - LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_N4, - LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_N_ITEMS, -}LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_ENUM; -static const char liblte_rrc_notification_repetition_coeff_r9_text[LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_N_ITEMS][20] = {"2", "4"}; -static const uint8 liblte_rrc_notification_repetition_coeff_r9_num[LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_N_ITEMS] = {2, 4}; -// Structs -typedef struct{ - LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_ENUM repetition_coeff; - uint8 offset; - uint8 sf_index; -}LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_notification_config_ie(LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT *mbsfn_notification_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_notification_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT *mbsfn_notification_cnfg); - -/********************************************************************* - IE Name: MBSFN Area Info List - - Description: Contains the information required to acquire the MBMS - control information associated with one or more MBSFN - areas - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_MBSFN_AREAS 8 -// Enums -typedef enum{ - LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_S1 = 0, - LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_S2, - LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_N_ITEMS, -}LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_ENUM; -static const char liblte_rrc_non_mbsfn_region_length_text[LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_N_ITEMS][20] = {"1", "2"}; -static const uint8 liblte_rrc_non_mbsfn_region_length_num[LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_N_ITEMS] = {1, 2}; -typedef enum{ - LIBLTE_RRC_MCCH_REPETITION_PERIOD_RF32 = 0, - LIBLTE_RRC_MCCH_REPETITION_PERIOD_RF64, - LIBLTE_RRC_MCCH_REPETITION_PERIOD_RF128, - LIBLTE_RRC_MCCH_REPETITION_PERIOD_RF256, - LIBLTE_RRC_MCCH_REPETITION_PERIOD_N_ITEMS, -}LIBLTE_RRC_MCCH_REPETITION_PERIOD_ENUM; -static const char liblte_rrc_mcch_repetition_period_r9_text[LIBLTE_RRC_MCCH_REPETITION_PERIOD_N_ITEMS][20] = {"32", "64", "128", "256"}; -static const uint16 liblte_rrc_mcch_repetition_period_r9_num[LIBLTE_RRC_MCCH_REPETITION_PERIOD_N_ITEMS] = {32, 64, 128, 256}; -typedef enum{ - LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_512 = 0, - LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_1024, - LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_N_ITEMS, -}LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_ENUM; -static const char liblte_rrc_mcch_modification_period_r9_text[LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_N_ITEMS][20] = {"512", "1024"}; -static const uint16 liblte_rrc_mcch_modification_period_r9_num[LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_N_ITEMS] = {512, 1024}; -typedef enum{ - LIBLTE_RRC_MCCH_SIGNALLING_MCS_N2 = 0, - LIBLTE_RRC_MCCH_SIGNALLING_MCS_N7, - LIBLTE_RRC_MCCH_SIGNALLING_MCS_N13, - LIBLTE_RRC_MCCH_SIGNALLING_MCS_N19, - LIBLTE_RRC_MCCH_SIGNALLING_MCS_N_ITEMS, -}LIBLTE_RRC_MCCH_SIGNALLING_MCS_ENUM; -static const char liblte_rrc_mcch_signalling_mcs_r9_text[LIBLTE_RRC_MCCH_SIGNALLING_MCS_N_ITEMS][20] = {"2", "7", "13", "19"}; -static const uint8 liblte_rrc_mcch_signalling_mcs_r9_num[LIBLTE_RRC_MCCH_SIGNALLING_MCS_N_ITEMS] = {2, 7, 13, 19}; -// Structs -typedef struct{ - LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_ENUM non_mbsfn_region_length; - LIBLTE_RRC_MCCH_REPETITION_PERIOD_ENUM mcch_repetition_period_r9; - LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_ENUM mcch_modification_period_r9; - LIBLTE_RRC_MCCH_SIGNALLING_MCS_ENUM signalling_mcs_r9; - uint8 mbsfn_area_id_r9; - uint8 notification_indicator_r9; - uint8 mcch_offset_r9; - uint8 sf_alloc_info_r9; -}LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_area_info_ie(LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *mbsfn_area_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_area_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *mbsfn_area_info); - -/********************************************************************* - IE Name: MBSFN Subframe Config - - Description: Defines subframes that are reserved for MBSFN in - downlink - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_MBSFN_ALLOCATIONS 8 -// Enums -typedef enum{ - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N1 = 0, - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N2, - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N4, - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N8, - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N16, - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N32, - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N_ITEMS, -}LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_ENUM; -static const char liblte_rrc_radio_frame_allocation_period_text[LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N_ITEMS][20] = { "1", "2", "4", "8", - "16", "32"}; -static const uint8 liblte_rrc_radio_frame_allocation_period_num[LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N_ITEMS] = {1, 2, 4, 8, 16, 32}; -typedef enum{ - LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE = 0, - LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_FOUR, - LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_N_ITEMS, -}LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ENUM; -static const char liblte_rrc_subframe_allocation_num_frames_text[LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_N_ITEMS][20] = {"1", "4"}; -static const uint8 liblte_rrc_subframe_allocation_num_frames_num[LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_N_ITEMS] = {1, 4}; -// Structs -typedef struct{ - LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_ENUM radio_fr_alloc_period; - LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ENUM subfr_alloc_num_frames; - uint32 subfr_alloc; - uint8 radio_fr_alloc_offset; -}LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_subframe_config_ie(LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *mbsfn_subfr_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_subframe_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *mbsfn_subfr_cnfg); - -/********************************************************************* - IE Name: TMGI - - Description: Temporary Mobile Group Identity (PLMN + MBMS service ID) - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint16 mcc; - uint16 mnc; -}LIBLTE_RRC_PLMN_IDENTITY_STRUCT; -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id_r9; - uint8 plmn_index_r9; - bool plmn_id_explicit; - uint32 serviceid_r9; -}LIBLTE_RRC_TMGI_R9_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_tmgi_r9_ie(LIBLTE_RRC_TMGI_R9_STRUCT *tmgi, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tmgi_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_TMGI_R9_STRUCT *tmgi); - -/********************************************************************* - IE Name: MBMS Session Info - - Description: Information about an individual MBMS session - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_TMGI_R9_STRUCT tmgi_r9; - uint8 sessionid_r9; - bool sessionid_r9_present; - uint8 logicalchannelid_r9; -}LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbms_session_info_r9_ie(LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT *mbms_session_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbms_session_info_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT *mbms_session_info); - -/********************************************************************* - IE Name: PMCH Config - - Description: Contains configuration parameters of the sessions - carried by a PMCH - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines - -// Enums -typedef enum{ - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF8 = 0, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF16, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF32, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF64, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF128, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF256, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF512, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF1024, - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_N_ITEMS, -}LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_ENUM; -static const char liblte_rrc_mch_scheduling_period_r9_text[LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_N_ITEMS][20] = {"8", "16", "32", "64", "128", "256", "512", "1024"}; -static const uint16 liblte_rrc_mch_scheduling_period_r9_num[LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_N_ITEMS] = {8, 16, 32, 64, 128, 256, 512, 1024}; - -// Structs -typedef struct{ - uint16 sf_alloc_end_r9; - uint8 datamcs_r9; - LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_ENUM mch_schedulingperiod_r9; -}LIBLTE_RRC_PMCH_CONFIG_R9_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pmch_config_r9_ie(LIBLTE_RRC_PMCH_CONFIG_R9_STRUCT *pmch_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pmch_config_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_PMCH_CONFIG_R9_STRUCT *pmch_cnfg); - -/********************************************************************* - IE Name: PMCH Info - - Description: Specifies configuration of PMCH of an MBSFN area - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_SESSION_PER_PMCH 29 -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_PMCH_CONFIG_R9_STRUCT pmch_config_r9; - LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT mbms_sessioninfolist_r9[LIBLTE_RRC_MAX_SESSION_PER_PMCH]; - uint8 mbms_sessioninfolist_r9_size; -}LIBLTE_RRC_PMCH_INFO_R9_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pmch_info_r9_ie(LIBLTE_RRC_PMCH_INFO_R9_STRUCT *pmch_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pmch_info_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_PMCH_INFO_R9_STRUCT *pmch_info); - -/********************************************************************* - IE Name: C-RNTI - - Description: Identifies a UE having a RRC connection within a cell - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_c_rnti_ie(uint16 rnti, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_c_rnti_ie(uint8 **ie_ptr, - uint16 *rnti); - -/********************************************************************* - IE Name: Dedicated Info CDMA2000 - - Description: Transfers UE specific CDMA2000 information between - the network and the UE - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_dedicated_info_cdma2000_ie(LIBLTE_BYTE_MSG_STRUCT *ded_info_cdma2000, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dedicated_info_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_BYTE_MSG_STRUCT *ded_info_cdma2000); - -/********************************************************************* - IE Name: Dedicated Info NAS - - Description: Transfers UE specific NAS layer information between - the network and the UE - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_dedicated_info_nas_ie(LIBLTE_BYTE_MSG_STRUCT *ded_info_nas, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dedicated_info_nas_ie(uint8 **ie_ptr, - LIBLTE_BYTE_MSG_STRUCT *ded_info_nas); - -/********************************************************************* - IE Name: Filter Coefficient - - Description: Specifies the measurement filtering coefficient - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_FILTER_COEFFICIENT_FC0 = 0, - LIBLTE_RRC_FILTER_COEFFICIENT_FC1, - LIBLTE_RRC_FILTER_COEFFICIENT_FC2, - LIBLTE_RRC_FILTER_COEFFICIENT_FC3, - LIBLTE_RRC_FILTER_COEFFICIENT_FC4, - LIBLTE_RRC_FILTER_COEFFICIENT_FC5, - LIBLTE_RRC_FILTER_COEFFICIENT_FC6, - LIBLTE_RRC_FILTER_COEFFICIENT_FC7, - LIBLTE_RRC_FILTER_COEFFICIENT_FC8, - LIBLTE_RRC_FILTER_COEFFICIENT_FC9, - LIBLTE_RRC_FILTER_COEFFICIENT_FC11, - LIBLTE_RRC_FILTER_COEFFICIENT_FC13, - LIBLTE_RRC_FILTER_COEFFICIENT_FC15, - LIBLTE_RRC_FILTER_COEFFICIENT_FC17, - LIBLTE_RRC_FILTER_COEFFICIENT_FC19, - LIBLTE_RRC_FILTER_COEFFICIENT_SPARE1, - LIBLTE_RRC_FILTER_COEFFICIENT_N_ITEMS, -}LIBLTE_RRC_FILTER_COEFFICIENT_ENUM; -static const char liblte_rrc_filter_coefficient_text[LIBLTE_RRC_FILTER_COEFFICIENT_N_ITEMS][20] = { "0", "1", "2", "3", - "4", "5", "6", "7", - "8", "9", "11", "13", - "15", "17", "19", "SPARE"}; -static const int8 liblte_rrc_filter_coefficient_num[LIBLTE_RRC_FILTER_COEFFICIENT_N_ITEMS] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, -1}; -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_filter_coefficient_ie(LIBLTE_RRC_FILTER_COEFFICIENT_ENUM filter_coeff, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_filter_coefficient_ie(uint8 **ie_ptr, - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM *filter_coeff); - -/********************************************************************* - IE Name: MMEC - - Description: Identifies an MME within the scope of an MME group - within a PLMN - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mmec_ie(uint8 mmec, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mmec_ie(uint8 **ie_ptr, - uint8 *mmec); - -/********************************************************************* - IE Name: Neigh Cell Config - - Description: Provides the information related to MBSFN and TDD - UL/DL configuration of neighbor cells - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_neigh_cell_config_ie(uint8 neigh_cell_config, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_neigh_cell_config_ie(uint8 **ie_ptr, - uint8 *neigh_cell_config); - -/********************************************************************* - IE Name: Other Config - - Description: Contains configuration related to other configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_EUTRA_R9_ENABLED = 0, - LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_EUTRA_R9_N_ITEMS, -}LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_EUTRA_R9_ENUM; -static const char liblte_rrc_report_proximity_indication_eutra_r9_text[LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_EUTRA_R9_N_ITEMS][20] = {"Enabled"}; -typedef enum{ - LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_UTRA_R9_ENABLED = 0, - LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_UTRA_R9_N_ITEMS, -}LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_UTRA_R9_ENUM; -static const char liblte_rrc_report_proximity_indication_utra_r9_text[LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_UTRA_R9_N_ITEMS][20] = {"Enabled"}; -// Structs -typedef struct{ - LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_EUTRA_R9_ENUM report_proximity_ind_eutra; - LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_UTRA_R9_ENUM report_proximity_ind_utra; - bool report_proximity_ind_eutra_present; - bool report_proximity_ind_utra_present; -}LIBLTE_RRC_REPORT_PROXIMITY_CONFIG_R9_STRUCT; -typedef struct{ - LIBLTE_RRC_REPORT_PROXIMITY_CONFIG_R9_STRUCT report_proximity_cnfg; - bool report_proximity_cnfg_present; -}LIBLTE_RRC_OTHER_CONFIG_R9_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_other_config_ie(LIBLTE_RRC_OTHER_CONFIG_R9_STRUCT *other_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_other_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_OTHER_CONFIG_R9_STRUCT *other_cnfg); - -/********************************************************************* - IE Name: RAND CDMA2000 (1xRTT) - - Description: Contains a random value, generated by the eNB, to be - passed to the CDMA2000 upper layers - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rand_cdma2000_1xrtt_ie(uint32 rand, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rand_cdma2000_1xrtt_ie(uint8 **ie_ptr, - uint32 *rand); - -/********************************************************************* - IE Name: RAT Type - - Description: Indicates the radio access technology (RAT), - including E-UTRA, of the requested/transferred UE - capabilities - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_RAT_TYPE_EUTRA = 0, - LIBLTE_RRC_RAT_TYPE_UTRA, - LIBLTE_RRC_RAT_TYPE_GERAN_CS, - LIBLTE_RRC_RAT_TYPE_GERAN_PS, - LIBLTE_RRC_RAT_TYPE_CDMA2000_1XRTT, - LIBLTE_RRC_RAT_TYPE_SPARE_3, - LIBLTE_RRC_RAT_TYPE_SPARE_2, - LIBLTE_RRC_RAT_TYPE_SPARE_1, - LIBLTE_RRC_RAT_TYPE_N_ITEMS, -}LIBLTE_RRC_RAT_TYPE_ENUM; -static const char liblte_rrc_rat_type_text[LIBLTE_RRC_RAT_TYPE_N_ITEMS][20] = { "EUTRA", "UTRA", "GERAN_CS", "GERAN_PS", - "CDMA2000_1XRTT", "SPARE", "SPARE", "SPARE"}; -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rat_type_ie(LIBLTE_RRC_RAT_TYPE_ENUM rat_type, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rat_type_ie(uint8 **ie_ptr, - LIBLTE_RRC_RAT_TYPE_ENUM *rat_type); - -/********************************************************************* - IE Name: RRC Transaction Identifier - - Description: Identifies an RRC procedure along with the message - type - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_transaction_identifier_ie(uint8 rrc_transaction_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_transaction_identifier_ie(uint8 **ie_ptr, - uint8 *rrc_transaction_id); - -/********************************************************************* - IE Name: S-TMSI - - Description: Contains an S-Temporary Mobile Subscriber Identity, - a temporary UE identity provided by the EPC which - uniquely identifies the UE within the tracking area - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint32 m_tmsi; - uint8 mmec; -}LIBLTE_RRC_S_TMSI_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_s_tmsi_ie(LIBLTE_RRC_S_TMSI_STRUCT *s_tmsi, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_s_tmsi_ie(uint8 **ie_ptr, - LIBLTE_RRC_S_TMSI_STRUCT *s_tmsi); - -/********************************************************************* - IE Name: UE Capability RAT Container List - - Description: Contains list of containers, one for each RAT for - which UE capabilities are transferred - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: UE EUTRA Capability - - Description: Conveys the E-UTRA UE Radio Access Capability - Parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAXBANDS 64 - -// Enums -typedef enum{ - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_REL8 = 0, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_REL9, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_SPARE6, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_SPARE5, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_SPARE4, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_SPARE3, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_SPARE2, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_SPARE1, - LIBLTE_RRC_ACCESS_STRATUM_RELEASE_N_ITEMS -}LIBLTE_RRC_ACCESS_STRATUM_RELEASE_ENUM; -static const char liblte_rrc_access_stratum_release_text[LIBLTE_RRC_ACCESS_STRATUM_RELEASE_N_ITEMS][20] = { "rel8", "rel9", "spare6", "spare5", - "spare4", "spare3", "spare2", "spare1"}; - -typedef enum{ - LIBLTE_RRC_ROHC_PROFILES_0x0001, - LIBLTE_RRC_ROHC_PROFILES_0x0002, - LIBLTE_RRC_ROHC_PROFILES_0x0003, - LIBLTE_RRC_ROHC_PROFILES_0x0004, - LIBLTE_RRC_ROHC_PROFILES_0x0006, - LIBLTE_RRC_ROHC_PROFILES_0x0101, - LIBLTE_RRC_ROHC_PROFILES_0x0102, - LIBLTE_RRC_ROHC_PROFILES_0x0103, - LIBLTE_RRC_ROHC_PROFILES_0x0104, - LIBLTE_RRC_ROHC_PROFILES_NITEMS -}LIBLTE_RRC_ROHC_PROFILES_ENUM; -static const char liblte_rrc_rohc_profiles_text[LIBLTE_RRC_ROHC_PROFILES_NITEMS][20] = {"profile0x0001", - "profile0x0002", - "profile0x0003", - "profile0x0004", - "profile0x0006", - "profile0x0101", - "profile0x0102", - "profile0x0103", - "profile0x0104"}; - -typedef enum{ - LIBLTE_RRC_MAX_ROHC_CTXTS_CS2 = 0, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS4, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS8, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS12, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS16, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS24, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS32, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS48, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS64, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS128, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS256, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS512, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS1024, - LIBLTE_RRC_MAX_ROHC_CTXTS_CS16384, - LIBLTE_RRC_MAX_ROHC_CTXTS_SPARE1, - LIBLTE_RRC_MAX_ROHC_CTXTS_SPARE2, - LIBLTE_RRC_MAX_ROHC_CTXTS_N_ITEMS -}LIBLTE_RRC_MAX_ROHC_CTXTS_ENUM; -static const char liblte_rrc_max_rohc_ctxts_text[LIBLTE_RRC_MAX_ROHC_CTXTS_N_ITEMS][20] = { "cs2", "cs4", "cs8", "cs12", "cs16", "cs24", "cs32", - "cs48", "cs64", "cs128", "cs256", "cs512", "cs1024", - "cs16384", "spare2", "spare1"}; - -typedef enum{ - LIBLTE_RRC_BAND_1 = 0, - LIBLTE_RRC_BAND_2, - LIBLTE_RRC_BAND_3, - LIBLTE_RRC_BAND_4, - LIBLTE_RRC_BAND_5, - LIBLTE_RRC_BAND_6, - LIBLTE_RRC_BAND_7, - LIBLTE_RRC_BAND_8, - LIBLTE_RRC_BAND_9, - LIBLTE_RRC_BAND_10, - LIBLTE_RRC_BAND_11, - LIBLTE_RRC_BAND_12, - LIBLTE_RRC_BAND_13, - LIBLTE_RRC_BAND_14, - LIBLTE_RRC_BAND_17, - LIBLTE_RRC_BAND_18, - LIBLTE_RRC_BAND_19, - LIBLTE_RRC_BAND_20, - LIBLTE_RRC_BAND_21, - LIBLTE_RRC_BAND_22, - LIBLTE_RRC_BAND_23, - LIBLTE_RRC_BAND_24, - LIBLTE_RRC_BAND_25, - LIBLTE_RRC_BAND_33, - LIBLTE_RRC_BAND_34, - LIBLTE_RRC_BAND_35, - LIBLTE_RRC_BAND_36, - LIBLTE_RRC_BAND_37, - LIBLTE_RRC_BAND_38, - LIBLTE_RRC_BAND_39, - LIBLTE_RRC_BAND_40, - LIBLTE_RRC_BAND_41, - LIBLTE_RRC_BAND_42, - LIBLTE_RRC_BAND_43, - LIBLTE_RRC_BAND_N_ITEMS, -}LIBLTE_RRC_BAND_ENUM; -static const char liblte_rrc_band_text[LIBLTE_RRC_BAND_N_ITEMS][20] = { "1", "2", "3", "4", - "5", "6", "7", "8", - "9", "10", "11", "12", - "13", "14", "17", "18", - "19", "20", "21", "22", - "23", "24", "25", "33", - "34", "35", "36", "37", - "38", "39", "40", "41", - "42", "43"}; -static const uint8 liblte_rrc_band_num[LIBLTE_RRC_BAND_N_ITEMS] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43}; - -// Structs -typedef struct{ - bool supported_rohc_profiles[9]; - LIBLTE_RRC_MAX_ROHC_CTXTS_ENUM max_rohc_ctxts; - bool max_rohc_ctxts_present; -}LIBLTE_RRC_PDCP_PARAMS_STRUCT; - -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdcp_params_ie(LIBLTE_RRC_PDCP_PARAMS_STRUCT *pdcp_params, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdcp_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDCP_PARAMS_STRUCT *pdcp_params); - -typedef struct{ - bool tx_antenna_selection_supported; - bool specific_ref_sigs_supported; -}LIBLTE_RRC_PHY_LAYER_PARAMS_STRUCT; - -LIBLTE_ERROR_ENUM liblte_rrc_pack_phy_layer_params_ie(LIBLTE_RRC_PHY_LAYER_PARAMS_STRUCT *params, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phy_layer_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHY_LAYER_PARAMS_STRUCT *params); - -typedef struct{ - uint8 band_eutra; - bool half_duplex; -}LIBLTE_RRC_SUPPORTED_BAND_EUTRA_STRUCT; - -typedef struct{ - LIBLTE_RRC_SUPPORTED_BAND_EUTRA_STRUCT supported_band_eutra[LIBLTE_RRC_MAXBANDS]; - uint32 N_supported_band_eutras; -}LIBLTE_RRC_RF_PARAMS_STRUCT; - -LIBLTE_ERROR_ENUM liblte_rrc_pack_rf_params_ie(LIBLTE_RRC_RF_PARAMS_STRUCT *params, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rf_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_RF_PARAMS_STRUCT *params); - -typedef struct{ - bool inter_freq_need_for_gaps[LIBLTE_RRC_MAXBANDS]; - uint32 N_inter_freq_need_for_gaps; -}LIBLTE_RRC_BAND_INFO_EUTRA_STRUCT; - -LIBLTE_ERROR_ENUM liblte_rrc_pack_band_info_eutra_ie(LIBLTE_RRC_BAND_INFO_EUTRA_STRUCT *info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_band_info_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_BAND_INFO_EUTRA_STRUCT *info); - -typedef struct{ - LIBLTE_RRC_BAND_INFO_EUTRA_STRUCT band_list_eutra[LIBLTE_RRC_MAXBANDS]; - uint32 N_band_list_eutra; -}LIBLTE_RRC_MEAS_PARAMS_STRUCT; - -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_params_ie(LIBLTE_RRC_MEAS_PARAMS_STRUCT *params, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_PARAMS_STRUCT *params); - -typedef struct{ - // WARNING: hardcoding these options to not present - bool utra_fdd_present; - bool utra_tdd128_present; - bool utra_tdd384_present; - bool utra_tdd768_present; - bool geran_present; - bool cdma2000_hrpd_present; - bool cdma2000_1xrtt_present; -}LIBLTE_RRC_INTER_RAT_PARAMS_STRUCT; - -LIBLTE_ERROR_ENUM liblte_rrc_pack_inter_rat_params_ie(LIBLTE_RRC_INTER_RAT_PARAMS_STRUCT *params, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_inter_rat_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_INTER_RAT_PARAMS_STRUCT *params); - -typedef struct{ - uint8 access_stratum_release; - uint8 ue_category; - LIBLTE_RRC_PDCP_PARAMS_STRUCT pdcp_params; - LIBLTE_RRC_PHY_LAYER_PARAMS_STRUCT phy_params; - LIBLTE_RRC_RF_PARAMS_STRUCT rf_params; - LIBLTE_RRC_MEAS_PARAMS_STRUCT meas_params; - uint32 feature_group_indicator; - LIBLTE_RRC_INTER_RAT_PARAMS_STRUCT inter_rat_params; - bool feature_group_indicator_present; -}LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_eutra_capability_ie(LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *ue_eutra_capability, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_eutra_capability_ie(uint8 **ie_ptr, - LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *ue_eutra_capability); - - -/********************************************************************* - IE Name: UE Timers and Constants - - Description: Contains timers and constants used by the UE in - either RRC_CONNECTED or RRC_IDLE - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_T300_MS100 = 0, - LIBLTE_RRC_T300_MS200, - LIBLTE_RRC_T300_MS300, - LIBLTE_RRC_T300_MS400, - LIBLTE_RRC_T300_MS600, - LIBLTE_RRC_T300_MS1000, - LIBLTE_RRC_T300_MS1500, - LIBLTE_RRC_T300_MS2000, - LIBLTE_RRC_T300_N_ITEMS, -}LIBLTE_RRC_T300_ENUM; -static const char liblte_rrc_t300_text[LIBLTE_RRC_T300_N_ITEMS][20] = { "100", "200", "300", "400", - "600", "1000", "1500", "2000"}; -static const uint16 liblte_rrc_t300_num[LIBLTE_RRC_T300_N_ITEMS] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; -typedef enum{ - LIBLTE_RRC_T301_MS100 = 0, - LIBLTE_RRC_T301_MS200, - LIBLTE_RRC_T301_MS300, - LIBLTE_RRC_T301_MS400, - LIBLTE_RRC_T301_MS600, - LIBLTE_RRC_T301_MS1000, - LIBLTE_RRC_T301_MS1500, - LIBLTE_RRC_T301_MS2000, - LIBLTE_RRC_T301_N_ITEMS, -}LIBLTE_RRC_T301_ENUM; -static const char liblte_rrc_t301_text[LIBLTE_RRC_T301_N_ITEMS][20] = { "100", "200", "300", "400", - "600", "1000", "1500", "2000"}; -static const uint16 liblte_rrc_t301_num[LIBLTE_RRC_T301_N_ITEMS] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; -typedef enum{ - LIBLTE_RRC_T310_MS0 = 0, - LIBLTE_RRC_T310_MS50, - LIBLTE_RRC_T310_MS100, - LIBLTE_RRC_T310_MS200, - LIBLTE_RRC_T310_MS500, - LIBLTE_RRC_T310_MS1000, - LIBLTE_RRC_T310_MS2000, - LIBLTE_RRC_T310_N_ITEMS, -}LIBLTE_RRC_T310_ENUM; -static const char liblte_rrc_t310_text[LIBLTE_RRC_T310_N_ITEMS][20] = { "0", "50", "100", "200", - "500", "1000", "2000"}; -static const uint16 liblte_rrc_t310_num[LIBLTE_RRC_T310_N_ITEMS] = {0, 50, 100, 200, 500, 1000, 2000}; -typedef enum{ - LIBLTE_RRC_N310_N1 = 0, - LIBLTE_RRC_N310_N2, - LIBLTE_RRC_N310_N3, - LIBLTE_RRC_N310_N4, - LIBLTE_RRC_N310_N6, - LIBLTE_RRC_N310_N8, - LIBLTE_RRC_N310_N10, - LIBLTE_RRC_N310_N20, - LIBLTE_RRC_N310_N_ITEMS, -}LIBLTE_RRC_N310_ENUM; -static const char liblte_rrc_n310_text[LIBLTE_RRC_N310_N_ITEMS][20] = { "1", "2", "3", "4", - "6", "8", "10", "20"}; -static const uint8 liblte_rrc_n310_num[LIBLTE_RRC_N310_N_ITEMS] = {1, 2, 3, 4, 6, 8, 10, 20}; -typedef enum{ - LIBLTE_RRC_T311_MS1000 = 0, - LIBLTE_RRC_T311_MS3000, - LIBLTE_RRC_T311_MS5000, - LIBLTE_RRC_T311_MS10000, - LIBLTE_RRC_T311_MS15000, - LIBLTE_RRC_T311_MS20000, - LIBLTE_RRC_T311_MS30000, - LIBLTE_RRC_T311_N_ITEMS, -}LIBLTE_RRC_T311_ENUM; -static const char liblte_rrc_t311_text[LIBLTE_RRC_T311_N_ITEMS][20] = { "1000", "3000", "5000", "10000", - "15000", "20000", "30000"}; -static const uint16 liblte_rrc_t311_num[LIBLTE_RRC_T311_N_ITEMS] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; -typedef enum{ - LIBLTE_RRC_N311_N1 = 0, - LIBLTE_RRC_N311_N2, - LIBLTE_RRC_N311_N3, - LIBLTE_RRC_N311_N4, - LIBLTE_RRC_N311_N5, - LIBLTE_RRC_N311_N6, - LIBLTE_RRC_N311_N8, - LIBLTE_RRC_N311_N10, - LIBLTE_RRC_N311_N_ITEMS, -}LIBLTE_RRC_N311_ENUM; -static const char liblte_rrc_n311_text[LIBLTE_RRC_N311_N_ITEMS][20] = { "1", "2", "3", "4", - "5", "6", "8", "10"}; -static const uint8 liblte_rrc_n311_num[LIBLTE_RRC_N311_N_ITEMS] = {1, 2, 3, 4, 5, 6, 8, 10}; -// Structs -typedef struct{ - LIBLTE_RRC_T300_ENUM t300; - LIBLTE_RRC_T301_ENUM t301; - LIBLTE_RRC_T310_ENUM t310; - LIBLTE_RRC_N310_ENUM n310; - LIBLTE_RRC_T311_ENUM t311; - LIBLTE_RRC_N311_ENUM n311; -}LIBLTE_RRC_UE_TIMERS_AND_CONSTANTS_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_timers_and_constants_ie(LIBLTE_RRC_UE_TIMERS_AND_CONSTANTS_STRUCT *ue_timers_and_constants, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_timers_and_constants_ie(uint8 **ie_ptr, - LIBLTE_RRC_UE_TIMERS_AND_CONSTANTS_STRUCT *ue_timers_and_constants); - -/********************************************************************* - IE Name: Allowed Meas Bandwidth - - Description: Indicates the maximum allowed measurement bandwidth - on a carrier frequency as defined by the parameter - Transmission Bandwidth Configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW6 = 0, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW15, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW25, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW50, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW75, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_MBW100, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_N_ITEMS, -}LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM; -static const char liblte_rrc_allowed_meas_bandwidth_text[LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_N_ITEMS][20] = {"1.4", "3", "5", "10", - "15", "20"}; -static const double liblte_rrc_allowed_meas_bandwidth_num[LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_N_ITEMS] = {1.4, 3, 5, 10, 15, 20}; -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_allowed_meas_bandwidth_ie(LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM allowed_meas_bw, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_allowed_meas_bandwidth_ie(uint8 **ie_ptr, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM *allowed_meas_bw); - -/********************************************************************* - IE Name: Hysteresis - - Description: Used within the entry and leave condition of an - event triggered reporting condition - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_hysteresis_ie(uint8 hysteresis, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_hysteresis_ie(uint8 **ie_ptr, - uint8 *hysteresis); - -/********************************************************************* - IE Name: Location Info - - Description: Transfers location information available at the UE to - correlate measurements and UE position information - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: Meas Config - - Description: Specifies measurements to be performed by the UE, - and covers intra-frequency, inter-frequency and - inter-RAT mobility as well as configuration of - measurement gaps - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_EXPLICIT_LIST_OF_ARFCNS 31 -#define LIBLTE_RRC_MAX_CELL_MEAS 32 -#define LIBLTE_RRC_MAX_OBJECT_ID 32 -#define LIBLTE_RRC_MAX_REPORT_CONFIG_ID 32 -#define LIBLTE_RRC_MAX_MEAS_ID 32 -// Enums -typedef enum{ - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC0 = 0, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC1, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC2, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC3, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC4, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC5, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC6, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC7, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC8, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC9, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC10, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC11, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC12, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC13, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC14, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC15, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC16, - LIBLTE_RRC_BAND_CLASS_CDMA2000_BC17, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE14, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE13, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE12, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE11, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE10, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE9, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE8, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE7, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE6, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE5, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE4, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE3, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE2, - LIBLTE_RRC_BAND_CLASS_CDMA2000_SPARE1, - LIBLTE_RRC_BAND_CLASS_CDMA2000_N_ITEMS, -}LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM; -static const char liblte_rrc_band_class_cdma2000_text[LIBLTE_RRC_BAND_CLASS_CDMA2000_N_ITEMS][20] = { "0", "1", "2", "3", - "4", "5", "6", "7", - "8", "9", "10", "11", - "12", "13", "14", "15", - "16", "17", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -static const int8 liblte_rrc_band_class_cdma2000_num[LIBLTE_RRC_BAND_CLASS_CDMA2000_N_ITEMS] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; -typedef enum{ - LIBLTE_RRC_BAND_INDICATOR_GERAN_DCS1800 = 0, - LIBLTE_RRC_BAND_INDICATOR_GERAN_PCS1900, - LIBLTE_RRC_BAND_INDICATOR_GERAN_N_ITEMS, -}LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM; -static const char liblte_rrc_band_indicator_geran_text[LIBLTE_RRC_BAND_INDICATOR_GERAN_N_ITEMS][20] = {"DCS1800", "PCS1900"}; -typedef enum{ - LIBLTE_RRC_FOLLOWING_ARFCNS_EXPLICIT_LIST = 0, - LIBLTE_RRC_FOLLOWING_ARFCNS_EQUALLY_SPACED, - LIBLTE_RRC_FOLLOWING_ARFCNS_VARIABLE_BIT_MAP, - LIBLTE_RRC_FOLLOWING_ARFCNS_N_ITEMS, -}LIBLTE_RRC_FOLLOWING_ARFCNS_ENUM; -static const char liblte_rrc_following_arfcns_text[LIBLTE_RRC_FOLLOWING_ARFCNS_N_ITEMS][20] = {"Explicit List", "Equally Spaced", "Variable Bit Map"}; -typedef enum{ - LIBLTE_RRC_CDMA2000_TYPE_1XRTT = 0, - LIBLTE_RRC_CDMA2000_TYPE_HRPD, - LIBLTE_RRC_CDMA2000_TYPE_N_ITEMS, -}LIBLTE_RRC_CDMA2000_TYPE_ENUM; -static const char liblte_rrc_cdma2000_type_text[LIBLTE_RRC_CDMA2000_TYPE_N_ITEMS][20] = {"1xrtt", "hrpd"}; -typedef enum{ - LIBLTE_RRC_T_EVALUATION_S30 = 0, - LIBLTE_RRC_T_EVALUATION_S60, - LIBLTE_RRC_T_EVALUATION_S120, - LIBLTE_RRC_T_EVALUATION_S180, - LIBLTE_RRC_T_EVALUATION_S240, - LIBLTE_RRC_T_EVALUATION_SPARE3, - LIBLTE_RRC_T_EVALUATION_SPARE2, - LIBLTE_RRC_T_EVALUATION_SPARE1, - LIBLTE_RRC_T_EVALUATION_N_ITEMS, -}LIBLTE_RRC_T_EVALUATION_ENUM; -static const char liblte_rrc_t_evaluation_text[LIBLTE_RRC_T_EVALUATION_N_ITEMS][20] = { "30", "60", "120", "180", - "240", "SPARE", "SPARE", "SPARE"}; -static const int16 liblte_rrc_t_evaluation_num[LIBLTE_RRC_T_EVALUATION_N_ITEMS] = {30, 60, 120, 180, 240, -1, -1, -1}; -typedef enum{ - LIBLTE_RRC_T_HYST_NORMAL_S30 = 0, - LIBLTE_RRC_T_HYST_NORMAL_S60, - LIBLTE_RRC_T_HYST_NORMAL_S120, - LIBLTE_RRC_T_HYST_NORMAL_S180, - LIBLTE_RRC_T_HYST_NORMAL_S240, - LIBLTE_RRC_T_HYST_NORMAL_SPARE3, - LIBLTE_RRC_T_HYST_NORMAL_SPARE2, - LIBLTE_RRC_T_HYST_NORMAL_SPARE1, - LIBLTE_RRC_T_HYST_NORMAL_N_ITEMS, -}LIBLTE_RRC_T_HYST_NORMAL_ENUM; -static const char liblte_rrc_t_hyst_normal_text[LIBLTE_RRC_T_HYST_NORMAL_N_ITEMS][20] = { "30", "60", "120", "180", - "240", "SPARE", "SPARE", "SPARE"}; -static const int16 liblte_rrc_t_hyst_normal_num[LIBLTE_RRC_T_HYST_NORMAL_N_ITEMS] = {30, 60, 120, 180, 240, -1, -1, -1}; -typedef enum{ - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N4 = 0, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N8, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N12, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N16, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N24, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N32, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N48, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N64, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N84, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N96, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N128, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N168, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N252, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N504, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_SPARE2, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_SPARE1, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N1, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_N_ITEMS, -}LIBLTE_RRC_PHYS_CELL_ID_RANGE_ENUM; -static const char liblte_rrc_phys_cell_id_range_text[LIBLTE_RRC_PHYS_CELL_ID_RANGE_N_ITEMS][20] = { "4", "8", "12", "16", - "24", "32", "48", "64", - "84", "96", "128", "168", - "252", "504", "SPARE", "SPARE", - "1"}; -static const int16 liblte_rrc_phys_cell_id_range_num[LIBLTE_RRC_PHYS_CELL_ID_RANGE_N_ITEMS] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504, -1, -1, 1}; -typedef enum{ - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N24 = 0, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N22, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N20, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N18, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N16, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N14, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N12, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N10, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N8, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N6, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N5, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N4, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N3, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N2, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_N1, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_0, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_1, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_2, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_3, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_4, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_5, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_6, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_8, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_10, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_12, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_14, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_16, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_18, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_20, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_22, - LIBLTE_RRC_Q_OFFSET_RANGE_DB_24, - LIBLTE_RRC_Q_OFFSET_RANGE_N_ITEMS, -}LIBLTE_RRC_Q_OFFSET_RANGE_ENUM; -static const char liblte_rrc_q_offset_range_text[LIBLTE_RRC_Q_OFFSET_RANGE_N_ITEMS][20] = {"-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"}; -static const int8 liblte_rrc_q_offset_range_num[LIBLTE_RRC_Q_OFFSET_RANGE_N_ITEMS] = {-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}; -typedef enum{ - LIBLTE_RRC_SSSF_MEDIUM_0DOT25 = 0, - LIBLTE_RRC_SSSF_MEDIUM_0DOT5, - LIBLTE_RRC_SSSF_MEDIUM_0DOT75, - LIBLTE_RRC_SSSF_MEDIUM_1DOT0, - LIBLTE_RRC_SSSF_MEDIUM_N_ITEMS, -}LIBLTE_RRC_SSSF_MEDIUM_ENUM; -static const char liblte_rrc_sssf_medium_text[LIBLTE_RRC_SSSF_MEDIUM_N_ITEMS][20] = {"0.25", "0.5", "0.75", "1.0"}; -static const double liblte_rrc_sssf_medium_num[LIBLTE_RRC_SSSF_MEDIUM_N_ITEMS] = {0.25, 0.5, 0.75, 1.0}; -typedef enum{ - LIBLTE_RRC_SSSF_HIGH_0DOT25 = 0, - LIBLTE_RRC_SSSF_HIGH_0DOT5, - LIBLTE_RRC_SSSF_HIGH_0DOT75, - LIBLTE_RRC_SSSF_HIGH_1DOT0, - LIBLTE_RRC_SSSF_HIGH_N_ITEMS, -}LIBLTE_RRC_SSSF_HIGH_ENUM; -static const char liblte_rrc_sssf_high_text[LIBLTE_RRC_SSSF_HIGH_N_ITEMS][20] = {"0.25", "0.5", "0.75", "1.0"}; -static const double liblte_rrc_sssf_high_num[LIBLTE_RRC_SSSF_HIGH_N_ITEMS] = {0.25, 0.5, 0.75, 1.0}; -typedef enum{ - LIBLTE_RRC_GAP_OFFSET_TYPE_GP0 = 0, - LIBLTE_RRC_GAP_OFFSET_TYPE_GP1, - LIBLTE_RRC_GAP_OFFSET_TYPE_N_ITEMS, -}LIBLTE_RRC_GAP_OFFSET_TYPE_ENUM; -static const char liblte_rrc_gap_offset_type_text[LIBLTE_RRC_GAP_OFFSET_TYPE_N_ITEMS][20] = {"GP0", - "GP1"}; -typedef enum{ - LIBLTE_RRC_UTRA_SYSTEM_TYPE_FDD = 0, - LIBLTE_RRC_UTRA_SYSTEM_TYPE_TDD, - LIBLTE_RRC_UTRA_SYSTEM_TYPE_N_ITEMS, -}LIBLTE_RRC_UTRA_SYSTEM_TYPE_ENUM; -static const char liblte_rrc_utra_system_type_text[LIBLTE_RRC_UTRA_SYSTEM_TYPE_N_ITEMS][20] = {"FDD", - "TDD"}; -typedef enum{ - LIBLTE_RRC_MEAS_OBJECT_TYPE_EUTRA = 0, - LIBLTE_RRC_MEAS_OBJECT_TYPE_UTRA, - LIBLTE_RRC_MEAS_OBJECT_TYPE_GERAN, - LIBLTE_RRC_MEAS_OBJECT_TYPE_CDMA2000, - LIBLTE_RRC_MEAS_OBJECT_TYPE_N_ITEMS, -}LIBLTE_RRC_MEAS_OBJECT_TYPE_ENUM; -static const char liblte_rrc_meas_object_type_text[LIBLTE_RRC_MEAS_OBJECT_TYPE_N_ITEMS][20] = {"EUTRA", - "UTRA", - "GERAN", - "CDMA2000"}; -typedef enum{ - LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_CPICH_RSCP = 0, - LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_CPICH_ECNO, - LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_N_ITEMS, -}LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_ENUM; -static const char liblte_rrc_meas_quantity_utra_fdd_text[LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_N_ITEMS][20] = {"CPICH RSCP", - "CPICH Ec/No"}; -typedef enum{ - LIBLTE_RRC_MEAS_QUANTITY_UTRA_TDD_PCCPCH_RSCP = 0, - LIBLTE_RRC_MEAS_QUANTITY_UTRA_TDD_N_ITEMS, -}LIBLTE_RRC_MEAS_QUANTITY_UTRA_TDD_ENUM; -static const char liblte_rrc_meas_quantity_utra_tdd_text[LIBLTE_RRC_MEAS_QUANTITY_UTRA_TDD_N_ITEMS][20] = {"PCCPCH RSCP"}; -typedef enum{ - LIBLTE_RRC_MEAS_QUANTITY_GERAN_RSSI = 0, - LIBLTE_RRC_MEAS_QUANTITY_GERAN_N_ITEMS, -}LIBLTE_RRC_MEAS_QUANTITY_GERAN_ENUM; -static const char liblte_rrc_meas_quantity_geran_text[LIBLTE_RRC_MEAS_QUANTITY_GERAN_N_ITEMS][20] = {"RSSI"}; -typedef enum{ - LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_PILOT_STRENGTH = 0, - LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_PILOT_PN_PHASE_AND_STRENGTH, - LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_N_ITEMS, -}LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_ENUM; -static const char liblte_rrc_meas_quantity_cdma2000_text[LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_N_ITEMS][100] = {"Pilot Strength", - "Pilot PN Phase and Strength"}; -typedef enum{ - LIBLTE_RRC_REPORT_INTERVAL_MS120 = 0, - LIBLTE_RRC_REPORT_INTERVAL_MS240, - LIBLTE_RRC_REPORT_INTERVAL_MS480, - LIBLTE_RRC_REPORT_INTERVAL_MS640, - LIBLTE_RRC_REPORT_INTERVAL_MS1024, - LIBLTE_RRC_REPORT_INTERVAL_MS2048, - LIBLTE_RRC_REPORT_INTERVAL_MS5120, - LIBLTE_RRC_REPORT_INTERVAL_MS10240, - LIBLTE_RRC_REPORT_INTERVAL_MIN1, - LIBLTE_RRC_REPORT_INTERVAL_MIN6, - LIBLTE_RRC_REPORT_INTERVAL_MIN12, - LIBLTE_RRC_REPORT_INTERVAL_MIN30, - LIBLTE_RRC_REPORT_INTERVAL_MIN60, - LIBLTE_RRC_REPORT_INTERVAL_SPARE3, - LIBLTE_RRC_REPORT_INTERVAL_SPARE2, - LIBLTE_RRC_REPORT_INTERVAL_SPARE1, - LIBLTE_RRC_REPORT_INTERVAL_N_ITEMS, -}LIBLTE_RRC_REPORT_INTERVAL_ENUM; -static const char liblte_rrc_report_interval_text[LIBLTE_RRC_REPORT_INTERVAL_N_ITEMS][20] = { "120", "240", "480", "640", - "1024", "2048", "5120", "10240", - "60000", "360000", "720000", "1800000", - "3600000", "SPARE", "SPARE", "SPARE"}; -static const int32 liblte_rrc_report_interval_num[LIBLTE_RRC_REPORT_INTERVAL_N_ITEMS] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 60000, 360000, 720000, 1800000, 3600000, -1, -1, -1}; -typedef enum{ - LIBLTE_RRC_TIME_TO_TRIGGER_MS0 = 0, - LIBLTE_RRC_TIME_TO_TRIGGER_MS40, - LIBLTE_RRC_TIME_TO_TRIGGER_MS64, - LIBLTE_RRC_TIME_TO_TRIGGER_MS80, - LIBLTE_RRC_TIME_TO_TRIGGER_MS100, - LIBLTE_RRC_TIME_TO_TRIGGER_MS128, - LIBLTE_RRC_TIME_TO_TRIGGER_MS160, - LIBLTE_RRC_TIME_TO_TRIGGER_MS256, - LIBLTE_RRC_TIME_TO_TRIGGER_MS320, - LIBLTE_RRC_TIME_TO_TRIGGER_MS480, - LIBLTE_RRC_TIME_TO_TRIGGER_MS512, - LIBLTE_RRC_TIME_TO_TRIGGER_MS640, - LIBLTE_RRC_TIME_TO_TRIGGER_MS1024, - LIBLTE_RRC_TIME_TO_TRIGGER_MS1280, - LIBLTE_RRC_TIME_TO_TRIGGER_MS2560, - LIBLTE_RRC_TIME_TO_TRIGGER_MS5120, - LIBLTE_RRC_TIME_TO_TRIGGER_N_ITEMS, -}LIBLTE_RRC_TIME_TO_TRIGGER_ENUM; -static const char liblte_rrc_time_to_trigger_text[LIBLTE_RRC_TIME_TO_TRIGGER_N_ITEMS][20] = { "0", "40", "64", "80", - "100", "128", "160", "256", - "320", "480", "512", "640", - "1024", "1280", "2560", "5120"}; -static const uint16 liblte_rrc_time_to_trigger_num[LIBLTE_RRC_TIME_TO_TRIGGER_N_ITEMS] = {0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}; -typedef enum{ - LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP = 0, - LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRQ, - LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_N_ITEMS, -}LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM; -static const char liblte_rrc_threshold_eutra_type_text[LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_N_ITEMS][20] = {"RSRP", - "RSRQ"}; -typedef enum{ - LIBLTE_RRC_EVENT_ID_EUTRA_A1 = 0, - LIBLTE_RRC_EVENT_ID_EUTRA_A2, - LIBLTE_RRC_EVENT_ID_EUTRA_A3, - LIBLTE_RRC_EVENT_ID_EUTRA_A4, - LIBLTE_RRC_EVENT_ID_EUTRA_A5, - LIBLTE_RRC_EVENT_ID_EUTRA_A6, - LIBLTE_RRC_EVENT_ID_EUTRA_N_ITEMS, -}LIBLTE_RRC_EVENT_ID_EUTRA_ENUM; -static const char liblte_rrc_event_id_eutra_text[LIBLTE_RRC_EVENT_ID_EUTRA_N_ITEMS][20] = {"A1", "A2", "A3", - "A4", "A5", "A6"}; -typedef enum{ - LIBLTE_RRC_PURPOSE_EUTRA_REPORT_STRONGEST_CELL = 0, - LIBLTE_RRC_PURPOSE_EUTRA_REPORT_CGI, - LIBLTE_RRC_PURPOSE_EUTRA_N_ITEMS, -}LIBLTE_RRC_PURPOSE_EUTRA_ENUM; -static const char liblte_rrc_purpose_eutra_text[LIBLTE_RRC_PURPOSE_EUTRA_N_ITEMS][100] = {"Report Strongest Cell", - "Report CGI"}; -typedef enum{ - LIBLTE_RRC_TRIGGER_TYPE_EUTRA_EVENT = 0, - LIBLTE_RRC_TRIGGER_TYPE_EUTRA_PERIODICAL, - LIBLTE_RRC_TRIGGER_TYPE_EUTRA_N_ITEMS, -}LIBLTE_RRC_TRIGGER_TYPE_EUTRA_ENUM; -static const char liblte_rrc_trigger_type_eutra_text[LIBLTE_RRC_TRIGGER_TYPE_EUTRA_N_ITEMS][20] = {"Event", - "Periodical"}; -typedef enum{ - LIBLTE_RRC_TRIGGER_QUANTITY_RSRP = 0, - LIBLTE_RRC_TRIGGER_QUANTITY_RSRQ, - LIBLTE_RRC_TRIGGER_QUANTITY_N_ITEMS, -}LIBLTE_RRC_TRIGGER_QUANTITY_ENUM; -static const char liblte_rrc_trigger_quantity_text[LIBLTE_RRC_TRIGGER_QUANTITY_N_ITEMS][20] = {"RSRP", - "RSRQ"}; -typedef enum{ - LIBLTE_RRC_REPORT_QUANTITY_SAME_AS_TRIGGER_QUANTITY = 0, - LIBLTE_RRC_REPORT_QUANTITY_BOTH, - LIBLTE_RRC_REPORT_QUANTITY_N_ITEMS, -}LIBLTE_RRC_REPORT_QUANTITY_ENUM; -static const char liblte_rrc_report_quantity_text[LIBLTE_RRC_REPORT_QUANTITY_N_ITEMS][100] = {"Same As Trigger Quantity", - "Both"}; -typedef enum{ - LIBLTE_RRC_REPORT_AMOUNT_R1 = 0, - LIBLTE_RRC_REPORT_AMOUNT_R2, - LIBLTE_RRC_REPORT_AMOUNT_R4, - LIBLTE_RRC_REPORT_AMOUNT_R8, - LIBLTE_RRC_REPORT_AMOUNT_R16, - LIBLTE_RRC_REPORT_AMOUNT_R32, - LIBLTE_RRC_REPORT_AMOUNT_R64, - LIBLTE_RRC_REPORT_AMOUNT_INFINITY, - LIBLTE_RRC_REPORT_AMOUNT_N_ITEMS, -}LIBLTE_RRC_REPORT_AMOUNT_ENUM; -static const char liblte_rrc_report_amount_text[LIBLTE_RRC_REPORT_AMOUNT_N_ITEMS][20] = { "r1", "r2", "r4", "r8", - "r16", "r32", "r64", "INFINITY"}; - -static const int8 liblte_rrc_report_amount_num[LIBLTE_RRC_REPORT_AMOUNT_N_ITEMS] = {1, 2, 4, 8, 16, 32, 64, -1}; - -typedef enum{ - LIBLTE_RRC_THRESHOLD_UTRA_TYPE_RSCP = 0, - LIBLTE_RRC_THRESHOLD_UTRA_TYPE_ECNO, - LIBLTE_RRC_THRESHOLD_UTRA_TYPE_N_ITEMS, -}LIBLTE_RRC_THRESHOLD_UTRA_TYPE_ENUM; -static const char liblte_rrc_threshold_utra_type_text[LIBLTE_RRC_THRESHOLD_UTRA_TYPE_N_ITEMS][20] = {"RSCP", - "Ec/No"}; -typedef enum{ - LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_UTRA = 0, - LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_GERAN, - LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_CDMA2000, - LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_N_ITEMS, -}LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_ENUM; -static const char liblte_rrc_threshold_inter_rat_type_text[LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_N_ITEMS][20] = {"UTRA", - "GERAN", - "CDMA2000"}; -typedef enum{ - LIBLTE_RRC_EVENT_ID_INTER_RAT_B1 = 0, - LIBLTE_RRC_EVENT_ID_INTER_RAT_B2, - LIBLTE_RRC_EVENT_ID_INTER_RAT_N_ITEMS, -}LIBLTE_RRC_EVENT_ID_INTER_RAT_ENUM; -static const char liblte_rrc_event_id_inter_rat_text[LIBLTE_RRC_EVENT_ID_INTER_RAT_N_ITEMS][20] = {"B1", - "B2"}; -typedef enum{ - LIBLTE_RRC_PURPOSE_INTER_RAT_REPORT_STRONGEST_CELLS = 0, - LIBLTE_RRC_PURPOSE_INTER_RAT_REPORT_STRONGEST_CELLS_FOR_SON, - LIBLTE_RRC_PURPOSE_INTER_RAT_REPORT_CGI, - LIBLTE_RRC_PURPOSE_INTER_RAT_N_ITEMS, -}LIBLTE_RRC_PURPOSE_INTER_RAT_ENUM; -static const char liblte_rrc_purpose_inter_rat_text[LIBLTE_RRC_PURPOSE_INTER_RAT_N_ITEMS][100] = {"Report Strongest Cells", - "Report Strongest Cells for SON", - "Report CGI"}; -typedef enum{ - LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_EVENT = 0, - LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_PERIODICAL, - LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_N_ITEMS, -}LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_ENUM; -static const char liblte_rrc_trigger_type_inter_rat_text[LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_N_ITEMS][20] = {"Event", - "Periodical"}; -typedef enum{ - LIBLTE_RRC_REPORT_CONFIG_TYPE_EUTRA = 0, - LIBLTE_RRC_REPORT_CONFIG_TYPE_INTER_RAT, - LIBLTE_RRC_REPORT_CONFIG_TYPE_N_ITEMS, -}LIBLTE_RRC_REPORT_CONFIG_TYPE_ENUM; -static const char liblte_rrc_report_config_type_text[LIBLTE_RRC_REPORT_CONFIG_TYPE_N_ITEMS][20] = {"EUTRA", - "Inter RAT"}; -// Structs -typedef struct{ - LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM bandclass; - uint16 arfcn; -}LIBLTE_RRC_CARRIER_FREQ_CDMA2000_STRUCT; -typedef struct{ - uint8 arfcn_spacing; - uint8 number_of_arfcns; -}LIBLTE_RRC_EQUALLY_SPACED_ARFCNS_STRUCT; -typedef struct{ - LIBLTE_RRC_EQUALLY_SPACED_ARFCNS_STRUCT equally_spaced_arfcns; - LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM band_indicator; - LIBLTE_RRC_FOLLOWING_ARFCNS_ENUM following_arfcns; - uint16 starting_arfcn; - uint16 explicit_list_of_arfcns[LIBLTE_RRC_MAX_EXPLICIT_LIST_OF_ARFCNS]; - uint16 variable_bit_map_of_arfcns; - uint8 explicit_list_of_arfcns_size; -}LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT; -typedef struct{ - uint32 N_cell_idx; - uint8 cell_idx[LIBLTE_RRC_MAX_CELL_MEAS]; -}LIBLTE_RRC_CELL_INDEX_LIST_STRUCT; -typedef struct{ - LIBLTE_RRC_T_EVALUATION_ENUM t_eval; - LIBLTE_RRC_T_HYST_NORMAL_ENUM t_hyst_normal; - uint8 n_cell_change_medium; - uint8 n_cell_change_high; -}LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT; -typedef struct{ - LIBLTE_RRC_PHYS_CELL_ID_RANGE_ENUM range; - uint16 start; -}LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT; -typedef struct{ - uint8 ncc; - uint8 bcc; -}LIBLTE_RRC_PHYS_CELL_ID_GERAN_STRUCT; -typedef struct{ - uint8 pre_reg_zone_id; - uint8 secondary_pre_reg_zone_id_list[2]; - uint8 secondary_pre_reg_zone_id_list_size; - bool pre_reg_allowed; - bool pre_reg_zone_id_present; -}LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT; -typedef struct{ - LIBLTE_RRC_SSSF_MEDIUM_ENUM sf_medium; - LIBLTE_RRC_SSSF_HIGH_ENUM sf_high; -}LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT; -typedef struct{ - LIBLTE_RRC_GAP_OFFSET_TYPE_ENUM gap_offset_type; - uint8 gap_offset; - bool setup_present; -}LIBLTE_RRC_MEAS_GAP_CONFIG_STRUCT; -typedef struct{ - uint8 meas_id; - uint8 meas_obj_id; - uint8 rep_cnfg_id; -}LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_STRUCT meas_id_list[LIBLTE_RRC_MAX_MEAS_ID]; - uint32 N_meas_id; -}LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT; -typedef struct{ - uint16 pci; - uint8 cell_idx; -}LIBLTE_RRC_CELLS_TO_ADD_MOD_CDMA2000_STRUCT; -typedef struct{ - LIBLTE_RRC_CARRIER_FREQ_CDMA2000_STRUCT carrier_freq; - LIBLTE_RRC_CELL_INDEX_LIST_STRUCT cells_to_remove_list; - LIBLTE_RRC_CELLS_TO_ADD_MOD_CDMA2000_STRUCT cells_to_add_mod_list[LIBLTE_RRC_MAX_CELL_MEAS]; - LIBLTE_RRC_CDMA2000_TYPE_ENUM cdma2000_type; - uint32 N_cells_to_add_mod; - uint16 cell_for_which_to_rep_cgi; - uint8 search_win_size; - int8 offset_freq; - bool search_win_size_present; - bool cells_to_remove_list_present; - bool cell_for_which_to_rep_cgi_present; -}LIBLTE_RRC_MEAS_OBJECT_CDMA2000_STRUCT; -typedef struct{ - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM cell_offset; - uint16 pci; - uint8 cell_idx; -}LIBLTE_RRC_CELLS_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT pci_range; - uint8 cell_idx; -}LIBLTE_RRC_BLACK_CELLS_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_CELL_INDEX_LIST_STRUCT cells_to_remove_list; - LIBLTE_RRC_CELLS_TO_ADD_MOD_STRUCT cells_to_add_mod_list[LIBLTE_RRC_MAX_CELL_MEAS]; - LIBLTE_RRC_CELL_INDEX_LIST_STRUCT black_cells_to_remove_list; - LIBLTE_RRC_BLACK_CELLS_TO_ADD_MOD_STRUCT black_cells_to_add_mod_list[LIBLTE_RRC_MAX_CELL_MEAS]; - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM allowed_meas_bw; - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM offset_freq; - uint32 N_cells_to_add_mod; - uint32 N_black_cells_to_add_mod; - uint16 carrier_freq; - uint16 cell_for_which_to_rep_cgi; - uint8 neigh_cell_cnfg; - bool offset_freq_not_default; - bool presence_ant_port_1; - bool cells_to_remove_list_present; - bool black_cells_to_remove_list_present; - bool cell_for_which_to_rep_cgi_present; -}LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT carrier_freqs; - LIBLTE_RRC_PHYS_CELL_ID_GERAN_STRUCT cell_for_which_to_rep_cgi; - int8 offset_freq; - uint8 ncc_permitted; - bool cell_for_which_to_rep_cgi_present; -}LIBLTE_RRC_MEAS_OBJECT_GERAN_STRUCT; -typedef struct{ - uint16 pci; - uint8 cell_idx; -}LIBLTE_RRC_CELLS_TO_ADD_MOD_LIST_UTRA_FDD_STRUCT; -typedef struct{ - uint8 cell_idx; - uint8 pci; -}LIBLTE_RRC_CELLS_TO_ADD_MOD_LIST_UTRA_TDD_STRUCT; -typedef struct{ - LIBLTE_RRC_CELLS_TO_ADD_MOD_LIST_UTRA_FDD_STRUCT cells_fdd[LIBLTE_RRC_MAX_CELL_MEAS]; - LIBLTE_RRC_CELLS_TO_ADD_MOD_LIST_UTRA_TDD_STRUCT cells_tdd[LIBLTE_RRC_MAX_CELL_MEAS]; - LIBLTE_RRC_UTRA_SYSTEM_TYPE_ENUM type; - uint32 N_cells; -}LIBLTE_RRC_CELLS_TO_ADD_MOD_LIST_UTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_UTRA_SYSTEM_TYPE_ENUM type; - uint16 pci_fdd; - uint8 pci_tdd; -}LIBLTE_RRC_CELLS_FOR_WHICH_TO_REPORT_CGI_STRUCT; -typedef struct{ - LIBLTE_RRC_CELL_INDEX_LIST_STRUCT cells_to_remove_list; - LIBLTE_RRC_CELLS_TO_ADD_MOD_LIST_UTRA_STRUCT cells_to_add_mod_list; - LIBLTE_RRC_CELLS_FOR_WHICH_TO_REPORT_CGI_STRUCT cells_for_which_to_rep_cgi; - uint16 carrier_freq; - int8 offset_freq; - bool cells_to_remove_list_present; - bool cells_to_add_mod_list_present; - bool cells_for_which_to_rep_cgi_present; -}LIBLTE_RRC_MEAS_OBJECT_UTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT meas_obj_eutra; - LIBLTE_RRC_MEAS_OBJECT_UTRA_STRUCT meas_obj_utra; - LIBLTE_RRC_MEAS_OBJECT_GERAN_STRUCT meas_obj_geran; - LIBLTE_RRC_MEAS_OBJECT_CDMA2000_STRUCT meas_obj_cdma2000; - LIBLTE_RRC_MEAS_OBJECT_TYPE_ENUM meas_obj_type; - uint8 meas_obj_id; -}LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_STRUCT meas_obj_list[LIBLTE_RRC_MAX_OBJECT_ID]; - uint32 N_meas_obj; -}LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT; -typedef struct{ - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM fc_rsrp; - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM fc_rsrq; - bool fc_rsrp_not_default; - bool fc_rsrq_not_default; -}LIBLTE_RRC_QUANTITY_CONFIG_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_ENUM mq_fdd; - LIBLTE_RRC_MEAS_QUANTITY_UTRA_TDD_ENUM mq_tdd; - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM fc; - bool fc_not_default; -}LIBLTE_RRC_QUANTITY_CONFIG_UTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_QUANTITY_GERAN_ENUM mq; - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM fc; - bool fc_not_default; -}LIBLTE_RRC_QUANTITY_CONFIG_GERAN_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_ENUM mq; -}LIBLTE_RRC_QUANTITY_CONFIG_CDMA2000_STRUCT; -typedef struct{ - LIBLTE_RRC_QUANTITY_CONFIG_EUTRA_STRUCT qc_eutra; - LIBLTE_RRC_QUANTITY_CONFIG_UTRA_STRUCT qc_utra; - LIBLTE_RRC_QUANTITY_CONFIG_GERAN_STRUCT qc_geran; - LIBLTE_RRC_QUANTITY_CONFIG_CDMA2000_STRUCT qc_cdma2000; - bool qc_eutra_present; - bool qc_utra_present; - bool qc_geran_present; - bool qc_cdma2000_present; -}LIBLTE_RRC_QUANTITY_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM type; - uint8 range; -}LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT eutra; -}LIBLTE_RRC_EVENT_A1_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT eutra; -}LIBLTE_RRC_EVENT_A2_STRUCT; -typedef struct{ - int8 offset; - bool report_on_leave; -}LIBLTE_RRC_EVENT_A3_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT eutra; -}LIBLTE_RRC_EVENT_A4_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT eutra1; - LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT eutra2; -}LIBLTE_RRC_EVENT_A5_STRUCT; -typedef struct{ - int8 offset; - bool report_on_leave; -}LIBLTE_RRC_EVENT_A6_STRUCT; -typedef struct{ - LIBLTE_RRC_EVENT_A1_STRUCT event_a1; - LIBLTE_RRC_EVENT_A2_STRUCT event_a2; - LIBLTE_RRC_EVENT_A3_STRUCT event_a3; - LIBLTE_RRC_EVENT_A4_STRUCT event_a4; - LIBLTE_RRC_EVENT_A5_STRUCT event_a5; - LIBLTE_RRC_EVENT_A6_STRUCT event_a6; - LIBLTE_RRC_EVENT_ID_EUTRA_ENUM event_id; - LIBLTE_RRC_TIME_TO_TRIGGER_ENUM time_to_trigger; - uint8 hysteresis; -}LIBLTE_RRC_EVENT_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_PURPOSE_EUTRA_ENUM purpose; -}LIBLTE_RRC_PERIODICAL_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_EVENT_EUTRA_STRUCT event; - LIBLTE_RRC_PERIODICAL_EUTRA_STRUCT periodical; - LIBLTE_RRC_TRIGGER_TYPE_EUTRA_ENUM trigger_type; - LIBLTE_RRC_TRIGGER_QUANTITY_ENUM trigger_quantity; - LIBLTE_RRC_REPORT_QUANTITY_ENUM report_quantity; - LIBLTE_RRC_REPORT_INTERVAL_ENUM report_interval; - LIBLTE_RRC_REPORT_AMOUNT_ENUM report_amount; - uint8 max_report_cells; -}LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_UTRA_TYPE_ENUM type; - int8 value; -}LIBLTE_RRC_THRESHOLD_UTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_UTRA_STRUCT utra; - LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_ENUM type; - uint8 geran; - uint8 cdma2000; -}LIBLTE_RRC_EVENT_B1_STRUCT; -typedef struct{ - LIBLTE_RRC_THRESHOLD_UTRA_STRUCT utra; - LIBLTE_RRC_THRESHOLD_EUTRA_STRUCT eutra; - LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_ENUM type2; - uint8 geran; - uint8 cdma2000; -}LIBLTE_RRC_EVENT_B2_STRUCT; -typedef struct{ - LIBLTE_RRC_EVENT_B1_STRUCT event_b1; - LIBLTE_RRC_EVENT_B2_STRUCT event_b2; - LIBLTE_RRC_EVENT_ID_INTER_RAT_ENUM event_id; - LIBLTE_RRC_TIME_TO_TRIGGER_ENUM time_to_trigger; - uint8 hysteresis; -}LIBLTE_RRC_EVENT_INTER_RAT_STRUCT; -typedef struct{ - LIBLTE_RRC_PURPOSE_INTER_RAT_ENUM purpose; -}LIBLTE_RRC_PERIODICAL_INTER_RAT_STRUCT; -typedef struct{ - LIBLTE_RRC_EVENT_INTER_RAT_STRUCT event; - LIBLTE_RRC_PERIODICAL_INTER_RAT_STRUCT periodical; - LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_ENUM trigger_type; - LIBLTE_RRC_REPORT_INTERVAL_ENUM report_interval; - LIBLTE_RRC_REPORT_AMOUNT_ENUM report_amount; - uint8 max_report_cells; -}LIBLTE_RRC_REPORT_CONFIG_INTER_RAT_STRUCT; -typedef struct{ - LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT rep_cnfg_eutra; - LIBLTE_RRC_REPORT_CONFIG_INTER_RAT_STRUCT rep_cnfg_inter_rat; - LIBLTE_RRC_REPORT_CONFIG_TYPE_ENUM rep_cnfg_type; - uint8 rep_cnfg_id; -}LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_STRUCT rep_cnfg_list[LIBLTE_RRC_MAX_REPORT_CONFIG_ID]; - uint32 N_rep_cnfg; -}LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT; -typedef struct{ - LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT mob_state_params; - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT time_to_trig_sf; -}LIBLTE_RRC_SPEED_STATE_PARAMS_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT meas_obj_to_add_mod_list; - LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT rep_cnfg_to_add_mod_list; - LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT meas_id_to_add_mod_list; - LIBLTE_RRC_QUANTITY_CONFIG_STRUCT quantity_cnfg; - LIBLTE_RRC_MEAS_GAP_CONFIG_STRUCT meas_gap_cnfg; - LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT pre_reg_info_hrpd; - LIBLTE_RRC_SPEED_STATE_PARAMS_STRUCT speed_state_params; - uint32 N_meas_obj_to_remove; - uint32 N_rep_cnfg_to_remove; - uint32 N_meas_id_to_remove; - uint8 meas_obj_to_remove_list[LIBLTE_RRC_MAX_OBJECT_ID]; - uint8 rep_cnfg_to_remove_list[LIBLTE_RRC_MAX_REPORT_CONFIG_ID]; - uint8 meas_id_to_remove_list[LIBLTE_RRC_MAX_MEAS_ID]; - uint8 s_meas; - bool meas_obj_to_add_mod_list_present; - bool rep_cnfg_to_add_mod_list_present; - bool meas_id_to_add_mod_list_present; - bool quantity_cnfg_present; - bool meas_gap_cnfg_present; - bool s_meas_present; - bool pre_reg_info_hrpd_present; - bool speed_state_params_present; -}LIBLTE_RRC_MEAS_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_config_ie(LIBLTE_RRC_MEAS_CONFIG_STRUCT *meas_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_CONFIG_STRUCT *meas_cnfg); - -/********************************************************************* - IE Name: Meas Gap Config - - Description: Specifies the measurement gap configuration and - controls setup/release of measurement gaps - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Meas Gap Config enum defined above -// Structs -// Meas Gap Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_gap_config_ie(LIBLTE_RRC_MEAS_GAP_CONFIG_STRUCT *meas_gap_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_gap_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_GAP_CONFIG_STRUCT *meas_gap_cnfg); - -/********************************************************************* - IE Name: Meas ID - - Description: Identifies a measurement configuration, i.e. linking - of a measurement object and a reporting configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_id_ie(uint8 meas_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_id_ie(uint8 **ie_ptr, - uint8 *meas_id); - -/********************************************************************* - IE Name: Meas Id To Add Mod List - - Description: Concerns a list of measurement identities to add or - modify, with for each entry the meas ID, the - associated meas object ID and the associated report - config ID - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Meas ID To Add Mod List structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_id_to_add_mod_list_ie(LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT *list, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_id_to_add_mod_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT *list); - -/********************************************************************* - IE Name: Meas Object CDMA2000 - - Description: Specifies information applicable for inter-RAT - CDMA2000 neighboring cells - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Meas Object CDMA2000 structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_cdma2000_ie(LIBLTE_RRC_MEAS_OBJECT_CDMA2000_STRUCT *meas_obj_cdma2000, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_CDMA2000_STRUCT *meas_obj_cdma2000); - -/********************************************************************* - IE Name: Meas Object EUTRA - - Description: Specifies information applicable for intra-frequency - or inter-frequency E-UTRA cells - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Meas Object EUTRA structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_eutra_ie(LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT *meas_obj_eutra, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT *meas_obj_eutra); - -/********************************************************************* - IE Name: Meas Object GERAN - - Description: Specifies information applicable for inter-RAT - GERAN neighboring frequencies - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Meas Object GERAN struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_geran_ie(LIBLTE_RRC_MEAS_OBJECT_GERAN_STRUCT *meas_obj_geran, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_GERAN_STRUCT *meas_obj_geran); - -/********************************************************************* - IE Name: Meas Object ID - - Description: Identifies a measurement object configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_id_ie(uint8 meas_object_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_id_ie(uint8 **ie_ptr, - uint8 *meas_object_id); - -/********************************************************************* - IE Name: Meas Object To Add Mod List - - Description: Concerns a list of measurement objects to add or - modify - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Meas Object To Add Mod List enum defined above -// Structs -// Meas Object To Add Mod List structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_to_add_mod_list_ie(LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT *list, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_to_add_mod_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT *list); - -/********************************************************************* - IE Name: Meas Object UTRA - - Description: Specifies information applicable for inter-RAT UTRA - neighboring cells - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Meas Object UTRA define defined above -// Enums -// Meas Object UTRA enum defined above -// Structs -// Meas Object UTRA structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_utra_ie(LIBLTE_RRC_MEAS_OBJECT_UTRA_STRUCT *meas_obj_utra, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_utra_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_UTRA_STRUCT *meas_obj_utra); - -/********************************************************************* - IE Name: Meas Results - - Description: Covers measured results for intra-frequency, - inter-frequency and inter-RAT mobility - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: Quantity Config - - Description: Specifies the measurement quantities and layer 3 - filtering coefficients for E-UTRA and inter-RAT - measurements - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Quantity Config enums defined above -// Structs -// Quantity Config structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_quantity_config_ie(LIBLTE_RRC_QUANTITY_CONFIG_STRUCT *qc, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_quantity_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_QUANTITY_CONFIG_STRUCT *qc); - -/********************************************************************* - IE Name: Report Config EUTRA - - Description: Specifies criteria for triggering of an E-UTRA - measurement reporting event - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Report Config EUTRA enums defined above -// Structs -// Report Config EUTRA structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_eutra_ie(LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT *rep_cnfg_eutra, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT *rep_cnfg_eutra); - -/********************************************************************* - IE Name: Report Config ID - - Description: Identifies a measurement reporting configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_id_ie(uint8 report_cnfg_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_id_ie(uint8 **ie_ptr, - uint8 *report_cnfg_id); - -/********************************************************************* - IE Name: Report Config Inter RAT - - Description: Specifies criteria for triggering of an inter-RAT - measurement reporting event - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Report Config Inter RAT enums defined above -// Structs -// Report Config Inter RAT structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_inter_rat_ie(LIBLTE_RRC_REPORT_CONFIG_INTER_RAT_STRUCT *rep_cnfg_inter_rat, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_inter_rat_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_CONFIG_INTER_RAT_STRUCT *rep_cnfg_inter_rat); - -/********************************************************************* - IE Name: Report Config To Add Mod List - - Description: Concerns a list of reporting configurations to add - or modify - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Report Config To Add Mod List enum defined above -// Structs -// Report Config To Add Mod List structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_to_add_mod_list_ie(LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT *list, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_to_add_mod_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT *list); - -/********************************************************************* - IE Name: Report Interval - - Description: Indicates the interval between periodic reports - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Report Interval enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_interval_ie(LIBLTE_RRC_REPORT_INTERVAL_ENUM report_int, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_interval_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_INTERVAL_ENUM *report_int); - -/********************************************************************* - IE Name: RSRP Range - - Description: Specifies the value range used in RSRP measurements - and thresholds - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rsrp_range_ie(uint8 rsrp_range, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rsrp_range_ie(uint8 **ie_ptr, - uint8 *rsrp_range); - -/********************************************************************* - IE Name: RSRQ Range - - Description: Specifies the value range used in RSRQ measurements - and thresholds - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rsrq_range_ie(uint8 rsrq_range, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rsrq_range_ie(uint8 **ie_ptr, - uint8 *rsrq_range); - -/********************************************************************* - IE Name: Time To Trigger - - Description: Specifies the value range used for the time to - trigger parameter, which concerns the time during - which specific criteria for the event needs to be - met in order to trigger a measurement report - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// Defines -// Enums -// Time To Trigger enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_time_to_trigger_ie(LIBLTE_RRC_TIME_TO_TRIGGER_ENUM time_to_trigger, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_time_to_trigger_ie(uint8 **ie_ptr, - LIBLTE_RRC_TIME_TO_TRIGGER_ENUM *time_to_trigger); - -/********************************************************************* - IE Name: Additional Spectrum Emission - - Description: FIXME - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_additional_spectrum_emission_ie(uint8 add_spect_em, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_additional_spectrum_emission_ie(uint8 **ie_ptr, - uint8 *add_spect_em); - -/********************************************************************* - IE Name: ARFCN value CDMA2000 - - Description: Indicates the CDMA2000 carrier frequency within - a CDMA2000 band - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_cdma2000_ie(uint16 arfcn, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_cdma2000_ie(uint8 **ie_ptr, - uint16 *arfcn); - -/********************************************************************* - IE Name: ARFCN value EUTRA - - Description: Indicates the ARFCN applicable for a downlink, - uplink, or bi-directional (TDD) E-UTRA carrier - frequency - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_eutra_ie(uint16 arfcn, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_eutra_ie(uint8 **ie_ptr, - uint16 *arfcn); - -/********************************************************************* - IE Name: ARFCN value GERAN - - Description: Specifies the ARFCN value applicable for a GERAN - BCCH carrier frequency - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_geran_ie(uint16 arfcn, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_geran_ie(uint8 **ie_ptr, - uint16 *arfcn); - -/********************************************************************* - IE Name: ARFCN value UTRA - - Description: Indicates the ARFCN applicable for a downlink (Nd, - FDD) or bi-directional (Nt, TDD) UTRA carrier - frequency - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_utra_ie(uint16 arfcn, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_utra_ie(uint8 **ie_ptr, - uint16 *arfcn); - -/********************************************************************* - IE Name: Band Class CDMA2000 - - Description: Defines the CDMA2000 band in which the CDMA2000 - carrier frequency can be found - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Band Class CDMA2000 enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_band_class_cdma2000_ie(LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM bc_cdma2000, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_band_class_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM *bc_cdma2000); - -/********************************************************************* - IE Name: Band Indicator GERAN - - Description: Indicates how to interpret an associated GERAN - carrier ARFCN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Band Indicator GERAN enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_band_indicator_geran_ie(LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM bi_geran, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_band_indicator_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM *bi_geran); - -/********************************************************************* - IE Name: Carrier Freq CDMA2000 - - Description: Provides the CDMA2000 carrier information - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Carrier Freq CDMA2000 struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_carrier_freq_cdma2000_ie(LIBLTE_RRC_CARRIER_FREQ_CDMA2000_STRUCT *carrier_freq, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_carrier_freq_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_CARRIER_FREQ_CDMA2000_STRUCT *carrier_freq); - -/********************************************************************* - IE Name: Carrier Freq GERAN - - Description: Provides an unambiguous carrier frequency description - of a GERAN cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM band_indicator; - uint16 arfcn; -}LIBLTE_RRC_CARRIER_FREQ_GERAN_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_carrier_freq_geran_ie(LIBLTE_RRC_CARRIER_FREQ_GERAN_STRUCT *carrier_freq, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_carrier_freq_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_CARRIER_FREQ_GERAN_STRUCT *carrier_freq); - -/********************************************************************* - IE Name: Carrier Freqs GERAN - - Description: Provides one or more GERAN ARFCN values, which - represent a list of GERAN BCCH carrier frequencies - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Carrier Freqs GERAN define defined above -// Enums -// Carrier Freqs GERAN enum defined above -// Structs -// Carrier Freqs GERAN structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_carrier_freqs_geran_ie(LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT *carrier_freqs, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_carrier_freqs_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT *carrier_freqs); - -/********************************************************************* - IE Name: CDMA2000 Type - - Description: Describes the type of CDMA2000 network - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// CDMA2000 Type enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cdma2000_type_ie(LIBLTE_RRC_CDMA2000_TYPE_ENUM cdma2000_type, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cdma2000_type_ie(uint8 **ie_ptr, - LIBLTE_RRC_CDMA2000_TYPE_ENUM *cdma2000_type); - -/********************************************************************* - IE Name: Cell Identity - - Description: Unambiguously identifies a cell within a PLMN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_identity_ie(uint32 cell_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_identity_ie(uint8 **ie_ptr, - uint32 *cell_id); - -/********************************************************************* - IE Name: Cell Index List - - Description: Concerns a list of cell indecies, which may be used - for different purposes - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Cell Index List struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_index_list_ie(LIBLTE_RRC_CELL_INDEX_LIST_STRUCT *cell_idx_list, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_index_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_INDEX_LIST_STRUCT *cell_idx_list); - -/********************************************************************* - IE Name: Cell Reselection Priority - - Description: Contains the absolute priority of the concerned - carrier frequency/set of frequencies (GERAN)/ - bandclass (CDMA2000), as used by the cell - reselection procedure - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_reselection_priority_ie(uint8 cell_resel_prio, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_reselection_priority_ie(uint8 **ie_ptr, - uint8 *cell_resel_prio); - -/********************************************************************* - IE Name: CSFB Registration Param 1xRTT - - Description: Indicates whether or not the UE shall perform a - CDMA2000 1xRTT pre-registration if the UE does not - have a valid/current pre-registration - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_POWER_DOWN_REG_R9_TRUE = 0, - LIBLTE_RRC_POWER_DOWN_REG_R9_N_ITEMS, -}LIBLTE_RRC_POWER_DOWN_REG_R9_ENUM; -static const char liblte_rrc_power_down_reg_r9_text[LIBLTE_RRC_POWER_DOWN_REG_R9_N_ITEMS][20] = {"TRUE"}; -// Structs -typedef struct{ - uint16 sid; - uint16 nid; - uint16 reg_zone; - uint8 reg_period; - uint8 total_zone; - uint8 zone_timer; - bool multiple_sid; - bool multiple_nid; - bool home_reg; - bool foreign_sid_reg; - bool foreign_nid_reg; - bool param_reg; - bool power_up_reg; -}LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_STRUCT; -typedef struct{ - LIBLTE_RRC_POWER_DOWN_REG_R9_ENUM power_down_reg; -}LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_V920_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_registration_param_1xrtt_ie(LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_STRUCT *csfb_reg_param, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_registration_param_1xrtt_ie(uint8 **ie_ptr, - LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_STRUCT *csfb_reg_param); -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_registration_param_1xrtt_v920_ie(LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_V920_STRUCT *csfb_reg_param, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_registration_param_1xrtt_v920_ie(uint8 **ie_ptr, - LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_V920_STRUCT *csfb_reg_param); - -/********************************************************************* - IE Name: Cell Global ID EUTRA - - Description: Specifies the Evolved Cell Global Identifier (ECGI), - the globally unique identity of a cell in E-UTRA - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id; - uint32 cell_id; -}LIBLTE_RRC_CELL_GLOBAL_ID_EUTRA_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_eutra_ie(LIBLTE_RRC_CELL_GLOBAL_ID_EUTRA_STRUCT *cell_global_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_EUTRA_STRUCT *cell_global_id); - -/********************************************************************* - IE Name: Cell Global ID UTRA - - Description: Specifies the global UTRAN Cell Identifier, the - globally unique identity of a cell in UTRA - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id; - uint32 cell_id; -}LIBLTE_RRC_CELL_GLOBAL_ID_UTRA_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_utra_ie(LIBLTE_RRC_CELL_GLOBAL_ID_UTRA_STRUCT *cell_global_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_utra_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_UTRA_STRUCT *cell_global_id); - -/********************************************************************* - IE Name: Cell Global ID GERAN - - Description: Specifies the Cell Global Identity (CGI), the - globally unique identity of a cell in GERAN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id; - uint16 lac; - uint16 cell_id; -}LIBLTE_RRC_CELL_GLOBAL_ID_GERAN_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_geran_ie(LIBLTE_RRC_CELL_GLOBAL_ID_GERAN_STRUCT *cell_global_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_GERAN_STRUCT *cell_global_id); - -/********************************************************************* - IE Name: Cell Global ID CDMA2000 - - Description: Specifies the Cell Global Identity (CGI), the - globally unique identity of a cell in CDMA2000 - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint64 onexrtt; - uint32 hrpd[4]; -}LIBLTE_RRC_CELL_GLOBAL_ID_CDMA2000_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_cdma2000_ie(LIBLTE_RRC_CELL_GLOBAL_ID_CDMA2000_STRUCT *cell_global_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_CDMA2000_STRUCT *cell_global_id); - -/********************************************************************* - IE Name: CSG Identity - - Description: Identifies a Closed Subscriber Group - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_CSG_IDENTITY_NOT_PRESENT 0xFFFFFFFF -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_csg_identity_ie(uint32 csg_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csg_identity_ie(uint8 **ie_ptr, - uint32 *csg_id); - -/********************************************************************* - IE Name: Mobility Control Info - - Description: Includes parameters relevant for network controlled - mobility to/within E-UTRA - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_ANTENNA_PORTS_COUNT_AN1 = 0, - LIBLTE_RRC_ANTENNA_PORTS_COUNT_AN2, - LIBLTE_RRC_ANTENNA_PORTS_COUNT_AN4, - LIBLTE_RRC_ANTENNA_PORTS_COUNT_SPARE1, - LIBLTE_RRC_ANTENNA_PORTS_COUNT_N_ITEMS, -}LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM; -static const char liblte_rrc_antenna_ports_count_text[LIBLTE_RRC_ANTENNA_PORTS_COUNT_N_ITEMS][20] = {"an1", "an2", "an4", "SPARE"}; -typedef enum{ - LIBLTE_RRC_PHICH_DURATION_NORMAL = 0, - LIBLTE_RRC_PHICH_DURATION_EXTENDED, - LIBLTE_RRC_PHICH_DURATION_N_ITEMS, -}LIBLTE_RRC_PHICH_DURATION_ENUM; -static const char liblte_rrc_phich_duration_text[LIBLTE_RRC_PHICH_DURATION_N_ITEMS][20] = {"Normal", "Extended"}; -typedef enum{ - LIBLTE_RRC_PHICH_RESOURCE_1_6 = 0, - LIBLTE_RRC_PHICH_RESOURCE_1_2, - LIBLTE_RRC_PHICH_RESOURCE_1, - LIBLTE_RRC_PHICH_RESOURCE_2, - LIBLTE_RRC_PHICH_RESOURCE_N_ITEMS, -}LIBLTE_RRC_PHICH_RESOURCE_ENUM; -static const char liblte_rrc_phich_resource_text[LIBLTE_RRC_PHICH_RESOURCE_N_ITEMS][20] = {"1/6", "1/2", "1", "2"}; -static const double liblte_rrc_phich_resource_num[LIBLTE_RRC_PHICH_RESOURCE_N_ITEMS] = {0.16666667, 0.5, 1, 2}; -typedef enum{ - LIBLTE_RRC_DELTA_PUCCH_SHIFT_DS1 = 0, - LIBLTE_RRC_DELTA_PUCCH_SHIFT_DS2, - LIBLTE_RRC_DELTA_PUCCH_SHIFT_DS3, - LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS, -}LIBLTE_RRC_DELTA_PUCCH_SHIFT_ENUM; -static const char liblte_rrc_delta_pucch_shift_text[LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS][20] = {"1", "2", "3"}; -static const uint8 liblte_rrc_delta_pucch_shift_num[LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS] = {1, 2, 3}; -typedef enum{ - LIBLTE_RRC_HOPPING_MODE_INTER_SUBFRAME = 0, - LIBLTE_RRC_HOPPING_MODE_INTRA_AND_INTER_SUBFRAME, - LIBLTE_RRC_HOOPPING_MODE_N_ITEMS, -}LIBLTE_RRC_HOPPING_MODE_ENUM; -static const char liblte_rrc_hopping_mode_text[LIBLTE_RRC_HOOPPING_MODE_N_ITEMS][20] = {"inter-subframe","intra-subframe"}; -typedef enum{ - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N4 = 0, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N8, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N12, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N16, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N20, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N24, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N28, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N32, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N36, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N40, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N44, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N48, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N52, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N56, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N60, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N64, - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N_ITEMS, -}LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_ENUM; -static const char liblte_rrc_number_of_ra_preambles_text[LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N_ITEMS][20] = { "4", "8", "12", "16", - "20", "24", "28", "32", - "36", "40", "44", "48", - "52", "56", "60", "64"}; -static const uint8 liblte_rrc_number_of_ra_preambles_num[LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N_ITEMS] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; -typedef enum{ - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N4 = 0, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N8, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N12, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N16, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N20, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N24, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N28, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N32, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N36, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N40, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N44, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N48, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N52, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N56, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N60, - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N_ITEMS, -}LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_ENUM; -static const char liblte_rrc_size_of_ra_preambles_group_a_text[LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N_ITEMS][20] = { "4", "8", "12", "16", - "20", "24", "28", "32", - "36", "40", "44", "48", - "52", "56", "60"}; -static const uint8 liblte_rrc_size_of_ra_preambles_group_a_num[LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N_ITEMS] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}; -typedef enum{ - LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_B56 = 0, - LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_B144, - LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_B208, - LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_B256, - LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_N_ITEMS, -}LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_ENUM; -static const char liblte_rrc_message_size_group_a_text[LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_N_ITEMS][20] = {"56", "144", "208", "256"}; -static const uint16 liblte_rrc_message_size_group_a_num[LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_N_ITEMS] = {56, 144, 208, 256}; -typedef enum{ - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_MINUS_INFINITY = 0, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB0, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB5, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB8, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB10, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB12, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB15, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_DB18, - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_N_ITEMS, -}LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_ENUM; -static const char liblte_rrc_message_power_offset_group_b_text[LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_N_ITEMS][20] = {"-INFINITY", "0", "5", "8", - "10", "12", "15", "18"}; -static const int liblte_rrc_message_power_offset_group_b_num[LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_N_ITEMS] = {-1, 0, 5, 8, - 10, 12, 15, 18}; -typedef enum{ - LIBLTE_RRC_POWER_RAMPING_STEP_DB0 = 0, - LIBLTE_RRC_POWER_RAMPING_STEP_DB2, - LIBLTE_RRC_POWER_RAMPING_STEP_DB4, - LIBLTE_RRC_POWER_RAMPING_STEP_DB6, - LIBLTE_RRC_POWER_RAMPING_STEP_N_ITEMS, -}LIBLTE_RRC_POWER_RAMPING_STEP_ENUM; -static const char liblte_rrc_power_ramping_step_text[LIBLTE_RRC_POWER_RAMPING_STEP_N_ITEMS][20] = {"0", "2", "4", "6"}; -static const uint8 liblte_rrc_power_ramping_step_num[LIBLTE_RRC_POWER_RAMPING_STEP_N_ITEMS] = {0, 2, 4, 6}; -typedef enum{ - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N120 = 0, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N118, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N116, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N114, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N112, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N110, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N108, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N106, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N104, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N102, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N100, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N98, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N96, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N94, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N92, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N90, - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_N_ITEMS, -}LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_ENUM; -static const char liblte_rrc_preamble_initial_received_target_power_text[LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_N_ITEMS][20] = {"-120", "-118", "-116", "-114", - "-112", "-110", "-108", "-106", - "-104", "-102", "-100", "-98", - "-96", "-94", "-92", "-90"}; -static const int8 liblte_rrc_preamble_initial_received_target_power_num[LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_N_ITEMS] = {-120, -118, -116, -114, -112, -110, -108, -106, - -104, -102, -100, -98, -96, -94, -92, -90}; -typedef enum{ - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N3 = 0, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N4, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N5, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N6, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N7, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N8, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N10, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N20, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N50, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N100, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N200, - LIBLTE_RRC_PREAMBLE_TRANS_MAX_N_ITEMS, -}LIBLTE_RRC_PREAMBLE_TRANS_MAX_ENUM; -static const char liblte_rrc_preamble_trans_max_text[LIBLTE_RRC_PREAMBLE_TRANS_MAX_N_ITEMS][20] = { "3", "4", "5", "6", - "7", "8", "10", "20", - "50", "100", "200"}; -static const uint8 liblte_rrc_preamble_trans_max_num[LIBLTE_RRC_PREAMBLE_TRANS_MAX_N_ITEMS] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; -typedef enum{ - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF2 = 0, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF3, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF4, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF5, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF6, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF7, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF8, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF10, - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_N_ITEMS, -}LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_ENUM; -static const char liblte_rrc_ra_response_window_size_text[LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_N_ITEMS][20] = { "2", "3", "4", "5", - "6", "7", "8", "10"}; -static const uint8 liblte_rrc_ra_response_window_size_num[LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_N_ITEMS] = {2, 3, 4, 5, 6, 7, 8, 10}; -typedef enum{ - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF8 = 0, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF16, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF24, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF32, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF40, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF48, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF56, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF64, - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_N_ITEMS, -}LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_ENUM; -static const char liblte_rrc_mac_contention_resolution_timer_text[LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_N_ITEMS][20] = { "8", "16", "24", "32", - "40", "48", "56", "64"}; -static const uint8 liblte_rrc_mac_contention_resolution_timer_num[LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_N_ITEMS] = {8, 16, 24, 32, 40, 48, 56, 64}; -typedef enum{ - LIBLTE_RRC_UL_CP_LENGTH_1 = 0, - LIBLTE_RRC_UL_CP_LENGTH_2, - LIBLTE_RRC_UL_CP_LENGTH_N_ITEMS, -}LIBLTE_RRC_UL_CP_LENGTH_ENUM; -static const char liblte_rrc_ul_cp_length_text[LIBLTE_RRC_UL_CP_LENGTH_N_ITEMS][20] = {"Normal", "Extended"}; -typedef enum{ - LIBLTE_RRC_SRS_BW_CONFIG_0 = 0, - LIBLTE_RRC_SRS_BW_CONFIG_1, - LIBLTE_RRC_SRS_BW_CONFIG_2, - LIBLTE_RRC_SRS_BW_CONFIG_3, - LIBLTE_RRC_SRS_BW_CONFIG_4, - LIBLTE_RRC_SRS_BW_CONFIG_5, - LIBLTE_RRC_SRS_BW_CONFIG_6, - LIBLTE_RRC_SRS_BW_CONFIG_7, - LIBLTE_RRC_SRS_BW_CONFIG_N_ITEMS, -}LIBLTE_RRC_SRS_BW_CONFIG_ENUM; -static const char liblte_rrc_srs_bw_config_text[LIBLTE_RRC_SRS_BW_CONFIG_N_ITEMS][20] = {"0", "1", "2", "3", - "4", "5", "6", "7"}; -static const uint8 liblte_rrc_srs_bw_config_num[LIBLTE_RRC_SRS_BW_CONFIG_N_ITEMS] = {0, 1, 2, 3, 4, 5, 6, 7}; -typedef enum{ - LIBLTE_RRC_SRS_SUBFR_CONFIG_0 = 0, - LIBLTE_RRC_SRS_SUBFR_CONFIG_1, - LIBLTE_RRC_SRS_SUBFR_CONFIG_2, - LIBLTE_RRC_SRS_SUBFR_CONFIG_3, - LIBLTE_RRC_SRS_SUBFR_CONFIG_4, - LIBLTE_RRC_SRS_SUBFR_CONFIG_5, - LIBLTE_RRC_SRS_SUBFR_CONFIG_6, - LIBLTE_RRC_SRS_SUBFR_CONFIG_7, - LIBLTE_RRC_SRS_SUBFR_CONFIG_8, - LIBLTE_RRC_SRS_SUBFR_CONFIG_9, - LIBLTE_RRC_SRS_SUBFR_CONFIG_10, - LIBLTE_RRC_SRS_SUBFR_CONFIG_11, - LIBLTE_RRC_SRS_SUBFR_CONFIG_12, - LIBLTE_RRC_SRS_SUBFR_CONFIG_13, - LIBLTE_RRC_SRS_SUBFR_CONFIG_14, - LIBLTE_RRC_SRS_SUBFR_CONFIG_15, - LIBLTE_RRC_SRS_SUBFR_CONFIG_N_ITEMS, -}LIBLTE_RRC_SRS_SUBFR_CONFIG_ENUM; -static const char liblte_rrc_srs_subfr_config_text[LIBLTE_RRC_SRS_SUBFR_CONFIG_N_ITEMS][20] = { "0", "1", "2", "3", - "4", "5", "6", "7", - "8", "9", "10", "11", - "12", "13", "14", "15"}; -static const uint8 liblte_rrc_srs_subfr_config_num[LIBLTE_RRC_SRS_SUBFR_CONFIG_N_ITEMS] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; -typedef enum{ - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_0 = 0, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_1, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_2, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_3, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_4, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_5, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_6, - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_N_ITEMS, -}LIBLTE_RRC_SUBFRAME_ASSIGNMENT_ENUM; -static const char liblte_rrc_subframe_assignment_text[LIBLTE_RRC_SUBFRAME_ASSIGNMENT_N_ITEMS][20] = {"0", "1", "2", "3", - "4", "5", "6"}; -static const uint8 liblte_rrc_subframe_assignment_num[LIBLTE_RRC_SUBFRAME_ASSIGNMENT_N_ITEMS] = {0, 1, 2, 3, 4, 5, 6}; -typedef enum{ - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_0 = 0, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_1, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_2, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_3, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_4, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_5, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_6, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_7, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_8, - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_N_ITEMS, -}LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_ENUM; -static const char liblte_rrc_special_subframe_patterns_text[LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_N_ITEMS][20] = {"0", "1", "2", "3", - "4", "5", "6", "7", - "8"}; -static const uint8 liblte_rrc_special_subframe_patterns_num[LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_N_ITEMS] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; -typedef enum{ - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_0 = 0, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_04, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_05, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_06, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_07, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_08, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_09, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_1, - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_N_ITEMS, -}LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_ENUM; -static const char liblte_rrc_ul_power_control_alpha_text[LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_N_ITEMS][20] = {"0.0", "0.4", "0.5", "0.6", - "0.7", "0.8", "0.9", "1.0"}; -static const double liblte_rrc_ul_power_control_alpha_num[LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_N_ITEMS] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; -typedef enum{ - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_NEG_2 = 0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_2, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_N_ITEMS, -}LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_ENUM; -static const char liblte_rrc_delta_f_pucch_format_1_text[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_N_ITEMS][20] = {"-2", "0", "2"}; -static const int8 liblte_rrc_delta_f_pucch_format_1_num[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_N_ITEMS] = {-2, 0, 2}; -typedef enum{ - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_1 = 0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_3, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_5, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_N_ITEMS, -}LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_ENUM; -static const char liblte_rrc_delta_f_pucch_format_1b_text[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_N_ITEMS][20] = {"1", "3", "5"}; -static const uint8 liblte_rrc_delta_f_pucch_format_1b_num[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_N_ITEMS] = {1, 3, 5}; -typedef enum{ - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_NEG_2 = 0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_1, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_2, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_N_ITEMS, -}LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_ENUM; -static const char liblte_rrc_delta_f_pucch_format_2_text[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_N_ITEMS][20] = {"-2", "0", "1", "2"}; -static const int8 liblte_rrc_delta_f_pucch_format_2_num[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_N_ITEMS] = {-2, 0, 1, 2}; -typedef enum{ - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_NEG_2 = 0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_2, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_N_ITEMS, -}LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_ENUM; -static const char liblte_rrc_delta_f_pucch_format_2a_text[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_N_ITEMS][20] = {"-2", "0", "2"}; -static const int8 liblte_rrc_delta_f_pucch_format_2a_num[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_N_ITEMS] = {-2, 0, 2}; -typedef enum{ - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_NEG_2 = 0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_0, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_2, - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_N_ITEMS, -}LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_ENUM; -static const char liblte_rrc_delta_f_pucch_format_2b_text[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_N_ITEMS][20] = {"-2", "0", "2"}; -static const int8 liblte_rrc_delta_f_pucch_format_2b_num[LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_N_ITEMS] = {-2, 0, 2}; -typedef enum{ - LIBLTE_RRC_BANDWIDTH_N6 = 0, - LIBLTE_RRC_BANDWIDTH_N15, - LIBLTE_RRC_BANDWIDTH_N25, - LIBLTE_RRC_BANDWIDTH_N50, - LIBLTE_RRC_BANDWIDTH_N75, - LIBLTE_RRC_BANDWIDTH_N100, - LIBLTE_RRC_BANDWIDTH_SPARE10, - LIBLTE_RRC_BANDWIDTH_SPARE9, - LIBLTE_RRC_BANDWIDTH_SPARE8, - LIBLTE_RRC_BANDWIDTH_SPARE7, - LIBLTE_RRC_BANDWIDTH_SPARE6, - LIBLTE_RRC_BANDWIDTH_SPARE5, - LIBLTE_RRC_BANDWIDTH_SPARE4, - LIBLTE_RRC_BANDWIDTH_SPARE3, - LIBLTE_RRC_BANDWIDTH_SPARE2, - LIBLTE_RRC_BANDWIDTH_SPARE1, - LIBLTE_RRC_BANDWIDTH_N_ITEMS, -}LIBLTE_RRC_BANDWIDTH_ENUM; -static const char liblte_rrc_bandwidth_text[LIBLTE_RRC_BANDWIDTH_N_ITEMS][20] = { "1.4", "3", "5", "10", - "15", "20", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -typedef enum{ - LIBLTE_RRC_T304_MS50 = 0, - LIBLTE_RRC_T304_MS100, - LIBLTE_RRC_T304_MS150, - LIBLTE_RRC_T304_MS200, - LIBLTE_RRC_T304_MS500, - LIBLTE_RRC_T304_MS1000, - LIBLTE_RRC_T304_MS2000, - LIBLTE_RRC_T304_SPARE, - LIBLTE_RRC_T304_N_ITEMS, -}LIBLTE_RRC_T304_ENUM; -static const char liblte_rrc_t304_text[LIBLTE_RRC_T304_N_ITEMS][20] = { "50", "100", "150", "200", - "500", "1000", "2000", "SPARE"}; -static const int32 liblte_rrc_t304_num[LIBLTE_RRC_T304_N_ITEMS] = {50, 100, 150, 200, 500, 1000, 2000, -1}; -// Structs -typedef struct{ - uint8 p_b; - int8 rs_power; -}LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT; -typedef struct{ - LIBLTE_RRC_PHICH_DURATION_ENUM dur; - LIBLTE_RRC_PHICH_RESOURCE_ENUM res; -}LIBLTE_RRC_PHICH_CONFIG_STRUCT; -typedef struct{ - uint8 prach_config_index; - uint8 zero_correlation_zone_config; - uint8 prach_freq_offset; - bool high_speed_flag; -}LIBLTE_RRC_PRACH_CONFIG_INFO_STRUCT; -typedef struct{ - LIBLTE_RRC_PRACH_CONFIG_INFO_STRUCT prach_cnfg_info; - uint16 root_sequence_index; -}LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT; -typedef struct{ - LIBLTE_RRC_PRACH_CONFIG_INFO_STRUCT prach_cnfg_info; - uint16 root_sequence_index; - bool prach_cnfg_info_present; -}LIBLTE_RRC_PRACH_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_DELTA_PUCCH_SHIFT_ENUM delta_pucch_shift; - uint16 n1_pucch_an; - uint8 n_rb_cqi; - uint8 n_cs_an; -}LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT; -typedef struct{ - uint8 group_assignment_pusch; - uint8 cyclic_shift; - bool group_hopping_enabled; - bool sequence_hopping_enabled; -}LIBLTE_RRC_UL_RS_PUSCH_STRUCT; -typedef struct{ - LIBLTE_RRC_UL_RS_PUSCH_STRUCT ul_rs; - LIBLTE_RRC_HOPPING_MODE_ENUM hopping_mode; - uint8 n_sb; - uint8 pusch_hopping_offset; - bool enable_64_qam; -}LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT; -typedef struct{ - LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_ENUM size_of_ra; - LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_ENUM msg_size; - LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_ENUM msg_pwr_offset_group_b; - bool present; -}LIBLTE_RRC_PREAMBLES_GROUP_A_STRUCT; -typedef struct{ - LIBLTE_RRC_PREAMBLES_GROUP_A_STRUCT preambles_group_a_cnfg; - LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_ENUM num_ra_preambles; - LIBLTE_RRC_POWER_RAMPING_STEP_ENUM pwr_ramping_step; - LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_ENUM preamble_init_rx_target_pwr; - LIBLTE_RRC_PREAMBLE_TRANS_MAX_ENUM preamble_trans_max; - LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_ENUM ra_resp_win_size; - LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_ENUM mac_con_res_timer; - uint8 max_harq_msg3_tx; -}LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT; -typedef struct{ - uint8 preamble_index; - uint8 prach_mask_index; -}LIBLTE_RRC_RACH_CONFIG_DEDICATED_STRUCT; -typedef struct{ - LIBLTE_RRC_SRS_BW_CONFIG_ENUM bw_cnfg; - LIBLTE_RRC_SRS_SUBFR_CONFIG_ENUM subfr_cnfg; - bool ack_nack_simul_tx; - bool max_up_pts; - bool max_up_pts_present; - bool present; -}LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT; -typedef struct{ - LIBLTE_RRC_SUBFRAME_ASSIGNMENT_ENUM sf_assignment; - LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_ENUM special_sf_patterns; -}LIBLTE_RRC_TDD_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_ENUM format_1; - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_ENUM format_1b; - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_ENUM format_2; - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_ENUM format_2a; - LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_ENUM format_2b; -}LIBLTE_RRC_DELTA_FLIST_PUCCH_STRUCT; -typedef struct{ - LIBLTE_RRC_DELTA_FLIST_PUCCH_STRUCT delta_flist_pucch; - LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_ENUM alpha; - int8 p0_nominal_pusch; - int8 p0_nominal_pucch; - int8 delta_preamble_msg3; -}LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT; -typedef struct{ - LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT rach_cnfg; - LIBLTE_RRC_PRACH_CONFIG_STRUCT prach_cnfg; - LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT pdsch_cnfg; - LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT pusch_cnfg; - LIBLTE_RRC_PHICH_CONFIG_STRUCT phich_cnfg; - LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT pucch_cnfg; - LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT srs_ul_cnfg; - LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT ul_pwr_ctrl; - LIBLTE_RRC_TDD_CONFIG_STRUCT tdd_cnfg; - LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM ant_info; - LIBLTE_RRC_UL_CP_LENGTH_ENUM ul_cp_length; - int8 p_max; - bool rach_cnfg_present; - bool pdsch_cnfg_present; - bool phich_cnfg_present; - bool pucch_cnfg_present; - bool srs_ul_cnfg_present; - bool ul_pwr_ctrl_present; - bool ant_info_present; - bool p_max_present; - bool tdd_cnfg_present; -}LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT; -typedef struct{ - uint16 dl_carrier_freq; - uint16 ul_carrier_freq; - bool ul_carrier_freq_present; -}LIBLTE_RRC_CARRIER_FREQ_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_BANDWIDTH_ENUM dl_bw; - LIBLTE_RRC_BANDWIDTH_ENUM ul_bw; - bool ul_bw_present; -}LIBLTE_RRC_CARRIER_BANDWIDTH_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_CARRIER_FREQ_EUTRA_STRUCT carrier_freq_eutra; - LIBLTE_RRC_CARRIER_BANDWIDTH_EUTRA_STRUCT carrier_bw_eutra; - LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT rr_cnfg_common; - LIBLTE_RRC_RACH_CONFIG_DEDICATED_STRUCT rach_cnfg_ded; - LIBLTE_RRC_T304_ENUM t304; - uint16 target_pci; - uint16 new_ue_id; - uint8 add_spect_em; - bool carrier_freq_eutra_present; - bool carrier_bw_eutra_present; - bool add_spect_em_present; - bool rach_cnfg_ded_present; -}LIBLTE_RRC_MOBILITY_CONTROL_INFO_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mobility_control_info_ie(LIBLTE_RRC_MOBILITY_CONTROL_INFO_STRUCT *mob_ctrl_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mobility_control_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_MOBILITY_CONTROL_INFO_STRUCT *mob_ctrl_info); - -/********************************************************************* - IE Name: Mobility Parameters CDMA2000 (1xRTT) - - Description: Contains the parameters provided to the UE for - handover and (enhanced) CSFB to 1xRTT support - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: Mobility State Parameters - - Description: Contains parameters to determine UE mobility state - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Mobility State Parameters enums defined above -// Structs -// Mobility State Parameters struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mobility_state_parameters_ie(LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT *mobility_state_params, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mobility_state_parameters_ie(uint8 **ie_ptr, - LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT *mobility_state_params); - -/********************************************************************* - IE Name: Phys Cell ID - - Description: Indicates the physical layer identity of the cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_ie(uint16 phys_cell_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_ie(uint8 **ie_ptr, - uint16 *phys_cell_id); - -/********************************************************************* - IE Name: Phys Cell ID Range - - Description: Encodes either a single or a range of physical cell - identities - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Phys Cell ID Range enum defined above -// Structs -// Phys Cell ID Range struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_range_ie(LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT *phys_cell_id_range, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_range_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT *phys_cell_id_range); - -/********************************************************************* - IE Name: Phys Cell ID Range UTRA FDD List - - Description: Encodes one or more of Phys Cell ID Range UTRA FDD - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: Phys Cell ID CDMA2000 - - Description: Identifies the PN offset that represents the - "Physical cell identity" in CDMA2000 - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_PN_OFFSET 511 -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_cdma2000_ie(uint16 phys_cell_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_cdma2000_ie(uint8 **ie_ptr, - uint16 *phys_cell_id); - -/********************************************************************* - IE Name: Phys Cell ID GERAN - - Description: Contains the Base Station Identity Code (BSIC) - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Phys Cell ID GERAN struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_geran_ie(LIBLTE_RRC_PHYS_CELL_ID_GERAN_STRUCT *phys_cell_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHYS_CELL_ID_GERAN_STRUCT *phys_cell_id); - -/********************************************************************* - IE Name: Phys Cell ID UTRA FDD - - Description: Indicates the physical layer identity of the cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_utra_fdd_ie(uint16 phys_cell_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_utra_fdd_ie(uint8 **ie_ptr, - uint16 *phys_cell_id); - -/********************************************************************* - IE Name: Phys Cell ID UTRA TDD - - Description: Indicates the physical layer identity of the cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_utra_tdd_ie(uint8 phys_cell_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_utra_tdd_ie(uint8 **ie_ptr, - uint8 *phys_cell_id); - -/********************************************************************* - IE Name: PLMN Identity - - Description: Identifies a Public Land Mobile Network - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MCC_NOT_PRESENT 0xFFFF -// Enums -// Structs -// PLMN Identity struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_plmn_identity_ie(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *plmn_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_plmn_identity_ie(uint8 **ie_ptr, - LIBLTE_RRC_PLMN_IDENTITY_STRUCT *plmn_id); - -/********************************************************************* - IE Name: Pre Registration Info HRPD - - Description: FIXME - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Pre Registration Info HRPD struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pre_registration_info_hrpd_ie(LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT *pre_reg_info_hrpd, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pre_registration_info_hrpd_ie(uint8 **ie_ptr, - LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT *pre_reg_info_hrpd); - -/********************************************************************* - IE Name: Q Qual Min - - Description: Indicates for cell selection/re-selection the - required minimum received RSRQ level in the (E-UTRA) - cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_qual_min_ie(int8 q_qual_min, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_qual_min_ie(uint8 **ie_ptr, - int8 *q_qual_min); - -/********************************************************************* - IE Name: Q Rx Lev Min - - Description: Indicates the required minimum received RSRP level in - the (E-UTRA) cell for cell selection/re-selection - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_rx_lev_min_ie(int16 q_rx_lev_min, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_rx_lev_min_ie(uint8 **ie_ptr, - int16 *q_rx_lev_min); - -/********************************************************************* - IE Name: Q Offset Range - - Description: Indicates a cell or frequency specific offset to be - applied when evaluating candidates for cell - reselection or when evaluating triggering conditions - for measurement reporting - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Q Offset Range enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_offset_range_ie(LIBLTE_RRC_Q_OFFSET_RANGE_ENUM q_offset_range, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_offset_range_ie(uint8 **ie_ptr, - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM *q_offset_range); - -/********************************************************************* - IE Name: Q Offset Range Inter RAT - - Description: Indicates a frequency specific offset to be applied - when evaluating triggering conditions for - measurement reporting - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_offset_range_inter_rat_ie(int8 q_offset_range_inter_rat, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_offset_range_inter_rat_ie(uint8 **ie_ptr, - int8 *q_offset_range_inter_rat); - -/********************************************************************* - IE Name: Reselection Threshold - - Description: Indicates an RX level threshold for cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_reselection_threshold_ie(uint8 resel_thresh, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_reselection_threshold_ie(uint8 **ie_ptr, - uint8 *resel_thresh); - -/********************************************************************* - IE Name: Reselection Threshold Q - - Description: Indicates a quality level threshold for cell - reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_reselection_threshold_q_ie(uint8 resel_thresh_q, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_reselection_threshold_q_ie(uint8 **ie_ptr, - uint8 *resel_thresh_q); - -/********************************************************************* - IE Name: S Cell Index - - Description: Contains a short identity, used to identify an - SCell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_s_cell_index_ie(uint8 s_cell_idx, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_s_cell_index_ie(uint8 **ie_ptr, - uint8 *s_cell_idx); - -/********************************************************************* - IE Name: Serv Cell Index - - Description: Contains a short identity, used to identify a - serving cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_serv_cell_index_ie(uint8 serv_cell_idx, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_serv_cell_index_ie(uint8 **ie_ptr, - uint8 *serv_cell_idx); - -/********************************************************************* - IE Name: Speed State Scale Factors - - Description: Contains factors, to be applied when the UE is in - medium or high speed state, used for scaling a - mobility control related parameter - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Speed State Scale Factors enums defined above -// Structs -// Speed State Scale Factors struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_speed_state_scale_factors_ie(LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT *speed_state_scale_factors, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_speed_state_scale_factors_ie(uint8 **ie_ptr, - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT *speed_state_scale_factors); - -/********************************************************************* - IE Name: System Info List GERAN - - Description: Contains system information of a GERAN cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: System Time Info CDMA2000 - - Description: Informs the UE about the absolute time in the current - cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint64 system_time; - bool system_time_async; - bool cdma_eutra_sync; -}LIBLTE_RRC_SYSTEM_TIME_INFO_CDMA2000_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_system_time_info_cdma2000_ie(LIBLTE_RRC_SYSTEM_TIME_INFO_CDMA2000_STRUCT *sys_time_info_cdma2000, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_system_time_info_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYSTEM_TIME_INFO_CDMA2000_STRUCT *sys_time_info_cdma2000); - -/********************************************************************* - IE Name: Tracking Area Code - - Description: Identifies a tracking area within the scope of a - PLMN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_tracking_area_code_ie(uint16 tac, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tracking_area_code_ie(uint8 **ie_ptr, - uint16 *tac); - -/********************************************************************* - IE Name: T Reselection - - Description: Contains the timer T_reselection_rat for E-UTRA, - UTRA, GERAN, or CDMA2000 - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_t_reselection_ie(uint8 t_resel, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_t_reselection_ie(uint8 **ie_ptr, - uint8 *t_resel); - -/********************************************************************* - IE Name: Next Hop Chaining Count - - Description: Updates the Kenb key and corresponds to parameter - NCC - - Document Reference: 36.331 v10.0.0 Section 6.3.3 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_next_hop_chaining_count_ie(uint8 next_hop_chaining_count, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_next_hop_chaining_count_ie(uint8 **ie_ptr, - uint8 *next_hop_chaining_count); - -/********************************************************************* - IE Name: Security Algorithm Config - - Description: Configures AS integrity protection algorithm (SRBs) - and AS ciphering algorithm (SRBs and DRBs) - - Document Reference: 36.331 v10.0.0 Section 6.3.3 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_CIPHERING_ALGORITHM_EEA0 = 0, - LIBLTE_RRC_CIPHERING_ALGORITHM_EEA1, - LIBLTE_RRC_CIPHERING_ALGORITHM_EEA2, - LIBLTE_RRC_CIPHERING_ALGORITHM_SPARE5, - LIBLTE_RRC_CIPHERING_ALGORITHM_SPARE4, - LIBLTE_RRC_CIPHERING_ALGORITHM_SPARE3, - LIBLTE_RRC_CIPHERING_ALGORITHM_SPARE2, - LIBLTE_RRC_CIPHERING_ALGORITHM_SPARE1, - LIBLTE_RRC_CIPHERING_ALGORITHM_N_ITEMS, -}LIBLTE_RRC_CIPHERING_ALGORITHM_ENUM; -static const char liblte_rrc_ciphering_algorithm_text[LIBLTE_RRC_CIPHERING_ALGORITHM_N_ITEMS][20] = { "EEA0", "EEA1", "EEA2", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -typedef enum{ - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_EIA0_V920 = 0, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_EIA1, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_EIA2, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_SPARE5, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_SPARE4, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_SPARE3, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_SPARE2, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_SPARE1, - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_N_ITEMS, -}LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_ENUM; -static const char liblte_rrc_integrity_prot_algorithm_text[LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_N_ITEMS][20] = { "EIA0", "EIA1", "EIA2", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -// Structs -typedef struct{ - LIBLTE_RRC_CIPHERING_ALGORITHM_ENUM cipher_alg; - LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_ENUM int_alg; -}LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_algorithm_config_ie(LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT *sec_alg_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_algorithm_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT *sec_alg_cnfg); - -/********************************************************************* - IE Name: Short MAC I - - Description: Identifies and verifies the UE at RRC connection - re-establishment - - Document Reference: 36.331 v10.0.0 Section 6.3.3 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_short_mac_i_ie(uint16 short_mac_i, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_short_mac_i_ie(uint8 **ie_ptr, - uint16 *short_mac_i); - -/********************************************************************* - IE Name: Antenna Info - - Description: Specifies the common and the UE specific antenna - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Antenna Ports Count enum defined above -typedef enum{ - LIBLTE_RRC_TRANSMISSION_MODE_1 = 0, - LIBLTE_RRC_TRANSMISSION_MODE_2, - LIBLTE_RRC_TRANSMISSION_MODE_3, - LIBLTE_RRC_TRANSMISSION_MODE_4, - LIBLTE_RRC_TRANSMISSION_MODE_5, - LIBLTE_RRC_TRANSMISSION_MODE_6, - LIBLTE_RRC_TRANSMISSION_MODE_7, - LIBLTE_RRC_TRANSMISSION_MODE_8, - LIBLTE_RRC_TRANSMISSION_MODE_N_ITEMS, -}LIBLTE_RRC_TRANSMISSION_MODE_ENUM; -static const char liblte_rrc_transmission_mode_text[LIBLTE_RRC_TRANSMISSION_MODE_N_ITEMS][20] = {"1", "2", "3", "4", - "5", "6", "7", "8"}; -static const uint8 liblte_rrc_transmission_mode_num[LIBLTE_RRC_TRANSMISSION_MODE_N_ITEMS] = {1, 2, 3, 4, 5, 6, 7, 8}; -typedef enum{ - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM3 = 0, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM3, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM4, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM4, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM5, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM5, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM6, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM6, - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N_ITEMS, -}LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_CHOICE_ENUM; -static const char liblte_rrc_codebook_subset_restriction_choice_text[LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N_ITEMS][20] = {"n2_tm3", "n4_tm3", "n2_tm4", "n4_tm4", - "n2_tm5", "n4_tm5", "n2_tm6", "n4_tm6"}; -typedef enum{ - LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_CLOSED_LOOP = 0, - LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_OPEN_LOOP, - LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_N_ITEMS, -}LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_ENUM; -static const char liblte_rrc_ue_tx_antenna_selection_text[LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_N_ITEMS][20] = {"closed_loop", "open_loop"}; -// Structs -typedef struct{ - LIBLTE_RRC_TRANSMISSION_MODE_ENUM tx_mode; - LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_CHOICE_ENUM codebook_subset_restriction_choice; - LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_ENUM ue_tx_antenna_selection_setup; - uint64 codebook_subset_restriction; - bool codebook_subset_restriction_present; - bool ue_tx_antenna_selection_setup_present; -}LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_antenna_info_common_ie(LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM antenna_ports_cnt, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_antenna_info_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM *antenna_ports_cnt); -LIBLTE_ERROR_ENUM liblte_rrc_pack_antenna_info_dedicated_ie(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *antenna_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_antenna_info_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *antenna_info); - -/********************************************************************* - IE Name: CQI Report Config - - Description: Specifies the CQI reporting configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM12 = 0, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM20, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM22, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM30, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_SPARE3, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_SPARE2, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_SPARE1, - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_N_ITEMS, -}LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_ENUM; -static const char liblte_rrc_cqi_report_mode_aperiodic_text[LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_N_ITEMS][20] = { "rm12", "rm20", "rm22", "rm30", - "rm31", "SPARE", "SPARE", "SPARE"}; -typedef enum{ - LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_WIDEBAND_CQI = 0, - LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_SUBBAND_CQI, - LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_N_ITEMS, -}LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_ENUM; -static const char liblte_rrc_cqi_format_indicator_periodic_text[LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_N_ITEMS][20] = {"wideband_cqi", "subband_cqi"}; -// Structs -typedef struct{ - LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_ENUM format_ind_periodic; - uint32 pucch_resource_idx; - uint32 pmi_cnfg_idx; - uint32 ri_cnfg_idx; - uint32 format_ind_periodic_subband_k; - bool ri_cnfg_idx_present; - bool simult_ack_nack_and_cqi; -}LIBLTE_RRC_CQI_REPORT_PERIODIC_STRUCT; -typedef struct{ - LIBLTE_RRC_CQI_REPORT_PERIODIC_STRUCT report_periodic; - LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_ENUM report_mode_aperiodic; - int32 nom_pdsch_rs_epre_offset; - bool report_mode_aperiodic_present; - bool report_periodic_present; - bool report_periodic_setup_present; -}LIBLTE_RRC_CQI_REPORT_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_cqi_report_config_ie(LIBLTE_RRC_CQI_REPORT_CONFIG_STRUCT *cqi_report_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cqi_report_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_CQI_REPORT_CONFIG_STRUCT *cqi_report_cnfg); - -/********************************************************************* - IE Name: Cross Carrier Scheduling Config - - Description: Specifies the configuration when the cross carrier - scheduling is used in a cell - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: CSI RS Config - - Description: Specifies the CSI (Channel State Information) - reference signal configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: DRB Identity - - Description: Identifies a DRB used by a UE - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_drb_identity_ie(uint8 drb_id, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_drb_identity_ie(uint8 **ie_ptr, - uint8 *drb_id); - -/********************************************************************* - IE Name: Logical Channel Config - - Description: Configures the logical channel parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_0 = 0, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_8, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_16, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_32, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_64, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_128, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_KBPS_256, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_INFINITY, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE8, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE7, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE6, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE5, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE4, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE3, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE2, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_SPARE1, - LIBLTE_RRC_PRIORITIZED_BIT_RATE_N_ITEMS, -}LIBLTE_RRC_PRIORITIZED_BIT_RATE_ENUM; -static const char liblte_rrc_prioritized_bit_rate_text[LIBLTE_RRC_PRIORITIZED_BIT_RATE_N_ITEMS][20] = { "0", "8", "16", "32", - "64", "128", "256", "INFINITY", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -static const int liblte_rrc_prioritized_bit_rate_num[LIBLTE_RRC_PRIORITIZED_BIT_RATE_N_ITEMS] = { 0 , 8 , 16 , 32 , - 64 , 128 , 256 , -1 , - -1 , -1 , -1 , -1 , - -1 , -1 , -1 , -1 }; -typedef enum{ - LIBLTE_RRC_BUCKET_SIZE_DURATION_MS50 = 0, - LIBLTE_RRC_BUCKET_SIZE_DURATION_MS100, - LIBLTE_RRC_BUCKET_SIZE_DURATION_MS150, - LIBLTE_RRC_BUCKET_SIZE_DURATION_MS300, - LIBLTE_RRC_BUCKET_SIZE_DURATION_MS500, - LIBLTE_RRC_BUCKET_SIZE_DURATION_MS1000, - LIBLTE_RRC_BUCKET_SIZE_DURATION_SPARE2, - LIBLTE_RRC_BUCKET_SIZE_DURATION_SPARE1, - LIBLTE_RRC_BUCKET_SIZE_DURATION_N_ITEMS, -}LIBLTE_RRC_BUCKET_SIZE_DURATION_ENUM; -static const char liblte_rrc_bucket_size_duration_text[LIBLTE_RRC_BUCKET_SIZE_DURATION_N_ITEMS][20] = { "50", "100", "150", "300", - "500", "1000", "SPARE", "SPARE"}; -static const int16 liblte_rrc_bucket_size_duration_num[LIBLTE_RRC_BUCKET_SIZE_DURATION_N_ITEMS] = {50, 100, 150, 300, 500, 1000, -1, -1}; -typedef enum{ - LIBLTE_RRC_LOGICAL_CHANNEL_SR_MASK_R9_SETUP = 0, - LIBLTE_RRC_LOGICAL_CHANNEL_SR_MASK_R9_N_ITEMS, -}LIBLTE_RRC_LOGICAL_CHANNEL_SR_MASK_R9_ENUM; -static const char liblte_rrc_logical_channel_sr_mask_r9_text[LIBLTE_RRC_LOGICAL_CHANNEL_SR_MASK_R9_N_ITEMS][20] = {"SETUP"}; -// Structs -typedef struct{ - LIBLTE_RRC_PRIORITIZED_BIT_RATE_ENUM prioritized_bit_rate; - LIBLTE_RRC_BUCKET_SIZE_DURATION_ENUM bucket_size_duration; - uint8 priority; - uint8 log_chan_group; - bool log_chan_group_present; -}LIBLTE_RRC_UL_SPECIFIC_PARAMETERS_STRUCT; -typedef struct{ - LIBLTE_RRC_UL_SPECIFIC_PARAMETERS_STRUCT ul_specific_params; - LIBLTE_RRC_LOGICAL_CHANNEL_SR_MASK_R9_ENUM log_chan_sr_mask; - bool ul_specific_params_present; - bool log_chan_sr_mask_present; -}LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_logical_channel_config_ie(LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT *log_chan_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_logical_channel_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT *log_chan_cnfg); - -/********************************************************************* - IE Name: MAC Main Config - - Description: Specifies the MAC main configuration for signalling - and data radio bearers - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_MAX_HARQ_TX_N1 = 0, - LIBLTE_RRC_MAX_HARQ_TX_N2, - LIBLTE_RRC_MAX_HARQ_TX_N3, - LIBLTE_RRC_MAX_HARQ_TX_N4, - LIBLTE_RRC_MAX_HARQ_TX_N5, - LIBLTE_RRC_MAX_HARQ_TX_N6, - LIBLTE_RRC_MAX_HARQ_TX_N7, - LIBLTE_RRC_MAX_HARQ_TX_N8, - LIBLTE_RRC_MAX_HARQ_TX_N10, - LIBLTE_RRC_MAX_HARQ_TX_N12, - LIBLTE_RRC_MAX_HARQ_TX_N16, - LIBLTE_RRC_MAX_HARQ_TX_N20, - LIBLTE_RRC_MAX_HARQ_TX_N24, - LIBLTE_RRC_MAX_HARQ_TX_N28, - LIBLTE_RRC_MAX_HARQ_TX_SPARE2, - LIBLTE_RRC_MAX_HARQ_TX_SPARE1, - LIBLTE_RRC_MAX_HARQ_TX_N_ITEMS, -}LIBLTE_RRC_MAX_HARQ_TX_ENUM; -static const char liblte_rrc_max_harq_tx_text[LIBLTE_RRC_MAX_HARQ_TX_N_ITEMS][20] = { "1", "2", "3", "4", - "5", "6", "7", "8", - "10", "12", "16", "20", - "24", "28", "SPARE", "SPARE"}; -static const int8 liblte_rrc_max_harq_tx_num[LIBLTE_RRC_MAX_HARQ_TX_N_ITEMS] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 28, -1, -1}; -typedef enum{ - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF5 = 0, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF10, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF16, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF20, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF32, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF40, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF64, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF80, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF128, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF160, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF320, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF640, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF1280, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SF2560, - LIBLTE_RRC_PERIODIC_BSR_TIMER_INFINITY, - LIBLTE_RRC_PERIODIC_BSR_TIMER_SPARE, - LIBLTE_RRC_PERIODIC_BSR_TIMER_N_ITEMS, -}LIBLTE_RRC_PERIODIC_BSR_TIMER_ENUM; -static const char liblte_rrc_periodic_bsr_timer_text[LIBLTE_RRC_PERIODIC_BSR_TIMER_N_ITEMS][20] = { "sf5", "sf10", "sf16", "sf20", - "sf32", "sf40", "sf64", "sf80", - "sf128", "sf160", "sf320", "sf640", - "sf1280", "sf2560", "INFINITY", "SPARE"}; -static const int32 liblte_rrc_periodic_bsr_timer_num[LIBLTE_RRC_PERIODIC_BSR_TIMER_N_ITEMS] = { 5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, - 1280, 2560, -1, -1}; -typedef enum{ - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF320 = 0, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF640, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF1280, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF2560, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF5120, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF10240, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SPARE2, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SPARE1, - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_N_ITEMS, -}LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_ENUM; -static const char liblte_rrc_retransmission_bsr_timer_text[LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_N_ITEMS][20] = { "sf320", "sf640", "sf1280", "sf2560", - "sf5120", "sf10240", "SPARE", "SPARE"}; -static const int32 liblte_rrc_retransmission_bsr_timer_num[LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_N_ITEMS] = { 320, 640, 1280, 2560, 5120, 10240, -1, -1}; -typedef enum{ - LIBLTE_RRC_ON_DURATION_TIMER_PSF1 = 0, - LIBLTE_RRC_ON_DURATION_TIMER_PSF2, - LIBLTE_RRC_ON_DURATION_TIMER_PSF3, - LIBLTE_RRC_ON_DURATION_TIMER_PSF4, - LIBLTE_RRC_ON_DURATION_TIMER_PSF5, - LIBLTE_RRC_ON_DURATION_TIMER_PSF6, - LIBLTE_RRC_ON_DURATION_TIMER_PSF8, - LIBLTE_RRC_ON_DURATION_TIMER_PSF10, - LIBLTE_RRC_ON_DURATION_TIMER_PSF20, - LIBLTE_RRC_ON_DURATION_TIMER_PSF30, - LIBLTE_RRC_ON_DURATION_TIMER_PSF40, - LIBLTE_RRC_ON_DURATION_TIMER_PSF50, - LIBLTE_RRC_ON_DURATION_TIMER_PSF60, - LIBLTE_RRC_ON_DURATION_TIMER_PSF80, - LIBLTE_RRC_ON_DURATION_TIMER_PSF100, - LIBLTE_RRC_ON_DURATION_TIMER_PSF200, - LIBLTE_RRC_ON_DURATION_TIMER_N_ITEMS, -}LIBLTE_RRC_ON_DURATION_TIMER_ENUM; -static const char liblte_rrc_on_duration_timer_text[LIBLTE_RRC_ON_DURATION_TIMER_N_ITEMS][20] = { "psf1", "psf2", "psf3", "psf4", - "psf5", "psf6", "psf8", "psf10", - "psf20", "psf30", "psf40", "psf50", - "psf60", "psf80", "psf100", "psf200"}; -typedef enum{ - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF1 = 0, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF2, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF3, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF4, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF5, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF6, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF8, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF10, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF20, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF30, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF40, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF50, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF60, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF80, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF100, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF200, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF300, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF500, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF750, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF1280, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF1920, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_PSF2560, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE10, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE9, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE8, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE7, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE6, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE5, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE4, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE3, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE2, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_SPARE1, - LIBLTE_RRC_DRX_INACTIVITY_TIMER_N_ITEMS, -}LIBLTE_RRC_DRX_INACTIVITY_TIMER_ENUM; -static const char liblte_rrc_drx_inactivity_timer_text[LIBLTE_RRC_DRX_INACTIVITY_TIMER_N_ITEMS][20] = { "psf1", "psf2", "psf3", "psf4", - "psf5", "psf6", "psf8", "psf10", - "psf20", "psf30", "psf40", "psf50", - "psf60", "psf80", "psf100", "psf200", - "psf300", "psf500", "psf750", "psf1280", - "psf1920", "psf2560", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -typedef enum{ - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF1 = 0, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF2, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF4, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF6, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF8, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF16, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF24, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_PSF33, - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_N_ITEMS, -}LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_ENUM; -static const char liblte_rrc_drx_retransmission_timer_text[LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_N_ITEMS][20] = { "psf1", "psf2", "psf4", "psf6", - "psf8", "psf16", "psf24", "psf33"}; -typedef enum{ - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF10 = 0, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF20, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF32, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF40, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF64, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF80, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF128, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF160, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF256, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF320, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF512, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF640, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF1024, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF1280, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF2048, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF2560, - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_N_ITEMS, -}LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_CHOICE_ENUM; -static const char liblte_rrc_long_drx_cycle_start_offset_choice_text[LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_N_ITEMS][20] = { "sf10", "sf20", "sf32", "sf40", - "sf64", "sf80", "sf128", "sf160", - "sf256", "sf320", "sf512", "sf640", - "sf1024", "sf1280", "sf2048", "sf2560"}; -typedef enum{ - LIBLTE_RRC_SHORT_DRX_CYCLE_SF2 = 0, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF5, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF8, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF10, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF16, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF20, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF32, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF40, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF64, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF80, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF128, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF160, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF256, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF320, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF512, - LIBLTE_RRC_SHORT_DRX_CYCLE_SF640, - LIBLTE_RRC_SHORT_DRX_CYCLE_N_ITEMS, -}LIBLTE_RRC_SHORT_DRX_CYCLE_ENUM; -static const char liblte_rrc_short_drx_cycle_text[LIBLTE_RRC_SHORT_DRX_CYCLE_N_ITEMS][20] = { "sf2", "sf5", "sf8", "sf10", - "sf16", "sf20", "sf32", "sf40", - "sf64", "sf80", "sf128", "sf160", - "sf256", "sf320", "sf512", "sf640"}; -typedef enum{ - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF500 = 0, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF750, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF1280, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF1920, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF2560, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF5120, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_SF10240, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_INFINITY, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS, -}LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM; -static const char liblte_rrc_time_alignment_timer_text[LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS][20] = { "sf500", "sf750", "sf1280", "sf1920", - "sf2560", "sf5120", "sf10240", "INFINITY"}; -static const int liblte_rrc_time_alignment_timer_num[LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS] = { 500, 750, 1280, 1920, 2560, 5120, 10240, -1}; -typedef enum{ - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF10 = 0, - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF20, - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF50, - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF100, - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF200, - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF500, - LIBLTE_RRC_PERIODIC_PHR_TIMER_SF1000, - LIBLTE_RRC_PERIODIC_PHR_TIMER_INFINITY, - LIBLTE_RRC_PERIODIC_PHR_TIMER_N_ITEMS, -}LIBLTE_RRC_PERIODIC_PHR_TIMER_ENUM; -static const char liblte_rrc_periodic_phr_timer_text[LIBLTE_RRC_PERIODIC_PHR_TIMER_N_ITEMS][20] = { "sf10", "sf20", "sf50", "sf100", - "sf200", "sf500", "sf1000", "INFINITY"}; -static int liblte_rrc_periodic_phr_timer_num[LIBLTE_RRC_PERIODIC_PHR_TIMER_N_ITEMS] = {10, 20, 50, 100, 200, 500, 1000, -1}; - -typedef enum{ - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF0 = 0, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF10, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF20, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF50, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF100, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF200, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF500, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_SF1000, - LIBLTE_RRC_PROHIBIT_PHR_TIMER_N_ITEMS, -}LIBLTE_RRC_PROHIBIT_PHR_TIMER_ENUM; -static const char liblte_rrc_prohibit_phr_timer_text[LIBLTE_RRC_PROHIBIT_PHR_TIMER_N_ITEMS][20] = { "sf0", "sf10", "sf20", "sf50", - "sf100", "sf200", "sf500", "sf1000"}; - -static int liblte_rrc_prohibit_phr_timer_num[LIBLTE_RRC_PROHIBIT_PHR_TIMER_N_ITEMS] = {0, 10, 20, 50, 100, 200, 500, 1000}; - -typedef enum{ - LIBLTE_RRC_DL_PATHLOSS_CHANGE_DB1 = 0, - LIBLTE_RRC_DL_PATHLOSS_CHANGE_DB3, - LIBLTE_RRC_DL_PATHLOSS_CHANGE_DB6, - LIBLTE_RRC_DL_PATHLOSS_CHANGE_INFINITY, - LIBLTE_RRC_DL_PATHLOSS_CHANGE_N_ITEMS, -}LIBLTE_RRC_DL_PATHLOSS_CHANGE_ENUM; -static const char liblte_rrc_dl_pathloss_change_text[LIBLTE_RRC_DL_PATHLOSS_CHANGE_N_ITEMS][20] = {"1dB", "3dB", "6dB", "INFINITY"}; - -static int liblte_rrc_dl_pathloss_change_num[LIBLTE_RRC_DL_PATHLOSS_CHANGE_N_ITEMS] = {1, 3, 6, -1}; - -// Structs -typedef struct{ - LIBLTE_RRC_MAX_HARQ_TX_ENUM max_harq_tx; - LIBLTE_RRC_PERIODIC_BSR_TIMER_ENUM periodic_bsr_timer; - LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_ENUM retx_bsr_timer; - bool tti_bundling; - bool max_harq_tx_present; - bool periodic_bsr_timer_present; -}LIBLTE_RRC_ULSCH_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_ON_DURATION_TIMER_ENUM on_duration_timer; - LIBLTE_RRC_DRX_INACTIVITY_TIMER_ENUM drx_inactivity_timer; - LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_ENUM drx_retx_timer; - LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_CHOICE_ENUM long_drx_cycle_start_offset_choice; - LIBLTE_RRC_SHORT_DRX_CYCLE_ENUM short_drx_cycle; - uint32 long_drx_cycle_start_offset; - uint32 short_drx_cycle_timer; - bool setup_present; - bool short_drx_present; -}LIBLTE_RRC_DRX_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_PERIODIC_PHR_TIMER_ENUM periodic_phr_timer; - LIBLTE_RRC_PROHIBIT_PHR_TIMER_ENUM prohibit_phr_timer; - LIBLTE_RRC_DL_PATHLOSS_CHANGE_ENUM dl_pathloss_change; - bool setup_present; -}LIBLTE_RRC_PHR_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_ULSCH_CONFIG_STRUCT ulsch_cnfg; - LIBLTE_RRC_DRX_CONFIG_STRUCT drx_cnfg; - LIBLTE_RRC_PHR_CONFIG_STRUCT phr_cnfg; - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM time_alignment_timer; - bool ulsch_cnfg_present; - bool drx_cnfg_present; - bool phr_cnfg_present; -}LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mac_main_config_ie(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_main_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mac_main_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_main_cnfg); - -/********************************************************************* - IE Name: PDCP Config - - Description: Sets the configurable PDCP parameters for data - radio bearers - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_DISCARD_TIMER_MS50 = 0, - LIBLTE_RRC_DISCARD_TIMER_MS100, - LIBLTE_RRC_DISCARD_TIMER_MS150, - LIBLTE_RRC_DISCARD_TIMER_MS300, - LIBLTE_RRC_DISCARD_TIMER_MS500, - LIBLTE_RRC_DISCARD_TIMER_MS750, - LIBLTE_RRC_DISCARD_TIMER_MS1500, - LIBLTE_RRC_DISCARD_TIMER_INFINITY, - LIBLTE_RRC_DISCARD_TIMER_N_ITEMS, -}LIBLTE_RRC_DISCARD_TIMER_ENUM; -static const char liblte_rrc_discard_timer_text[LIBLTE_RRC_DISCARD_TIMER_N_ITEMS][20] = { "ms50", "ms100", "ms150", "ms300", - "ms500", "ms750", "ms1500", "INFINITY"}; -static const int32 liblte_rrc_discard_timer_num[LIBLTE_RRC_DISCARD_TIMER_N_ITEMS] = { 50, 100, 150, 300, 500, 750, 1500, -1}; -typedef enum{ - LIBLTE_RRC_PDCP_SN_SIZE_7_BITS = 0, - LIBLTE_RRC_PDCP_SN_SIZE_12_BITS, - LIBLTE_RRC_PDCP_SN_SIZE_N_ITEMS, -}LIBLTE_RRC_PDCP_SN_SIZE_ENUM; -static const char liblte_rrc_pdcp_sn_size_text[LIBLTE_RRC_PDCP_SN_SIZE_N_ITEMS][20] = {"7-bits", "12-bits"}; - -static const int8 liblte_rrc_pdcp_sn_size_num[LIBLTE_RRC_PDCP_SN_SIZE_N_ITEMS] = {7, 12}; - -// Structs -typedef struct{ - LIBLTE_RRC_DISCARD_TIMER_ENUM discard_timer; - LIBLTE_RRC_PDCP_SN_SIZE_ENUM rlc_um_pdcp_sn_size; - uint32 hdr_compression_max_cid; - bool hdr_compression_rohc; - bool hdr_compression_profile_0001; - bool hdr_compression_profile_0002; - bool hdr_compression_profile_0003; - bool hdr_compression_profile_0004; - bool hdr_compression_profile_0006; - bool hdr_compression_profile_0101; - bool hdr_compression_profile_0102; - bool hdr_compression_profile_0103; - bool hdr_compression_profile_0104; - bool discard_timer_present; - bool rlc_am_status_report_required_present; - bool rlc_am_status_report_required; - bool rlc_um_pdcp_sn_size_present; -}LIBLTE_RRC_PDCP_CONFIG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdcp_config_ie(LIBLTE_RRC_PDCP_CONFIG_STRUCT *pdcp_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdcp_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDCP_CONFIG_STRUCT *pdcp_cnfg); - -/********************************************************************* - IE Name: PDSCH Config - - Description: Specifies the common and the UE specific PDSCH - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_N6 = 0, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_N4_DOT_77, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_N3, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_N1_DOT_77, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_0, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_1, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_2, - LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_3, - LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS, -}LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM; -static const char liblte_rrc_pdsch_config_p_a_text[LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS][20] = { "-6", "-4.77", "-3", "-1.77", - "0", "1", "2", "3"}; -static const float liblte_rrc_pdsch_config_p_a_num[LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS] = {-6, -4.77f, -3, -1.77f, 0, 1, 2, 3}; -// Structs -// PDSCH Config Common struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdsch_config_common_ie(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT *pdsch_config, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdsch_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT *pdsch_config); -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdsch_config_dedicated_ie(LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM p_a, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdsch_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM *p_a); - -/********************************************************************* - IE Name: PHICH Config - - Description: Specifies the PHICH configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// PHICH Config enums defined above -// Structs -// PHICH Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_phich_config_ie(LIBLTE_RRC_PHICH_CONFIG_STRUCT *phich_config, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phich_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHICH_CONFIG_STRUCT *phich_config); - -/********************************************************************* - IE Name: Physical Config Dedicated - - Description: Specifies the UE specific physical channel - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_N2 = 0, - LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_N4, - LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_N6, - LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_SPARE1, - LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_N_ITEMS, -}LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_ENUM; -static const char liblte_rrc_ack_nack_repetition_factor_text[LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_N_ITEMS][20] = {"n2", "n4", "n6", "SPARE"}; -typedef enum{ - LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_BUNDLING = 0, - LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_MULTIPLEXING, - LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_N_ITEMS, -}LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_ENUM; -static const char liblte_rrc_tdd_ack_nack_feedback_mode_text[LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_N_ITEMS][20] = {"bundling", "multiplexing"}; -typedef enum{ - LIBLTE_RRC_DSR_TRANS_MAX_N4 = 0, - LIBLTE_RRC_DSR_TRANS_MAX_N8, - LIBLTE_RRC_DSR_TRANS_MAX_N16, - LIBLTE_RRC_DSR_TRANS_MAX_N32, - LIBLTE_RRC_DSR_TRANS_MAX_N64, - LIBLTE_RRC_DSR_TRANS_MAX_SPARE3, - LIBLTE_RRC_DSR_TRANS_MAX_SPARE2, - LIBLTE_RRC_DSR_TRANS_MAX_SPARE1, - LIBLTE_RRC_DSR_TRANS_MAX_N_ITEMS, -}LIBLTE_RRC_DSR_TRANS_MAX_ENUM; -static const char liblte_rrc_dsr_trans_max_text[LIBLTE_RRC_DSR_TRANS_MAX_N_ITEMS][20] = { "n4", "n8", "n16", "n32", - "n64", "SPARE", "SPARE", "SPARE"}; -static const int32 liblte_rrc_dsr_trans_max_num[LIBLTE_RRC_DSR_TRANS_MAX_N_ITEMS] = {4, 8, 16, 32, 64, -1, -1, -1}; - -typedef enum{ - LIBLTE_RRC_DELTA_MCS_ENABLED_EN0 = 0, - LIBLTE_RRC_DELTA_MCS_ENABLED_EN1, - LIBLTE_RRC_DELTA_MCS_ENABLED_N_ITEMS, -}LIBLTE_RRC_DELTA_MCS_ENABLED_ENUM; -static const char liblte_rrc_delta_mcs_enabled_text[LIBLTE_RRC_DELTA_MCS_ENABLED_N_ITEMS][20] = {"en0", "en1"}; -typedef enum{ - LIBLTE_RRC_TPC_INDEX_FORMAT_3 = 0, - LIBLTE_RRC_TPC_INDEX_FORMAT_3A, - LIBLTE_RRC_TPC_INDEX_N_ITEMS, -}LIBLTE_RRC_TPC_INDEX_ENUM; -static const char liblte_rrc_tpc_index_text[LIBLTE_RRC_TPC_INDEX_N_ITEMS][20] = {"format_3", "format_3a"}; -typedef enum{ - LIBLTE_RRC_SRS_BANDWIDTH_BW0 = 0, - LIBLTE_RRC_SRS_BANDWIDTH_BW1, - LIBLTE_RRC_SRS_BANDWIDTH_BW2, - LIBLTE_RRC_SRS_BANDWIDTH_BW3, - LIBLTE_RRC_SRS_BANDWIDTH_N_ITEMS, -}LIBLTE_RRC_SRS_BANDWIDTH_ENUM; -static const char liblte_rrc_srs_bandwidth_text[LIBLTE_RRC_SRS_BANDWIDTH_N_ITEMS][20] = {"bw0", "bw1", "bw2", "bw3"}; -typedef enum{ - LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_HBW0 = 0, - LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_HBW1, - LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_HBW2, - LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_HBW3, - LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_N_ITEMS, -}LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_ENUM; -static const char liblte_rrc_srs_hopping_bandwidth_text[LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_N_ITEMS][20] = {"hbw0", "hbw1", "hbw2", "hbw3"}; -typedef enum{ - LIBLTE_RRC_CYCLIC_SHIFT_CS0 = 0, - LIBLTE_RRC_CYCLIC_SHIFT_CS1, - LIBLTE_RRC_CYCLIC_SHIFT_CS2, - LIBLTE_RRC_CYCLIC_SHIFT_CS3, - LIBLTE_RRC_CYCLIC_SHIFT_CS4, - LIBLTE_RRC_CYCLIC_SHIFT_CS5, - LIBLTE_RRC_CYCLIC_SHIFT_CS6, - LIBLTE_RRC_CYCLIC_SHIFT_CS7, - LIBLTE_RRC_CYCLIC_SHIFT_N_ITEMS, -}LIBLTE_RRC_CYCLIC_SHIFT_ENUM; -static const char liblte_rrc_cyclic_shift_text[LIBLTE_RRC_CYCLIC_SHIFT_N_ITEMS][20] = {"cs0", "cs1", "cs2", "cs3", - "cs4", "cs5", "cs6", "cs7"}; -// Structs -typedef struct{ - LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_ENUM ack_nack_repetition_factor; - LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_ENUM tdd_ack_nack_feedback_mode; - uint32 ack_nack_repetition_n1_pucch_an; - bool tdd_ack_nack_feedback_mode_present; - bool ack_nack_repetition_setup_present; -}LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT; -typedef struct{ - uint8 beta_offset_ack_idx; - uint8 beta_offset_ri_idx; - uint8 beta_offset_cqi_idx; -}LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT; -typedef struct{ - LIBLTE_RRC_DELTA_MCS_ENABLED_ENUM delta_mcs_en; - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM filter_coeff; - uint32 p_srs_offset; - int32 p0_ue_pusch; - int32 p0_ue_pucch; - bool accumulation_en; - bool filter_coeff_present; -}LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT; -typedef struct{ - LIBLTE_RRC_TPC_INDEX_ENUM tpc_idx_choice; - uint32 tpc_rnti; - uint32 tpc_idx; - bool setup_present; -}LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_SRS_BANDWIDTH_ENUM srs_bandwidth; - LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_ENUM srs_hopping_bandwidth; - LIBLTE_RRC_CYCLIC_SHIFT_ENUM cyclic_shift; - uint32 freq_domain_pos; - uint32 srs_cnfg_idx; - uint32 tx_comb; - bool setup_present; - bool duration; -}LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT; -typedef struct{ - LIBLTE_RRC_DSR_TRANS_MAX_ENUM dsr_trans_max; - uint32 sr_pucch_resource_idx; - uint32 sr_cnfg_idx; - bool setup_present; -}LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT pucch_cnfg_ded; - LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT pusch_cnfg_ded; - LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT ul_pwr_ctrl_ded; - LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT tpc_pdcch_cnfg_pucch; - LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT tpc_pdcch_cnfg_pusch; - LIBLTE_RRC_CQI_REPORT_CONFIG_STRUCT cqi_report_cnfg; - LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT srs_ul_cnfg_ded; - LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT antenna_info_explicit_value; - LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT sched_request_cnfg; - LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM pdsch_cnfg_ded; - bool pdsch_cnfg_ded_present; - bool pucch_cnfg_ded_present; - bool pusch_cnfg_ded_present; - bool ul_pwr_ctrl_ded_present; - bool tpc_pdcch_cnfg_pucch_present; - bool tpc_pdcch_cnfg_pusch_present; - bool cqi_report_cnfg_present; - bool srs_ul_cnfg_ded_present; - bool antenna_info_present; - bool antenna_info_default_value; - bool sched_request_cnfg_present; -}LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_physical_config_dedicated_ie(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cnfg_ded, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_physical_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cnfg_ded); - -/********************************************************************* - IE Name: P Max - - Description: Limits the UE's uplink transmission power on a - carrier frequency and is used to calculate the - parameter P Compensation - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_p_max_ie(int8 p_max, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_p_max_ie(uint8 **ie_ptr, - int8 *p_max); - -/********************************************************************* - IE Name: PRACH Config - - Description: Specifies the PRACH configuration in the system - information and in the mobility control information - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// PRACH Config structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_prach_config_sib_ie(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *prach_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_prach_config_sib_ie(uint8 **ie_ptr, - LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *prach_cnfg); -LIBLTE_ERROR_ENUM liblte_rrc_pack_prach_config_ie(LIBLTE_RRC_PRACH_CONFIG_STRUCT *prach_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_prach_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_PRACH_CONFIG_STRUCT *prach_cnfg); -LIBLTE_ERROR_ENUM liblte_rrc_pack_prach_config_scell_r10_ie(uint8 prach_cnfg_idx, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_prach_config_scell_r10_ie(uint8 **ie_ptr, - uint8 *prach_cnfg_idx); - -/********************************************************************* - IE Name: Presence Antenna Port 1 - - Description: Indicates whether all the neighboring cells use - antenna port 1 - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_presence_antenna_port_1_ie(bool presence_ant_port_1, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_presence_antenna_port_1_ie(uint8 **ie_ptr, - bool *presence_ant_port_1); - -/********************************************************************* - IE Name: PUCCH Config - - Description: Specifies the common and the UE specific PUCCH - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// PUCCH Config enum defined above -// Structs -// PUCCH Config structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pucch_config_common_ie(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT *pucch_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pucch_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT *pucch_cnfg); -LIBLTE_ERROR_ENUM liblte_rrc_pack_pucch_config_dedicated_ie(LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT *pucch_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pucch_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT *pucch_cnfg); - -/********************************************************************* - IE Name: PUSCH Config - - Description: Specifies the common and the UE specific PUSCH - configuration and the reference signal configuration - for PUSCH and PUCCH - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// PUSCH Config enum defined above -// Structs -// PUSCH Config structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pusch_config_common_ie(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT *pusch_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pusch_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT *pusch_cnfg); -LIBLTE_ERROR_ENUM liblte_rrc_pack_pusch_config_dedicated_ie(LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT *pusch_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pusch_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT *pusch_cnfg); - -/********************************************************************* - IE Name: RACH Config Common - - Description: Specifies the generic random access parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// RACH Config Common enums defined above -// Structs -// RACH Config Common structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rach_config_common_ie(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT *rach_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rach_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT *rach_cnfg); - -/********************************************************************* - IE Name: RACH Config Dedicated - - Description: Specifies the dedicated random access parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// RACH Config Dedicated struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rach_config_dedicated_ie(LIBLTE_RRC_RACH_CONFIG_DEDICATED_STRUCT *rach_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rach_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_RACH_CONFIG_DEDICATED_STRUCT *rach_cnfg); - -/********************************************************************* - IE Name: Radio Resource Config Common - - Description: Specifies the common radio resource configurations - in the system information and in the mobility control - information, including random access parameters - and static physical layer parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N2 = 0, - LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N4, - LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N8, - LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N16, - LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N_ITEMS, -}LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_ENUM; -static const char liblte_rrc_modification_period_coeff_text[LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N_ITEMS][20] = {"2", "4", "8", "16"}; -static const uint8 liblte_rrc_modification_period_coeff_num[LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N_ITEMS] = {2, 4, 8, 16}; -typedef enum{ - LIBLTE_RRC_DEFAULT_PAGING_CYCLE_RF32 = 0, - LIBLTE_RRC_DEFAULT_PAGING_CYCLE_RF64, - LIBLTE_RRC_DEFAULT_PAGING_CYCLE_RF128, - LIBLTE_RRC_DEFAULT_PAGING_CYCLE_RF256, - LIBLTE_RRC_DEFAULT_PAGING_CYCLE_N_ITEMS, -}LIBLTE_RRC_DEFAULT_PAGING_CYCLE_ENUM; -static const char liblte_rrc_default_paging_cycle_text[LIBLTE_RRC_DEFAULT_PAGING_CYCLE_N_ITEMS][20] = {"32", "64", "128", "256"}; -static const uint16 liblte_rrc_default_paging_cycle_num[LIBLTE_RRC_DEFAULT_PAGING_CYCLE_N_ITEMS] = {32, 64, 128, 256}; -typedef enum{ - LIBLTE_RRC_NB_FOUR_T = 0, - LIBLTE_RRC_NB_TWO_T, - LIBLTE_RRC_NB_ONE_T, - LIBLTE_RRC_NB_HALF_T, - LIBLTE_RRC_NB_QUARTER_T, - LIBLTE_RRC_NB_ONE_EIGHTH_T, - LIBLTE_RRC_NB_ONE_SIXTEENTH_T, - LIBLTE_RRC_NB_ONE_THIRTY_SECOND_T, - LIBLTE_RRC_NB_N_ITEMS, -}LIBLTE_RRC_NB_ENUM; -static const char liblte_rrc_nb_text[LIBLTE_RRC_NB_N_ITEMS][20] = { "4", "2", "1", "1/2", - "1/4", "1/8", "1/16", "1/32"}; -static const double liblte_rrc_nb_num[LIBLTE_RRC_NB_N_ITEMS] = {4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625, 0.03125}; -// Structs -typedef struct{ - LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_ENUM modification_period_coeff; -}LIBLTE_RRC_BCCH_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_DEFAULT_PAGING_CYCLE_ENUM default_paging_cycle; - LIBLTE_RRC_NB_ENUM nB; -}LIBLTE_RRC_PCCH_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT rach_cnfg; - LIBLTE_RRC_BCCH_CONFIG_STRUCT bcch_cnfg; - LIBLTE_RRC_PCCH_CONFIG_STRUCT pcch_cnfg; - LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT prach_cnfg; - LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT pdsch_cnfg; - LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT pusch_cnfg; - LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT pucch_cnfg; - LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT srs_ul_cnfg; - LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT ul_pwr_ctrl; - LIBLTE_RRC_UL_CP_LENGTH_ENUM ul_cp_length; -}LIBLTE_RRC_RR_CONFIG_COMMON_SIB_STRUCT; -// RR Config Common struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rr_config_common_sib_ie(LIBLTE_RRC_RR_CONFIG_COMMON_SIB_STRUCT *rr_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rr_config_common_sib_ie(uint8 **ie_ptr, - LIBLTE_RRC_RR_CONFIG_COMMON_SIB_STRUCT *rr_cnfg); -LIBLTE_ERROR_ENUM liblte_rrc_pack_rr_config_common_ie(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *rr_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rr_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *rr_cnfg); - -/********************************************************************* - IE Name: Radio Resource Config Dedicated - - Description: Sets up/Modifies/Releases RBs, modifies the MAC - main configuration, modifies the SPS configuration - and modifies dedicated physical configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_DRB 11 -// Enums -typedef enum{ - LIBLTE_RRC_T_POLL_RETRANSMIT_MS5 = 0, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS10, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS15, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS20, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS25, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS30, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS35, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS40, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS45, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS50, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS55, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS60, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS65, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS70, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS75, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS80, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS85, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS90, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS95, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS100, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS105, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS110, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS115, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS120, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS125, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS130, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS135, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS140, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS145, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS150, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS155, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS160, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS165, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS170, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS175, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS180, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS185, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS190, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS195, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS200, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS205, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS210, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS215, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS220, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS225, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS230, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS235, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS240, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS245, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS250, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS300, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS350, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS400, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS450, - LIBLTE_RRC_T_POLL_RETRANSMIT_MS500, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE9, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE8, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE7, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE6, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE5, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE4, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE3, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE2, - LIBLTE_RRC_T_POLL_RETRANSMIT_SPARE1, - LIBLTE_RRC_T_POLL_RETRANSMIT_N_ITEMS, -}LIBLTE_RRC_T_POLL_RETRANSMIT_ENUM; -static const char liblte_rrc_t_poll_retransmit_text[LIBLTE_RRC_T_POLL_RETRANSMIT_N_ITEMS][20] = { "5ms", "10ms", "15ms", "20ms", - "25ms", "30ms", "35ms", "40ms", - "45ms", "50ms", "55ms", "60ms", - "65ms", "70ms", "75ms", "80ms", - "85ms", "90ms", "95ms", "100ms", - "105ms", "110ms", "115ms", "120ms", - "125ms", "130ms", "135ms", "140ms", - "145ms", "150ms", "155ms", "160ms", - "165ms", "170ms", "175ms", "180ms", - "185ms", "190ms", "195ms", "200ms", - "205ms", "210ms", "215ms", "220ms", - "225ms", "230ms", "235ms", "240ms", - "245ms", "250ms", "300ms", "350ms", - "400ms", "450ms", "500ms", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -static const int32 liblte_rrc_t_poll_retransmit_num[LIBLTE_RRC_T_POLL_RETRANSMIT_N_ITEMS] = { 5, 10, 15, 20, - 25, 30, 35, 40, - 45, 50, 55, 60, - 65, 70, 75, 80, - 85, 90, 95, 100, - 105, 110, 115, 120, - 125, 130, 135, 140, - 145, 150, 155, 160, - 165, 170, 175, 180, - 185, 190, 195, 200, - 205, 210, 215, 220, - 225, 230, 235, 240, - 245, 250, 300, 350, - 400, 450, 500, -1, - -1, -1, -1, -1, - -1, -1, -1, -1}; -typedef enum{ - LIBLTE_RRC_POLL_PDU_P4 = 0, - LIBLTE_RRC_POLL_PDU_P8, - LIBLTE_RRC_POLL_PDU_P16, - LIBLTE_RRC_POLL_PDU_P32, - LIBLTE_RRC_POLL_PDU_P64, - LIBLTE_RRC_POLL_PDU_P128, - LIBLTE_RRC_POLL_PDU_P256, - LIBLTE_RRC_POLL_PDU_INFINITY, - LIBLTE_RRC_POLL_PDU_N_ITEMS, -}LIBLTE_RRC_POLL_PDU_ENUM; -static const char liblte_rrc_poll_pdu_text[LIBLTE_RRC_POLL_PDU_N_ITEMS][20] = { "p4", "p8", "p16", "p32", - "p64", "p128", "p256", "INFINITY"}; -static const int32 liblte_rrc_poll_pdu_num[LIBLTE_RRC_POLL_PDU_N_ITEMS] = { 4, 8, 16, 32, - 64, 128, 256, -1}; -typedef enum{ - LIBLTE_RRC_POLL_BYTE_KB25 = 0, - LIBLTE_RRC_POLL_BYTE_KB50, - LIBLTE_RRC_POLL_BYTE_KB75, - LIBLTE_RRC_POLL_BYTE_KB100, - LIBLTE_RRC_POLL_BYTE_KB125, - LIBLTE_RRC_POLL_BYTE_KB250, - LIBLTE_RRC_POLL_BYTE_KB375, - LIBLTE_RRC_POLL_BYTE_KB500, - LIBLTE_RRC_POLL_BYTE_KB750, - LIBLTE_RRC_POLL_BYTE_KB1000, - LIBLTE_RRC_POLL_BYTE_KB1250, - LIBLTE_RRC_POLL_BYTE_KB1500, - LIBLTE_RRC_POLL_BYTE_KB2000, - LIBLTE_RRC_POLL_BYTE_KB3000, - LIBLTE_RRC_POLL_BYTE_INFINITY, - LIBLTE_RRC_POLL_BYTE_SPARE1, - LIBLTE_RRC_POLL_BYTE_N_ITEMS, -}LIBLTE_RRC_POLL_BYTE_ENUM; -static const char liblte_rrc_poll_byte_text[LIBLTE_RRC_POLL_BYTE_N_ITEMS][20] = { "25kB", "50kB", "75kB", "100kB", - "125kB", "250kB", "375kB", "500kB", - "750kB", "1000kB", "1250kB", "1500kB", - "2000kB", "3000kB", "INFINITY", "SPARE"}; -static const int32 liblte_rrc_poll_byte_num[LIBLTE_RRC_POLL_BYTE_N_ITEMS] = { 25, 50, 75, 100, - 125, 250, 375, 500, - 750, 1000, 1250, 1500, - 2000, 3000, -1, -1}; -typedef enum{ - LIBLTE_RRC_MAX_RETX_THRESHOLD_T1 = 0, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T2, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T3, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T4, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T6, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T8, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T16, - LIBLTE_RRC_MAX_RETX_THRESHOLD_T32, - LIBLTE_RRC_MAX_RETX_THRESHOLD_N_ITEMS, -}LIBLTE_RRC_MAX_RETX_THRESHOLD_ENUM; -static const char liblte_rrc_max_retx_threshold_text[LIBLTE_RRC_MAX_RETX_THRESHOLD_N_ITEMS][20] = { "t1", "t2", "t3", "t4", - "t6", "t8", "t16", "t32"}; -static const uint32_t liblte_rrc_max_retx_threshold_num[LIBLTE_RRC_MAX_RETX_THRESHOLD_N_ITEMS] = { 1, 2, 3, 4, - 6, 8, 16, 32}; -typedef enum{ - LIBLTE_RRC_T_REORDERING_MS0 = 0, - LIBLTE_RRC_T_REORDERING_MS5, - LIBLTE_RRC_T_REORDERING_MS10, - LIBLTE_RRC_T_REORDERING_MS15, - LIBLTE_RRC_T_REORDERING_MS20, - LIBLTE_RRC_T_REORDERING_MS25, - LIBLTE_RRC_T_REORDERING_MS30, - LIBLTE_RRC_T_REORDERING_MS35, - LIBLTE_RRC_T_REORDERING_MS40, - LIBLTE_RRC_T_REORDERING_MS45, - LIBLTE_RRC_T_REORDERING_MS50, - LIBLTE_RRC_T_REORDERING_MS55, - LIBLTE_RRC_T_REORDERING_MS60, - LIBLTE_RRC_T_REORDERING_MS65, - LIBLTE_RRC_T_REORDERING_MS70, - LIBLTE_RRC_T_REORDERING_MS75, - LIBLTE_RRC_T_REORDERING_MS80, - LIBLTE_RRC_T_REORDERING_MS85, - LIBLTE_RRC_T_REORDERING_MS90, - LIBLTE_RRC_T_REORDERING_MS95, - LIBLTE_RRC_T_REORDERING_MS100, - LIBLTE_RRC_T_REORDERING_MS110, - LIBLTE_RRC_T_REORDERING_MS120, - LIBLTE_RRC_T_REORDERING_MS130, - LIBLTE_RRC_T_REORDERING_MS140, - LIBLTE_RRC_T_REORDERING_MS150, - LIBLTE_RRC_T_REORDERING_MS160, - LIBLTE_RRC_T_REORDERING_MS170, - LIBLTE_RRC_T_REORDERING_MS180, - LIBLTE_RRC_T_REORDERING_MS190, - LIBLTE_RRC_T_REORDERING_MS200, - LIBLTE_RRC_T_REORDERING_SPARE1, - LIBLTE_RRC_T_REORDERING_N_ITEMS, -}LIBLTE_RRC_T_REORDERING_ENUM; -static const char liblte_rrc_t_reordering_text[LIBLTE_RRC_T_REORDERING_N_ITEMS][20] = { "ms0", "ms5", "ms10", "ms15", - "ms20", "ms25", "ms30", "ms35", - "ms40", "ms45", "ms50", "ms55", - "ms60", "ms65", "ms70", "ms75", - "ms80", "ms85", "ms90", "ms95", - "ms100", "ms110", "ms120", "ms130", - "ms140", "ms150", "ms160", "ms170", - "ms180", "ms190", "ms200", "SPARE"}; -static const int32 liblte_rrc_t_reordering_num[LIBLTE_RRC_T_REORDERING_N_ITEMS] = { 0, 5, 10, 15, - 20, 25, 30, 35, - 40, 45, 50, 55, - 60, 65, 70, 75, - 80, 85, 90, 95, - 100, 110, 120, 130, - 140, 150, 160, 170, - 180, 190, 200, -1}; -typedef enum{ - LIBLTE_RRC_RLC_MODE_AM = 0, - LIBLTE_RRC_RLC_MODE_UM_BI, - LIBLTE_RRC_RLC_MODE_UM_UNI_UL, - LIBLTE_RRC_RLC_MODE_UM_UNI_DL, - LIBLTE_RRC_RLC_MODE_N_ITEMS, -}LIBLTE_RRC_RLC_MODE_ENUM; -static const char liblte_rrc_rlc_mode_text[LIBLTE_RRC_RLC_MODE_N_ITEMS][20] = {"AM", - "UM BI", - "UM UNI UL", - "UM UNI DL"}; -typedef enum{ - LIBLTE_RRC_T_STATUS_PROHIBIT_MS0 = 0, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS5, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS10, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS15, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS20, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS25, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS30, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS35, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS40, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS45, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS50, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS55, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS60, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS65, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS70, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS75, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS80, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS85, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS90, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS95, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS100, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS105, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS110, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS115, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS120, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS125, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS130, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS135, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS140, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS145, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS150, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS155, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS160, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS165, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS170, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS175, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS180, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS185, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS190, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS195, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS200, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS205, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS210, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS215, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS220, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS225, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS230, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS235, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS240, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS245, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS250, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS300, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS350, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS400, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS450, - LIBLTE_RRC_T_STATUS_PROHIBIT_MS500, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE8, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE7, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE6, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE5, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE4, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE3, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE2, - LIBLTE_RRC_T_STATUS_PROHIBIT_SPARE1, - LIBLTE_RRC_T_STATUS_PROHIBIT_N_ITEMS, -}LIBLTE_RRC_T_STATUS_PROHIBIT_ENUM; -static const char liblte_rrc_t_status_prohibit_text[LIBLTE_RRC_T_STATUS_PROHIBIT_N_ITEMS][20] = { "ms0", "ms5", "ms10", "ms15", - "ms20", "ms25", "ms30", "ms35", - "ms40", "ms45", "ms50", "ms55", - "ms60", "ms65", "ms70", "ms75", - "ms80", "ms85", "ms90", "ms95", - "ms100", "ms105", "ms110", "ms115", - "ms120", "ms125", "ms130", "ms135", - "ms140", "ms145", "ms150", "ms155", - "ms160", "ms165", "ms170", "ms175", - "ms180", "ms185", "ms190", "ms195", - "ms200", "ms205", "ms210", "ms215", - "ms220", "ms225", "ms230", "ms235", - "ms240", "ms245", "ms250", "ms300", - "ms350", "ms400", "ms450", "ms500", - "SPARE", "SPARE", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -static const int32 liblte_rrc_t_status_prohibit_num[LIBLTE_RRC_T_STATUS_PROHIBIT_N_ITEMS] = { 0, 5, 10, 15, - 20, 25, 30, 35, - 40, 45, 50, 55, - 60, 65, 70, 75, - 80, 85, 90, 95, - 100, 105, 110, 115, - 120, 125, 130, 135, - 140, 145, 150, 155, - 160, 165, 170, 175, - 180, 185, 190, 195, - 200, 205, 210, 215, - 220, 225, 230, 235, - 240, 245, 250, 300, - 350, 400, 450, 500, - -1, -1, -1, -1, - -1, -1, -1, -1}; -typedef enum{ - LIBLTE_RRC_SN_FIELD_LENGTH_SIZE5 = 0, - LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10, - LIBLTE_RRC_SN_FIELD_LENGTH_N_ITEMS, -}LIBLTE_RRC_SN_FIELD_LENGTH_ENUM; -static const char liblte_rrc_sn_field_length_text[LIBLTE_RRC_SN_FIELD_LENGTH_N_ITEMS][20] = {"size5", "size10"}; -static const uint8 liblte_rrc_sn_field_length_num[LIBLTE_RRC_SN_FIELD_LENGTH_N_ITEMS] = {5, 10}; -typedef enum{ - LIBLTE_RRC_SPS_INTERVAL_DL_SF10 = 0, - LIBLTE_RRC_SPS_INTERVAL_DL_SF20, - LIBLTE_RRC_SPS_INTERVAL_DL_SF32, - LIBLTE_RRC_SPS_INTERVAL_DL_SF40, - LIBLTE_RRC_SPS_INTERVAL_DL_SF64, - LIBLTE_RRC_SPS_INTERVAL_DL_SF80, - LIBLTE_RRC_SPS_INTERVAL_DL_SF128, - LIBLTE_RRC_SPS_INTERVAL_DL_SF160, - LIBLTE_RRC_SPS_INTERVAL_DL_SF320, - LIBLTE_RRC_SPS_INTERVAL_DL_SF640, - LIBLTE_RRC_SPS_INTERVAL_DL_SPARE6, - LIBLTE_RRC_SPS_INTERVAL_DL_SPARE5, - LIBLTE_RRC_SPS_INTERVAL_DL_SPARE4, - LIBLTE_RRC_SPS_INTERVAL_DL_SPARE3, - LIBLTE_RRC_SPS_INTERVAL_DL_SPARE2, - LIBLTE_RRC_SPS_INTERVAL_DL_SPARE1, - LIBLTE_RRC_SPS_INTERVAL_DL_N_ITEMS, -}LIBLTE_RRC_SPS_INTERVAL_DL_ENUM; -static const char liblte_rrc_sps_interval_dl_text[LIBLTE_RRC_SPS_INTERVAL_DL_N_ITEMS][20] = { "sf10", "sf20", "sf32", "sf40", - "sf64", "sf80", "sf128", "sf160", - "sf320", "sf640", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -typedef enum{ - LIBLTE_RRC_SPS_INTERVAL_UL_SF10 = 0, - LIBLTE_RRC_SPS_INTERVAL_UL_SF20, - LIBLTE_RRC_SPS_INTERVAL_UL_SF32, - LIBLTE_RRC_SPS_INTERVAL_UL_SF40, - LIBLTE_RRC_SPS_INTERVAL_UL_SF64, - LIBLTE_RRC_SPS_INTERVAL_UL_SF80, - LIBLTE_RRC_SPS_INTERVAL_UL_SF128, - LIBLTE_RRC_SPS_INTERVAL_UL_SF160, - LIBLTE_RRC_SPS_INTERVAL_UL_SF320, - LIBLTE_RRC_SPS_INTERVAL_UL_SF640, - LIBLTE_RRC_SPS_INTERVAL_UL_SPARE6, - LIBLTE_RRC_SPS_INTERVAL_UL_SPARE5, - LIBLTE_RRC_SPS_INTERVAL_UL_SPARE4, - LIBLTE_RRC_SPS_INTERVAL_UL_SPARE3, - LIBLTE_RRC_SPS_INTERVAL_UL_SPARE2, - LIBLTE_RRC_SPS_INTERVAL_UL_SPARE1, - LIBLTE_RRC_SPS_INTERVAL_UL_N_ITEMS, -}LIBLTE_RRC_SPS_INTERVAL_UL_ENUM; -static const char liblte_rrc_sps_interval_ul_text[LIBLTE_RRC_SPS_INTERVAL_UL_N_ITEMS][20] = { "sf10", "sf20", "sf32", "sf40", - "sf64", "sf80", "sf128", "sf160", - "sf320", "sf640", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -typedef enum{ - LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_E2 = 0, - LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_E3, - LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_E4, - LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_E8, - LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_N_ITEMS, -}LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_ENUM; -static const char liblte_rrc_implicit_release_after_text[LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_N_ITEMS][20] = {"e2", "e3", "e4", "e8"}; -typedef enum{ - LIBLTE_RRC_TWO_INTERVALS_CONFIG_TRUE = 0, - LIBLTE_RRC_TWO_INTERVALS_CONFIG_N_ITEMS, -}LIBLTE_RRC_TWO_INTERVALS_CONFIG_ENUM; -static const char liblte_rrc_two_intervals_config_text[LIBLTE_RRC_TWO_INTERVALS_CONFIG_N_ITEMS][20] = {"TRUE"}; -// Structs -typedef struct{ - LIBLTE_RRC_T_POLL_RETRANSMIT_ENUM t_poll_retx; - LIBLTE_RRC_POLL_PDU_ENUM poll_pdu; - LIBLTE_RRC_POLL_BYTE_ENUM poll_byte; - LIBLTE_RRC_MAX_RETX_THRESHOLD_ENUM max_retx_thresh; -}LIBLTE_RRC_UL_AM_RLC_STRUCT; -typedef struct{ - LIBLTE_RRC_T_REORDERING_ENUM t_reordering; - LIBLTE_RRC_T_STATUS_PROHIBIT_ENUM t_status_prohibit; -}LIBLTE_RRC_DL_AM_RLC_STRUCT; -typedef struct{ - LIBLTE_RRC_SN_FIELD_LENGTH_ENUM sn_field_len; -}LIBLTE_RRC_UL_UM_RLC_STRUCT; -typedef struct{ - LIBLTE_RRC_SN_FIELD_LENGTH_ENUM sn_field_len; - LIBLTE_RRC_T_REORDERING_ENUM t_reordering; -}LIBLTE_RRC_DL_UM_RLC_STRUCT; -typedef struct{ - LIBLTE_RRC_UL_AM_RLC_STRUCT ul_am_rlc; - LIBLTE_RRC_DL_AM_RLC_STRUCT dl_am_rlc; - LIBLTE_RRC_UL_UM_RLC_STRUCT ul_um_bi_rlc; - LIBLTE_RRC_DL_UM_RLC_STRUCT dl_um_bi_rlc; - LIBLTE_RRC_UL_UM_RLC_STRUCT ul_um_uni_rlc; - LIBLTE_RRC_DL_UM_RLC_STRUCT dl_um_uni_rlc; - LIBLTE_RRC_RLC_MODE_ENUM rlc_mode; -}LIBLTE_RRC_RLC_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_RLC_CONFIG_STRUCT rlc_explicit_cnfg; - LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT lc_explicit_cnfg; - uint32 srb_id; - bool rlc_cnfg_present; - bool rlc_default_cnfg_present; - bool lc_cnfg_present; - bool lc_default_cnfg_present; -}LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_PDCP_CONFIG_STRUCT pdcp_cnfg; - LIBLTE_RRC_RLC_CONFIG_STRUCT rlc_cnfg; - LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT lc_cnfg; - uint32 eps_bearer_id; - uint32 lc_id; - uint8 drb_id; - bool eps_bearer_id_present; - bool pdcp_cnfg_present; - bool rlc_cnfg_present; - bool lc_id_present; - bool lc_cnfg_present; -}LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT; -typedef struct{ - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT explicit_value; - bool default_value; -}LIBLTE_RRC_MAC_MAIN_CONFIG_CHOICE_STRUCT; -typedef struct{ - LIBLTE_RRC_SPS_INTERVAL_DL_ENUM sps_interval_dl; - uint32 n1_pucch_an_persistent_list[4]; - uint32 n1_pucch_an_persistent_list_size; - uint8 N_sps_processes; - bool setup_present; -}LIBLTE_RRC_SPS_CONFIG_DL_STRUCT; -typedef struct{ - LIBLTE_RRC_SPS_INTERVAL_UL_ENUM sps_interval_ul; - LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_ENUM implicit_release_after; - LIBLTE_RRC_TWO_INTERVALS_CONFIG_ENUM two_intervals_cnfg; - int32 p0_nominal_pusch; - int32 p0_ue_pusch; - bool setup_present; - bool p0_persistent_present; - bool two_intervals_cnfg_present; -}LIBLTE_RRC_SPS_CONFIG_UL_STRUCT; -typedef struct{ - LIBLTE_RRC_SPS_CONFIG_DL_STRUCT sps_cnfg_dl; - LIBLTE_RRC_SPS_CONFIG_UL_STRUCT sps_cnfg_ul; - uint16 sps_c_rnti; - bool sps_c_rnti_present; - bool sps_cnfg_dl_present; - bool sps_cnfg_ul_present; -}LIBLTE_RRC_SPS_CONFIG_STRUCT; -typedef struct{ - LIBLTE_RRC_T301_ENUM t301; - LIBLTE_RRC_T310_ENUM t310; - LIBLTE_RRC_N310_ENUM n310; - LIBLTE_RRC_T311_ENUM t311; - LIBLTE_RRC_N311_ENUM n311; -}LIBLTE_RRC_RLF_TIMERS_AND_CONSTANTS_STRUCT; -typedef struct{ - LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT srb_to_add_mod_list[2]; - LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT drb_to_add_mod_list[LIBLTE_RRC_MAX_DRB]; - LIBLTE_RRC_MAC_MAIN_CONFIG_CHOICE_STRUCT mac_main_cnfg; - LIBLTE_RRC_SPS_CONFIG_STRUCT sps_cnfg; - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT phy_cnfg_ded; - LIBLTE_RRC_RLF_TIMERS_AND_CONSTANTS_STRUCT rlf_timers_and_constants; - uint32 srb_to_add_mod_list_size; - uint32 drb_to_add_mod_list_size; - uint32 drb_to_release_list_size; - uint8 drb_to_release_list[LIBLTE_RRC_MAX_DRB]; - bool mac_main_cnfg_present; - bool sps_cnfg_present; - bool phy_cnfg_ded_present; - bool rlf_timers_and_constants_present; -}LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rr_config_dedicated_ie(LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT *rr_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rr_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT *rr_cnfg); - -/********************************************************************* - IE Name: RLC Config - - Description: Specifies the RLC configuration of SRBs and DRBs - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// RLC Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rlc_config_ie(LIBLTE_RRC_RLC_CONFIG_STRUCT *rlc_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rlc_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_RLC_CONFIG_STRUCT *rlc_cnfg); - -/********************************************************************* - IE Name: RLF Timers and Constants - - Description: Contains UE specific timers and constants applicable - for UEs in RRC_CONNECTED - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// RLF Timers and Constants struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rlf_timers_and_constants_ie(LIBLTE_RRC_RLF_TIMERS_AND_CONSTANTS_STRUCT *rlf_timers_and_constants, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rlf_timers_and_constants_ie(uint8 **ie_ptr, - LIBLTE_RRC_RLF_TIMERS_AND_CONSTANTS_STRUCT *rlf_timers_and_constants); - -/********************************************************************* - IE Name: RN Subframe Config - - Description: Specifies the subframe configuration for an RN - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: Scheduling Request Config - - Description: Specifies the scheduling request related parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// Scheduling Request Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_scheduling_request_config_ie(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT *sched_request_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_scheduling_request_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT *sched_request_cnfg); - -/********************************************************************* - IE Name: Sounding RS UL Config - - Description: Specifies the uplink Sounding RS configuration for - periodic and aperiodic sounding - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Sounding RS UL Config enums defined above -// Structs -// Sounding RS UL Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_srs_ul_config_common_ie(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT *srs_ul_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_srs_ul_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT *srs_ul_cnfg); -LIBLTE_ERROR_ENUM liblte_rrc_pack_srs_ul_config_dedicated_ie(LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT *srs_ul_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_srs_ul_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT *srs_ul_cnfg); - -/********************************************************************* - IE Name: SPS Config - - Description: Specifies the semi-persistent scheduling - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// SPS Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sps_config_ie(LIBLTE_RRC_SPS_CONFIG_STRUCT *sps_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sps_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_SPS_CONFIG_STRUCT *sps_cnfg); - -/********************************************************************* - IE Name: TDD Config - - Description: Specifies the TDD specific physical channel - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// TDD Config enums defined above -// Structs -// TDD Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_tdd_config_ie(LIBLTE_RRC_TDD_CONFIG_STRUCT *tdd_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tdd_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_TDD_CONFIG_STRUCT *tdd_cnfg); - -/********************************************************************* - IE Name: Time Alignment Timer - - Description: Controls how long the UE is considered uplink time - aligned - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Time Alignment Timer enum defined above -// Structs -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_time_alignment_timer_ie(LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM time_alignment_timer, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_time_alignment_timer_ie(uint8 **ie_ptr, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM *time_alignment_timer); - -/********************************************************************* - IE Name: TPC PDCCH Config - - Description: Specifies the RNTIs and indecies for PUCCH and PUSCH - power control - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Structs -// TPC PDCCH Config struct defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_tpc_pdcch_config_ie(LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT *tpc_pdcch_cnfg, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tpc_pdcch_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT *tpc_pdcch_cnfg); - -/********************************************************************* - IE Name: UL Antenna Info - - Description: Specifies the UL antenna configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_TM1 = 0, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_TM2, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_SPARE6, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_SPARE5, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_SPARE4, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_SPARE3, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_SPARE2, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_SPARE1, - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_N_ITEMS, -}LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_ENUM; -static const char liblte_rrc_ul_transmission_mode_r10_text[LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_N_ITEMS][20] = { "TM1", "TM2", "SPARE", "SPARE", - "SPARE", "SPARE", "SPARE", "SPARE"}; -// Structs -typedef struct{ - LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_ENUM ul_tx_mode; - bool four_ant_port_activated; -}LIBLTE_RRC_UL_ANTENNA_INFO_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_antenna_info_ie(LIBLTE_RRC_UL_ANTENNA_INFO_STRUCT *ul_ant_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_antenna_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_UL_ANTENNA_INFO_STRUCT *ul_ant_info); - -/********************************************************************* - IE Name: Uplink Power Control - - Description: Specifies the parameters for uplink power control in - the system information and in the dedicated - signalling - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// Defines -// Enums -// Uplink Power Control enums defined above -// Structs -// Uplink Power Control structs defined above -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_power_control_common_ie(LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT *ul_pwr_ctrl, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_power_control_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT *ul_pwr_ctrl); -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_power_control_dedicated_ie(LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT *ul_pwr_ctrl, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_power_control_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT *ul_pwr_ctrl); - -/********************************************************************* - IE Name: System Information Block Type 2 - - Description: Contains radio resource configuration that is common - for all UEs - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_AC_BARRING_FACTOR_P00 = 0, - LIBLTE_RRC_AC_BARRING_FACTOR_P05, - LIBLTE_RRC_AC_BARRING_FACTOR_P10, - LIBLTE_RRC_AC_BARRING_FACTOR_P15, - LIBLTE_RRC_AC_BARRING_FACTOR_P20, - LIBLTE_RRC_AC_BARRING_FACTOR_P25, - LIBLTE_RRC_AC_BARRING_FACTOR_P30, - LIBLTE_RRC_AC_BARRING_FACTOR_P40, - LIBLTE_RRC_AC_BARRING_FACTOR_P50, - LIBLTE_RRC_AC_BARRING_FACTOR_P60, - LIBLTE_RRC_AC_BARRING_FACTOR_P70, - LIBLTE_RRC_AC_BARRING_FACTOR_P75, - LIBLTE_RRC_AC_BARRING_FACTOR_P80, - LIBLTE_RRC_AC_BARRING_FACTOR_P85, - LIBLTE_RRC_AC_BARRING_FACTOR_P90, - LIBLTE_RRC_AC_BARRING_FACTOR_P95, - LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS, -}LIBLTE_RRC_AC_BARRING_FACTOR_ENUM; -static const char liblte_rrc_ac_barring_factor_text[LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS][20] = {"0.00", "0.05", "0.10", "0.15", - "0.20", "0.25", "0.30", "0.40", - "0.50", "0.60", "0.70", "0.75", - "0.80", "0.85", "0.90", "0.95"}; -static const double liblte_rrc_ac_barring_factor_num[LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS] = {0.00, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.40, - 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95}; -typedef enum{ - LIBLTE_RRC_AC_BARRING_TIME_S4 = 0, - LIBLTE_RRC_AC_BARRING_TIME_S8, - LIBLTE_RRC_AC_BARRING_TIME_S16, - LIBLTE_RRC_AC_BARRING_TIME_S32, - LIBLTE_RRC_AC_BARRING_TIME_S64, - LIBLTE_RRC_AC_BARRING_TIME_S128, - LIBLTE_RRC_AC_BARRING_TIME_S256, - LIBLTE_RRC_AC_BARRING_TIME_S512, - LIBLTE_RRC_AC_BARRING_TIME_N_ITEMS, -}LIBLTE_RRC_AC_BARRING_TIME_ENUM; -static const char liblte_rrc_ac_barring_time_text[LIBLTE_RRC_AC_BARRING_TIME_N_ITEMS][20] = { "4", "8", "16", "32", - "64", "128", "256", "512"}; -static const uint16 liblte_rrc_ac_barring_time_num[LIBLTE_RRC_AC_BARRING_TIME_N_ITEMS] = {4, 8, 16, 32, 64, 128, 256, 512}; -typedef enum{ - LIBLTE_RRC_UL_BW_N6 = 0, - LIBLTE_RRC_UL_BW_N15, - LIBLTE_RRC_UL_BW_N25, - LIBLTE_RRC_UL_BW_N50, - LIBLTE_RRC_UL_BW_N75, - LIBLTE_RRC_UL_BW_N100, - LIBLTE_RRC_UL_BW_N_ITEMS, -}LIBLTE_RRC_UL_BW_ENUM; -static const char liblte_rrc_ul_bw_text[LIBLTE_RRC_UL_BW_N_ITEMS][20] = {"1.4", "3", "5", "10", - "15", "20"}; -static const double liblte_rrc_ul_bw_num[LIBLTE_RRC_UL_BW_N_ITEMS] = {1.4, 3, 5, 10, 15, 20}; -// Structs -typedef struct{ - LIBLTE_RRC_AC_BARRING_FACTOR_ENUM factor; - LIBLTE_RRC_AC_BARRING_TIME_ENUM time; - uint8 for_special_ac; - bool enabled; -}LIBLTE_RRC_AC_BARRING_CONFIG_STRUCT; -typedef struct{ - uint16 value; - bool present; -}LIBLTE_RRC_ARFCN_VALUE_EUTRA_STRUCT; -typedef struct{ - LIBLTE_RRC_UL_BW_ENUM bw; - bool present; -}LIBLTE_RRC_UL_BW_STRUCT; -typedef struct{ - LIBLTE_RRC_AC_BARRING_CONFIG_STRUCT ac_barring_for_mo_signalling; - LIBLTE_RRC_AC_BARRING_CONFIG_STRUCT ac_barring_for_mo_data; - LIBLTE_RRC_RR_CONFIG_COMMON_SIB_STRUCT rr_config_common_sib; - LIBLTE_RRC_UE_TIMERS_AND_CONSTANTS_STRUCT ue_timers_and_constants; - LIBLTE_RRC_ARFCN_VALUE_EUTRA_STRUCT arfcn_value_eutra; - LIBLTE_RRC_UL_BW_STRUCT ul_bw; - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT mbsfn_subfr_cnfg_list[LIBLTE_RRC_MAX_MBSFN_ALLOCATIONS]; - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM time_alignment_timer; - uint32 mbsfn_subfr_cnfg_list_size; - uint8 additional_spectrum_emission; - bool ac_barring_for_emergency; - bool ac_barring_info_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_2_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_2_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2); - -/********************************************************************* - IE Name: System Information Block Type 3 - - Description: Contains cell reselection information common for - intra-frequency, inter-frequency, and/or inter-RAT - cell re-selection as well as intra-frequency cell - re-selection information other than neighboring - cell related - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_Q_HYST_DB_0 = 0, - LIBLTE_RRC_Q_HYST_DB_1, - LIBLTE_RRC_Q_HYST_DB_2, - LIBLTE_RRC_Q_HYST_DB_3, - LIBLTE_RRC_Q_HYST_DB_4, - LIBLTE_RRC_Q_HYST_DB_5, - LIBLTE_RRC_Q_HYST_DB_6, - LIBLTE_RRC_Q_HYST_DB_8, - LIBLTE_RRC_Q_HYST_DB_10, - LIBLTE_RRC_Q_HYST_DB_12, - LIBLTE_RRC_Q_HYST_DB_14, - LIBLTE_RRC_Q_HYST_DB_16, - LIBLTE_RRC_Q_HYST_DB_18, - LIBLTE_RRC_Q_HYST_DB_20, - LIBLTE_RRC_Q_HYST_DB_22, - LIBLTE_RRC_Q_HYST_DB_24, - LIBLTE_RRC_Q_HYST_N_ITEMS, -}LIBLTE_RRC_Q_HYST_ENUM; -static const char liblte_rrc_q_hyst_text[LIBLTE_RRC_Q_HYST_N_ITEMS][20] = { "0", "1", "2", "3", - "4", "5", "6", "8", - "10", "12", "14", "16", - "18", "20", "22", "24"}; -static const uint8 liblte_rrc_q_hyst_num[LIBLTE_RRC_Q_HYST_N_ITEMS] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; -typedef enum{ - LIBLTE_RRC_SF_MEDIUM_DB_N6 = 0, - LIBLTE_RRC_SF_MEDIUM_DB_N4, - LIBLTE_RRC_SF_MEDIUM_DB_N2, - LIBLTE_RRC_SF_MEDIUM_DB_0, - LIBLTE_RRC_SF_MEDIUM_N_ITEMS, -}LIBLTE_RRC_SF_MEDIUM_ENUM; -static const char liblte_rrc_sf_medium_text[LIBLTE_RRC_SF_MEDIUM_N_ITEMS][20] = {"-6", "-4", "-2", "0"}; -static const int8 liblte_rrc_sf_medium_num[LIBLTE_RRC_SF_MEDIUM_N_ITEMS] = {-6, -4, -2, 0}; -typedef enum{ - LIBLTE_RRC_SF_HIGH_DB_N6 = 0, - LIBLTE_RRC_SF_HIGH_DB_N4, - LIBLTE_RRC_SF_HIGH_DB_N2, - LIBLTE_RRC_SF_HIGH_DB_0, - LIBLTE_RRC_SF_HIGH_N_ITEMS, -}LIBLTE_RRC_SF_HIGH_ENUM; -static const char liblte_rrc_sf_high_text[LIBLTE_RRC_SF_HIGH_N_ITEMS][20] = {"-6", "-4", "-2", "0"}; -static const int8 liblte_rrc_sf_high_num[LIBLTE_RRC_SF_HIGH_N_ITEMS] = {-6, -4, -2, 0}; -// Structs -typedef struct{ - LIBLTE_RRC_SF_MEDIUM_ENUM medium; - LIBLTE_RRC_SF_HIGH_ENUM high; -}LIBLTE_RRC_Q_HYST_SF_STRUCT; -typedef struct{ - LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT mobility_state_params; - LIBLTE_RRC_Q_HYST_SF_STRUCT q_hyst_sf; - bool present; -}LIBLTE_RRC_SPEED_STATE_RESELECTION_PARS_STRUCT; -typedef struct{ - LIBLTE_RRC_SPEED_STATE_RESELECTION_PARS_STRUCT speed_state_resel_params; - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT t_resel_eutra_sf; - LIBLTE_RRC_Q_HYST_ENUM q_hyst; - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM allowed_meas_bw; - int16 q_rx_lev_min; - uint8 s_non_intra_search; - uint8 thresh_serving_low; - uint8 cell_resel_prio; - uint8 s_intra_search; - uint8 neigh_cell_cnfg; - uint8 t_resel_eutra; - int8 p_max; - bool s_non_intra_search_present; - bool presence_ant_port_1; - bool p_max_present; - bool s_intra_search_present; - bool allowed_meas_bw_present; - bool t_resel_eutra_sf_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_3_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_3_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3); - -/********************************************************************* - IE Name: System Information Block Type 4 - - Description: Contains the neighboring cell related information - relevant only for intra-frequency cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_CELL_INTRA 16 -#define LIBLTE_RRC_MAX_CELL_BLACK 16 -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM q_offset_range; - uint16 phys_cell_id; -}LIBLTE_RRC_INTRA_FREQ_NEIGH_CELL_INFO_STRUCT; -typedef struct{ - LIBLTE_RRC_INTRA_FREQ_NEIGH_CELL_INFO_STRUCT intra_freq_neigh_cell_list[LIBLTE_RRC_MAX_CELL_INTRA]; - LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT intra_freq_black_cell_list[LIBLTE_RRC_MAX_CELL_BLACK]; - LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT csg_phys_cell_id_range; - uint32 intra_freq_neigh_cell_list_size; - uint32 intra_freq_black_cell_list_size; - bool csg_phys_cell_id_range_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_4_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *sib4, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_4_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *sib4); - -/********************************************************************* - IE Name: System Information Block Type 5 - - Description: Contains information relevant only for - inter-frequency cell reselection, i.e. information - about other E-UTRA frequencies and inter-frequency - neighboring cells relevant for cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_FREQ 8 -#define LIBLTE_RRC_MAX_CELL_INTER 16 -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM q_offset_cell; - uint16 phys_cell_id; -}LIBLTE_RRC_INTER_FREQ_NEIGH_CELL_STRUCT; -typedef struct{ - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT t_resel_eutra_sf; - LIBLTE_RRC_INTER_FREQ_NEIGH_CELL_STRUCT inter_freq_neigh_cell_list[LIBLTE_RRC_MAX_CELL_INTER]; - LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT inter_freq_black_cell_list[LIBLTE_RRC_MAX_CELL_BLACK]; - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM allowed_meas_bw; - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM q_offset_freq; - uint16 dl_carrier_freq; - int16 q_rx_lev_min; - uint8 t_resel_eutra; - uint8 threshx_high; - uint8 threshx_low; - uint8 cell_resel_prio; - uint8 neigh_cell_cnfg; - uint8 inter_freq_neigh_cell_list_size; - uint8 inter_freq_black_cell_list_size; - int8 p_max; - bool presence_ant_port_1; - bool p_max_present; - bool t_resel_eutra_sf_present; - bool cell_resel_prio_present; -}LIBLTE_RRC_INTER_FREQ_CARRIER_FREQ_INFO_STRUCT; -typedef struct{ - LIBLTE_RRC_INTER_FREQ_CARRIER_FREQ_INFO_STRUCT inter_freq_carrier_freq_list[LIBLTE_RRC_MAX_FREQ]; - uint32 inter_freq_carrier_freq_list_size; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_5_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT *sib5, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_5_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT *sib5); - -/********************************************************************* - IE Name: System Information Block Type 6 - - Description: Contains information relevant only for inter-RAT - cell reselection, i.e. information about UTRA - frequencies and UTRA neighboring cells relevant for - cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_UTRA_FDD_CARRIER 16 -#define LIBLTE_RRC_MAX_UTRA_TDD_CARRIER 16 -// Enums -// Structs -typedef struct{ - uint16 carrier_freq; - uint8 cell_resel_prio; - uint8 threshx_high; - uint8 threshx_low; - int8 q_rx_lev_min; - int8 p_max_utra; - int8 q_qual_min; - bool cell_resel_prio_present; -}LIBLTE_RRC_CARRIER_FREQ_UTRA_FDD_STRUCT; -typedef struct{ - uint16 carrier_freq; - uint8 cell_resel_prio; - uint8 threshx_high; - uint8 threshx_low; - int8 q_rx_lev_min; - int8 p_max_utra; - bool cell_resel_prio_present; -}LIBLTE_RRC_CARRIER_FREQ_UTRA_TDD_STRUCT; -typedef struct{ - LIBLTE_RRC_CARRIER_FREQ_UTRA_FDD_STRUCT carrier_freq_list_utra_fdd[LIBLTE_RRC_MAX_UTRA_FDD_CARRIER]; - LIBLTE_RRC_CARRIER_FREQ_UTRA_TDD_STRUCT carrier_freq_list_utra_tdd[LIBLTE_RRC_MAX_UTRA_TDD_CARRIER]; - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT t_resel_utra_sf; - uint8 t_resel_utra; - uint8 carrier_freq_list_utra_fdd_size; - uint8 carrier_freq_list_utra_tdd_size; - bool t_resel_utra_sf_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_6_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT *sib6, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_6_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT *sib6); - -/********************************************************************* - IE Name: System Information Block Type 7 - - Description: Contains information relevant only for inter-RAT - cell reselection, i.e. information about GERAN - frequencies relevant for cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_GNFG 16 -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT carrier_freqs; - uint8 cell_resel_prio; - uint8 ncc_permitted; - uint8 p_max_geran; - uint8 threshx_high; - uint8 threshx_low; - int8 q_rx_lev_min; - bool cell_resel_prio_present; - bool p_max_geran_present; -}LIBLTE_RRC_CARRIER_FREQS_INFO_LIST_GERAN_STRUCT; -typedef struct{ - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT t_resel_geran_sf; - LIBLTE_RRC_CARRIER_FREQS_INFO_LIST_GERAN_STRUCT carrier_freqs_info_list[LIBLTE_RRC_MAX_GNFG]; - uint8 t_resel_geran; - uint8 carrier_freqs_info_list_size; - bool t_resel_geran_sf_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_7_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT *sib7, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_7_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT *sib7); - -/********************************************************************* - IE Name: System Information Block Type 8 - - Description: Contains information relevant only for inter-RAT - cell re-selection i.e. information about CDMA2000 - frequencies and CDMA2000 neighboring cells relevant - for cell re-selection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_CDMA_BAND_CLASS 32 -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM band_class; - uint8 cell_resel_prio; - uint8 thresh_x_high; - uint8 thresh_x_low; - bool cell_resel_prio_present; -}LIBLTE_RRC_BAND_CLASS_INFO_CDMA2000_STRUCT; -typedef struct{ - uint16 arfcn; - uint16 phys_cell_id_list[16]; - uint8 phys_cell_id_list_size; -}LIBLTE_RRC_NEIGH_CELLS_PER_BAND_CLASS_CDMA2000_STRUCT; -typedef struct{ - LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM band_class; - LIBLTE_RRC_NEIGH_CELLS_PER_BAND_CLASS_CDMA2000_STRUCT neigh_cells_per_freq_list[16]; - uint8 neigh_cells_per_freq_list_size; -}LIBLTE_RRC_NEIGH_CELL_CDMA2000_STRUCT; -typedef struct{ - LIBLTE_RRC_BAND_CLASS_INFO_CDMA2000_STRUCT band_class_list[LIBLTE_RRC_MAX_CDMA_BAND_CLASS]; - LIBLTE_RRC_NEIGH_CELL_CDMA2000_STRUCT neigh_cell_list[16]; - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT t_resel_cdma2000_sf; - uint8 band_class_list_size; - uint8 neigh_cell_list_size; - uint8 t_resel_cdma2000; - bool t_resel_cdma2000_sf_present; -}LIBLTE_RRC_CELL_RESELECTION_PARAMS_CDMA2000_STRUCT; -typedef struct{ - LIBLTE_RRC_SYSTEM_TIME_INFO_CDMA2000_STRUCT sys_time_info_cdma2000; - LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT pre_reg_info_hrpd; - LIBLTE_RRC_CELL_RESELECTION_PARAMS_CDMA2000_STRUCT cell_resel_params_hrpd; - LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_STRUCT csfb_reg_param_1xrtt; - LIBLTE_RRC_CELL_RESELECTION_PARAMS_CDMA2000_STRUCT cell_resel_params_1xrtt; - uint64 long_code_state_1xrtt; - uint8 search_win_size; - bool sys_time_info_present; - bool search_win_size_present; - bool params_hrpd_present; - bool cell_resel_params_hrpd_present; - bool params_1xrtt_present; - bool csfb_reg_param_1xrtt_present; - bool long_code_state_1xrtt_present; - bool cell_resel_params_1xrtt_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_8_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT *sib8, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_8_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT *sib8); - -/********************************************************************* - IE Name: System Information Block Type 9 - - Description: Contains a home eNB name (HNB name) - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -// Structs -// lb:1, ub:48 -typedef struct{ - uint32 hnb_name_size; - uint8 hnb_name[48]; - bool hnb_name_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT; - -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_9_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *sib9, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_9_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *sib9); - -/********************************************************************* - IE Name: System Information Block Type 10 - - Description: Contains an ETWS primary notification - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: System Information Block Type 11 - - Description: Contains an ETWS secondary notification - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: System Information Block Type 12 - - Description: Contains a CMAS notification - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -// Structs -// Functions -// FIXME - -/********************************************************************* - IE Name: System Information Block Type 13 - - Description: Contains the information required to acquire the - MBMS control information associated with one or more - MBSFN areas - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT mbsfn_area_info_list_r9[LIBLTE_RRC_MAX_MBSFN_AREAS]; - LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT mbsfn_notification_config; - uint8 mbsfn_area_info_list_r9_size; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_13_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_13_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13); - -/******************************************************************************* - MESSAGE DECLARATIONS -*******************************************************************************/ - -/********************************************************************* - Message Name: UL Information Transfer - - Description: Used for the uplink transfer dedicated NAS - information - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_NAS = 0, - LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_CDMA2000_1XRTT, - LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_CDMA2000_HRPD, - LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_N_ITEMS, -}LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_ENUM; -static const char liblte_rrc_ul_information_transfer_type_text[LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_N_ITEMS][20] = {"NAS", - "CDMA2000-1XRTT", - "CDMA2000-HRPD"}; -// Structs -typedef struct{ - LIBLTE_BYTE_MSG_STRUCT dedicated_info; - LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_ENUM dedicated_info_type; -}LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_information_transfer_msg(LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *ul_info_transfer, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_information_transfer_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *ul_info_transfer); - -/********************************************************************* - Message Name: UL Handover Preparation Transfer (CDMA2000) - - Description: Used for the uplink transfer of handover related - CDMA2000 information when requested by the higher - layers - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_UL_HANDOVER_PREPARATION_TRANSFER_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_handover_preparation_transfer_msg(LIBLTE_RRC_UL_HANDOVER_PREPARATION_TRANSFER_STRUCT *ul_handover_prep_transfer, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_handover_preparation_transfer_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_HANDOVER_PREPARATION_TRANSFER_STRUCT *ul_handover_prep_transfer); - -/********************************************************************* - Message Name: UE Information Response - - Description: Used by the UE to transfer the information requested - by the E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_UE_INFORMATION_RESPONSE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_information_response_msg(LIBLTE_RRC_UE_INFORMATION_RESPONSE_STRUCT *ue_info_resp, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_information_response_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_INFORMATION_RESPONSE_STRUCT *ue_info_resp); - -/********************************************************************* - Message Name: UE Information Request - - Description: Used by E-UTRAN to retrieve information from the UE - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; - bool rach_report_req; - bool rlf_report_req; -}LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_information_request_msg(LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT *ue_info_req, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_information_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT *ue_info_req); - -/********************************************************************* - Message Name: UE Capability Information - - Description: Used to transfer UE radio access capabilities - requested by the E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_RAT_CAPABILITIES 8 -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_RAT_TYPE_ENUM rat_type; - LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT eutra_capability; -}LIBLTE_RRC_UE_CAPABILITY_RAT_CONTAINER_STRUCT; - -typedef struct{ - uint8 rrc_transaction_id; - LIBLTE_RRC_UE_CAPABILITY_RAT_CONTAINER_STRUCT ue_capability_rat[LIBLTE_RRC_MAX_RAT_CAPABILITIES]; - uint32 N_ue_caps; -}LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_capability_information_msg(LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *ue_capability_info, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_capability_information_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *ue_capability_info); - -/********************************************************************* - Message Name: UE Capability Enquiry - - Description: Used to request the transfer of UE radio access - capabilities for E-UTRA as well as for other RATs - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; - LIBLTE_RRC_RAT_TYPE_ENUM ue_capability_request[LIBLTE_RRC_MAX_RAT_CAPABILITIES]; - uint32 N_ue_cap_reqs; - -}LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_capability_enquiry_msg(LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT *ue_cap_enquiry, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_capability_enquiry_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT *ue_cap_enquiry); - -/********************************************************************* - Message Name: System Information Block Type 1 - - Description: Contains information relevant when evaluating if a - UE is allowed to access a cell and defines the - scheduling of other system information - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_N_PLMN_IDENTITIES 6 -#define LIBLTE_RRC_MAX_SIB 32 -#define LIBLTE_RRC_MAX_SI_MESSAGE 32 -// Enums -typedef enum{ - LIBLTE_RRC_CELL_BARRED = 0, - LIBLTE_RRC_CELL_NOT_BARRED, - LIBLTE_RRC_CELL_BARRED_N_ITEMS, -}LIBLTE_RRC_CELL_BARRED_ENUM; -static const char liblte_rrc_cell_barred_text[LIBLTE_RRC_CELL_BARRED_N_ITEMS][20] = {"Barred", "Not Barred"}; -typedef enum{ - LIBLTE_RRC_INTRA_FREQ_RESELECTION_ALLOWED = 0, - LIBLTE_RRC_INTRA_FREQ_RESELECTION_NOT_ALLOWED, - LIBLTE_RRC_INTRA_FREQ_RESELECTION_N_ITEMS, -}LIBLTE_RRC_INTRA_FREQ_RESELECTION_ENUM; -static const char liblte_rrc_intra_freq_reselection_text[LIBLTE_RRC_INTRA_FREQ_RESELECTION_N_ITEMS][20] = {"Allowed", "Not Allowed"}; -typedef enum{ - LIBLTE_RRC_SI_WINDOW_LENGTH_MS1 = 0, - LIBLTE_RRC_SI_WINDOW_LENGTH_MS2, - LIBLTE_RRC_SI_WINDOW_LENGTH_MS5, - LIBLTE_RRC_SI_WINDOW_LENGTH_MS10, - LIBLTE_RRC_SI_WINDOW_LENGTH_MS15, - LIBLTE_RRC_SI_WINDOW_LENGTH_MS20, - LIBLTE_RRC_SI_WINDOW_LENGTH_MS40, - LIBLTE_RRC_SI_WINDOW_LENGTH_N_ITEMS, -}LIBLTE_RRC_SI_WINDOW_LENGTH_ENUM; -static const char liblte_rrc_si_window_length_text[LIBLTE_RRC_SI_WINDOW_LENGTH_N_ITEMS][20] = { "1", "2", "5", "10", - "15", "20", "40"}; -static const uint8 liblte_rrc_si_window_length_num[LIBLTE_RRC_SI_WINDOW_LENGTH_N_ITEMS] = {1, 2, 5, 10, 15, 20, 40}; -typedef enum{ - LIBLTE_RRC_RESV_FOR_OPER = 0, - LIBLTE_RRC_NOT_RESV_FOR_OPER, - LIBLTE_RRC_RESV_FOR_OPER_N_ITEMS, -}LIBLTE_RRC_RESV_FOR_OPER_ENUM; -static const char liblte_rrc_resv_for_oper_text[LIBLTE_RRC_RESV_FOR_OPER_N_ITEMS][20] = {"Reserved", "Not Reserved"}; -typedef enum{ - LIBLTE_RRC_SI_PERIODICITY_RF8 = 0, - LIBLTE_RRC_SI_PERIODICITY_RF16, - LIBLTE_RRC_SI_PERIODICITY_RF32, - LIBLTE_RRC_SI_PERIODICITY_RF64, - LIBLTE_RRC_SI_PERIODICITY_RF128, - LIBLTE_RRC_SI_PERIODICITY_RF256, - LIBLTE_RRC_SI_PERIODICITY_RF512, - LIBLTE_RRC_SI_PERIODICITY_N_ITEMS, -}LIBLTE_RRC_SI_PERIODICITY_ENUM; -static const char liblte_rrc_si_periodicity_text[LIBLTE_RRC_SI_PERIODICITY_N_ITEMS][20] = { "8", "16", "32", "64", - "128", "256", "512"}; -static const uint16 liblte_rrc_si_periodicity_num[LIBLTE_RRC_SI_PERIODICITY_N_ITEMS] = {8, 16, 32, 64, 128, 256, 512}; -typedef enum{ - LIBLTE_RRC_SIB_TYPE_3 = 0, - LIBLTE_RRC_SIB_TYPE_4, - LIBLTE_RRC_SIB_TYPE_5, - LIBLTE_RRC_SIB_TYPE_6, - LIBLTE_RRC_SIB_TYPE_7, - LIBLTE_RRC_SIB_TYPE_8, - LIBLTE_RRC_SIB_TYPE_9, - LIBLTE_RRC_SIB_TYPE_10, - LIBLTE_RRC_SIB_TYPE_11, - LIBLTE_RRC_SIB_TYPE_12_v920, - LIBLTE_RRC_SIB_TYPE_13_v920, - LIBLTE_RRC_SIB_TYPE_14_v1130, - LIBLTE_RRC_SIB_TYPE_15_v1130, - LIBLTE_RRC_SIB_TYPE_16_v1130, - LIBLTE_RRC_SIB_TYPE_17_v1250, - LIBLTE_RRC_SIB_TYPE_18_v1250, - LIBLTE_RRC_SIB_TYPE_N_ITEMS, -}LIBLTE_RRC_SIB_TYPE_ENUM; -static const char liblte_rrc_sib_type_text[LIBLTE_RRC_SIB_TYPE_N_ITEMS][20] = { "3", "4", "5", "6", - "7", "8", "9", "10", - "11", "12_v920", "13_v920", "14_v1130", - "15_v1130", "16_v1130", "17_v1250", "18_v1250"}; -static const uint8 liblte_rrc_sib_type_num[LIBLTE_RRC_SIB_TYPE_N_ITEMS] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}; -// Structs -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_STRUCT id; - LIBLTE_RRC_RESV_FOR_OPER_ENUM resv_for_oper; -}LIBLTE_RRC_PLMN_IDENTITY_LIST_STRUCT; -typedef struct{ - LIBLTE_RRC_SIB_TYPE_ENUM sib_type; -}LIBLTE_RRC_SIB_MAPPING_INFO_STRUCT; -typedef struct{ - LIBLTE_RRC_SIB_MAPPING_INFO_STRUCT sib_mapping_info[LIBLTE_RRC_MAX_SIB]; - LIBLTE_RRC_SI_PERIODICITY_ENUM si_periodicity; - uint32 N_sib_mapping_info; -}LIBLTE_RRC_SCHEDULING_INFO_STRUCT; -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_LIST_STRUCT plmn_id[LIBLTE_RRC_MAX_N_PLMN_IDENTITIES]; - LIBLTE_RRC_SCHEDULING_INFO_STRUCT sched_info[LIBLTE_RRC_MAX_SI_MESSAGE]; - LIBLTE_RRC_TDD_CONFIG_STRUCT tdd_cnfg; - LIBLTE_RRC_CELL_BARRED_ENUM cell_barred; - LIBLTE_RRC_INTRA_FREQ_RESELECTION_ENUM intra_freq_reselection; - LIBLTE_RRC_SI_WINDOW_LENGTH_ENUM si_window_length; - uint32 cell_id; - uint32 csg_id; - uint32 N_plmn_ids; - uint32 N_sched_info; - uint16 tracking_area_code; - int16 q_rx_lev_min; - uint8 csg_indication; - uint8 q_rx_lev_min_offset; - uint8 freq_band_indicator; - uint8 system_info_value_tag; - int8 p_max; - bool tdd; - bool p_max_present; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_1_msg(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_1_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1, - uint32 *N_bits_used); - -/********************************************************************* - Message Name: System Information - - Description: Conveys one or more System Information Blocks - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2 = 0, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_10, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_11, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_12, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_14, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_15, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_16, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_17, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_18, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1, // Intentionally not first - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_N_ITEMS, -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_ENUM; -static const char liblte_rrc_sys_info_block_type_text[LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_N_ITEMS][20] = { "2", "3", "4", "5", - "6", "7", "8", "9", - "10", "11", "12", "13", - "14", "15", "16", "17", - "18", "1"}; -static const uint8 liblte_rrc_sys_info_block_type_num[LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_N_ITEMS] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1}; -// Structs -typedef union{ - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT sib1; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT sib2; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT sib3; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT sib4; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT sib5; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT sib6; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT sib7; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT sib8; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT sib9; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT sib13; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_UNION; -typedef struct{ - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_UNION sib; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_ENUM sib_type; -}LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_STRUCT; -typedef struct{ - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_STRUCT sibs[LIBLTE_RRC_MAX_SIB]; - uint32 N_sibs; -}LIBLTE_RRC_SYS_INFO_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_msg(LIBLTE_RRC_SYS_INFO_MSG_STRUCT *sibs, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SYS_INFO_MSG_STRUCT *sibs); - -/********************************************************************* - Message Name: Security Mode Failure - - Description: Used to indicate an unsuccessful completion of a - security mode command - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; -}LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_mode_failure_msg(LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *security_mode_failure, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_mode_failure_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *security_mode_failure); - -/********************************************************************* - Message Name: Security Mode Complete - - Description: Used to confirm the successful completion of a - security mode command - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; -}LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_mode_complete_msg(LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *security_mode_complete, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_mode_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *security_mode_complete); - -/********************************************************************* - Message Name: Security Mode Command - - Description: Used to command the activation of AS security - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT sec_algs; - uint8 rrc_transaction_id; -}LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_mode_command_msg(LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT *security_mode_cmd, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_mode_command_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT *security_mode_cmd); - -/********************************************************************* - Message Name: RRC Connection Setup Complete - - Description: Used to confirm the successful completion of an RRC - connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id; - uint16 mmegi; - uint8 mmec; - bool plmn_id_present; -}LIBLTE_RRC_REGISTERED_MME_STRUCT; -typedef struct{ - LIBLTE_RRC_REGISTERED_MME_STRUCT registered_mme; - LIBLTE_BYTE_MSG_STRUCT dedicated_info_nas; - uint8 rrc_transaction_id; - uint8 selected_plmn_id; - bool registered_mme_present; -}LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_setup_complete_msg(LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *con_setup_complete, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_setup_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *con_setup_complete); - -/********************************************************************* - Message Name: RRC Connection Setup - - Description: Used to establish SRB1 - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT rr_cnfg; - uint8 rrc_transaction_id; -}LIBLTE_RRC_CONNECTION_SETUP_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_setup_msg(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *con_setup, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_setup_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_SETUP_STRUCT *con_setup); - -/********************************************************************* - Message Name: RRC Connection Request - - Description: Used to request the establishment of an RRC - connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_CON_REQ_UE_ID_TYPE_S_TMSI = 0, - LIBLTE_RRC_CON_REQ_UE_ID_TYPE_RANDOM_VALUE, - LIBLTE_RRC_CON_REQ_UE_ID_TYPE_N_ITEMS, -}LIBLTE_RRC_CON_REQ_UE_ID_TYPE_ENUM; -static const char liblte_rrc_con_req_ue_id_type_text[LIBLTE_RRC_CON_REQ_UE_ID_TYPE_N_ITEMS][20] = {"S-TMSI", - "Random Value"}; -typedef enum{ - LIBLTE_RRC_CON_REQ_EST_CAUSE_EMERGENCY = 0, - LIBLTE_RRC_CON_REQ_EST_CAUSE_HIGH_PRIO_ACCESS, - LIBLTE_RRC_CON_REQ_EST_CAUSE_MT_ACCESS, - LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_SIGNALLING, - LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_DATA, - LIBLTE_RRC_CON_REQ_EST_CAUSE_SPARE3, - LIBLTE_RRC_CON_REQ_EST_CAUSE_SPARE2, - LIBLTE_RRC_CON_REQ_EST_CAUSE_SPARE1, - LIBLTE_RRC_CON_REQ_EST_CAUSE_N_ITEMS, -}LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM; -static const char liblte_rrc_con_req_est_cause_text[LIBLTE_RRC_CON_REQ_EST_CAUSE_N_ITEMS][100] = {"Emergency", - "High Priority Access", - "MT Access", - "MO Signalling", - "MO Data", - "SPARE", - "SPARE", - "SPARE"}; -// Structs -typedef union{ - LIBLTE_RRC_S_TMSI_STRUCT s_tmsi; - uint64 random; -}LIBLTE_RRC_CON_REQ_UE_ID_UNION; -typedef struct{ - LIBLTE_RRC_CON_REQ_UE_ID_UNION ue_id; - LIBLTE_RRC_CON_REQ_UE_ID_TYPE_ENUM ue_id_type; - LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause; -}LIBLTE_RRC_CONNECTION_REQUEST_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_request_msg(LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *con_req, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *con_req); - -/********************************************************************* - Message Name: RRC Connection Release - - Description: Used to command the release of an RRC connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_RELEASE_CAUSE_LOAD_BALANCING_TAU_REQUIRED = 0, - LIBLTE_RRC_RELEASE_CAUSE_OTHER, - LIBLTE_RRC_RELEASE_CAUSE_CS_FALLBACK_HIGH_PRIORITY, - LIBLTE_RRC_RELEASE_CAUSE_SPARE1, - LIBLTE_RRC_RELEASE_CAUSE_N_ITEMS, -}LIBLTE_RRC_RELEASE_CAUSE_ENUM; -static const char liblte_rrc_release_cause_text[LIBLTE_RRC_RELEASE_CAUSE_N_ITEMS][100] = {"Load Balancing TAU Required", - "Other", - "CS Fallback High Priority", - "SPARE"}; -// Structs -typedef struct{ - LIBLTE_RRC_RELEASE_CAUSE_ENUM release_cause; - uint8 rrc_transaction_id; -}LIBLTE_RRC_CONNECTION_RELEASE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_release_msg(LIBLTE_RRC_CONNECTION_RELEASE_STRUCT *con_release, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_release_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_RELEASE_STRUCT *con_release); - -/********************************************************************* - Message Name: RRC Connection Reject - - Description: Used to reject the RRC connection establishment - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 wait_time; -}LIBLTE_RRC_CONNECTION_REJECT_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reject_msg(LIBLTE_RRC_CONNECTION_REJECT_STRUCT *con_rej, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reject_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REJECT_STRUCT *con_rej); - -/********************************************************************* - Message Name: RRC Connection Reestablishment Request - - Description: Used to request the reestablishment of an RRC - connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_CON_REEST_REQ_CAUSE_RECONFIG_FAILURE = 0, - LIBLTE_RRC_CON_REEST_REQ_CAUSE_HANDOVER_FAILURE, - LIBLTE_RRC_CON_REEST_REQ_CAUSE_OTHER_FAILURE, - LIBLTE_RRC_CON_REEST_REQ_CAUSE_SPARE1, - LIBLTE_RRC_CON_REEST_REQ_CAUSE_N_ITEMS, -}LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM; -static const char liblte_rrc_con_reest_req_cause_text[LIBLTE_RRC_CON_REEST_REQ_CAUSE_N_ITEMS][100] = {"Reconfiguration Failure", - "Handover Failure", - "Other Failure", - "SPARE"}; -// Structs -typedef struct{ - uint16 c_rnti; - uint16 phys_cell_id; - uint16 short_mac_i; -}LIBLTE_RRC_CON_REEST_REQ_UE_ID_STRUCT; -typedef struct{ - LIBLTE_RRC_CON_REEST_REQ_UE_ID_STRUCT ue_id; - LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause; -}LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_request_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *con_reest_req, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *con_reest_req); - -/********************************************************************* - Message Name: RRC Connection Reestablishment Reject - - Description: Used to indicate the rejection of an RRC connection - reestablishment request - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ -}LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_reject_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT *con_reest_rej, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_reject_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT *con_reest_rej); - -/********************************************************************* - Message Name: RRC Connection Reestablishment Complete - - Description: Used to confirm the successful completion of an RRC - connection reestablishment - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; -}LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_complete_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT *con_reest_complete, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT *con_reest_complete); - -/********************************************************************* - Message Name: RRC Connection Reestablishment - - Description: Used to resolve contention and to re-establish SRB1 - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT rr_cnfg; - uint8 rrc_transaction_id; - uint8 next_hop_chaining_count; -}LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *con_reest, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *con_reest); - -/********************************************************************* - Message Name: RRC Connection Reconfiguration Complete - - Description: Used to confirm the successful completion of an RRC - connection reconfiguration - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; -}LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reconfiguration_complete_msg(LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *con_reconfig_complete, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reconfiguration_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *con_reconfig_complete); - -/********************************************************************* - Message Name: RRC Connection Reconfiguration - - Description: Modifies an RRC connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_HANDOVER_TYPE_INTRA_LTE = 0, - LIBLTE_RRC_HANDOVER_TYPE_INTER_RAT, - LIBLTE_RRC_HANDOVER_TYPE_N_ITEMS, -}LIBLTE_RRC_HANDOVER_TYPE_ENUM; -static const char liblte_rrc_handover_type_text[LIBLTE_RRC_HANDOVER_TYPE_N_ITEMS][20] = {"Intra LTE", - "Inter RAT"}; -// Structs -typedef struct{ - LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT sec_alg_cnfg; - uint8 next_hop_chaining_count; - bool key_change_ind; - bool sec_alg_cnfg_present; -}LIBLTE_RRC_INTRA_LTE_HANDOVER_STRUCT; -typedef struct{ - LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT sec_alg_cnfg; - uint8 nas_sec_param_to_eutra[6]; -}LIBLTE_RRC_INTER_RAT_HANDOVER_STRUCT; -typedef struct{ - LIBLTE_RRC_INTRA_LTE_HANDOVER_STRUCT intra_lte; - LIBLTE_RRC_INTER_RAT_HANDOVER_STRUCT inter_rat; - LIBLTE_RRC_HANDOVER_TYPE_ENUM ho_type; -}LIBLTE_RRC_SECURITY_CONFIG_HO_STRUCT; -typedef struct{ - LIBLTE_RRC_MEAS_CONFIG_STRUCT meas_cnfg; - LIBLTE_RRC_MOBILITY_CONTROL_INFO_STRUCT mob_ctrl_info; - LIBLTE_BYTE_MSG_STRUCT ded_info_nas_list[LIBLTE_RRC_MAX_DRB]; - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT rr_cnfg_ded; - LIBLTE_RRC_SECURITY_CONFIG_HO_STRUCT sec_cnfg_ho; - uint32 N_ded_info_nas; - uint8 rrc_transaction_id; - bool meas_cnfg_present; - bool mob_ctrl_info_present; - bool rr_cnfg_ded_present; - bool sec_cnfg_ho_present; -}LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reconfiguration_msg(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *con_reconfig, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reconfiguration_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *con_reconfig); - -/********************************************************************* - Message Name: RN Reconfiguration Complete - - Description: Used to confirm the successful completion of an RN - reconfiguration - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - uint8 rrc_transaction_id; -}LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rn_reconfiguration_complete_msg(LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT *rn_reconfig_complete, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rn_reconfiguration_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT *rn_reconfig_complete); - -/********************************************************************* - Message Name: RN Reconfiguration - - Description: Modifies the RRC connection between the RN and the - E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_RN_RECONFIGURATION_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_rn_reconfiguration_msg(LIBLTE_RRC_RN_RECONFIGURATION_STRUCT *rn_reconfig, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rn_reconfiguration_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_RN_RECONFIGURATION_STRUCT *rn_reconfig); - -/********************************************************************* - Message Name: Proximity Indication - - Description: Used to indicate that the UE is entering or leaving - the proximity of one or more cells whose CSG IDs are - in the UEs CSG whitelist - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_ENTERING = 0, - LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_LEAVING, - LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_N_ITEMS, -}LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_ENUM; -static const char liblte_rrc_proximity_indication_type_text[LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_N_ITEMS][20] = {"Entering", "Leaving"}; -typedef enum{ - LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_EUTRA = 0, - LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_UTRA, - LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_N_ITEMS, -}LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_ENUM; -static const char liblte_rrc_proximity_indication_carrier_freq_type_text[LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_N_ITEMS][20] = {"EUTRA", "UTRA"}; -// Structs -typedef struct{ - LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_ENUM type; - LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_ENUM carrier_freq_type; - uint16 carrier_freq; -}LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_proximity_indication_msg(LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT *proximity_ind, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_proximity_indication_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT *proximity_ind); - -/********************************************************************* - Message Name: Paging - - Description: Used for the notification of one or more UEs - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_PAGE_REC 16 -// Enums -typedef enum{ - LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_S_TMSI = 0, - LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_IMSI, - LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_N_ITEMS, -}LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_ENUM; -static const char liblte_rrc_paging_ue_identity_type_text[LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_N_ITEMS][20] = {"S-TMSI", "IMSI"}; -typedef enum{ - LIBLTE_RRC_CN_DOMAIN_PS = 0, - LIBLTE_RRC_CN_DOMAIN_CS, - LIBLTE_RRC_CN_DOMAIN_N_ITEMS, -}LIBLTE_RRC_CN_DOMAIN_ENUM; -static const char liblte_rrc_cn_domain_text[LIBLTE_RRC_CN_DOMAIN_N_ITEMS][20] = {"PS", "CS"}; -typedef enum{ - LIBLTE_RRC_CMAS_INDICATION_R9_TRUE = 0, - LIBLTE_RRC_CMAS_INDICATION_R9_N_ITEMS, -}LIBLTE_RRC_CMAS_INDICATION_R9_ENUM; -static const char liblte_rrc_cmas_indication_r9_text[LIBLTE_RRC_CMAS_INDICATION_R9_N_ITEMS][20] = {"TRUE"}; -typedef enum{ - LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_TRUE = 0, - LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_N_ITEMS, -}LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_ENUM; -static const char liblte_rrc_system_info_modification_text[LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_N_ITEMS][20] = {"TRUE"}; -typedef enum{ - LIBLTE_RRC_ETWS_INDICATION_TRUE = 0, - LIBLTE_RRC_ETWS_INDICATION_N_ITEMS, -}LIBLTE_RRC_ETWS_INDICATION_ENUM; -static const char liblte_rrc_etws_indication_text[LIBLTE_RRC_ETWS_INDICATION_N_ITEMS][20] = {"TRUE"}; -// Structs -typedef struct{ - LIBLTE_RRC_S_TMSI_STRUCT s_tmsi; - LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_ENUM ue_identity_type; - uint32 imsi_size; - uint8 imsi[21]; -}LIBLTE_RRC_PAGING_UE_IDENTITY_STRUCT; -typedef struct{ - LIBLTE_RRC_PAGING_UE_IDENTITY_STRUCT ue_identity; - LIBLTE_RRC_CN_DOMAIN_ENUM cn_domain; -}LIBLTE_RRC_PAGING_RECORD_STRUCT; -typedef struct{ - LIBLTE_RRC_CMAS_INDICATION_R9_ENUM cmas_ind_r9; - bool cmas_ind_present; - bool non_crit_ext_present; -}LIBLTE_RRC_PAGING_V920_IES_STRUCT; -typedef struct{ - LIBLTE_RRC_PAGING_V920_IES_STRUCT non_crit_ext; - uint8 late_non_crit_ext; - bool late_non_crit_ext_present; - bool non_crit_ext_present; -}LIBLTE_RRC_PAGING_V890_IES_STRUCT; -typedef struct{ - LIBLTE_RRC_PAGING_RECORD_STRUCT paging_record_list[LIBLTE_RRC_MAX_PAGE_REC]; - LIBLTE_RRC_PAGING_V890_IES_STRUCT non_crit_ext; - LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_ENUM system_info_modification; - LIBLTE_RRC_ETWS_INDICATION_ENUM etws_indication; - uint32 paging_record_list_size; - bool system_info_modification_present; - bool etws_indication_present; - bool non_crit_ext_present; -}LIBLTE_RRC_PAGING_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_paging_msg(LIBLTE_RRC_PAGING_STRUCT *page, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_paging_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_PAGING_STRUCT *page); - -/********************************************************************* - Message Name: Mobility From EUTRA Command - - Description: Used to command handover or a cell change from E-UTRA - to another RAT, or enhanced CS fallback to CDMA2000 - 1xRTT - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_MOBILITY_FROM_EUTRA_COMMAND_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mobility_from_eutra_command_msg(LIBLTE_RRC_MOBILITY_FROM_EUTRA_COMMAND_STRUCT *mobility_from_eutra_cmd, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mobility_from_eutra_command_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MOBILITY_FROM_EUTRA_COMMAND_STRUCT *mobility_from_eutra_cmd); - -/********************************************************************* - Message Name: Measurement Report - - Description: Used for the indication of measurement results - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -typedef struct{ - LIBLTE_RRC_CELL_GLOBAL_ID_EUTRA_STRUCT cell_global_id; - uint16 tracking_area_code; - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_identity_list[5]; - uint32 n_plmn_identity_list; - bool have_plmn_identity_list; -}LIBLTE_RRC_CGI_INFO_STRUCT; -LIBLTE_ERROR_ENUM liblte_rrc_pack_cgi_info_ie(LIBLTE_RRC_CGI_INFO_STRUCT *cgi_info, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cgi_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_CGI_INFO_STRUCT *cgi_info); - -typedef struct{ - uint8 rsrp_result; - bool have_rsrp; - uint8 rsrq_result; - bool have_rsrq; -}LIBLTE_RRC_MEAS_RESULT_STRUCT; -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_result_ie(LIBLTE_RRC_MEAS_RESULT_STRUCT *meas_result, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_result_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_RESULT_STRUCT *meas_result); - -typedef struct{ - uint16 phys_cell_id; - LIBLTE_RRC_CGI_INFO_STRUCT cgi_info; - bool have_cgi_info; - LIBLTE_RRC_MEAS_RESULT_STRUCT meas_result; -}LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT; -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_result_eutra_ie(LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT *meas_result_eutra, - uint8 **ie_ptr); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_result_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT *meas_result_eutra); - -typedef struct{ - //FIXME -}LIBLTE_RRC_MEAS_RESULT_UTRA_STRUCT; -typedef struct{ - //FIXME -}LIBLTE_RRC_MEAS_RESULT_GERAN_STRUCT; -typedef struct{ - //FIXME -}LIBLTE_RRC_MEAS_RESULT_CDMA2000_STRUCT; - - - -typedef struct{ - LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT result_eutra_list[8]; - uint8 n_result; -}LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA_STRUCT; - -typedef struct{ - LIBLTE_RRC_MEAS_RESULT_UTRA_STRUCT result_utra_list[8]; - uint8 n_result; -}LIBLTE_RRC_MEAS_RESULT_LIST_UTRA_STRUCT; - -typedef struct{ - LIBLTE_RRC_MEAS_RESULT_GERAN_STRUCT result_geran_list[8]; - uint8 n_result; -}LIBLTE_RRC_MEAS_RESULT_LIST_GERAN_STRUCT; - - -typedef struct{ - bool pre_registration_status_HRPD; - LIBLTE_RRC_MEAS_RESULT_CDMA2000_STRUCT cdma2000[8]; -}LIBLTE_RRC_MEAS_RESULTS_CDMA2000_STRUCT; - -typedef enum{ - LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA = 0, - LIBLTE_RRC_MEAS_RESULT_LIST_UTRA, - LIBLTE_RRC_MEAS_RESULT_LIST_GERAN, - LIBLTE_RRC_MEAS_RESULTS_CDMA2000, - LIBLTE_RRC_MEAS_RESULT_N_ITEMS, -}LIBLTE_RRC_MEAS_RESULT_NEIGH_CELLS_ENUM; -static const char liblte_rrc_meas_reult_neigh_cells_text[LIBLTE_RRC_MEAS_RESULT_N_ITEMS][32] = { "measResultListEUTRA", "measResultListUTRA", "measResultListGERAN", "measResultsCDMA2000"}; - - -typedef union{ - LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA_STRUCT eutra; - LIBLTE_RRC_MEAS_RESULT_LIST_UTRA_STRUCT utra; - LIBLTE_RRC_MEAS_RESULT_LIST_GERAN_STRUCT geran; - LIBLTE_RRC_MEAS_RESULTS_CDMA2000_STRUCT cdma2000; -}LIBLTE_RRC_MEAS_RESULT_NEIGH_CELLS_UNION; - -//TODO: pack/unpack for the result lists - - -// Structs -typedef struct{ - uint8 meas_id; - uint8 pcell_rsrp_result; - uint8 pcell_rsrq_result; - - LIBLTE_RRC_MEAS_RESULT_NEIGH_CELLS_UNION meas_result_neigh_cells; - LIBLTE_RRC_MEAS_RESULT_NEIGH_CELLS_ENUM meas_result_neigh_cells_choice; - bool have_meas_result_neigh_cells; -}LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_measurement_report_msg(LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *meas_report, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_measurement_report_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *meas_report); - -/********************************************************************* - Message Name: MBSFN Area Configuration - - Description: Contains the MBMS control information applicable for - an MBSFN area - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -#define LIBLTE_RRC_MAX_PMCH_PER_MBSFN 15 - -// Enums -typedef enum{ - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF4 = 0, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF8, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF16, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF32, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF64, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF128, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF256, - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_N_ITEMS, -}LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_ENUM; -static const char liblte_rrc_mbsfn_common_sf_alloc_period_r9_text[LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_N_ITEMS][20] = {"4", "8", "16", "32", - "64", "128", "256"}; -static const uint32 liblte_rrc_mbsfn_common_sf_alloc_period_r9_num[LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_N_ITEMS] = {4, 8, 16, 32, - 64, 128, 256}; -// Structs -typedef struct{ - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT commonsf_allocpatternlist_r9[LIBLTE_RRC_MAX_MBSFN_ALLOCATIONS]; - uint8 commonsf_allocpatternlist_r9_size; - LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_ENUM commonsf_allocperiod_r9; - LIBLTE_RRC_PMCH_INFO_R9_STRUCT pmch_infolist_r9[LIBLTE_RRC_MAX_PMCH_PER_MBSFN]; - uint8 pmch_infolist_r9_size; -}LIBLTE_RRC_MBSFN_AREA_CONFIGURATION_R9_STRUCT; - -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_area_configuration_r9_msg(LIBLTE_RRC_MBSFN_AREA_CONFIGURATION_R9_STRUCT *mbsfn_area_cnfg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_area_configuration_r9_msg(LIBLTE_RRC_MBSFN_AREA_CONFIGURATION_R9_STRUCT *msg, - LIBLTE_RRC_PAGING_STRUCT *mbsfn_area_cnfg); - -/********************************************************************* - Message Name: Master Information Block - - Description: Includes the system information transmitted on BCH - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Inlined with BCCH BCH Message - -/********************************************************************* - Message Name: Logged Measurements Configuration - - Description: Used by E-UTRAN to configure the UE to perform - logging of measurement results while in RRC_IDLE - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_LOGGED_MEASUREMENTS_CONFIGURATION_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_logged_measurements_configuration_msg(LIBLTE_RRC_LOGGED_MEASUREMENTS_CONFIGURATION_STRUCT *logged_measurements_config, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_logged_measurements_configuration_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_LOGGED_MEASUREMENTS_CONFIGURATION_STRUCT *logged_measurements_config); - -/********************************************************************* - Message Name: Handover From EUTRA Preparation Request (CDMA2000) - - Description: Used to trigger the handover preparation procedure - with a CDMA2000 RAT - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_HANDOVER_FROM_EUTRA_PREPARATION_REQUEST_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_handover_from_eutra_preparation_request_msg(LIBLTE_RRC_HANDOVER_FROM_EUTRA_PREPARATION_REQUEST_STRUCT *handover_from_eutra_prep_req, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_handover_from_eutra_preparation_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_HANDOVER_FROM_EUTRA_PREPARATION_REQUEST_STRUCT *handover_from_eutra_prep_req); - -/********************************************************************* - Message Name: DL Information Transfer - - Description: Used for the downlink transfer of dedicated NAS - information - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_NAS = 0, - LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_CDMA2000_1XRTT, - LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_CDMA2000_HRPD, - LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_N_ITEMS, -}LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_ENUM; -static const char liblte_rrc_dl_information_transfer_type_text[LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_N_ITEMS][20] = {"NAS", - "CDMA2000-1XRTT", - "CDMA2000-HRPD"}; -// Structs -typedef struct{ - LIBLTE_BYTE_MSG_STRUCT dedicated_info; - LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_ENUM dedicated_info_type; - uint8 rrc_transaction_id; -}LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_dl_information_transfer_msg(LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT *dl_info_transfer, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dl_information_transfer_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT *dl_info_transfer); - -/********************************************************************* - Message Name: CSFB Parameters Response CDMA2000 - - Description: Used to provide the CDMA2000 1xRTT parameters to the - UE so the UE can register with the CDMA2000 1xRTT - network to support CSFB to CDMA2000 1xRTT - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_CSFB_PARAMETERS_RESPONSE_CDMA2000_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_parameters_response_cdma2000_msg(LIBLTE_RRC_CSFB_PARAMETERS_RESPONSE_CDMA2000_STRUCT *csfb_params_resp_cdma2000, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_parameters_response_cdma2000_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CSFB_PARAMETERS_RESPONSE_CDMA2000_STRUCT *csfb_params_resp_cdma2000); - -/********************************************************************* - Message Name: CSFB Parameters Request CDMA2000 - - Description: Used by the UE to obtain the CDMA2000 1xRTT - parameters from the network - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ -}LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_parameters_request_cdma2000_msg(LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT *csfb_params_req_cdma2000, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_parameters_request_cdma2000_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT *csfb_params_req_cdma2000); - -/********************************************************************* - Message Name: Counter Check Response - - Description: Used by the UE to respond to a Counter Check message - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_COUNTER_CHECK_RESPONSE_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_counter_check_response_msg(LIBLTE_RRC_COUNTER_CHECK_RESPONSE_STRUCT *counter_check_resp, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_counter_check_response_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_COUNTER_CHECK_RESPONSE_STRUCT *counter_check_resp); - -/********************************************************************* - Message Name: Counter Check - - Description: Used by the E-UTRAN to indicate the current COUNT MSB - values associated to each DRB and to request the UE - to compare these to its COUNT MSB values and to - report the comparison results to E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef struct{ - // FIXME -}LIBLTE_RRC_COUNTER_CHECK_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_counter_check_msg(LIBLTE_RRC_COUNTER_CHECK_STRUCT *counter_check, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_counter_check_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_COUNTER_CHECK_STRUCT *counter_check); - -/********************************************************************* - Message Name: BCCH BCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE via BCH on the BCCH - logical channel - - Document Reference: 36.331 v10.0.0 Sections 6.2.1 and 6.2.2 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_DL_BANDWIDTH_6 = 0, - LIBLTE_RRC_DL_BANDWIDTH_15, - LIBLTE_RRC_DL_BANDWIDTH_25, - LIBLTE_RRC_DL_BANDWIDTH_50, - LIBLTE_RRC_DL_BANDWIDTH_75, - LIBLTE_RRC_DL_BANDWIDTH_100, - LIBLTE_RRC_DL_BANDWIDTH_N_ITEMS, -}LIBLTE_RRC_DL_BANDWIDTH_ENUM; -static const char liblte_rrc_dl_bandwidth_text[LIBLTE_RRC_DL_BANDWIDTH_N_ITEMS][20] = {"1.4", "3", "5", "10", - "15", "20"}; -static const double liblte_rrc_dl_bandwidth_num[LIBLTE_RRC_DL_BANDWIDTH_N_ITEMS] = {1.4, 3, 5, 10, 15, 20}; -// Structs -typedef struct{ - LIBLTE_RRC_PHICH_CONFIG_STRUCT phich_config; - LIBLTE_RRC_DL_BANDWIDTH_ENUM dl_bw; - uint8 sfn_div_4; -}LIBLTE_RRC_MIB_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_bcch_bch_msg(LIBLTE_RRC_MIB_STRUCT *mib, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_bcch_bch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MIB_STRUCT *mib); - -/********************************************************************* - Message Name: BCCH DLSCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE via DLSCH on the BCCH - logical channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef LIBLTE_RRC_SYS_INFO_MSG_STRUCT LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_bcch_dlsch_msg(LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT *bcch_dlsch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_bcch_dlsch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT *bcch_dlsch_msg); - -/********************************************************************* - Message Name: MCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the MCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef LIBLTE_RRC_MBSFN_AREA_CONFIGURATION_R9_STRUCT LIBLTE_RRC_MCCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_mcch_msg(LIBLTE_RRC_MCCH_MSG_STRUCT *mcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MCCH_MSG_STRUCT *mcch_msg); - -/********************************************************************* - Message Name: PCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the PCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -// Structs -typedef LIBLTE_RRC_PAGING_STRUCT LIBLTE_RRC_PCCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_pcch_msg(LIBLTE_RRC_PCCH_MSG_STRUCT *pcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_PCCH_MSG_STRUCT *pcch_msg); - -/********************************************************************* - Message Name: DL CCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the CCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST = 0, - LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST_REJ, - LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REJ, - LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_SETUP, - LIBLTE_RRC_DL_CCCH_MSG_TYPE_N_ITEMS, -}LIBLTE_RRC_DL_CCCH_MSG_TYPE_ENUM; -static const char liblte_rrc_dl_ccch_msg_type_text[LIBLTE_RRC_DL_CCCH_MSG_TYPE_N_ITEMS][100] = {"RRC Connection Reestablishment", - "RRC Connection Reestablishment Reject", - "RRC Connection Reject", - "RRC Connection Setup"}; -// Structs -typedef union{ - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT rrc_con_reest; - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT rrc_con_reest_rej; - LIBLTE_RRC_CONNECTION_REJECT_STRUCT rrc_con_rej; - LIBLTE_RRC_CONNECTION_SETUP_STRUCT rrc_con_setup; -}LIBLTE_RRC_DL_CCCH_MSG_TYPE_UNION; -typedef struct{ - LIBLTE_RRC_DL_CCCH_MSG_TYPE_UNION msg; - LIBLTE_RRC_DL_CCCH_MSG_TYPE_ENUM msg_type; -}LIBLTE_RRC_DL_CCCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_dl_ccch_msg(LIBLTE_RRC_DL_CCCH_MSG_STRUCT *dl_ccch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dl_ccch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_DL_CCCH_MSG_STRUCT *dl_ccch_msg); - -/********************************************************************* - Message Name: DL DCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the DCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_DL_DCCH_MSG_TYPE_CSFB_PARAMS_RESP_CDMA2000 = 0, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_DL_INFO_TRANSFER, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_HANDOVER_FROM_EUTRA_PREP_REQ, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_MOBILITY_FROM_EUTRA_COMMAND, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RELEASE, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_SECURITY_MODE_COMMAND, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_CAPABILITY_ENQUIRY, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_COUNTER_CHECK, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_INFO_REQ, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_LOGGED_MEASUREMENTS_CONFIG, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_RN_RECONFIG, - LIBLTE_RRC_DL_DCCH_MSG_TYPE_N_ITEMS, -}LIBLTE_RRC_DL_DCCH_MSG_TYPE_ENUM; -static const char liblte_rrc_dl_dcch_msg_type_text[LIBLTE_RRC_DL_DCCH_MSG_TYPE_N_ITEMS][100] = {"CSFB Parameters Response CDMA2000", - "DL Information Transfer", - "Handover From EUTRA Preparation Request", - "Mobility From EUTRA Command", - "RRC Connection Reconfiguration", - "RRC Connection Release", - "Security Mode Command", - "UE Capability Enquiry", - "Counter Check", - "UE Information Request", - "Logged Measurements Configuration", - "RN Reconfiguration"}; -// Structs -typedef union{ - LIBLTE_RRC_CSFB_PARAMETERS_RESPONSE_CDMA2000_STRUCT csfb_params_resp_cdma2000; - LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT dl_info_transfer; - LIBLTE_RRC_HANDOVER_FROM_EUTRA_PREPARATION_REQUEST_STRUCT handover_from_eutra_prep_req; - LIBLTE_RRC_MOBILITY_FROM_EUTRA_COMMAND_STRUCT mobility_from_eutra_cmd; - LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT rrc_con_reconfig; - LIBLTE_RRC_CONNECTION_RELEASE_STRUCT rrc_con_release; - LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT security_mode_cmd; - LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT ue_cap_enquiry; - LIBLTE_RRC_COUNTER_CHECK_STRUCT counter_check; - LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT ue_info_req; - LIBLTE_RRC_LOGGED_MEASUREMENTS_CONFIGURATION_STRUCT logged_measurements_config; - LIBLTE_RRC_RN_RECONFIGURATION_STRUCT rn_reconfig; -}LIBLTE_RRC_DL_DCCH_MSG_TYPE_UNION; -typedef struct{ - LIBLTE_RRC_DL_DCCH_MSG_TYPE_UNION msg; - LIBLTE_RRC_DL_DCCH_MSG_TYPE_ENUM msg_type; -}LIBLTE_RRC_DL_DCCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_dl_dcch_msg(LIBLTE_RRC_DL_DCCH_MSG_STRUCT *dl_dcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dl_dcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_DL_DCCH_MSG_STRUCT *dl_dcch_msg); - -/********************************************************************* - Message Name: UL CCCH Message - - Description: Contains the set of RRC messages that may be sent - from the UE to the E-UTRAN on the CCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ = 0, - LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ, - LIBLTE_RRC_UL_CCCH_MSG_TYPE_N_ITEMS, -}LIBLTE_RRC_UL_CCCH_MSG_TYPE_ENUM; -static const char liblte_rrc_ul_ccch_msg_type_text[LIBLTE_RRC_UL_CCCH_MSG_TYPE_N_ITEMS][100] = {"RRC Connection Reestablishment Request", - "RRC Connection Request"}; -// Structs -typedef union{ - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT rrc_con_reest_req; - LIBLTE_RRC_CONNECTION_REQUEST_STRUCT rrc_con_req; -}LIBLTE_RRC_UL_CCCH_MSG_TYPE_UNION; -typedef struct{ - LIBLTE_RRC_UL_CCCH_MSG_TYPE_UNION msg; - LIBLTE_RRC_UL_CCCH_MSG_TYPE_ENUM msg_type; -}LIBLTE_RRC_UL_CCCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_ccch_msg(LIBLTE_RRC_UL_CCCH_MSG_STRUCT *ul_ccch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_ccch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_CCCH_MSG_STRUCT *ul_ccch_msg); - -/********************************************************************* - Message Name: UL DCCH Message - - Description: Contains the set of RRC messages that may be sent - from the UE to the E-UTRAN on the DCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -// Defines -// Enums -typedef enum{ - LIBLTE_RRC_UL_DCCH_MSG_TYPE_CSFB_PARAMS_REQ_CDMA2000 = 0, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_MEASUREMENT_REPORT, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_RECONFIG_COMPLETE, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_REEST_COMPLETE, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_SETUP_COMPLETE, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_COMPLETE, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_FAILURE, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_CAPABILITY_INFO, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_HANDOVER_PREP_TRANSFER, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_INFO_TRANSFER, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_COUNTER_CHECK_RESP, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_INFO_RESP, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_PROXIMITY_IND, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_RN_RECONFIG_COMPLETE, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_SPARE2, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_SPARE1, - LIBLTE_RRC_UL_DCCH_MSG_TYPE_N_ITEMS, -}LIBLTE_RRC_UL_DCCH_MSG_TYPE_ENUM; -static const char liblte_rrc_ul_dcch_msg_type_text[LIBLTE_RRC_UL_DCCH_MSG_TYPE_N_ITEMS][100] = {"CSFB Parameters Request CDMA2000", - "Measurement Report", - "RRC Connection Reconfiguration Complete", - "RRC Connection Reestablishment Complete", - "RRC Connection Setup Complete", - "Security Mode Complete", - "Security Mode Failure", - "UE Capability Information", - "UL Handover Preparation Transfer", - "UL Information Transfer", - "Counter Check Response", - "UE Information Response", - "Proximity Indication", - "RN Reconfiguration Complete", - "SPARE", - "SPARE"}; -// Structs -typedef union{ - LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT csfb_params_req_cdma2000; - LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT measurement_report; - LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT rrc_con_reconfig_complete; - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT rrc_con_reest_complete; - LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT rrc_con_setup_complete; - LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT security_mode_complete; - LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT security_mode_failure; - LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT ue_capability_info; - LIBLTE_RRC_UL_HANDOVER_PREPARATION_TRANSFER_STRUCT ul_handover_prep_transfer; - LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT ul_info_transfer; - LIBLTE_RRC_COUNTER_CHECK_RESPONSE_STRUCT counter_check_resp; - LIBLTE_RRC_UE_INFORMATION_RESPONSE_STRUCT ue_info_resp; - LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT proximity_ind; - LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT rn_reconfig_complete; -}LIBLTE_RRC_UL_DCCH_MSG_TYPE_UNION; -typedef struct{ - LIBLTE_RRC_UL_DCCH_MSG_TYPE_UNION msg; - LIBLTE_RRC_UL_DCCH_MSG_TYPE_ENUM msg_type; -}LIBLTE_RRC_UL_DCCH_MSG_STRUCT; -// Functions -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_dcch_msg(LIBLTE_RRC_UL_DCCH_MSG_STRUCT *ul_dcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg); -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_dcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_DCCH_MSG_STRUCT *ul_dcch_msg); - -#endif // SRSLTE_LIBLTE_RRC_H diff --git a/lib/include/srslte/asn1/rrc_asn1.h b/lib/include/srslte/asn1/rrc_asn1.h new file mode 100644 index 000000000..9d3c3274a --- /dev/null +++ b/lib/include/srslte/asn1/rrc_asn1.h @@ -0,0 +1,64214 @@ +/* +Copyright 2013-2017 Software Radio Systems Limited + +This file is part of srsLTE + +srsASN1 is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +srsASN1 is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +A copy of the GNU Affero General Public License can be found in +the LICENSE file in the top-level directory of this distribution +and at http://www.gnu.org/licenses/. +*/ + +#ifndef SRSASN1_RRC_H +#define SRSASN1_RRC_H + +#include "asn1_utils.h" +#include +#include + +namespace asn1 { +namespace rrc { + +/******************************************************************************* +/* Functions for external logging +/******************************************************************************/ + +static log_handler_t log_handler; +static void* callback_ctx = NULL; + +inline void rrc_log_register_handler(void* ctx, log_handler_t handler) +{ + log_handler = handler; + callback_ctx = ctx; +} + +inline void rrc_log_print(srsasn_logger_level_t log_level, const char* format, ...) +{ + va_list args; + va_start(args, format); + vlog_print(log_handler, callback_ctx, log_level, format, args); + va_end(args); +} + +inline void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) +{ + rrc_log_print(LOG_LEVEL_ERROR, "The access choice id is invalid (%d!=%d)\n", val, choice_id); +} + +inline void assert_choice_type(uint32_t val, uint32_t choice_id) +{ + if (val != choice_id) { + log_invalid_access_choice_id(val, choice_id); + } +} + +inline void assert_choice_type(const std::string& access_type, const std::string& current_type, + const std::string& choice_type) +{ + if (access_type != current_type) { + rrc_log_print(LOG_LEVEL_ERROR, "Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", + choice_type.c_str(), access_type.c_str(), current_type.c_str()); + } +} + +template +inline NumType get_enum_number(NumType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) +{ + if (enum_val >= nof_types) { + rrc_log_print(LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be translated into a number\n", + enum_val, enum_type); + return 0; + } + return array[enum_val]; +} + +/******************************************************************************* +/* Constant Definitions +/******************************************************************************/ + +#define ASN1_RRC_MAX_ACCESS_CAT_MINUS1_R15 63 +#define ASN1_RRC_MAX_ACDC_CAT_R13 16 +#define ASN1_RRC_MAX_AVAIL_NARROW_BANDS_R13 16 +#define ASN1_RRC_MAX_BAND_COMB_R10 128 +#define ASN1_RRC_MAX_BAND_COMB_R11 256 +#define ASN1_RRC_MAX_BAND_COMB_R13 384 +#define ASN1_RRC_MAX_BANDS 64 +#define ASN1_RRC_MAX_BANDS_NR_R15 1024 +#define ASN1_RRC_MAX_BW_CLASS_R10 16 +#define ASN1_RRC_MAX_BW_COMB_SET_R10 32 +#define ASN1_RRC_MAX_BARR_INFO_SET_R15 8 +#define ASN1_RRC_MAX_BT_ID_REPORT_R15 32 +#define ASN1_RRC_MAX_BT_NAME_R15 4 +#define ASN1_RRC_MAX_CBR_LEVEL_R14 16 +#define ASN1_RRC_MAX_CBR_LEVEL_MINUS1_R14 15 +#define ASN1_RRC_MAX_CBR_REPORT_R14 72 +#define ASN1_RRC_MAX_CDMA_BAND_CLASS 32 +#define ASN1_RRC_MAX_CE_LEVEL_R13 4 +#define ASN1_RRC_MAX_CELL_BLACK 16 +#define ASN1_RRC_MAX_CELL_HISTORY_R12 16 +#define ASN1_RRC_MAX_CELL_INFO_GERAN_R9 32 +#define ASN1_RRC_MAX_CELL_INFO_UTRA_R9 16 +#define ASN1_RRC_MAX_CELL_MEAS_IDLE_R15 8 +#define ASN1_RRC_MAX_COMB_IDC_R11 128 +#define ASN1_RRC_MAX_CSI_IM_R11 3 +#define ASN1_RRC_MAX_CSI_IM_R12 4 +#define ASN1_RRC_MIN_CSI_IM_R13 5 +#define ASN1_RRC_MAX_CSI_IM_R13 24 +#define ASN1_RRC_MAX_CSI_IM_V1310 20 +#define ASN1_RRC_MAX_CSI_PROC_R11 4 +#define ASN1_RRC_MAX_CSI_RS_NZP_R11 3 +#define ASN1_RRC_MIN_CSI_RS_NZP_R13 4 +#define ASN1_RRC_MAX_CSI_RS_NZP_R13 24 +#define ASN1_RRC_MAX_CSI_RS_NZP_V1310 21 +#define ASN1_RRC_MAX_CSI_RS_ZP_R11 4 +#define ASN1_RRC_MAX_CQI_PROC_EXT_R11 3 +#define ASN1_RRC_MAX_FREQ_UTRA_TDD_R10 6 +#define ASN1_RRC_MAX_CELL_INTER 16 +#define ASN1_RRC_MAX_CELL_INTRA 16 +#define ASN1_RRC_MAX_CELL_LIST_GERAN 3 +#define ASN1_RRC_MAX_CELL_MEAS 32 +#define ASN1_RRC_MAX_CELL_REPORT 8 +#define ASN1_RRC_MAX_CELL_SFTD 3 +#define ASN1_RRC_MAX_CFG_SPS_R14 8 +#define ASN1_RRC_MAX_CFG_SPS_R15 6 +#define ASN1_RRC_MAX_CSI_RS_MEAS_R12 96 +#define ASN1_RRC_MAX_DRB 11 +#define ASN1_RRC_MAX_DRB_EXT_R15 4 +#define ASN1_RRC_MAX_DRB_R15 15 +#define ASN1_RRC_MAX_DS_DUR_R12 5 +#define ASN1_RRC_MAX_DS_ZTP_CSI_RS_R12 5 +#define ASN1_RRC_MAX_EARFCN 65535 +#define ASN1_RRC_MAX_EARFCN_PLUS1 65536 +#define ASN1_RRC_MAX_EARFCN2 262143 +#define ASN1_RRC_MAX_EPDCCH_SET_R11 2 +#define ASN1_RRC_MAX_FBI 64 +#define ASN1_RRC_MAX_FBI_NR_R15 1024 +#define ASN1_RRC_MAX_FBI_PLUS1 65 +#define ASN1_RRC_MAX_FBI2 256 +#define ASN1_RRC_MAX_FEATURE_SETS_R15 256 +#define ASN1_RRC_MAX_PER_CC_FEATURE_SETS_R15 32 +#define ASN1_RRC_MAX_FREQ 8 +#define ASN1_RRC_MAX_FREQ_IDC_R11 32 +#define ASN1_RRC_MAX_FREQ_IDLE_R15 8 +#define ASN1_RRC_MAX_FREQ_MBMS_R11 5 +#define ASN1_RRC_MAX_FREQ_NR_R15 5 +#define ASN1_RRC_MAX_FREQ_V2X_R14 8 +#define ASN1_RRC_MAX_FREQ_V2X_MINUS1_R14 7 +#define ASN1_RRC_MAX_GERAN_SI 10 +#define ASN1_RRC_MAX_GNFG 16 +#define ASN1_RRC_MAX_IDLE_MEAS_CARRIERS_R15 3 +#define ASN1_RRC_MAX_LCG_R13 4 +#define ASN1_RRC_MAX_LOG_MEAS_REPORT_R10 520 +#define ASN1_RRC_MAX_MBSFN_ALLOCS 8 +#define ASN1_RRC_MAX_MBSFN_AREA 8 +#define ASN1_RRC_MAX_MBSFN_AREA_MINUS1 7 +#define ASN1_RRC_MAX_MBMS_SERVICE_LIST_PER_UE_R13 15 +#define ASN1_RRC_MAX_MEAS_ID 32 +#define ASN1_RRC_MAX_MEAS_ID_PLUS1 33 +#define ASN1_RRC_MAX_MEAS_ID_R12 64 +#define ASN1_RRC_MAX_MULTI_BANDS 8 +#define ASN1_RRC_MAX_MULTI_BANDS_NR_R15 32 +#define ASN1_RRC_MAX_NS_PMAX_R10 8 +#define ASN1_RRC_MAX_NAICS_ENTRIES_R12 8 +#define ASN1_RRC_MAX_NEIGH_CELL_R12 8 +#define ASN1_RRC_MAX_NEIGH_CELL_SCPTM_R13 8 +#define ASN1_RRC_MAX_NROF_S_NSSAI_R15 8 +#define ASN1_RRC_MAX_OBJ_ID 32 +#define ASN1_RRC_MAX_OBJ_ID_PLUS1_R13 33 +#define ASN1_RRC_MAX_OBJ_ID_R13 64 +#define ASN1_RRC_MAX_P_A_PER_NEIGH_CELL_R12 3 +#define ASN1_RRC_MAX_PAGE_REC 16 +#define ASN1_RRC_MAX_PCI_RANGE_R9 4 +#define ASN1_RRC_MAX_PLMN_R11 6 +#define ASN1_RRC_MAX_PLMN_MINUS1_R14 5 +#define ASN1_RRC_MAX_PLMN_R15 8 +#define ASN1_RRC_MAX_PLMN_NR_R15 12 +#define ASN1_RRC_MAX_PN_OFFSET 511 +#define ASN1_RRC_MAX_PMCH_PER_MBSFN 15 +#define ASN1_RRC_MAX_PSSCH_TX_CFG_R14 16 +#define ASN1_RRC_MAX_QUANT_SETS_NR_R15 2 +#define ASN1_RRC_MAX_QCI_R13 6 +#define ASN1_RRC_MAX_RAT_CAPABILITIES 8 +#define ASN1_RRC_MAX_RE_MAP_QCL_R11 4 +#define ASN1_RRC_MAX_REPORT_CFG_ID 32 +#define ASN1_RRC_MAX_RESERV_PERIOD_R14 16 +#define ASN1_RRC_MAX_RS_IDX_R15 64 +#define ASN1_RRC_MAX_RS_IDX_MINUS1_R15 63 +#define ASN1_RRC_MAX_RS_IDX_CELL_QUAL_R15 16 +#define ASN1_RRC_MAX_RS_IDX_REPORT_R15 32 +#define ASN1_RRC_MAX_RSTD_FREQ_R10 3 +#define ASN1_RRC_MAX_SAI_MBMS_R11 64 +#define ASN1_RRC_MAX_SCELL_R10 4 +#define ASN1_RRC_MAX_SCELL_R13 31 +#define ASN1_RRC_MAX_SCELL_GROUPS_R15 4 +#define ASN1_RRC_MAX_SC_MTCH_R13 1023 +#define ASN1_RRC_MAX_SC_MTCH_BR_R14 128 +#define ASN1_RRC_MAX_SL_COMM_RX_POOL_NFREQ_R13 32 +#define ASN1_RRC_MAX_SL_COMM_RX_POOL_PRECONF_V1310 12 +#define ASN1_RRC_MAX_SL_TX_POOL_R12_PLUS1_R13 5 +#define ASN1_RRC_MAX_SL_TX_POOL_V1310 4 +#define ASN1_RRC_MAX_SL_TX_POOL_R13 8 +#define ASN1_RRC_MAX_SL_COMM_TX_POOL_PRECONF_V1310 7 +#define ASN1_RRC_MAX_SL_DEST_R12 16 +#define ASN1_RRC_MAX_SL_DISC_CELLS_R13 16 +#define ASN1_RRC_MAX_SL_DISC_PWR_CLASS_R12 3 +#define ASN1_RRC_MAX_SL_DISC_RX_POOL_PRECONF_R13 16 +#define ASN1_RRC_MAX_SL_DISC_SYS_INFO_REPORT_FREQ_R13 8 +#define ASN1_RRC_MAX_SL_DISC_TX_POOL_PRECONF_R13 4 +#define ASN1_RRC_MAX_SL_GP_R13 8 +#define ASN1_RRC_MAX_SL_POOL_TO_MEASURE_R14 72 +#define ASN1_RRC_MAX_SL_PRIO_R13 8 +#define ASN1_RRC_MAX_SL_RX_POOL_R12 16 +#define ASN1_RRC_MAX_SL_RELIABILITY_R15 8 +#define ASN1_RRC_MAX_SL_SYNC_CFG_R12 16 +#define ASN1_RRC_MAX_SL_TF_IDX_PAIR_R12 64 +#define ASN1_RRC_MAX_SL_TX_POOL_R12 4 +#define ASN1_RRC_MAX_SL_V2X_RX_POOL_R14 16 +#define ASN1_RRC_MAX_SL_V2X_RX_POOL_PRECONF_R14 16 +#define ASN1_RRC_MAX_SL_V2X_TX_POOL_R14 8 +#define ASN1_RRC_MAX_SL_V2X_TX_POOL_PRECONF_R14 8 +#define ASN1_RRC_MAX_SL_V2X_SYNC_CFG_R14 16 +#define ASN1_RRC_MAX_SL_V2X_CBR_CFG_R14 4 +#define ASN1_RRC_MAX_SL_V2X_CBR_CFG_MINUS1_R14 3 +#define ASN1_RRC_MAX_SL_V2X_TX_CFG_R14 64 +#define ASN1_RRC_MAX_SL_V2X_TX_CFG_MINUS1_R14 63 +#define ASN1_RRC_MAX_SL_V2X_CBR_CFG2_R14 8 +#define ASN1_RRC_MAX_SL_V2X_CBR_CFG2_MINUS1_R14 7 +#define ASN1_RRC_MAX_SL_V2X_TX_CFG2_R14 128 +#define ASN1_RRC_MAX_SL_V2X_TX_CFG2_MINUS1_R14 127 +#define ASN1_RRC_MAX_STAG_R11 3 +#define ASN1_RRC_MAX_SERV_CELL_R10 5 +#define ASN1_RRC_MAX_SERV_CELL_R13 32 +#define ASN1_RRC_MAX_SERV_CELL_NR_R15 16 +#define ASN1_RRC_MAX_SERVICE_COUNT 16 +#define ASN1_RRC_MAX_SERVICE_COUNT_MINUS1 15 +#define ASN1_RRC_MAX_SESSION_PER_PMCH 29 +#define ASN1_RRC_MAX_SESSION_PER_PMCH_MINUS1 28 +#define ASN1_RRC_MAX_SIB 32 +#define ASN1_RRC_MAX_SIB_MINUS1 31 +#define ASN1_RRC_MAX_SI_MSG 32 +#define ASN1_RRC_MAX_SIMUL_BANDS_R10 64 +#define ASN1_RRC_MAX_SF_PATTERN_IDC_R11 8 +#define ASN1_RRC_MAX_TRAFFIC_PATTERN_R14 8 +#define ASN1_RRC_MAX_UTRA_FDD_CARRIER 16 +#define ASN1_RRC_MAX_UTRA_TDD_CARRIER 16 +#define ASN1_RRC_MAX_WAY_POINT_R15 20 +#define ASN1_RRC_MAX_WLAN_ID_R12 16 +#define ASN1_RRC_MAX_WLAN_BANDS_R13 8 +#define ASN1_RRC_MAX_WLAN_ID_R13 32 +#define ASN1_RRC_MAX_WLAN_CHS_R13 16 +#define ASN1_RRC_MAX_WLAN_CARRIER_INFO_R13 8 +#define ASN1_RRC_MAX_WLAN_ID_REPORT_R14 32 +#define ASN1_RRC_MAX_WLAN_NAME_R15 4 +#define ASN1_RRC_MAX_LOG_MEAS_R10 4060 +#define ASN1_RRC_MAX_REESTAB_INFO 32 +#define ASN1_RRC_MAX_NPRACH_RES_NB_R13 3 +#define ASN1_RRC_MAX_NON_ANCHOR_CARRIERS_NB_R14 15 +#define ASN1_RRC_MAX_DRB_NB_R13 2 +#define ASN1_RRC_MAX_NEIGH_CELL_SCPTM_NB_R14 8 +#define ASN1_RRC_MAX_NS_PMAX_NB_R13 4 +#define ASN1_RRC_MAX_SC_MTCH_NB_R14 64 +#define ASN1_RRC_MAX_SI_MSG_NB_R13 8 + +/******************************************************************************* +/* Struct Definitions +/******************************************************************************/ + +// PHICH-Config ::= SEQUENCE +struct phich_cfg_s { + struct phich_dur_e_ { + enum options { normal, extended }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + phich_dur_e_() {} + phich_dur_e_(options v) : value(v) {} + phich_dur_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct phich_res_e_ { + enum options { one_sixth, half, one, two }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + phich_res_e_() {} + phich_res_e_(options v) : value(v) {} + phich_res_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + phich_dur_e_ phich_dur; + phich_res_e_ phich_res; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MasterInformationBlock ::= SEQUENCE +struct mib_s { + struct dl_bw_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dl_bw_e_() {} + dl_bw_e_(options v) : value(v) {} + dl_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + dl_bw_e_ dl_bw; + phich_cfg_s phich_cfg; + fixed_bitstring<8> sys_frame_num; + uint8_t sched_info_sib1_br_r13; + bool sys_info_unchanged_br_r15; + fixed_bitstring<4> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-BCH-MessageType ::= MasterInformationBlock +typedef mib_s bcch_bch_msg_type_s; + +// BCCH-BCH-Message ::= SEQUENCE +struct bcch_bch_msg_s { + // member variables + bcch_bch_msg_type_s msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MasterInformationBlock-MBMS-r14 ::= SEQUENCE +struct mib_mbms_r14_s { + struct dl_bw_mbms_r14_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dl_bw_mbms_r14_e_() {} + dl_bw_mbms_r14_e_(options v) : value(v) {} + dl_bw_mbms_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + dl_bw_mbms_r14_e_ dl_bw_mbms_r14; + fixed_bitstring<6> sys_frame_num_r14; + uint8_t add_non_mbsfn_sfs_r14; + fixed_bitstring<13> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-BCH-MessageType-MBMS-r14 ::= MasterInformationBlock-MBMS-r14 +typedef mib_mbms_r14_s bcch_bch_msg_type_mbms_r14_s; + +// BCCH-BCH-Message-MBMS ::= SEQUENCE +struct bcch_bch_msg_mbms_s { + // member variables + bcch_bch_msg_type_mbms_r14_s msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GNSS-ID-r15 ::= SEQUENCE +struct gnss_id_r15_s { + struct gnss_id_r15_e_ { + enum options { gps, sbas, qzss, galileo, glonass, bds, /*...*/ }; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + gnss_id_r15_e_() {} + gnss_id_r15_e_(options v) : value(v) {} + gnss_id_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + gnss_id_r15_e_ gnss_id_r15; + // ... + + // sequence methods + gnss_id_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MCC ::= SEQUENCE (SIZE (3)) OF INTEGER +typedef fixed_array mcc_l; + +// MNC ::= SEQUENCE (SIZE (2..3)) OF INTEGER +typedef bounded_array mnc_l; + +// SBAS-ID-r15 ::= SEQUENCE +struct sbas_id_r15_s { + struct sbas_id_r15_e_ { + enum options { waas, egnos, msas, gagan, /*...*/ }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + sbas_id_r15_e_() {} + sbas_id_r15_e_(options v) : value(v) {} + sbas_id_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + sbas_id_r15_e_ sbas_id_r15; + // ... + + // sequence methods + sbas_id_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-Identity ::= SEQUENCE +struct plmn_id_s { + // member variables + bool mcc_present; + mcc_l mcc; + mnc_l mnc; + + // sequence methods + plmn_id_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSIB-Type-r15 ::= SEQUENCE +struct pos_sib_type_r15_s { + struct pos_sib_type_r15_e_ { + enum options { + pos_sib_type1_minus1, + pos_sib_type1_minus2, + pos_sib_type1_minus3, + pos_sib_type1_minus4, + pos_sib_type1_minus5, + pos_sib_type1_minus6, + pos_sib_type1_minus7, + pos_sib_type2_minus1, + pos_sib_type2_minus2, + pos_sib_type2_minus3, + pos_sib_type2_minus4, + pos_sib_type2_minus5, + pos_sib_type2_minus6, + pos_sib_type2_minus7, + pos_sib_type2_minus8, + pos_sib_type2_minus9, + pos_sib_type2_minus10, + pos_sib_type2_minus11, + pos_sib_type2_minus12, + pos_sib_type2_minus13, + pos_sib_type2_minus14, + pos_sib_type2_minus15, + pos_sib_type2_minus16, + pos_sib_type2_minus17, + pos_sib_type2_minus18, + pos_sib_type2_minus19, + pos_sib_type3_minus1, + // ... + }; + + options value; + static const uint32_t nof_types = 27, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + pos_sib_type_r15_e_() {} + pos_sib_type_r15_e_(options v) : value(v) {} + pos_sib_type_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool encrypted_r15_present; + bool gnss_id_r15_present; + bool sbas_id_r15_present; + gnss_id_r15_s gnss_id_r15; + sbas_id_r15_s sbas_id_r15; + pos_sib_type_r15_e_ pos_sib_type_r15; + // ... + + // sequence methods + pos_sib_type_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityInfo-r15 ::= SEQUENCE +struct plmn_id_info_r15_s { + struct plmn_id_minus5_gc_r15_c_ { + struct types { + enum options { plmn_id_r15, plmn_idx_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + plmn_id_minus5_gc_r15_c_() : type_(types::nulltype) {} + plmn_id_minus5_gc_r15_c_(const plmn_id_minus5_gc_r15_c_& other); + plmn_id_minus5_gc_r15_c_& operator=(const plmn_id_minus5_gc_r15_c_& other); + ~plmn_id_minus5_gc_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + plmn_id_s& plmn_id_r15() + { + assert_choice_type("plmn-Identity-r15", type_.to_string(), "plmn-Identity-5GC-r15"); + return c.get(); + } + uint8_t& plmn_idx_r15() + { + assert_choice_type("plmn-Index-r15", type_.to_string(), "plmn-Identity-5GC-r15"); + return c.get(); + } + const plmn_id_s& plmn_id_r15() const + { + assert_choice_type("plmn-Identity-r15", type_.to_string(), "plmn-Identity-5GC-r15"); + return c.get(); + } + const uint8_t& plmn_idx_r15() const + { + assert_choice_type("plmn-Index-r15", type_.to_string(), "plmn-Identity-5GC-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct cell_reserved_for_oper_r15_e_ { + enum options { reserved, not_reserved }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_reserved_for_oper_r15_e_() {} + cell_reserved_for_oper_r15_e_(options v) : value(v) {} + cell_reserved_for_oper_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct cell_reserved_for_oper_crs_r15_e_ { + enum options { reserved, not_reserved }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_reserved_for_oper_crs_r15_e_() {} + cell_reserved_for_oper_crs_r15_e_(options v) : value(v) {} + cell_reserved_for_oper_crs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + plmn_id_minus5_gc_r15_c_ plmn_id_minus5_gc_r15; + cell_reserved_for_oper_r15_e_ cell_reserved_for_oper_r15; + cell_reserved_for_oper_crs_r15_e_ cell_reserved_for_oper_crs_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSIB-MappingInfo-r15 ::= SEQUENCE (SIZE (1..maxSIB)) OF PosSIB-Type-r15 +typedef dyn_array pos_sib_map_info_r15_l; + +// CellIdentity-5GC-r15 ::= CHOICE +struct cell_id_minus5_gc_r15_c { + struct types { + enum options { cell_id_r15, cell_id_idx_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cell_id_minus5_gc_r15_c() : type_(types::nulltype) {} + cell_id_minus5_gc_r15_c(const cell_id_minus5_gc_r15_c& other); + cell_id_minus5_gc_r15_c& operator=(const cell_id_minus5_gc_r15_c& other); + ~cell_id_minus5_gc_r15_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<28>& cell_id_r15() + { + assert_choice_type("cellIdentity-r15", type_.to_string(), "CellIdentity-5GC-r15"); + return c.get >(); + } + uint8_t& cell_id_idx_r15() + { + assert_choice_type("cellId-Index-r15", type_.to_string(), "CellIdentity-5GC-r15"); + return c.get(); + } + const fixed_bitstring<28>& cell_id_r15() const + { + assert_choice_type("cellIdentity-r15", type_.to_string(), "CellIdentity-5GC-r15"); + return c.get >(); + } + const uint8_t& cell_id_idx_r15() const + { + assert_choice_type("cellId-Index-r15", type_.to_string(), "CellIdentity-5GC-r15"); + return c.get(); + } + +private: + types type_; + choice_buffer_t)> c; + + void destroy_(); +}; + +// PLMN-IdentityInfo-v1530 ::= SEQUENCE +struct plmn_id_info_v1530_s { + struct cell_reserved_for_oper_crs_r15_e_ { + enum options { reserved, not_reserved }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_reserved_for_oper_crs_r15_e_() {} + cell_reserved_for_oper_crs_r15_e_(options v) : value(v) {} + cell_reserved_for_oper_crs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + cell_reserved_for_oper_crs_r15_e_ cell_reserved_for_oper_crs_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo-r15 +typedef dyn_array plmn_id_list_r15_l; + +// PosSchedulingInfo-r15 ::= SEQUENCE +struct pos_sched_info_r15_s { + struct pos_si_periodicity_r15_e_ { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pos_si_periodicity_r15_e_() {} + pos_si_periodicity_r15_e_(options v) : value(v) {} + pos_si_periodicity_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + pos_si_periodicity_r15_e_ pos_si_periodicity_r15; + pos_sib_map_info_r15_l pos_sib_map_info_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellAccessRelatedInfo-5GC-r15 ::= SEQUENCE +struct cell_access_related_info_minus5_gc_r15_s { + // member variables + bool ran_area_code_r15_present; + plmn_id_list_r15_l plmn_id_list_r15; + uint8_t ran_area_code_r15; + fixed_bitstring<24> tac_minus5_gc_r15; + cell_id_minus5_gc_r15_c cell_id_minus5_gc_r15; + + // sequence methods + cell_access_related_info_minus5_gc_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfoCE-v1530 ::= SEQUENCE +struct cell_sel_info_ce_v1530_s { + struct pwr_class14dbm_offset_r15_e_ { + enum options { db_minus6, db_minus3, db3, db6, db9, db12 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pwr_class14dbm_offset_r15_e_() {} + pwr_class14dbm_offset_r15_e_(options v) : value(v) {} + pwr_class14dbm_offset_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + pwr_class14dbm_offset_r15_e_ pwr_class14dbm_offset_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MCS-PSSCH-Range-r15 ::= SEQUENCE +struct mcs_pssch_range_r15_s { + // member variables + uint8_t min_mcs_pssch_r15; + uint8_t max_mcs_pssch_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityInfo ::= SEQUENCE +struct plmn_id_info_s { + struct cell_reserved_for_oper_e_ { + enum options { reserved, not_reserved }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_reserved_for_oper_e_() {} + cell_reserved_for_oper_e_(options v) : value(v) {} + cell_reserved_for_oper_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + plmn_id_s plmn_id; + cell_reserved_for_oper_e_ cell_reserved_for_oper; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList-v1530 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo-v1530 +typedef dyn_array plmn_id_list_v1530_l; + +// PosSchedulingInfoList-r15 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF PosSchedulingInfo-r15 +typedef dyn_array pos_sched_info_list_r15_l; + +// SL-PriorityList-r13 ::= SEQUENCE (SIZE (1..maxSL-Prio-r13)) OF INTEGER +typedef bounded_array sl_prio_list_r13_l; + +// SL-TxPower-r14 ::= CHOICE +struct sl_tx_pwr_r14_c { + struct types { + enum options { minusinfinity_r14, tx_pwr_r14, nulltype }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // choice methods + sl_tx_pwr_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + int8_t& tx_pwr_r14() + { + assert_choice_type("txPower-r14", type_.to_string(), "SL-TxPower-r14"); + return c; + } + const int8_t& tx_pwr_r14() const + { + assert_choice_type("txPower-r14", type_.to_string(), "SL-TxPower-r14"); + return c; + } + +private: + types type_; + int8_t c; +}; + +// Alpha-r12 ::= ENUMERATED +struct alpha_r12_e { + enum options { al0, al04, al05, al06, al07, al08, al09, al1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alpha_r12_e() {} + alpha_r12_e(options v) : value(v) {} + alpha_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; + +// PLMN-IdentityList ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo +typedef dyn_array plmn_id_list_l; + +// SL-MinT2Value-r15 ::= SEQUENCE +struct sl_min_t2_value_r15_s { + // member variables + sl_prio_list_r13_l prio_list_r15; + uint8_t min_t2_value_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PPPP-TxConfigIndex-r14 ::= SEQUENCE +struct sl_pppp_tx_cfg_idx_r14_s { + typedef bounded_array tx_cfg_idx_list_r14_l_; + + // member variables + uint8_t prio_thres_r14; + uint8_t default_tx_cfg_idx_r14; + uint8_t cbr_cfg_idx_r14; + tx_cfg_idx_list_r14_l_ tx_cfg_idx_list_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PPPP-TxConfigIndex-v1530 ::= SEQUENCE +struct sl_pppp_tx_cfg_idx_v1530_s { + typedef dyn_array mcs_pssch_range_list_r15_l_; + + // member variables + bool mcs_pssch_range_list_r15_present; + mcs_pssch_range_list_r15_l_ mcs_pssch_range_list_r15; + + // sequence methods + sl_pppp_tx_cfg_idx_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PSSCH-TxParameters-r14 ::= SEQUENCE +struct sl_pssch_tx_params_r14_s { + struct allowed_retx_num_pssch_r14_e_ { + enum options { n0, n1, both, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + allowed_retx_num_pssch_r14_e_() {} + allowed_retx_num_pssch_r14_e_(options v) : value(v) {} + allowed_retx_num_pssch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool max_tx_pwr_r14_present; + uint8_t min_mcs_pssch_r14; + uint8_t max_mcs_pssch_r14; + uint8_t min_sub_ch_num_pssch_r14; + uint8_t max_subch_num_pssch_r14; + allowed_retx_num_pssch_r14_e_ allowed_retx_num_pssch_r14; + sl_tx_pwr_r14_c max_tx_pwr_r14; + + // sequence methods + sl_pssch_tx_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PSSCH-TxParameters-v1530 ::= SEQUENCE +struct sl_pssch_tx_params_v1530_s { + // member variables + uint8_t min_mcs_pssch_r15; + uint8_t max_mcs_pssch_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-RestrictResourceReservationPeriod-r14 ::= ENUMERATED +struct sl_restrict_res_reserv_period_r14_e { + enum options { v0dot2, v0dot5, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, spare4, spare3, spare2, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_restrict_res_reserv_period_r14_e() {} + sl_restrict_res_reserv_period_r14_e(options v) : value(v) {} + sl_restrict_res_reserv_period_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; + +// SL-TypeTxSync-r14 ::= ENUMERATED +struct sl_type_tx_sync_r14_e { + enum options { gnss, enb, ue }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_type_tx_sync_r14_e() {} + sl_type_tx_sync_r14_e(options v) : value(v) {} + sl_type_tx_sync_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SystemInformationBlockType1-v1530-IEs ::= SEQUENCE +struct sib_type1_v1530_ies_s { + struct crs_intf_mitig_cfg_r15_c_ { + struct crs_intf_mitig_num_prbs_r15_e_ { + enum options { n6, n24 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + crs_intf_mitig_num_prbs_r15_e_() {} + crs_intf_mitig_num_prbs_r15_e_(options v) : value(v) {} + crs_intf_mitig_num_prbs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { crs_intf_mitig_enabled_minus15, crs_intf_mitig_num_prbs_r15, nulltype }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // choice methods + crs_intf_mitig_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() + { + assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "crs-IntfMitigConfig-r15"); + return c; + } + const crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() const + { + assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "crs-IntfMitigConfig-r15"); + return c; + } + + private: + types type_; + crs_intf_mitig_num_prbs_r15_e_ c; + }; + struct cell_barred_crs_r15_e_ { + enum options { barred, not_barred }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_barred_crs_r15_e_() {} + cell_barred_crs_r15_e_(options v) : value(v) {} + cell_barred_crs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct cell_access_related_info_minus5_gc_r15_s_ { + struct cell_barred_minus5_gc_r15_e_ { + enum options { barred, not_barred }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_barred_minus5_gc_r15_e_() {} + cell_barred_minus5_gc_r15_e_(options v) : value(v) {} + cell_barred_minus5_gc_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct cell_barred_minus5_gc_crs_r15_e_ { + enum options { barred, not_barred }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_barred_minus5_gc_crs_r15_e_() {} + cell_barred_minus5_gc_crs_r15_e_(options v) : value(v) {} + cell_barred_minus5_gc_crs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + typedef dyn_array cell_access_related_info_list_minus5_gc_r15_l_; + + // member variables + cell_barred_minus5_gc_r15_e_ cell_barred_minus5_gc_r15; + cell_barred_minus5_gc_crs_r15_e_ cell_barred_minus5_gc_crs_r15; + cell_access_related_info_list_minus5_gc_r15_l_ cell_access_related_info_list_minus5_gc_r15; + }; + + // member variables + bool hsdn_cell_r15_present; + bool cell_sel_info_ce_v1530_present; + bool crs_intf_mitig_cfg_r15_present; + bool plmn_id_list_v1530_present; + bool pos_sched_info_list_r15_present; + bool cell_access_related_info_minus5_gc_r15_present; + bool ims_emergency_support5_gc_r15_present; + bool e_call_over_ims_support5_gc_r15_present; + bool non_crit_ext_present; + cell_sel_info_ce_v1530_s cell_sel_info_ce_v1530; + crs_intf_mitig_cfg_r15_c_ crs_intf_mitig_cfg_r15; + cell_barred_crs_r15_e_ cell_barred_crs_r15; + plmn_id_list_v1530_l plmn_id_list_v1530; + pos_sched_info_list_r15_l pos_sched_info_list_r15; + cell_access_related_info_minus5_gc_r15_s_ cell_access_related_info_minus5_gc_r15; + + // sequence methods + sib_type1_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TDD-Config-v1450 ::= SEQUENCE +struct tdd_cfg_v1450_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellAccessRelatedInfo-r14 ::= SEQUENCE +struct cell_access_related_info_r14_s { + // member variables + plmn_id_list_l plmn_id_list_r14; + fixed_bitstring<16> tac_r14; + fixed_bitstring<28> cell_id_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfoCE1-v1360 ::= SEQUENCE +struct cell_sel_info_ce1_v1360_s { + // member variables + int8_t delta_rx_lev_min_ce1_v1360; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NS-PmaxValue-v10l0 ::= SEQUENCE +struct ns_pmax_value_v10l0_s { + // member variables + bool add_spec_emission_v10l0_present; + uint16_t add_spec_emission_v10l0; + + // sequence methods + ns_pmax_value_v10l0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CBR-PPPP-TxConfigList-r14 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxConfigIndex-r14 +typedef dyn_array sl_cbr_pppp_tx_cfg_list_r14_l; + +// SL-CBR-PPPP-TxConfigList-v1530 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxConfigIndex-v1530 +typedef dyn_array sl_cbr_pppp_tx_cfg_list_v1530_l; + +// SL-CP-Len-r12 ::= ENUMERATED +struct sl_cp_len_r12_e { + enum options { normal, extended }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_cp_len_r12_e() {} + sl_cp_len_r12_e(options v) : value(v) {} + sl_cp_len_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SL-MinT2ValueList-r15 ::= SEQUENCE (SIZE (1..maxSL-Prio-r13)) OF SL-MinT2Value-r15 +typedef dyn_array sl_min_t2_value_list_r15_l; + +// SL-OffsetIndicator-r12 ::= CHOICE +struct sl_offset_ind_r12_c { + struct types { + enum options { small_r12, large_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sl_offset_ind_r12_c() : type_(types::nulltype) {} + sl_offset_ind_r12_c(const sl_offset_ind_r12_c& other); + sl_offset_ind_r12_c& operator=(const sl_offset_ind_r12_c& other); + ~sl_offset_ind_r12_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& small_r12() + { + assert_choice_type("small-r12", type_.to_string(), "SL-OffsetIndicator-r12"); + return c.get(); + } + uint16_t& large_r12() + { + assert_choice_type("large-r12", type_.to_string(), "SL-OffsetIndicator-r12"); + return c.get(); + } + const uint16_t& small_r12() const + { + assert_choice_type("small-r12", type_.to_string(), "SL-OffsetIndicator-r12"); + return c.get(); + } + const uint16_t& large_r12() const + { + assert_choice_type("large-r12", type_.to_string(), "SL-OffsetIndicator-r12"); + return c.get(); + } + +private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); +}; + +// SL-P2X-ResourceSelectionConfig-r14 ::= SEQUENCE +struct sl_p2_x_res_sel_cfg_r14_s { + // member variables + bool partial_sensing_r14_present; + bool random_sel_r14_present; + + // sequence methods + sl_p2_x_res_sel_cfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PSSCH-TxConfig-r14 ::= SEQUENCE +struct sl_pssch_tx_cfg_r14_s { + struct thres_ue_speed_r14_e_ { + enum options { kmph60, kmph80, kmph100, kmph120, kmph140, kmph160, kmph180, kmph200 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + thres_ue_speed_r14_e_() {} + thres_ue_speed_r14_e_(options v) : value(v) {} + thres_ue_speed_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool type_tx_sync_r14_present; + sl_type_tx_sync_r14_e type_tx_sync_r14; + thres_ue_speed_r14_e_ thres_ue_speed_r14; + sl_pssch_tx_params_r14_s params_above_thres_r14; + sl_pssch_tx_params_r14_s params_below_thres_r14; + // ... + // group 0 + bool params_above_thres_v1530_present; + bool params_below_thres_v1530_present; + copy_ptr params_above_thres_v1530; + copy_ptr params_below_thres_v1530; + + // sequence methods + sl_pssch_tx_cfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-RestrictResourceReservationPeriodList-r14 ::= SEQUENCE (SIZE (1..maxReservationPeriod-r14)) OF +// SL-RestrictResourceReservationPeriod-r14 +typedef bounded_array sl_restrict_res_reserv_period_list_r14_l; + +// SL-SyncAllowed-r14 ::= SEQUENCE +struct sl_sync_allowed_r14_s { + // member variables + bool gnss_sync_r14_present; + bool enb_sync_r14_present; + bool ue_sync_r14_present; + + // sequence methods + sl_sync_allowed_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxParameters-r12 ::= SEQUENCE +struct sl_tx_params_r12_s { + // member variables + alpha_r12_e alpha_r12; + int8_t p0_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SubframeBitmapSL-r12 ::= CHOICE +struct sf_bitmap_sl_r12_c { + struct types { + enum options { bs4_r12, bs8_r12, bs12_r12, bs16_r12, bs30_r12, bs40_r12, bs42_r12, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sf_bitmap_sl_r12_c() : type_(types::nulltype) {} + sf_bitmap_sl_r12_c(const sf_bitmap_sl_r12_c& other); + sf_bitmap_sl_r12_c& operator=(const sf_bitmap_sl_r12_c& other); + ~sf_bitmap_sl_r12_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<4>& bs4_r12() + { + assert_choice_type("bs4-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + fixed_bitstring<8>& bs8_r12() + { + assert_choice_type("bs8-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + fixed_bitstring<12>& bs12_r12() + { + assert_choice_type("bs12-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + fixed_bitstring<16>& bs16_r12() + { + assert_choice_type("bs16-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + fixed_bitstring<30>& bs30_r12() + { + assert_choice_type("bs30-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + fixed_bitstring<40>& bs40_r12() + { + assert_choice_type("bs40-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + fixed_bitstring<42>& bs42_r12() + { + assert_choice_type("bs42-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<4>& bs4_r12() const + { + assert_choice_type("bs4-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<8>& bs8_r12() const + { + assert_choice_type("bs8-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<12>& bs12_r12() const + { + assert_choice_type("bs12-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<16>& bs16_r12() const + { + assert_choice_type("bs16-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<30>& bs30_r12() const + { + assert_choice_type("bs30-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<40>& bs40_r12() const + { + assert_choice_type("bs40-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + const fixed_bitstring<42>& bs42_r12() const + { + assert_choice_type("bs42-r12", type_.to_string(), "SubframeBitmapSL-r12"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t)> c; + + void destroy_(); +}; + +// SubframeBitmapSL-r14 ::= CHOICE +struct sf_bitmap_sl_r14_c { + struct types { + enum options { bs10_r14, bs16_r14, bs20_r14, bs30_r14, bs40_r14, bs50_r14, bs60_r14, bs100_r14, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sf_bitmap_sl_r14_c() : type_(types::nulltype) {} + sf_bitmap_sl_r14_c(const sf_bitmap_sl_r14_c& other); + sf_bitmap_sl_r14_c& operator=(const sf_bitmap_sl_r14_c& other); + ~sf_bitmap_sl_r14_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<10>& bs10_r14() + { + assert_choice_type("bs10-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<16>& bs16_r14() + { + assert_choice_type("bs16-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<20>& bs20_r14() + { + assert_choice_type("bs20-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<30>& bs30_r14() + { + assert_choice_type("bs30-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<40>& bs40_r14() + { + assert_choice_type("bs40-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<50>& bs50_r14() + { + assert_choice_type("bs50-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<60>& bs60_r14() + { + assert_choice_type("bs60-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + fixed_bitstring<100>& bs100_r14() + { + assert_choice_type("bs100-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<10>& bs10_r14() const + { + assert_choice_type("bs10-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<16>& bs16_r14() const + { + assert_choice_type("bs16-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<20>& bs20_r14() const + { + assert_choice_type("bs20-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<30>& bs30_r14() const + { + assert_choice_type("bs30-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<40>& bs40_r14() const + { + assert_choice_type("bs40-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<50>& bs50_r14() const + { + assert_choice_type("bs50-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<60>& bs60_r14() const + { + assert_choice_type("bs60-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + const fixed_bitstring<100>& bs100_r14() const + { + assert_choice_type("bs100-r14", type_.to_string(), "SubframeBitmapSL-r14"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t)> c; + + void destroy_(); +}; + +// SystemInformationBlockType1-v1450-IEs ::= SEQUENCE +struct sib_type1_v1450_ies_s { + // member variables + bool tdd_cfg_v1450_present; + bool non_crit_ext_present; + tdd_cfg_v1450_s tdd_cfg_v1450; + sib_type1_v1530_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1450_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TDD-Config ::= SEQUENCE +struct tdd_cfg_s { + struct sf_assign_e_ { + enum options { sa0, sa1, sa2, sa3, sa4, sa5, sa6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_assign_e_() {} + sf_assign_e_(options v) : value(v) {} + sf_assign_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct special_sf_patterns_e_ { + enum options { ssp0, ssp1, ssp2, ssp3, ssp4, ssp5, ssp6, ssp7, ssp8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + special_sf_patterns_e_() {} + special_sf_patterns_e_(options v) : value(v) {} + special_sf_patterns_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + sf_assign_e_ sf_assign; + special_sf_patterns_e_ special_sf_patterns; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TDD-Config-v1430 ::= SEQUENCE +struct tdd_cfg_v1430_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandclassCDMA2000 ::= ENUMERATED +struct bandclass_cdma2000_e { + enum options { + bc0, + bc1, + bc2, + bc3, + bc4, + bc5, + bc6, + bc7, + bc8, + bc9, + bc10, + bc11, + bc12, + bc13, + bc14, + bc15, + bc16, + bc17, + bc18_v9a0, + bc19_v9a0, + bc20_v9a0, + bc21_v9a0, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + // ... + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + bandclass_cdma2000_e() {} + bandclass_cdma2000_e(options v) : value(v) {} + bandclass_cdma2000_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// InterFreqCarrierFreqInfo-v1360 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1360_s { + // member variables + bool cell_sel_info_ce1_v1360_present; + cell_sel_info_ce1_v1360_s cell_sel_info_ce1_v1360; + + // sequence methods + inter_freq_carrier_freq_info_v1360_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NS-PmaxList-v10l0 ::= SEQUENCE (SIZE (1..maxNS-Pmax-r10)) OF NS-PmaxValue-v10l0 +typedef dyn_array ns_pmax_list_v10l0_l; + +// NS-PmaxValue-r10 ::= SEQUENCE +struct ns_pmax_value_r10_s { + // member variables + bool add_pmax_r10_present; + int8_t add_pmax_r10; + uint8_t add_spec_emission; + + // sequence methods + ns_pmax_value_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysCellIdList-r13 ::= SEQUENCE (SIZE (1.. maxSL-DiscCells-r13)) OF INTEGER +typedef bounded_array pci_list_r13_l; + +// SL-CommResourcePoolV2X-r14 ::= SEQUENCE +struct sl_comm_res_pool_v2x_r14_s { + struct size_subch_r14_e_ { + enum options { + n4, + n5, + n6, + n8, + n9, + n10, + n12, + n15, + n16, + n18, + n20, + n25, + n30, + n48, + n50, + n72, + n75, + n96, + n100, + spare13, + spare12, + spare11, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + size_subch_r14_e_() {} + size_subch_r14_e_(options v) : value(v) {} + size_subch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct num_subch_r14_e_ { + enum options { n1, n3, n5, n8, n10, n15, n20, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + num_subch_r14_e_() {} + num_subch_r14_e_(options v) : value(v) {} + num_subch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rx_params_ncell_r14_s_ { + // member variables + bool tdd_cfg_r14_present; + tdd_cfg_s tdd_cfg_r14; + uint8_t sync_cfg_idx_r14; + + // sequence methods + rx_params_ncell_r14_s_(); + }; + + // member variables + bool ext; + bool sl_offset_ind_r14_present; + bool start_rb_pscch_pool_r14_present; + bool rx_params_ncell_r14_present; + bool data_tx_params_r14_present; + bool zone_id_r14_present; + bool thresh_s_rssi_cbr_r14_present; + bool pool_report_id_r14_present; + bool cbr_pssch_tx_cfg_list_r14_present; + bool res_sel_cfg_p2_x_r14_present; + bool sync_allowed_r14_present; + bool restrict_res_reserv_period_r14_present; + sl_offset_ind_r12_c sl_offset_ind_r14; + sf_bitmap_sl_r14_c sl_sf_r14; + bool adjacency_pscch_pssch_r14; + size_subch_r14_e_ size_subch_r14; + num_subch_r14_e_ num_subch_r14; + uint8_t start_rb_subch_r14; + uint8_t start_rb_pscch_pool_r14; + rx_params_ncell_r14_s_ rx_params_ncell_r14; + sl_tx_params_r12_s data_tx_params_r14; + uint8_t zone_id_r14; + uint8_t thresh_s_rssi_cbr_r14; + uint8_t pool_report_id_r14; + sl_cbr_pppp_tx_cfg_list_r14_l cbr_pssch_tx_cfg_list_r14; + sl_p2_x_res_sel_cfg_r14_s res_sel_cfg_p2_x_r14; + sl_sync_allowed_r14_s sync_allowed_r14; + sl_restrict_res_reserv_period_list_r14_l restrict_res_reserv_period_r14; + // ... + // group 0 + bool sl_min_t2_value_list_r15_present; + bool cbr_pssch_tx_cfg_list_v1530_present; + copy_ptr sl_min_t2_value_list_r15; + copy_ptr cbr_pssch_tx_cfg_list_v1530; + + // sequence methods + sl_comm_res_pool_v2x_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PSSCH-TxConfigList-r14 ::= SEQUENCE (SIZE (1..maxPSSCH-TxConfig-r14)) OF SL-PSSCH-TxConfig-r14 +typedef dyn_array sl_pssch_tx_cfg_list_r14_l; + +// SL-PoolSelectionConfig-r12 ::= SEQUENCE +struct sl_pool_sel_cfg_r12_s { + // member variables + uint8_t thresh_low_r12; + uint8_t thresh_high_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-SyncConfigNFreq-r13 ::= SEQUENCE +struct sl_sync_cfg_nfreq_r13_s { + struct async_params_r13_s_ { + // member variables + sl_cp_len_r12_e sync_cp_len_r13; + uint8_t sync_offset_ind_r13; + uint8_t slssid_r13; + }; + struct tx_params_r13_s_ { + // member variables + bool sync_info_reserved_r13_present; + bool sync_tx_periodic_r13_present; + sl_tx_params_r12_s sync_tx_params_r13; + uint8_t sync_tx_thresh_ic_r13; + fixed_bitstring<19> sync_info_reserved_r13; + + // sequence methods + tx_params_r13_s_(); + }; + struct rx_params_r13_s_ { + struct disc_sync_win_r13_e_ { + enum options { w1, w2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + disc_sync_win_r13_e_() {} + disc_sync_win_r13_e_(options v) : value(v) {} + disc_sync_win_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + disc_sync_win_r13_e_ disc_sync_win_r13; + }; + + // member variables + bool ext; + bool async_params_r13_present; + bool tx_params_r13_present; + bool rx_params_r13_present; + async_params_r13_s_ async_params_r13; + tx_params_r13_s_ tx_params_r13; + rx_params_r13_s_ rx_params_r13; + // ... + // group 0 + bool sync_offset_ind_v1430_present; + bool gnss_sync_r14_present; + uint8_t sync_offset_ind_v1430; + // group 1 + bool sync_offset_ind2_r14_present; + bool sync_offset_ind3_r14_present; + uint8_t sync_offset_ind2_r14; + uint8_t sync_offset_ind3_r14; + // group 2 + bool slss_tx_disabled_r15_present; + + // sequence methods + sl_sync_cfg_nfreq_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TF-ResourceConfig-r12 ::= SEQUENCE +struct sl_tf_res_cfg_r12_s { + // member variables + uint8_t prb_num_r12; + uint8_t prb_start_r12; + uint8_t prb_end_r12; + sl_offset_ind_r12_c offset_ind_r12; + sf_bitmap_sl_r12_c sf_bitmap_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-ThresPSSCH-RSRP-List-r14 ::= SEQUENCE (SIZE (64)) OF INTEGER +typedef fixed_array sl_thres_pssch_rsrp_list_r14_l; + +// SystemInformationBlockType1-v1430-IEs ::= SEQUENCE +struct sib_type1_v1430_ies_s { + typedef dyn_array cell_access_related_info_list_r14_l_; + + // member variables + bool e_call_over_ims_support_r14_present; + bool tdd_cfg_v1430_present; + bool cell_access_related_info_list_r14_present; + bool non_crit_ext_present; + tdd_cfg_v1430_s tdd_cfg_v1430; + cell_access_related_info_list_r14_l_ cell_access_related_info_list_r14; + sib_type1_v1450_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TDD-Config-v1130 ::= SEQUENCE +struct tdd_cfg_v1130_s { + struct special_sf_patterns_v1130_e_ { + enum options { ssp7, ssp9 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + special_sf_patterns_v1130_e_() {} + special_sf_patterns_v1130_e_(options v) : value(v) {} + special_sf_patterns_v1130_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + special_sf_patterns_v1130_e_ special_sf_patterns_v1130; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandClassInfoCDMA2000 ::= SEQUENCE +struct band_class_info_cdma2000_s { + // member variables + bool ext; + bool cell_resel_prio_present; + bandclass_cdma2000_e band_class; + uint8_t cell_resel_prio; + uint8_t thresh_x_high; + uint8_t thresh_x_low; + // ... + + // sequence methods + band_class_info_cdma2000_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfoCE1-r13 ::= SEQUENCE +struct cell_sel_info_ce1_r13_s { + // member variables + bool q_qual_min_rsrq_ce1_r13_present; + int8_t q_rx_lev_min_ce1_r13; + int8_t q_qual_min_rsrq_ce1_r13; + + // sequence methods + cell_sel_info_ce1_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqList-v13a0 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1360 +typedef dyn_array inter_freq_carrier_freq_list_v13a0_l; + +// MultiBandInfoList-v10l0 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF NS-PmaxList-v10l0 +typedef dyn_array multi_band_info_list_v10l0_l; + +// NS-PmaxList-r10 ::= SEQUENCE (SIZE (1..maxNS-Pmax-r10)) OF NS-PmaxValue-r10 +typedef dyn_array ns_pmax_list_r10_l; + +// NeighCellsPerBandclassCDMA2000-r11 ::= SEQUENCE +struct neigh_cells_per_bandclass_cdma2000_r11_s { + typedef dyn_array pci_list_r11_l_; + + // member variables + uint16_t arfcn; + pci_list_r11_l_ pci_list_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysCellIdListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF INTEGER +typedef bounded_array pci_list_cdma2000_l; + +// PhysCellIdListCDMA2000-v920 ::= SEQUENCE (SIZE (0..24)) OF INTEGER +typedef bounded_array pci_list_cdma2000_v920_l; + +// SL-CommRxPoolListV2X-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-RxPool-r14)) OF SL-CommResourcePoolV2X-r14 +typedef dyn_array sl_comm_rx_pool_list_v2x_r14_l; + +// SL-CommTxPoolListV2X-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-TxPool-r14)) OF SL-CommResourcePoolV2X-r14 +typedef dyn_array sl_comm_tx_pool_list_v2x_r14_l; + +// SL-CommTxPoolSensingConfig-r14 ::= SEQUENCE +struct sl_comm_tx_pool_sensing_cfg_r14_s { + struct prob_res_keep_r14_e_ { + enum options { v0, v0dot2, v0dot4, v0dot6, v0dot8, spare3, spare2, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + prob_res_keep_r14_e_() {} + prob_res_keep_r14_e_(options v) : value(v) {} + prob_res_keep_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct p2x_sensing_cfg_r14_s_ { + // member variables + uint8_t min_num_candidate_sf_r14; + fixed_bitstring<10> gap_candidate_sensing_r14; + }; + struct sl_reselect_after_r14_e_ { + enum options { n1, n2, n3, n4, n5, n6, n7, n8, n9, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_reselect_after_r14_e_() {} + sl_reselect_after_r14_e_(options v) : value(v) {} + sl_reselect_after_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool restrict_res_reserv_period_r14_present; + bool p2x_sensing_cfg_r14_present; + bool sl_reselect_after_r14_present; + sl_pssch_tx_cfg_list_r14_l pssch_tx_cfg_list_r14; + copy_ptr thres_pssch_rsrp_list_r14; + sl_restrict_res_reserv_period_list_r14_l restrict_res_reserv_period_r14; + prob_res_keep_r14_e_ prob_res_keep_r14; + p2x_sensing_cfg_r14_s_ p2x_sensing_cfg_r14; + sl_reselect_after_r14_e_ sl_reselect_after_r14; + + // sequence methods + sl_comm_tx_pool_sensing_cfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +struct setup_e { + enum options { release, setup, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e() {} + setup_e(options v) : value(v) {} + setup_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SL-DiscResourcePool-r12 ::= SEQUENCE +struct sl_disc_res_pool_r12_s { + struct disc_period_r12_e_ { + enum options { rf32, rf64, rf128, rf256, rf512, rf1024, rf16_v1310, spare }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + disc_period_r12_e_() {} + disc_period_r12_e_(options v) : value(v) {} + disc_period_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct tx_params_r12_s_ { + struct ue_sel_res_cfg_r12_s_ { + struct pool_sel_r12_c_ { + struct types { + enum options { rsrp_based_r12, random_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pool_sel_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_pool_sel_cfg_r12_s& rsrp_based_r12() + { + assert_choice_type("rsrpBased-r12", type_.to_string(), "poolSelection-r12"); + return c; + } + const sl_pool_sel_cfg_r12_s& rsrp_based_r12() const + { + assert_choice_type("rsrpBased-r12", type_.to_string(), "poolSelection-r12"); + return c; + } + + private: + types type_; + sl_pool_sel_cfg_r12_s c; + }; + struct tx_probability_r12_e_ { + enum options { p25, p50, p75, p100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_probability_r12_e_() {} + tx_probability_r12_e_(options v) : value(v) {} + tx_probability_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + pool_sel_r12_c_ pool_sel_r12; + tx_probability_r12_e_ tx_probability_r12; + }; + + // member variables + bool ue_sel_res_cfg_r12_present; + sl_tx_params_r12_s tx_params_general_r12; + ue_sel_res_cfg_r12_s_ ue_sel_res_cfg_r12; + + // sequence methods + tx_params_r12_s_(); + }; + struct rx_params_r12_s_ { + // member variables + bool tdd_cfg_r12_present; + tdd_cfg_s tdd_cfg_r12; + uint8_t sync_cfg_idx_r12; + + // sequence methods + rx_params_r12_s_(); + }; + struct disc_period_v1310_c_ { + struct setup_e_ { + enum options { rf4, rf6, rf7, rf8, rf12, rf14, rf24, rf28 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef setup_e types; + + // choice methods + disc_period_v1310_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "discPeriod-v1310"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "discPeriod-v1310"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + struct rx_params_add_neigh_freq_r13_c_ { + struct setup_s_ { + // member variables + pci_list_r13_l pci_r13; + }; + typedef setup_e types; + + // choice methods + rx_params_add_neigh_freq_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "rxParamsAddNeighFreq-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "rxParamsAddNeighFreq-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct tx_params_add_neigh_freq_r13_c_ { + struct setup_s_ { + struct freq_info_s_ { + struct ul_bw_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_bw_e_() {} + ul_bw_e_(options v) : value(v) {} + ul_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ul_carrier_freq_present; + bool ul_bw_present; + uint16_t ul_carrier_freq; + ul_bw_e_ ul_bw; + uint8_t add_spec_emission; + + // sequence methods + freq_info_s_(); + }; + + // member variables + bool p_max_present; + bool tdd_cfg_r13_present; + bool tdd_cfg_v1130_present; + bool sync_cfg_idx_r13_present; + pci_list_r13_l pci_r13; + int8_t p_max; + tdd_cfg_s tdd_cfg_r13; + tdd_cfg_v1130_s tdd_cfg_v1130; + freq_info_s_ freq_info; + int8_t ref_sig_pwr; + uint8_t sync_cfg_idx_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + tx_params_add_neigh_freq_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct tx_params_add_neigh_freq_v1370_c_ { + struct setup_s_ { + struct freq_info_v1370_s_ { + // member variables + uint16_t add_spec_emission_v1370; + }; + + // member variables + freq_info_v1370_s_ freq_info_v1370; + }; + typedef setup_e types; + + // choice methods + tx_params_add_neigh_freq_v1370_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-v1370"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "txParamsAddNeighFreq-v1370"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool tx_params_r12_present; + bool rx_params_r12_present; + sl_cp_len_r12_e cp_len_r12; + disc_period_r12_e_ disc_period_r12; + uint8_t num_retx_r12; + uint8_t num_repeat_r12; + sl_tf_res_cfg_r12_s tf_res_cfg_r12; + tx_params_r12_s_ tx_params_r12; + rx_params_r12_s_ rx_params_r12; + // ... + // group 0 + bool disc_period_v1310_present; + bool rx_params_add_neigh_freq_r13_present; + bool tx_params_add_neigh_freq_r13_present; + copy_ptr disc_period_v1310; + copy_ptr rx_params_add_neigh_freq_r13; + copy_ptr tx_params_add_neigh_freq_r13; + // group 1 + bool tx_params_add_neigh_freq_v1370_present; + copy_ptr tx_params_add_neigh_freq_v1370; + + // sequence methods + sl_disc_res_pool_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-SyncConfigListNFreqV2X-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-SyncConfig-r14)) OF SL-SyncConfigNFreq-r13 +typedef dyn_array sl_sync_cfg_list_nfreq_v2x_r14_l; + +// SL-ZoneConfig-r14 ::= SEQUENCE +struct sl_zone_cfg_r14_s { + struct zone_len_r14_e_ { + enum options { m5, m10, m20, m50, m100, m200, m500, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + zone_len_r14_e_() {} + zone_len_r14_e_(options v) : value(v) {} + zone_len_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct zone_width_r14_e_ { + enum options { m5, m10, m20, m50, m100, m200, m500, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + zone_width_r14_e_() {} + zone_width_r14_e_(options v) : value(v) {} + zone_width_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + zone_len_r14_e_ zone_len_r14; + zone_width_r14_e_ zone_width_r14; + uint8_t zone_id_longi_mod_r14; + uint8_t zone_id_lati_mod_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v1360-IEs ::= SEQUENCE +struct sib_type1_v1360_ies_s { + // member variables + bool cell_sel_info_ce1_v1360_present; + bool non_crit_ext_present; + cell_sel_info_ce1_v1360_s cell_sel_info_ce1_v1360; + sib_type1_v1430_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1360_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandClassListCDMA2000 ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandClassInfoCDMA2000 +typedef dyn_array band_class_list_cdma2000_l; + +// InterFreqCarrierFreqInfo-v10l0 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v10l0_s { + // member variables + bool freq_band_info_v10l0_present; + bool multi_band_info_list_v10l0_present; + ns_pmax_list_v10l0_l freq_band_info_v10l0; + multi_band_info_list_v10l0_l multi_band_info_list_v10l0; + + // sequence methods + inter_freq_carrier_freq_info_v10l0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MultiBandInfo-v9e0 ::= SEQUENCE +struct multi_band_info_v9e0_s { + // member variables + bool freq_band_ind_v9e0_present; + uint16_t freq_band_ind_v9e0; + + // sequence methods + multi_band_info_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MultiBandInfoList-v10j0 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF NS-PmaxList-r10 +typedef dyn_array multi_band_info_list_v10j0_l; + +// NeighCellCDMA2000-r11 ::= SEQUENCE +struct neigh_cell_cdma2000_r11_s { + typedef dyn_array neigh_freq_info_list_r11_l_; + + // member variables + bandclass_cdma2000_e band_class; + neigh_freq_info_list_r11_l_ neigh_freq_info_list_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellsPerBandclassCDMA2000 ::= SEQUENCE +struct neigh_cells_per_bandclass_cdma2000_s { + // member variables + uint16_t arfcn; + pci_list_cdma2000_l pci_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellsPerBandclassCDMA2000-v920 ::= SEQUENCE +struct neigh_cells_per_bandclass_cdma2000_v920_s { + // member variables + pci_list_cdma2000_v920_l pci_list_v920; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysCellIdRange ::= SEQUENCE +struct pci_range_s { + struct range_e_ { + enum options { n4, n8, n12, n16, n24, n32, n48, n64, n84, n96, n128, n168, n252, n504, spare2, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + range_e_() {} + range_e_(options v) : value(v) {} + range_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool range_present; + uint16_t start; + range_e_ range; + + // sequence methods + pci_range_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Q-OffsetRange ::= ENUMERATED +struct q_offset_range_e { + enum options { + db_minus24, + db_minus22, + db_minus20, + db_minus18, + db_minus16, + db_minus14, + db_minus12, + db_minus10, + db_minus8, + db_minus6, + db_minus5, + db_minus4, + db_minus3, + db_minus2, + db_minus1, + db0, + db1, + db2, + db3, + db4, + db5, + db6, + db8, + db10, + db12, + db14, + db16, + db18, + db20, + db22, + db24 + }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 31, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + q_offset_range_e() {} + q_offset_range_e(options v) : value(v) {} + q_offset_range_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; +}; + +// RedistributionNeighCell-r13 ::= SEQUENCE +struct redist_neigh_cell_r13_s { + // member variables + uint16_t pci_r13; + uint8_t redist_factor_cell_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscTxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-DiscResourcePool-r12 +typedef dyn_array sl_disc_tx_pool_list_r12_l; + +// SL-DiscTxPowerInfo-r12 ::= SEQUENCE +struct sl_disc_tx_pwr_info_r12_s { + // member variables + bool ext; + int8_t disc_max_tx_pwr_r12; + // ... + + // sequence methods + sl_disc_tx_pwr_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-FreqSelectionConfig-r15 ::= SEQUENCE +struct sl_v2x_freq_sel_cfg_r15_s { + // member variables + bool thresh_cbr_freq_resel_r15_present; + bool thresh_cbr_freq_keeping_r15_present; + sl_prio_list_r13_l prio_list_r15; + uint8_t thresh_cbr_freq_resel_r15; + uint8_t thresh_cbr_freq_keeping_r15; + + // sequence methods + sl_v2x_freq_sel_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-InterFreqUE-Config-r14 ::= SEQUENCE +struct sl_v2x_inter_freq_ue_cfg_r14_s { + // member variables + bool ext; + bool pci_list_r14_present; + bool type_tx_sync_r14_present; + bool v2x_sync_cfg_r14_present; + bool v2x_comm_rx_pool_r14_present; + bool v2x_comm_tx_pool_normal_r14_present; + bool p2x_comm_tx_pool_normal_r14_present; + bool v2x_comm_tx_pool_exceptional_r14_present; + bool v2x_res_sel_cfg_r14_present; + bool zone_cfg_r14_present; + bool offset_dfn_r14_present; + pci_list_r13_l pci_list_r14; + sl_type_tx_sync_r14_e type_tx_sync_r14; + sl_sync_cfg_list_nfreq_v2x_r14_l v2x_sync_cfg_r14; + sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14; + sl_comm_tx_pool_list_v2x_r14_l v2x_comm_tx_pool_normal_r14; + sl_comm_tx_pool_list_v2x_r14_l p2x_comm_tx_pool_normal_r14; + sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14; + sl_comm_tx_pool_sensing_cfg_r14_s v2x_res_sel_cfg_r14; + sl_zone_cfg_r14_s zone_cfg_r14; + uint16_t offset_dfn_r14; + // ... + + // sequence methods + sl_v2x_inter_freq_ue_cfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingInfo-BR-r13 ::= SEQUENCE +struct sched_info_br_r13_s { + struct si_tbs_r13_e_ { + enum options { b152, b208, b256, b328, b408, b504, b600, b712, b808, b936 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 10, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_tbs_r13_e_() {} + si_tbs_r13_e_(options v) : value(v) {} + si_tbs_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + uint8_t si_nb_r13; + si_tbs_r13_e_ si_tbs_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecondaryPreRegistrationZoneIdListHRPD ::= SEQUENCE (SIZE (1..2)) OF INTEGER +typedef bounded_array secondary_pre_regist_zone_id_list_hrpd_l; + +// SpeedStateScaleFactors ::= SEQUENCE +struct speed_state_scale_factors_s { + struct sf_medium_e_ { + enum options { o_dot25, o_dot5, o_dot75, l_dot0 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_medium_e_() {} + sf_medium_e_(options v) : value(v) {} + sf_medium_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct sf_high_e_ { + enum options { o_dot25, o_dot5, o_dot75, l_dot0 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_high_e_() {} + sf_high_e_(options v) : value(v) {} + sf_high_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + sf_medium_e_ sf_medium; + sf_high_e_ sf_high; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v1350-IEs ::= SEQUENCE +struct sib_type1_v1350_ies_s { + // member variables + bool cell_sel_info_ce1_r13_present; + bool non_crit_ext_present; + cell_sel_info_ce1_r13_s cell_sel_info_ce1_r13; + sib_type1_v1360_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1350_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType5-v13a0-IEs ::= SEQUENCE +struct sib_type5_v13a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool inter_freq_carrier_freq_list_v13a0_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + inter_freq_carrier_freq_list_v13a0_l inter_freq_carrier_freq_list_v13a0; + + // sequence methods + sib_type5_v13a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AC-BarringConfig1XRTT-r9 ::= SEQUENCE +struct ac_barr_cfg1_xrtt_r9_s { + // member variables + uint8_t ac_barr0to9_r9; + uint8_t ac_barr10_r9; + uint8_t ac_barr11_r9; + uint8_t ac_barr12_r9; + uint8_t ac_barr13_r9; + uint8_t ac_barr14_r9; + uint8_t ac_barr15_r9; + uint8_t ac_barr_msg_r9; + uint8_t ac_barr_reg_r9; + uint8_t ac_barr_emg_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AllowedMeasBandwidth ::= ENUMERATED +struct allowed_meas_bw_e { + enum options { mbw6, mbw15, mbw25, mbw50, mbw75, mbw100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + allowed_meas_bw_e() {} + allowed_meas_bw_e(options v) : value(v) {} + allowed_meas_bw_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// BandIndicatorGERAN ::= ENUMERATED +struct band_ind_geran_e { + enum options { dcs1800, pcs1900 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + band_ind_geran_e() {} + band_ind_geran_e(options v) : value(v) {} + band_ind_geran_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// BarringPerACDC-Category-r13 ::= SEQUENCE +struct barr_per_acdc_category_r13_s { + struct acdc_barr_cfg_r13_s_ { + struct ac_barr_factor_r13_e_ { + enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ac_barr_factor_r13_e_() {} + ac_barr_factor_r13_e_(options v) : value(v) {} + ac_barr_factor_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct ac_barr_time_r13_e_ { + enum options { s4, s8, s16, s32, s64, s128, s256, s512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ac_barr_time_r13_e_() {} + ac_barr_time_r13_e_(options v) : value(v) {} + ac_barr_time_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + ac_barr_factor_r13_e_ ac_barr_factor_r13; + ac_barr_time_r13_e_ ac_barr_time_r13; + }; + + // member variables + bool acdc_barr_cfg_r13_present; + uint8_t acdc_category_r13; + acdc_barr_cfg_r13_s_ acdc_barr_cfg_r13; + + // sequence methods + barr_per_acdc_category_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSFB-RegistrationParam1XRTT ::= SEQUENCE +struct csfb_regist_param1_xrtt_s { + // member variables + fixed_bitstring<15> sid; + fixed_bitstring<16> nid; + bool multiple_sid; + bool multiple_nid; + bool home_reg; + bool foreign_sid_reg; + bool foreign_nid_reg; + bool param_reg; + bool pwr_up_reg; + fixed_bitstring<7> regist_period; + fixed_bitstring<12> regist_zone; + fixed_bitstring<3> total_zone; + fixed_bitstring<3> zone_timer; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSFB-RegistrationParam1XRTT-v920 ::= SEQUENCE +struct csfb_regist_param1_xrtt_v920_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellList-r15 ::= SEQUENCE (SIZE (1.. maxCellMeasIdle-r15)) OF PhysCellIdRange +typedef dyn_array cell_list_r15_l; + +// CellReselectionParametersCDMA2000-r11 ::= SEQUENCE +struct cell_resel_params_cdma2000_r11_s { + typedef dyn_array neigh_cell_list_r11_l_; + + // member variables + bool t_resel_cdma2000_sf_present; + band_class_list_cdma2000_l band_class_list; + neigh_cell_list_r11_l_ neigh_cell_list_r11; + uint8_t t_resel_cdma2000; + speed_state_scale_factors_s t_resel_cdma2000_sf; + + // sequence methods + cell_resel_params_cdma2000_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfoCE-r13 ::= SEQUENCE +struct cell_sel_info_ce_r13_s { + // member variables + bool q_qual_min_rsrq_ce_r13_present; + int8_t q_rx_lev_min_ce_r13; + int8_t q_qual_min_rsrq_ce_r13; + + // sequence methods + cell_sel_info_ce_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfoNFreq-r13 ::= SEQUENCE +struct cell_sel_info_nfreq_r13_s { + struct q_hyst_r13_e_ { + enum options { db0, db1, db2, db3, db4, db5, db6, db8, db10, db12, db14, db16, db18, db20, db22, db24 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + q_hyst_r13_e_() {} + q_hyst_r13_e_(options v) : value(v) {} + q_hyst_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool q_rx_lev_min_offset_present; + int8_t q_rx_lev_min_r13; + uint8_t q_rx_lev_min_offset; + q_hyst_r13_e_ q_hyst_r13; + int8_t q_rx_lev_min_resel_r13; + uint8_t t_resel_eutra_r13; + + // sequence methods + cell_sel_info_nfreq_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ExplicitListOfARFCNs ::= SEQUENCE (SIZE (0..31)) OF INTEGER +typedef bounded_array explicit_list_of_arfcns_l; + +// InterFreqCarrierFreqInfo-v10j0 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v10j0_s { + // member variables + bool freq_band_info_r10_present; + bool multi_band_info_list_v10j0_present; + ns_pmax_list_r10_l freq_band_info_r10; + multi_band_info_list_v10j0_l multi_band_info_list_v10j0; + + // sequence methods + inter_freq_carrier_freq_info_v10j0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqNeighCellInfo ::= SEQUENCE +struct inter_freq_neigh_cell_info_s { + // member variables + uint16_t pci; + q_offset_range_e q_offset_cell; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MultiBandInfoList-v9e0 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF MultiBandInfo-v9e0 +typedef dyn_array multi_band_info_list_v9e0_l; + +// NS-PmaxValueNR-r15 ::= SEQUENCE +struct ns_pmax_value_nr_r15_s { + // member variables + bool add_pmax_nr_r15_present; + int8_t add_pmax_nr_r15; + uint8_t add_spec_emission_nr_r15; + + // sequence methods + ns_pmax_value_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellsPerBandclassListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000 +typedef dyn_array neigh_cells_per_bandclass_list_cdma2000_l; + +// NeighCellsPerBandclassListCDMA2000-v920 ::= SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000-v920 +typedef dyn_array neigh_cells_per_bandclass_list_cdma2000_v920_l; + +// PLMN-IdentityInfo2-r12 ::= CHOICE +struct plmn_id_info2_r12_c { + struct types { + enum options { plmn_idx_r12, plmn_id_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + plmn_id_info2_r12_c() : type_(types::nulltype) {} + plmn_id_info2_r12_c(const plmn_id_info2_r12_c& other); + plmn_id_info2_r12_c& operator=(const plmn_id_info2_r12_c& other); + ~plmn_id_info2_r12_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& plmn_idx_r12() + { + assert_choice_type("plmn-Index-r12", type_.to_string(), "PLMN-IdentityInfo2-r12"); + return c.get(); + } + plmn_id_s& plmn_id_r12() + { + assert_choice_type("plmnIdentity-r12", type_.to_string(), "PLMN-IdentityInfo2-r12"); + return c.get(); + } + const uint8_t& plmn_idx_r12() const + { + assert_choice_type("plmn-Index-r12", type_.to_string(), "PLMN-IdentityInfo2-r12"); + return c.get(); + } + const plmn_id_s& plmn_id_r12() const + { + assert_choice_type("plmnIdentity-r12", type_.to_string(), "PLMN-IdentityInfo2-r12"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// PRACH-ParametersCE-r13 ::= SEQUENCE +struct prach_params_ce_r13_s { + struct prach_start_sf_r13_e_ { + enum options { sf2, sf4, sf8, sf16, sf32, sf64, sf128, sf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + prach_start_sf_r13_e_() {} + prach_start_sf_r13_e_(options v) : value(v) {} + prach_start_sf_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct max_num_preamb_attempt_ce_r13_e_ { + enum options { n3, n4, n5, n6, n7, n8, n10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_preamb_attempt_ce_r13_e_() {} + max_num_preamb_attempt_ce_r13_e_(options v) : value(v) {} + max_num_preamb_attempt_ce_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct num_repeat_per_preamb_attempt_r13_e_ { + enum options { n1, n2, n4, n8, n16, n32, n64, n128 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + num_repeat_per_preamb_attempt_r13_e_() {} + num_repeat_per_preamb_attempt_r13_e_(options v) : value(v) {} + num_repeat_per_preamb_attempt_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef bounded_array mpdcch_nbs_to_monitor_r13_l_; + struct mpdcch_num_repeat_ra_r13_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, r128, r256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_num_repeat_ra_r13_e_() {} + mpdcch_num_repeat_ra_r13_e_(options v) : value(v) {} + mpdcch_num_repeat_ra_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct prach_hop_cfg_r13_e_ { + enum options { on, off }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + prach_hop_cfg_r13_e_() {} + prach_hop_cfg_r13_e_(options v) : value(v) {} + prach_hop_cfg_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool prach_start_sf_r13_present; + bool max_num_preamb_attempt_ce_r13_present; + uint8_t prach_cfg_idx_r13; + uint8_t prach_freq_offset_r13; + prach_start_sf_r13_e_ prach_start_sf_r13; + max_num_preamb_attempt_ce_r13_e_ max_num_preamb_attempt_ce_r13; + num_repeat_per_preamb_attempt_r13_e_ num_repeat_per_preamb_attempt_r13; + mpdcch_nbs_to_monitor_r13_l_ mpdcch_nbs_to_monitor_r13; + mpdcch_num_repeat_ra_r13_e_ mpdcch_num_repeat_ra_r13; + prach_hop_cfg_r13_e_ prach_hop_cfg_r13; + + // sequence methods + prach_params_ce_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PreRegistrationInfoHRPD ::= SEQUENCE +struct pre_regist_info_hrpd_s { + // member variables + bool pre_regist_zone_id_present; + bool secondary_pre_regist_zone_id_list_present; + bool pre_regist_allowed; + uint8_t pre_regist_zone_id; + secondary_pre_regist_zone_id_list_hrpd_l secondary_pre_regist_zone_id_list; + + // sequence methods + pre_regist_info_hrpd_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-CE-LevelInfo-r13 ::= SEQUENCE +struct rach_ce_level_info_r13_s { + struct preamb_map_info_r13_s_ { + // member variables + uint8_t first_preamb_r13; + uint8_t last_preamb_r13; + }; + struct ra_resp_win_size_r13_e_ { + enum options { sf20, sf50, sf80, sf120, sf180, sf240, sf320, sf400 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ra_resp_win_size_r13_e_() {} + ra_resp_win_size_r13_e_(options v) : value(v) {} + ra_resp_win_size_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct mac_contention_resolution_timer_r13_e_ { + enum options { sf80, sf100, sf120, sf160, sf200, sf240, sf480, sf960 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mac_contention_resolution_timer_r13_e_() {} + mac_contention_resolution_timer_r13_e_(options v) : value(v) {} + mac_contention_resolution_timer_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct rar_hop_cfg_r13_e_ { + enum options { on, off }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rar_hop_cfg_r13_e_() {} + rar_hop_cfg_r13_e_(options v) : value(v) {} + rar_hop_cfg_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct edt_params_r15_s_ { + struct edt_tbs_r15_e_ { + enum options { b328, b408, b504, b600, b712, b808, b936, b1000or456 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + edt_tbs_r15_e_() {} + edt_tbs_r15_e_(options v) : value(v) {} + edt_tbs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct mac_contention_resolution_timer_r15_e_ { + enum options { sf240, sf480, sf960, sf1920, sf3840, sf5760, sf7680, sf10240 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mac_contention_resolution_timer_r15_e_() {} + mac_contention_resolution_timer_r15_e_(options v) : value(v) {} + mac_contention_resolution_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool mac_contention_resolution_timer_r15_present; + uint8_t edt_last_preamb_r15; + bool edt_small_tbs_enabled_r15; + edt_tbs_r15_e_ edt_tbs_r15; + mac_contention_resolution_timer_r15_e_ mac_contention_resolution_timer_r15; + + // sequence methods + edt_params_r15_s_(); + }; + + // member variables + bool ext; + preamb_map_info_r13_s_ preamb_map_info_r13; + ra_resp_win_size_r13_e_ ra_resp_win_size_r13; + mac_contention_resolution_timer_r13_e_ mac_contention_resolution_timer_r13; + rar_hop_cfg_r13_e_ rar_hop_cfg_r13; + // ... + // group 0 + bool edt_params_r15_present; + copy_ptr edt_params_r15; + + // sequence methods + rach_ce_level_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RedistributionNeighCellList-r13 ::= SEQUENCE (SIZE (1..maxCellInter)) OF RedistributionNeighCell-r13 +typedef dyn_array redist_neigh_cell_list_r13_l; + +// SL-AllowedCarrierFreqList-r15 ::= SEQUENCE +struct sl_allowed_carrier_freq_list_r15_s { + typedef bounded_array allowed_carrier_freq_set1_l_; + typedef bounded_array allowed_carrier_freq_set2_l_; + + // member variables + allowed_carrier_freq_set1_l_ allowed_carrier_freq_set1; + allowed_carrier_freq_set2_l_ allowed_carrier_freq_set2; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DestinationInfoList-r12 ::= SEQUENCE (SIZE (1..maxSL-Dest-r12)) OF BIT STRING +typedef bounded_array, 16> sl_dest_info_list_r12_l; + +// SL-DiscRxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-RxPool-r12)) OF SL-DiscResourcePool-r12 +typedef dyn_array sl_disc_rx_pool_list_r12_l; + +// SL-DiscTxPowerInfoList-r12 ::= SEQUENCE (SIZE (maxSL-DiscPowerClass-r12)) OF SL-DiscTxPowerInfo-r12 +typedef fixed_array sl_disc_tx_pwr_info_list_r12_l; + +// SL-DiscTxResourcesInterFreq-r13 ::= CHOICE +struct sl_disc_tx_res_inter_freq_r13_c { + struct types { + enum options { + acquire_si_from_carrier_r13, + disc_tx_pool_common_r13, + request_ded_r13, + no_tx_on_carrier_r13, + nulltype + }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sl_disc_tx_res_inter_freq_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_disc_tx_pool_list_r12_l& disc_tx_pool_common_r13() + { + assert_choice_type("discTxPoolCommon-r13", type_.to_string(), "SL-DiscTxResourcesInterFreq-r13"); + return c; + } + const sl_disc_tx_pool_list_r12_l& disc_tx_pool_common_r13() const + { + assert_choice_type("discTxPoolCommon-r13", type_.to_string(), "SL-DiscTxResourcesInterFreq-r13"); + return c; + } + +private: + types type_; + sl_disc_tx_pool_list_r12_l c; +}; + +// SL-SyncConfigListNFreq-r13 ::= SEQUENCE (SIZE (1..maxSL-SyncConfig-r12)) OF SL-SyncConfigNFreq-r13 +typedef dyn_array sl_sync_cfg_list_nfreq_r13_l; + +// SL-V2X-FreqSelectionConfigList-r15 ::= SEQUENCE (SIZE (1..8)) OF SL-V2X-FreqSelectionConfig-r15 +typedef dyn_array sl_v2x_freq_sel_cfg_list_r15_l; + +// SL-V2X-UE-ConfigList-r14 ::= SEQUENCE (SIZE (1.. maxCellIntra)) OF SL-V2X-InterFreqUE-Config-r14 +typedef dyn_array sl_v2x_ue_cfg_list_r14_l; + +// SchedulingInfoList-BR-r13 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo-BR-r13 +typedef dyn_array sched_info_list_br_r13_l; + +// SystemInfoValueTagList-r13 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF INTEGER +typedef bounded_array sys_info_value_tag_list_r13_l; + +// SystemInformationBlockType1-v1320-IEs ::= SEQUENCE +struct sib_type1_v1320_ies_s { + struct freq_hop_params_dl_r13_s_ { + struct mpdcch_pdsch_hop_nb_r13_e_ { + enum options { nb2, nb4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_pdsch_hop_nb_r13_e_() {} + mpdcch_pdsch_hop_nb_r13_e_(options v) : value(v) {} + mpdcch_pdsch_hop_nb_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_dl_hop_cfg_common_mode_a_r13_c_ { + struct interv_fdd_r13_e_ { + enum options { int1, int2, int4, int8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_r13_e_() {} + interv_fdd_r13_e_(options v) : value(v) {} + interv_fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_r13_e_ { + enum options { int1, int5, int10, int20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_r13_e_() {} + interv_tdd_r13_e_(options v) : value(v) {} + interv_tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_r13, interv_tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + interv_dl_hop_cfg_common_mode_a_r13_c_() : type_(types::nulltype) {} + interv_dl_hop_cfg_common_mode_a_r13_c_(const interv_dl_hop_cfg_common_mode_a_r13_c_& other); + interv_dl_hop_cfg_common_mode_a_r13_c_& operator=(const interv_dl_hop_cfg_common_mode_a_r13_c_& other); + ~interv_dl_hop_cfg_common_mode_a_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_r13_e_& interv_fdd_r13() + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeA-r13"); + return c.get(); + } + interv_tdd_r13_e_& interv_tdd_r13() + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeA-r13"); + return c.get(); + } + const interv_fdd_r13_e_& interv_fdd_r13() const + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeA-r13"); + return c.get(); + } + const interv_tdd_r13_e_& interv_tdd_r13() const + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeA-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct interv_dl_hop_cfg_common_mode_b_r13_c_ { + struct interv_fdd_r13_e_ { + enum options { int2, int4, int8, int16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_r13_e_() {} + interv_fdd_r13_e_(options v) : value(v) {} + interv_fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_r13_e_ { + enum options { int5, int10, int20, int40 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_r13_e_() {} + interv_tdd_r13_e_(options v) : value(v) {} + interv_tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_r13, interv_tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + interv_dl_hop_cfg_common_mode_b_r13_c_() : type_(types::nulltype) {} + interv_dl_hop_cfg_common_mode_b_r13_c_(const interv_dl_hop_cfg_common_mode_b_r13_c_& other); + interv_dl_hop_cfg_common_mode_b_r13_c_& operator=(const interv_dl_hop_cfg_common_mode_b_r13_c_& other); + ~interv_dl_hop_cfg_common_mode_b_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_r13_e_& interv_fdd_r13() + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeB-r13"); + return c.get(); + } + interv_tdd_r13_e_& interv_tdd_r13() + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeB-r13"); + return c.get(); + } + const interv_fdd_r13_e_& interv_fdd_r13() const + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeB-r13"); + return c.get(); + } + const interv_tdd_r13_e_& interv_tdd_r13() const + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-DLHoppingConfigCommonModeB-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool mpdcch_pdsch_hop_nb_r13_present; + bool interv_dl_hop_cfg_common_mode_a_r13_present; + bool interv_dl_hop_cfg_common_mode_b_r13_present; + bool mpdcch_pdsch_hop_offset_r13_present; + mpdcch_pdsch_hop_nb_r13_e_ mpdcch_pdsch_hop_nb_r13; + interv_dl_hop_cfg_common_mode_a_r13_c_ interv_dl_hop_cfg_common_mode_a_r13; + interv_dl_hop_cfg_common_mode_b_r13_c_ interv_dl_hop_cfg_common_mode_b_r13; + uint8_t mpdcch_pdsch_hop_offset_r13; + + // sequence methods + freq_hop_params_dl_r13_s_(); + }; + + // member variables + bool freq_hop_params_dl_r13_present; + bool non_crit_ext_present; + freq_hop_params_dl_r13_s_ freq_hop_params_dl_r13; + sib_type1_v1350_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1320_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE +struct sib_type2_v10m0_ies_s { + struct freq_info_v10l0_s_ { + // member variables + uint16_t add_spec_emission_v10l0; + }; + typedef bounded_array multi_band_info_list_v10l0_l_; + + // member variables + bool freq_info_v10l0_present; + bool multi_band_info_list_v10l0_present; + bool non_crit_ext_present; + freq_info_v10l0_s_ freq_info_v10l0; + multi_band_info_list_v10l0_l_ multi_band_info_list_v10l0; + + // sequence methods + sib_type2_v10m0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType5-v10l0-IEs ::= SEQUENCE +struct sib_type5_v10l0_ies_s { + typedef dyn_array inter_freq_carrier_freq_list_v10l0_l_; + + // member variables + bool inter_freq_carrier_freq_list_v10l0_present; + bool non_crit_ext_present; + inter_freq_carrier_freq_list_v10l0_l_ inter_freq_carrier_freq_list_v10l0; + sib_type5_v13a0_ies_s non_crit_ext; + + // sequence methods + sib_type5_v10l0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemTimeInfoCDMA2000 ::= SEQUENCE +struct sys_time_info_cdma2000_s { + struct cdma_sys_time_c_ { + struct types { + enum options { sync_sys_time, async_sys_time, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cdma_sys_time_c_() : type_(types::nulltype) {} + cdma_sys_time_c_(const cdma_sys_time_c_& other); + cdma_sys_time_c_& operator=(const cdma_sys_time_c_& other); + ~cdma_sys_time_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<39>& sync_sys_time() + { + assert_choice_type("synchronousSystemTime", type_.to_string(), "cdma-SystemTime"); + return c.get >(); + } + fixed_bitstring<49>& async_sys_time() + { + assert_choice_type("asynchronousSystemTime", type_.to_string(), "cdma-SystemTime"); + return c.get >(); + } + const fixed_bitstring<39>& sync_sys_time() const + { + assert_choice_type("synchronousSystemTime", type_.to_string(), "cdma-SystemTime"); + return c.get >(); + } + const fixed_bitstring<49>& async_sys_time() const + { + assert_choice_type("asynchronousSystemTime", type_.to_string(), "cdma-SystemTime"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + bool cdma_eutra_synchronisation; + cdma_sys_time_c_ cdma_sys_time; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringPerCat-r15 ::= SEQUENCE +struct uac_barr_per_cat_r15_s { + // member variables + uint8_t access_category_r15; + uint8_t uac_barr_info_set_idx_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AC-BarringConfig ::= SEQUENCE +struct ac_barr_cfg_s { + struct ac_barr_factor_e_ { + enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ac_barr_factor_e_() {} + ac_barr_factor_e_(options v) : value(v) {} + ac_barr_factor_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct ac_barr_time_e_ { + enum options { s4, s8, s16, s32, s64, s128, s256, s512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ac_barr_time_e_() {} + ac_barr_time_e_(options v) : value(v) {} + ac_barr_time_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + ac_barr_factor_e_ ac_barr_factor; + ac_barr_time_e_ ac_barr_time; + fixed_bitstring<5> ac_barr_for_special_ac; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BarringPerACDC-CategoryList-r13 ::= SEQUENCE (SIZE (1..maxACDC-Cat-r13)) OF BarringPerACDC-Category-r13 +typedef dyn_array barr_per_acdc_category_list_r13_l; + +// CarrierFreqsGERAN ::= SEQUENCE +struct carrier_freqs_geran_s { + struct following_arfcns_c_ { + struct equally_spaced_arfcns_s_ { + // member variables + uint8_t arfcn_spacing; + uint8_t nof_following_arfcns; + }; + struct types { + enum options { explicit_list_of_arfcns, equally_spaced_arfcns, variable_bit_map_of_arfcns, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + following_arfcns_c_() : type_(types::nulltype) {} + following_arfcns_c_(const following_arfcns_c_& other); + following_arfcns_c_& operator=(const following_arfcns_c_& other); + ~following_arfcns_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + explicit_list_of_arfcns_l& explicit_list_of_arfcns() + { + assert_choice_type("explicitListOfARFCNs", type_.to_string(), "followingARFCNs"); + return c.get(); + } + equally_spaced_arfcns_s_& equally_spaced_arfcns() + { + assert_choice_type("equallySpacedARFCNs", type_.to_string(), "followingARFCNs"); + return c.get(); + } + dyn_octstring& variable_bit_map_of_arfcns() + { + assert_choice_type("variableBitMapOfARFCNs", type_.to_string(), "followingARFCNs"); + return c.get(); + } + const explicit_list_of_arfcns_l& explicit_list_of_arfcns() const + { + assert_choice_type("explicitListOfARFCNs", type_.to_string(), "followingARFCNs"); + return c.get(); + } + const equally_spaced_arfcns_s_& equally_spaced_arfcns() const + { + assert_choice_type("equallySpacedARFCNs", type_.to_string(), "followingARFCNs"); + return c.get(); + } + const dyn_octstring& variable_bit_map_of_arfcns() const + { + assert_choice_type("variableBitMapOfARFCNs", type_.to_string(), "followingARFCNs"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + uint16_t start_arfcn; + band_ind_geran_e band_ind; + following_arfcns_c_ following_arfcns; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellReselectionSubPriority-r13 ::= ENUMERATED +struct cell_resel_sub_prio_r13_e { + enum options { o_dot2, o_dot4, o_dot6, o_dot8 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_resel_sub_prio_r13_e() {} + cell_resel_sub_prio_r13_e(options v) : value(v) {} + cell_resel_sub_prio_r13_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; + +// CellSelectionInfo-v1250 ::= SEQUENCE +struct cell_sel_info_v1250_s { + // member variables + int8_t q_qual_min_rsrq_on_all_symbols_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DeltaFList-PUCCH ::= SEQUENCE +struct delta_flist_pucch_s { + struct delta_f_pucch_format1_e_ { + enum options { delta_f_minus2, delta_f0, delta_f2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format1_e_() {} + delta_f_pucch_format1_e_(options v) : value(v) {} + delta_f_pucch_format1_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_pucch_format1b_e_ { + enum options { delta_f1, delta_f3, delta_f5 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format1b_e_() {} + delta_f_pucch_format1b_e_(options v) : value(v) {} + delta_f_pucch_format1b_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_pucch_format2_e_ { + enum options { delta_f_minus2, delta_f0, delta_f1, delta_f2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format2_e_() {} + delta_f_pucch_format2_e_(options v) : value(v) {} + delta_f_pucch_format2_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_pucch_format2a_e_ { + enum options { delta_f_minus2, delta_f0, delta_f2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format2a_e_() {} + delta_f_pucch_format2a_e_(options v) : value(v) {} + delta_f_pucch_format2a_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_pucch_format2b_e_ { + enum options { delta_f_minus2, delta_f0, delta_f2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format2b_e_() {} + delta_f_pucch_format2b_e_(options v) : value(v) {} + delta_f_pucch_format2b_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + delta_f_pucch_format1_e_ delta_f_pucch_format1; + delta_f_pucch_format1b_e_ delta_f_pucch_format1b; + delta_f_pucch_format2_e_ delta_f_pucch_format2; + delta_f_pucch_format2a_e_ delta_f_pucch_format2a; + delta_f_pucch_format2b_e_ delta_f_pucch_format2b; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EDT-PRACH-ParametersCE-r15 ::= SEQUENCE +struct edt_prach_params_ce_r15_s { + struct edt_prach_params_ce_r15_s_ { + struct prach_start_sf_r15_e_ { + enum options { sf2, sf4, sf8, sf16, sf32, sf64, sf128, sf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + prach_start_sf_r15_e_() {} + prach_start_sf_r15_e_(options v) : value(v) {} + prach_start_sf_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + typedef bounded_array mpdcch_nbs_to_monitor_r15_l_; + + // member variables + bool prach_start_sf_r15_present; + uint8_t prach_cfg_idx_r15; + uint8_t prach_freq_offset_r15; + prach_start_sf_r15_e_ prach_start_sf_r15; + mpdcch_nbs_to_monitor_r15_l_ mpdcch_nbs_to_monitor_r15; + + // sequence methods + edt_prach_params_ce_r15_s_(); + }; + + // member variables + bool edt_prach_params_ce_r15_present; + edt_prach_params_ce_r15_s_ edt_prach_params_ce_r15; + + // sequence methods + edt_prach_params_ce_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FilterCoefficient ::= ENUMERATED +struct filt_coef_e { + enum options { fc0, fc1, fc2, fc3, fc4, fc5, fc6, fc7, fc8, fc9, fc11, fc13, fc15, fc17, fc19, spare1, /*...*/ }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + filt_coef_e() {} + filt_coef_e(options v) : value(v) {} + filt_coef_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// InterFreqBlackCellList ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PhysCellIdRange +typedef dyn_array inter_freq_black_cell_list_l; + +// InterFreqCarrierFreqInfo-v9e0 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v9e0_s { + // member variables + bool dl_carrier_freq_v9e0_present; + bool multi_band_info_list_v9e0_present; + uint32_t dl_carrier_freq_v9e0; + multi_band_info_list_v9e0_l multi_band_info_list_v9e0; + + // sequence methods + inter_freq_carrier_freq_info_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo +typedef dyn_array inter_freq_neigh_cell_list_l; + +// InterFreqNeighHSDN-CellList-r15 ::= SEQUENCE (SIZE (1..maxCellInter)) OF PhysCellIdRange +typedef dyn_array inter_freq_neigh_hsdn_cell_list_r15_l; + +// MBMS-SAI-List-r11 ::= SEQUENCE (SIZE (1..maxSAI-MBMS-r11)) OF INTEGER +typedef dyn_array mbms_sai_list_r11_l; + +// MTC-SSB-NR-r15 ::= SEQUENCE +struct mtc_ssb_nr_r15_s { + struct periodicity_and_offset_r15_c_ { + struct types { + enum options { sf5_r15, sf10_r15, sf20_r15, sf40_r15, sf80_r15, sf160_r15, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + periodicity_and_offset_r15_c_() : type_(types::nulltype) {} + periodicity_and_offset_r15_c_(const periodicity_and_offset_r15_c_& other); + periodicity_and_offset_r15_c_& operator=(const periodicity_and_offset_r15_c_& other); + ~periodicity_and_offset_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf5_r15() + { + assert_choice_type("sf5-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + uint8_t& sf10_r15() + { + assert_choice_type("sf10-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + uint8_t& sf20_r15() + { + assert_choice_type("sf20-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + uint8_t& sf40_r15() + { + assert_choice_type("sf40-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + uint8_t& sf80_r15() + { + assert_choice_type("sf80-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + uint8_t& sf160_r15() + { + assert_choice_type("sf160-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + const uint8_t& sf5_r15() const + { + assert_choice_type("sf5-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + const uint8_t& sf10_r15() const + { + assert_choice_type("sf10-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + const uint8_t& sf20_r15() const + { + assert_choice_type("sf20-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + const uint8_t& sf40_r15() const + { + assert_choice_type("sf40-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + const uint8_t& sf80_r15() const + { + assert_choice_type("sf80-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + const uint8_t& sf160_r15() const + { + assert_choice_type("sf160-r15", type_.to_string(), "periodicityAndOffset-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct ssb_dur_r15_e_ { + enum options { sf1, sf2, sf3, sf4, sf5 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ssb_dur_r15_e_() {} + ssb_dur_r15_e_(options v) : value(v) {} + ssb_dur_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + periodicity_and_offset_r15_c_ periodicity_and_offset_r15; + ssb_dur_r15_e_ ssb_dur_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasIdleCarrierEUTRA-r15 ::= SEQUENCE +struct meas_idle_carrier_eutra_r15_s { + struct report_quantities_e_ { + enum options { rsrp, rsrq, both }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_quantities_e_() {} + report_quantities_e_(options v) : value(v) {} + report_quantities_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct quality_thres_r15_s_ { + // member variables + bool idle_rsrp_thres_r15_present; + bool idle_rsrq_thres_r15_present; + uint8_t idle_rsrp_thres_r15; + int8_t idle_rsrq_thres_r15; + + // sequence methods + quality_thres_r15_s_(); + }; + + // member variables + bool ext; + bool validity_area_r15_present; + bool meas_cell_list_r15_present; + bool quality_thres_r15_present; + uint32_t carrier_freq_r15; + allowed_meas_bw_e allowed_meas_bw_r15; + cell_list_r15_l validity_area_r15; + cell_list_r15_l meas_cell_list_r15; + report_quantities_e_ report_quantities; + quality_thres_r15_s_ quality_thres_r15; + // ... + + // sequence methods + meas_idle_carrier_eutra_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MultiBandInfoList ::= SEQUENCE (SIZE (1..maxMultiBands)) OF INTEGER +typedef bounded_array multi_band_info_list_l; + +// MultiBandInfoList-r11 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF INTEGER +typedef bounded_array multi_band_info_list_r11_l; + +// MultiFrequencyBandListNR-r15 ::= SEQUENCE (SIZE (1.. maxMultiBandsNR-r15)) OF INTEGER +typedef bounded_array multi_freq_band_list_nr_r15_l; + +// N1PUCCH-AN-InfoList-r13 ::= SEQUENCE (SIZE(1..maxCE-Level-r13)) OF INTEGER +typedef bounded_array n1_pucch_an_info_list_r13_l; + +// NS-PmaxListNR-r15 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxValueNR-r15 +typedef dyn_array ns_pmax_list_nr_r15_l; + +// NeighCellCDMA2000 ::= SEQUENCE +struct neigh_cell_cdma2000_s { + // member variables + bandclass_cdma2000_e band_class; + neigh_cells_per_bandclass_list_cdma2000_l neigh_cells_per_freq_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellCDMA2000-v920 ::= SEQUENCE +struct neigh_cell_cdma2000_v920_s { + // member variables + neigh_cells_per_bandclass_list_cdma2000_v920_l neigh_cells_per_freq_list_v920; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList4-r12 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo2-r12 +typedef dyn_array plmn_id_list4_r12_l; + +// PRACH-ConfigInfo ::= SEQUENCE +struct prach_cfg_info_s { + // member variables + uint8_t prach_cfg_idx; + bool high_speed_flag; + uint8_t zero_correlation_zone_cfg; + uint8_t prach_freq_offset; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-ParametersListCE-r13 ::= SEQUENCE (SIZE(1..maxCE-Level-r13)) OF PRACH-ParametersCE-r13 +typedef dyn_array prach_params_list_ce_r13_l; + +// ParametersCDMA2000-r11 ::= SEQUENCE +struct params_cdma2000_r11_s { + struct sys_time_info_r11_c_ { + struct types { + enum options { explicit_value, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sys_time_info_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sys_time_info_cdma2000_s& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "systemTimeInfo-r11"); + return c; + } + const sys_time_info_cdma2000_s& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "systemTimeInfo-r11"); + return c; + } + + private: + types type_; + sys_time_info_cdma2000_s c; + }; + struct params_hrpd_r11_s_ { + // member variables + bool cell_resel_params_hrpd_r11_present; + pre_regist_info_hrpd_s pre_regist_info_hrpd_r11; + cell_resel_params_cdma2000_r11_s cell_resel_params_hrpd_r11; + + // sequence methods + params_hrpd_r11_s_(); + }; + struct params1_xrtt_r11_s_ { + // member variables + bool csfb_regist_param1_xrtt_r11_present; + bool csfb_regist_param1_xrtt_ext_r11_present; + bool long_code_state1_xrtt_r11_present; + bool cell_resel_params1_xrtt_r11_present; + bool ac_barr_cfg1_xrtt_r11_present; + bool csfb_support_for_dual_rx_ues_r11_present; + bool csfb_dual_rx_tx_support_r11_present; + csfb_regist_param1_xrtt_s csfb_regist_param1_xrtt_r11; + csfb_regist_param1_xrtt_v920_s csfb_regist_param1_xrtt_ext_r11; + fixed_bitstring<42> long_code_state1_xrtt_r11; + cell_resel_params_cdma2000_r11_s cell_resel_params1_xrtt_r11; + ac_barr_cfg1_xrtt_r9_s ac_barr_cfg1_xrtt_r11; + bool csfb_support_for_dual_rx_ues_r11; + + // sequence methods + params1_xrtt_r11_s_(); + }; + + // member variables + bool ext; + bool sys_time_info_r11_present; + bool params_hrpd_r11_present; + bool params1_xrtt_r11_present; + sys_time_info_r11_c_ sys_time_info_r11; + uint8_t search_win_size_r11; + params_hrpd_r11_s_ params_hrpd_r11; + params1_xrtt_r11_s_ params1_xrtt_r11; + // ... + + // sequence methods + params_cdma2000_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PowerRampingParameters ::= SEQUENCE +struct pwr_ramp_params_s { + struct pwr_ramp_step_e_ { + enum options { db0, db2, db4, db6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pwr_ramp_step_e_() {} + pwr_ramp_step_e_(options v) : value(v) {} + pwr_ramp_step_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct preamb_init_rx_target_pwr_e_ { + enum options { + dbm_minus120, + dbm_minus118, + dbm_minus116, + dbm_minus114, + dbm_minus112, + dbm_minus110, + dbm_minus108, + dbm_minus106, + dbm_minus104, + dbm_minus102, + dbm_minus100, + dbm_minus98, + dbm_minus96, + dbm_minus94, + dbm_minus92, + dbm_minus90 + }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + preamb_init_rx_target_pwr_e_() {} + preamb_init_rx_target_pwr_e_(options v) : value(v) {} + preamb_init_rx_target_pwr_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + pwr_ramp_step_e_ pwr_ramp_step; + preamb_init_rx_target_pwr_e_ preamb_init_rx_target_pwr; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PreambleTransMax ::= ENUMERATED +struct preamb_trans_max_e { + enum options { n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 11, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + preamb_trans_max_e() {} + preamb_trans_max_e(options v) : value(v) {} + preamb_trans_max_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// RACH-CE-LevelInfoList-r13 ::= SEQUENCE (SIZE (1..maxCE-Level-r13)) OF RACH-CE-LevelInfo-r13 +typedef dyn_array rach_ce_level_info_list_r13_l; + +// RSRP-ThresholdsPrachInfoList-r13 ::= SEQUENCE (SIZE(1..3)) OF INTEGER +typedef bounded_array rsrp_thress_prach_info_list_r13_l; + +// RedistributionInterFreqInfo-r13 ::= SEQUENCE +struct redist_inter_freq_info_r13_s { + // member variables + bool redist_factor_freq_r13_present; + bool redist_neigh_cell_list_r13_present; + uint8_t redist_factor_freq_r13; + redist_neigh_cell_list_r13_l redist_neigh_cell_list_r13; + + // sequence methods + redist_inter_freq_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CBR-Levels-Config-r14 ::= SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF INTEGER +typedef bounded_array sl_cbr_levels_cfg_r14_l; + +// SL-CBR-PSSCH-TxConfig-r14 ::= SEQUENCE +struct sl_cbr_pssch_tx_cfg_r14_s { + // member variables + uint16_t cr_limit_r14; + sl_pssch_tx_params_r14_s tx_params_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscConfigOtherInterFreq-r13 ::= SEQUENCE +struct sl_disc_cfg_other_inter_freq_r13_s { + // member variables + bool tx_pwr_info_r13_present; + bool ref_carrier_common_r13_present; + bool disc_sync_cfg_r13_present; + bool disc_cell_sel_info_r13_present; + sl_disc_tx_pwr_info_list_r12_l tx_pwr_info_r13; + sl_sync_cfg_list_nfreq_r13_l disc_sync_cfg_r13; + cell_sel_info_nfreq_r13_s disc_cell_sel_info_r13; + + // sequence methods + sl_disc_cfg_other_inter_freq_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-HoppingConfigComm-r12 ::= SEQUENCE +struct sl_hop_cfg_comm_r12_s { + struct num_subbands_r12_e_ { + enum options { ns1, ns2, ns4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + num_subbands_r12_e_() {} + num_subbands_r12_e_(options v) : value(v) {} + num_subbands_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint16_t hop_param_r12; + num_subbands_r12_e_ num_subbands_r12; + uint8_t rb_offset_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-InterFreqInfoV2X-r14 ::= SEQUENCE +struct sl_inter_freq_info_v2x_r14_s { + struct sl_bw_r14_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_bw_r14_e_() {} + sl_bw_r14_e_(options v) : value(v) {} + sl_bw_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct add_spec_emission_v2x_r14_c_ { + struct types { + enum options { add_spec_emission_r14, add_spec_emission_v1440, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + add_spec_emission_v2x_r14_c_() : type_(types::nulltype) {} + add_spec_emission_v2x_r14_c_(const add_spec_emission_v2x_r14_c_& other); + add_spec_emission_v2x_r14_c_& operator=(const add_spec_emission_v2x_r14_c_& other); + ~add_spec_emission_v2x_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& add_spec_emission_r14() + { + assert_choice_type("additionalSpectrumEmission-r14", type_.to_string(), "additionalSpectrumEmissionV2X-r14"); + return c.get(); + } + uint16_t& add_spec_emission_v1440() + { + assert_choice_type("additionalSpectrumEmission-v1440", type_.to_string(), "additionalSpectrumEmissionV2X-r14"); + return c.get(); + } + const uint8_t& add_spec_emission_r14() const + { + assert_choice_type("additionalSpectrumEmission-r14", type_.to_string(), "additionalSpectrumEmissionV2X-r14"); + return c.get(); + } + const uint16_t& add_spec_emission_v1440() const + { + assert_choice_type("additionalSpectrumEmission-v1440", type_.to_string(), "additionalSpectrumEmissionV2X-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + bool plmn_id_list_r14_present; + bool sl_max_tx_pwr_r14_present; + bool sl_bw_r14_present; + bool v2x_sched_pool_r14_present; + bool v2x_ue_cfg_list_r14_present; + plmn_id_list_l plmn_id_list_r14; + uint32_t v2x_comm_carrier_freq_r14; + int8_t sl_max_tx_pwr_r14; + sl_bw_r14_e_ sl_bw_r14; + sl_comm_res_pool_v2x_r14_s v2x_sched_pool_r14; + sl_v2x_ue_cfg_list_r14_l v2x_ue_cfg_list_r14; + // ... + // group 0 + bool add_spec_emission_v2x_r14_present; + copy_ptr add_spec_emission_v2x_r14; + // group 1 + bool v2x_freq_sel_cfg_list_r15_present; + copy_ptr v2x_freq_sel_cfg_list_r15; + + // sequence methods + sl_inter_freq_info_v2x_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PPPR-Dest-CarrierFreq ::= SEQUENCE +struct sl_pppr_dest_carrier_freq_s { + // member variables + bool dest_info_list_r15_present; + bool allowed_carrier_freq_list_r15_present; + sl_dest_info_list_r12_l dest_info_list_r15; + sl_allowed_carrier_freq_list_r15_s allowed_carrier_freq_list_r15; + + // sequence methods + sl_pppr_dest_carrier_freq_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PeriodComm-r12 ::= ENUMERATED +struct sl_period_comm_r12_e { + enum options { + sf40, + sf60, + sf70, + sf80, + sf120, + sf140, + sf160, + sf240, + sf280, + sf320, + spare6, + spare5, + spare4, + spare3, + spare2, + spare + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_period_comm_r12_e() {} + sl_period_comm_r12_e(options v) : value(v) {} + sl_period_comm_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// SL-ResourcesInterFreq-r13 ::= SEQUENCE +struct sl_res_inter_freq_r13_s { + // member variables + bool disc_rx_res_inter_freq_r13_present; + bool disc_tx_res_inter_freq_r13_present; + sl_disc_rx_pool_list_r12_l disc_rx_res_inter_freq_r13; + sl_disc_tx_res_inter_freq_r13_c disc_tx_res_inter_freq_r13; + + // sequence methods + sl_res_inter_freq_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-SyncConfig-r12 ::= SEQUENCE +struct sl_sync_cfg_r12_s { + struct tx_params_r12_s_ { + // member variables + bool sync_info_reserved_r12_present; + sl_tx_params_r12_s sync_tx_params_r12; + uint8_t sync_tx_thresh_ic_r12; + fixed_bitstring<19> sync_info_reserved_r12; + + // sequence methods + tx_params_r12_s_(); + }; + struct rx_params_ncell_r12_s_ { + struct disc_sync_win_r12_e_ { + enum options { w1, w2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + disc_sync_win_r12_e_() {} + disc_sync_win_r12_e_(options v) : value(v) {} + disc_sync_win_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint16_t pci_r12; + disc_sync_win_r12_e_ disc_sync_win_r12; + }; + + // member variables + bool ext; + bool tx_params_r12_present; + bool rx_params_ncell_r12_present; + sl_cp_len_r12_e sync_cp_len_r12; + uint8_t sync_offset_ind_r12; + uint8_t slssid_r12; + tx_params_r12_s_ tx_params_r12; + rx_params_ncell_r12_s_ rx_params_ncell_r12; + // ... + // group 0 + bool sync_tx_periodic_r13_present; + // group 1 + bool sync_offset_ind_v1430_present; + bool gnss_sync_r14_present; + uint8_t sync_offset_ind_v1430; + // group 2 + bool sync_offset_ind2_r14_present; + bool sync_offset_ind3_r14_present; + uint8_t sync_offset_ind2_r14; + uint8_t sync_offset_ind3_r14; + // group 3 + bool slss_tx_disabled_r15_present; + + // sequence methods + sl_sync_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SS-RSSI-Measurement-r15 ::= SEQUENCE +struct ss_rssi_meas_r15_s { + // member variables + dyn_bitstring meas_slots_r15; + uint8_t end_symbol_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v10l0-IEs ::= SEQUENCE +struct sib_type1_v10l0_ies_s { + // member variables + bool freq_band_info_v10l0_present; + bool multi_band_info_list_v10l0_present; + bool non_crit_ext_present; + ns_pmax_list_v10l0_l freq_band_info_v10l0; + multi_band_info_list_v10l0_l multi_band_info_list_v10l0; + + // sequence methods + sib_type1_v10l0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v1310-IEs ::= SEQUENCE +struct sib_type1_v1310_ies_s { + struct bw_reduced_access_related_info_r13_s_ { + struct si_win_len_br_r13_e_ { + enum options { ms20, ms40, ms60, ms80, ms120, ms160, ms200, spare }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_win_len_br_r13_e_() {} + si_win_len_br_r13_e_(options v) : value(v) {} + si_win_len_br_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct si_repeat_pattern_r13_e_ { + enum options { every_rf, every2nd_rf, every4th_rf, every8th_rf }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_repeat_pattern_r13_e_() {} + si_repeat_pattern_r13_e_(options v) : value(v) {} + si_repeat_pattern_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct fdd_dl_or_tdd_sf_bitmap_br_r13_c_ { + struct types { + enum options { sf_pattern10_r13, sf_pattern40_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + fdd_dl_or_tdd_sf_bitmap_br_r13_c_() : type_(types::nulltype) {} + fdd_dl_or_tdd_sf_bitmap_br_r13_c_(const fdd_dl_or_tdd_sf_bitmap_br_r13_c_& other); + fdd_dl_or_tdd_sf_bitmap_br_r13_c_& operator=(const fdd_dl_or_tdd_sf_bitmap_br_r13_c_& other); + ~fdd_dl_or_tdd_sf_bitmap_br_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<10>& sf_pattern10_r13() + { + assert_choice_type("subframePattern10-r13", type_.to_string(), "fdd-DownlinkOrTddSubframeBitmapBR-r13"); + return c.get >(); + } + fixed_bitstring<40>& sf_pattern40_r13() + { + assert_choice_type("subframePattern40-r13", type_.to_string(), "fdd-DownlinkOrTddSubframeBitmapBR-r13"); + return c.get >(); + } + const fixed_bitstring<10>& sf_pattern10_r13() const + { + assert_choice_type("subframePattern10-r13", type_.to_string(), "fdd-DownlinkOrTddSubframeBitmapBR-r13"); + return c.get >(); + } + const fixed_bitstring<40>& sf_pattern40_r13() const + { + assert_choice_type("subframePattern40-r13", type_.to_string(), "fdd-DownlinkOrTddSubframeBitmapBR-r13"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct si_hop_cfg_common_r13_e_ { + enum options { on, off }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_hop_cfg_common_r13_e_() {} + si_hop_cfg_common_r13_e_(options v) : value(v) {} + si_hop_cfg_common_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool sched_info_list_br_r13_present; + bool fdd_dl_or_tdd_sf_bitmap_br_r13_present; + bool fdd_ul_sf_bitmap_br_r13_present; + bool si_validity_time_r13_present; + bool sys_info_value_tag_list_r13_present; + si_win_len_br_r13_e_ si_win_len_br_r13; + si_repeat_pattern_r13_e_ si_repeat_pattern_r13; + sched_info_list_br_r13_l sched_info_list_br_r13; + fdd_dl_or_tdd_sf_bitmap_br_r13_c_ fdd_dl_or_tdd_sf_bitmap_br_r13; + fixed_bitstring<10> fdd_ul_sf_bitmap_br_r13; + uint8_t start_symbol_br_r13; + si_hop_cfg_common_r13_e_ si_hop_cfg_common_r13; + sys_info_value_tag_list_r13_l sys_info_value_tag_list_r13; + + // sequence methods + bw_reduced_access_related_info_r13_s_(); + }; + + // member variables + bool hyper_sfn_r13_present; + bool e_drx_allowed_r13_present; + bool cell_sel_info_ce_r13_present; + bool bw_reduced_access_related_info_r13_present; + bool non_crit_ext_present; + fixed_bitstring<10> hyper_sfn_r13; + cell_sel_info_ce_r13_s cell_sel_info_ce_r13; + bw_reduced_access_related_info_r13_s_ bw_reduced_access_related_info_r13; + sib_type1_v1320_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType2-v9i0-IEs ::= SEQUENCE +struct sib_type2_v9i0_ies_s { + // member variables + bool non_crit_ext_present; + bool dummy_present; + dyn_octstring non_crit_ext; + + // sequence methods + sib_type2_v9i0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType5-v10j0-IEs ::= SEQUENCE +struct sib_type5_v10j0_ies_s { + typedef dyn_array inter_freq_carrier_freq_list_v10j0_l_; + + // member variables + bool inter_freq_carrier_freq_list_v10j0_present; + bool non_crit_ext_present; + inter_freq_carrier_freq_list_v10j0_l_ inter_freq_carrier_freq_list_v10j0; + sib_type5_v10l0_ies_s non_crit_ext; + + // sequence methods + sib_type5_v10j0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ThresholdListNR-r15 ::= SEQUENCE +struct thres_list_nr_r15_s { + // member variables + bool nr_rsrp_r15_present; + bool nr_rsrq_r15_present; + bool nr_sinr_r15_present; + uint8_t nr_rsrp_r15; + uint8_t nr_rsrq_r15; + uint8_t nr_sinr_r15; + + // sequence methods + thres_list_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringPerCatList-r15 ::= SEQUENCE (SIZE (1..maxAccessCat-1-r15)) OF UAC-BarringPerCat-r15 +typedef dyn_array uac_barr_per_cat_list_r15_l; + +// UDT-Restricting-r13 ::= SEQUENCE +struct udt_restricting_r13_s { + struct udt_restricting_time_r13_e_ { + enum options { s4, s8, s16, s32, s64, s128, s256, s512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + udt_restricting_time_r13_e_() {} + udt_restricting_time_r13_e_(options v) : value(v) {} + udt_restricting_time_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool udt_restricting_r13_present; + bool udt_restricting_time_r13_present; + udt_restricting_time_r13_e_ udt_restricting_time_r13; + + // sequence methods + udt_restricting_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-ReferenceSignalsPUSCH ::= SEQUENCE +struct ul_ref_sigs_pusch_s { + // member variables + bool group_hop_enabled; + uint8_t group_assign_pusch; + bool seq_hop_enabled; + uint8_t cyclic_shift; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-Identifiers-r12 ::= SEQUENCE +struct wlan_ids_r12_s { + // member variables + bool ext; + bool ssid_r12_present; + bool bssid_r12_present; + bool hessid_r12_present; + dyn_octstring ssid_r12; + fixed_octstring<6> bssid_r12; + fixed_octstring<6> hessid_r12; + // ... + + // sequence methods + wlan_ids_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-backhaulRate-r12 ::= ENUMERATED +struct wlan_backhaul_rate_r12_e { + enum options { + r0, + r4, + r8, + r16, + r32, + r64, + r128, + r256, + r512, + r1024, + r2048, + r4096, + r8192, + r16384, + r32768, + r65536, + r131072, + r262144, + r524288, + r1048576, + r2097152, + r4194304, + r8388608, + r16777216, + r33554432, + r67108864, + r134217728, + r268435456, + r536870912, + r1073741824, + r2147483648, + r4294967296 + }; + typedef uint64_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + wlan_backhaul_rate_r12_e() {} + wlan_backhaul_rate_r12_e(options v) : value(v) {} + wlan_backhaul_rate_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint64_t to_number() const; +}; + +// AC-BarringPerPLMN-r12 ::= SEQUENCE +struct ac_barr_per_plmn_r12_s { + struct ac_barr_info_r12_s_ { + // member variables + bool ac_barr_for_mo_sig_r12_present; + bool ac_barr_for_mo_data_r12_present; + bool ac_barr_for_emergency_r12; + ac_barr_cfg_s ac_barr_for_mo_sig_r12; + ac_barr_cfg_s ac_barr_for_mo_data_r12; + + // sequence methods + ac_barr_info_r12_s_(); + }; + + // member variables + bool ac_barr_info_r12_present; + bool ac_barr_skip_for_mmtel_voice_r12_present; + bool ac_barr_skip_for_mmtel_video_r12_present; + bool ac_barr_skip_for_sms_r12_present; + bool ac_barr_for_csfb_r12_present; + bool ssac_barr_for_mmtel_voice_r12_present; + bool ssac_barr_for_mmtel_video_r12_present; + uint8_t plmn_id_idx_r12; + ac_barr_info_r12_s_ ac_barr_info_r12; + ac_barr_cfg_s ac_barr_for_csfb_r12; + ac_barr_cfg_s ssac_barr_for_mmtel_voice_r12; + ac_barr_cfg_s ssac_barr_for_mmtel_video_r12; + + // sequence methods + ac_barr_per_plmn_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ACDC-BarringPerPLMN-r13 ::= SEQUENCE +struct acdc_barr_per_plmn_r13_s { + // member variables + uint8_t plmn_id_idx_r13; + bool acdc_only_for_hplmn_r13; + barr_per_acdc_category_list_r13_l barr_per_acdc_category_list_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-Config ::= SEQUENCE +struct bcch_cfg_s { + struct mod_period_coeff_e_ { + enum options { n2, n4, n8, n16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mod_period_coeff_e_() {} + mod_period_coeff_e_(options v) : value(v) {} + mod_period_coeff_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + mod_period_coeff_e_ mod_period_coeff; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-Config-v1310 ::= SEQUENCE +struct bcch_cfg_v1310_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CIOT-OptimisationPLMN-r13 ::= SEQUENCE +struct ciot_optim_plmn_r13_s { + // member variables + bool up_cio_t_eps_optim_r13_present; + bool cp_cio_t_eps_optim_r13_present; + bool attach_without_pdn_connect_r13_present; + + // sequence methods + ciot_optim_plmn_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqInfoUTRA-FDD-v8h0 ::= SEQUENCE +struct carrier_freq_info_utra_fdd_v8h0_s { + typedef bounded_array multi_band_info_list_l_; + + // member variables + bool multi_band_info_list_present; + multi_band_info_list_l_ multi_band_info_list; + + // sequence methods + carrier_freq_info_utra_fdd_v8h0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqNR-r15 ::= SEQUENCE +struct carrier_freq_nr_r15_s { + struct subcarrier_spacing_ssb_r15_e_ { + enum options { k_hz15, k_hz30, k_hz120, k_hz240 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + subcarrier_spacing_ssb_r15_e_() {} + subcarrier_spacing_ssb_r15_e_(options v) : value(v) {} + subcarrier_spacing_ssb_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct thresh_x_q_r15_s_ { + // member variables + uint8_t thresh_x_high_q_r15; + uint8_t thresh_x_low_q_r15; + }; + + // member variables + bool ext; + bool multi_band_info_list_r15_present; + bool multi_band_info_list_sul_r15_present; + bool meas_timing_cfg_r15_present; + bool ss_rssi_meas_r15_present; + bool cell_resel_prio_r15_present; + bool cell_resel_sub_prio_r15_present; + bool thresh_x_q_r15_present; + bool q_rx_lev_min_sul_r15_present; + bool ns_pmax_list_nr_r15_present; + bool q_qual_min_r15_present; + bool max_rs_idx_cell_qual_r15_present; + bool thresh_rs_idx_r15_present; + uint32_t carrier_freq_r15; + multi_freq_band_list_nr_r15_l multi_band_info_list_r15; + multi_freq_band_list_nr_r15_l multi_band_info_list_sul_r15; + mtc_ssb_nr_r15_s meas_timing_cfg_r15; + subcarrier_spacing_ssb_r15_e_ subcarrier_spacing_ssb_r15; + ss_rssi_meas_r15_s ss_rssi_meas_r15; + uint8_t cell_resel_prio_r15; + cell_resel_sub_prio_r13_e cell_resel_sub_prio_r15; + uint8_t thresh_x_high_r15; + uint8_t thresh_x_low_r15; + thresh_x_q_r15_s_ thresh_x_q_r15; + int8_t q_rx_lev_min_r15; + int8_t q_rx_lev_min_sul_r15; + int8_t p_max_nr_r15; + ns_pmax_list_nr_r15_l ns_pmax_list_nr_r15; + int8_t q_qual_min_r15; + bool derive_ssb_idx_from_cell_r15; + uint8_t max_rs_idx_cell_qual_r15; + thres_list_nr_r15_s thresh_rs_idx_r15; + // ... + + // sequence methods + carrier_freq_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqUTRA-FDD ::= SEQUENCE +struct carrier_freq_utra_fdd_s { + struct thresh_x_q_r9_s_ { + // member variables + uint8_t thresh_x_high_q_r9; + uint8_t thresh_x_low_q_r9; + }; + + // member variables + bool ext; + bool cell_resel_prio_present; + uint16_t carrier_freq; + uint8_t cell_resel_prio; + uint8_t thresh_x_high; + uint8_t thresh_x_low; + int8_t q_rx_lev_min; + int8_t p_max_utra; + int8_t q_qual_min; + // ... + // group 0 + bool thresh_x_q_r9_present; + copy_ptr thresh_x_q_r9; + + // sequence methods + carrier_freq_utra_fdd_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqUTRA-FDD-Ext-r12 ::= SEQUENCE +struct carrier_freq_utra_fdd_ext_r12_s { + struct thresh_x_q_r12_s_ { + // member variables + uint8_t thresh_x_high_q_r12; + uint8_t thresh_x_low_q_r12; + }; + typedef bounded_array multi_band_info_list_r12_l_; + + // member variables + bool ext; + bool cell_resel_prio_r12_present; + bool thresh_x_q_r12_present; + bool multi_band_info_list_r12_present; + bool reduced_meas_performance_r12_present; + uint16_t carrier_freq_r12; + uint8_t cell_resel_prio_r12; + uint8_t thresh_x_high_r12; + uint8_t thresh_x_low_r12; + int8_t q_rx_lev_min_r12; + int8_t p_max_utra_r12; + int8_t q_qual_min_r12; + thresh_x_q_r12_s_ thresh_x_q_r12; + multi_band_info_list_r12_l_ multi_band_info_list_r12; + // ... + + // sequence methods + carrier_freq_utra_fdd_ext_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqUTRA-TDD ::= SEQUENCE +struct carrier_freq_utra_tdd_s { + // member variables + bool ext; + bool cell_resel_prio_present; + uint16_t carrier_freq; + uint8_t cell_resel_prio; + uint8_t thresh_x_high; + uint8_t thresh_x_low; + int8_t q_rx_lev_min; + int8_t p_max_utra; + // ... + + // sequence methods + carrier_freq_utra_tdd_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqUTRA-TDD-r12 ::= SEQUENCE +struct carrier_freq_utra_tdd_r12_s { + // member variables + bool ext; + bool cell_resel_prio_r12_present; + bool reduced_meas_performance_r12_present; + uint16_t carrier_freq_r12; + uint8_t cell_resel_prio_r12; + uint8_t thresh_x_high_r12; + uint8_t thresh_x_low_r12; + int8_t q_rx_lev_min_r12; + int8_t p_max_utra_r12; + // ... + + // sequence methods + carrier_freq_utra_tdd_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqsInfoGERAN ::= SEQUENCE +struct carrier_freqs_info_geran_s { + struct common_info_s_ { + // member variables + bool cell_resel_prio_present; + bool p_max_geran_present; + uint8_t cell_resel_prio; + fixed_bitstring<8> ncc_permitted; + uint8_t q_rx_lev_min; + uint8_t p_max_geran; + uint8_t thresh_x_high; + uint8_t thresh_x_low; + + // sequence methods + common_info_s_(); + }; + + // member variables + bool ext; + carrier_freqs_geran_s carrier_freqs; + common_info_s_ common_info; + // ... + + // sequence methods + carrier_freqs_info_geran_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfo-v1130 ::= SEQUENCE +struct cell_sel_info_v1130_s { + // member variables + int8_t q_qual_min_wb_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EAB-Config-r11 ::= SEQUENCE +struct eab_cfg_r11_s { + struct eab_category_r11_e_ { + enum options { a, b, c }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + eab_category_r11_e_() {} + eab_category_r11_e_(options v) : value(v) {} + eab_category_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + eab_category_r11_e_ eab_category_r11; + fixed_bitstring<10> eab_barr_bitmap_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EUTRA-CarrierList-r15 ::= SEQUENCE (SIZE (1..maxFreqIdle-r15)) OF MeasIdleCarrierEUTRA-r15 +typedef dyn_array eutra_carrier_list_r15_l; + +// FreqHoppingParameters-r13 ::= SEQUENCE +struct freq_hop_params_r13_s { + struct dummy_e_ { + enum options { nb2, nb4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dummy_e_() {} + dummy_e_(options v) : value(v) {} + dummy_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct dummy2_c_ { + struct interv_fdd_r13_e_ { + enum options { int1, int2, int4, int8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_r13_e_() {} + interv_fdd_r13_e_(options v) : value(v) {} + interv_fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_r13_e_ { + enum options { int1, int5, int10, int20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_r13_e_() {} + interv_tdd_r13_e_(options v) : value(v) {} + interv_tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_r13, interv_tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + dummy2_c_() : type_(types::nulltype) {} + dummy2_c_(const dummy2_c_& other); + dummy2_c_& operator=(const dummy2_c_& other); + ~dummy2_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_r13_e_& interv_fdd_r13() + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "dummy2"); + return c.get(); + } + interv_tdd_r13_e_& interv_tdd_r13() + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "dummy2"); + return c.get(); + } + const interv_fdd_r13_e_& interv_fdd_r13() const + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "dummy2"); + return c.get(); + } + const interv_tdd_r13_e_& interv_tdd_r13() const + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "dummy2"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct dummy3_c_ { + struct interv_fdd_r13_e_ { + enum options { int2, int4, int8, int16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_r13_e_() {} + interv_fdd_r13_e_(options v) : value(v) {} + interv_fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_r13_e_ { + enum options { int5, int10, int20, int40 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_r13_e_() {} + interv_tdd_r13_e_(options v) : value(v) {} + interv_tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_r13, interv_tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + dummy3_c_() : type_(types::nulltype) {} + dummy3_c_(const dummy3_c_& other); + dummy3_c_& operator=(const dummy3_c_& other); + ~dummy3_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_r13_e_& interv_fdd_r13() + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "dummy3"); + return c.get(); + } + interv_tdd_r13_e_& interv_tdd_r13() + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "dummy3"); + return c.get(); + } + const interv_fdd_r13_e_& interv_fdd_r13() const + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "dummy3"); + return c.get(); + } + const interv_tdd_r13_e_& interv_tdd_r13() const + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "dummy3"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct interv_ul_hop_cfg_common_mode_a_r13_c_ { + struct interv_fdd_r13_e_ { + enum options { int1, int2, int4, int8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_r13_e_() {} + interv_fdd_r13_e_(options v) : value(v) {} + interv_fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_r13_e_ { + enum options { int1, int5, int10, int20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_r13_e_() {} + interv_tdd_r13_e_(options v) : value(v) {} + interv_tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_r13, interv_tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + interv_ul_hop_cfg_common_mode_a_r13_c_() : type_(types::nulltype) {} + interv_ul_hop_cfg_common_mode_a_r13_c_(const interv_ul_hop_cfg_common_mode_a_r13_c_& other); + interv_ul_hop_cfg_common_mode_a_r13_c_& operator=(const interv_ul_hop_cfg_common_mode_a_r13_c_& other); + ~interv_ul_hop_cfg_common_mode_a_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_r13_e_& interv_fdd_r13() + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeA-r13"); + return c.get(); + } + interv_tdd_r13_e_& interv_tdd_r13() + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeA-r13"); + return c.get(); + } + const interv_fdd_r13_e_& interv_fdd_r13() const + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeA-r13"); + return c.get(); + } + const interv_tdd_r13_e_& interv_tdd_r13() const + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeA-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct interv_ul_hop_cfg_common_mode_b_r13_c_ { + struct interv_fdd_r13_e_ { + enum options { int2, int4, int8, int16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_r13_e_() {} + interv_fdd_r13_e_(options v) : value(v) {} + interv_fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_r13_e_ { + enum options { int5, int10, int20, int40 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_r13_e_() {} + interv_tdd_r13_e_(options v) : value(v) {} + interv_tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_r13, interv_tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + interv_ul_hop_cfg_common_mode_b_r13_c_() : type_(types::nulltype) {} + interv_ul_hop_cfg_common_mode_b_r13_c_(const interv_ul_hop_cfg_common_mode_b_r13_c_& other); + interv_ul_hop_cfg_common_mode_b_r13_c_& operator=(const interv_ul_hop_cfg_common_mode_b_r13_c_& other); + ~interv_ul_hop_cfg_common_mode_b_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_r13_e_& interv_fdd_r13() + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeB-r13"); + return c.get(); + } + interv_tdd_r13_e_& interv_tdd_r13() + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeB-r13"); + return c.get(); + } + const interv_fdd_r13_e_& interv_fdd_r13() const + { + assert_choice_type("interval-FDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeB-r13"); + return c.get(); + } + const interv_tdd_r13_e_& interv_tdd_r13() const + { + assert_choice_type("interval-TDD-r13", type_.to_string(), "interval-ULHoppingConfigCommonModeB-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool dummy_present; + bool dummy2_present; + bool dummy3_present; + bool interv_ul_hop_cfg_common_mode_a_r13_present; + bool interv_ul_hop_cfg_common_mode_b_r13_present; + bool dummy4_present; + dummy_e_ dummy; + dummy2_c_ dummy2; + dummy3_c_ dummy3; + interv_ul_hop_cfg_common_mode_a_r13_c_ interv_ul_hop_cfg_common_mode_a_r13; + interv_ul_hop_cfg_common_mode_b_r13_c_ interv_ul_hop_cfg_common_mode_b_r13; + uint8_t dummy4; + + // sequence methods + freq_hop_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HighSpeedConfig-r14 ::= SEQUENCE +struct high_speed_cfg_r14_s { + // member variables + bool high_speed_enhanced_meas_flag_r14_present; + bool high_speed_enhanced_demod_flag_r14_present; + + // sequence methods + high_speed_cfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HighSpeedConfig-v1530 ::= SEQUENCE +struct high_speed_cfg_v1530_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo ::= SEQUENCE +struct inter_freq_carrier_freq_info_s { + struct thresh_x_q_r9_s_ { + // member variables + uint8_t thresh_x_high_q_r9; + uint8_t thresh_x_low_q_r9; + }; + + // member variables + bool ext; + bool p_max_present; + bool t_resel_eutra_sf_present; + bool cell_resel_prio_present; + bool q_offset_freq_present; + bool inter_freq_neigh_cell_list_present; + bool inter_freq_black_cell_list_present; + uint16_t dl_carrier_freq; + int8_t q_rx_lev_min; + int8_t p_max; + uint8_t t_resel_eutra; + speed_state_scale_factors_s t_resel_eutra_sf; + uint8_t thresh_x_high; + uint8_t thresh_x_low; + allowed_meas_bw_e allowed_meas_bw; + bool presence_ant_port1; + uint8_t cell_resel_prio; + fixed_bitstring<2> neigh_cell_cfg; + q_offset_range_e q_offset_freq; + inter_freq_neigh_cell_list_l inter_freq_neigh_cell_list; + inter_freq_black_cell_list_l inter_freq_black_cell_list; + // ... + // group 0 + bool q_qual_min_r9_present; + bool thresh_x_q_r9_present; + int8_t q_qual_min_r9; + copy_ptr thresh_x_q_r9; + // group 1 + bool q_qual_min_wb_r11_present; + int8_t q_qual_min_wb_r11; + + // sequence methods + inter_freq_carrier_freq_info_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-r12 ::= SEQUENCE +struct inter_freq_carrier_freq_info_r12_s { + struct thresh_x_q_r12_s_ { + // member variables + uint8_t thresh_x_high_q_r12; + uint8_t thresh_x_low_q_r12; + }; + + // member variables + bool ext; + bool p_max_r12_present; + bool t_resel_eutra_sf_r12_present; + bool cell_resel_prio_r12_present; + bool q_offset_freq_r12_present; + bool inter_freq_neigh_cell_list_r12_present; + bool inter_freq_black_cell_list_r12_present; + bool q_qual_min_r12_present; + bool thresh_x_q_r12_present; + bool q_qual_min_wb_r12_present; + bool multi_band_info_list_r12_present; + bool reduced_meas_performance_r12_present; + bool q_qual_min_rsrq_on_all_symbols_r12_present; + uint32_t dl_carrier_freq_r12; + int8_t q_rx_lev_min_r12; + int8_t p_max_r12; + uint8_t t_resel_eutra_r12; + speed_state_scale_factors_s t_resel_eutra_sf_r12; + uint8_t thresh_x_high_r12; + uint8_t thresh_x_low_r12; + allowed_meas_bw_e allowed_meas_bw_r12; + bool presence_ant_port1_r12; + uint8_t cell_resel_prio_r12; + fixed_bitstring<2> neigh_cell_cfg_r12; + q_offset_range_e q_offset_freq_r12; + inter_freq_neigh_cell_list_l inter_freq_neigh_cell_list_r12; + inter_freq_black_cell_list_l inter_freq_black_cell_list_r12; + int8_t q_qual_min_r12; + thresh_x_q_r12_s_ thresh_x_q_r12; + int8_t q_qual_min_wb_r12; + multi_band_info_list_r11_l multi_band_info_list_r12; + int8_t q_qual_min_rsrq_on_all_symbols_r12; + // ... + + // sequence methods + inter_freq_carrier_freq_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1250 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1250_s { + // member variables + bool reduced_meas_performance_r12_present; + bool q_qual_min_rsrq_on_all_symbols_r12_present; + int8_t q_qual_min_rsrq_on_all_symbols_r12; + + // sequence methods + inter_freq_carrier_freq_info_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1310 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1310_s { + // member variables + bool cell_resel_sub_prio_r13_present; + bool redist_inter_freq_info_r13_present; + bool cell_sel_info_ce_r13_present; + bool t_resel_eutra_ce_r13_present; + cell_resel_sub_prio_r13_e cell_resel_sub_prio_r13; + redist_inter_freq_info_r13_s redist_inter_freq_info_r13; + cell_sel_info_ce_r13_s cell_sel_info_ce_r13; + uint8_t t_resel_eutra_ce_r13; + + // sequence methods + inter_freq_carrier_freq_info_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1350 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1350_s { + // member variables + bool cell_sel_info_ce1_r13_present; + cell_sel_info_ce1_r13_s cell_sel_info_ce1_r13; + + // sequence methods + inter_freq_carrier_freq_info_v1350_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1530 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1530_s { + // member variables + bool inter_freq_neigh_hsdn_cell_list_r15_present; + bool cell_sel_info_ce_v1530_present; + bool hsdn_ind_r15; + inter_freq_neigh_hsdn_cell_list_r15_l inter_freq_neigh_hsdn_cell_list_r15; + cell_sel_info_ce_v1530_s cell_sel_info_ce_v1530; + + // sequence methods + inter_freq_carrier_freq_info_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v8h0 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v8h0_s { + // member variables + bool multi_band_info_list_present; + multi_band_info_list_l multi_band_info_list; + + // sequence methods + inter_freq_carrier_freq_info_v8h0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IntraFreqNeighCellInfo ::= SEQUENCE +struct intra_freq_neigh_cell_info_s { + // member variables + bool ext; + uint16_t pci; + q_offset_range_e q_offset_cell; + // ... + + // sequence methods + intra_freq_neigh_cell_info_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-CarrierType-r14 ::= SEQUENCE +struct mbms_carrier_type_r14_s { + struct carrier_type_r14_e_ { + enum options { mbms, fembms_mixed, fembms_ded }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + carrier_type_r14_e_() {} + carrier_type_r14_e_(options v) : value(v) {} + carrier_type_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool frame_offset_r14_present; + carrier_type_r14_e_ carrier_type_r14; + uint8_t frame_offset_r14; + + // sequence methods + mbms_carrier_type_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-SAI-InterFreq-r11 ::= SEQUENCE +struct mbms_sai_inter_freq_r11_s { + // member variables + uint32_t dl_carrier_freq_r11; + mbms_sai_list_r11_l mbms_sai_list_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-SAI-InterFreq-v1140 ::= SEQUENCE +struct mbms_sai_inter_freq_v1140_s { + // member variables + bool multi_band_info_list_r11_present; + multi_band_info_list_r11_l multi_band_info_list_r11; + + // sequence methods + mbms_sai_inter_freq_v1140_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSFN-AreaInfo-r9 ::= SEQUENCE +struct mbsfn_area_info_r9_s { + struct non_mbsfn_region_len_e_ { + enum options { s1, s2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + non_mbsfn_region_len_e_() {} + non_mbsfn_region_len_e_(options v) : value(v) {} + non_mbsfn_region_len_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mcch_cfg_r9_s_ { + struct mcch_repeat_period_r9_e_ { + enum options { rf32, rf64, rf128, rf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcch_repeat_period_r9_e_() {} + mcch_repeat_period_r9_e_(options v) : value(v) {} + mcch_repeat_period_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct mcch_mod_period_r9_e_ { + enum options { rf512, rf1024 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcch_mod_period_r9_e_() {} + mcch_mod_period_r9_e_(options v) : value(v) {} + mcch_mod_period_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct sig_mcs_r9_e_ { + enum options { n2, n7, n13, n19 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sig_mcs_r9_e_() {} + sig_mcs_r9_e_(options v) : value(v) {} + sig_mcs_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + mcch_repeat_period_r9_e_ mcch_repeat_period_r9; + uint8_t mcch_offset_r9; + mcch_mod_period_r9_e_ mcch_mod_period_r9; + fixed_bitstring<6> sf_alloc_info_r9; + sig_mcs_r9_e_ sig_mcs_r9; + }; + struct mcch_cfg_r14_s_ { + struct mcch_repeat_period_v1430_e_ { + enum options { rf1, rf2, rf4, rf8, rf16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcch_repeat_period_v1430_e_() {} + mcch_repeat_period_v1430_e_(options v) : value(v) {} + mcch_repeat_period_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mcch_mod_period_v1430_e_ { + enum options { rf1, rf2, rf4, rf8, rf16, rf32, rf64, rf128, rf256, spare7 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 10, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcch_mod_period_v1430_e_() {} + mcch_mod_period_v1430_e_(options v) : value(v) {} + mcch_mod_period_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool mcch_repeat_period_v1430_present; + bool mcch_mod_period_v1430_present; + mcch_repeat_period_v1430_e_ mcch_repeat_period_v1430; + mcch_mod_period_v1430_e_ mcch_mod_period_v1430; + + // sequence methods + mcch_cfg_r14_s_(); + }; + struct subcarrier_spacing_mbms_r14_e_ { + enum options { khz_minus7dot5, khz_minus1dot25 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + subcarrier_spacing_mbms_r14_e_() {} + subcarrier_spacing_mbms_r14_e_(options v) : value(v) {} + subcarrier_spacing_mbms_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool ext; + uint8_t mbsfn_area_id_r9; + non_mbsfn_region_len_e_ non_mbsfn_region_len; + uint8_t notif_ind_r9; + mcch_cfg_r9_s_ mcch_cfg_r9; + // ... + // group 0 + bool mcch_cfg_r14_present; + bool subcarrier_spacing_mbms_r14_present; + copy_ptr mcch_cfg_r14; + subcarrier_spacing_mbms_r14_e_ subcarrier_spacing_mbms_r14; + + // sequence methods + mbsfn_area_info_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSFN-SubframeConfig ::= SEQUENCE +struct mbsfn_sf_cfg_s { + struct radioframe_alloc_period_e_ { + enum options { n1, n2, n4, n8, n16, n32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + radioframe_alloc_period_e_() {} + radioframe_alloc_period_e_(options v) : value(v) {} + radioframe_alloc_period_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct sf_alloc_c_ { + struct types { + enum options { one_frame, four_frames, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sf_alloc_c_() : type_(types::nulltype) {} + sf_alloc_c_(const sf_alloc_c_& other); + sf_alloc_c_& operator=(const sf_alloc_c_& other); + ~sf_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<6>& one_frame() + { + assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation"); + return c.get >(); + } + fixed_bitstring<24>& four_frames() + { + assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation"); + return c.get >(); + } + const fixed_bitstring<6>& one_frame() const + { + assert_choice_type("oneFrame", type_.to_string(), "subframeAllocation"); + return c.get >(); + } + const fixed_bitstring<24>& four_frames() const + { + assert_choice_type("fourFrames", type_.to_string(), "subframeAllocation"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + radioframe_alloc_period_e_ radioframe_alloc_period; + uint8_t radioframe_alloc_offset; + sf_alloc_c_ sf_alloc; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSFN-SubframeConfig-v1430 ::= SEQUENCE +struct mbsfn_sf_cfg_v1430_s { + struct sf_alloc_v1430_c_ { + struct types { + enum options { one_frame_v1430, four_frames_v1430, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sf_alloc_v1430_c_() : type_(types::nulltype) {} + sf_alloc_v1430_c_(const sf_alloc_v1430_c_& other); + sf_alloc_v1430_c_& operator=(const sf_alloc_v1430_c_& other); + ~sf_alloc_v1430_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<2>& one_frame_v1430() + { + assert_choice_type("oneFrame-v1430", type_.to_string(), "subframeAllocation-v1430"); + return c.get >(); + } + fixed_bitstring<8>& four_frames_v1430() + { + assert_choice_type("fourFrames-v1430", type_.to_string(), "subframeAllocation-v1430"); + return c.get >(); + } + const fixed_bitstring<2>& one_frame_v1430() const + { + assert_choice_type("oneFrame-v1430", type_.to_string(), "subframeAllocation-v1430"); + return c.get >(); + } + const fixed_bitstring<8>& four_frames_v1430() const + { + assert_choice_type("fourFrames-v1430", type_.to_string(), "subframeAllocation-v1430"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + sf_alloc_v1430_c_ sf_alloc_v1430; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF NeighCellCDMA2000 +typedef dyn_array neigh_cell_list_cdma2000_l; + +// NeighCellListCDMA2000-v920 ::= SEQUENCE (SIZE (1..16)) OF NeighCellCDMA2000-v920 +typedef dyn_array neigh_cell_list_cdma2000_v920_l; + +// PCCH-Config ::= SEQUENCE +struct pcch_cfg_s { + struct default_paging_cycle_e_ { + enum options { rf32, rf64, rf128, rf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + default_paging_cycle_e_() {} + default_paging_cycle_e_(options v) : value(v) {} + default_paging_cycle_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct nb_e_ { + enum options { four_t, two_t, one_t, half_t, quarter_t, one_eighth_t, one_sixteenth_t, one_thirty_second_t }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + nb_e_() {} + nb_e_(options v) : value(v) {} + nb_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + default_paging_cycle_e_ default_paging_cycle; + nb_e_ nb; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCCH-Config-v1310 ::= SEQUENCE +struct pcch_cfg_v1310_s { + struct mpdcch_num_repeat_paging_r13_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, r128, r256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_num_repeat_paging_r13_e_() {} + mpdcch_num_repeat_paging_r13_e_(options v) : value(v) {} + mpdcch_num_repeat_paging_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct nb_v1310_e_ { + enum options { one64th_t, one128th_t, one256th_t }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + nb_v1310_e_() {} + nb_v1310_e_(options v) : value(v) {} + nb_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool nb_v1310_present; + uint8_t paging_narrow_bands_r13; + mpdcch_num_repeat_paging_r13_e_ mpdcch_num_repeat_paging_r13; + nb_v1310_e_ nb_v1310; + + // sequence methods + pcch_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigCommon ::= SEQUENCE +struct pdsch_cfg_common_s { + // member variables + int8_t ref_sig_pwr; + uint8_t p_b; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigCommon-v1310 ::= SEQUENCE +struct pdsch_cfg_common_v1310_s { + struct pdsch_max_num_repeat_cemode_a_r13_e_ { + enum options { r16, r32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdsch_max_num_repeat_cemode_a_r13_e_() {} + pdsch_max_num_repeat_cemode_a_r13_e_(options v) : value(v) {} + pdsch_max_num_repeat_cemode_a_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pdsch_max_num_repeat_cemode_b_r13_e_ { + enum options { r192, r256, r384, r512, r768, r1024, r1536, r2048 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdsch_max_num_repeat_cemode_b_r13_e_() {} + pdsch_max_num_repeat_cemode_b_r13_e_(options v) : value(v) {} + pdsch_max_num_repeat_cemode_b_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool pdsch_max_num_repeat_cemode_a_r13_present; + bool pdsch_max_num_repeat_cemode_b_r13_present; + pdsch_max_num_repeat_cemode_a_r13_e_ pdsch_max_num_repeat_cemode_a_r13; + pdsch_max_num_repeat_cemode_b_r13_e_ pdsch_max_num_repeat_cemode_b_r13; + + // sequence methods + pdsch_cfg_common_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-Info-r15 ::= SEQUENCE +struct plmn_info_r15_s { + // member variables + bool upper_layer_ind_r15_present; + + // sequence methods + plmn_info_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-Config-v1430 ::= SEQUENCE +struct prach_cfg_v1430_s { + // member variables + uint16_t root_seq_idx_high_speed_r14; + uint8_t zero_correlation_zone_cfg_high_speed_r14; + uint8_t prach_cfg_idx_high_speed_r14; + uint8_t prach_freq_offset_high_speed_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-ConfigSIB ::= SEQUENCE +struct prach_cfg_sib_s { + // member variables + uint16_t root_seq_idx; + prach_cfg_info_s prach_cfg_info; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-ConfigSIB-v1310 ::= SEQUENCE +struct prach_cfg_sib_v1310_s { + struct mpdcch_start_sf_css_ra_r13_c_ { + struct fdd_r13_e_ { + enum options { v1, v1dot5, v2, v2dot5, v4, v5, v8, v10 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fdd_r13_e_() {} + fdd_r13_e_(options v) : value(v) {} + fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct tdd_r13_e_ { + enum options { v1, v2, v4, v5, v8, v10, v20, spare }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_r13_e_() {} + tdd_r13_e_(options v) : value(v) {} + tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { fdd_r13, tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mpdcch_start_sf_css_ra_r13_c_() : type_(types::nulltype) {} + mpdcch_start_sf_css_ra_r13_c_(const mpdcch_start_sf_css_ra_r13_c_& other); + mpdcch_start_sf_css_ra_r13_c_& operator=(const mpdcch_start_sf_css_ra_r13_c_& other); + ~mpdcch_start_sf_css_ra_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fdd_r13_e_& fdd_r13() + { + assert_choice_type("fdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + tdd_r13_e_& tdd_r13() + { + assert_choice_type("tdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + const fdd_r13_e_& fdd_r13() const + { + assert_choice_type("fdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + const tdd_r13_e_& tdd_r13() const + { + assert_choice_type("tdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool mpdcch_start_sf_css_ra_r13_present; + bool prach_hop_offset_r13_present; + rsrp_thress_prach_info_list_r13_l rsrp_thress_prach_info_list_r13; + mpdcch_start_sf_css_ra_r13_c_ mpdcch_start_sf_css_ra_r13; + uint8_t prach_hop_offset_r13; + prach_params_list_ce_r13_l prach_params_list_ce_r13; + + // sequence methods + prach_cfg_sib_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-ConfigSIB-v1530 ::= SEQUENCE +struct prach_cfg_sib_v1530_s { + typedef dyn_array edt_prach_params_list_ce_r15_l_; + + // member variables + edt_prach_params_list_ce_r15_l_ edt_prach_params_list_ce_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigCommon ::= SEQUENCE +struct pucch_cfg_common_s { + struct delta_pucch_shift_e_ { + enum options { ds1, ds2, ds3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_pucch_shift_e_() {} + delta_pucch_shift_e_(options v) : value(v) {} + delta_pucch_shift_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + delta_pucch_shift_e_ delta_pucch_shift; + uint8_t n_rb_cqi; + uint8_t n_cs_an; + uint16_t n1_pucch_an; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigCommon-v1310 ::= SEQUENCE +struct pucch_cfg_common_v1310_s { + struct pucch_num_repeat_ce_msg4_level0_r13_e_ { + enum options { n1, n2, n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_msg4_level0_r13_e_() {} + pucch_num_repeat_ce_msg4_level0_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_msg4_level0_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pucch_num_repeat_ce_msg4_level1_r13_e_ { + enum options { n1, n2, n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_msg4_level1_r13_e_() {} + pucch_num_repeat_ce_msg4_level1_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_msg4_level1_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pucch_num_repeat_ce_msg4_level2_r13_e_ { + enum options { n4, n8, n16, n32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_msg4_level2_r13_e_() {} + pucch_num_repeat_ce_msg4_level2_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_msg4_level2_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pucch_num_repeat_ce_msg4_level3_r13_e_ { + enum options { n4, n8, n16, n32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_msg4_level3_r13_e_() {} + pucch_num_repeat_ce_msg4_level3_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_msg4_level3_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool n1_pucch_an_info_list_r13_present; + bool pucch_num_repeat_ce_msg4_level0_r13_present; + bool pucch_num_repeat_ce_msg4_level1_r13_present; + bool pucch_num_repeat_ce_msg4_level2_r13_present; + bool pucch_num_repeat_ce_msg4_level3_r13_present; + n1_pucch_an_info_list_r13_l n1_pucch_an_info_list_r13; + pucch_num_repeat_ce_msg4_level0_r13_e_ pucch_num_repeat_ce_msg4_level0_r13; + pucch_num_repeat_ce_msg4_level1_r13_e_ pucch_num_repeat_ce_msg4_level1_r13; + pucch_num_repeat_ce_msg4_level2_r13_e_ pucch_num_repeat_ce_msg4_level2_r13; + pucch_num_repeat_ce_msg4_level3_r13_e_ pucch_num_repeat_ce_msg4_level3_r13; + + // sequence methods + pucch_cfg_common_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigCommon-v1430 ::= SEQUENCE +struct pucch_cfg_common_v1430_s { + struct pucch_num_repeat_ce_msg4_level3_r14_e_ { + enum options { n64, n128 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_msg4_level3_r14_e_() {} + pucch_num_repeat_ce_msg4_level3_r14_e_(options v) : value(v) {} + pucch_num_repeat_ce_msg4_level3_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool pucch_num_repeat_ce_msg4_level3_r14_present; + pucch_num_repeat_ce_msg4_level3_r14_e_ pucch_num_repeat_ce_msg4_level3_r14; + + // sequence methods + pucch_cfg_common_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigCommon ::= SEQUENCE +struct pusch_cfg_common_s { + struct pusch_cfg_basic_s_ { + struct hop_mode_e_ { + enum options { inter_sub_frame, intra_and_inter_sub_frame }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + hop_mode_e_() {} + hop_mode_e_(options v) : value(v) {} + hop_mode_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + uint8_t n_sb; + hop_mode_e_ hop_mode; + uint8_t pusch_hop_offset; + bool enable64_qam; + }; + + // member variables + pusch_cfg_basic_s_ pusch_cfg_basic; + ul_ref_sigs_pusch_s ul_ref_sigs_pusch; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigCommon-v1270 ::= SEQUENCE +struct pusch_cfg_common_v1270_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigCommon-v1310 ::= SEQUENCE +struct pusch_cfg_common_v1310_s { + struct pusch_max_num_repeat_cemode_a_r13_e_ { + enum options { r8, r16, r32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pusch_max_num_repeat_cemode_a_r13_e_() {} + pusch_max_num_repeat_cemode_a_r13_e_(options v) : value(v) {} + pusch_max_num_repeat_cemode_a_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pusch_max_num_repeat_cemode_b_r13_e_ { + enum options { r192, r256, r384, r512, r768, r1024, r1536, r2048 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pusch_max_num_repeat_cemode_b_r13_e_() {} + pusch_max_num_repeat_cemode_b_r13_e_(options v) : value(v) {} + pusch_max_num_repeat_cemode_b_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool pusch_max_num_repeat_cemode_a_r13_present; + bool pusch_max_num_repeat_cemode_b_r13_present; + bool pusch_hop_offset_v1310_present; + pusch_max_num_repeat_cemode_a_r13_e_ pusch_max_num_repeat_cemode_a_r13; + pusch_max_num_repeat_cemode_b_r13_e_ pusch_max_num_repeat_cemode_b_r13; + uint8_t pusch_hop_offset_v1310; + + // sequence methods + pusch_cfg_common_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigCommon ::= SEQUENCE +struct rach_cfg_common_s { + struct preamb_info_s_ { + struct nof_ra_preambs_e_ { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + nof_ra_preambs_e_() {} + nof_ra_preambs_e_(options v) : value(v) {} + nof_ra_preambs_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct preambs_group_a_cfg_s_ { + struct size_of_ra_preambs_group_a_e_ { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 15, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + size_of_ra_preambs_group_a_e_() {} + size_of_ra_preambs_group_a_e_(options v) : value(v) {} + size_of_ra_preambs_group_a_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct msg_size_group_a_e_ { + enum options { b56, b144, b208, b256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + msg_size_group_a_e_() {} + msg_size_group_a_e_(options v) : value(v) {} + msg_size_group_a_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct msg_pwr_offset_group_b_e_ { + enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + msg_pwr_offset_group_b_e_() {} + msg_pwr_offset_group_b_e_(options v) : value(v) {} + msg_pwr_offset_group_b_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + bool ext; + size_of_ra_preambs_group_a_e_ size_of_ra_preambs_group_a; + msg_size_group_a_e_ msg_size_group_a; + msg_pwr_offset_group_b_e_ msg_pwr_offset_group_b; + // ... + + // sequence methods + preambs_group_a_cfg_s_(); + }; + + // member variables + bool preambs_group_a_cfg_present; + nof_ra_preambs_e_ nof_ra_preambs; + preambs_group_a_cfg_s_ preambs_group_a_cfg; + + // sequence methods + preamb_info_s_(); + }; + struct ra_supervision_info_s_ { + struct ra_resp_win_size_e_ { + enum options { sf2, sf3, sf4, sf5, sf6, sf7, sf8, sf10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ra_resp_win_size_e_() {} + ra_resp_win_size_e_(options v) : value(v) {} + ra_resp_win_size_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mac_contention_resolution_timer_e_ { + enum options { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mac_contention_resolution_timer_e_() {} + mac_contention_resolution_timer_e_(options v) : value(v) {} + mac_contention_resolution_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + preamb_trans_max_e preamb_trans_max; + ra_resp_win_size_e_ ra_resp_win_size; + mac_contention_resolution_timer_e_ mac_contention_resolution_timer; + }; + + // member variables + bool ext; + preamb_info_s_ preamb_info; + pwr_ramp_params_s pwr_ramp_params; + ra_supervision_info_s_ ra_supervision_info; + uint8_t max_harq_msg3_tx; + // ... + // group 0 + bool preamb_trans_max_ce_r13_present; + bool rach_ce_level_info_list_r13_present; + preamb_trans_max_e preamb_trans_max_ce_r13; + copy_ptr rach_ce_level_info_list_r13; + // group 1 + bool edt_small_tbs_subset_r15_present; + + // sequence methods + rach_cfg_common_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigCommon-v1250 ::= SEQUENCE +struct rach_cfg_common_v1250_s { + struct tx_fail_params_r12_s_ { + struct conn_est_fail_count_r12_e_ { + enum options { n1, n2, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + conn_est_fail_count_r12_e_() {} + conn_est_fail_count_r12_e_(options v) : value(v) {} + conn_est_fail_count_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct conn_est_fail_offset_validity_r12_e_ { + enum options { s30, s60, s120, s240, s300, s420, s600, s900 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + conn_est_fail_offset_validity_r12_e_() {} + conn_est_fail_offset_validity_r12_e_(options v) : value(v) {} + conn_est_fail_offset_validity_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool conn_est_fail_offset_r12_present; + conn_est_fail_count_r12_e_ conn_est_fail_count_r12; + conn_est_fail_offset_validity_r12_e_ conn_est_fail_offset_validity_r12; + uint8_t conn_est_fail_offset_r12; + + // sequence methods + tx_fail_params_r12_s_(); + }; + + // member variables + tx_fail_params_r12_s_ tx_fail_params_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSS-Config-r15 ::= SEQUENCE +struct rss_cfg_r15_s { + struct dur_r15_e_ { + enum options { sf8, sf16, sf32, sf40 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dur_r15_e_() {} + dur_r15_e_(options v) : value(v) {} + dur_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct periodicity_r15_e_ { + enum options { ms160, ms320, ms640, ms1280 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_r15_e_() {} + periodicity_r15_e_(options v) : value(v) {} + periodicity_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct pwr_boost_r15_e_ { + enum options { db0, db3, db4dot8, db6 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pwr_boost_r15_e_() {} + pwr_boost_r15_e_(options v) : value(v) {} + pwr_boost_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + dur_r15_e_ dur_r15; + uint8_t freq_location_r15; + periodicity_r15_e_ periodicity_r15; + pwr_boost_r15_e_ pwr_boost_r15; + uint8_t time_offset_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReferenceTime-r15 ::= SEQUENCE +struct ref_time_r15_s { + // member variables + uint32_t ref_days_r15; + uint32_t ref_seconds_r15; + uint16_t ref_milli_seconds_r15; + uint16_t ref_quarter_micro_seconds_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReselectionInfoRelay-r13 ::= SEQUENCE +struct resel_info_relay_r13_s { + struct min_hyst_r13_e_ { + enum options { db0, db3, db6, db9, db12, dbinf }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + min_hyst_r13_e_() {} + min_hyst_r13_e_(options v) : value(v) {} + min_hyst_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool min_hyst_r13_present; + int8_t q_rx_lev_min_r13; + filt_coef_e filt_coef_r13; + min_hyst_r13_e_ min_hyst_r13; + + // sequence methods + resel_info_relay_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-Type ::= ENUMERATED +struct sib_type_e { + enum options { + sib_type3, + sib_type4, + sib_type5, + sib_type6, + sib_type7, + sib_type8, + sib_type9, + sib_type10, + sib_type11, + sib_type12_v920, + sib_type13_v920, + sib_type14_v1130, + sib_type15_v1130, + sib_type16_v1130, + sib_type17_v1250, + sib_type18_v1250, + // ... + sib_type19_v1250, + sib_type20_v1310, + sib_type21_v1430, + sib_type24_v1530, + sib_type25_v1530, + sib_type26_v1530 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 22, nof_exts = 6; + static const bool has_ext = true; + + // enumerated methods + sib_type_e() {} + sib_type_e(options v) : value(v) {} + sib_type_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// SIB8-PerPLMN-r11 ::= SEQUENCE +struct sib8_per_plmn_r11_s { + struct params_cdma2000_r11_c_ { + struct types { + enum options { explicit_value, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + params_cdma2000_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + params_cdma2000_r11_s& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "parametersCDMA2000-r11"); + return c; + } + const params_cdma2000_r11_s& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "parametersCDMA2000-r11"); + return c; + } + + private: + types type_; + params_cdma2000_r11_s c; + }; + + // member variables + uint8_t plmn_id_r11; + params_cdma2000_r11_c_ params_cdma2000_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-AnchorCarrierFreqList-V2X-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF INTEGER +typedef bounded_array sl_anchor_carrier_freq_list_v2x_r14_l; + +// SL-CBR-CommonTxConfigList-r14 ::= SEQUENCE +struct sl_cbr_common_tx_cfg_list_r14_s { + typedef dyn_array cbr_range_common_cfg_list_r14_l_; + typedef dyn_array sl_cbr_pssch_tx_cfg_list_r14_l_; + + // member variables + cbr_range_common_cfg_list_r14_l_ cbr_range_common_cfg_list_r14; + sl_cbr_pssch_tx_cfg_list_r14_l_ sl_cbr_pssch_tx_cfg_list_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CarrierFreqInfo-r12 ::= SEQUENCE +struct sl_carrier_freq_info_r12_s { + // member variables + bool plmn_id_list_r12_present; + uint32_t carrier_freq_r12; + plmn_id_list4_r12_l plmn_id_list_r12; + + // sequence methods + sl_carrier_freq_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CarrierFreqInfo-v1310 ::= SEQUENCE +struct sl_carrier_freq_info_v1310_s { + // member variables + bool ext; + bool disc_res_non_ps_r13_present; + bool disc_res_ps_r13_present; + bool disc_cfg_other_r13_present; + sl_res_inter_freq_r13_s disc_res_non_ps_r13; + sl_res_inter_freq_r13_s disc_res_ps_r13; + sl_disc_cfg_other_inter_freq_r13_s disc_cfg_other_r13; + // ... + + // sequence methods + sl_carrier_freq_info_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CommResourcePool-r12 ::= SEQUENCE +struct sl_comm_res_pool_r12_s { + struct ue_sel_res_cfg_r12_s_ { + // member variables + bool trpt_subset_r12_present; + sl_tf_res_cfg_r12_s data_tf_res_cfg_r12; + dyn_bitstring trpt_subset_r12; + + // sequence methods + ue_sel_res_cfg_r12_s_(); + }; + struct rx_params_ncell_r12_s_ { + // member variables + bool tdd_cfg_r12_present; + tdd_cfg_s tdd_cfg_r12; + uint8_t sync_cfg_idx_r12; + + // sequence methods + rx_params_ncell_r12_s_(); + }; + struct tx_params_r12_s_ { + // member variables + sl_tx_params_r12_s sc_tx_params_r12; + sl_tx_params_r12_s data_tx_params_r12; + }; + + // member variables + bool ext; + bool ue_sel_res_cfg_r12_present; + bool rx_params_ncell_r12_present; + bool tx_params_r12_present; + sl_cp_len_r12_e sc_cp_len_r12; + sl_period_comm_r12_e sc_period_r12; + sl_tf_res_cfg_r12_s sc_tf_res_cfg_r12; + sl_cp_len_r12_e data_cp_len_r12; + sl_hop_cfg_comm_r12_s data_hop_cfg_r12; + ue_sel_res_cfg_r12_s_ ue_sel_res_cfg_r12; + rx_params_ncell_r12_s_ rx_params_ncell_r12; + tx_params_r12_s_ tx_params_r12; + // ... + // group 0 + bool prio_list_r13_present; + copy_ptr prio_list_r13; + + // sequence methods + sl_comm_res_pool_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-InterFreqInfoListV2X-r14 ::= SEQUENCE (SIZE (0..maxFreqV2X-1-r14)) OF SL-InterFreqInfoV2X-r14 +typedef dyn_array sl_inter_freq_info_list_v2x_r14_l; + +// SL-PPPP-TxConfigIndex-r15 ::= SEQUENCE +struct sl_pppp_tx_cfg_idx_r15_s { + typedef bounded_array tx_cfg_idx_list_r15_l_; + typedef dyn_array mcs_pssch_range_list_r15_l_; + + // member variables + uint8_t prio_thres_r15; + uint8_t default_tx_cfg_idx_r15; + uint8_t cbr_cfg_idx_r15; + tx_cfg_idx_list_r15_l_ tx_cfg_idx_list_r15; + mcs_pssch_range_list_r15_l_ mcs_pssch_range_list_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PPPR-Dest-CarrierFreqList-r15 ::= SEQUENCE (SIZE (1..maxSL-Dest-r12)) OF SL-PPPR-Dest-CarrierFreq +typedef dyn_array sl_pppr_dest_carrier_freq_list_r15_l; + +// SL-SyncConfigListV2X-r14 ::= SEQUENCE (SIZE (1.. maxSL-V2X-SyncConfig-r14)) OF SL-SyncConfig-r12 +typedef dyn_array sl_sync_cfg_list_v2x_r14_l; + +// SoundingRS-UL-ConfigCommon ::= CHOICE +struct srs_ul_cfg_common_c { + struct setup_s_ { + struct srs_bw_cfg_e_ { + enum options { bw0, bw1, bw2, bw3, bw4, bw5, bw6, bw7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_bw_cfg_e_() {} + srs_bw_cfg_e_(options v) : value(v) {} + srs_bw_cfg_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct srs_sf_cfg_e_ { + enum options { sc0, sc1, sc2, sc3, sc4, sc5, sc6, sc7, sc8, sc9, sc10, sc11, sc12, sc13, sc14, sc15 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_sf_cfg_e_() {} + srs_sf_cfg_e_(options v) : value(v) {} + srs_sf_cfg_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool srs_max_up_pts_present; + srs_bw_cfg_e_ srs_bw_cfg; + srs_sf_cfg_e_ srs_sf_cfg; + bool ack_nack_srs_simul_tx; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_common_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigCommon"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigCommon"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SystemInformationBlockType1-v10j0-IEs ::= SEQUENCE +struct sib_type1_v10j0_ies_s { + // member variables + bool freq_band_info_r10_present; + bool multi_band_info_list_v10j0_present; + bool non_crit_ext_present; + ns_pmax_list_r10_l freq_band_info_r10; + multi_band_info_list_v10j0_l multi_band_info_list_v10j0; + sib_type1_v10l0_ies_s non_crit_ext; + + // sequence methods + sib_type1_v10j0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v1250-IEs ::= SEQUENCE +struct sib_type1_v1250_ies_s { + struct cell_access_related_info_v1250_s_ { + // member variables + bool category0_allowed_r12_present; + + // sequence methods + cell_access_related_info_v1250_s_(); + }; + + // member variables + bool cell_sel_info_v1250_present; + bool freq_band_ind_prio_r12_present; + bool non_crit_ext_present; + cell_access_related_info_v1250_s_ cell_access_related_info_v1250; + cell_sel_info_v1250_s cell_sel_info_v1250; + sib_type1_v1310_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType2-v9e0-IEs ::= SEQUENCE +struct sib_type2_v9e0_ies_s { + // member variables + bool ul_carrier_freq_v9e0_present; + bool non_crit_ext_present; + uint32_t ul_carrier_freq_v9e0; + sib_type2_v9i0_ies_s non_crit_ext; + + // sequence methods + sib_type2_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType3-v10l0-IEs ::= SEQUENCE +struct sib_type3_v10l0_ies_s { + // member variables + bool freq_band_info_v10l0_present; + bool multi_band_info_list_v10l0_present; + bool non_crit_ext_present; + ns_pmax_list_v10l0_l freq_band_info_v10l0; + multi_band_info_list_v10l0_l multi_band_info_list_v10l0; + + // sequence methods + sib_type3_v10l0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType5-v9e0-IEs ::= SEQUENCE +struct sib_type5_v9e0_ies_s { + typedef dyn_array inter_freq_carrier_freq_list_v9e0_l_; + + // member variables + bool inter_freq_carrier_freq_list_v9e0_present; + bool non_crit_ext_present; + inter_freq_carrier_freq_list_v9e0_l_ inter_freq_carrier_freq_list_v9e0; + sib_type5_v10j0_ies_s non_crit_ext; + + // sequence methods + sib_type5_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringInfoSet-r15 ::= SEQUENCE +struct uac_barr_info_set_r15_s { + struct uac_barr_factor_r15_e_ { + enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + uac_barr_factor_r15_e_() {} + uac_barr_factor_r15_e_(options v) : value(v) {} + uac_barr_factor_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct uac_barr_time_r15_e_ { + enum options { s4, s8, s16, s32, s64, s128, s256, s512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + uac_barr_time_r15_e_() {} + uac_barr_time_r15_e_(options v) : value(v) {} + uac_barr_time_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + uac_barr_factor_r15_e_ uac_barr_factor_r15; + uac_barr_time_r15_e_ uac_barr_time_r15; + fixed_bitstring<7> uac_barr_for_access_id_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringPerPLMN-r15 ::= SEQUENCE +struct uac_barr_per_plmn_r15_s { + struct uac_ac_barr_list_type_r15_c_ { + typedef fixed_array uac_implicit_ac_barr_list_r15_l_; + struct types { + enum options { uac_implicit_ac_barr_list_r15, uac_explicit_ac_barr_list_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + uac_ac_barr_list_type_r15_c_() : type_(types::nulltype) {} + uac_ac_barr_list_type_r15_c_(const uac_ac_barr_list_type_r15_c_& other); + uac_ac_barr_list_type_r15_c_& operator=(const uac_ac_barr_list_type_r15_c_& other); + ~uac_ac_barr_list_type_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uac_implicit_ac_barr_list_r15_l_& uac_implicit_ac_barr_list_r15() + { + assert_choice_type("uac-ImplicitAC-BarringList-r15", type_.to_string(), "uac-AC-BarringListType-r15"); + return c.get(); + } + uac_barr_per_cat_list_r15_l& uac_explicit_ac_barr_list_r15() + { + assert_choice_type("uac-ExplicitAC-BarringList-r15", type_.to_string(), "uac-AC-BarringListType-r15"); + return c.get(); + } + const uac_implicit_ac_barr_list_r15_l_& uac_implicit_ac_barr_list_r15() const + { + assert_choice_type("uac-ImplicitAC-BarringList-r15", type_.to_string(), "uac-AC-BarringListType-r15"); + return c.get(); + } + const uac_barr_per_cat_list_r15_l& uac_explicit_ac_barr_list_r15() const + { + assert_choice_type("uac-ExplicitAC-BarringList-r15", type_.to_string(), "uac-AC-BarringListType-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool uac_ac_barr_list_type_r15_present; + uint8_t plmn_id_idx_r15; + uac_ac_barr_list_type_r15_c_ uac_ac_barr_list_type_r15; + + // sequence methods + uac_barr_per_plmn_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UDT-RestrictingPerPLMN-r13 ::= SEQUENCE +struct udt_restricting_per_plmn_r13_s { + // member variables + bool udt_restricting_r13_present; + uint8_t plmn_id_idx_r13; + udt_restricting_r13_s udt_restricting_r13; + + // sequence methods + udt_restricting_per_plmn_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-CyclicPrefixLength ::= ENUMERATED +struct ul_cp_len_e { + enum options { len1, len2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_cp_len_e() {} + ul_cp_len_e(options v) : value(v) {} + ul_cp_len_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// UplinkPowerControlCommon ::= SEQUENCE +struct ul_pwr_ctrl_common_s { + // member variables + int8_t p0_nominal_pusch; + alpha_r12_e alpha; + int8_t p0_nominal_pucch; + delta_flist_pucch_s delta_flist_pucch; + int8_t delta_preamb_msg3; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommon-v1020 ::= SEQUENCE +struct ul_pwr_ctrl_common_v1020_s { + struct delta_f_pucch_format3_r10_e_ { + enum options { delta_f_minus1, delta_f0, delta_f1, delta_f2, delta_f3, delta_f4, delta_f5, delta_f6 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format3_r10_e_() {} + delta_f_pucch_format3_r10_e_(options v) : value(v) {} + delta_f_pucch_format3_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_pucch_format1b_cs_r10_e_ { + enum options { delta_f1, delta_f2, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format1b_cs_r10_e_() {} + delta_f_pucch_format1b_cs_r10_e_(options v) : value(v) {} + delta_f_pucch_format1b_cs_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + delta_f_pucch_format3_r10_e_ delta_f_pucch_format3_r10; + delta_f_pucch_format1b_cs_r10_e_ delta_f_pucch_format1b_cs_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-Id-List-r12 ::= SEQUENCE (SIZE (1..maxWLAN-Id-r12)) OF WLAN-Identifiers-r12 +typedef dyn_array wlan_id_list_r12_l; + +// WLAN-OffloadConfig-r12 ::= SEQUENCE +struct wlan_offload_cfg_r12_s { + struct thres_rsrp_r12_s_ { + // member variables + uint8_t thres_rsrp_low_r12; + uint8_t thres_rsrp_high_r12; + }; + struct thres_rsrq_r12_s_ { + // member variables + uint8_t thres_rsrq_low_r12; + uint8_t thres_rsrq_high_r12; + }; + struct thres_rsrq_on_all_symbols_with_wb_r12_s_ { + // member variables + uint8_t thres_rsrq_on_all_symbols_with_wb_low_r12; + uint8_t thres_rsrq_on_all_symbols_with_wb_high_r12; + }; + struct thres_rsrq_on_all_symbols_r12_s_ { + // member variables + uint8_t thres_rsrq_on_all_symbols_low_r12; + uint8_t thres_rsrq_on_all_symbols_high_r12; + }; + struct thres_rsrq_wb_r12_s_ { + // member variables + uint8_t thres_rsrq_wb_low_r12; + uint8_t thres_rsrq_wb_high_r12; + }; + struct thres_ch_utilization_r12_s_ { + // member variables + uint8_t thres_ch_utilization_low_r12; + uint8_t thres_ch_utilization_high_r12; + }; + struct thres_backhaul_bw_r12_s_ { + // member variables + wlan_backhaul_rate_r12_e thres_backhaul_dl_bw_low_r12; + wlan_backhaul_rate_r12_e thres_backhaul_dl_bw_high_r12; + wlan_backhaul_rate_r12_e thres_backhaul_ul_bw_low_r12; + wlan_backhaul_rate_r12_e thres_backhaul_ul_bw_high_r12; + }; + struct thres_wlan_rssi_r12_s_ { + // member variables + uint8_t thres_wlan_rssi_low_r12; + uint8_t thres_wlan_rssi_high_r12; + }; + + // member variables + bool ext; + bool thres_rsrp_r12_present; + bool thres_rsrq_r12_present; + bool thres_rsrq_on_all_symbols_with_wb_r12_present; + bool thres_rsrq_on_all_symbols_r12_present; + bool thres_rsrq_wb_r12_present; + bool thres_ch_utilization_r12_present; + bool thres_backhaul_bw_r12_present; + bool thres_wlan_rssi_r12_present; + bool offload_pref_ind_r12_present; + bool t_steering_wlan_r12_present; + thres_rsrp_r12_s_ thres_rsrp_r12; + thres_rsrq_r12_s_ thres_rsrq_r12; + thres_rsrq_on_all_symbols_with_wb_r12_s_ thres_rsrq_on_all_symbols_with_wb_r12; + thres_rsrq_on_all_symbols_r12_s_ thres_rsrq_on_all_symbols_r12; + thres_rsrq_wb_r12_s_ thres_rsrq_wb_r12; + thres_ch_utilization_r12_s_ thres_ch_utilization_r12; + thres_backhaul_bw_r12_s_ thres_backhaul_bw_r12; + thres_wlan_rssi_r12_s_ thres_wlan_rssi_r12; + fixed_bitstring<16> offload_pref_ind_r12; + uint8_t t_steering_wlan_r12; + // ... + + // sequence methods + wlan_offload_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WUS-Config-r15 ::= SEQUENCE +struct wus_cfg_r15_s { + struct max_dur_factor_r15_e_ { + enum options { one32th, one16th, one8th, one4th }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_dur_factor_r15_e_() {} + max_dur_factor_r15_e_(options v) : value(v) {} + max_dur_factor_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct num_pos_r15_e_ { + enum options { n1, n2, n4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + num_pos_r15_e_() {} + num_pos_r15_e_(options v) : value(v) {} + num_pos_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct freq_location_r15_e_ { + enum options { n0, n2, n4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + freq_location_r15_e_() {} + freq_location_r15_e_(options v) : value(v) {} + freq_location_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct time_offset_drx_r15_e_ { + enum options { ms40, ms80, ms160, ms240 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + time_offset_drx_r15_e_() {} + time_offset_drx_r15_e_(options v) : value(v) {} + time_offset_drx_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct time_offset_e_drx_short_r15_e_ { + enum options { ms40, ms80, ms160, ms240 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + time_offset_e_drx_short_r15_e_() {} + time_offset_e_drx_short_r15_e_(options v) : value(v) {} + time_offset_e_drx_short_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct time_offset_e_drx_long_r15_e_ { + enum options { ms1000, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + time_offset_e_drx_long_r15_e_() {} + time_offset_e_drx_long_r15_e_(options v) : value(v) {} + time_offset_e_drx_long_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool num_pos_r15_present; + bool time_offset_e_drx_long_r15_present; + max_dur_factor_r15_e_ max_dur_factor_r15; + num_pos_r15_e_ num_pos_r15; + freq_location_r15_e_ freq_location_r15; + time_offset_drx_r15_e_ time_offset_drx_r15; + time_offset_e_drx_short_r15_e_ time_offset_e_drx_short_r15; + time_offset_e_drx_long_r15_e_ time_offset_e_drx_long_r15; + + // sequence methods + wus_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AC-BarringPerPLMN-List-r12 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF AC-BarringPerPLMN-r12 +typedef dyn_array ac_barr_per_plmn_list_r12_l; + +// ACDC-BarringForCommon-r13 ::= SEQUENCE +struct acdc_barr_for_common_r13_s { + // member variables + bool acdc_hplm_nonly_r13; + barr_per_acdc_category_list_r13_l barr_per_acdc_category_list_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ACDC-BarringPerPLMN-List-r13 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF ACDC-BarringPerPLMN-r13 +typedef dyn_array acdc_barr_per_plmn_list_r13_l; + +// CIOT-EPS-OptimisationInfo-r13 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF CIOT-OptimisationPLMN-r13 +typedef dyn_array ciot_eps_optim_info_r13_l; + +// CarrierFreqInfoUTRA-v1250 ::= SEQUENCE +struct carrier_freq_info_utra_v1250_s { + // member variables + bool reduced_meas_performance_r12_present; + + // sequence methods + carrier_freq_info_utra_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqListNR-r15 ::= SEQUENCE (SIZE (1..maxFreq)) OF CarrierFreqNR-r15 +typedef dyn_array carrier_freq_list_nr_r15_l; + +// CarrierFreqListUTRA-FDD ::= SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF CarrierFreqUTRA-FDD +typedef dyn_array carrier_freq_list_utra_fdd_l; + +// CarrierFreqListUTRA-FDD-Ext-r12 ::= SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF CarrierFreqUTRA-FDD-Ext-r12 +typedef dyn_array carrier_freq_list_utra_fdd_ext_r12_l; + +// CarrierFreqListUTRA-TDD ::= SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF CarrierFreqUTRA-TDD +typedef dyn_array carrier_freq_list_utra_tdd_l; + +// CarrierFreqListUTRA-TDD-Ext-r12 ::= SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF CarrierFreqUTRA-TDD-r12 +typedef dyn_array carrier_freq_list_utra_tdd_ext_r12_l; + +// CarrierFreqsInfoListGERAN ::= SEQUENCE (SIZE (1..maxGNFG)) OF CarrierFreqsInfoGERAN +typedef dyn_array carrier_freqs_info_list_geran_l; + +// CellReselectionInfoCommon-v1460 ::= SEQUENCE +struct cell_resel_info_common_v1460_s { + struct s_search_delta_p_r14_e_ { + enum options { db6, db9, db12, db15 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + s_search_delta_p_r14_e_() {} + s_search_delta_p_r14_e_(options v) : value(v) {} + s_search_delta_p_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + s_search_delta_p_r14_e_ s_search_delta_p_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellReselectionInfoHSDN-r15 ::= SEQUENCE +struct cell_resel_info_hsdn_r15_s { + // member variables + uint8_t cell_equivalent_size_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellReselectionParametersCDMA2000 ::= SEQUENCE +struct cell_resel_params_cdma2000_s { + // member variables + bool t_resel_cdma2000_sf_present; + band_class_list_cdma2000_l band_class_list; + neigh_cell_list_cdma2000_l neigh_cell_list; + uint8_t t_resel_cdma2000; + speed_state_scale_factors_s t_resel_cdma2000_sf; + + // sequence methods + cell_resel_params_cdma2000_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellReselectionParametersCDMA2000-v920 ::= SEQUENCE +struct cell_resel_params_cdma2000_v920_s { + // member variables + neigh_cell_list_cdma2000_v920_l neigh_cell_list_v920; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellReselectionServingFreqInfo-v1310 ::= SEQUENCE +struct cell_resel_serving_freq_info_v1310_s { + // member variables + cell_resel_sub_prio_r13_e cell_resel_sub_prio_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellSelectionInfo-v920 ::= SEQUENCE +struct cell_sel_info_v920_s { + // member variables + bool q_qual_min_offset_r9_present; + int8_t q_qual_min_r9; + uint8_t q_qual_min_offset_r9; + + // sequence methods + cell_sel_info_v920_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EAB-ConfigPLMN-r11 ::= SEQUENCE +struct eab_cfg_plmn_r11_s { + // member variables + bool eab_cfg_r11_present; + eab_cfg_r11_s eab_cfg_r11; + + // sequence methods + eab_cfg_plmn_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqList ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo +typedef dyn_array inter_freq_carrier_freq_list_l; + +// InterFreqCarrierFreqList-v1250 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1250 +typedef dyn_array inter_freq_carrier_freq_list_v1250_l; + +// InterFreqCarrierFreqList-v1310 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1310 +typedef dyn_array inter_freq_carrier_freq_list_v1310_l; + +// InterFreqCarrierFreqList-v1350 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1350 +typedef dyn_array inter_freq_carrier_freq_list_v1350_l; + +// InterFreqCarrierFreqList-v1530 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1530 +typedef dyn_array inter_freq_carrier_freq_list_v1530_l; + +// InterFreqCarrierFreqListExt-r12 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-r12 +typedef dyn_array inter_freq_carrier_freq_list_ext_r12_l; + +// InterFreqCarrierFreqListExt-v1280 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v10j0 +typedef dyn_array inter_freq_carrier_freq_list_ext_v1280_l; + +// InterFreqCarrierFreqListExt-v1310 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1310 +typedef dyn_array inter_freq_carrier_freq_list_ext_v1310_l; + +// InterFreqCarrierFreqListExt-v1350 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1350 +typedef dyn_array inter_freq_carrier_freq_list_ext_v1350_l; + +// InterFreqCarrierFreqListExt-v1360 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1360 +typedef dyn_array inter_freq_carrier_freq_list_ext_v1360_l; + +// InterFreqCarrierFreqListExt-v1530 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1530 +typedef dyn_array inter_freq_carrier_freq_list_ext_v1530_l; + +// IntraFreqBlackCellList ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PhysCellIdRange +typedef dyn_array intra_freq_black_cell_list_l; + +// IntraFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo +typedef dyn_array intra_freq_neigh_cell_list_l; + +// IntraFreqNeighHSDN-CellList-r15 ::= SEQUENCE (SIZE (1..maxCellIntra)) OF PhysCellIdRange +typedef dyn_array intra_freq_neigh_hsdn_cell_list_r15_l; + +// MBMS-InterFreqCarrierTypeList-r14 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-CarrierType-r14 +typedef dyn_array mbms_inter_freq_carrier_type_list_r14_l; + +// MBMS-NotificationConfig-r9 ::= SEQUENCE +struct mbms_notif_cfg_r9_s { + struct notif_repeat_coeff_r9_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + notif_repeat_coeff_r9_e_() {} + notif_repeat_coeff_r9_e_(options v) : value(v) {} + notif_repeat_coeff_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + notif_repeat_coeff_r9_e_ notif_repeat_coeff_r9; + uint8_t notif_offset_r9; + uint8_t notif_sf_idx_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-NotificationConfig-v1430 ::= SEQUENCE +struct mbms_notif_cfg_v1430_s { + // member variables + uint8_t notif_sf_idx_v1430; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-SAI-InterFreqList-r11 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-SAI-InterFreq-r11 +typedef dyn_array mbms_sai_inter_freq_list_r11_l; + +// MBMS-SAI-InterFreqList-v1140 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-SAI-InterFreq-v1140 +typedef dyn_array mbms_sai_inter_freq_list_v1140_l; + +// MBSFN-AreaInfoList-r9 ::= SEQUENCE (SIZE(1..maxMBSFN-Area)) OF MBSFN-AreaInfo-r9 +typedef dyn_array mbsfn_area_info_list_r9_l; + +// MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig +typedef dyn_array mbsfn_sf_cfg_list_l; + +// MBSFN-SubframeConfigList-v1430 ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig-v1430 +typedef dyn_array mbsfn_sf_cfg_list_v1430_l; + +// MeasIdleConfigSIB-r15 ::= SEQUENCE +struct meas_idle_cfg_sib_r15_s { + // member variables + bool ext; + eutra_carrier_list_r15_l meas_idle_carrier_list_eutra_r15; + // ... + + // sequence methods + meas_idle_cfg_sib_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityStateParameters ::= SEQUENCE +struct mob_state_params_s { + struct t_eval_e_ { + enum options { s30, s60, s120, s180, s240, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t_eval_e_() {} + t_eval_e_(options v) : value(v) {} + t_eval_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct t_hyst_normal_e_ { + enum options { s30, s60, s120, s180, s240, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t_hyst_normal_e_() {} + t_hyst_normal_e_(options v) : value(v) {} + t_hyst_normal_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + t_eval_e_ t_eval; + t_hyst_normal_e_ t_hyst_normal; + uint8_t n_cell_change_medium; + uint8_t n_cell_change_high; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-InfoList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-Info-r15 +typedef dyn_array plmn_info_list_r15_l; + +// RadioResourceConfigCommonSIB ::= SEQUENCE +struct rr_cfg_common_sib_s { + // member variables + bool ext; + rach_cfg_common_s rach_cfg_common; + bcch_cfg_s bcch_cfg; + pcch_cfg_s pcch_cfg; + prach_cfg_sib_s prach_cfg; + pdsch_cfg_common_s pdsch_cfg_common; + pusch_cfg_common_s pusch_cfg_common; + pucch_cfg_common_s pucch_cfg_common; + srs_ul_cfg_common_c srs_ul_cfg_common; + ul_pwr_ctrl_common_s ul_pwr_ctrl_common; + ul_cp_len_e ul_cp_len; + // ... + // group 0 + bool ul_pwr_ctrl_common_v1020_present; + copy_ptr ul_pwr_ctrl_common_v1020; + // group 1 + bool rach_cfg_common_v1250_present; + copy_ptr rach_cfg_common_v1250; + // group 2 + bool pusch_cfg_common_v1270_present; + copy_ptr pusch_cfg_common_v1270; + // group 3 + bool bcch_cfg_v1310_present; + bool pcch_cfg_v1310_present; + bool freq_hop_params_r13_present; + bool pdsch_cfg_common_v1310_present; + bool pusch_cfg_common_v1310_present; + bool prach_cfg_common_v1310_present; + bool pucch_cfg_common_v1310_present; + copy_ptr bcch_cfg_v1310; + copy_ptr pcch_cfg_v1310; + copy_ptr freq_hop_params_r13; + copy_ptr pdsch_cfg_common_v1310; + copy_ptr pusch_cfg_common_v1310; + copy_ptr prach_cfg_common_v1310; + copy_ptr pucch_cfg_common_v1310; + // group 4 + bool high_speed_cfg_r14_present; + bool prach_cfg_v1430_present; + bool pucch_cfg_common_v1430_present; + copy_ptr high_speed_cfg_r14; + copy_ptr prach_cfg_v1430; + copy_ptr pucch_cfg_common_v1430; + // group 5 + bool prach_cfg_v1530_present; + bool ce_rss_cfg_r15_present; + bool wus_cfg_r15_present; + bool high_speed_cfg_v1530_present; + copy_ptr prach_cfg_v1530; + copy_ptr ce_rss_cfg_r15; + copy_ptr wus_cfg_r15; + copy_ptr high_speed_cfg_v1530; + + // sequence methods + rr_cfg_common_sib_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RedistributionServingInfo-r13 ::= SEQUENCE +struct redist_serving_info_r13_s { + struct t360_r13_e_ { + enum options { min4, min8, min16, min32, infinity, spare3, spare2, spare1 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t360_r13_e_() {} + t360_r13_e_(options v) : value(v) {} + t360_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + bool redist_factor_cell_r13_present; + bool redistr_on_paging_only_r13_present; + uint8_t redist_factor_serving_r13; + t360_r13_e_ t360_r13; + + // sequence methods + redist_serving_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MCCH-SchedulingInfo-r14 ::= SEQUENCE +struct sc_mcch_sched_info_r14_s { + struct on_dur_timer_scptm_r14_e_ { + enum options { psf10, psf20, psf100, psf300, psf500, psf1000, psf1200, psf1600 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + on_dur_timer_scptm_r14_e_() {} + on_dur_timer_scptm_r14_e_(options v) : value(v) {} + on_dur_timer_scptm_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_inactivity_timer_scptm_r14_e_ { + enum options { + psf0, + psf1, + psf2, + psf4, + psf8, + psf16, + psf32, + psf64, + psf128, + psf256, + ps512, + psf1024, + psf2048, + psf4096, + psf8192, + psf16384 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_inactivity_timer_scptm_r14_e_() {} + drx_inactivity_timer_scptm_r14_e_(options v) : value(v) {} + drx_inactivity_timer_scptm_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct sched_period_start_offset_scptm_r14_c_ { + struct types { + enum options { + sf10, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf256, + sf320, + sf512, + sf640, + sf1024, + sf2048, + sf4096, + sf8192, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + sched_period_start_offset_scptm_r14_c_() : type_(types::nulltype) {} + sched_period_start_offset_scptm_r14_c_(const sched_period_start_offset_scptm_r14_c_& other); + sched_period_start_offset_scptm_r14_c_& operator=(const sched_period_start_offset_scptm_r14_c_& other); + ~sched_period_start_offset_scptm_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf10() + { + assert_choice_type("sf10", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf20() + { + assert_choice_type("sf20", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf32() + { + assert_choice_type("sf32", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf40() + { + assert_choice_type("sf40", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf64() + { + assert_choice_type("sf64", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf80() + { + assert_choice_type("sf80", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf128() + { + assert_choice_type("sf128", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf160() + { + assert_choice_type("sf160", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf256() + { + assert_choice_type("sf256", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf320() + { + assert_choice_type("sf320", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf512() + { + assert_choice_type("sf512", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf640() + { + assert_choice_type("sf640", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf1024() + { + assert_choice_type("sf1024", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf2048() + { + assert_choice_type("sf2048", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf4096() + { + assert_choice_type("sf4096", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf8192() + { + assert_choice_type("sf8192", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf10() const + { + assert_choice_type("sf10", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf20() const + { + assert_choice_type("sf20", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf32() const + { + assert_choice_type("sf32", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf40() const + { + assert_choice_type("sf40", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf64() const + { + assert_choice_type("sf64", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf80() const + { + assert_choice_type("sf80", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf128() const + { + assert_choice_type("sf128", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf160() const + { + assert_choice_type("sf160", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf256() const + { + assert_choice_type("sf256", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf320() const + { + assert_choice_type("sf320", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf512() const + { + assert_choice_type("sf512", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf640() const + { + assert_choice_type("sf640", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf1024() const + { + assert_choice_type("sf1024", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf2048() const + { + assert_choice_type("sf2048", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf4096() const + { + assert_choice_type("sf4096", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf8192() const + { + assert_choice_type("sf8192", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + on_dur_timer_scptm_r14_e_ on_dur_timer_scptm_r14; + drx_inactivity_timer_scptm_r14_e_ drx_inactivity_timer_scptm_r14; + sched_period_start_offset_scptm_r14_c_ sched_period_start_offset_scptm_r14; + // ... + + // sequence methods + sc_mcch_sched_info_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-MappingInfo ::= SEQUENCE (SIZE (0..maxSIB-1)) OF SIB-Type +typedef bounded_array sib_map_info_l; + +// SIB8-PerPLMN-List-r11 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF SIB8-PerPLMN-r11 +typedef dyn_array sib8_per_plmn_list_r11_l; + +// SL-CBR-PPPP-TxConfigList-r15 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxConfigIndex-r15 +typedef dyn_array sl_cbr_pppp_tx_cfg_list_r15_l; + +// SL-CarrierFreqInfoList-r12 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-CarrierFreqInfo-r12 +typedef dyn_array sl_carrier_freq_info_list_r12_l; + +// SL-CarrierFreqInfoList-v1310 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-CarrierFreqInfo-v1310 +typedef dyn_array sl_carrier_freq_info_list_v1310_l; + +// SL-CommRxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-RxPool-r12)) OF SL-CommResourcePool-r12 +typedef dyn_array sl_comm_rx_pool_list_r12_l; + +// SL-CommTxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-CommResourcePool-r12 +typedef dyn_array sl_comm_tx_pool_list_r12_l; + +// SL-CommTxPoolListExt-r13 ::= SEQUENCE (SIZE (1..maxSL-TxPool-v1310)) OF SL-CommResourcePool-r12 +typedef dyn_array sl_comm_tx_pool_list_ext_r13_l; + +// SL-DiscConfigRelayUE-r13 ::= SEQUENCE +struct sl_disc_cfg_relay_ue_r13_s { + struct hyst_max_r13_e_ { + enum options { db0, db3, db6, db9, db12, dbinf }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + hyst_max_r13_e_() {} + hyst_max_r13_e_(options v) : value(v) {} + hyst_max_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct hyst_min_r13_e_ { + enum options { db0, db3, db6, db9, db12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + hyst_min_r13_e_() {} + hyst_min_r13_e_(options v) : value(v) {} + hyst_min_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool thresh_high_r13_present; + bool thresh_low_r13_present; + bool hyst_max_r13_present; + bool hyst_min_r13_present; + uint8_t thresh_high_r13; + uint8_t thresh_low_r13; + hyst_max_r13_e_ hyst_max_r13; + hyst_min_r13_e_ hyst_min_r13; + + // sequence methods + sl_disc_cfg_relay_ue_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscConfigRemoteUE-r13 ::= SEQUENCE +struct sl_disc_cfg_remote_ue_r13_s { + struct hyst_max_r13_e_ { + enum options { db0, db3, db6, db9, db12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + hyst_max_r13_e_() {} + hyst_max_r13_e_(options v) : value(v) {} + hyst_max_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool thresh_high_r13_present; + bool hyst_max_r13_present; + uint8_t thresh_high_r13; + hyst_max_r13_e_ hyst_max_r13; + resel_info_relay_r13_s resel_info_ic_r13; + + // sequence methods + sl_disc_cfg_remote_ue_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-SyncConfigList-r12 ::= SEQUENCE (SIZE (1..maxSL-SyncConfig-r12)) OF SL-SyncConfig-r12 +typedef dyn_array sl_sync_cfg_list_r12_l; + +// SL-V2X-ConfigCommon-r14 ::= SEQUENCE +struct sl_v2x_cfg_common_r14_s { + // member variables + bool v2x_comm_rx_pool_r14_present; + bool v2x_comm_tx_pool_normal_common_r14_present; + bool p2x_comm_tx_pool_normal_common_r14_present; + bool v2x_comm_tx_pool_exceptional_r14_present; + bool v2x_sync_cfg_r14_present; + bool v2x_inter_freq_info_list_r14_present; + bool v2x_res_sel_cfg_r14_present; + bool zone_cfg_r14_present; + bool type_tx_sync_r14_present; + bool thres_sl_tx_prioritization_r14_present; + bool anchor_carrier_freq_list_r14_present; + bool offset_dfn_r14_present; + bool cbr_common_tx_cfg_list_r14_present; + sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14; + sl_comm_tx_pool_list_v2x_r14_l v2x_comm_tx_pool_normal_common_r14; + sl_comm_tx_pool_list_v2x_r14_l p2x_comm_tx_pool_normal_common_r14; + sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14; + sl_sync_cfg_list_v2x_r14_l v2x_sync_cfg_r14; + sl_inter_freq_info_list_v2x_r14_l v2x_inter_freq_info_list_r14; + sl_comm_tx_pool_sensing_cfg_r14_s v2x_res_sel_cfg_r14; + sl_zone_cfg_r14_s zone_cfg_r14; + sl_type_tx_sync_r14_e type_tx_sync_r14; + uint8_t thres_sl_tx_prioritization_r14; + sl_anchor_carrier_freq_list_v2x_r14_l anchor_carrier_freq_list_r14; + uint16_t offset_dfn_r14; + sl_cbr_common_tx_cfg_list_r14_s cbr_common_tx_cfg_list_r14; + + // sequence methods + sl_v2x_cfg_common_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-PacketDuplicationConfig-r15 ::= SEQUENCE +struct sl_v2x_packet_dupl_cfg_r15_s { + // member variables + bool ext; + bool allowed_carrier_freq_cfg_r15_present; + uint8_t thresh_sl_reliability_r15; + sl_pppr_dest_carrier_freq_list_r15_l allowed_carrier_freq_cfg_r15; + // ... + + // sequence methods + sl_v2x_packet_dupl_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-SyncFreqList-r15 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF INTEGER +typedef bounded_array sl_v2x_sync_freq_list_r15_l; + +// SystemInformationBlockType1-v1130-IEs ::= SEQUENCE +struct sib_type1_v1130_ies_s { + // member variables + bool tdd_cfg_v1130_present; + bool cell_sel_info_v1130_present; + bool non_crit_ext_present; + tdd_cfg_v1130_s tdd_cfg_v1130; + cell_sel_info_v1130_s cell_sel_info_v1130; + sib_type1_v1250_ies_s non_crit_ext; + + // sequence methods + sib_type1_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v9e0-IEs ::= SEQUENCE +struct sib_type1_v9e0_ies_s { + // member variables + bool freq_band_ind_v9e0_present; + bool multi_band_info_list_v9e0_present; + bool non_crit_ext_present; + uint16_t freq_band_ind_v9e0; + multi_band_info_list_v9e0_l multi_band_info_list_v9e0; + sib_type1_v10j0_ies_s non_crit_ext; + + // sequence methods + sib_type1_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType2-v8h0-IEs ::= SEQUENCE +struct sib_type2_v8h0_ies_s { + typedef bounded_array multi_band_info_list_l_; + + // member variables + bool multi_band_info_list_present; + bool non_crit_ext_present; + multi_band_info_list_l_ multi_band_info_list; + sib_type2_v9e0_ies_s non_crit_ext; + + // sequence methods + sib_type2_v8h0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType3-v10j0-IEs ::= SEQUENCE +struct sib_type3_v10j0_ies_s { + // member variables + bool freq_band_info_r10_present; + bool multi_band_info_list_v10j0_present; + bool non_crit_ext_present; + ns_pmax_list_r10_l freq_band_info_r10; + multi_band_info_list_v10j0_l multi_band_info_list_v10j0; + sib_type3_v10l0_ies_s non_crit_ext; + + // sequence methods + sib_type3_v10j0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType5-v8h0-IEs ::= SEQUENCE +struct sib_type5_v8h0_ies_s { + typedef dyn_array inter_freq_carrier_freq_list_v8h0_l_; + + // member variables + bool inter_freq_carrier_freq_list_v8h0_present; + bool non_crit_ext_present; + inter_freq_carrier_freq_list_v8h0_l_ inter_freq_carrier_freq_list_v8h0; + sib_type5_v9e0_ies_s non_crit_ext; + + // sequence methods + sib_type5_v8h0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType6-v8h0-IEs ::= SEQUENCE +struct sib_type6_v8h0_ies_s { + typedef dyn_array carrier_freq_list_utra_fdd_v8h0_l_; + + // member variables + bool carrier_freq_list_utra_fdd_v8h0_present; + bool non_crit_ext_present; + carrier_freq_list_utra_fdd_v8h0_l_ carrier_freq_list_utra_fdd_v8h0; + + // sequence methods + sib_type6_v8h0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TimeAlignmentTimer ::= ENUMERATED +struct time_align_timer_e { + enum options { sf500, sf750, sf1280, sf1920, sf2560, sf5120, sf10240, infinity }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + time_align_timer_e() {} + time_align_timer_e(options v) : value(v) {} + time_align_timer_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; +}; + +// TimeReferenceInfo-r15 ::= SEQUENCE +struct time_ref_info_r15_s { + // member variables + bool uncertainty_r15_present; + bool time_info_type_r15_present; + bool ref_sfn_r15_present; + ref_time_r15_s time_r15; + uint8_t uncertainty_r15; + uint16_t ref_sfn_r15; + + // sequence methods + time_ref_info_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-AC1-SelectAssistInfo-r15 ::= ENUMERATED +struct uac_ac1_select_assist_info_r15_e { + enum options { a, b, c }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + uac_ac1_select_assist_info_r15_e() {} + uac_ac1_select_assist_info_r15_e(options v) : value(v) {} + uac_ac1_select_assist_info_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// UAC-BarringInfoSetList-r15 ::= SEQUENCE (SIZE (1..maxBarringInfoSet-r15)) OF UAC-BarringInfoSet-r15 +typedef dyn_array uac_barr_info_set_list_r15_l; + +// UAC-BarringPerPLMN-List-r15 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF UAC-BarringPerPLMN-r15 +typedef dyn_array uac_barr_per_plmn_list_r15_l; + +// UDT-RestrictingPerPLMN-List-r13 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF UDT-RestrictingPerPLMN-r13 +typedef dyn_array udt_restricting_per_plmn_list_r13_l; + +// UE-TimersAndConstants ::= SEQUENCE +struct ue_timers_and_consts_s { + struct t300_e_ { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t300_e_() {} + t300_e_(options v) : value(v) {} + t300_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t301_e_ { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t301_e_() {} + t301_e_(options v) : value(v) {} + t301_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t310_e_ { + enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t310_e_() {} + t310_e_(options v) : value(v) {} + t310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct n310_e_ { + enum options { n1, n2, n3, n4, n6, n8, n10, n20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n310_e_() {} + n310_e_(options v) : value(v) {} + n310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct t311_e_ { + enum options { ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t311_e_() {} + t311_e_(options v) : value(v) {} + t311_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct n311_e_ { + enum options { n1, n2, n3, n4, n5, n6, n8, n10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n311_e_() {} + n311_e_(options v) : value(v) {} + n311_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct t300_v1310_e_ { + enum options { ms2500, ms3000, ms3500, ms4000, ms5000, ms6000, ms8000, ms10000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t300_v1310_e_() {} + t300_v1310_e_(options v) : value(v) {} + t300_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t301_v1310_e_ { + enum options { ms2500, ms3000, ms3500, ms4000, ms5000, ms6000, ms8000, ms10000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t301_v1310_e_() {} + t301_v1310_e_(options v) : value(v) {} + t301_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t310_v1330_e_ { + enum options { ms4000, ms6000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t310_v1330_e_() {} + t310_v1330_e_(options v) : value(v) {} + t310_v1330_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t300_r15_e_ { + enum options { ms4000, ms6000, ms8000, ms10000, ms15000, ms25000, ms40000, ms60000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t300_r15_e_() {} + t300_r15_e_(options v) : value(v) {} + t300_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + t300_e_ t300; + t301_e_ t301; + t310_e_ t310; + n310_e_ n310; + t311_e_ t311; + n311_e_ n311; + // ... + // group 0 + bool t300_v1310_present; + bool t301_v1310_present; + t300_v1310_e_ t300_v1310; + t301_v1310_e_ t301_v1310; + // group 1 + bool t310_v1330_present; + t310_v1330_e_ t310_v1330; + // group 2 + bool t300_r15_present; + t300_r15_e_ t300_r15; + + // sequence methods + ue_timers_and_consts_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-OffloadInfoPerPLMN-r12 ::= SEQUENCE +struct wlan_offload_info_per_plmn_r12_s { + // member variables + bool ext; + bool wlan_offload_cfg_common_r12_present; + bool wlan_id_list_r12_present; + wlan_offload_cfg_r12_s wlan_offload_cfg_common_r12; + wlan_id_list_r12_l wlan_id_list_r12; + // ... + + // sequence methods + wlan_offload_info_per_plmn_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingInfo ::= SEQUENCE +struct sched_info_s { + struct si_periodicity_e_ { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_periodicity_e_() {} + si_periodicity_e_(options v) : value(v) {} + si_periodicity_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + si_periodicity_e_ si_periodicity; + sib_map_info_l sib_map_info; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformation-v8a0-IEs ::= SEQUENCE +struct sys_info_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + sys_info_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockPos-r15 ::= SEQUENCE +struct sib_pos_r15_s { + // member variables + bool ext; + bool late_non_crit_ext_present; + dyn_octstring assist_data_sib_elem_r15; + dyn_octstring late_non_crit_ext; + // ... + + // sequence methods + sib_pos_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v8h0-IEs ::= SEQUENCE +struct sib_type1_v8h0_ies_s { + // member variables + bool multi_band_info_list_present; + bool non_crit_ext_present; + multi_band_info_list_l multi_band_info_list; + sib_type1_v9e0_ies_s non_crit_ext; + + // sequence methods + sib_type1_v8h0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v920-IEs ::= SEQUENCE +struct sib_type1_v920_ies_s { + // member variables + bool ims_emergency_support_r9_present; + bool cell_sel_info_v920_present; + bool non_crit_ext_present; + cell_sel_info_v920_s cell_sel_info_v920; + sib_type1_v1130_ies_s non_crit_ext; + + // sequence methods + sib_type1_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType10 ::= SEQUENCE +struct sib_type10_s { + // member variables + bool ext; + bool dummy_present; + fixed_bitstring<16> msg_id; + fixed_bitstring<16> serial_num; + fixed_octstring<2> warning_type; + fixed_octstring<50> dummy; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + sib_type10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType11 ::= SEQUENCE +struct sib_type11_s { + struct warning_msg_segment_type_e_ { + enum options { not_last_segment, last_segment }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + warning_msg_segment_type_e_() {} + warning_msg_segment_type_e_(options v) : value(v) {} + warning_msg_segment_type_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool data_coding_scheme_present; + 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; + dyn_octstring warning_msg_segment; + fixed_octstring<1> data_coding_scheme; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + sib_type11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType12-r9 ::= SEQUENCE +struct sib_type12_r9_s { + struct warning_msg_segment_type_r9_e_ { + enum options { not_last_segment, last_segment }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + warning_msg_segment_type_r9_e_() {} + warning_msg_segment_type_r9_e_(options v) : value(v) {} + warning_msg_segment_type_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool data_coding_scheme_r9_present; + bool late_non_crit_ext_present; + fixed_bitstring<16> msg_id_r9; + fixed_bitstring<16> serial_num_r9; + warning_msg_segment_type_r9_e_ warning_msg_segment_type_r9; + uint8_t warning_msg_segment_num_r9; + dyn_octstring warning_msg_segment_r9; + fixed_octstring<1> data_coding_scheme_r9; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool warning_area_coordinates_segment_r15_present; + dyn_octstring warning_area_coordinates_segment_r15; + + // sequence methods + sib_type12_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType13-r9 ::= SEQUENCE +struct sib_type13_r9_s { + // member variables + bool ext; + bool late_non_crit_ext_present; + mbsfn_area_info_list_r9_l mbsfn_area_info_list_r9; + mbms_notif_cfg_r9_s notif_cfg_r9; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool notif_cfg_v1430_present; + copy_ptr notif_cfg_v1430; + + // sequence methods + sib_type13_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType14-r11 ::= SEQUENCE +struct sib_type14_r11_s { + struct eab_param_r11_c_ { + typedef dyn_array eab_per_plmn_list_r11_l_; + struct types { + enum options { eab_common_r11, eab_per_plmn_list_r11, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + eab_param_r11_c_() : type_(types::nulltype) {} + eab_param_r11_c_(const eab_param_r11_c_& other); + eab_param_r11_c_& operator=(const eab_param_r11_c_& other); + ~eab_param_r11_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + eab_cfg_r11_s& eab_common_r11() + { + assert_choice_type("eab-Common-r11", type_.to_string(), "eab-Param-r11"); + return c.get(); + } + eab_per_plmn_list_r11_l_& eab_per_plmn_list_r11() + { + assert_choice_type("eab-PerPLMN-List-r11", type_.to_string(), "eab-Param-r11"); + return c.get(); + } + const eab_cfg_r11_s& eab_common_r11() const + { + assert_choice_type("eab-Common-r11", type_.to_string(), "eab-Param-r11"); + return c.get(); + } + const eab_per_plmn_list_r11_l_& eab_per_plmn_list_r11() const + { + assert_choice_type("eab-PerPLMN-List-r11", type_.to_string(), "eab-Param-r11"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct eab_per_rsrp_r15_e_ { + enum options { thresh0, thresh1, thresh2, thresh3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + eab_per_rsrp_r15_e_() {} + eab_per_rsrp_r15_e_(options v) : value(v) {} + eab_per_rsrp_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool eab_param_r11_present; + bool late_non_crit_ext_present; + eab_param_r11_c_ eab_param_r11; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool eab_per_rsrp_r15_present; + eab_per_rsrp_r15_e_ eab_per_rsrp_r15; + + // sequence methods + sib_type14_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType15-r11 ::= SEQUENCE +struct sib_type15_r11_s { + // member variables + bool ext; + bool mbms_sai_intra_freq_r11_present; + bool mbms_sai_inter_freq_list_r11_present; + bool late_non_crit_ext_present; + mbms_sai_list_r11_l mbms_sai_intra_freq_r11; + mbms_sai_inter_freq_list_r11_l mbms_sai_inter_freq_list_r11; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool mbms_sai_inter_freq_list_v1140_present; + copy_ptr mbms_sai_inter_freq_list_v1140; + // group 1 + bool mbms_intra_freq_carrier_type_r14_present; + bool mbms_inter_freq_carrier_type_list_r14_present; + copy_ptr mbms_intra_freq_carrier_type_r14; + copy_ptr mbms_inter_freq_carrier_type_list_r14; + + // sequence methods + sib_type15_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType16-r11 ::= SEQUENCE +struct sib_type16_r11_s { + struct time_info_r11_s_ { + // member variables + bool day_light_saving_time_r11_present; + bool leap_seconds_r11_present; + bool local_time_offset_r11_present; + uint64_t time_info_utc_r11; + fixed_bitstring<2> day_light_saving_time_r11; + int16_t leap_seconds_r11; + int8_t local_time_offset_r11; + + // sequence methods + time_info_r11_s_(); + }; + + // member variables + bool ext; + bool time_info_r11_present; + bool late_non_crit_ext_present; + time_info_r11_s_ time_info_r11; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool time_ref_info_r15_present; + copy_ptr time_ref_info_r15; + + // sequence methods + sib_type16_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType17-r12 ::= SEQUENCE +struct sib_type17_r12_s { + typedef dyn_array wlan_offload_info_per_plmn_list_r12_l_; + + // member variables + bool ext; + bool wlan_offload_info_per_plmn_list_r12_present; + bool late_non_crit_ext_present; + wlan_offload_info_per_plmn_list_r12_l_ wlan_offload_info_per_plmn_list_r12; + dyn_octstring late_non_crit_ext; + // ... + + // sequence methods + sib_type17_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType18-r12 ::= SEQUENCE +struct sib_type18_r12_s { + struct comm_cfg_r12_s_ { + // member variables + bool comm_tx_pool_normal_common_r12_present; + bool comm_tx_pool_exceptional_r12_present; + bool comm_sync_cfg_r12_present; + sl_comm_rx_pool_list_r12_l comm_rx_pool_r12; + sl_comm_tx_pool_list_r12_l comm_tx_pool_normal_common_r12; + sl_comm_tx_pool_list_r12_l comm_tx_pool_exceptional_r12; + sl_sync_cfg_list_r12_l comm_sync_cfg_r12; + + // sequence methods + comm_cfg_r12_s_(); + }; + + // member variables + bool ext; + bool comm_cfg_r12_present; + bool late_non_crit_ext_present; + comm_cfg_r12_s_ comm_cfg_r12; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool comm_tx_pool_normal_common_ext_r13_present; + bool comm_tx_res_uc_req_allowed_r13_present; + bool comm_tx_allow_relay_common_r13_present; + copy_ptr comm_tx_pool_normal_common_ext_r13; + + // sequence methods + sib_type18_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType19-r12 ::= SEQUENCE +struct sib_type19_r12_s { + struct disc_cfg_r12_s_ { + // member variables + bool disc_tx_pool_common_r12_present; + bool disc_tx_pwr_info_r12_present; + bool disc_sync_cfg_r12_present; + sl_disc_rx_pool_list_r12_l disc_rx_pool_r12; + sl_disc_tx_pool_list_r12_l disc_tx_pool_common_r12; + sl_disc_tx_pwr_info_list_r12_l disc_tx_pwr_info_r12; + sl_sync_cfg_list_r12_l disc_sync_cfg_r12; + + // sequence methods + disc_cfg_r12_s_(); + }; + struct disc_cfg_v1310_s_ { + // member variables + bool disc_inter_freq_list_v1310_present; + bool gap_requests_allowed_common_present; + sl_carrier_freq_info_list_v1310_l disc_inter_freq_list_v1310; + + // sequence methods + disc_cfg_v1310_s_(); + }; + struct disc_cfg_relay_r13_s_ { + // member variables + sl_disc_cfg_relay_ue_r13_s relay_ue_cfg_r13; + sl_disc_cfg_remote_ue_r13_s remote_ue_cfg_r13; + }; + struct disc_cfg_ps_minus13_s_ { + // member variables + bool disc_tx_pool_ps_common_r13_present; + sl_disc_rx_pool_list_r12_l disc_rx_pool_ps_r13; + sl_disc_tx_pool_list_r12_l disc_tx_pool_ps_common_r13; + + // sequence methods + disc_cfg_ps_minus13_s_(); + }; + + // member variables + bool ext; + bool disc_cfg_r12_present; + bool disc_inter_freq_list_r12_present; + bool late_non_crit_ext_present; + disc_cfg_r12_s_ disc_cfg_r12; + sl_carrier_freq_info_list_r12_l disc_inter_freq_list_r12; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool disc_cfg_v1310_present; + bool disc_cfg_relay_r13_present; + bool disc_cfg_ps_minus13_present; + copy_ptr disc_cfg_v1310; + copy_ptr disc_cfg_relay_r13; + copy_ptr disc_cfg_ps_minus13; + + // sequence methods + sib_type19_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType2 ::= SEQUENCE +struct sib_type2_s { + struct ac_barr_info_s_ { + // member variables + bool ac_barr_for_mo_sig_present; + bool ac_barr_for_mo_data_present; + bool ac_barr_for_emergency; + ac_barr_cfg_s ac_barr_for_mo_sig; + ac_barr_cfg_s ac_barr_for_mo_data; + + // sequence methods + ac_barr_info_s_(); + }; + struct freq_info_s_ { + struct ul_bw_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_bw_e_() {} + ul_bw_e_(options v) : value(v) {} + ul_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ul_carrier_freq_present; + bool ul_bw_present; + uint16_t ul_carrier_freq; + ul_bw_e_ ul_bw; + uint8_t add_spec_emission; + + // sequence methods + freq_info_s_(); + }; + + // member variables + bool ext; + bool ac_barr_info_present; + bool mbsfn_sf_cfg_list_present; + ac_barr_info_s_ ac_barr_info; + rr_cfg_common_sib_s rr_cfg_common; + ue_timers_and_consts_s ue_timers_and_consts; + freq_info_s_ freq_info; + mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list; + time_align_timer_e time_align_timer_common; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + // group 0 + bool ssac_barr_for_mmtel_voice_r9_present; + bool ssac_barr_for_mmtel_video_r9_present; + copy_ptr ssac_barr_for_mmtel_voice_r9; + copy_ptr ssac_barr_for_mmtel_video_r9; + // group 1 + bool ac_barr_for_csfb_r10_present; + copy_ptr ac_barr_for_csfb_r10; + // group 2 + bool ac_barr_skip_for_mmtel_voice_r12_present; + bool ac_barr_skip_for_mmtel_video_r12_present; + bool ac_barr_skip_for_sms_r12_present; + bool ac_barr_per_plmn_list_r12_present; + copy_ptr ac_barr_per_plmn_list_r12; + // group 3 + bool voice_service_cause_ind_r12_present; + // group 4 + bool acdc_barr_for_common_r13_present; + bool acdc_barr_per_plmn_list_r13_present; + copy_ptr acdc_barr_for_common_r13; + copy_ptr acdc_barr_per_plmn_list_r13; + // group 5 + bool udt_restricting_for_common_r13_present; + bool udt_restricting_per_plmn_list_r13_present; + bool c_io_t_eps_optim_info_r13_present; + bool use_full_resume_id_r13_present; + copy_ptr udt_restricting_for_common_r13; + copy_ptr udt_restricting_per_plmn_list_r13; + copy_ptr c_io_t_eps_optim_info_r13; + // group 6 + bool unicast_freq_hop_ind_r13_present; + // group 7 + bool mbsfn_sf_cfg_list_v1430_present; + bool video_service_cause_ind_r14_present; + copy_ptr mbsfn_sf_cfg_list_v1430; + // group 8 + bool plmn_info_list_r15_present; + copy_ptr plmn_info_list_r15; + // group 9 + bool cp_edt_r15_present; + bool up_edt_r15_present; + bool idle_mode_meass_r15_present; + bool reduced_cp_latency_enabled_r15_present; + + // sequence methods + sib_type2_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType20-r13 ::= SEQUENCE +struct sib_type20_r13_s { + struct sc_mcch_repeat_period_r13_e_ { + enum options { rf2, rf4, rf8, rf16, rf32, rf64, rf128, rf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sc_mcch_repeat_period_r13_e_() {} + sc_mcch_repeat_period_r13_e_(options v) : value(v) {} + sc_mcch_repeat_period_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct sc_mcch_mod_period_r13_e_ { + enum options { + rf2, + rf4, + rf8, + rf16, + rf32, + rf64, + rf128, + rf256, + rf512, + rf1024, + r2048, + rf4096, + rf8192, + rf16384, + rf32768, + rf65536 + }; + typedef uint32_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sc_mcch_mod_period_r13_e_() {} + sc_mcch_mod_period_r13_e_(options v) : value(v) {} + sc_mcch_mod_period_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint32_t to_number() const; + }; + struct br_bcch_cfg_r14_s_ { + struct mpdcch_num_repeat_sc_mcch_r14_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, r128, r256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_num_repeat_sc_mcch_r14_e_() {} + mpdcch_num_repeat_sc_mcch_r14_e_(options v) : value(v) {} + mpdcch_num_repeat_sc_mcch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct mpdcch_start_sf_sc_mcch_r14_c_ { + struct fdd_r14_e_ { + enum options { v1, v1dot5, v2, v2dot5, v4, v5, v8, v10 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fdd_r14_e_() {} + fdd_r14_e_(options v) : value(v) {} + fdd_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct tdd_r14_e_ { + enum options { v1, v2, v4, v5, v8, v10, v20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_r14_e_() {} + tdd_r14_e_(options v) : value(v) {} + tdd_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { fdd_r14, tdd_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mpdcch_start_sf_sc_mcch_r14_c_() : type_(types::nulltype) {} + mpdcch_start_sf_sc_mcch_r14_c_(const mpdcch_start_sf_sc_mcch_r14_c_& other); + mpdcch_start_sf_sc_mcch_r14_c_& operator=(const mpdcch_start_sf_sc_mcch_r14_c_& other); + ~mpdcch_start_sf_sc_mcch_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fdd_r14_e_& fdd_r14() + { + assert_choice_type("fdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MCCH-r14"); + return c.get(); + } + tdd_r14_e_& tdd_r14() + { + assert_choice_type("tdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MCCH-r14"); + return c.get(); + } + const fdd_r14_e_& fdd_r14() const + { + assert_choice_type("fdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MCCH-r14"); + return c.get(); + } + const tdd_r14_e_& tdd_r14() const + { + assert_choice_type("tdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MCCH-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_ { + enum options { off, ce_mode_a, ce_mode_b }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_() {} + mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_(options v) : value(v) {} + mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct sc_mcch_repeat_period_br_r14_e_ { + enum options { rf32, rf128, rf512, rf1024, rf2048, rf4096, rf8192, rf16384 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sc_mcch_repeat_period_br_r14_e_() {} + sc_mcch_repeat_period_br_r14_e_(options v) : value(v) {} + sc_mcch_repeat_period_br_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct sc_mcch_mod_period_br_r14_e_ { + enum options { + rf32, + rf128, + rf256, + rf512, + rf1024, + rf2048, + rf4096, + rf8192, + rf16384, + rf32768, + rf65536, + rf131072, + rf262144, + rf524288, + rf1048576 + }; + typedef uint32_t number_type; + + options value; + static const uint32_t nof_types = 15, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sc_mcch_mod_period_br_r14_e_() {} + sc_mcch_mod_period_br_r14_e_(options v) : value(v) {} + sc_mcch_mod_period_br_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint32_t to_number() const; + }; + + // member variables + uint8_t mpdcch_nb_sc_mcch_r14; + mpdcch_num_repeat_sc_mcch_r14_e_ mpdcch_num_repeat_sc_mcch_r14; + mpdcch_start_sf_sc_mcch_r14_c_ mpdcch_start_sf_sc_mcch_r14; + mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_ mpdcch_pdsch_hop_cfg_sc_mcch_r14; + uint32_t sc_mcch_carrier_freq_r14; + uint8_t sc_mcch_offset_br_r14; + sc_mcch_repeat_period_br_r14_e_ sc_mcch_repeat_period_br_r14; + sc_mcch_mod_period_br_r14_e_ sc_mcch_mod_period_br_r14; + }; + struct pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_ { + enum options { r16, r32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_() {} + pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_(options v) : value(v) {} + pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_ { + enum options { r192, r256, r384, r512, r768, r1024, r1536, r2048 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_() {} + pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_(options v) : value(v) {} + pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool sc_mcch_dur_r13_present; + bool late_non_crit_ext_present; + sc_mcch_repeat_period_r13_e_ sc_mcch_repeat_period_r13; + uint8_t sc_mcch_offset_r13; + uint8_t sc_mcch_first_sf_r13; + uint8_t sc_mcch_dur_r13; + sc_mcch_mod_period_r13_e_ sc_mcch_mod_period_r13; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + bool br_bcch_cfg_r14_present; + bool sc_mcch_sched_info_r14_present; + bool pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present; + bool pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present; + copy_ptr br_bcch_cfg_r14; + copy_ptr sc_mcch_sched_info_r14; + pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_ pdsch_max_num_repeat_cemode_a_sc_mtch_r14; + pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_ pdsch_max_num_repeat_cemode_b_sc_mtch_r14; + // group 1 + bool sc_mcch_repeat_period_v1470_present; + bool sc_mcch_mod_period_v1470_present; + + // sequence methods + sib_type20_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType21-r14 ::= SEQUENCE +struct sib_type21_r14_s { + // member variables + bool ext; + bool sl_v2x_cfg_common_r14_present; + bool late_non_crit_ext_present; + sl_v2x_cfg_common_r14_s sl_v2x_cfg_common_r14; + dyn_octstring late_non_crit_ext; + // ... + + // sequence methods + sib_type21_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType24-r15 ::= SEQUENCE +struct sib_type24_r15_s { + // member variables + bool ext; + bool carrier_freq_list_nr_r15_present; + bool t_resel_nr_sf_r15_present; + bool late_non_crit_ext_present; + carrier_freq_list_nr_r15_l carrier_freq_list_nr_r15; + uint8_t t_resel_nr_r15; + speed_state_scale_factors_s t_resel_nr_sf_r15; + dyn_octstring late_non_crit_ext; + // ... + + // sequence methods + sib_type24_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType25-r15 ::= SEQUENCE +struct sib_type25_r15_s { + struct uac_ac1_select_assist_info_r15_c_ { + typedef bounded_array individual_plmn_list_r15_l_; + struct types { + enum options { plmn_common_r15, individual_plmn_list_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + uac_ac1_select_assist_info_r15_c_() : type_(types::nulltype) {} + uac_ac1_select_assist_info_r15_c_(const uac_ac1_select_assist_info_r15_c_& other); + uac_ac1_select_assist_info_r15_c_& operator=(const uac_ac1_select_assist_info_r15_c_& other); + ~uac_ac1_select_assist_info_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uac_ac1_select_assist_info_r15_e& plmn_common_r15() + { + assert_choice_type("plmnCommon-r15", type_.to_string(), "uac-AC1-SelectAssistInfo-r15"); + return c.get(); + } + individual_plmn_list_r15_l_& individual_plmn_list_r15() + { + assert_choice_type("individualPLMNList-r15", type_.to_string(), "uac-AC1-SelectAssistInfo-r15"); + return c.get(); + } + const uac_ac1_select_assist_info_r15_e& plmn_common_r15() const + { + assert_choice_type("plmnCommon-r15", type_.to_string(), "uac-AC1-SelectAssistInfo-r15"); + return c.get(); + } + const individual_plmn_list_r15_l_& individual_plmn_list_r15() const + { + assert_choice_type("individualPLMNList-r15", type_.to_string(), "uac-AC1-SelectAssistInfo-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + bool uac_barr_for_common_r15_present; + bool uac_barr_per_plmn_list_r15_present; + bool uac_ac1_select_assist_info_r15_present; + bool late_non_crit_ext_present; + uac_barr_per_cat_list_r15_l uac_barr_for_common_r15; + uac_barr_per_plmn_list_r15_l uac_barr_per_plmn_list_r15; + uac_barr_info_set_list_r15_l uac_barr_info_set_list_r15; + uac_ac1_select_assist_info_r15_c_ uac_ac1_select_assist_info_r15; + dyn_octstring late_non_crit_ext; + // ... + + // sequence methods + sib_type25_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType26-r15 ::= SEQUENCE +struct sib_type26_r15_s { + // member variables + bool ext; + bool v2x_inter_freq_info_list_r15_present; + bool cbr_pssch_tx_cfg_list_r15_present; + bool v2x_packet_dupl_cfg_r15_present; + bool sync_freq_list_r15_present; + bool slss_tx_multi_freq_r15_present; + bool v2x_freq_sel_cfg_list_r15_present; + bool thresh_s_rssi_cbr_r14_present; + sl_inter_freq_info_list_v2x_r14_l v2x_inter_freq_info_list_r15; + sl_cbr_pppp_tx_cfg_list_r15_l cbr_pssch_tx_cfg_list_r15; + sl_v2x_packet_dupl_cfg_r15_s v2x_packet_dupl_cfg_r15; + sl_v2x_sync_freq_list_r15_l sync_freq_list_r15; + sl_v2x_freq_sel_cfg_list_r15_l v2x_freq_sel_cfg_list_r15; + uint8_t thresh_s_rssi_cbr_r14; + // ... + + // sequence methods + sib_type26_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType3 ::= SEQUENCE +struct sib_type3_s { + struct cell_resel_info_common_s_ { + struct q_hyst_e_ { + enum options { db0, db1, db2, db3, db4, db5, db6, db8, db10, db12, db14, db16, db18, db20, db22, db24 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + q_hyst_e_() {} + q_hyst_e_(options v) : value(v) {} + q_hyst_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct speed_state_resel_pars_s_ { + struct q_hyst_sf_s_ { + struct sf_medium_e_ { + enum options { db_minus6, db_minus4, db_minus2, db0 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_medium_e_() {} + sf_medium_e_(options v) : value(v) {} + sf_medium_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct sf_high_e_ { + enum options { db_minus6, db_minus4, db_minus2, db0 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_high_e_() {} + sf_high_e_(options v) : value(v) {} + sf_high_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // 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 speed_state_resel_pars_present; + q_hyst_e_ q_hyst; + speed_state_resel_pars_s_ speed_state_resel_pars; + + // sequence methods + cell_resel_info_common_s_(); + }; + struct cell_resel_serving_freq_info_s_ { + // member variables + bool s_non_intra_search_present; + uint8_t s_non_intra_search; + uint8_t thresh_serving_low; + uint8_t cell_resel_prio; + + // sequence methods + cell_resel_serving_freq_info_s_(); + }; + struct intra_freq_cell_resel_info_s_ { + // member variables + bool p_max_present; + bool s_intra_search_present; + bool allowed_meas_bw_present; + bool t_resel_eutra_sf_present; + int8_t q_rx_lev_min; + int8_t p_max; + uint8_t s_intra_search; + allowed_meas_bw_e allowed_meas_bw; + bool presence_ant_port1; + fixed_bitstring<2> neigh_cell_cfg; + uint8_t t_resel_eutra; + speed_state_scale_factors_s t_resel_eutra_sf; + + // sequence methods + intra_freq_cell_resel_info_s_(); + }; + struct s_intra_search_v920_s_ { + // member variables + uint8_t s_intra_search_p_r9; + uint8_t s_intra_search_q_r9; + }; + struct s_non_intra_search_v920_s_ { + // member variables + uint8_t s_non_intra_search_p_r9; + uint8_t s_non_intra_search_q_r9; + }; + + // member variables + bool ext; + 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; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + // group 0 + bool s_intra_search_v920_present; + bool s_non_intra_search_v920_present; + bool q_qual_min_r9_present; + bool thresh_serving_low_q_r9_present; + copy_ptr s_intra_search_v920; + copy_ptr s_non_intra_search_v920; + int8_t q_qual_min_r9; + uint8_t thresh_serving_low_q_r9; + // group 1 + bool q_qual_min_wb_r11_present; + int8_t q_qual_min_wb_r11; + // group 2 + bool q_qual_min_rsrq_on_all_symbols_r12_present; + int8_t q_qual_min_rsrq_on_all_symbols_r12; + // group 3 + bool cell_resel_serving_freq_info_v1310_present; + bool redist_serving_info_r13_present; + bool cell_sel_info_ce_r13_present; + bool t_resel_eutra_ce_r13_present; + copy_ptr cell_resel_serving_freq_info_v1310; + copy_ptr redist_serving_info_r13; + copy_ptr cell_sel_info_ce_r13; + uint8_t t_resel_eutra_ce_r13; + // group 4 + bool cell_sel_info_ce1_r13_present; + copy_ptr cell_sel_info_ce1_r13; + // group 5 + bool cell_sel_info_ce1_v1360_present; + copy_ptr cell_sel_info_ce1_v1360; + // group 6 + bool cell_resel_info_common_v1460_present; + copy_ptr cell_resel_info_common_v1460; + // group 7 + bool cell_resel_info_hsdn_r15_present; + bool cell_sel_info_ce_v1530_present; + bool crs_intf_mitig_neigh_cells_ce_r15_present; + copy_ptr cell_resel_info_hsdn_r15; + copy_ptr cell_sel_info_ce_v1530; + + // sequence methods + sib_type3_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType4 ::= SEQUENCE +struct sib_type4_s { + // member variables + bool ext; + bool intra_freq_neigh_cell_list_present; + bool intra_freq_black_cell_list_present; + bool csg_pci_range_present; + intra_freq_neigh_cell_list_l intra_freq_neigh_cell_list; + intra_freq_black_cell_list_l intra_freq_black_cell_list; + pci_range_s csg_pci_range; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + // group 0 + bool intra_freq_neigh_hsdn_cell_list_r15_present; + copy_ptr intra_freq_neigh_hsdn_cell_list_r15; + + // sequence methods + sib_type4_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType5 ::= SEQUENCE +struct sib_type5_s { + // member variables + bool ext; + inter_freq_carrier_freq_list_l inter_freq_carrier_freq_list; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + // group 0 + bool inter_freq_carrier_freq_list_v1250_present; + bool inter_freq_carrier_freq_list_ext_r12_present; + copy_ptr inter_freq_carrier_freq_list_v1250; + copy_ptr inter_freq_carrier_freq_list_ext_r12; + // group 1 + bool inter_freq_carrier_freq_list_ext_v1280_present; + copy_ptr inter_freq_carrier_freq_list_ext_v1280; + // group 2 + bool inter_freq_carrier_freq_list_v1310_present; + bool inter_freq_carrier_freq_list_ext_v1310_present; + copy_ptr inter_freq_carrier_freq_list_v1310; + copy_ptr inter_freq_carrier_freq_list_ext_v1310; + // group 3 + bool inter_freq_carrier_freq_list_v1350_present; + bool inter_freq_carrier_freq_list_ext_v1350_present; + copy_ptr inter_freq_carrier_freq_list_v1350; + copy_ptr inter_freq_carrier_freq_list_ext_v1350; + // group 4 + bool inter_freq_carrier_freq_list_ext_v1360_present; + copy_ptr inter_freq_carrier_freq_list_ext_v1360; + // group 5 + bool scptm_freq_offset_r14_present; + uint8_t scptm_freq_offset_r14; + // group 6 + bool inter_freq_carrier_freq_list_v1530_present; + bool inter_freq_carrier_freq_list_ext_v1530_present; + bool meas_idle_cfg_sib_r15_present; + copy_ptr inter_freq_carrier_freq_list_v1530; + copy_ptr inter_freq_carrier_freq_list_ext_v1530; + copy_ptr meas_idle_cfg_sib_r15; + + // sequence methods + sib_type5_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType6 ::= SEQUENCE +struct sib_type6_s { + typedef dyn_array carrier_freq_list_utra_fdd_v1250_l_; + typedef dyn_array carrier_freq_list_utra_tdd_v1250_l_; + + // member variables + bool ext; + bool carrier_freq_list_utra_fdd_present; + bool carrier_freq_list_utra_tdd_present; + bool t_resel_utra_sf_present; + carrier_freq_list_utra_fdd_l carrier_freq_list_utra_fdd; + carrier_freq_list_utra_tdd_l carrier_freq_list_utra_tdd; + uint8_t t_resel_utra; + speed_state_scale_factors_s t_resel_utra_sf; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + // group 0 + bool carrier_freq_list_utra_fdd_v1250_present; + bool carrier_freq_list_utra_tdd_v1250_present; + bool carrier_freq_list_utra_fdd_ext_r12_present; + bool carrier_freq_list_utra_tdd_ext_r12_present; + copy_ptr carrier_freq_list_utra_fdd_v1250; + copy_ptr carrier_freq_list_utra_tdd_v1250; + copy_ptr carrier_freq_list_utra_fdd_ext_r12; + copy_ptr carrier_freq_list_utra_tdd_ext_r12; + + // sequence methods + sib_type6_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType7 ::= SEQUENCE +struct sib_type7_s { + // member variables + bool ext; + bool t_resel_geran_sf_present; + bool carrier_freqs_info_list_present; + uint8_t t_resel_geran; + speed_state_scale_factors_s t_resel_geran_sf; + carrier_freqs_info_list_geran_l carrier_freqs_info_list; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + sib_type7_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType8 ::= SEQUENCE +struct sib_type8_s { + struct params_hrpd_s_ { + // member variables + bool cell_resel_params_hrpd_present; + pre_regist_info_hrpd_s pre_regist_info_hrpd; + cell_resel_params_cdma2000_s cell_resel_params_hrpd; + + // sequence methods + params_hrpd_s_(); + }; + struct params1_xrtt_s_ { + // member variables + bool csfb_regist_param1_xrtt_present; + bool long_code_state1_xrtt_present; + bool cell_resel_params1_xrtt_present; + csfb_regist_param1_xrtt_s csfb_regist_param1_xrtt; + fixed_bitstring<42> long_code_state1_xrtt; + cell_resel_params_cdma2000_s cell_resel_params1_xrtt; + + // sequence methods + params1_xrtt_s_(); + }; + + // member variables + bool ext; + bool sys_time_info_present; + bool search_win_size_present; + bool params_hrpd_present; + bool params1_xrtt_present; + sys_time_info_cdma2000_s sys_time_info; + uint8_t search_win_size; + params_hrpd_s_ params_hrpd; + params1_xrtt_s_ params1_xrtt; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + // group 0 + bool csfb_support_for_dual_rx_ues_r9_present; + bool cell_resel_params_hrpd_v920_present; + bool cell_resel_params1_xrtt_v920_present; + bool csfb_regist_param1_xrtt_v920_present; + bool ac_barr_cfg1_xrtt_r9_present; + bool csfb_support_for_dual_rx_ues_r9; + copy_ptr cell_resel_params_hrpd_v920; + copy_ptr cell_resel_params1_xrtt_v920; + copy_ptr csfb_regist_param1_xrtt_v920; + copy_ptr ac_barr_cfg1_xrtt_r9; + // group 1 + bool csfb_dual_rx_tx_support_r10_present; + // group 2 + bool sib8_per_plmn_list_r11_present; + copy_ptr sib8_per_plmn_list_r11; + + // sequence methods + sib_type8_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType9 ::= SEQUENCE +struct sib_type9_s { + // member variables + bool ext; + bool hnb_name_present; + dyn_octstring hnb_name; + // ... + bool late_non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + sib_type9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSystemInformation-r15-IEs ::= SEQUENCE +struct pos_sys_info_r15_ies_s { + struct pos_sib_type_and_info_r15_item_c_ { + struct types { + enum options { + pos_sib1_minus1_r15, + pos_sib1_minus2_r15, + pos_sib1_minus3_r15, + pos_sib1_minus4_r15, + pos_sib1_minus5_r15, + pos_sib1_minus6_r15, + pos_sib1_minus7_r15, + pos_sib2_minus1_r15, + pos_sib2_minus2_r15, + pos_sib2_minus3_r15, + pos_sib2_minus4_r15, + pos_sib2_minus5_r15, + pos_sib2_minus6_r15, + pos_sib2_minus7_r15, + pos_sib2_minus8_r15, + pos_sib2_minus9_r15, + pos_sib2_minus10_r15, + pos_sib2_minus11_r15, + pos_sib2_minus12_r15, + pos_sib2_minus13_r15, + pos_sib2_minus14_r15, + pos_sib2_minus15_r15, + pos_sib2_minus16_r15, + pos_sib2_minus17_r15, + pos_sib2_minus18_r15, + pos_sib2_minus19_r15, + pos_sib3_minus1_r15, + // ... + nulltype + }; + + options value; + static const uint32_t nof_types = 27, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pos_sib_type_and_info_r15_item_c_() : type_(types::nulltype) {} + pos_sib_type_and_info_r15_item_c_(const pos_sib_type_and_info_r15_item_c_& other); + pos_sib_type_and_info_r15_item_c_& operator=(const pos_sib_type_and_info_r15_item_c_& other); + ~pos_sib_type_and_info_r15_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sib_pos_r15_s& pos_sib1_minus1_r15() + { + assert_choice_type("posSib1-1-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib1_minus2_r15() + { + assert_choice_type("posSib1-2-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib1_minus3_r15() + { + assert_choice_type("posSib1-3-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib1_minus4_r15() + { + assert_choice_type("posSib1-4-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib1_minus5_r15() + { + assert_choice_type("posSib1-5-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib1_minus6_r15() + { + assert_choice_type("posSib1-6-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib1_minus7_r15() + { + assert_choice_type("posSib1-7-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus1_r15() + { + assert_choice_type("posSib2-1-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus2_r15() + { + assert_choice_type("posSib2-2-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus3_r15() + { + assert_choice_type("posSib2-3-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus4_r15() + { + assert_choice_type("posSib2-4-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus5_r15() + { + assert_choice_type("posSib2-5-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus6_r15() + { + assert_choice_type("posSib2-6-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus7_r15() + { + assert_choice_type("posSib2-7-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus8_r15() + { + assert_choice_type("posSib2-8-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus9_r15() + { + assert_choice_type("posSib2-9-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus10_r15() + { + assert_choice_type("posSib2-10-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus11_r15() + { + assert_choice_type("posSib2-11-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus12_r15() + { + assert_choice_type("posSib2-12-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus13_r15() + { + assert_choice_type("posSib2-13-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus14_r15() + { + assert_choice_type("posSib2-14-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus15_r15() + { + assert_choice_type("posSib2-15-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus16_r15() + { + assert_choice_type("posSib2-16-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus17_r15() + { + assert_choice_type("posSib2-17-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus18_r15() + { + assert_choice_type("posSib2-18-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib2_minus19_r15() + { + assert_choice_type("posSib2-19-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + sib_pos_r15_s& pos_sib3_minus1_r15() + { + assert_choice_type("posSib3-1-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus1_r15() const + { + assert_choice_type("posSib1-1-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus2_r15() const + { + assert_choice_type("posSib1-2-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus3_r15() const + { + assert_choice_type("posSib1-3-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus4_r15() const + { + assert_choice_type("posSib1-4-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus5_r15() const + { + assert_choice_type("posSib1-5-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus6_r15() const + { + assert_choice_type("posSib1-6-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib1_minus7_r15() const + { + assert_choice_type("posSib1-7-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus1_r15() const + { + assert_choice_type("posSib2-1-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus2_r15() const + { + assert_choice_type("posSib2-2-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus3_r15() const + { + assert_choice_type("posSib2-3-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus4_r15() const + { + assert_choice_type("posSib2-4-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus5_r15() const + { + assert_choice_type("posSib2-5-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus6_r15() const + { + assert_choice_type("posSib2-6-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus7_r15() const + { + assert_choice_type("posSib2-7-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus8_r15() const + { + assert_choice_type("posSib2-8-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus9_r15() const + { + assert_choice_type("posSib2-9-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus10_r15() const + { + assert_choice_type("posSib2-10-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus11_r15() const + { + assert_choice_type("posSib2-11-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus12_r15() const + { + assert_choice_type("posSib2-12-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus13_r15() const + { + assert_choice_type("posSib2-13-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus14_r15() const + { + assert_choice_type("posSib2-14-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus15_r15() const + { + assert_choice_type("posSib2-15-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus16_r15() const + { + assert_choice_type("posSib2-16-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus17_r15() const + { + assert_choice_type("posSib2-17-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus18_r15() const + { + assert_choice_type("posSib2-18-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib2_minus19_r15() const + { + assert_choice_type("posSib2-19-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + const sib_pos_r15_s& pos_sib3_minus1_r15() const + { + assert_choice_type("posSib3-1-r15", type_.to_string(), "posSIB-TypeAndInfo-r15-item"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef dyn_array pos_sib_type_and_info_r15_l_; + + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + pos_sib_type_and_info_r15_l_ pos_sib_type_and_info_r15; + dyn_octstring late_non_crit_ext; + + // sequence methods + pos_sys_info_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingInfoList ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo +typedef dyn_array sched_info_list_l; + +struct sib_info_item_c { + struct types { + enum options { + sib2, + sib3, + sib4, + sib5, + sib6, + sib7, + sib8, + sib9, + sib10, + sib11, + // ... + sib12_v920, + sib13_v920, + sib14_v1130, + sib15_v1130, + sib16_v1130, + sib17_v1250, + sib18_v1250, + sib19_v1250, + sib20_v1310, + sib21_v1430, + sib24_v1530, + sib25_v1530, + sib26_v1530, + nulltype + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 23, nof_exts = 13; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sib_info_item_c() : type_(types::nulltype) {} + sib_info_item_c(const sib_info_item_c& other); + sib_info_item_c& operator=(const sib_info_item_c& other); + ~sib_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sib_type2_s& sib2() + { + assert_choice_type("sib2", type_.to_string(), ""); + return c.get(); + } + sib_type3_s& sib3() + { + assert_choice_type("sib3", type_.to_string(), ""); + return c.get(); + } + sib_type4_s& sib4() + { + assert_choice_type("sib4", type_.to_string(), ""); + return c.get(); + } + sib_type5_s& sib5() + { + assert_choice_type("sib5", type_.to_string(), ""); + return c.get(); + } + sib_type6_s& sib6() + { + assert_choice_type("sib6", type_.to_string(), ""); + return c.get(); + } + sib_type7_s& sib7() + { + assert_choice_type("sib7", type_.to_string(), ""); + return c.get(); + } + sib_type8_s& sib8() + { + assert_choice_type("sib8", type_.to_string(), ""); + return c.get(); + } + sib_type9_s& sib9() + { + assert_choice_type("sib9", type_.to_string(), ""); + return c.get(); + } + sib_type10_s& sib10() + { + assert_choice_type("sib10", type_.to_string(), ""); + return c.get(); + } + sib_type11_s& sib11() + { + assert_choice_type("sib11", type_.to_string(), ""); + return c.get(); + } + sib_type12_r9_s& sib12_v920() + { + assert_choice_type("sib12-v920", type_.to_string(), ""); + return c.get(); + } + sib_type13_r9_s& sib13_v920() + { + assert_choice_type("sib13-v920", type_.to_string(), ""); + return c.get(); + } + sib_type14_r11_s& sib14_v1130() + { + assert_choice_type("sib14-v1130", type_.to_string(), ""); + return c.get(); + } + sib_type15_r11_s& sib15_v1130() + { + assert_choice_type("sib15-v1130", type_.to_string(), ""); + return c.get(); + } + sib_type16_r11_s& sib16_v1130() + { + assert_choice_type("sib16-v1130", type_.to_string(), ""); + return c.get(); + } + sib_type17_r12_s& sib17_v1250() + { + assert_choice_type("sib17-v1250", type_.to_string(), ""); + return c.get(); + } + sib_type18_r12_s& sib18_v1250() + { + assert_choice_type("sib18-v1250", type_.to_string(), ""); + return c.get(); + } + sib_type19_r12_s& sib19_v1250() + { + assert_choice_type("sib19-v1250", type_.to_string(), ""); + return c.get(); + } + sib_type20_r13_s& sib20_v1310() + { + assert_choice_type("sib20-v1310", type_.to_string(), ""); + return c.get(); + } + sib_type21_r14_s& sib21_v1430() + { + assert_choice_type("sib21-v1430", type_.to_string(), ""); + return c.get(); + } + sib_type24_r15_s& sib24_v1530() + { + assert_choice_type("sib24-v1530", type_.to_string(), ""); + return c.get(); + } + sib_type25_r15_s& sib25_v1530() + { + assert_choice_type("sib25-v1530", type_.to_string(), ""); + return c.get(); + } + sib_type26_r15_s& sib26_v1530() + { + assert_choice_type("sib26-v1530", type_.to_string(), ""); + return c.get(); + } + const sib_type2_s& sib2() const + { + assert_choice_type("sib2", type_.to_string(), ""); + return c.get(); + } + const sib_type3_s& sib3() const + { + assert_choice_type("sib3", type_.to_string(), ""); + return c.get(); + } + const sib_type4_s& sib4() const + { + assert_choice_type("sib4", type_.to_string(), ""); + return c.get(); + } + const sib_type5_s& sib5() const + { + assert_choice_type("sib5", type_.to_string(), ""); + return c.get(); + } + const sib_type6_s& sib6() const + { + assert_choice_type("sib6", type_.to_string(), ""); + return c.get(); + } + const sib_type7_s& sib7() const + { + assert_choice_type("sib7", type_.to_string(), ""); + return c.get(); + } + const sib_type8_s& sib8() const + { + assert_choice_type("sib8", type_.to_string(), ""); + return c.get(); + } + const sib_type9_s& sib9() const + { + assert_choice_type("sib9", type_.to_string(), ""); + return c.get(); + } + const sib_type10_s& sib10() const + { + assert_choice_type("sib10", type_.to_string(), ""); + return c.get(); + } + const sib_type11_s& sib11() const + { + assert_choice_type("sib11", type_.to_string(), ""); + return c.get(); + } + const sib_type12_r9_s& sib12_v920() const + { + assert_choice_type("sib12-v920", type_.to_string(), ""); + return c.get(); + } + const sib_type13_r9_s& sib13_v920() const + { + assert_choice_type("sib13-v920", type_.to_string(), ""); + return c.get(); + } + const sib_type14_r11_s& sib14_v1130() const + { + assert_choice_type("sib14-v1130", type_.to_string(), ""); + return c.get(); + } + const sib_type15_r11_s& sib15_v1130() const + { + assert_choice_type("sib15-v1130", type_.to_string(), ""); + return c.get(); + } + const sib_type16_r11_s& sib16_v1130() const + { + assert_choice_type("sib16-v1130", type_.to_string(), ""); + return c.get(); + } + const sib_type17_r12_s& sib17_v1250() const + { + assert_choice_type("sib17-v1250", type_.to_string(), ""); + return c.get(); + } + const sib_type18_r12_s& sib18_v1250() const + { + assert_choice_type("sib18-v1250", type_.to_string(), ""); + return c.get(); + } + const sib_type19_r12_s& sib19_v1250() const + { + assert_choice_type("sib19-v1250", type_.to_string(), ""); + return c.get(); + } + const sib_type20_r13_s& sib20_v1310() const + { + assert_choice_type("sib20-v1310", type_.to_string(), ""); + return c.get(); + } + const sib_type21_r14_s& sib21_v1430() const + { + assert_choice_type("sib21-v1430", type_.to_string(), ""); + return c.get(); + } + const sib_type24_r15_s& sib24_v1530() const + { + assert_choice_type("sib24-v1530", type_.to_string(), ""); + return c.get(); + } + const sib_type25_r15_s& sib25_v1530() const + { + assert_choice_type("sib25-v1530", type_.to_string(), ""); + return c.get(); + } + const sib_type26_r15_s& sib26_v1530() const + { + assert_choice_type("sib26-v1530", type_.to_string(), ""); + return c.get(); + } + +private: + types type_; + choice_buffer_t + c; + + void destroy_(); +}; + +// SystemInformation-r8-IEs ::= SEQUENCE +struct sys_info_r8_ies_s { + typedef sib_info_item_c sib_type_and_info_item_c_; + typedef dyn_array sib_type_and_info_l_; + + // member variables + bool non_crit_ext_present; + sib_type_and_info_l_ sib_type_and_info; + sys_info_v8a0_ies_s non_crit_ext; + + // sequence methods + sys_info_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1-v890-IEs ::= SEQUENCE +struct sib_type1_v890_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + sib_type1_v920_ies_s non_crit_ext; + + // sequence methods + sib_type1_v890_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformation ::= SEQUENCE +struct sys_info_s { + struct crit_exts_c_ { + struct crit_exts_future_r15_c_ { + struct types { + enum options { pos_sys_info_r15, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_future_r15_c_() : type_(types::nulltype) {} + crit_exts_future_r15_c_(const crit_exts_future_r15_c_& other); + crit_exts_future_r15_c_& operator=(const crit_exts_future_r15_c_& other); + ~crit_exts_future_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + pos_sys_info_r15_ies_s& pos_sys_info_r15() + { + assert_choice_type("posSystemInformation-r15", type_.to_string(), "criticalExtensionsFuture-r15"); + return c.get(); + } + const pos_sys_info_r15_ies_s& pos_sys_info_r15() const + { + assert_choice_type("posSystemInformation-r15", type_.to_string(), "criticalExtensionsFuture-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { sys_info_r8, crit_exts_future_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sys_info_r8_ies_s& sys_info_r8() + { + assert_choice_type("systemInformation-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + crit_exts_future_r15_c_& crit_exts_future_r15() + { + assert_choice_type("criticalExtensionsFuture-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const sys_info_r8_ies_s& sys_info_r8() const + { + assert_choice_type("systemInformation-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const crit_exts_future_r15_c_& crit_exts_future_r15() const + { + assert_choice_type("criticalExtensionsFuture-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformationBlockType1 ::= SEQUENCE +struct sib_type1_s { + struct cell_access_related_info_s_ { + struct cell_barred_e_ { + enum options { barred, not_barred }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_barred_e_() {} + cell_barred_e_(options v) : value(v) {} + cell_barred_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct intra_freq_resel_e_ { + enum options { allowed, not_allowed }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + intra_freq_resel_e_() {} + intra_freq_resel_e_(options v) : value(v) {} + intra_freq_resel_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool csg_id_present; + plmn_id_list_l plmn_id_list; + fixed_bitstring<16> tac; + fixed_bitstring<28> cell_id; + cell_barred_e_ cell_barred; + intra_freq_resel_e_ intra_freq_resel; + bool csg_ind; + fixed_bitstring<27> csg_id; + + // sequence methods + cell_access_related_info_s_(); + }; + struct cell_sel_info_s_ { + // member variables + bool q_rx_lev_min_offset_present; + int8_t q_rx_lev_min; + uint8_t q_rx_lev_min_offset; + + // sequence methods + cell_sel_info_s_(); + }; + struct si_win_len_e_ { + enum options { ms1, ms2, ms5, ms10, ms15, ms20, ms40 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_win_len_e_() {} + si_win_len_e_(options v) : value(v) {} + si_win_len_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool p_max_present; + bool tdd_cfg_present; + bool non_crit_ext_present; + cell_access_related_info_s_ cell_access_related_info; + cell_sel_info_s_ cell_sel_info; + int8_t p_max; + uint8_t freq_band_ind; + sched_info_list_l sched_info_list; + tdd_cfg_s tdd_cfg; + si_win_len_e_ si_win_len; + uint8_t sys_info_value_tag; + sib_type1_v890_ies_s non_crit_ext; + + // sequence methods + sib_type1_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_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 { + enum options { sys_info, sib_type1, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sys_info_s& sys_info() + { + assert_choice_type("systemInformation", type_.to_string(), "c1"); + return c.get(); + } + sib_type1_s& sib_type1() + { + assert_choice_type("systemInformationBlockType1", type_.to_string(), "c1"); + return c.get(); + } + const sys_info_s& sys_info() const + { + assert_choice_type("systemInformation", type_.to_string(), "c1"); + return c.get(); + } + const sib_type1_s& sib_type1() const + { + assert_choice_type("systemInformationBlockType1", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + bcch_dl_sch_msg_type_c() : type_(types::nulltype) {} + bcch_dl_sch_msg_type_c(const bcch_dl_sch_msg_type_c& other); + bcch_dl_sch_msg_type_c& operator=(const bcch_dl_sch_msg_type_c& other); + ~bcch_dl_sch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// BCCH-DL-SCH-Message ::= SEQUENCE +struct bcch_dl_sch_msg_s { + // member variables + bcch_dl_sch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInformation-BR-r13 ::= SystemInformation +typedef sys_info_s sys_info_br_r13_s; + +// SystemInformationBlockType1-BR-r13 ::= SystemInformationBlockType1 +typedef sib_type1_s sib_type1_br_r13_s; + +// BCCH-DL-SCH-MessageType-BR-r13 ::= CHOICE +struct bcch_dl_sch_msg_type_br_r13_c { + struct c1_c_ { + struct types { + enum options { sys_info_br_r13, sib_type1_br_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sys_info_br_r13_s& sys_info_br_r13() + { + assert_choice_type("systemInformation-BR-r13", type_.to_string(), "c1"); + return c.get(); + } + sib_type1_br_r13_s& sib_type1_br_r13() + { + assert_choice_type("systemInformationBlockType1-BR-r13", type_.to_string(), "c1"); + return c.get(); + } + const sys_info_br_r13_s& sys_info_br_r13() const + { + assert_choice_type("systemInformation-BR-r13", type_.to_string(), "c1"); + return c.get(); + } + const sib_type1_br_r13_s& sib_type1_br_r13() const + { + assert_choice_type("systemInformationBlockType1-BR-r13", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + bcch_dl_sch_msg_type_br_r13_c() : type_(types::nulltype) {} + bcch_dl_sch_msg_type_br_r13_c(const bcch_dl_sch_msg_type_br_r13_c& other); + bcch_dl_sch_msg_type_br_r13_c& operator=(const bcch_dl_sch_msg_type_br_r13_c& other); + ~bcch_dl_sch_msg_type_br_r13_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-BR-r13"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-BR-r13"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// BCCH-DL-SCH-Message-BR ::= SEQUENCE +struct bcch_dl_sch_msg_br_s { + // member variables + bcch_dl_sch_msg_type_br_r13_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-Type-MBMS-r14 ::= ENUMERATED +struct sib_type_mbms_r14_e { + enum options { + sib_type10, + sib_type11, + sib_type12_v920, + sib_type13_v920, + sib_type15_v1130, + sib_type16_v1130, + // ... + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + sib_type_mbms_r14_e() {} + sib_type_mbms_r14_e(options v) : value(v) {} + sib_type_mbms_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// SIB-MappingInfo-MBMS-r14 ::= SEQUENCE (SIZE (0..maxSIB-1)) OF SIB-Type-MBMS-r14 +typedef bounded_array sib_map_info_mbms_r14_l; + +// SchedulingInfo-MBMS-r14 ::= SEQUENCE +struct sched_info_mbms_r14_s { + struct si_periodicity_r14_e_ { + enum options { rf16, rf32, rf64, rf128, rf256, rf512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_periodicity_r14_e_() {} + si_periodicity_r14_e_(options v) : value(v) {} + si_periodicity_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + si_periodicity_r14_e_ si_periodicity_r14; + sib_map_info_mbms_r14_l sib_map_info_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NonMBSFN-SubframeConfig-r14 ::= SEQUENCE +struct non_mbsfn_sf_cfg_r14_s { + struct radio_frame_alloc_period_r14_e_ { + enum options { rf4, rf8, rf16, rf32, rf64, rf128, rf512 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + radio_frame_alloc_period_r14_e_() {} + radio_frame_alloc_period_r14_e_(options v) : value(v) {} + radio_frame_alloc_period_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + radio_frame_alloc_period_r14_e_ radio_frame_alloc_period_r14; + uint8_t radio_frame_alloc_offset_r14; + fixed_bitstring<9> sf_alloc_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList-MBMS-r14 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-Identity +typedef dyn_array plmn_id_list_mbms_r14_l; + +// SchedulingInfoList-MBMS-r14 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo-MBMS-r14 +typedef dyn_array sched_info_list_mbms_r14_l; + +// SystemInformation-MBMS-r14 ::= SystemInformation +typedef sys_info_s sys_info_mbms_r14_s; + +// SystemInformationBlockType1-MBMS-r14 ::= SEQUENCE +struct sib_type1_mbms_r14_s { + struct cell_access_related_info_r14_s_ { + // member variables + plmn_id_list_mbms_r14_l plmn_id_list_r14; + fixed_bitstring<16> tac_r14; + fixed_bitstring<28> cell_id_r14; + }; + struct si_win_len_r14_e_ { + enum options { ms1, ms2, ms5, ms10, ms15, ms20, ms40, ms80 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + si_win_len_r14_e_() {} + si_win_len_r14_e_(options v) : value(v) {} + si_win_len_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef dyn_array cell_access_related_info_list_r14_l_; + + // member variables + bool multi_band_info_list_r14_present; + bool non_mbsfn_sf_cfg_r14_present; + bool sib_type13_r14_present; + bool cell_access_related_info_list_r14_present; + bool non_crit_ext_present; + cell_access_related_info_r14_s_ cell_access_related_info_r14; + uint16_t freq_band_ind_r14; + multi_band_info_list_r11_l multi_band_info_list_r14; + sched_info_list_mbms_r14_l sched_info_list_mbms_r14; + si_win_len_r14_e_ si_win_len_r14; + uint8_t sys_info_value_tag_r14; + non_mbsfn_sf_cfg_r14_s non_mbsfn_sf_cfg_r14; + pdsch_cfg_common_s pdsch_cfg_common_r14; + sib_type13_r9_s sib_type13_r14; + cell_access_related_info_list_r14_l_ cell_access_related_info_list_r14; + + // sequence methods + sib_type1_mbms_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE +struct bcch_dl_sch_msg_type_mbms_r14_c { + struct c1_c_ { + struct types { + enum options { sys_info_mbms_r14, sib_type1_mbms_r14, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sys_info_mbms_r14_s& sys_info_mbms_r14() + { + assert_choice_type("systemInformation-MBMS-r14", type_.to_string(), "c1"); + return c.get(); + } + sib_type1_mbms_r14_s& sib_type1_mbms_r14() + { + assert_choice_type("systemInformationBlockType1-MBMS-r14", type_.to_string(), "c1"); + return c.get(); + } + const sys_info_mbms_r14_s& sys_info_mbms_r14() const + { + assert_choice_type("systemInformation-MBMS-r14", type_.to_string(), "c1"); + return c.get(); + } + const sib_type1_mbms_r14_s& sib_type1_mbms_r14() const + { + assert_choice_type("systemInformationBlockType1-MBMS-r14", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + bcch_dl_sch_msg_type_mbms_r14_c() : type_(types::nulltype) {} + bcch_dl_sch_msg_type_mbms_r14_c(const bcch_dl_sch_msg_type_mbms_r14_c& other); + bcch_dl_sch_msg_type_mbms_r14_c& operator=(const bcch_dl_sch_msg_type_mbms_r14_c& other); + ~bcch_dl_sch_msg_type_mbms_r14_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-MBMS-r14"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "BCCH-DL-SCH-MessageType-MBMS-r14"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// BCCH-DL-SCH-Message-MBMS ::= SEQUENCE +struct bcch_dl_sch_msg_mbms_s { + // member variables + bcch_dl_sch_msg_type_mbms_r14_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NZP-FrequencyDensity-r14 ::= ENUMERATED +struct nzp_freq_density_r14_e { + enum options { d1, d2, d3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + nzp_freq_density_r14_e() {} + nzp_freq_density_r14_e(options v) : value(v) {} + nzp_freq_density_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// P-C-AndCBSR-r13 ::= SEQUENCE +struct p_c_and_cbsr_r13_s { + struct cbsr_sel_r13_c_ { + struct non_precoded_r13_s_ { + // member variables + dyn_bitstring codebook_subset_restrict1_r13; + dyn_bitstring codebook_subset_restrict2_r13; + }; + struct beamformed_k1a_r13_s_ { + // member variables + dyn_bitstring codebook_subset_restrict3_r13; + }; + struct beamformed_kn_r13_s_ { + // member variables + dyn_bitstring codebook_subset_restrict_r13; + }; + struct types { + enum options { non_precoded_r13, beamformed_k1a_r13, beamformed_kn_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + cbsr_sel_r13_c_() : type_(types::nulltype) {} + cbsr_sel_r13_c_(const cbsr_sel_r13_c_& other); + cbsr_sel_r13_c_& operator=(const cbsr_sel_r13_c_& other); + ~cbsr_sel_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + non_precoded_r13_s_& non_precoded_r13() + { + assert_choice_type("nonPrecoded-r13", type_.to_string(), "cbsr-Selection-r13"); + return c.get(); + } + beamformed_k1a_r13_s_& beamformed_k1a_r13() + { + assert_choice_type("beamformedK1a-r13", type_.to_string(), "cbsr-Selection-r13"); + return c.get(); + } + beamformed_kn_r13_s_& beamformed_kn_r13() + { + assert_choice_type("beamformedKN-r13", type_.to_string(), "cbsr-Selection-r13"); + return c.get(); + } + const non_precoded_r13_s_& non_precoded_r13() const + { + assert_choice_type("nonPrecoded-r13", type_.to_string(), "cbsr-Selection-r13"); + return c.get(); + } + const beamformed_k1a_r13_s_& beamformed_k1a_r13() const + { + assert_choice_type("beamformedK1a-r13", type_.to_string(), "cbsr-Selection-r13"); + return c.get(); + } + const beamformed_kn_r13_s_& beamformed_kn_r13() const + { + assert_choice_type("beamformedKN-r13", type_.to_string(), "cbsr-Selection-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + bool ext; + int8_t p_c_r13; + cbsr_sel_r13_c_ cbsr_sel_r13; + // ... + + // sequence methods + p_c_and_cbsr_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-NZP-v1430 ::= SEQUENCE +struct csi_rs_cfg_nzp_v1430_s { + // member variables + bool tx_comb_r14_present; + bool freq_density_r14_present; + uint8_t tx_comb_r14; + nzp_freq_density_r14_e freq_density_r14; + + // sequence methods + csi_rs_cfg_nzp_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNZP-Activation-r14 ::= SEQUENCE +struct csi_rs_cfg_nzp_activation_r14_s { + struct csi_rs_nzp_mode_r14_e_ { + enum options { semi_persistent, aperiodic }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_rs_nzp_mode_r14_e_() {} + csi_rs_nzp_mode_r14_e_(options v) : value(v) {} + csi_rs_nzp_mode_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + csi_rs_nzp_mode_r14_e_ csi_rs_nzp_mode_r14; + uint8_t activ_res_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNZP-r11 ::= SEQUENCE +struct csi_rs_cfg_nzp_r11_s { + struct ant_ports_count_r11_e_ { + enum options { an1, an2, an4, an8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ant_ports_count_r11_e_() {} + ant_ports_count_r11_e_(options v) : value(v) {} + ant_ports_count_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct qcl_crs_info_r11_s_ { + struct crs_ports_count_r11_e_ { + enum options { n1, n2, n4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + crs_ports_count_r11_e_() {} + crs_ports_count_r11_e_(options v) : value(v) {} + crs_ports_count_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mbsfn_sf_cfg_list_r11_c_ { + struct setup_s_ { + // member variables + mbsfn_sf_cfg_list_l sf_cfg_list; + }; + typedef setup_e types; + + // choice methods + mbsfn_sf_cfg_list_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool mbsfn_sf_cfg_list_r11_present; + uint16_t qcl_scrambling_id_r11; + crs_ports_count_r11_e_ crs_ports_count_r11; + mbsfn_sf_cfg_list_r11_c_ mbsfn_sf_cfg_list_r11; + + // sequence methods + qcl_crs_info_r11_s_(); + }; + struct mbsfn_sf_cfg_list_v1430_c_ { + struct setup_s_ { + // member variables + mbsfn_sf_cfg_list_v1430_l sf_cfg_list_v1430; + }; + typedef setup_e types; + + // choice methods + mbsfn_sf_cfg_list_v1430_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-v1430"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-v1430"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool qcl_crs_info_r11_present; + uint8_t csi_rs_cfg_nzp_id_r11; + ant_ports_count_r11_e_ ant_ports_count_r11; + uint8_t res_cfg_r11; + uint8_t sf_cfg_r11; + uint16_t scrambling_id_r11; + qcl_crs_info_r11_s_ qcl_crs_info_r11; + // ... + // group 0 + bool csi_rs_cfg_nzp_id_v1310_present; + uint8_t csi_rs_cfg_nzp_id_v1310; + // group 1 + bool tx_comb_r14_present; + bool freq_density_r14_present; + uint8_t tx_comb_r14; + nzp_freq_density_r14_e freq_density_r14; + // group 2 + bool mbsfn_sf_cfg_list_v1430_present; + copy_ptr mbsfn_sf_cfg_list_v1430; + + // sequence methods + csi_rs_cfg_nzp_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NZP-ResourceConfig-r13 ::= SEQUENCE +struct nzp_res_cfg_r13_s { + // member variables + bool ext; + uint8_t res_cfg_r13; + // ... + // group 0 + bool tx_comb_r14_present; + bool freq_density_r14_present; + uint8_t tx_comb_r14; + nzp_freq_density_r14_e freq_density_r14; + + // sequence methods + nzp_res_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// P-C-AndCBSR-Pair-r13 ::= SEQUENCE (SIZE (1..2)) OF P-C-AndCBSR-r13 +typedef dyn_array p_c_and_cbsr_pair_r13_l; + +// P-C-AndCBSR-r15 ::= SEQUENCE +struct p_c_and_cbsr_r15_s { + // member variables + int8_t p_c_r15; + dyn_bitstring codebook_subset_restrict4_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigBeamformed-r14 ::= SEQUENCE +struct csi_rs_cfg_beamformed_r14_s { + typedef bounded_array csi_rs_cfg_nzp_id_list_ext_r14_l_; + typedef bounded_array csi_im_cfg_id_list_r14_l_; + typedef dyn_array p_c_and_cbsr_per_res_cfg_list_r14_l_; + typedef bounded_array ace_for4_tx_per_res_cfg_list_r14_l_; + typedef dyn_array csi_rs_cfg_nzp_ap_list_r14_l_; + + // member variables + bool csi_rs_cfg_nzp_id_list_ext_r14_present; + bool csi_im_cfg_id_list_r14_present; + bool p_c_and_cbsr_per_res_cfg_list_r14_present; + bool ace_for4_tx_per_res_cfg_list_r14_present; + bool alternative_codebook_enabled_beamformed_r14_present; + bool ch_meas_restrict_r14_present; + bool csi_rs_cfg_nzp_ap_list_r14_present; + bool nzp_res_cfg_original_v1430_present; + bool csi_rs_nzp_activation_r14_present; + csi_rs_cfg_nzp_id_list_ext_r14_l_ csi_rs_cfg_nzp_id_list_ext_r14; + csi_im_cfg_id_list_r14_l_ csi_im_cfg_id_list_r14; + p_c_and_cbsr_per_res_cfg_list_r14_l_ p_c_and_cbsr_per_res_cfg_list_r14; + ace_for4_tx_per_res_cfg_list_r14_l_ ace_for4_tx_per_res_cfg_list_r14; + csi_rs_cfg_nzp_ap_list_r14_l_ csi_rs_cfg_nzp_ap_list_r14; + csi_rs_cfg_nzp_v1430_s nzp_res_cfg_original_v1430; + csi_rs_cfg_nzp_activation_r14_s csi_rs_nzp_activation_r14; + + // sequence methods + csi_rs_cfg_beamformed_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNZP-EMIMO-r13 ::= CHOICE +struct csi_rs_cfg_nzp_emimo_r13_c { + struct setup_s_ { + typedef dyn_array nzp_res_cfg_list_r13_l_; + struct cdm_type_r13_e_ { + enum options { cdm2, cdm4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cdm_type_r13_e_() {} + cdm_type_r13_e_(options v) : value(v) {} + cdm_type_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool cdm_type_r13_present; + nzp_res_cfg_list_r13_l_ nzp_res_cfg_list_r13; + cdm_type_r13_e_ cdm_type_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_nzp_emimo_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigNZP-EMIMO-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigNZP-EMIMO-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CSI-RS-ConfigNZP-EMIMO-v1430 ::= SEQUENCE +struct csi_rs_cfg_nzp_emimo_v1430_s { + typedef dyn_array nzp_res_cfg_list_ext_r14_l_; + + // member variables + bool cdm_type_v1430_present; + nzp_res_cfg_list_ext_r14_l_ nzp_res_cfg_list_ext_r14; + + // sequence methods + csi_rs_cfg_nzp_emimo_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// P-C-AndCBSR-Pair-r15 ::= SEQUENCE (SIZE (1..2)) OF P-C-AndCBSR-r15 +typedef dyn_array p_c_and_cbsr_pair_r15_l; + +// CQI-ReportModeAperiodic ::= ENUMERATED +struct cqi_report_mode_aperiodic_e { + enum options { rm12, rm20, rm22, rm30, rm31, rm32_v1250, rm10_v1310, rm11_v1310 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cqi_report_mode_aperiodic_e() {} + cqi_report_mode_aperiodic_e(options v) : value(v) {} + cqi_report_mode_aperiodic_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// CSI-RS-ConfigBeamformed-r13 ::= SEQUENCE +struct csi_rs_cfg_beamformed_r13_s { + typedef bounded_array csi_rs_cfg_nzp_id_list_ext_r13_l_; + typedef bounded_array csi_im_cfg_id_list_r13_l_; + typedef dyn_array p_c_and_cbsr_per_res_cfg_list_r13_l_; + typedef bounded_array ace_for4_tx_per_res_cfg_list_r13_l_; + + // member variables + bool csi_rs_cfg_nzp_id_list_ext_r13_present; + bool csi_im_cfg_id_list_r13_present; + bool p_c_and_cbsr_per_res_cfg_list_r13_present; + bool ace_for4_tx_per_res_cfg_list_r13_present; + bool alternative_codebook_enabled_beamformed_r13_present; + bool ch_meas_restrict_r13_present; + csi_rs_cfg_nzp_id_list_ext_r13_l_ csi_rs_cfg_nzp_id_list_ext_r13; + csi_im_cfg_id_list_r13_l_ csi_im_cfg_id_list_r13; + p_c_and_cbsr_per_res_cfg_list_r13_l_ p_c_and_cbsr_per_res_cfg_list_r13; + ace_for4_tx_per_res_cfg_list_r13_l_ ace_for4_tx_per_res_cfg_list_r13; + + // sequence methods + csi_rs_cfg_beamformed_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigBeamformed-v1430 ::= SEQUENCE +struct csi_rs_cfg_beamformed_v1430_s { + typedef dyn_array csi_rs_cfg_nzp_ap_list_r14_l_; + + // member variables + bool csi_rs_cfg_nzp_ap_list_r14_present; + bool nzp_res_cfg_original_v1430_present; + bool csi_rs_nzp_activation_r14_present; + csi_rs_cfg_nzp_ap_list_r14_l_ csi_rs_cfg_nzp_ap_list_r14; + csi_rs_cfg_nzp_v1430_s nzp_res_cfg_original_v1430; + csi_rs_cfg_nzp_activation_r14_s csi_rs_nzp_activation_r14; + + // sequence methods + csi_rs_cfg_beamformed_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigEMIMO2-r14 ::= CHOICE +struct csi_rs_cfg_emimo2_r14_c { + typedef setup_e types; + + // choice methods + csi_rs_cfg_emimo2_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csi_rs_cfg_beamformed_r14_s& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO2-r14"); + return c; + } + const csi_rs_cfg_beamformed_r14_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO2-r14"); + return c; + } + +private: + types type_; + csi_rs_cfg_beamformed_r14_s c; +}; + +// CSI-RS-ConfigNonPrecoded-r13 ::= SEQUENCE +struct csi_rs_cfg_non_precoded_r13_s { + struct codebook_cfg_n1_r13_e_ { + enum options { n1, n2, n3, n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_cfg_n1_r13_e_() {} + codebook_cfg_n1_r13_e_(options v) : value(v) {} + codebook_cfg_n1_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_cfg_n2_r13_e_ { + enum options { n1, n2, n3, n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_cfg_n2_r13_e_() {} + codebook_cfg_n2_r13_e_(options v) : value(v) {} + codebook_cfg_n2_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_over_sampling_rate_cfg_o1_r13_e_ { + enum options { n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_over_sampling_rate_cfg_o1_r13_e_() {} + codebook_over_sampling_rate_cfg_o1_r13_e_(options v) : value(v) {} + codebook_over_sampling_rate_cfg_o1_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_over_sampling_rate_cfg_o2_r13_e_ { + enum options { n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_over_sampling_rate_cfg_o2_r13_e_() {} + codebook_over_sampling_rate_cfg_o2_r13_e_(options v) : value(v) {} + codebook_over_sampling_rate_cfg_o2_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef bounded_array csi_im_cfg_id_list_r13_l_; + + // member variables + bool p_c_and_cbsr_list_r13_present; + bool codebook_over_sampling_rate_cfg_o1_r13_present; + bool codebook_over_sampling_rate_cfg_o2_r13_present; + bool csi_im_cfg_id_list_r13_present; + bool csi_rs_cfg_nzp_emimo_r13_present; + p_c_and_cbsr_pair_r13_l p_c_and_cbsr_list_r13; + codebook_cfg_n1_r13_e_ codebook_cfg_n1_r13; + codebook_cfg_n2_r13_e_ codebook_cfg_n2_r13; + codebook_over_sampling_rate_cfg_o1_r13_e_ codebook_over_sampling_rate_cfg_o1_r13; + codebook_over_sampling_rate_cfg_o2_r13_e_ codebook_over_sampling_rate_cfg_o2_r13; + uint8_t codebook_cfg_r13; + csi_im_cfg_id_list_r13_l_ csi_im_cfg_id_list_r13; + csi_rs_cfg_nzp_emimo_r13_c csi_rs_cfg_nzp_emimo_r13; + + // sequence methods + csi_rs_cfg_non_precoded_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNonPrecoded-v1430 ::= SEQUENCE +struct csi_rs_cfg_non_precoded_v1430_s { + struct codebook_cfg_n1_v1430_e_ { + enum options { n5, n6, n7, n10, n12, n14, n16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_cfg_n1_v1430_e_() {} + codebook_cfg_n1_v1430_e_(options v) : value(v) {} + codebook_cfg_n1_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_cfg_n2_v1430_e_ { + enum options { n5, n6, n7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_cfg_n2_v1430_e_() {} + codebook_cfg_n2_v1430_e_(options v) : value(v) {} + codebook_cfg_n2_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_rs_cfg_nzp_emimo_v1430_present; + csi_rs_cfg_nzp_emimo_v1430_s csi_rs_cfg_nzp_emimo_v1430; + codebook_cfg_n1_v1430_e_ codebook_cfg_n1_v1430; + codebook_cfg_n2_v1430_e_ codebook_cfg_n2_v1430; + csi_rs_cfg_nzp_v1430_s nzp_res_cfg_tm9_original_v1430; + + // sequence methods + csi_rs_cfg_non_precoded_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNonPrecoded-v1480 ::= SEQUENCE +struct csi_rs_cfg_non_precoded_v1480_s { + struct codebook_cfg_n1_v1480_e_ { + enum options { n5, n6, n7, n10, n12, n14, n16 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_cfg_n1_v1480_e_() {} + codebook_cfg_n1_v1480_e_(options v) : value(v) {} + codebook_cfg_n1_v1480_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_cfg_n2_r1480_e_ { + enum options { n5, n6, n7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebook_cfg_n2_r1480_e_() {} + codebook_cfg_n2_r1480_e_(options v) : value(v) {} + codebook_cfg_n2_r1480_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_rs_cfg_nzp_emimo_v1480_present; + bool codebook_cfg_n1_v1480_present; + bool codebook_cfg_n2_r1480_present; + csi_rs_cfg_nzp_emimo_v1430_s csi_rs_cfg_nzp_emimo_v1480; + codebook_cfg_n1_v1480_e_ codebook_cfg_n1_v1480; + codebook_cfg_n2_r1480_e_ codebook_cfg_n2_r1480; + csi_rs_cfg_nzp_v1430_s nzp_res_cfg_tm9_original_v1480; + + // sequence methods + csi_rs_cfg_non_precoded_v1480_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNonPrecoded-v1530 ::= SEQUENCE +struct csi_rs_cfg_non_precoded_v1530_s { + // member variables + bool p_c_and_cbsr_list_r15_present; + p_c_and_cbsr_pair_r15_l p_c_and_cbsr_list_r15; + + // sequence methods + csi_rs_cfg_non_precoded_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// P-C-AndCBSR-r11 ::= SEQUENCE +struct p_c_and_cbsr_r11_s { + // member variables + int8_t p_c_r11; + dyn_bitstring codebook_subset_restrict_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportAperiodicProc-r11 ::= SEQUENCE +struct cqi_report_aperiodic_proc_r11_s { + // member variables + cqi_report_mode_aperiodic_e cqi_report_mode_aperiodic_r11; + bool trigger01_r11; + bool trigger10_r11; + bool trigger11_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportAperiodicProc-v1310 ::= SEQUENCE +struct cqi_report_aperiodic_proc_v1310_s { + // member variables + bool trigger001_r13; + bool trigger010_r13; + bool trigger011_r13; + bool trigger100_r13; + bool trigger101_r13; + bool trigger110_r13; + bool trigger111_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportBothProc-r11 ::= SEQUENCE +struct cqi_report_both_proc_r11_s { + // member variables + bool ri_ref_csi_process_id_r11_present; + bool pmi_ri_report_r11_present; + uint8_t ri_ref_csi_process_id_r11; + + // sequence methods + cqi_report_both_proc_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CRI-ReportConfig-r13 ::= CHOICE +struct cri_report_cfg_r13_c { + struct setup_s_ { + // member variables + bool cri_cfg_idx2_r13_present; + uint16_t cri_cfg_idx_r13; + uint16_t cri_cfg_idx2_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cri_report_cfg_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CRI-ReportConfig-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CRI-ReportConfig-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CSI-RS-ConfigEMIMO-Hybrid-r14 ::= CHOICE +struct csi_rs_cfg_emimo_hybrid_r14_c { + struct setup_s_ { + // member variables + bool periodicity_offset_idx_r14_present; + bool e_mimo_type2_r14_present; + uint16_t periodicity_offset_idx_r14; + csi_rs_cfg_emimo2_r14_c e_mimo_type2_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_emimo_hybrid_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-Hybrid-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-Hybrid-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CSI-RS-ConfigEMIMO-r13 ::= CHOICE +struct csi_rs_cfg_emimo_r13_c { + struct setup_c_ { + struct types { + enum options { non_precoded_r13, beamformed_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csi_rs_cfg_non_precoded_r13_s& non_precoded_r13() + { + assert_choice_type("nonPrecoded-r13", type_.to_string(), "setup"); + return c.get(); + } + csi_rs_cfg_beamformed_r13_s& beamformed_r13() + { + assert_choice_type("beamformed-r13", type_.to_string(), "setup"); + return c.get(); + } + const csi_rs_cfg_non_precoded_r13_s& non_precoded_r13() const + { + assert_choice_type("nonPrecoded-r13", type_.to_string(), "setup"); + return c.get(); + } + const csi_rs_cfg_beamformed_r13_s& beamformed_r13() const + { + assert_choice_type("beamformed-r13", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_emimo_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-r13"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-r13"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// CSI-RS-ConfigEMIMO-v1430 ::= CHOICE +struct csi_rs_cfg_emimo_v1430_c { + struct setup_c_ { + struct types { + enum options { non_precoded_v1430, beamformed_v1430, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csi_rs_cfg_non_precoded_v1430_s& non_precoded_v1430() + { + assert_choice_type("nonPrecoded-v1430", type_.to_string(), "setup"); + return c.get(); + } + csi_rs_cfg_beamformed_v1430_s& beamformed_v1430() + { + assert_choice_type("beamformed-v1430", type_.to_string(), "setup"); + return c.get(); + } + const csi_rs_cfg_non_precoded_v1430_s& non_precoded_v1430() const + { + assert_choice_type("nonPrecoded-v1430", type_.to_string(), "setup"); + return c.get(); + } + const csi_rs_cfg_beamformed_v1430_s& beamformed_v1430() const + { + assert_choice_type("beamformed-v1430", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_emimo_v1430_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-v1430"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-v1430"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// CSI-RS-ConfigEMIMO-v1480 ::= CHOICE +struct csi_rs_cfg_emimo_v1480_c { + struct setup_c_ { + struct types { + enum options { non_precoded_v1480, beamformed_v1480, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csi_rs_cfg_non_precoded_v1480_s& non_precoded_v1480() + { + assert_choice_type("nonPrecoded-v1480", type_.to_string(), "setup"); + return c.get(); + } + csi_rs_cfg_beamformed_v1430_s& beamformed_v1480() + { + assert_choice_type("beamformed-v1480", type_.to_string(), "setup"); + return c.get(); + } + const csi_rs_cfg_non_precoded_v1480_s& non_precoded_v1480() const + { + assert_choice_type("nonPrecoded-v1480", type_.to_string(), "setup"); + return c.get(); + } + const csi_rs_cfg_beamformed_v1430_s& beamformed_v1480() const + { + assert_choice_type("beamformed-v1480", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_emimo_v1480_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-v1480"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-v1480"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// CSI-RS-ConfigEMIMO-v1530 ::= CHOICE +struct csi_rs_cfg_emimo_v1530_c { + struct setup_c_ { + struct types { + enum options { non_precoded_v1530, nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csi_rs_cfg_non_precoded_v1530_s& non_precoded_v1530() + { + assert_choice_type("nonPrecoded-v1530", type_.to_string(), "setup"); + return c; + } + const csi_rs_cfg_non_precoded_v1530_s& non_precoded_v1530() const + { + assert_choice_type("nonPrecoded-v1530", type_.to_string(), "setup"); + return c; + } + + private: + types type_; + csi_rs_cfg_non_precoded_v1530_s c; + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_emimo_v1530_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-v1530"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigEMIMO-v1530"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// P-C-AndCBSR-Pair-r13a ::= SEQUENCE (SIZE (1..2)) OF P-C-AndCBSR-r11 +typedef dyn_array p_c_and_cbsr_pair_r13a_l; + +// CQI-ReportPeriodicProcExt-r11 ::= SEQUENCE +struct cqi_report_periodic_proc_ext_r11_s { + struct cqi_format_ind_periodic_r11_c_ { + struct wideband_cqi_r11_s_ { + struct csi_report_mode_r11_e_ { + enum options { submode1, submode2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_report_mode_r11_e_() {} + csi_report_mode_r11_e_(options v) : value(v) {} + csi_report_mode_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_report_mode_r11_present; + csi_report_mode_r11_e_ csi_report_mode_r11; + + // sequence methods + wideband_cqi_r11_s_(); + }; + struct subband_cqi_r11_s_ { + struct periodicity_factor_r11_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_factor_r11_e_() {} + periodicity_factor_r11_e_(options v) : value(v) {} + periodicity_factor_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t k; + periodicity_factor_r11_e_ periodicity_factor_r11; + }; + struct types { + enum options { wideband_cqi_r11, subband_cqi_r11, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cqi_format_ind_periodic_r11_c_() : type_(types::nulltype) {} + cqi_format_ind_periodic_r11_c_(const cqi_format_ind_periodic_r11_c_& other); + cqi_format_ind_periodic_r11_c_& operator=(const cqi_format_ind_periodic_r11_c_& other); + ~cqi_format_ind_periodic_r11_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + wideband_cqi_r11_s_& wideband_cqi_r11() + { + assert_choice_type("widebandCQI-r11", type_.to_string(), "cqi-FormatIndicatorPeriodic-r11"); + return c.get(); + } + subband_cqi_r11_s_& subband_cqi_r11() + { + assert_choice_type("subbandCQI-r11", type_.to_string(), "cqi-FormatIndicatorPeriodic-r11"); + return c.get(); + } + const wideband_cqi_r11_s_& wideband_cqi_r11() const + { + assert_choice_type("widebandCQI-r11", type_.to_string(), "cqi-FormatIndicatorPeriodic-r11"); + return c.get(); + } + const subband_cqi_r11_s_& subband_cqi_r11() const + { + assert_choice_type("subbandCQI-r11", type_.to_string(), "cqi-FormatIndicatorPeriodic-r11"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct csi_cfg_idx_r11_c_ { + struct setup_s_ { + // member variables + bool ri_cfg_idx2_r11_present; + uint16_t cqi_pmi_cfg_idx2_r11; + uint16_t ri_cfg_idx2_r11; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + csi_cfg_idx_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-ConfigIndex-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-ConfigIndex-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct periodicity_factor_wb_r13_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_factor_wb_r13_e_() {} + periodicity_factor_wb_r13_e_(options v) : value(v) {} + periodicity_factor_wb_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool ri_cfg_idx_r11_present; + bool csi_cfg_idx_r11_present; + uint8_t cqi_report_periodic_proc_ext_id_r11; + uint16_t cqi_pmi_cfg_idx_r11; + cqi_format_ind_periodic_r11_c_ cqi_format_ind_periodic_r11; + uint16_t ri_cfg_idx_r11; + csi_cfg_idx_r11_c_ csi_cfg_idx_r11; + // ... + // group 0 + bool cri_report_cfg_r13_present; + copy_ptr cri_report_cfg_r13; + // group 1 + bool periodicity_factor_wb_r13_present; + periodicity_factor_wb_r13_e_ periodicity_factor_wb_r13; + + // sequence methods + cqi_report_periodic_proc_ext_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-IM-Config-r11 ::= SEQUENCE +struct csi_im_cfg_r11_s { + // member variables + bool ext; + uint8_t csi_im_cfg_id_r11; + uint8_t res_cfg_r11; + uint8_t sf_cfg_r11; + // ... + // group 0 + bool interference_meas_restrict_r13_present; + bool interference_meas_restrict_r13; + + // sequence methods + csi_im_cfg_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-IM-ConfigExt-r12 ::= SEQUENCE +struct csi_im_cfg_ext_r12_s { + // member variables + bool ext; + uint8_t csi_im_cfg_id_v1250; + uint8_t res_cfg_r12; + uint8_t sf_cfg_r12; + // ... + // group 0 + bool interference_meas_restrict_r13_present; + bool csi_im_cfg_id_v1310_present; + bool interference_meas_restrict_r13; + uint8_t csi_im_cfg_id_v1310; + + // sequence methods + csi_im_cfg_ext_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-Process-r11 ::= SEQUENCE +struct csi_process_r11_s { + struct csi_im_cfg_id_list_r12_c_ { + typedef bounded_array setup_l_; + typedef setup_e types; + + // choice methods + csi_im_cfg_id_list_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_l_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-IM-ConfigIdList-r12"); + return c; + } + const setup_l_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-IM-ConfigIdList-r12"); + return c; + } + + private: + types type_; + setup_l_ c; + }; + struct cqi_report_aperiodic_proc2_r12_c_ { + typedef setup_e types; + + // choice methods + cqi_report_aperiodic_proc2_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cqi_report_aperiodic_proc_r11_s& setup() + { + assert_choice_type("setup", type_.to_string(), "cqi-ReportAperiodicProc2-r12"); + return c; + } + const cqi_report_aperiodic_proc_r11_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "cqi-ReportAperiodicProc2-r12"); + return c; + } + + private: + types type_; + cqi_report_aperiodic_proc_r11_s c; + }; + struct cqi_report_aperiodic_proc_v1310_c_ { + typedef setup_e types; + + // choice methods + cqi_report_aperiodic_proc_v1310_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cqi_report_aperiodic_proc_v1310_s& setup() + { + assert_choice_type("setup", type_.to_string(), "cqi-ReportAperiodicProc-v1310"); + return c; + } + const cqi_report_aperiodic_proc_v1310_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "cqi-ReportAperiodicProc-v1310"); + return c; + } + + private: + types type_; + cqi_report_aperiodic_proc_v1310_s c; + }; + struct cqi_report_aperiodic_proc2_v1310_c_ { + typedef setup_e types; + + // choice methods + cqi_report_aperiodic_proc2_v1310_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cqi_report_aperiodic_proc_v1310_s& setup() + { + assert_choice_type("setup", type_.to_string(), "cqi-ReportAperiodicProc2-v1310"); + return c; + } + const cqi_report_aperiodic_proc_v1310_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "cqi-ReportAperiodicProc2-v1310"); + return c; + } + + private: + types type_; + cqi_report_aperiodic_proc_v1310_s c; + }; + + // member variables + bool ext; + bool cqi_report_both_proc_r11_present; + bool cqi_report_periodic_proc_id_r11_present; + bool cqi_report_aperiodic_proc_r11_present; + uint8_t csi_process_id_r11; + uint8_t csi_rs_cfg_nzp_id_r11; + uint8_t csi_im_cfg_id_r11; + p_c_and_cbsr_pair_r13a_l p_c_and_cbsr_list_r11; + cqi_report_both_proc_r11_s cqi_report_both_proc_r11; + uint8_t cqi_report_periodic_proc_id_r11; + cqi_report_aperiodic_proc_r11_s cqi_report_aperiodic_proc_r11; + // ... + // group 0 + bool alternative_codebook_enabled_for4_tx_proc_r12_present; + bool csi_im_cfg_id_list_r12_present; + bool cqi_report_aperiodic_proc2_r12_present; + copy_ptr csi_im_cfg_id_list_r12; + copy_ptr cqi_report_aperiodic_proc2_r12; + // group 1 + bool cqi_report_aperiodic_proc_v1310_present; + bool cqi_report_aperiodic_proc2_v1310_present; + bool e_mimo_type_r13_present; + copy_ptr cqi_report_aperiodic_proc_v1310; + copy_ptr cqi_report_aperiodic_proc2_v1310; + copy_ptr e_mimo_type_r13; + // group 2 + bool dummy_present; + bool e_mimo_hybrid_r14_present; + bool advanced_codebook_enabled_r14_present; + copy_ptr dummy; + copy_ptr e_mimo_hybrid_r14; + bool advanced_codebook_enabled_r14; + // group 3 + bool e_mimo_type_v1480_present; + copy_ptr e_mimo_type_v1480; + // group 4 + bool fe_comp_csi_enabled_v1530_present; + bool e_mimo_type_v1530_present; + bool fe_comp_csi_enabled_v1530; + copy_ptr e_mimo_type_v1530; + + // sequence methods + csi_process_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportPeriodicProcExtToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCQI-ProcExt-r11)) OF +// CQI-ReportPeriodicProcExt-r11 +typedef dyn_array cqi_report_periodic_proc_ext_to_add_mod_list_r11_l; + +// CQI-ReportPeriodicProcExtToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCQI-ProcExt-r11)) OF INTEGER +typedef bounded_array cqi_report_periodic_proc_ext_to_release_list_r11_l; + +// CSI-IM-ConfigToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-IM-r11)) OF CSI-IM-Config-r11 +typedef dyn_array csi_im_cfg_to_add_mod_list_r11_l; + +// CSI-IM-ConfigToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-IM-v1310)) OF CSI-IM-ConfigExt-r12 +typedef dyn_array csi_im_cfg_to_add_mod_list_ext_r13_l; + +// CSI-IM-ConfigToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-IM-r11)) OF INTEGER +typedef bounded_array csi_im_cfg_to_release_list_r11_l; + +// CSI-IM-ConfigToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-IM-v1310)) OF INTEGER +typedef bounded_array csi_im_cfg_to_release_list_ext_r13_l; + +// CSI-ProcessToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-Proc-r11)) OF CSI-Process-r11 +typedef dyn_array csi_process_to_add_mod_list_r11_l; + +// CSI-ProcessToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-Proc-r11)) OF INTEGER +typedef bounded_array csi_process_to_release_list_r11_l; + +// DCI7-CandidatesPerAL-SPDCCH-r15 ::= SEQUENCE (SIZE(1..4)) OF INTEGER +typedef bounded_array dci7_candidates_per_al_spdcch_r15_l; + +// N4SPUCCH-Resource-r15 ::= SEQUENCE +struct n4_spucch_res_r15_s { + // member variables + uint8_t n4start_prb_r15; + uint8_t n4nof_prb_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PollByte-r14 ::= ENUMERATED +struct poll_byte_r14_e { + enum options { + kb1, + kb2, + kb5, + kb8, + kb10, + kb15, + kb3500, + kb4000, + kb4500, + kb5000, + kb5500, + kb6000, + kb6500, + kb7000, + kb7500, + kb8000, + kb9000, + kb10000, + kb11000, + kb12000, + kb13000, + kb14000, + kb15000, + kb16000, + kb17000, + kb18000, + kb19000, + kb20000, + kb25000, + kb30000, + kb35000, + kb40000 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + poll_byte_r14_e() {} + poll_byte_r14_e(options v) : value(v) {} + poll_byte_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// PollPDU-r15 ::= ENUMERATED +struct poll_pdu_r15_e { + enum options { + p4, + p8, + p16, + p32, + p64, + p128, + p256, + p512, + p1024, + p2048_r15, + p4096_r15, + p6144_r15, + p8192_r15, + p12288_r15, + p16384_r15, + p_infinity + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + poll_pdu_r15_e() {} + poll_pdu_r15_e(options v) : value(v) {} + poll_pdu_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; +}; + +// SN-FieldLength ::= ENUMERATED +struct sn_field_len_e { + enum options { size5, size10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sn_field_len_e() {} + sn_field_len_e(options v) : value(v) {} + sn_field_len_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// SN-FieldLength-r15 ::= ENUMERATED +struct sn_field_len_r15_e { + enum options { size5, size10, size16_r15 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sn_field_len_r15_e() {} + sn_field_len_r15_e(options v) : value(v) {} + sn_field_len_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// T-PollRetransmit ::= ENUMERATED +struct t_poll_retx_e { + enum options { + ms5, + ms10, + ms15, + ms20, + ms25, + ms30, + ms35, + ms40, + ms45, + ms50, + ms55, + ms60, + ms65, + ms70, + ms75, + ms80, + ms85, + ms90, + ms95, + ms100, + ms105, + ms110, + ms115, + ms120, + ms125, + ms130, + ms135, + ms140, + ms145, + ms150, + ms155, + ms160, + ms165, + ms170, + ms175, + ms180, + ms185, + ms190, + ms195, + ms200, + ms205, + ms210, + ms215, + ms220, + ms225, + ms230, + ms235, + ms240, + ms245, + ms250, + ms300, + ms350, + ms400, + ms450, + ms500, + ms800_v1310, + ms1000_v1310, + ms2000_v1310, + ms4000_v1310, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 64, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t_poll_retx_e() {} + t_poll_retx_e(options v) : value(v) {} + t_poll_retx_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// T-Reordering ::= ENUMERATED +struct t_reordering_e { + enum options { + ms0, + ms5, + ms10, + ms15, + ms20, + ms25, + ms30, + ms35, + ms40, + ms45, + ms50, + ms55, + ms60, + ms65, + ms70, + ms75, + ms80, + ms85, + ms90, + ms95, + ms100, + ms110, + ms120, + ms130, + ms140, + ms150, + ms160, + ms170, + ms180, + ms190, + ms200, + ms1600_v1310 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t_reordering_e() {} + t_reordering_e(options v) : value(v) {} + t_reordering_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// T-StatusProhibit ::= ENUMERATED +struct t_status_prohibit_e { + enum options { + ms0, + ms5, + ms10, + ms15, + ms20, + ms25, + ms30, + ms35, + ms40, + ms45, + ms50, + ms55, + ms60, + ms65, + ms70, + ms75, + ms80, + ms85, + ms90, + ms95, + ms100, + ms105, + ms110, + ms115, + ms120, + ms125, + ms130, + ms135, + ms140, + ms145, + ms150, + ms155, + ms160, + ms165, + ms170, + ms175, + ms180, + ms185, + ms190, + ms195, + ms200, + ms205, + ms210, + ms215, + ms220, + ms225, + ms230, + ms235, + ms240, + ms245, + ms250, + ms300, + ms350, + ms400, + ms450, + ms500, + ms800_v1310, + ms1000_v1310, + ms1200_v1310, + ms1600_v1310, + ms2000_v1310, + ms2400_v1310, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 64, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t_status_prohibit_e() {} + t_status_prohibit_e(options v) : value(v) {} + t_status_prohibit_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// ZeroTxPowerCSI-RS-r12 ::= SEQUENCE +struct zero_tx_pwr_csi_rs_r12_s { + // member variables + fixed_bitstring<16> zero_tx_pwr_res_cfg_list_r12; + uint8_t zero_tx_pwr_sf_cfg_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportAperiodic-r10 ::= CHOICE +struct cqi_report_aperiodic_r10_c { + struct setup_s_ { + struct aperiodic_csi_trigger_r10_s_ { + // member variables + fixed_bitstring<8> trigger1_r10; + fixed_bitstring<8> trigger2_r10; + }; + + // member variables + bool aperiodic_csi_trigger_r10_present; + cqi_report_mode_aperiodic_e cqi_report_mode_aperiodic_r10; + aperiodic_csi_trigger_r10_s_ aperiodic_csi_trigger_r10; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_report_aperiodic_r10_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportAperiodic-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportAperiodic-r10"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportAperiodic-v1250 ::= CHOICE +struct cqi_report_aperiodic_v1250_c { + struct setup_s_ { + struct aperiodic_csi_trigger_v1250_s_ { + struct trigger_sf_set_ind_r12_e_ { + enum options { s1, s2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + trigger_sf_set_ind_r12_e_() {} + trigger_sf_set_ind_r12_e_(options v) : value(v) {} + trigger_sf_set_ind_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + trigger_sf_set_ind_r12_e_ trigger_sf_set_ind_r12; + fixed_bitstring<8> trigger1_sf_set_ind_r12; + fixed_bitstring<8> trigger2_sf_set_ind_r12; + }; + + // member variables + aperiodic_csi_trigger_v1250_s_ aperiodic_csi_trigger_v1250; + }; + typedef setup_e types; + + // choice methods + cqi_report_aperiodic_v1250_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportAperiodic-v1250"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportAperiodic-v1250"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportAperiodic-v1310 ::= CHOICE +struct cqi_report_aperiodic_v1310_c { + struct setup_s_ { + struct aperiodic_csi_trigger_v1310_s_ { + // member variables + fixed_bitstring<32> trigger1_r13; + fixed_bitstring<32> trigger2_r13; + fixed_bitstring<32> trigger3_r13; + fixed_bitstring<32> trigger4_r13; + fixed_bitstring<32> trigger5_r13; + fixed_bitstring<32> trigger6_r13; + }; + struct aperiodic_csi_trigger2_r13_c_ { + struct setup_s_ { + // member variables + fixed_bitstring<32> trigger1_sf_set_ind_r13; + fixed_bitstring<32> trigger2_sf_set_ind_r13; + fixed_bitstring<32> trigger3_sf_set_ind_r13; + fixed_bitstring<32> trigger4_sf_set_ind_r13; + fixed_bitstring<32> trigger5_sf_set_ind_r13; + fixed_bitstring<32> trigger6_sf_set_ind_r13; + }; + typedef setup_e types; + + // choice methods + aperiodic_csi_trigger2_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "aperiodicCSI-Trigger2-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "aperiodicCSI-Trigger2-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool aperiodic_csi_trigger_v1310_present; + bool aperiodic_csi_trigger2_r13_present; + aperiodic_csi_trigger_v1310_s_ aperiodic_csi_trigger_v1310; + aperiodic_csi_trigger2_r13_c_ aperiodic_csi_trigger2_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_report_aperiodic_v1310_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportAperiodic-v1310"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportAperiodic-v1310"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportAperiodicHybrid-r14 ::= SEQUENCE +struct cqi_report_aperiodic_hybrid_r14_s { + struct triggers_r14_c_ { + struct one_bit_r14_s_ { + // member variables + fixed_bitstring<8> trigger1_ind_r14; + }; + struct two_bit_r14_s_ { + // member variables + fixed_bitstring<8> trigger01_ind_r14; + fixed_bitstring<8> trigger10_ind_r14; + fixed_bitstring<8> trigger11_ind_r14; + }; + struct three_bit_r14_s_ { + // member variables + fixed_bitstring<32> trigger001_ind_r14; + fixed_bitstring<32> trigger010_ind_r14; + fixed_bitstring<32> trigger011_ind_r14; + fixed_bitstring<32> trigger100_ind_r14; + fixed_bitstring<32> trigger101_ind_r14; + fixed_bitstring<32> trigger110_ind_r14; + fixed_bitstring<32> trigger111_ind_r14; + }; + struct types { + enum options { one_bit_r14, two_bit_r14, three_bit_r14, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + triggers_r14_c_() : type_(types::nulltype) {} + triggers_r14_c_(const triggers_r14_c_& other); + triggers_r14_c_& operator=(const triggers_r14_c_& other); + ~triggers_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + one_bit_r14_s_& one_bit_r14() + { + assert_choice_type("oneBit-r14", type_.to_string(), "triggers-r14"); + return c.get(); + } + two_bit_r14_s_& two_bit_r14() + { + assert_choice_type("twoBit-r14", type_.to_string(), "triggers-r14"); + return c.get(); + } + three_bit_r14_s_& three_bit_r14() + { + assert_choice_type("threeBit-r14", type_.to_string(), "triggers-r14"); + return c.get(); + } + const one_bit_r14_s_& one_bit_r14() const + { + assert_choice_type("oneBit-r14", type_.to_string(), "triggers-r14"); + return c.get(); + } + const two_bit_r14_s_& two_bit_r14() const + { + assert_choice_type("twoBit-r14", type_.to_string(), "triggers-r14"); + return c.get(); + } + const three_bit_r14_s_& three_bit_r14() const + { + assert_choice_type("threeBit-r14", type_.to_string(), "triggers-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool triggers_r14_present; + triggers_r14_c_ triggers_r14; + + // sequence methods + cqi_report_aperiodic_hybrid_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportBoth-r11 ::= SEQUENCE +struct cqi_report_both_r11_s { + // member variables + bool csi_im_cfg_to_release_list_r11_present; + bool csi_im_cfg_to_add_mod_list_r11_present; + bool csi_process_to_release_list_r11_present; + bool csi_process_to_add_mod_list_r11_present; + csi_im_cfg_to_release_list_r11_l csi_im_cfg_to_release_list_r11; + csi_im_cfg_to_add_mod_list_r11_l csi_im_cfg_to_add_mod_list_r11; + csi_process_to_release_list_r11_l csi_process_to_release_list_r11; + csi_process_to_add_mod_list_r11_l csi_process_to_add_mod_list_r11; + + // sequence methods + cqi_report_both_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportBoth-v1250 ::= SEQUENCE +struct cqi_report_both_v1250_s { + // member variables + bool csi_im_cfg_to_release_list_ext_r12_present; + bool csi_im_cfg_to_add_mod_list_ext_r12_present; + uint8_t csi_im_cfg_to_release_list_ext_r12; + csi_im_cfg_ext_r12_s csi_im_cfg_to_add_mod_list_ext_r12; + + // sequence methods + cqi_report_both_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportBoth-v1310 ::= SEQUENCE +struct cqi_report_both_v1310_s { + // member variables + bool csi_im_cfg_to_release_list_ext_r13_present; + bool csi_im_cfg_to_add_mod_list_ext_r13_present; + csi_im_cfg_to_release_list_ext_r13_l csi_im_cfg_to_release_list_ext_r13; + csi_im_cfg_to_add_mod_list_ext_r13_l csi_im_cfg_to_add_mod_list_ext_r13; + + // sequence methods + cqi_report_both_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportPeriodic-r10 ::= CHOICE +struct cqi_report_periodic_r10_c { + struct setup_s_ { + struct cqi_format_ind_periodic_r10_c_ { + struct wideband_cqi_r10_s_ { + struct csi_report_mode_r10_e_ { + enum options { submode1, submode2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_report_mode_r10_e_() {} + csi_report_mode_r10_e_(options v) : value(v) {} + csi_report_mode_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_report_mode_r10_present; + csi_report_mode_r10_e_ csi_report_mode_r10; + + // sequence methods + wideband_cqi_r10_s_(); + }; + struct subband_cqi_r10_s_ { + struct periodicity_factor_r10_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_factor_r10_e_() {} + periodicity_factor_r10_e_(options v) : value(v) {} + periodicity_factor_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t k; + periodicity_factor_r10_e_ periodicity_factor_r10; + }; + struct types { + enum options { wideband_cqi_r10, subband_cqi_r10, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cqi_format_ind_periodic_r10_c_() : type_(types::nulltype) {} + cqi_format_ind_periodic_r10_c_(const cqi_format_ind_periodic_r10_c_& other); + cqi_format_ind_periodic_r10_c_& operator=(const cqi_format_ind_periodic_r10_c_& other); + ~cqi_format_ind_periodic_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + wideband_cqi_r10_s_& wideband_cqi_r10() + { + assert_choice_type("widebandCQI-r10", type_.to_string(), "cqi-FormatIndicatorPeriodic-r10"); + return c.get(); + } + subband_cqi_r10_s_& subband_cqi_r10() + { + assert_choice_type("subbandCQI-r10", type_.to_string(), "cqi-FormatIndicatorPeriodic-r10"); + return c.get(); + } + const wideband_cqi_r10_s_& wideband_cqi_r10() const + { + assert_choice_type("widebandCQI-r10", type_.to_string(), "cqi-FormatIndicatorPeriodic-r10"); + return c.get(); + } + const subband_cqi_r10_s_& subband_cqi_r10() const + { + assert_choice_type("subbandCQI-r10", type_.to_string(), "cqi-FormatIndicatorPeriodic-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct csi_cfg_idx_r10_c_ { + struct setup_s_ { + // member variables + bool ri_cfg_idx2_r10_present; + uint16_t cqi_pmi_cfg_idx2_r10; + uint16_t ri_cfg_idx2_r10; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + csi_cfg_idx_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-ConfigIndex-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-ConfigIndex-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool cqi_pucch_res_idx_p1_r10_present; + bool ri_cfg_idx_present; + bool cqi_mask_r9_present; + bool csi_cfg_idx_r10_present; + uint16_t cqi_pucch_res_idx_r10; + uint16_t cqi_pucch_res_idx_p1_r10; + uint16_t cqi_pmi_cfg_idx; + cqi_format_ind_periodic_r10_c_ cqi_format_ind_periodic_r10; + uint16_t ri_cfg_idx; + bool simul_ack_nack_and_cqi; + csi_cfg_idx_r10_c_ csi_cfg_idx_r10; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_report_periodic_r10_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportPeriodic-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportPeriodic-r10"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportPeriodic-v1130 ::= SEQUENCE +struct cqi_report_periodic_v1130_s { + // member variables + bool simul_ack_nack_and_cqi_format3_r11_present; + bool cqi_report_periodic_proc_ext_to_release_list_r11_present; + bool cqi_report_periodic_proc_ext_to_add_mod_list_r11_present; + cqi_report_periodic_proc_ext_to_release_list_r11_l cqi_report_periodic_proc_ext_to_release_list_r11; + cqi_report_periodic_proc_ext_to_add_mod_list_r11_l cqi_report_periodic_proc_ext_to_add_mod_list_r11; + + // sequence methods + cqi_report_periodic_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportPeriodic-v1310 ::= SEQUENCE +struct cqi_report_periodic_v1310_s { + // member variables + bool cri_report_cfg_r13_present; + bool simul_ack_nack_and_cqi_format4_format5_r13_present; + cri_report_cfg_r13_c cri_report_cfg_r13; + + // sequence methods + cqi_report_periodic_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportPeriodic-v1320 ::= SEQUENCE +struct cqi_report_periodic_v1320_s { + struct periodicity_factor_wb_r13_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_factor_wb_r13_e_() {} + periodicity_factor_wb_r13_e_(options v) : value(v) {} + periodicity_factor_wb_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool periodicity_factor_wb_r13_present; + periodicity_factor_wb_r13_e_ periodicity_factor_wb_r13; + + // sequence methods + cqi_report_periodic_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-AM-RLC-r15 ::= SEQUENCE +struct dl_am_rlc_r15_s { + // member variables + t_reordering_e t_reordering_r15; + t_status_prohibit_e t_status_prohibit_r15; + bool extended_rlc_li_field_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-UM-RLC-r15 ::= SEQUENCE +struct dl_um_rlc_r15_s { + // member variables + sn_field_len_r15_e sn_field_len_r15; + t_reordering_e t_reordering_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasSubframePattern-r10 ::= CHOICE +struct meas_sf_pattern_r10_c { + struct sf_pattern_tdd_r10_c_ { + struct types { + enum options { sf_cfg1_minus5_r10, sf_cfg0_r10, sf_cfg6_r10, /*...*/ nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sf_pattern_tdd_r10_c_() : type_(types::nulltype) {} + sf_pattern_tdd_r10_c_(const sf_pattern_tdd_r10_c_& other); + sf_pattern_tdd_r10_c_& operator=(const sf_pattern_tdd_r10_c_& other); + ~sf_pattern_tdd_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<20>& sf_cfg1_minus5_r10() + { + assert_choice_type("subframeConfig1-5-r10", type_.to_string(), "subframePatternTDD-r10"); + return c.get >(); + } + fixed_bitstring<70>& sf_cfg0_r10() + { + assert_choice_type("subframeConfig0-r10", type_.to_string(), "subframePatternTDD-r10"); + return c.get >(); + } + fixed_bitstring<60>& sf_cfg6_r10() + { + assert_choice_type("subframeConfig6-r10", type_.to_string(), "subframePatternTDD-r10"); + return c.get >(); + } + const fixed_bitstring<20>& sf_cfg1_minus5_r10() const + { + assert_choice_type("subframeConfig1-5-r10", type_.to_string(), "subframePatternTDD-r10"); + return c.get >(); + } + const fixed_bitstring<70>& sf_cfg0_r10() const + { + assert_choice_type("subframeConfig0-r10", type_.to_string(), "subframePatternTDD-r10"); + return c.get >(); + } + const fixed_bitstring<60>& sf_cfg6_r10() const + { + assert_choice_type("subframeConfig6-r10", type_.to_string(), "subframePatternTDD-r10"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct types { + enum options { sf_pattern_fdd_r10, sf_pattern_tdd_r10, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + meas_sf_pattern_r10_c() : type_(types::nulltype) {} + meas_sf_pattern_r10_c(const meas_sf_pattern_r10_c& other); + meas_sf_pattern_r10_c& operator=(const meas_sf_pattern_r10_c& other); + ~meas_sf_pattern_r10_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<40>& sf_pattern_fdd_r10() + { + assert_choice_type("subframePatternFDD-r10", type_.to_string(), "MeasSubframePattern-r10"); + return c.get >(); + } + sf_pattern_tdd_r10_c_& sf_pattern_tdd_r10() + { + assert_choice_type("subframePatternTDD-r10", type_.to_string(), "MeasSubframePattern-r10"); + return c.get(); + } + const fixed_bitstring<40>& sf_pattern_fdd_r10() const + { + assert_choice_type("subframePatternFDD-r10", type_.to_string(), "MeasSubframePattern-r10"); + return c.get >(); + } + const sf_pattern_tdd_r10_c_& sf_pattern_tdd_r10() const + { + assert_choice_type("subframePatternTDD-r10", type_.to_string(), "MeasSubframePattern-r10"); + return c.get(); + } + +private: + types type_; + choice_buffer_t), sizeof(sf_pattern_tdd_r10_c_))> c; + + void destroy_(); +}; + +// PollByte ::= ENUMERATED +struct poll_byte_e { + enum options { + kb25, + kb50, + kb75, + kb100, + kb125, + kb250, + kb375, + kb500, + kb750, + kb1000, + kb1250, + kb1500, + kb2000, + kb3000, + kbinfinity, + spare1 + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + poll_byte_e() {} + poll_byte_e(options v) : value(v) {} + poll_byte_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; +}; + +// PollPDU ::= ENUMERATED +struct poll_pdu_e { + enum options { p4, p8, p16, p32, p64, p128, p256, p_infinity }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + poll_pdu_e() {} + poll_pdu_e(options v) : value(v) {} + poll_pdu_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; +}; + +// SPDCCH-Elements-r15 ::= CHOICE +struct spdcch_elems_r15_c { + struct setup_s_ { + struct spdcch_set_ref_sig_r15_e_ { + enum options { crs, dmrs }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + spdcch_set_ref_sig_r15_e_() {} + spdcch_set_ref_sig_r15_e_(options v) : value(v) {} + spdcch_set_ref_sig_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct tx_type_r15_e_ { + enum options { localised, distributed }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_type_r15_e_() {} + tx_type_r15_e_(options v) : value(v) {} + tx_type_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + typedef bounded_array dci7_candidates_per_al_pdcch_r15_l_; + typedef dyn_array dci7_candidate_sets_per_al_spdcch_r15_l_; + struct res_block_assign_r15_s_ { + // member variables + uint8_t num_rb_in_freq_domain_r15; + fixed_bitstring<98> res_block_assign_r15; + }; + typedef bounded_array al_start_point_spdcch_r15_l_; + struct sf_type_r15_e_ { + enum options { mbsfn, nonmbsfn, all }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_type_r15_e_() {} + sf_type_r15_e_(options v) : value(v) {} + sf_type_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct rate_matching_mode_r15_e_ { + enum options { m1, m2, m3, m4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rate_matching_mode_r15_e_() {} + rate_matching_mode_r15_e_(options v) : value(v) {} + rate_matching_mode_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool spdcch_set_cfg_id_r15_present; + bool spdcch_set_ref_sig_r15_present; + bool tx_type_r15_present; + bool spdcch_no_of_symbols_r15_present; + bool dmrs_scrambling_seq_int_r15_present; + bool dci7_candidates_per_al_pdcch_r15_present; + bool dci7_candidate_sets_per_al_spdcch_r15_present; + bool res_block_assign_r15_present; + bool subslot_applicability_r15_present; + bool al_start_point_spdcch_r15_present; + bool sf_type_r15_present; + bool rate_matching_mode_r15_present; + uint8_t spdcch_set_cfg_id_r15; + spdcch_set_ref_sig_r15_e_ spdcch_set_ref_sig_r15; + tx_type_r15_e_ tx_type_r15; + uint8_t spdcch_no_of_symbols_r15; + uint16_t dmrs_scrambling_seq_int_r15; + dci7_candidates_per_al_pdcch_r15_l_ dci7_candidates_per_al_pdcch_r15; + dci7_candidate_sets_per_al_spdcch_r15_l_ dci7_candidate_sets_per_al_spdcch_r15; + res_block_assign_r15_s_ res_block_assign_r15; + fixed_bitstring<5> subslot_applicability_r15; + al_start_point_spdcch_r15_l_ al_start_point_spdcch_r15; + sf_type_r15_e_ sf_type_r15; + rate_matching_mode_r15_e_ rate_matching_mode_r15; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + spdcch_elems_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPDCCH-Elements-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPDCCH-Elements-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SPUCCH-Elements-r15 ::= CHOICE +struct spucch_elems_r15_c { + struct setup_s_ { + typedef bounded_array n1_subslot_spucch_an_list_r15_l_; + typedef dyn_array n4_spucch_slot_res_r15_l_; + typedef dyn_array n4_spucch_subslot_res_r15_l_; + + // member variables + bool n1_subslot_spucch_an_list_r15_present; + bool n1_slot_spucch_fh_an_list_r15_present; + bool n1_slot_spucch_no_fh_an_list_r15_present; + bool n3_spucch_an_list_r15_present; + bool n4_spucch_slot_res_r15_present; + bool n4_spucch_subslot_res_r15_present; + bool n4max_coderate_slot_pucch_r15_present; + bool n4max_coderate_subslot_pucch_r15_present; + bool n4max_coderate_multi_res_slot_pucch_r15_present; + bool n4max_coderate_multi_res_subslot_pucch_r15_present; + n1_subslot_spucch_an_list_r15_l_ n1_subslot_spucch_an_list_r15; + uint16_t n1_slot_spucch_fh_an_list_r15; + uint16_t n1_slot_spucch_no_fh_an_list_r15; + uint16_t n3_spucch_an_list_r15; + n4_spucch_slot_res_r15_l_ n4_spucch_slot_res_r15; + n4_spucch_subslot_res_r15_l_ n4_spucch_subslot_res_r15; + uint8_t n4max_coderate_slot_pucch_r15; + uint8_t n4max_coderate_subslot_pucch_r15; + uint8_t n4max_coderate_multi_res_slot_pucch_r15; + uint8_t n4max_coderate_multi_res_subslot_pucch_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + spucch_elems_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPUCCH-Elements-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPUCCH-Elements-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// TPC-Index ::= CHOICE +struct tpc_idx_c { + struct types { + enum options { idx_of_format3, idx_of_format3_a, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + tpc_idx_c() : type_(types::nulltype) {} + tpc_idx_c(const tpc_idx_c& other); + tpc_idx_c& operator=(const tpc_idx_c& other); + ~tpc_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& idx_of_format3() + { + assert_choice_type("indexOfFormat3", type_.to_string(), "TPC-Index"); + return c.get(); + } + uint8_t& idx_of_format3_a() + { + assert_choice_type("indexOfFormat3A", type_.to_string(), "TPC-Index"); + return c.get(); + } + const uint8_t& idx_of_format3() const + { + assert_choice_type("indexOfFormat3", type_.to_string(), "TPC-Index"); + return c.get(); + } + const uint8_t& idx_of_format3_a() const + { + assert_choice_type("indexOfFormat3A", type_.to_string(), "TPC-Index"); + return c.get(); + } + +private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); +}; + +// UL-AM-RLC-r15 ::= SEQUENCE +struct ul_am_rlc_r15_s { + struct max_retx_thres_r15_e_ { + enum options { t1, t2, t3, t4, t6, t8, t16, t32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_retx_thres_r15_e_() {} + max_retx_thres_r15_e_(options v) : value(v) {} + max_retx_thres_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + t_poll_retx_e t_poll_retx_r15; + poll_pdu_r15_e poll_pdu_r15; + poll_byte_r14_e poll_byte_r15; + max_retx_thres_r15_e_ max_retx_thres_r15; + bool extended_rlc_li_field_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-UM-RLC ::= SEQUENCE +struct ul_um_rlc_s { + // member variables + sn_field_len_e sn_field_len; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ZeroTxPowerCSI-RS-Conf-r12 ::= CHOICE +struct zero_tx_pwr_csi_rs_conf_r12_c { + typedef setup_e types; + + // choice methods + zero_tx_pwr_csi_rs_conf_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + zero_tx_pwr_csi_rs_r12_s& setup() + { + assert_choice_type("setup", type_.to_string(), "ZeroTxPowerCSI-RS-Conf-r12"); + return c; + } + const zero_tx_pwr_csi_rs_r12_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "ZeroTxPowerCSI-RS-Conf-r12"); + return c; + } + +private: + types type_; + zero_tx_pwr_csi_rs_r12_s c; +}; + +// CQI-ReportConfig-r10 ::= SEQUENCE +struct cqi_report_cfg_r10_s { + struct csi_sf_pattern_cfg_r10_c_ { + struct setup_s_ { + // member variables + meas_sf_pattern_r10_c csi_meas_sf_set1_r10; + meas_sf_pattern_r10_c csi_meas_sf_set2_r10; + }; + typedef setup_e types; + + // choice methods + csi_sf_pattern_cfg_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-SubframePatternConfig-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-SubframePatternConfig-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool cqi_report_aperiodic_r10_present; + bool cqi_report_periodic_r10_present; + bool pmi_ri_report_r9_present; + bool csi_sf_pattern_cfg_r10_present; + cqi_report_aperiodic_r10_c cqi_report_aperiodic_r10; + int8_t nom_pdsch_rs_epre_offset; + cqi_report_periodic_r10_c cqi_report_periodic_r10; + csi_sf_pattern_cfg_r10_c_ csi_sf_pattern_cfg_r10; + + // sequence methods + cqi_report_cfg_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v1130 ::= SEQUENCE +struct cqi_report_cfg_v1130_s { + // member variables + cqi_report_periodic_v1130_s cqi_report_periodic_v1130; + cqi_report_both_r11_s cqi_report_both_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v1250 ::= SEQUENCE +struct cqi_report_cfg_v1250_s { + struct csi_sf_pattern_cfg_r12_c_ { + struct setup_s_ { + // member variables + fixed_bitstring<10> csi_meas_sf_sets_r12; + }; + typedef setup_e types; + + // choice methods + csi_sf_pattern_cfg_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-SubframePatternConfig-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-SubframePatternConfig-r12"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct alt_cqi_table_r12_e_ { + enum options { all_sfs, csi_sf_set1, csi_sf_set2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_cqi_table_r12_e_() {} + alt_cqi_table_r12_e_(options v) : value(v) {} + alt_cqi_table_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_sf_pattern_cfg_r12_present; + bool cqi_report_both_v1250_present; + bool cqi_report_aperiodic_v1250_present; + bool alt_cqi_table_r12_present; + csi_sf_pattern_cfg_r12_c_ csi_sf_pattern_cfg_r12; + cqi_report_both_v1250_s cqi_report_both_v1250; + cqi_report_aperiodic_v1250_c cqi_report_aperiodic_v1250; + alt_cqi_table_r12_e_ alt_cqi_table_r12; + + // sequence methods + cqi_report_cfg_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v1310 ::= SEQUENCE +struct cqi_report_cfg_v1310_s { + // member variables + bool cqi_report_both_v1310_present; + bool cqi_report_aperiodic_v1310_present; + bool cqi_report_periodic_v1310_present; + cqi_report_both_v1310_s cqi_report_both_v1310; + cqi_report_aperiodic_v1310_c cqi_report_aperiodic_v1310; + cqi_report_periodic_v1310_s cqi_report_periodic_v1310; + + // sequence methods + cqi_report_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v1320 ::= SEQUENCE +struct cqi_report_cfg_v1320_s { + // member variables + bool cqi_report_periodic_v1320_present; + cqi_report_periodic_v1320_s cqi_report_periodic_v1320; + + // sequence methods + cqi_report_cfg_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v1430 ::= SEQUENCE +struct cqi_report_cfg_v1430_s { + // member variables + bool cqi_report_aperiodic_hybrid_r14_present; + cqi_report_aperiodic_hybrid_r14_s cqi_report_aperiodic_hybrid_r14; + + // sequence methods + cqi_report_cfg_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-r10 ::= SEQUENCE +struct csi_rs_cfg_r10_s { + struct csi_rs_r10_c_ { + struct setup_s_ { + struct ant_ports_count_r10_e_ { + enum options { an1, an2, an4, an8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ant_ports_count_r10_e_() {} + ant_ports_count_r10_e_(options v) : value(v) {} + ant_ports_count_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + ant_ports_count_r10_e_ ant_ports_count_r10; + uint8_t res_cfg_r10; + uint8_t sf_cfg_r10; + int8_t p_c_r10; + }; + typedef setup_e types; + + // choice methods + csi_rs_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-RS-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-RS-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool csi_rs_r10_present; + bool zero_tx_pwr_csi_rs_r10_present; + csi_rs_r10_c_ csi_rs_r10; + zero_tx_pwr_csi_rs_conf_r12_c zero_tx_pwr_csi_rs_r10; + + // sequence methods + csi_rs_cfg_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-v1250 ::= SEQUENCE +struct csi_rs_cfg_v1250_s { + struct ds_zero_tx_pwr_csi_rs_r12_c_ { + struct setup_s_ { + typedef dyn_array zero_tx_pwr_csi_rs_list_r12_l_; + + // member variables + zero_tx_pwr_csi_rs_list_r12_l_ zero_tx_pwr_csi_rs_list_r12; + }; + typedef setup_e types; + + // choice methods + ds_zero_tx_pwr_csi_rs_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "ds-ZeroTxPowerCSI-RS-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ds-ZeroTxPowerCSI-RS-r12"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool zero_tx_pwr_csi_rs2_r12_present; + bool ds_zero_tx_pwr_csi_rs_r12_present; + zero_tx_pwr_csi_rs_conf_r12_c zero_tx_pwr_csi_rs2_r12; + ds_zero_tx_pwr_csi_rs_r12_c_ ds_zero_tx_pwr_csi_rs_r12; + + // sequence methods + csi_rs_cfg_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-v1310 ::= SEQUENCE +struct csi_rs_cfg_v1310_s { + // member variables + bool e_mimo_type_r13_present; + csi_rs_cfg_emimo_r13_c e_mimo_type_r13; + + // sequence methods + csi_rs_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-v1430 ::= SEQUENCE +struct csi_rs_cfg_v1430_s { + // member variables + bool dummy_present; + bool e_mimo_hybrid_r14_present; + bool advanced_codebook_enabled_r14_present; + csi_rs_cfg_emimo_v1430_c dummy; + csi_rs_cfg_emimo_hybrid_r14_c e_mimo_hybrid_r14; + bool advanced_codebook_enabled_r14; + + // sequence methods + csi_rs_cfg_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigZP-r11 ::= SEQUENCE +struct csi_rs_cfg_zp_r11_s { + // member variables + bool ext; + uint8_t csi_rs_cfg_zp_id_r11; + fixed_bitstring<16> res_cfg_list_r11; + uint8_t sf_cfg_r11; + // ... + + // sequence methods + csi_rs_cfg_zp_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-AM-RLC ::= SEQUENCE +struct dl_am_rlc_s { + // member variables + t_reordering_e t_reordering; + t_status_prohibit_e t_status_prohibit; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-UM-RLC ::= SEQUENCE +struct dl_um_rlc_s { + // member variables + sn_field_len_e sn_field_len; + t_reordering_e t_reordering; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DeltaTxD-OffsetListSPUCCH-r15 ::= SEQUENCE +struct delta_tx_d_offset_list_spucch_r15_s { + struct delta_tx_d_offset_spucch_format1_r15_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_spucch_format1_r15_e_() {} + delta_tx_d_offset_spucch_format1_r15_e_(options v) : value(v) {} + delta_tx_d_offset_spucch_format1_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_tx_d_offset_spucch_format1a_r15_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_spucch_format1a_r15_e_() {} + delta_tx_d_offset_spucch_format1a_r15_e_(options v) : value(v) {} + delta_tx_d_offset_spucch_format1a_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_tx_d_offset_spucch_format1b_r15_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_spucch_format1b_r15_e_() {} + delta_tx_d_offset_spucch_format1b_r15_e_(options v) : value(v) {} + delta_tx_d_offset_spucch_format1b_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_tx_d_offset_spucch_format3_r15_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_spucch_format3_r15_e_() {} + delta_tx_d_offset_spucch_format3_r15_e_(options v) : value(v) {} + delta_tx_d_offset_spucch_format3_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + bool ext; + delta_tx_d_offset_spucch_format1_r15_e_ delta_tx_d_offset_spucch_format1_r15; + delta_tx_d_offset_spucch_format1a_r15_e_ delta_tx_d_offset_spucch_format1a_r15; + delta_tx_d_offset_spucch_format1b_r15_e_ delta_tx_d_offset_spucch_format1b_r15; + delta_tx_d_offset_spucch_format3_r15_e_ delta_tx_d_offset_spucch_format3_r15; + // ... + + // sequence methods + delta_tx_d_offset_list_spucch_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EPDCCH-SetConfig-r11 ::= SEQUENCE +struct epdcch_set_cfg_r11_s { + struct tx_type_r11_e_ { + enum options { localised, distributed }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_type_r11_e_() {} + tx_type_r11_e_(options v) : value(v) {} + tx_type_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct res_block_assign_r11_s_ { + struct num_prb_pairs_r11_e_ { + enum options { n2, n4, n8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + num_prb_pairs_r11_e_() {} + num_prb_pairs_r11_e_(options v) : value(v) {} + num_prb_pairs_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + num_prb_pairs_r11_e_ num_prb_pairs_r11; + dyn_bitstring res_block_assign_r11; + }; + struct csi_rs_cfg_zp_id2_r12_c_ { + typedef setup_e types; + + // choice methods + csi_rs_cfg_zp_id2_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-RS-ConfigZPId2-r12"); + return c; + } + const uint8_t& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-RS-ConfigZPId2-r12"); + return c; + } + + private: + types type_; + uint8_t c; + }; + struct num_prb_pairs_v1310_c_ { + typedef setup_e types; + + // choice methods + num_prb_pairs_v1310_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + + private: + types type_; + }; + struct mpdcch_cfg_r13_c_ { + struct setup_s_ { + struct csi_num_repeat_ce_r13_e_ { + enum options { sf1, sf2, sf4, sf8, sf16, sf32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_num_repeat_ce_r13_e_() {} + csi_num_repeat_ce_r13_e_(options v) : value(v) {} + csi_num_repeat_ce_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mpdcch_pdsch_hop_cfg_r13_e_ { + enum options { on, off }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_pdsch_hop_cfg_r13_e_() {} + mpdcch_pdsch_hop_cfg_r13_e_(options v) : value(v) {} + mpdcch_pdsch_hop_cfg_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct mpdcch_start_sf_uess_r13_c_ { + struct fdd_r13_e_ { + enum options { v1, v1dot5, v2, v2dot5, v4, v5, v8, v10 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fdd_r13_e_() {} + fdd_r13_e_(options v) : value(v) {} + fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct tdd_r13_e_ { + enum options { v1, v2, v4, v5, v8, v10, v20, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_r13_e_() {} + tdd_r13_e_(options v) : value(v) {} + tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { fdd_r13, tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mpdcch_start_sf_uess_r13_c_() : type_(types::nulltype) {} + mpdcch_start_sf_uess_r13_c_(const mpdcch_start_sf_uess_r13_c_& other); + mpdcch_start_sf_uess_r13_c_& operator=(const mpdcch_start_sf_uess_r13_c_& other); + ~mpdcch_start_sf_uess_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fdd_r13_e_& fdd_r13() + { + assert_choice_type("fdd-r13", type_.to_string(), "mpdcch-StartSF-UESS-r13"); + return c.get(); + } + tdd_r13_e_& tdd_r13() + { + assert_choice_type("tdd-r13", type_.to_string(), "mpdcch-StartSF-UESS-r13"); + return c.get(); + } + const fdd_r13_e_& fdd_r13() const + { + assert_choice_type("fdd-r13", type_.to_string(), "mpdcch-StartSF-UESS-r13"); + return c.get(); + } + const tdd_r13_e_& tdd_r13() const + { + assert_choice_type("tdd-r13", type_.to_string(), "mpdcch-StartSF-UESS-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct mpdcch_num_repeat_r13_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, r128, r256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_num_repeat_r13_e_() {} + mpdcch_num_repeat_r13_e_(options v) : value(v) {} + mpdcch_num_repeat_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + csi_num_repeat_ce_r13_e_ csi_num_repeat_ce_r13; + mpdcch_pdsch_hop_cfg_r13_e_ mpdcch_pdsch_hop_cfg_r13; + mpdcch_start_sf_uess_r13_c_ mpdcch_start_sf_uess_r13; + mpdcch_num_repeat_r13_e_ mpdcch_num_repeat_r13; + uint8_t mpdcch_nb_r13; + }; + typedef setup_e types; + + // choice methods + mpdcch_cfg_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "mpdcch-config-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "mpdcch-config-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool re_map_qcl_cfg_id_r11_present; + uint8_t set_cfg_id_r11; + tx_type_r11_e_ tx_type_r11; + res_block_assign_r11_s_ res_block_assign_r11; + uint16_t dmrs_scrambling_seq_int_r11; + uint16_t pucch_res_start_offset_r11; + uint8_t re_map_qcl_cfg_id_r11; + // ... + // group 0 + bool csi_rs_cfg_zp_id2_r12_present; + copy_ptr csi_rs_cfg_zp_id2_r12; + // group 1 + bool num_prb_pairs_v1310_present; + bool mpdcch_cfg_r13_present; + copy_ptr num_prb_pairs_v1310; + copy_ptr mpdcch_cfg_r13; + + // sequence methods + epdcch_set_cfg_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Enable256QAM-r14 ::= CHOICE +struct enable256_qam_r14_c { + struct setup_c_ { + struct tpc_sf_set_cfgured_r14_s_ { + // member variables + bool sf_set1_dci_format0_r14; + bool sf_set1_dci_format4_r14; + bool sf_set2_dci_format0_r14; + bool sf_set2_dci_format4_r14; + }; + struct tpc_sf_set_not_cfgured_r14_s_ { + // member variables + bool dci_format0_r14; + bool dci_format4_r14; + }; + struct types { + enum options { tpc_sf_set_cfgured_r14, tpc_sf_set_not_cfgured_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + tpc_sf_set_cfgured_r14_s_& tpc_sf_set_cfgured_r14() + { + assert_choice_type("tpc-SubframeSet-Configured-r14", type_.to_string(), "setup"); + return c.get(); + } + tpc_sf_set_not_cfgured_r14_s_& tpc_sf_set_not_cfgured_r14() + { + assert_choice_type("tpc-SubframeSet-NotConfigured-r14", type_.to_string(), "setup"); + return c.get(); + } + const tpc_sf_set_cfgured_r14_s_& tpc_sf_set_cfgured_r14() const + { + assert_choice_type("tpc-SubframeSet-Configured-r14", type_.to_string(), "setup"); + return c.get(); + } + const tpc_sf_set_not_cfgured_r14_s_& tpc_sf_set_not_cfgured_r14() const + { + assert_choice_type("tpc-SubframeSet-NotConfigured-r14", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + enable256_qam_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "Enable256QAM-r14"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "Enable256QAM-r14"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// LogicalChannelConfig ::= SEQUENCE +struct lc_ch_cfg_s { + struct ul_specific_params_s_ { + struct prioritised_bit_rate_e_ { + enum options { + kbps0, + kbps8, + kbps16, + kbps32, + kbps64, + kbps128, + kbps256, + infinity, + kbps512_v1020, + kbps1024_v1020, + kbps2048_v1020, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + prioritised_bit_rate_e_() {} + prioritised_bit_rate_e_(options v) : value(v) {} + prioritised_bit_rate_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; + }; + struct bucket_size_dur_e_ { + enum options { ms50, ms100, ms150, ms300, ms500, ms1000, spare2, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + bucket_size_dur_e_() {} + bucket_size_dur_e_(options v) : value(v) {} + bucket_size_dur_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool lc_ch_group_present; + uint8_t prio; + prioritised_bit_rate_e_ prioritised_bit_rate; + bucket_size_dur_e_ bucket_size_dur; + uint8_t lc_ch_group; + + // sequence methods + ul_specific_params_s_(); + }; + struct bit_rate_query_prohibit_timer_r14_e_ { + enum options { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + bit_rate_query_prohibit_timer_r14_e_() {} + bit_rate_query_prohibit_timer_r14_e_(options v) : value(v) {} + bit_rate_query_prohibit_timer_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct allowed_tti_lens_r15_c_ { + struct setup_s_ { + // member variables + bool short_tti_r15; + bool sf_tti_r15; + }; + typedef setup_e types; + + // choice methods + allowed_tti_lens_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "allowedTTI-Lengths-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "allowedTTI-Lengths-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct lc_ch_sr_restrict_r15_c_ { + struct setup_e_ { + enum options { spucch, pucch }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + typedef setup_e types; + + // choice methods + lc_ch_sr_restrict_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "logicalChannelSR-Restriction-r15"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "logicalChannelSR-Restriction-r15"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + struct chl_access_prio_r15_c_ { + typedef setup_e types; + + // choice methods + chl_access_prio_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& setup() + { + assert_choice_type("setup", type_.to_string(), "channellAccessPriority-r15"); + return c; + } + const uint8_t& setup() const + { + assert_choice_type("setup", type_.to_string(), "channellAccessPriority-r15"); + return c; + } + + private: + types type_; + uint8_t c; + }; + + // member variables + bool ext; + bool ul_specific_params_present; + ul_specific_params_s_ ul_specific_params; + // ... + // group 0 + bool lc_ch_sr_mask_r9_present; + // group 1 + bool lc_ch_sr_prohibit_r12_present; + bool lc_ch_sr_prohibit_r12; + // group 2 + bool laa_ul_allowed_r14_present; + bool bit_rate_query_prohibit_timer_r14_present; + bool laa_ul_allowed_r14; + bit_rate_query_prohibit_timer_r14_e_ bit_rate_query_prohibit_timer_r14; + // group 3 + bool allowed_tti_lens_r15_present; + bool lc_ch_sr_restrict_r15_present; + bool chl_access_prio_r15_present; + bool lch_cell_restrict_r15_present; + copy_ptr allowed_tti_lens_r15; + copy_ptr lc_ch_sr_restrict_r15; + copy_ptr chl_access_prio_r15; + fixed_bitstring<32> lch_cell_restrict_r15; + + // sequence methods + lc_ch_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// P-a ::= ENUMERATED +struct p_a_e { + enum options { db_minus6, db_minus4dot77, db_minus3, db_minus1dot77, db0, db1, db2, db3 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + p_a_e() {} + p_a_e(options v) : value(v) {} + p_a_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; + +// PDSCH-RE-MappingQCL-Config-r11 ::= SEQUENCE +struct pdsch_re_map_qcl_cfg_r11_s { + struct optional_set_of_fields_r11_s_ { + struct crs_ports_count_r11_e_ { + enum options { n1, n2, n4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + crs_ports_count_r11_e_() {} + crs_ports_count_r11_e_(options v) : value(v) {} + crs_ports_count_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mbsfn_sf_cfg_list_r11_c_ { + struct setup_s_ { + // member variables + mbsfn_sf_cfg_list_l sf_cfg_list; + }; + typedef setup_e types; + + // choice methods + mbsfn_sf_cfg_list_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct pdsch_start_r11_e_ { + enum options { reserved, n1, n2, n3, n4, assigned }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdsch_start_r11_e_() {} + pdsch_start_r11_e_(options v) : value(v) {} + pdsch_start_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool mbsfn_sf_cfg_list_r11_present; + crs_ports_count_r11_e_ crs_ports_count_r11; + uint8_t crs_freq_shift_r11; + mbsfn_sf_cfg_list_r11_c_ mbsfn_sf_cfg_list_r11; + pdsch_start_r11_e_ pdsch_start_r11; + + // sequence methods + optional_set_of_fields_r11_s_(); + }; + struct mbsfn_sf_cfg_list_v1430_c_ { + struct setup_s_ { + // member variables + mbsfn_sf_cfg_list_v1430_l sf_cfg_list_v1430; + }; + typedef setup_e types; + + // choice methods + mbsfn_sf_cfg_list_v1430_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-v1430"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-v1430"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct codeword_one_cfg_v1530_c_ { + struct setup_s_ { + struct crs_ports_count_v1530_e_ { + enum options { n1, n2, n4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + crs_ports_count_v1530_e_() {} + crs_ports_count_v1530_e_(options v) : value(v) {} + crs_ports_count_v1530_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pdsch_start_v1530_e_ { + enum options { reserved, n1, n2, n3, n4, assigned }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdsch_start_v1530_e_() {} + pdsch_start_v1530_e_(options v) : value(v) {} + pdsch_start_v1530_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool mbsfn_sf_cfg_list_v1530_present; + bool mbsfn_sf_cfg_list_ext_v1530_present; + bool qcl_csi_rs_cfg_nzp_id_v1530_present; + crs_ports_count_v1530_e_ crs_ports_count_v1530; + uint8_t crs_freq_shift_v1530; + mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list_v1530; + mbsfn_sf_cfg_list_v1430_l mbsfn_sf_cfg_list_ext_v1530; + pdsch_start_v1530_e_ pdsch_start_v1530; + uint8_t csi_rs_cfg_zp_id_v1530; + uint8_t qcl_csi_rs_cfg_nzp_id_v1530; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + codeword_one_cfg_v1530_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "codewordOneConfig-v1530"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "codewordOneConfig-v1530"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool optional_set_of_fields_r11_present; + bool qcl_csi_rs_cfg_nzp_id_r11_present; + uint8_t pdsch_re_map_qcl_cfg_id_r11; + optional_set_of_fields_r11_s_ optional_set_of_fields_r11; + uint8_t csi_rs_cfg_zp_id_r11; + uint8_t qcl_csi_rs_cfg_nzp_id_r11; + // ... + // group 0 + bool mbsfn_sf_cfg_list_v1430_present; + copy_ptr mbsfn_sf_cfg_list_v1430; + // group 1 + bool codeword_one_cfg_v1530_present; + copy_ptr codeword_one_cfg_v1530; + + // sequence methods + pdsch_re_map_qcl_cfg_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PollPDU-v1310 ::= ENUMERATED +struct poll_pdu_v1310_e { + enum options { p512, p1024, p2048, p4096, p6144, p8192, p12288, p16384 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + poll_pdu_v1310_e() {} + poll_pdu_v1310_e(options v) : value(v) {} + poll_pdu_v1310_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// RLC-Config-r15 ::= SEQUENCE +struct rlc_cfg_r15_s { + struct mode_r15_c_ { + struct am_r15_s_ { + // member variables + ul_am_rlc_r15_s ul_am_rlc_r15; + dl_am_rlc_r15_s dl_am_rlc_r15; + }; + struct um_bi_dir_r15_s_ { + // member variables + ul_um_rlc_s ul_um_rlc_r15; + dl_um_rlc_r15_s dl_um_rlc_r15; + }; + struct um_uni_dir_ul_r15_s_ { + // member variables + ul_um_rlc_s ul_um_rlc_r15; + }; + struct um_uni_dir_dl_r15_s_ { + // member variables + dl_um_rlc_r15_s dl_um_rlc_r15; + }; + struct types { + enum options { am_r15, um_bi_dir_r15, um_uni_dir_ul_r15, um_uni_dir_dl_r15, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mode_r15_c_() : type_(types::nulltype) {} + mode_r15_c_(const mode_r15_c_& other); + mode_r15_c_& operator=(const mode_r15_c_& other); + ~mode_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + am_r15_s_& am_r15() + { + assert_choice_type("am-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + um_bi_dir_r15_s_& um_bi_dir_r15() + { + assert_choice_type("um-Bi-Directional-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + um_uni_dir_ul_r15_s_& um_uni_dir_ul_r15() + { + assert_choice_type("um-Uni-Directional-UL-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + um_uni_dir_dl_r15_s_& um_uni_dir_dl_r15() + { + assert_choice_type("um-Uni-Directional-DL-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + const am_r15_s_& am_r15() const + { + assert_choice_type("am-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + const um_bi_dir_r15_s_& um_bi_dir_r15() const + { + assert_choice_type("um-Bi-Directional-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + const um_uni_dir_ul_r15_s_& um_uni_dir_ul_r15() const + { + assert_choice_type("um-Uni-Directional-UL-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + const um_uni_dir_dl_r15_s_& um_uni_dir_dl_r15() const + { + assert_choice_type("um-Uni-Directional-DL-r15", type_.to_string(), "mode-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + bool ext; + bool reestablish_rlc_r15_present; + bool rlc_out_of_order_delivery_r15_present; + mode_r15_c_ mode_r15; + // ... + + // sequence methods + rlc_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPDCCH-Set-r15 ::= SEQUENCE (SIZE (1..4)) OF SPDCCH-Elements-r15 +typedef dyn_array spdcch_set_r15_l; + +// SPUCCH-Set-r15 ::= SEQUENCE (SIZE (1..4)) OF SPUCCH-Elements-r15 +typedef dyn_array spucch_set_r15_l; + +// SR-SubslotSPUCCH-ResourceList-r15 ::= SEQUENCE (SIZE(1..4)) OF INTEGER +typedef bounded_array sr_subslot_spucch_res_list_r15_l; + +// SRS-AntennaPort ::= ENUMERATED +struct srs_ant_port_e { + enum options { an1, an2, an4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_ant_port_e() {} + srs_ant_port_e(options v) : value(v) {} + srs_ant_port_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// ShortTTI-Length-r15 ::= ENUMERATED +struct short_tti_len_r15_e { + enum options { slot, subslot }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + short_tti_len_r15_e() {} + short_tti_len_r15_e(options v) : value(v) {} + short_tti_len_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// TPC-PDCCH-Config ::= CHOICE +struct tpc_pdcch_cfg_c { + struct setup_s_ { + // member variables + fixed_bitstring<16> tpc_rnti; + tpc_idx_c tpc_idx; + }; + typedef setup_e types; + + // choice methods + tpc_pdcch_cfg_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "TPC-PDCCH-Config"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "TPC-PDCCH-Config"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// UL-AM-RLC ::= SEQUENCE +struct ul_am_rlc_s { + struct max_retx_thres_e_ { + enum options { t1, t2, t3, t4, t6, t8, t16, t32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_retx_thres_e_() {} + max_retx_thres_e_(options v) : value(v) {} + max_retx_thres_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + t_poll_retx_e t_poll_retx; + poll_pdu_e poll_pdu; + poll_byte_e poll_byte; + max_retx_thres_e_ max_retx_thres; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicatedSTTI-r15 ::= CHOICE +struct ant_info_ded_stti_r15_c { + struct setup_s_ { + struct tx_mode_dl_mbsfn_r15_e_ { + enum options { tm9, tm10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_dl_mbsfn_r15_e_() {} + tx_mode_dl_mbsfn_r15_e_(options v) : value(v) {} + tx_mode_dl_mbsfn_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct tx_mode_dl_non_mbsfn_r15_e_ { + enum options { tm1, tm2, tm3, tm4, tm6, tm8, tm9, tm10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_dl_non_mbsfn_r15_e_() {} + tx_mode_dl_non_mbsfn_r15_e_(options v) : value(v) {} + tx_mode_dl_non_mbsfn_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_subset_restrict_c_ { + struct types { + enum options { + n2_tx_ant_tm3_r15, + n4_tx_ant_tm3_r15, + n2_tx_ant_tm4_r15, + n4_tx_ant_tm4_r15, + n2_tx_ant_tm5_r15, + n4_tx_ant_tm5_r15, + n2_tx_ant_tm6_r15, + n4_tx_ant_tm6_r15, + n2_tx_ant_tm8_r15, + n4_tx_ant_tm8_r15, + n2_tx_ant_tm9and10_r15, + n4_tx_ant_tm9and10_r15, + n8_tx_ant_tm9and10_r15, + nulltype + }; + + options value; + static const uint32_t nof_types = 13, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + codebook_subset_restrict_c_() : type_(types::nulltype) {} + codebook_subset_restrict_c_(const codebook_subset_restrict_c_& other); + codebook_subset_restrict_c_& operator=(const codebook_subset_restrict_c_& other); + ~codebook_subset_restrict_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<2>& n2_tx_ant_tm3_r15() + { + assert_choice_type("n2TxAntenna-tm3-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<4>& n4_tx_ant_tm3_r15() + { + assert_choice_type("n4TxAntenna-tm3-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<6>& n2_tx_ant_tm4_r15() + { + assert_choice_type("n2TxAntenna-tm4-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<64>& n4_tx_ant_tm4_r15() + { + assert_choice_type("n4TxAntenna-tm4-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<4>& n2_tx_ant_tm5_r15() + { + assert_choice_type("n2TxAntenna-tm5-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<16>& n4_tx_ant_tm5_r15() + { + assert_choice_type("n4TxAntenna-tm5-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<4>& n2_tx_ant_tm6_r15() + { + assert_choice_type("n2TxAntenna-tm6-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<16>& n4_tx_ant_tm6_r15() + { + assert_choice_type("n4TxAntenna-tm6-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<6>& n2_tx_ant_tm8_r15() + { + assert_choice_type("n2TxAntenna-tm8-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<64>& n4_tx_ant_tm8_r15() + { + assert_choice_type("n4TxAntenna-tm8-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<6>& n2_tx_ant_tm9and10_r15() + { + assert_choice_type("n2TxAntenna-tm9and10-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<96>& n4_tx_ant_tm9and10_r15() + { + assert_choice_type("n4TxAntenna-tm9and10-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<109>& n8_tx_ant_tm9and10_r15() + { + assert_choice_type("n8TxAntenna-tm9and10-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<2>& n2_tx_ant_tm3_r15() const + { + assert_choice_type("n2TxAntenna-tm3-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<4>& n4_tx_ant_tm3_r15() const + { + assert_choice_type("n4TxAntenna-tm3-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<6>& n2_tx_ant_tm4_r15() const + { + assert_choice_type("n2TxAntenna-tm4-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<64>& n4_tx_ant_tm4_r15() const + { + assert_choice_type("n4TxAntenna-tm4-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<4>& n2_tx_ant_tm5_r15() const + { + assert_choice_type("n2TxAntenna-tm5-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<16>& n4_tx_ant_tm5_r15() const + { + assert_choice_type("n4TxAntenna-tm5-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<4>& n2_tx_ant_tm6_r15() const + { + assert_choice_type("n2TxAntenna-tm6-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<16>& n4_tx_ant_tm6_r15() const + { + assert_choice_type("n4TxAntenna-tm6-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<6>& n2_tx_ant_tm8_r15() const + { + assert_choice_type("n2TxAntenna-tm8-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<64>& n4_tx_ant_tm8_r15() const + { + assert_choice_type("n4TxAntenna-tm8-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<6>& n2_tx_ant_tm9and10_r15() const + { + assert_choice_type("n2TxAntenna-tm9and10-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<96>& n4_tx_ant_tm9and10_r15() const + { + assert_choice_type("n4TxAntenna-tm9and10-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<109>& n8_tx_ant_tm9and10_r15() const + { + assert_choice_type("n8TxAntenna-tm9and10-r15", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct max_layers_mimo_stti_r15_e_ { + enum options { two_layers, four_layers }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_layers_mimo_stti_r15_e_() {} + max_layers_mimo_stti_r15_e_(options v) : value(v) {} + max_layers_mimo_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool tx_mode_dl_mbsfn_r15_present; + bool tx_mode_dl_non_mbsfn_r15_present; + bool codebook_subset_restrict_present; + bool max_layers_mimo_stti_r15_present; + tx_mode_dl_mbsfn_r15_e_ tx_mode_dl_mbsfn_r15; + tx_mode_dl_non_mbsfn_r15_e_ tx_mode_dl_non_mbsfn_r15; + codebook_subset_restrict_c_ codebook_subset_restrict; + max_layers_mimo_stti_r15_e_ max_layers_mimo_stti_r15; + bool slot_subslot_pdsch_tx_div_minus2_layer_r15; + bool slot_subslot_pdsch_tx_div_minus4_layer_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + ant_info_ded_stti_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "AntennaInfoDedicatedSTTI-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "AntennaInfoDedicatedSTTI-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// AntennaInfoUL-STTI-r15 ::= SEQUENCE +struct ant_info_ul_stti_r15_s { + struct tx_mode_ul_stti_r15_e_ { + enum options { tm1, tm2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_ul_stti_r15_e_() {} + tx_mode_ul_stti_r15_e_(options v) : value(v) {} + tx_mode_ul_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool tx_mode_ul_stti_r15_present; + tx_mode_ul_stti_r15_e_ tx_mode_ul_stti_r15; + + // sequence methods + ant_info_ul_stti_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-r15 ::= CHOICE +struct cqi_report_cfg_r15_c { + struct setup_s_ { + struct alt_cqi_table_minus1024_qam_r15_e_ { + enum options { all_sfs, csi_sf_set1, csi_sf_set2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_cqi_table_minus1024_qam_r15_e_() {} + alt_cqi_table_minus1024_qam_r15_e_(options v) : value(v) {} + alt_cqi_table_minus1024_qam_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool cqi_report_cfg_r10_present; + bool cqi_report_cfg_v1130_present; + bool cqi_report_cfg_pcell_v1250_present; + bool cqi_report_cfg_v1310_present; + bool cqi_report_cfg_v1320_present; + bool cqi_report_cfg_v1430_present; + bool alt_cqi_table_minus1024_qam_r15_present; + cqi_report_cfg_r10_s cqi_report_cfg_r10; + cqi_report_cfg_v1130_s cqi_report_cfg_v1130; + cqi_report_cfg_v1250_s cqi_report_cfg_pcell_v1250; + cqi_report_cfg_v1310_s cqi_report_cfg_v1310; + cqi_report_cfg_v1320_s cqi_report_cfg_v1320; + cqi_report_cfg_v1430_s cqi_report_cfg_v1430; + alt_cqi_table_minus1024_qam_r15_e_ alt_cqi_table_minus1024_qam_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_report_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportConfig-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportConfig-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportPeriodic ::= CHOICE +struct cqi_report_periodic_c { + struct setup_s_ { + struct cqi_format_ind_periodic_c_ { + struct subband_cqi_s_ { + // member variables + uint8_t k; + }; + struct types { + enum options { wideband_cqi, subband_cqi, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cqi_format_ind_periodic_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + subband_cqi_s_& subband_cqi() + { + assert_choice_type("subbandCQI", type_.to_string(), "cqi-FormatIndicatorPeriodic"); + return c; + } + const subband_cqi_s_& subband_cqi() const + { + assert_choice_type("subbandCQI", type_.to_string(), "cqi-FormatIndicatorPeriodic"); + return c; + } + + private: + types type_; + subband_cqi_s_ c; + }; + + // member variables + bool ri_cfg_idx_present; + uint16_t cqi_pucch_res_idx; + uint16_t cqi_pmi_cfg_idx; + cqi_format_ind_periodic_c_ cqi_format_ind_periodic; + uint16_t ri_cfg_idx; + bool simul_ack_nack_and_cqi; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_report_periodic_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportPeriodic"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportPeriodic"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CRS-AssistanceInfo-r11 ::= SEQUENCE +struct crs_assist_info_r11_s { + struct ant_ports_count_r11_e_ { + enum options { an1, an2, an4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ant_ports_count_r11_e_() {} + ant_ports_count_r11_e_(options v) : value(v) {} + ant_ports_count_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + uint16_t pci_r11; + ant_ports_count_r11_e_ ant_ports_count_r11; + mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list_r11; + // ... + // group 0 + bool mbsfn_sf_cfg_list_v1430_present; + copy_ptr mbsfn_sf_cfg_list_v1430; + + // sequence methods + crs_assist_info_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CRS-AssistanceInfo-r13 ::= SEQUENCE +struct crs_assist_info_r13_s { + struct ant_ports_count_r13_e_ { + enum options { an1, an2, an4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ant_ports_count_r13_e_() {} + ant_ports_count_r13_e_(options v) : value(v) {} + ant_ports_count_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool mbsfn_sf_cfg_list_r13_present; + uint16_t pci_r13; + ant_ports_count_r13_e_ ant_ports_count_r13; + mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list_r13; + // ... + // group 0 + bool mbsfn_sf_cfg_list_v1430_present; + copy_ptr mbsfn_sf_cfg_list_v1430; + + // sequence methods + crs_assist_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CRS-AssistanceInfo-r15 ::= SEQUENCE +struct crs_assist_info_r15_s { + // member variables + bool crs_intf_mitig_enabled_minus15_present; + uint16_t pci_r15; + + // sequence methods + crs_assist_info_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-r15 ::= CHOICE +struct csi_rs_cfg_r15_c { + struct setup_s_ { + // member variables + bool csi_rs_cfg_r10_present; + bool csi_rs_cfg_v1250_present; + bool csi_rs_cfg_v1310_present; + bool csi_rs_cfg_v1430_present; + csi_rs_cfg_r10_s csi_rs_cfg_r10; + csi_rs_cfg_v1250_s csi_rs_cfg_v1250; + csi_rs_cfg_v1310_s csi_rs_cfg_v1310; + csi_rs_cfg_v1430_s csi_rs_cfg_v1430; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + csi_rs_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-Config-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CSI-RS-ConfigNZPToAddModList-r15 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r13)) OF CSI-RS-ConfigNZP-r11 +typedef dyn_array csi_rs_cfg_nzp_to_add_mod_list_r15_l; + +// CSI-RS-ConfigNZPToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r13)) OF INTEGER +typedef bounded_array csi_rs_cfg_nzp_to_release_list_r15_l; + +// CSI-RS-ConfigZP-ApList-r14 ::= CHOICE +struct csi_rs_cfg_zp_ap_list_r14_c { + typedef dyn_array setup_l_; + typedef setup_e types; + + // choice methods + csi_rs_cfg_zp_ap_list_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_l_& setup() + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigZP-ApList-r14"); + return c; + } + const setup_l_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CSI-RS-ConfigZP-ApList-r14"); + return c; + } + +private: + types type_; + setup_l_ c; +}; + +// CSI-RS-ConfigZPToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-ZP-r11)) OF CSI-RS-ConfigZP-r11 +typedef dyn_array csi_rs_cfg_zp_to_add_mod_list_r11_l; + +// CSI-RS-ConfigZPToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-ZP-r11)) OF INTEGER +typedef bounded_array csi_rs_cfg_zp_to_release_list_r11_l; + +// DMRS-Config-r11 ::= CHOICE +struct dmrs_cfg_r11_c { + struct setup_s_ { + // member variables + uint16_t scrambling_id_r11; + uint16_t scrambling_id2_r11; + }; + typedef setup_e types; + + // choice methods + dmrs_cfg_r11_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "DMRS-Config-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "DMRS-Config-r11"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// DMRS-Config-v1310 ::= SEQUENCE +struct dmrs_cfg_v1310_s { + // member variables + bool dmrs_table_alt_r13_present; + + // sequence methods + dmrs_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DeltaTxD-OffsetListPUCCH-r10 ::= SEQUENCE +struct delta_tx_d_offset_list_pucch_r10_s { + struct delta_tx_d_offset_pucch_format1_r10_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_pucch_format1_r10_e_() {} + delta_tx_d_offset_pucch_format1_r10_e_(options v) : value(v) {} + delta_tx_d_offset_pucch_format1_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_tx_d_offset_pucch_format1a1b_r10_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_pucch_format1a1b_r10_e_() {} + delta_tx_d_offset_pucch_format1a1b_r10_e_(options v) : value(v) {} + delta_tx_d_offset_pucch_format1a1b_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_tx_d_offset_pucch_format22a2b_r10_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_pucch_format22a2b_r10_e_() {} + delta_tx_d_offset_pucch_format22a2b_r10_e_(options v) : value(v) {} + delta_tx_d_offset_pucch_format22a2b_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_tx_d_offset_pucch_format3_r10_e_ { + enum options { db0, db_minus2 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_pucch_format3_r10_e_() {} + delta_tx_d_offset_pucch_format3_r10_e_(options v) : value(v) {} + delta_tx_d_offset_pucch_format3_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + bool ext; + delta_tx_d_offset_pucch_format1_r10_e_ delta_tx_d_offset_pucch_format1_r10; + delta_tx_d_offset_pucch_format1a1b_r10_e_ delta_tx_d_offset_pucch_format1a1b_r10; + delta_tx_d_offset_pucch_format22a2b_r10_e_ delta_tx_d_offset_pucch_format22a2b_r10; + delta_tx_d_offset_pucch_format3_r10_e_ delta_tx_d_offset_pucch_format3_r10; + // ... + + // sequence methods + delta_tx_d_offset_list_pucch_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DeltaTxD-OffsetListPUCCH-v1130 ::= SEQUENCE +struct delta_tx_d_offset_list_pucch_v1130_s { + struct delta_tx_d_offset_pucch_format1b_cs_r11_e_ { + enum options { db0, db_minus1 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_tx_d_offset_pucch_format1b_cs_r11_e_() {} + delta_tx_d_offset_pucch_format1b_cs_r11_e_(options v) : value(v) {} + delta_tx_d_offset_pucch_format1b_cs_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + delta_tx_d_offset_pucch_format1b_cs_r11_e_ delta_tx_d_offset_pucch_format1b_cs_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EIMTA-MainConfig-r12 ::= CHOICE +struct eimta_main_cfg_r12_c { + struct setup_s_ { + struct eimta_cmd_periodicity_r12_e_ { + enum options { sf10, sf20, sf40, sf80 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + eimta_cmd_periodicity_r12_e_() {} + eimta_cmd_periodicity_r12_e_(options v) : value(v) {} + eimta_cmd_periodicity_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + fixed_bitstring<16> eimta_rnti_r12; + eimta_cmd_periodicity_r12_e_ eimta_cmd_periodicity_r12; + fixed_bitstring<10> eimta_cmd_sf_set_r12; + }; + typedef setup_e types; + + // choice methods + eimta_main_cfg_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "EIMTA-MainConfig-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "EIMTA-MainConfig-r12"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// EIMTA-MainConfigServCell-r12 ::= CHOICE +struct eimta_main_cfg_serv_cell_r12_c { + struct setup_s_ { + struct eimta_harq_ref_cfg_r12_e_ { + enum options { sa2, sa4, sa5 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + eimta_harq_ref_cfg_r12_e_() {} + eimta_harq_ref_cfg_r12_e_(options v) : value(v) {} + eimta_harq_ref_cfg_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mbsfn_sf_cfg_list_v1250_c_ { + struct setup_s_ { + // member variables + mbsfn_sf_cfg_list_l sf_cfg_list_r12; + }; + typedef setup_e types; + + // choice methods + mbsfn_sf_cfg_list_v1250_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-v1250"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "mbsfn-SubframeConfigList-v1250"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + uint8_t eimta_ul_dl_cfg_idx_r12; + eimta_harq_ref_cfg_r12_e_ eimta_harq_ref_cfg_r12; + mbsfn_sf_cfg_list_v1250_c_ mbsfn_sf_cfg_list_v1250; + }; + typedef setup_e types; + + // choice methods + eimta_main_cfg_serv_cell_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "EIMTA-MainConfigServCell-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "EIMTA-MainConfigServCell-r12"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// EPDCCH-SetConfigToAddModList-r11 ::= SEQUENCE (SIZE(1..maxEPDCCH-Set-r11)) OF EPDCCH-SetConfig-r11 +typedef dyn_array epdcch_set_cfg_to_add_mod_list_r11_l; + +// EPDCCH-SetConfigToReleaseList-r11 ::= SEQUENCE (SIZE(1..maxEPDCCH-Set-r11)) OF INTEGER +typedef bounded_array epdcch_set_cfg_to_release_list_r11_l; + +// Format4-resource-r13 ::= SEQUENCE +struct format4_res_r13_s { + // member variables + uint8_t start_prb_format4_r13; + uint8_t nof_prb_format4_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Format5-resource-r13 ::= SEQUENCE +struct format5_res_r13_s { + // member variables + uint8_t start_prb_format5_r13; + uint8_t cdm_idx_format5_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// N1PUCCH-AN-CS-r10 ::= SEQUENCE (SIZE (1..4)) OF INTEGER +typedef bounded_array n1_pucch_an_cs_r10_l; + +// N1PUCCH-AN-PersistentList ::= SEQUENCE (SIZE (1..4)) OF INTEGER +typedef bounded_array n1_pucch_an_persistent_list_l; + +// NeighCellsInfo-r12 ::= SEQUENCE +struct neigh_cells_info_r12_s { + struct crs_ports_count_r12_e_ { + enum options { n1, n2, n4, spare }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + crs_ports_count_r12_e_() {} + crs_ports_count_r12_e_(options v) : value(v) {} + crs_ports_count_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef bounded_array p_a_list_r12_l_; + + // member variables + bool ext; + bool mbsfn_sf_cfg_r12_present; + uint16_t pci_r12; + uint8_t p_b_r12; + crs_ports_count_r12_e_ crs_ports_count_r12; + mbsfn_sf_cfg_list_l mbsfn_sf_cfg_r12; + p_a_list_r12_l_ p_a_list_r12; + fixed_bitstring<8> tx_mode_list_r12; + uint8_t res_alloc_granularity_r12; + // ... + + // sequence methods + neigh_cells_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCCH-CandidateReductionValue-r13 ::= ENUMERATED +struct pdcch_candidate_reduction_value_r13_e { + enum options { n0, n33, n66, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdcch_candidate_reduction_value_r13_e() {} + pdcch_candidate_reduction_value_r13_e(options v) : value(v) {} + pdcch_candidate_reduction_value_r13_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// PDCP-Config ::= SEQUENCE +struct pdcp_cfg_s { + struct discard_timer_e_ { + enum options { ms50, ms100, ms150, ms300, ms500, ms750, ms1500, infinity }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + discard_timer_e_() {} + discard_timer_e_(options v) : value(v) {} + discard_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; + }; + struct rlc_am_s_ { + // member variables + bool status_report_required; + }; + struct rlc_um_s_ { + struct pdcp_sn_size_e_ { + enum options { len7bits, len12bits }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdcp_sn_size_e_() {} + pdcp_sn_size_e_(options v) : value(v) {} + pdcp_sn_size_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + pdcp_sn_size_e_ pdcp_sn_size; + }; + struct hdr_compress_c_ { + struct rohc_s_ { + struct profiles_s_ { + // member variables + bool profile0x0001; + bool profile0x0002; + bool profile0x0003; + bool profile0x0004; + bool profile0x0006; + bool profile0x0101; + bool profile0x0102; + bool profile0x0103; + bool profile0x0104; + }; + + // member variables + bool ext; + bool max_cid_present; + uint16_t max_cid; + profiles_s_ profiles; + // ... + + // sequence methods + rohc_s_(); + }; + struct types { + enum options { not_used, rohc, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + hdr_compress_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rohc_s_& rohc() + { + assert_choice_type("rohc", type_.to_string(), "headerCompression"); + return c; + } + const rohc_s_& rohc() const + { + assert_choice_type("rohc", type_.to_string(), "headerCompression"); + return c; + } + + private: + types type_; + rohc_s_ c; + }; + struct t_reordering_r12_e_ { + enum options { + ms0, + ms20, + ms40, + ms60, + ms80, + ms100, + ms120, + ms140, + ms160, + ms180, + ms200, + ms220, + ms240, + ms260, + ms280, + ms300, + ms500, + ms750, + spare14, + spare13, + spare12, + spare11, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t_reordering_r12_e_() {} + t_reordering_r12_e_(options v) : value(v) {} + t_reordering_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct ul_data_split_thres_r13_c_ { + struct setup_e_ { + enum options { + b0, + b100, + b200, + b400, + b800, + b1600, + b3200, + b6400, + b12800, + b25600, + b51200, + b102400, + b204800, + b409600, + b819200, + spare1 + }; + typedef uint32_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint32_t to_number() const; + }; + typedef setup_e types; + + // choice methods + ul_data_split_thres_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "ul-DataSplitThreshold-r13"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ul-DataSplitThreshold-r13"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + struct status_feedback_r13_c_ { + struct setup_s_ { + struct status_pdu_type_for_polling_r13_e_ { + enum options { type1, type2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + status_pdu_type_for_polling_r13_e_() {} + status_pdu_type_for_polling_r13_e_(options v) : value(v) {} + status_pdu_type_for_polling_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct status_pdu_periodicity_type1_r13_e_ { + enum options { + ms5, + ms10, + ms20, + ms30, + ms40, + ms50, + ms60, + ms70, + ms80, + ms90, + ms100, + ms150, + ms200, + ms300, + ms500, + ms1000, + ms2000, + ms5000, + ms10000, + ms20000, + ms50000 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 21, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + status_pdu_periodicity_type1_r13_e_() {} + status_pdu_periodicity_type1_r13_e_(options v) : value(v) {} + status_pdu_periodicity_type1_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct status_pdu_periodicity_type2_r13_e_ { + enum options { + ms5, + ms10, + ms20, + ms30, + ms40, + ms50, + ms60, + ms70, + ms80, + ms90, + ms100, + ms150, + ms200, + ms300, + ms500, + ms1000, + ms2000, + ms5000, + ms10000, + ms20000, + ms50000 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 21, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + status_pdu_periodicity_type2_r13_e_() {} + status_pdu_periodicity_type2_r13_e_(options v) : value(v) {} + status_pdu_periodicity_type2_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct status_pdu_periodicity_offset_r13_e_ { + enum options { ms1, ms2, ms5, ms10, ms25, ms50, ms100, ms250, ms500, ms2500, ms5000, ms25000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 12, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + status_pdu_periodicity_offset_r13_e_() {} + status_pdu_periodicity_offset_r13_e_(options v) : value(v) {} + status_pdu_periodicity_offset_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool status_pdu_type_for_polling_r13_present; + bool status_pdu_periodicity_type1_r13_present; + bool status_pdu_periodicity_type2_r13_present; + bool status_pdu_periodicity_offset_r13_present; + status_pdu_type_for_polling_r13_e_ status_pdu_type_for_polling_r13; + status_pdu_periodicity_type1_r13_e_ status_pdu_periodicity_type1_r13; + status_pdu_periodicity_type2_r13_e_ status_pdu_periodicity_type2_r13; + status_pdu_periodicity_offset_r13_e_ status_pdu_periodicity_offset_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + status_feedback_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "statusFeedback-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "statusFeedback-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct ul_lwa_cfg_r14_c_ { + struct setup_s_ { + struct ul_lwa_data_split_thres_r14_e_ { + enum options { + b0, + b100, + b200, + b400, + b800, + b1600, + b3200, + b6400, + b12800, + b25600, + b51200, + b102400, + b204800, + b409600, + b819200 + }; + typedef uint32_t number_type; + + options value; + static const uint32_t nof_types = 15, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_lwa_data_split_thres_r14_e_() {} + ul_lwa_data_split_thres_r14_e_(options v) : value(v) {} + ul_lwa_data_split_thres_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint32_t to_number() const; + }; + + // member variables + bool ul_lwa_data_split_thres_r14_present; + bool ul_lwa_drb_via_wlan_r14; + ul_lwa_data_split_thres_r14_e_ ul_lwa_data_split_thres_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + ul_lwa_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "ul-LWA-Config-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ul-LWA-Config-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct ul_only_hdr_compress_r14_c_ { + struct rohc_r14_s_ { + struct profiles_r14_s_ { + // member variables + bool profile0x0006_r14; + }; + + // member variables + bool ext; + bool max_cid_r14_present; + uint16_t max_cid_r14; + profiles_r14_s_ profiles_r14; + // ... + + // sequence methods + rohc_r14_s_(); + }; + struct types { + enum options { not_used_r14, rohc_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ul_only_hdr_compress_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rohc_r14_s_& rohc_r14() + { + assert_choice_type("rohc-r14", type_.to_string(), "uplinkOnlyHeaderCompression-r14"); + return c; + } + const rohc_r14_s_& rohc_r14() const + { + assert_choice_type("rohc-r14", type_.to_string(), "uplinkOnlyHeaderCompression-r14"); + return c; + } + + private: + types type_; + rohc_r14_s_ c; + }; + struct ul_data_compress_r15_s_ { + struct buffer_size_r15_e_ { + enum options { kbyte2, kbyte4, kbyte8, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + buffer_size_r15_e_() {} + buffer_size_r15_e_(options v) : value(v) {} + buffer_size_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct dictionary_r15_e_ { + enum options { sip_sdp, operator_type }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dictionary_r15_e_() {} + dictionary_r15_e_(options v) : value(v) {} + dictionary_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool dictionary_r15_present; + buffer_size_r15_e_ buffer_size_r15; + dictionary_r15_e_ dictionary_r15; + // ... + + // sequence methods + ul_data_compress_r15_s_(); + }; + struct pdcp_dupl_cfg_r15_c_ { + struct setup_s_ { + struct pdcp_dupl_r15_e_ { + enum options { cfgured, activ }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdcp_dupl_r15_e_() {} + pdcp_dupl_r15_e_(options v) : value(v) {} + pdcp_dupl_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + pdcp_dupl_r15_e_ pdcp_dupl_r15; + }; + typedef setup_e types; + + // choice methods + pdcp_dupl_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "pdcp-DuplicationConfig-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "pdcp-DuplicationConfig-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool discard_timer_present; + bool rlc_am_present; + bool rlc_um_present; + discard_timer_e_ discard_timer; + rlc_am_s_ rlc_am; + rlc_um_s_ rlc_um; + hdr_compress_c_ hdr_compress; + // ... + // group 0 + bool rn_integrity_protection_r10_present; + // group 1 + bool pdcp_sn_size_v1130_present; + // group 2 + bool ul_data_split_drb_via_scg_r12_present; + bool t_reordering_r12_present; + bool ul_data_split_drb_via_scg_r12; + t_reordering_r12_e_ t_reordering_r12; + // group 3 + bool ul_data_split_thres_r13_present; + bool pdcp_sn_size_v1310_present; + bool status_feedback_r13_present; + copy_ptr ul_data_split_thres_r13; + copy_ptr status_feedback_r13; + // group 4 + bool ul_lwa_cfg_r14_present; + bool ul_only_hdr_compress_r14_present; + copy_ptr ul_lwa_cfg_r14; + copy_ptr ul_only_hdr_compress_r14; + // group 5 + bool ul_data_compress_r15_present; + bool pdcp_dupl_cfg_r15_present; + copy_ptr ul_data_compress_r15; + copy_ptr pdcp_dupl_cfg_r15; + + // sequence methods + pdcp_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-v1530 ::= SEQUENCE +struct pucch_cfg_ded_v1530_s { + struct codebooksize_determination_stti_r15_e_ { + enum options { dai, cc }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebooksize_determination_stti_r15_e_() {} + codebooksize_determination_stti_r15_e_(options v) : value(v) {} + codebooksize_determination_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool n1_pucch_an_spt_r15_present; + bool codebooksize_determination_stti_r15_present; + uint16_t n1_pucch_an_spt_r15; + codebooksize_determination_stti_r15_e_ codebooksize_determination_stti_r15; + + // sequence methods + pucch_cfg_ded_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-Format3-Conf-r13 ::= SEQUENCE +struct pucch_format3_conf_r13_s { + typedef bounded_array n3_pucch_an_list_r13_l_; + struct two_ant_port_activ_pucch_format3_r13_c_ { + struct setup_s_ { + typedef bounded_array n3_pucch_an_list_p1_r13_l_; + + // member variables + n3_pucch_an_list_p1_r13_l_ n3_pucch_an_list_p1_r13; + }; + typedef setup_e types; + + // choice methods + two_ant_port_activ_pucch_format3_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivatedPUCCH-Format3-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivatedPUCCH-Format3-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool n3_pucch_an_list_r13_present; + bool two_ant_port_activ_pucch_format3_r13_present; + n3_pucch_an_list_r13_l_ n3_pucch_an_list_r13; + two_ant_port_activ_pucch_format3_r13_c_ two_ant_port_activ_pucch_format3_r13; + + // sequence methods + pucch_format3_conf_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RE-MappingQCLConfigToAddModList-r11 ::= SEQUENCE (SIZE (1..maxRE-MapQCL-r11)) OF PDSCH-RE-MappingQCL-Config-r11 +typedef dyn_array re_map_qcl_cfg_to_add_mod_list_r11_l; + +// RE-MappingQCLConfigToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxRE-MapQCL-r11)) OF INTEGER +typedef bounded_array re_map_qcl_cfg_to_release_list_r11_l; + +// RLC-BearerConfig-r15 ::= CHOICE +struct rlc_bearer_cfg_r15_c { + struct setup_s_ { + struct lc_ch_id_cfg_r15_c_ { + struct types { + enum options { lc_ch_id_r15, lc_ch_id_ext_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + lc_ch_id_cfg_r15_c_() : type_(types::nulltype) {} + lc_ch_id_cfg_r15_c_(const lc_ch_id_cfg_r15_c_& other); + lc_ch_id_cfg_r15_c_& operator=(const lc_ch_id_cfg_r15_c_& other); + ~lc_ch_id_cfg_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& lc_ch_id_r15() + { + assert_choice_type("logicalChannelIdentity-r15", type_.to_string(), "logicalChannelIdentityConfig-r15"); + return c.get(); + } + uint8_t& lc_ch_id_ext_r15() + { + assert_choice_type("logicalChannelIdentityExt-r15", type_.to_string(), "logicalChannelIdentityConfig-r15"); + return c.get(); + } + const uint8_t& lc_ch_id_r15() const + { + assert_choice_type("logicalChannelIdentity-r15", type_.to_string(), "logicalChannelIdentityConfig-r15"); + return c.get(); + } + const uint8_t& lc_ch_id_ext_r15() const + { + assert_choice_type("logicalChannelIdentityExt-r15", type_.to_string(), "logicalChannelIdentityConfig-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool rlc_cfg_r15_present; + bool lc_ch_cfg_r15_present; + rlc_cfg_r15_s rlc_cfg_r15; + lc_ch_id_cfg_r15_c_ lc_ch_id_cfg_r15; + lc_ch_cfg_s lc_ch_cfg_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + rlc_bearer_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RLC-BearerConfig-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RLC-BearerConfig-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RLC-Config ::= CHOICE +struct rlc_cfg_c { + struct am_s_ { + // member variables + ul_am_rlc_s ul_am_rlc; + dl_am_rlc_s dl_am_rlc; + }; + struct um_bi_dir_s_ { + // member variables + ul_um_rlc_s ul_um_rlc; + dl_um_rlc_s dl_um_rlc; + }; + struct um_uni_dir_ul_s_ { + // member variables + ul_um_rlc_s ul_um_rlc; + }; + struct um_uni_dir_dl_s_ { + // member variables + dl_um_rlc_s dl_um_rlc; + }; + struct types { + enum options { am, um_bi_dir, um_uni_dir_ul, um_uni_dir_dl, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + rlc_cfg_c() : type_(types::nulltype) {} + rlc_cfg_c(const rlc_cfg_c& other); + rlc_cfg_c& operator=(const rlc_cfg_c& other); + ~rlc_cfg_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + am_s_& am() + { + assert_choice_type("am", type_.to_string(), "RLC-Config"); + return c.get(); + } + um_bi_dir_s_& um_bi_dir() + { + assert_choice_type("um-Bi-Directional", type_.to_string(), "RLC-Config"); + return c.get(); + } + um_uni_dir_ul_s_& um_uni_dir_ul() + { + assert_choice_type("um-Uni-Directional-UL", type_.to_string(), "RLC-Config"); + return c.get(); + } + um_uni_dir_dl_s_& um_uni_dir_dl() + { + assert_choice_type("um-Uni-Directional-DL", type_.to_string(), "RLC-Config"); + return c.get(); + } + const am_s_& am() const + { + assert_choice_type("am", type_.to_string(), "RLC-Config"); + return c.get(); + } + const um_bi_dir_s_& um_bi_dir() const + { + assert_choice_type("um-Bi-Directional", type_.to_string(), "RLC-Config"); + return c.get(); + } + const um_uni_dir_ul_s_& um_uni_dir_ul() const + { + assert_choice_type("um-Uni-Directional-UL", type_.to_string(), "RLC-Config"); + return c.get(); + } + const um_uni_dir_dl_s_& um_uni_dir_dl() const + { + assert_choice_type("um-Uni-Directional-DL", type_.to_string(), "RLC-Config"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// RLC-Config-v1250 ::= SEQUENCE +struct rlc_cfg_v1250_s { + // member variables + bool ul_extended_rlc_li_field_r12; + bool dl_extended_rlc_li_field_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Config-v1310 ::= SEQUENCE +struct rlc_cfg_v1310_s { + // member variables + bool poll_pdu_v1310_present; + bool ul_extended_rlc_am_sn_r13; + bool dl_extended_rlc_am_sn_r13; + poll_pdu_v1310_e poll_pdu_v1310; + + // sequence methods + rlc_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Config-v1430 ::= CHOICE +struct rlc_cfg_v1430_c { + struct setup_s_ { + // member variables + poll_byte_r14_e poll_byte_r14; + }; + typedef setup_e types; + + // choice methods + rlc_cfg_v1430_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RLC-Config-v1430"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RLC-Config-v1430"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RLC-Config-v1510 ::= SEQUENCE +struct rlc_cfg_v1510_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Config-v1530 ::= CHOICE +struct rlc_cfg_v1530_c { + struct setup_s_ { + }; + typedef setup_e types; + + // choice methods + rlc_cfg_v1530_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RLC-Config-v1530"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RLC-Config-v1530"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RRCConnectionReject-v1320-IEs ::= SEQUENCE +struct rrc_conn_reject_v1320_ies_s { + // member variables + bool rrc_suspend_ind_r13_present; + bool non_crit_ext_present; + + // sequence methods + rrc_conn_reject_v1320_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPDCCH-Config-r15 ::= CHOICE +struct spdcch_cfg_r15_c { + struct setup_s_ { + struct spdcch_l1_reuse_ind_r15_e_ { + enum options { n0, n1, n2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + spdcch_l1_reuse_ind_r15_e_() {} + spdcch_l1_reuse_ind_r15_e_(options v) : value(v) {} + spdcch_l1_reuse_ind_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool spdcch_l1_reuse_ind_r15_present; + bool spdcch_set_cfg_r15_present; + spdcch_l1_reuse_ind_r15_e_ spdcch_l1_reuse_ind_r15; + spdcch_set_r15_l spdcch_set_cfg_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + spdcch_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPDCCH-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPDCCH-Config-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SPS-ConfigSL-r14 ::= SEQUENCE +struct sps_cfg_sl_r14_s { + struct semi_persist_sched_interv_sl_r14_e_ { + enum options { + sf20, + sf50, + sf100, + sf200, + sf300, + sf400, + sf500, + sf600, + sf700, + sf800, + sf900, + sf1000, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + semi_persist_sched_interv_sl_r14_e_() {} + semi_persist_sched_interv_sl_r14_e_(options v) : value(v) {} + semi_persist_sched_interv_sl_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + uint8_t sps_cfg_idx_r14; + semi_persist_sched_interv_sl_r14_e_ semi_persist_sched_interv_sl_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPS-ConfigUL ::= CHOICE +struct sps_cfg_ul_c { + struct setup_s_ { + struct semi_persist_sched_interv_ul_e_ { + enum options { + sf10, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf320, + sf640, + sf1_v1430, + sf2_v1430, + sf3_v1430, + sf4_v1430, + sf5_v1430, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + semi_persist_sched_interv_ul_e_() {} + semi_persist_sched_interv_ul_e_(options v) : value(v) {} + semi_persist_sched_interv_ul_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct implicit_release_after_e_ { + enum options { e2, e3, e4, e8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + implicit_release_after_e_() {} + implicit_release_after_e_(options v) : value(v) {} + implicit_release_after_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct p0_persistent_s_ { + // member variables + int8_t p0_nominal_pusch_persistent; + int8_t p0_ue_pusch_persistent; + }; + struct p0_persistent_sf_set2_r12_c_ { + struct setup_s_ { + // member variables + int8_t p0_nominal_pusch_persistent_sf_set2_r12; + int8_t p0_ue_pusch_persistent_sf_set2_r12; + }; + typedef setup_e types; + + // choice methods + p0_persistent_sf_set2_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "p0-PersistentSubframeSet2-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "p0-PersistentSubframeSet2-r12"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct semi_persist_sched_interv_ul_v1430_e_ { + enum options { + sf50, + sf100, + sf200, + sf300, + sf400, + sf500, + sf600, + sf700, + sf800, + sf900, + sf1000, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + semi_persist_sched_interv_ul_v1430_e_() {} + semi_persist_sched_interv_ul_v1430_e_(options v) : value(v) {} + semi_persist_sched_interv_ul_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct cyclic_shift_sps_r15_e_ { + enum options { cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_sps_r15_e_() {} + cyclic_shift_sps_r15_e_(options v) : value(v) {} + cyclic_shift_sps_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rv_sps_ul_repeats_r15_e_ { + enum options { ulrvseq1, ulrvseq2, ulrvseq3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rv_sps_ul_repeats_r15_e_() {} + rv_sps_ul_repeats_r15_e_(options v) : value(v) {} + rv_sps_ul_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct total_num_pusch_sps_ul_repeats_r15_e_ { + enum options { n2, n3, n4, n6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + total_num_pusch_sps_ul_repeats_r15_e_() {} + total_num_pusch_sps_ul_repeats_r15_e_(options v) : value(v) {} + total_num_pusch_sps_ul_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool p0_persistent_present; + bool two_intervs_cfg_present; + semi_persist_sched_interv_ul_e_ semi_persist_sched_interv_ul; + implicit_release_after_e_ implicit_release_after; + p0_persistent_s_ p0_persistent; + // ... + // group 0 + bool p0_persistent_sf_set2_r12_present; + copy_ptr p0_persistent_sf_set2_r12; + // group 1 + bool nof_conf_ul_sps_processes_r13_present; + uint8_t nof_conf_ul_sps_processes_r13; + // group 2 + bool fixed_rv_non_adaptive_r14_present; + bool sps_cfg_idx_r14_present; + bool semi_persist_sched_interv_ul_v1430_present; + uint8_t sps_cfg_idx_r14; + semi_persist_sched_interv_ul_v1430_e_ semi_persist_sched_interv_ul_v1430; + // group 3 + bool cyclic_shift_sps_r15_present; + bool harq_proc_id_offset_r15_present; + bool rv_sps_ul_repeats_r15_present; + bool tpc_pdcch_cfg_pusch_sps_r15_present; + bool total_num_pusch_sps_ul_repeats_r15_present; + bool sps_cfg_idx_r15_present; + cyclic_shift_sps_r15_e_ cyclic_shift_sps_r15; + uint8_t harq_proc_id_offset_r15; + rv_sps_ul_repeats_r15_e_ rv_sps_ul_repeats_r15; + copy_ptr tpc_pdcch_cfg_pusch_sps_r15; + total_num_pusch_sps_ul_repeats_r15_e_ total_num_pusch_sps_ul_repeats_r15; + uint8_t sps_cfg_idx_r15; + + // sequence methods + setup_s_(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + }; + typedef setup_e types; + + // choice methods + sps_cfg_ul_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigUL"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigUL"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SPS-ConfigUL-STTI-r15 ::= CHOICE +struct sps_cfg_ul_stti_r15_c { + struct setup_s_ { + struct semi_persist_sched_interv_ul_stti_r15_e_ { + enum options { + s_tti1, + s_tti2, + s_tti3, + s_tti4, + s_tti6, + s_tti8, + s_tti12, + s_tti16, + s_tti20, + s_tti40, + s_tti60, + s_tti80, + s_tti120, + s_tti240, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + semi_persist_sched_interv_ul_stti_r15_e_() {} + semi_persist_sched_interv_ul_stti_r15_e_(options v) : value(v) {} + semi_persist_sched_interv_ul_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct implicit_release_after_e_ { + enum options { e2, e3, e4, e8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + implicit_release_after_e_() {} + implicit_release_after_e_(options v) : value(v) {} + implicit_release_after_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct p0_persistent_r15_s_ { + // member variables + int8_t p0_nominal_spusch_persistent_r15; + int8_t p0_ue_spusch_persistent_r15; + }; + struct p0_persistent_sf_set2_r15_c_ { + struct setup_s_ { + // member variables + int8_t p0_nominal_spusch_persistent_sf_set2_r15; + int8_t p0_ue_spusch_persistent_sf_set2_r15; + }; + typedef setup_e types; + + // choice methods + p0_persistent_sf_set2_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "p0-PersistentSubframeSet2-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "p0-PersistentSubframeSet2-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct cyclic_shift_sps_s_tti_r15_e_ { + enum options { cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_sps_s_tti_r15_e_() {} + cyclic_shift_sps_s_tti_r15_e_(options v) : value(v) {} + cyclic_shift_sps_s_tti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rv_sps_stti_ul_repeats_r15_e_ { + enum options { ulrvseq1, ulrvseq2, ulrvseq3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rv_sps_stti_ul_repeats_r15_e_() {} + rv_sps_stti_ul_repeats_r15_e_(options v) : value(v) {} + rv_sps_stti_ul_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_ { + enum options { n6, n12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_() {} + tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_(options v) : value(v) {} + tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct total_num_pusch_sps_stti_ul_repeats_r15_e_ { + enum options { n2, n3, n4, n6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + total_num_pusch_sps_stti_ul_repeats_r15_e_() {} + total_num_pusch_sps_stti_ul_repeats_r15_e_(options v) : value(v) {} + total_num_pusch_sps_stti_ul_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool p0_persistent_r15_present; + bool two_intervs_cfg_r15_present; + bool p0_persistent_sf_set2_r15_present; + bool nof_conf_ul_sps_processes_stti_r15_present; + bool tpc_pdcch_cfg_pusch_sps_r15_present; + bool cyclic_shift_sps_s_tti_r15_present; + bool ifdma_cfg_sps_r15_present; + bool harq_proc_id_offset_r15_present; + bool rv_sps_stti_ul_repeats_r15_present; + bool sps_cfg_idx_r15_present; + bool tbs_scaling_factor_subslot_sps_ul_repeats_r15_present; + bool total_num_pusch_sps_stti_ul_repeats_r15_present; + semi_persist_sched_interv_ul_stti_r15_e_ semi_persist_sched_interv_ul_stti_r15; + implicit_release_after_e_ implicit_release_after; + p0_persistent_r15_s_ p0_persistent_r15; + p0_persistent_sf_set2_r15_c_ p0_persistent_sf_set2_r15; + uint8_t nof_conf_ul_sps_processes_stti_r15; + uint8_t s_tti_start_time_ul_r15; + tpc_pdcch_cfg_c tpc_pdcch_cfg_pusch_sps_r15; + cyclic_shift_sps_s_tti_r15_e_ cyclic_shift_sps_s_tti_r15; + bool ifdma_cfg_sps_r15; + uint8_t harq_proc_id_offset_r15; + rv_sps_stti_ul_repeats_r15_e_ rv_sps_stti_ul_repeats_r15; + uint8_t sps_cfg_idx_r15; + tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_ tbs_scaling_factor_subslot_sps_ul_repeats_r15; + total_num_pusch_sps_stti_ul_repeats_r15_e_ total_num_pusch_sps_stti_ul_repeats_r15; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + sps_cfg_ul_stti_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigUL-STTI-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigUL-STTI-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SPUCCH-Config-r15 ::= CHOICE +struct spucch_cfg_r15_c { + struct setup_s_ { + struct two_ant_port_activ_spucch_format3_r15_s_ { + typedef bounded_array n3_spucch_an_list_r15_l_; + + // member variables + n3_spucch_an_list_r15_l_ n3_spucch_an_list_r15; + }; + + // member variables + bool spucch_set_r15_present; + bool two_ant_port_activ_spucch_format1a1b_r15_present; + spucch_set_r15_l spucch_set_r15; + two_ant_port_activ_spucch_format3_r15_s_ two_ant_port_activ_spucch_format3_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + spucch_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPUCCH-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPUCCH-Config-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SRS-CC-SetIndex-r14 ::= SEQUENCE +struct srs_cc_set_idx_r14_s { + // member variables + uint8_t cc_set_idx_r14; + uint8_t cc_idx_in_one_cc_set_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-ConfigAp-r10 ::= SEQUENCE +struct srs_cfg_ap_r10_s { + struct srs_bw_ap_r10_e_ { + enum options { bw0, bw1, bw2, bw3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_bw_ap_r10_e_() {} + srs_bw_ap_r10_e_(options v) : value(v) {} + srs_bw_ap_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct cyclic_shift_ap_r10_e_ { + enum options { cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_ap_r10_e_() {} + cyclic_shift_ap_r10_e_(options v) : value(v) {} + cyclic_shift_ap_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + srs_ant_port_e srs_ant_port_ap_r10; + srs_bw_ap_r10_e_ srs_bw_ap_r10; + uint8_t freq_domain_position_ap_r10; + uint8_t tx_comb_ap_r10; + cyclic_shift_ap_r10_e_ cyclic_shift_ap_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-ConfigAp-r13 ::= SEQUENCE +struct srs_cfg_ap_r13_s { + struct srs_bw_ap_r13_e_ { + enum options { bw0, bw1, bw2, bw3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_bw_ap_r13_e_() {} + srs_bw_ap_r13_e_(options v) : value(v) {} + srs_bw_ap_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct cyclic_shift_ap_r13_e_ { + enum options { cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, cs8, cs9, cs10, cs11 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 12, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_ap_r13_e_() {} + cyclic_shift_ap_r13_e_(options v) : value(v) {} + cyclic_shift_ap_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct tx_comb_num_r13_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_comb_num_r13_e_() {} + tx_comb_num_r13_e_(options v) : value(v) {} + tx_comb_num_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + srs_ant_port_e srs_ant_port_ap_r13; + srs_bw_ap_r13_e_ srs_bw_ap_r13; + uint8_t freq_domain_position_ap_r13; + uint8_t tx_comb_ap_r13; + cyclic_shift_ap_r13_e_ cyclic_shift_ap_r13; + tx_comb_num_r13_e_ tx_comb_num_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-ConfigAp-v1310 ::= SEQUENCE +struct srs_cfg_ap_v1310_s { + struct cyclic_shift_ap_v1310_e_ { + enum options { cs8, cs9, cs10, cs11 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_ap_v1310_e_() {} + cyclic_shift_ap_v1310_e_(options v) : value(v) {} + cyclic_shift_ap_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct tx_comb_num_r13_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_comb_num_r13_e_() {} + tx_comb_num_r13_e_(options v) : value(v) {} + tx_comb_num_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool tx_comb_ap_v1310_present; + bool cyclic_shift_ap_v1310_present; + bool tx_comb_num_r13_present; + uint8_t tx_comb_ap_v1310; + cyclic_shift_ap_v1310_e_ cyclic_shift_ap_v1310; + tx_comb_num_r13_e_ tx_comb_num_r13; + + // sequence methods + srs_cfg_ap_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// STAG-ToAddMod-r11 ::= SEQUENCE +struct stag_to_add_mod_r11_s { + // member variables + bool ext; + uint8_t stag_id_r11; + time_align_timer_e time_align_timer_stag_r11; + // ... + + // sequence methods + stag_to_add_mod_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingRequestConfig-v1530 ::= CHOICE +struct sched_request_cfg_v1530_c { + struct setup_s_ { + struct dssr_trans_max_r15_e_ { + enum options { n4, n8, n16, n32, n64, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dssr_trans_max_r15_e_() {} + dssr_trans_max_r15_e_(options v) : value(v) {} + dssr_trans_max_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool sr_slot_spucch_idx_fh_r15_present; + bool sr_slot_spucch_idx_no_fh_r15_present; + bool sr_subslot_spucch_res_list_r15_present; + bool sr_cfg_idx_slot_r15_present; + bool sr_cfg_idx_subslot_r15_present; + uint16_t sr_slot_spucch_idx_fh_r15; + uint16_t sr_slot_spucch_idx_no_fh_r15; + sr_subslot_spucch_res_list_r15_l sr_subslot_spucch_res_list_r15; + uint8_t sr_cfg_idx_slot_r15; + uint8_t sr_cfg_idx_subslot_r15; + dssr_trans_max_r15_e_ dssr_trans_max_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + sched_request_cfg_v1530_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SchedulingRequestConfig-v1530"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SchedulingRequestConfig-v1530"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// ShortTTI-r15 ::= SEQUENCE +struct short_tti_r15_s { + // member variables + bool dl_stti_len_r15_present; + bool ul_stti_len_r15_present; + short_tti_len_r15_e dl_stti_len_r15; + short_tti_len_r15_e ul_stti_len_r15; + + // sequence methods + short_tti_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SlotOrSubslotPDSCH-Config-r15 ::= CHOICE +struct slot_or_subslot_pdsch_cfg_r15_c { + struct setup_s_ { + struct alt_cqi_table_stti_r15_e_ { + enum options { all_sfs, csi_sf_set1, csi_sf_set2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_cqi_table_stti_r15_e_() {} + alt_cqi_table_stti_r15_e_(options v) : value(v) {} + alt_cqi_table_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct alt_cqi_table1024_qam_stti_r15_e_ { + enum options { all_sfs, csi_sf_set1, csi_sf_set2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_cqi_table1024_qam_stti_r15_e_() {} + alt_cqi_table1024_qam_stti_r15_e_(options v) : value(v) {} + alt_cqi_table1024_qam_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct res_alloc_r15_e_ { + enum options { res_alloc_type0, res_alloc_type2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + res_alloc_r15_e_() {} + res_alloc_r15_e_(options v) : value(v) {} + res_alloc_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool alt_cqi_table_stti_r15_present; + bool alt_cqi_table1024_qam_stti_r15_present; + bool res_alloc_r15_present; + bool tbs_idx_alt_stti_r15_present; + bool tbs_idx_alt2_stti_r15_present; + bool tbs_idx_alt3_stti_r15_present; + alt_cqi_table_stti_r15_e_ alt_cqi_table_stti_r15; + alt_cqi_table1024_qam_stti_r15_e_ alt_cqi_table1024_qam_stti_r15; + res_alloc_r15_e_ res_alloc_r15; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + slot_or_subslot_pdsch_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SlotOrSubslotPDSCH-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SlotOrSubslotPDSCH-Config-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SlotOrSubslotPUSCH-Config-r15 ::= CHOICE +struct slot_or_subslot_pusch_cfg_r15_c { + struct setup_s_ { + typedef bounded_array beta_offset_subslot_ack_idx_r15_l_; + typedef bounded_array beta_offset2_subslot_ack_idx_r15_l_; + typedef bounded_array beta_offset_subslot_ri_idx_r15_l_; + + // member variables + bool ext; + bool beta_offset_slot_ack_idx_r15_present; + bool beta_offset2_slot_ack_idx_r15_present; + bool beta_offset_subslot_ack_idx_r15_present; + bool beta_offset2_subslot_ack_idx_r15_present; + bool beta_offset_slot_ri_idx_r15_present; + bool beta_offset_subslot_ri_idx_r15_present; + bool beta_offset_slot_cqi_idx_r15_present; + bool beta_offset_subslot_cqi_idx_r15_present; + bool enable256_qam_slot_or_subslot_r15_present; + bool res_alloc_offset_r15_present; + uint8_t beta_offset_slot_ack_idx_r15; + uint8_t beta_offset2_slot_ack_idx_r15; + beta_offset_subslot_ack_idx_r15_l_ beta_offset_subslot_ack_idx_r15; + beta_offset2_subslot_ack_idx_r15_l_ beta_offset2_subslot_ack_idx_r15; + uint8_t beta_offset_slot_ri_idx_r15; + beta_offset_subslot_ri_idx_r15_l_ beta_offset_subslot_ri_idx_r15; + uint8_t beta_offset_slot_cqi_idx_r15; + uint8_t beta_offset_subslot_cqi_idx_r15; + enable256_qam_r14_c enable256_qam_slot_or_subslot_r15; + uint8_t res_alloc_offset_r15; + bool ul_dmrs_ifdma_slot_or_subslot_r15; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + slot_or_subslot_pusch_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SlotOrSubslotPUSCH-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SlotOrSubslotPUSCH-Config-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// TDD-PUSCH-UpPTS-r14 ::= CHOICE +struct tdd_pusch_up_pts_r14_c { + struct setup_s_ { + struct sym_pusch_up_pts_r14_e_ { + enum options { sym1, sym2, sym3, sym4, sym5, sym6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sym_pusch_up_pts_r14_e_() {} + sym_pusch_up_pts_r14_e_(options v) : value(v) {} + sym_pusch_up_pts_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool sym_pusch_up_pts_r14_present; + bool dmrs_less_up_pts_cfg_r14_present; + sym_pusch_up_pts_r14_e_ sym_pusch_up_pts_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + tdd_pusch_up_pts_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "TDD-PUSCH-UpPTS-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "TDD-PUSCH-UpPTS-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// UplinkPowerControlDedicatedSTTI-r15 ::= SEQUENCE +struct ul_pwr_ctrl_ded_stti_r15_s { + // member variables + bool delta_tx_d_offset_list_spucch_r15_present; + bool accumulation_enabled_stti_r15; + delta_tx_d_offset_list_spucch_r15_s delta_tx_d_offset_list_spucch_r15; + bool ul_pwr_csi_payload; + + // sequence methods + ul_pwr_ctrl_ded_stti_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicated ::= SEQUENCE +struct ant_info_ded_s { + struct tx_mode_e_ { + enum options { tm1, tm2, tm3, tm4, tm5, tm6, tm7, tm8_v920 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_e_() {} + tx_mode_e_(options v) : value(v) {} + tx_mode_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct codebook_subset_restrict_c_ { + struct types { + enum options { + n2_tx_ant_tm3, + n4_tx_ant_tm3, + n2_tx_ant_tm4, + n4_tx_ant_tm4, + n2_tx_ant_tm5, + n4_tx_ant_tm5, + n2_tx_ant_tm6, + n4_tx_ant_tm6, + nulltype + }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + codebook_subset_restrict_c_() : type_(types::nulltype) {} + codebook_subset_restrict_c_(const codebook_subset_restrict_c_& other); + codebook_subset_restrict_c_& operator=(const codebook_subset_restrict_c_& other); + ~codebook_subset_restrict_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<2>& n2_tx_ant_tm3() + { + assert_choice_type("n2TxAntenna-tm3", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<4>& n4_tx_ant_tm3() + { + assert_choice_type("n4TxAntenna-tm3", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<6>& n2_tx_ant_tm4() + { + assert_choice_type("n2TxAntenna-tm4", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<64>& n4_tx_ant_tm4() + { + assert_choice_type("n4TxAntenna-tm4", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<4>& n2_tx_ant_tm5() + { + assert_choice_type("n2TxAntenna-tm5", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<16>& n4_tx_ant_tm5() + { + assert_choice_type("n4TxAntenna-tm5", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<4>& n2_tx_ant_tm6() + { + assert_choice_type("n2TxAntenna-tm6", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + fixed_bitstring<16>& n4_tx_ant_tm6() + { + assert_choice_type("n4TxAntenna-tm6", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<2>& n2_tx_ant_tm3() const + { + assert_choice_type("n2TxAntenna-tm3", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<4>& n4_tx_ant_tm3() const + { + assert_choice_type("n4TxAntenna-tm3", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<6>& n2_tx_ant_tm4() const + { + assert_choice_type("n2TxAntenna-tm4", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<64>& n4_tx_ant_tm4() const + { + assert_choice_type("n4TxAntenna-tm4", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<4>& n2_tx_ant_tm5() const + { + assert_choice_type("n2TxAntenna-tm5", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<16>& n4_tx_ant_tm5() const + { + assert_choice_type("n4TxAntenna-tm5", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<4>& n2_tx_ant_tm6() const + { + assert_choice_type("n2TxAntenna-tm6", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + const fixed_bitstring<16>& n4_tx_ant_tm6() const + { + assert_choice_type("n4TxAntenna-tm6", type_.to_string(), "codebookSubsetRestriction"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct ue_tx_ant_sel_c_ { + struct setup_e_ { + enum options { closed_loop, open_loop }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + typedef setup_e types; + + // choice methods + ue_tx_ant_sel_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "ue-TransmitAntennaSelection"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ue-TransmitAntennaSelection"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + + // member variables + bool codebook_subset_restrict_present; + tx_mode_e_ tx_mode; + codebook_subset_restrict_c_ codebook_subset_restrict; + ue_tx_ant_sel_c_ ue_tx_ant_sel; + + // sequence methods + ant_info_ded_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicated-r10 ::= SEQUENCE +struct ant_info_ded_r10_s { + struct tx_mode_r10_e_ { + enum options { + tm1, + tm2, + tm3, + tm4, + tm5, + tm6, + tm7, + tm8_v920, + tm9_v1020, + tm10_v1130, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_r10_e_() {} + tx_mode_r10_e_(options v) : value(v) {} + tx_mode_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct ue_tx_ant_sel_c_ { + struct setup_e_ { + enum options { closed_loop, open_loop }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + typedef setup_e types; + + // choice methods + ue_tx_ant_sel_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "ue-TransmitAntennaSelection"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ue-TransmitAntennaSelection"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + + // member variables + bool codebook_subset_restrict_r10_present; + tx_mode_r10_e_ tx_mode_r10; + dyn_bitstring codebook_subset_restrict_r10; + ue_tx_ant_sel_c_ ue_tx_ant_sel; + + // sequence methods + ant_info_ded_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicated-v1250 ::= SEQUENCE +struct ant_info_ded_v1250_s { + // member variables + bool alternative_codebook_enabled_for4_tx_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicated-v1430 ::= SEQUENCE +struct ant_info_ded_v1430_s { + // member variables + bool ce_ue_tx_ant_sel_cfg_r14_present; + + // sequence methods + ant_info_ded_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicated-v1530 ::= CHOICE +struct ant_info_ded_v1530_c { + struct setup_c_ { + struct ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_ { + enum options { two, three }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_() {} + ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_(options v) : value(v) {} + ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { ue_tx_ant_sel_srs_minus1_t4_r_cfg_r15, ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15, nulltype }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_& ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15() + { + assert_choice_type("ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15", type_.to_string(), "setup"); + return c; + } + const ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_& ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15() const + { + assert_choice_type("ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15", type_.to_string(), "setup"); + return c; + } + + private: + types type_; + ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_ c; + }; + typedef setup_e types; + + // choice methods + ant_info_ded_v1530_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "AntennaInfoDedicated-v1530"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "AntennaInfoDedicated-v1530"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// AntennaInfoDedicated-v920 ::= SEQUENCE +struct ant_info_ded_v920_s { + struct codebook_subset_restrict_v920_c_ { + struct types { + enum options { n2_tx_ant_tm8_r9, n4_tx_ant_tm8_r9, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + codebook_subset_restrict_v920_c_() : type_(types::nulltype) {} + codebook_subset_restrict_v920_c_(const codebook_subset_restrict_v920_c_& other); + codebook_subset_restrict_v920_c_& operator=(const codebook_subset_restrict_v920_c_& other); + ~codebook_subset_restrict_v920_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<6>& n2_tx_ant_tm8_r9() + { + assert_choice_type("n2TxAntenna-tm8-r9", type_.to_string(), "codebookSubsetRestriction-v920"); + return c.get >(); + } + fixed_bitstring<32>& n4_tx_ant_tm8_r9() + { + assert_choice_type("n4TxAntenna-tm8-r9", type_.to_string(), "codebookSubsetRestriction-v920"); + return c.get >(); + } + const fixed_bitstring<6>& n2_tx_ant_tm8_r9() const + { + assert_choice_type("n2TxAntenna-tm8-r9", type_.to_string(), "codebookSubsetRestriction-v920"); + return c.get >(); + } + const fixed_bitstring<32>& n4_tx_ant_tm8_r9() const + { + assert_choice_type("n4TxAntenna-tm8-r9", type_.to_string(), "codebookSubsetRestriction-v920"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + bool codebook_subset_restrict_v920_present; + codebook_subset_restrict_v920_c_ codebook_subset_restrict_v920; + + // sequence methods + ant_info_ded_v920_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoUL-r10 ::= SEQUENCE +struct ant_info_ul_r10_s { + struct tx_mode_ul_r10_e_ { + enum options { tm1, tm2, spare6, spare5, spare4, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_ul_r10_e_() {} + tx_mode_ul_r10_e_(options v) : value(v) {} + tx_mode_ul_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool tx_mode_ul_r10_present; + bool four_ant_port_activ_r10_present; + tx_mode_ul_r10_e_ tx_mode_ul_r10; + + // sequence methods + ant_info_ul_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandClassPriority1XRTT ::= SEQUENCE +struct band_class_prio1_xrtt_s { + // member variables + bandclass_cdma2000_e band_class; + uint8_t cell_resel_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandClassPriorityHRPD ::= SEQUENCE +struct band_class_prio_hrpd_s { + // member variables + bandclass_cdma2000_e band_class; + uint8_t cell_resel_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CFI-Config-r15 ::= SEQUENCE +struct cfi_cfg_r15_s { + // member variables + bool cfi_sf_non_mbsfn_r15_present; + bool cfi_slot_subslot_non_mbsfn_r15_present; + bool cfi_sf_mbsfn_r15_present; + bool cfi_slot_subslot_mbsfn_r15_present; + uint8_t cfi_sf_non_mbsfn_r15; + uint8_t cfi_slot_subslot_non_mbsfn_r15; + uint8_t cfi_sf_mbsfn_r15; + uint8_t cfi_slot_subslot_mbsfn_r15; + + // sequence methods + cfi_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CFI-PatternConfig-r15 ::= SEQUENCE +struct cfi_pattern_cfg_r15_s { + typedef fixed_array cfi_pattern_sf_r15_l_; + typedef fixed_array cfi_pattern_slot_subslot_r15_l_; + + // member variables + bool cfi_pattern_sf_r15_present; + bool cfi_pattern_slot_subslot_r15_present; + cfi_pattern_sf_r15_l_ cfi_pattern_sf_r15; + cfi_pattern_slot_subslot_r15_l_ cfi_pattern_slot_subslot_r15; + + // sequence methods + cfi_pattern_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig ::= SEQUENCE +struct cqi_report_cfg_s { + // member variables + bool cqi_report_mode_aperiodic_present; + bool cqi_report_periodic_present; + cqi_report_mode_aperiodic_e cqi_report_mode_aperiodic; + int8_t nom_pdsch_rs_epre_offset; + cqi_report_periodic_c cqi_report_periodic; + + // sequence methods + cqi_report_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v1530 ::= SEQUENCE +struct cqi_report_cfg_v1530_s { + struct alt_cqi_table_minus1024_qam_r15_e_ { + enum options { all_sfs, csi_sf_set1, csi_sf_set2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_cqi_table_minus1024_qam_r15_e_() {} + alt_cqi_table_minus1024_qam_r15_e_(options v) : value(v) {} + alt_cqi_table_minus1024_qam_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool alt_cqi_table_minus1024_qam_r15_present; + alt_cqi_table_minus1024_qam_r15_e_ alt_cqi_table_minus1024_qam_r15; + + // sequence methods + cqi_report_cfg_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfig-v920 ::= SEQUENCE +struct cqi_report_cfg_v920_s { + // member variables + bool cqi_mask_r9_present; + bool pmi_ri_report_r9_present; + + // sequence methods + cqi_report_cfg_v920_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CRS-AssistanceInfoList-r11 ::= SEQUENCE (SIZE (1..maxCellReport)) OF CRS-AssistanceInfo-r11 +typedef dyn_array crs_assist_info_list_r11_l; + +// CRS-AssistanceInfoList-r13 ::= SEQUENCE (SIZE (1..maxCellReport)) OF CRS-AssistanceInfo-r13 +typedef dyn_array crs_assist_info_list_r13_l; + +// CRS-AssistanceInfoList-r15 ::= SEQUENCE (SIZE (1..maxCellReport)) OF CRS-AssistanceInfo-r15 +typedef dyn_array crs_assist_info_list_r15_l; + +// CSI-RS-Config-v1480 ::= SEQUENCE +struct csi_rs_cfg_v1480_s { + // member variables + bool e_mimo_type_v1480_present; + csi_rs_cfg_emimo_v1480_c e_mimo_type_v1480; + + // sequence methods + csi_rs_cfg_v1480_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-Config-v1530 ::= SEQUENCE +struct csi_rs_cfg_v1530_s { + // member variables + bool e_mimo_type_v1530_present; + csi_rs_cfg_emimo_v1530_c e_mimo_type_v1530; + + // sequence methods + csi_rs_cfg_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-ConfigNZPToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r11)) OF CSI-RS-ConfigNZP-r11 +typedef dyn_array csi_rs_cfg_nzp_to_add_mod_list_r11_l; + +// CSI-RS-ConfigNZPToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-v1310)) OF CSI-RS-ConfigNZP-r11 +typedef dyn_array csi_rs_cfg_nzp_to_add_mod_list_ext_r13_l; + +// CSI-RS-ConfigNZPToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r11)) OF INTEGER +typedef bounded_array csi_rs_cfg_nzp_to_release_list_r11_l; + +// CSI-RS-ConfigNZPToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-v1310)) OF INTEGER +typedef bounded_array csi_rs_cfg_nzp_to_release_list_ext_r13_l; + +// DRB-ToAddMod ::= SEQUENCE +struct drb_to_add_mod_s { + struct drb_type_lwip_r13_e_ { + enum options { lwip, lwip_dl_only, lwip_ul_only, eutran }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drb_type_lwip_r13_e_() {} + drb_type_lwip_r13_e_(options v) : value(v) {} + drb_type_lwip_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct lwa_wlan_ac_r14_e_ { + enum options { ac_bk, ac_be, ac_vi, ac_vo }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + lwa_wlan_ac_r14_e_() {} + lwa_wlan_ac_r14_e_(options v) : value(v) {} + lwa_wlan_ac_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool eps_bearer_id_present; + bool pdcp_cfg_present; + bool rlc_cfg_present; + bool lc_ch_id_present; + bool lc_ch_cfg_present; + uint8_t eps_bearer_id; + uint8_t drb_id; + pdcp_cfg_s pdcp_cfg; + rlc_cfg_c rlc_cfg; + uint8_t lc_ch_id; + lc_ch_cfg_s lc_ch_cfg; + // ... + // group 0 + bool drb_type_change_r12_present; + bool rlc_cfg_v1250_present; + copy_ptr rlc_cfg_v1250; + // group 1 + bool rlc_cfg_v1310_present; + bool drb_type_lwa_r13_present; + bool drb_type_lwip_r13_present; + copy_ptr rlc_cfg_v1310; + bool drb_type_lwa_r13; + drb_type_lwip_r13_e_ drb_type_lwip_r13; + // group 2 + bool rlc_cfg_v1430_present; + bool lwip_ul_aggregation_r14_present; + bool lwip_dl_aggregation_r14_present; + bool lwa_wlan_ac_r14_present; + copy_ptr rlc_cfg_v1430; + bool lwip_ul_aggregation_r14; + bool lwip_dl_aggregation_r14; + lwa_wlan_ac_r14_e_ lwa_wlan_ac_r14; + // group 3 + bool rlc_cfg_v1510_present; + copy_ptr rlc_cfg_v1510; + // group 4 + bool rlc_cfg_v1530_present; + bool rlc_bearer_cfg_dupl_r15_present; + bool lc_ch_id_r15_present; + copy_ptr rlc_cfg_v1530; + copy_ptr rlc_bearer_cfg_dupl_r15; + uint8_t lc_ch_id_r15; + + // sequence methods + drb_to_add_mod_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Config ::= CHOICE +struct drx_cfg_c { + struct setup_s_ { + struct on_dur_timer_e_ { + enum options { + psf1, + psf2, + psf3, + psf4, + psf5, + psf6, + psf8, + psf10, + psf20, + psf30, + psf40, + psf50, + psf60, + psf80, + psf100, + psf200 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + on_dur_timer_e_() {} + on_dur_timer_e_(options v) : value(v) {} + on_dur_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct drx_inactivity_timer_e_ { + enum options { + psf1, + psf2, + psf3, + psf4, + psf5, + psf6, + psf8, + psf10, + psf20, + psf30, + psf40, + psf50, + psf60, + psf80, + psf100, + psf200, + psf300, + psf500, + psf750, + psf1280, + psf1920, + psf2560, + psf0_v1020, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_inactivity_timer_e_() {} + drx_inactivity_timer_e_(options v) : value(v) {} + drx_inactivity_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_retx_timer_e_ { + enum options { psf1, psf2, psf4, psf6, psf8, psf16, psf24, psf33 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_retx_timer_e_() {} + drx_retx_timer_e_(options v) : value(v) {} + drx_retx_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct long_drx_cycle_start_offset_c_ { + struct types { + enum options { + sf10, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf256, + sf320, + sf512, + sf640, + sf1024, + sf1280, + sf2048, + sf2560, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + long_drx_cycle_start_offset_c_() : type_(types::nulltype) {} + long_drx_cycle_start_offset_c_(const long_drx_cycle_start_offset_c_& other); + long_drx_cycle_start_offset_c_& operator=(const long_drx_cycle_start_offset_c_& other); + ~long_drx_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf10() + { + assert_choice_type("sf10", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf20() + { + assert_choice_type("sf20", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf32() + { + assert_choice_type("sf32", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf40() + { + assert_choice_type("sf40", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf64() + { + assert_choice_type("sf64", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf80() + { + assert_choice_type("sf80", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf128() + { + assert_choice_type("sf128", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf160() + { + assert_choice_type("sf160", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint8_t& sf256() + { + assert_choice_type("sf256", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf320() + { + assert_choice_type("sf320", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf512() + { + assert_choice_type("sf512", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf640() + { + assert_choice_type("sf640", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf1024() + { + assert_choice_type("sf1024", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf1280() + { + assert_choice_type("sf1280", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf2048() + { + assert_choice_type("sf2048", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + uint16_t& sf2560() + { + assert_choice_type("sf2560", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf10() const + { + assert_choice_type("sf10", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf20() const + { + assert_choice_type("sf20", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf32() const + { + assert_choice_type("sf32", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf40() const + { + assert_choice_type("sf40", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf64() const + { + assert_choice_type("sf64", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf80() const + { + assert_choice_type("sf80", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf128() const + { + assert_choice_type("sf128", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf160() const + { + assert_choice_type("sf160", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint8_t& sf256() const + { + assert_choice_type("sf256", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf320() const + { + assert_choice_type("sf320", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf512() const + { + assert_choice_type("sf512", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf640() const + { + assert_choice_type("sf640", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf1024() const + { + assert_choice_type("sf1024", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf1280() const + { + assert_choice_type("sf1280", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf2048() const + { + assert_choice_type("sf2048", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + const uint16_t& sf2560() const + { + assert_choice_type("sf2560", type_.to_string(), "longDRX-CycleStartOffset"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct short_drx_s_ { + struct short_drx_cycle_e_ { + enum options { + sf2, + sf5, + sf8, + sf10, + sf16, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf256, + sf320, + sf512, + sf640 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + short_drx_cycle_e_() {} + short_drx_cycle_e_(options v) : value(v) {} + short_drx_cycle_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + short_drx_cycle_e_ short_drx_cycle; + uint8_t drx_short_cycle_timer; + }; + + // member variables + bool short_drx_present; + on_dur_timer_e_ on_dur_timer; + drx_inactivity_timer_e_ drx_inactivity_timer; + drx_retx_timer_e_ drx_retx_timer; + long_drx_cycle_start_offset_c_ long_drx_cycle_start_offset; + short_drx_s_ short_drx; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + drx_cfg_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "DRX-Config"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "DRX-Config"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// DRX-Config-r13 ::= SEQUENCE +struct drx_cfg_r13_s { + struct on_dur_timer_v1310_e_ { + enum options { psf300, psf400, psf500, psf600, psf800, psf1000, psf1200, psf1600 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + on_dur_timer_v1310_e_() {} + on_dur_timer_v1310_e_(options v) : value(v) {} + on_dur_timer_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_retx_timer_v1310_e_ { + enum options { psf40, psf64, psf80, psf96, psf112, psf128, psf160, psf320 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_retx_timer_v1310_e_() {} + drx_retx_timer_v1310_e_(options v) : value(v) {} + drx_retx_timer_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_ul_retx_timer_r13_e_ { + enum options { + psf0, + psf1, + psf2, + psf4, + psf6, + psf8, + psf16, + psf24, + psf33, + psf40, + psf64, + psf80, + psf96, + psf112, + psf128, + psf160, + psf320 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 17, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_ul_retx_timer_r13_e_() {} + drx_ul_retx_timer_r13_e_(options v) : value(v) {} + drx_ul_retx_timer_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool on_dur_timer_v1310_present; + bool drx_retx_timer_v1310_present; + bool drx_ul_retx_timer_r13_present; + on_dur_timer_v1310_e_ on_dur_timer_v1310; + drx_retx_timer_v1310_e_ drx_retx_timer_v1310; + drx_ul_retx_timer_r13_e_ drx_ul_retx_timer_r13; + + // sequence methods + drx_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Config-r15 ::= SEQUENCE +struct drx_cfg_r15_s { + struct drx_retx_timer_short_tti_r15_e_ { + enum options { tti10, tti20, tti40, tti64, tti80, tti96, tti112, tti128, tti160, tti320 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 10, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_retx_timer_short_tti_r15_e_() {} + drx_retx_timer_short_tti_r15_e_(options v) : value(v) {} + drx_retx_timer_short_tti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_ul_retx_timer_short_tti_r15_e_ { + enum options { + tti0, + tti1, + tti2, + tti4, + tti6, + tti8, + tti16, + tti24, + tti33, + tti40, + tti64, + tti80, + tti96, + tti112, + tti128, + tti160, + tti320 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 17, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_ul_retx_timer_short_tti_r15_e_() {} + drx_ul_retx_timer_short_tti_r15_e_(options v) : value(v) {} + drx_ul_retx_timer_short_tti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool drx_retx_timer_short_tti_r15_present; + bool drx_ul_retx_timer_short_tti_r15_present; + drx_retx_timer_short_tti_r15_e_ drx_retx_timer_short_tti_r15; + drx_ul_retx_timer_short_tti_r15_e_ drx_ul_retx_timer_short_tti_r15; + + // sequence methods + drx_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Config-v1130 ::= SEQUENCE +struct drx_cfg_v1130_s { + struct long_drx_cycle_start_offset_v1130_c_ { + struct types { + enum options { sf60_v1130, sf70_v1130, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + long_drx_cycle_start_offset_v1130_c_() : type_(types::nulltype) {} + long_drx_cycle_start_offset_v1130_c_(const long_drx_cycle_start_offset_v1130_c_& other); + long_drx_cycle_start_offset_v1130_c_& operator=(const long_drx_cycle_start_offset_v1130_c_& other); + ~long_drx_cycle_start_offset_v1130_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf60_v1130() + { + assert_choice_type("sf60-v1130", type_.to_string(), "longDRX-CycleStartOffset-v1130"); + return c.get(); + } + uint8_t& sf70_v1130() + { + assert_choice_type("sf70-v1130", type_.to_string(), "longDRX-CycleStartOffset-v1130"); + return c.get(); + } + const uint8_t& sf60_v1130() const + { + assert_choice_type("sf60-v1130", type_.to_string(), "longDRX-CycleStartOffset-v1130"); + return c.get(); + } + const uint8_t& sf70_v1130() const + { + assert_choice_type("sf70-v1130", type_.to_string(), "longDRX-CycleStartOffset-v1130"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool drx_retx_timer_v1130_present; + bool long_drx_cycle_start_offset_v1130_present; + bool short_drx_cycle_v1130_present; + long_drx_cycle_start_offset_v1130_c_ long_drx_cycle_start_offset_v1130; + + // sequence methods + drx_cfg_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Config-v1310 ::= SEQUENCE +struct drx_cfg_v1310_s { + struct long_drx_cycle_start_offset_v1310_s_ { + // member variables + uint8_t sf60_v1310; + }; + + // member variables + bool long_drx_cycle_start_offset_v1310_present; + long_drx_cycle_start_offset_v1310_s_ long_drx_cycle_start_offset_v1310; + + // sequence methods + drx_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DataInactivityTimer-r14 ::= ENUMERATED +struct data_inactivity_timer_r14_e { + enum options { s1, s2, s3, s5, s7, s10, s15, s20, s40, s50, s60, s80, s100, s120, s150, s180 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + data_inactivity_timer_r14_e() {} + data_inactivity_timer_r14_e(options v) : value(v) {} + data_inactivity_timer_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// EPDCCH-Config-r11 ::= SEQUENCE +struct epdcch_cfg_r11_s { + struct cfg_r11_c_ { + struct setup_s_ { + struct sf_pattern_cfg_r11_c_ { + struct setup_s_ { + // member variables + meas_sf_pattern_r10_c sf_pattern_r11; + }; + typedef setup_e types; + + // choice methods + sf_pattern_cfg_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "subframePatternConfig-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "subframePatternConfig-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool sf_pattern_cfg_r11_present; + bool start_symbol_r11_present; + bool set_cfg_to_release_list_r11_present; + bool set_cfg_to_add_mod_list_r11_present; + sf_pattern_cfg_r11_c_ sf_pattern_cfg_r11; + uint8_t start_symbol_r11; + epdcch_set_cfg_to_release_list_r11_l set_cfg_to_release_list_r11; + epdcch_set_cfg_to_add_mod_list_r11_l set_cfg_to_add_mod_list_r11; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cfg_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "config-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "config-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + cfg_r11_c_ cfg_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityEUTRA ::= SEQUENCE +struct freq_prio_eutra_s { + // member variables + uint16_t carrier_freq; + uint8_t cell_resel_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityEUTRA-r12 ::= SEQUENCE +struct freq_prio_eutra_r12_s { + // member variables + uint32_t carrier_freq_r12; + uint8_t cell_resel_prio_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityEUTRA-v1310 ::= SEQUENCE +struct freq_prio_eutra_v1310_s { + // member variables + bool cell_resel_sub_prio_r13_present; + cell_resel_sub_prio_r13_e cell_resel_sub_prio_r13; + + // sequence methods + freq_prio_eutra_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityNR-r15 ::= SEQUENCE +struct freq_prio_nr_r15_s { + // member variables + bool cell_resel_sub_prio_r15_present; + uint32_t carrier_freq_r15; + uint8_t cell_resel_prio_r15; + cell_resel_sub_prio_r13_e cell_resel_sub_prio_r15; + + // sequence methods + freq_prio_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityUTRA-FDD ::= SEQUENCE +struct freq_prio_utra_fdd_s { + // member variables + uint16_t carrier_freq; + uint8_t cell_resel_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityUTRA-TDD ::= SEQUENCE +struct freq_prio_utra_tdd_s { + // member variables + uint16_t carrier_freq; + uint8_t cell_resel_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqsPriorityGERAN ::= SEQUENCE +struct freqs_prio_geran_s { + // member variables + carrier_freqs_geran_s carrier_freqs; + uint8_t cell_resel_prio; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellsToAddModList-r12 ::= SEQUENCE (SIZE (1..maxNeighCell-r12)) OF NeighCellsInfo-r12 +typedef dyn_array neigh_cells_to_add_mod_list_r12_l; + +// NeighCellsToReleaseList-r12 ::= SEQUENCE (SIZE (1..maxNeighCell-r12)) OF INTEGER +typedef bounded_array neigh_cells_to_release_list_r12_l; + +// PDCCH-CandidateReductions-r13 ::= CHOICE +struct pdcch_candidate_reductions_r13_c { + struct setup_s_ { + // member variables + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al1_r13; + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al2_r13; + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al3_r13; + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al4_r13; + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al5_r13; + }; + typedef setup_e types; + + // choice methods + pdcch_candidate_reductions_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "PDCCH-CandidateReductions-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "PDCCH-CandidateReductions-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// PDSCH-ConfigDedicated ::= SEQUENCE +struct pdsch_cfg_ded_s { + struct p_a_e_ { + enum options { db_minus6, db_minus4dot77, db_minus3, db_minus1dot77, db0, db1, db2, db3 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + p_a_e_() {} + p_a_e_(options v) : value(v) {} + p_a_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + p_a_e_ p_a; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigDedicated-v1130 ::= SEQUENCE +struct pdsch_cfg_ded_v1130_s { + struct qcl_operation_e_ { + enum options { type_a, type_b }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + qcl_operation_e_() {} + qcl_operation_e_(options v) : value(v) {} + qcl_operation_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool dmrs_cfg_pdsch_r11_present; + bool qcl_operation_present; + bool re_map_qcl_cfg_to_release_list_r11_present; + bool re_map_qcl_cfg_to_add_mod_list_r11_present; + dmrs_cfg_r11_c dmrs_cfg_pdsch_r11; + qcl_operation_e_ qcl_operation; + re_map_qcl_cfg_to_release_list_r11_l re_map_qcl_cfg_to_release_list_r11; + re_map_qcl_cfg_to_add_mod_list_r11_l re_map_qcl_cfg_to_add_mod_list_r11; + + // sequence methods + pdsch_cfg_ded_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigDedicated-v1280 ::= SEQUENCE +struct pdsch_cfg_ded_v1280_s { + struct tbs_idx_alt_r12_e_ { + enum options { a26, a33 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tbs_idx_alt_r12_e_() {} + tbs_idx_alt_r12_e_(options v) : value(v) {} + tbs_idx_alt_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool tbs_idx_alt_r12_present; + tbs_idx_alt_r12_e_ tbs_idx_alt_r12; + + // sequence methods + pdsch_cfg_ded_v1280_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigDedicated-v1310 ::= SEQUENCE +struct pdsch_cfg_ded_v1310_s { + // member variables + bool dmrs_cfg_pdsch_v1310_present; + dmrs_cfg_v1310_s dmrs_cfg_pdsch_v1310; + + // sequence methods + pdsch_cfg_ded_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigDedicated-v1430 ::= SEQUENCE +struct pdsch_cfg_ded_v1430_s { + struct ce_pdsch_max_bw_r14_e_ { + enum options { bw5, bw20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ce_pdsch_max_bw_r14_e_() {} + ce_pdsch_max_bw_r14_e_(options v) : value(v) {} + ce_pdsch_max_bw_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct ce_sched_enhancement_r14_e_ { + enum options { range1, range2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ce_sched_enhancement_r14_e_() {} + ce_sched_enhancement_r14_e_(options v) : value(v) {} + ce_sched_enhancement_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ce_pdsch_max_bw_r14_present; + bool ce_pdsch_ten_processes_r14_present; + bool ce_harq_ack_bundling_r14_present; + bool ce_sched_enhancement_r14_present; + bool tbs_idx_alt2_r14_present; + ce_pdsch_max_bw_r14_e_ ce_pdsch_max_bw_r14; + ce_sched_enhancement_r14_e_ ce_sched_enhancement_r14; + + // sequence methods + pdsch_cfg_ded_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigDedicated-v1530 ::= SEQUENCE +struct pdsch_cfg_ded_v1530_s { + struct alt_mcs_table_scaling_cfg_r15_e_ { + enum options { o_dot5, o_dot625, o_dot75, o_dot875 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_mcs_table_scaling_cfg_r15_e_() {} + alt_mcs_table_scaling_cfg_r15_e_(options v) : value(v) {} + alt_mcs_table_scaling_cfg_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool qcl_operation_v1530_present; + bool tbs_idx_alt3_r15_present; + bool ce_cqi_alternative_table_cfg_r15_present; + bool ce_pdsch_minus64_qam_cfg_r15_present; + bool ce_pdsch_flex_start_prb_alloc_cfg_r15_present; + bool alt_mcs_table_scaling_cfg_r15_present; + alt_mcs_table_scaling_cfg_r15_e_ alt_mcs_table_scaling_cfg_r15; + + // sequence methods + pdsch_cfg_ded_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated ::= SEQUENCE +struct pucch_cfg_ded_s { + struct ack_nack_repeat_c_ { + struct setup_s_ { + struct repeat_factor_e_ { + enum options { n2, n4, n6, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + repeat_factor_e_() {} + repeat_factor_e_(options v) : value(v) {} + repeat_factor_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + repeat_factor_e_ repeat_factor; + uint16_t n1_pucch_an_rep; + }; + typedef setup_e types; + + // choice methods + ack_nack_repeat_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "ackNackRepetition"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ackNackRepetition"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct tdd_ack_nack_feedback_mode_e_ { + enum options { bundling, mux }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_ack_nack_feedback_mode_e_() {} + tdd_ack_nack_feedback_mode_e_(options v) : value(v) {} + tdd_ack_nack_feedback_mode_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool tdd_ack_nack_feedback_mode_present; + ack_nack_repeat_c_ ack_nack_repeat; + tdd_ack_nack_feedback_mode_e_ tdd_ack_nack_feedback_mode; + + // sequence methods + pucch_cfg_ded_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-r13 ::= SEQUENCE +struct pucch_cfg_ded_r13_s { + struct ack_nack_repeat_r13_c_ { + struct setup_s_ { + struct repeat_factor_r13_e_ { + enum options { n2, n4, n6, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + repeat_factor_r13_e_() {} + repeat_factor_r13_e_(options v) : value(v) {} + repeat_factor_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + repeat_factor_r13_e_ repeat_factor_r13; + uint16_t n1_pucch_an_rep_r13; + }; + typedef setup_e types; + + // choice methods + ack_nack_repeat_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "ackNackRepetition-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ackNackRepetition-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct tdd_ack_nack_feedback_mode_r13_e_ { + enum options { bundling, mux }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_ack_nack_feedback_mode_r13_e_() {} + tdd_ack_nack_feedback_mode_r13_e_(options v) : value(v) {} + tdd_ack_nack_feedback_mode_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct pucch_format_r13_c_ { + struct format3_r13_s_ { + typedef bounded_array n3_pucch_an_list_r13_l_; + struct two_ant_port_activ_pucch_format3_r13_c_ { + struct setup_s_ { + typedef bounded_array n3_pucch_an_list_p1_r13_l_; + + // member variables + n3_pucch_an_list_p1_r13_l_ n3_pucch_an_list_p1_r13; + }; + typedef setup_e types; + + // choice methods + two_ant_port_activ_pucch_format3_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivatedPUCCH-Format3-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivatedPUCCH-Format3-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool n3_pucch_an_list_r13_present; + bool two_ant_port_activ_pucch_format3_r13_present; + n3_pucch_an_list_r13_l_ n3_pucch_an_list_r13; + two_ant_port_activ_pucch_format3_r13_c_ two_ant_port_activ_pucch_format3_r13; + + // sequence methods + format3_r13_s_(); + }; + struct ch_sel_r13_s_ { + struct n1_pucch_an_cs_r13_c_ { + struct setup_s_ { + typedef dyn_array n1_pucch_an_cs_list_r13_l_; + typedef bounded_array n1_pucch_an_cs_list_p1_r13_l_; + + // member variables + n1_pucch_an_cs_list_r13_l_ n1_pucch_an_cs_list_r13; + n1_pucch_an_cs_list_p1_r13_l_ n1_pucch_an_cs_list_p1_r13; + }; + typedef setup_e types; + + // choice methods + n1_pucch_an_cs_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "n1PUCCH-AN-CS-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "n1PUCCH-AN-CS-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool n1_pucch_an_cs_r13_present; + n1_pucch_an_cs_r13_c_ n1_pucch_an_cs_r13; + + // sequence methods + ch_sel_r13_s_(); + }; + struct format4_r13_s_ { + typedef fixed_array format4_res_cfg_r13_l_; + typedef dyn_array format4_multi_csi_res_cfg_r13_l_; + + // member variables + bool format4_multi_csi_res_cfg_r13_present; + format4_res_cfg_r13_l_ format4_res_cfg_r13; + format4_multi_csi_res_cfg_r13_l_ format4_multi_csi_res_cfg_r13; + + // sequence methods + format4_r13_s_(); + }; + struct format5_r13_s_ { + typedef fixed_array format5_res_cfg_r13_l_; + + // member variables + bool format5_multi_csi_res_cfg_r13_present; + format5_res_cfg_r13_l_ format5_res_cfg_r13; + format5_res_r13_s format5_multi_csi_res_cfg_r13; + + // sequence methods + format5_r13_s_(); + }; + struct types { + enum options { format3_r13, ch_sel_r13, format4_r13, format5_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + pucch_format_r13_c_() : type_(types::nulltype) {} + pucch_format_r13_c_(const pucch_format_r13_c_& other); + pucch_format_r13_c_& operator=(const pucch_format_r13_c_& other); + ~pucch_format_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + format3_r13_s_& format3_r13() + { + assert_choice_type("format3-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + ch_sel_r13_s_& ch_sel_r13() + { + assert_choice_type("channelSelection-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + format4_r13_s_& format4_r13() + { + assert_choice_type("format4-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + format5_r13_s_& format5_r13() + { + assert_choice_type("format5-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + const format3_r13_s_& format3_r13() const + { + assert_choice_type("format3-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + const ch_sel_r13_s_& ch_sel_r13() const + { + assert_choice_type("channelSelection-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + const format4_r13_s_& format4_r13() const + { + assert_choice_type("format4-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + const format5_r13_s_& format5_r13() const + { + assert_choice_type("format5-r13", type_.to_string(), "pucch-Format-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + struct n_pucch_param_r13_c_ { + struct setup_s_ { + // member variables + uint16_t n_pucch_id_r13; + uint16_t n1_pucch_an_r13; + }; + typedef setup_e types; + + // choice methods + n_pucch_param_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "nPUCCH-Param-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "nPUCCH-Param-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct nka_pucch_param_r13_c_ { + struct setup_s_ { + // member variables + uint16_t nka_pucch_an_r13; + }; + typedef setup_e types; + + // choice methods + nka_pucch_param_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "nkaPUCCH-Param-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "nkaPUCCH-Param-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct codebooksize_determination_r13_e_ { + enum options { dai, cc }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + codebooksize_determination_r13_e_() {} + codebooksize_determination_r13_e_(options v) : value(v) {} + codebooksize_determination_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct pucch_num_repeat_ce_r13_c_ { + struct setup_c_ { + struct mode_a_s_ { + struct pucch_num_repeat_ce_format1_r13_e_ { + enum options { r1, r2, r4, r8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_format1_r13_e_() {} + pucch_num_repeat_ce_format1_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_format1_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pucch_num_repeat_ce_format2_r13_e_ { + enum options { r1, r2, r4, r8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_format2_r13_e_() {} + pucch_num_repeat_ce_format2_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_format2_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + pucch_num_repeat_ce_format1_r13_e_ pucch_num_repeat_ce_format1_r13; + pucch_num_repeat_ce_format2_r13_e_ pucch_num_repeat_ce_format2_r13; + }; + struct mode_b_s_ { + struct pucch_num_repeat_ce_format1_r13_e_ { + enum options { r4, r8, r16, r32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_format1_r13_e_() {} + pucch_num_repeat_ce_format1_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_format1_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pucch_num_repeat_ce_format2_r13_e_ { + enum options { r4, r8, r16, r32 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_format2_r13_e_() {} + pucch_num_repeat_ce_format2_r13_e_(options v) : value(v) {} + pucch_num_repeat_ce_format2_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + pucch_num_repeat_ce_format1_r13_e_ pucch_num_repeat_ce_format1_r13; + pucch_num_repeat_ce_format2_r13_e_ pucch_num_repeat_ce_format2_r13; + }; + struct types { + enum options { mode_a, mode_b, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mode_a_s_& mode_a() + { + assert_choice_type("modeA", type_.to_string(), "setup"); + return c.get(); + } + mode_b_s_& mode_b() + { + assert_choice_type("modeB", type_.to_string(), "setup"); + return c.get(); + } + const mode_a_s_& mode_a() const + { + assert_choice_type("modeA", type_.to_string(), "setup"); + return c.get(); + } + const mode_b_s_& mode_b() const + { + assert_choice_type("modeB", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + pucch_num_repeat_ce_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "pucch-NumRepetitionCE-r13"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "pucch-NumRepetitionCE-r13"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + + // member variables + bool tdd_ack_nack_feedback_mode_r13_present; + bool pucch_format_r13_present; + bool two_ant_port_activ_pucch_format1a1b_r13_present; + bool simul_pucch_pusch_r13_present; + bool n1_pucch_an_rep_p1_r13_present; + bool n_pucch_param_r13_present; + bool nka_pucch_param_r13_present; + bool codebooksize_determination_r13_present; + bool maximum_payload_coderate_r13_present; + bool pucch_num_repeat_ce_r13_present; + ack_nack_repeat_r13_c_ ack_nack_repeat_r13; + tdd_ack_nack_feedback_mode_r13_e_ tdd_ack_nack_feedback_mode_r13; + pucch_format_r13_c_ pucch_format_r13; + uint16_t n1_pucch_an_rep_p1_r13; + n_pucch_param_r13_c_ n_pucch_param_r13; + nka_pucch_param_r13_c_ nka_pucch_param_r13; + bool spatial_bundling_pucch_r13; + bool spatial_bundling_pusch_r13; + bool harq_timing_tdd_r13; + codebooksize_determination_r13_e_ codebooksize_determination_r13; + uint8_t maximum_payload_coderate_r13; + pucch_num_repeat_ce_r13_c_ pucch_num_repeat_ce_r13; + + // sequence methods + pucch_cfg_ded_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-v1020 ::= SEQUENCE +struct pucch_cfg_ded_v1020_s { + struct pucch_format_r10_c_ { + struct ch_sel_r10_s_ { + struct n1_pucch_an_cs_r10_c_ { + struct setup_s_ { + typedef dyn_array n1_pucch_an_cs_list_r10_l_; + + // member variables + n1_pucch_an_cs_list_r10_l_ n1_pucch_an_cs_list_r10; + }; + typedef setup_e types; + + // choice methods + n1_pucch_an_cs_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "n1PUCCH-AN-CS-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "n1PUCCH-AN-CS-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool n1_pucch_an_cs_r10_present; + n1_pucch_an_cs_r10_c_ n1_pucch_an_cs_r10; + + // sequence methods + ch_sel_r10_s_(); + }; + struct types { + enum options { format3_r10, ch_sel_r10, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + pucch_format_r10_c_() : type_(types::nulltype) {} + pucch_format_r10_c_(const pucch_format_r10_c_& other); + pucch_format_r10_c_& operator=(const pucch_format_r10_c_& other); + ~pucch_format_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + pucch_format3_conf_r13_s& format3_r10() + { + assert_choice_type("format3-r10", type_.to_string(), "pucch-Format-r10"); + return c.get(); + } + ch_sel_r10_s_& ch_sel_r10() + { + assert_choice_type("channelSelection-r10", type_.to_string(), "pucch-Format-r10"); + return c.get(); + } + const pucch_format3_conf_r13_s& format3_r10() const + { + assert_choice_type("format3-r10", type_.to_string(), "pucch-Format-r10"); + return c.get(); + } + const ch_sel_r10_s_& ch_sel_r10() const + { + assert_choice_type("channelSelection-r10", type_.to_string(), "pucch-Format-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool pucch_format_r10_present; + bool two_ant_port_activ_pucch_format1a1b_r10_present; + bool simul_pucch_pusch_r10_present; + bool n1_pucch_an_rep_p1_r10_present; + pucch_format_r10_c_ pucch_format_r10; + uint16_t n1_pucch_an_rep_p1_r10; + + // sequence methods + pucch_cfg_ded_v1020_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-v1130 ::= SEQUENCE +struct pucch_cfg_ded_v1130_s { + struct n1_pucch_an_cs_v1130_c_ { + struct setup_s_ { + typedef bounded_array n1_pucch_an_cs_list_p1_r11_l_; + + // member variables + n1_pucch_an_cs_list_p1_r11_l_ n1_pucch_an_cs_list_p1_r11; + }; + typedef setup_e types; + + // choice methods + n1_pucch_an_cs_v1130_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "n1PUCCH-AN-CS-v1130"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "n1PUCCH-AN-CS-v1130"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct n_pucch_param_r11_c_ { + struct setup_s_ { + // member variables + uint16_t n_pucch_id_r11; + uint16_t n1_pucch_an_r11; + }; + typedef setup_e types; + + // choice methods + n_pucch_param_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "nPUCCH-Param-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "nPUCCH-Param-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool n1_pucch_an_cs_v1130_present; + bool n_pucch_param_r11_present; + n1_pucch_an_cs_v1130_c_ n1_pucch_an_cs_v1130; + n_pucch_param_r11_c_ n_pucch_param_r11; + + // sequence methods + pucch_cfg_ded_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-v1250 ::= SEQUENCE +struct pucch_cfg_ded_v1250_s { + struct nka_pucch_param_r12_c_ { + struct setup_s_ { + // member variables + uint16_t nka_pucch_an_r12; + }; + typedef setup_e types; + + // choice methods + nka_pucch_param_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "nkaPUCCH-Param-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "nkaPUCCH-Param-r12"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + nka_pucch_param_r12_c_ nka_pucch_param_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-v1430 ::= SEQUENCE +struct pucch_cfg_ded_v1430_s { + struct pucch_num_repeat_ce_format1_r14_e_ { + enum options { r64, r128 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pucch_num_repeat_ce_format1_r14_e_() {} + pucch_num_repeat_ce_format1_r14_e_(options v) : value(v) {} + pucch_num_repeat_ce_format1_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool pucch_num_repeat_ce_format1_r14_present; + pucch_num_repeat_ce_format1_r14_e_ pucch_num_repeat_ce_format1_r14; + + // sequence methods + pucch_cfg_ded_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated ::= SEQUENCE +struct pusch_cfg_ded_s { + // member variables + uint8_t beta_offset_ack_idx; + uint8_t beta_offset_ri_idx; + uint8_t beta_offset_cqi_idx; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated-r13 ::= SEQUENCE +struct pusch_cfg_ded_r13_s { + struct beta_offset_mc_r13_s_ { + // member variables + bool beta_offset2_ack_idx_mc_r13_present; + uint8_t beta_offset_ack_idx_mc_r13; + uint8_t beta_offset2_ack_idx_mc_r13; + uint8_t beta_offset_ri_idx_mc_r13; + uint8_t beta_offset_cqi_idx_mc_r13; + + // sequence methods + beta_offset_mc_r13_s_(); + }; + struct pusch_dmrs_r11_c_ { + struct setup_s_ { + // member variables + uint16_t n_pusch_id_r13; + uint16_t n_dmrs_csh_id_r13; + }; + typedef setup_e types; + + // choice methods + pusch_dmrs_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "pusch-DMRS-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "pusch-DMRS-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct uci_on_pusch_c_ { + struct setup_s_ { + struct beta_offset_mc_r12_s_ { + // member variables + bool beta_offset2_ack_idx_mc_sf_set2_r13_present; + uint8_t beta_offset_ack_idx_mc_sf_set2_r13; + uint8_t beta_offset2_ack_idx_mc_sf_set2_r13; + uint8_t beta_offset_ri_idx_mc_sf_set2_r13; + uint8_t beta_offset_cqi_idx_mc_sf_set2_r13; + + // sequence methods + beta_offset_mc_r12_s_(); + }; + + // member variables + bool beta_offset2_ack_idx_sf_set2_r13_present; + bool beta_offset_mc_r12_present; + uint8_t beta_offset_ack_idx_sf_set2_r13; + uint8_t beta_offset2_ack_idx_sf_set2_r13; + uint8_t beta_offset_ri_idx_sf_set2_r13; + uint8_t beta_offset_cqi_idx_sf_set2_r13; + beta_offset_mc_r12_s_ beta_offset_mc_r12; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + uci_on_pusch_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "uciOnPUSCH"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "uciOnPUSCH"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool beta_offset2_ack_idx_r13_present; + bool beta_offset_mc_r13_present; + bool group_hop_disabled_r13_present; + bool dmrs_with_occ_activ_r13_present; + bool pusch_dmrs_r11_present; + bool uci_on_pusch_present; + bool pusch_hop_cfg_r13_present; + uint8_t beta_offset_ack_idx_r13; + uint8_t beta_offset2_ack_idx_r13; + uint8_t beta_offset_ri_idx_r13; + uint8_t beta_offset_cqi_idx_r13; + beta_offset_mc_r13_s_ beta_offset_mc_r13; + pusch_dmrs_r11_c_ pusch_dmrs_r11; + uci_on_pusch_c_ uci_on_pusch; + + // sequence methods + pusch_cfg_ded_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated-v1020 ::= SEQUENCE +struct pusch_cfg_ded_v1020_s { + struct beta_offset_mc_r10_s_ { + // member variables + uint8_t beta_offset_ack_idx_mc_r10; + uint8_t beta_offset_ri_idx_mc_r10; + uint8_t beta_offset_cqi_idx_mc_r10; + }; + + // member variables + bool beta_offset_mc_r10_present; + bool group_hop_disabled_r10_present; + bool dmrs_with_occ_activ_r10_present; + beta_offset_mc_r10_s_ beta_offset_mc_r10; + + // sequence methods + pusch_cfg_ded_v1020_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated-v1130 ::= SEQUENCE +struct pusch_cfg_ded_v1130_s { + struct pusch_dmrs_r11_c_ { + struct setup_s_ { + // member variables + uint16_t n_pusch_id_r11; + uint16_t n_dmrs_csh_id_r11; + }; + typedef setup_e types; + + // choice methods + pusch_dmrs_r11_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "pusch-DMRS-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "pusch-DMRS-r11"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + pusch_dmrs_r11_c_ pusch_dmrs_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated-v1250 ::= SEQUENCE +struct pusch_cfg_ded_v1250_s { + struct uci_on_pusch_c_ { + struct setup_s_ { + struct beta_offset_mc_r12_s_ { + // member variables + uint8_t beta_offset_ack_idx_mc_sf_set2_r12; + uint8_t beta_offset_ri_idx_mc_sf_set2_r12; + uint8_t beta_offset_cqi_idx_mc_sf_set2_r12; + }; + + // member variables + bool beta_offset_mc_r12_present; + uint8_t beta_offset_ack_idx_sf_set2_r12; + uint8_t beta_offset_ri_idx_sf_set2_r12; + uint8_t beta_offset_cqi_idx_sf_set2_r12; + beta_offset_mc_r12_s_ beta_offset_mc_r12; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + uci_on_pusch_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "uciOnPUSCH"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "uciOnPUSCH"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + uci_on_pusch_c_ uci_on_pusch; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated-v1430 ::= SEQUENCE +struct pusch_cfg_ded_v1430_s { + // member variables + bool ce_pusch_nb_max_tbs_r14_present; + bool ce_pusch_max_bw_r14_present; + bool tdd_pusch_up_pts_r14_present; + bool enable256_qam_r14_present; + tdd_pusch_up_pts_r14_c tdd_pusch_up_pts_r14; + bool ul_dmrs_ifdma_r14; + enable256_qam_r14_c enable256_qam_r14; + + // sequence methods + pusch_cfg_ded_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicated-v1530 ::= SEQUENCE +struct pusch_cfg_ded_v1530_s { + struct ce_pusch_flex_start_prb_alloc_cfg_r15_c_ { + struct setup_s_ { + // member variables + bool offset_ce_mode_b_r15_present; + int8_t offset_ce_mode_b_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + ce_pusch_flex_start_prb_alloc_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "ce-PUSCH-FlexibleStartPRB-AllocConfig-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ce-PUSCH-FlexibleStartPRB-AllocConfig-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct ce_pusch_sub_prb_cfg_r15_c_ { + struct setup_s_ { + // member variables + bool location_ce_mode_b_r15_present; + uint8_t location_ce_mode_b_r15; + uint8_t six_tone_cyclic_shift_r15; + uint8_t three_tone_cyclic_shift_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + ce_pusch_sub_prb_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "ce-PUSCH-SubPRB-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ce-PUSCH-SubPRB-Config-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ce_pusch_sub_prb_cfg_r15_present; + ce_pusch_flex_start_prb_alloc_cfg_r15_c_ ce_pusch_flex_start_prb_alloc_cfg_r15; + ce_pusch_sub_prb_cfg_r15_c_ ce_pusch_sub_prb_cfg_r15; + + // sequence methods + pusch_cfg_ded_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-EnhancementsConfig-r14 ::= CHOICE +struct pusch_enhance_cfg_r14_c { + struct setup_s_ { + struct interv_ul_hop_pusch_enh_r14_c_ { + struct interv_fdd_pusch_enh_r14_e_ { + enum options { int1, int2, int4, int8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_fdd_pusch_enh_r14_e_() {} + interv_fdd_pusch_enh_r14_e_(options v) : value(v) {} + interv_fdd_pusch_enh_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct interv_tdd_pusch_enh_r14_e_ { + enum options { int1, int5, int10, int20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interv_tdd_pusch_enh_r14_e_() {} + interv_tdd_pusch_enh_r14_e_(options v) : value(v) {} + interv_tdd_pusch_enh_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { interv_fdd_pusch_enh_r14, interv_tdd_pusch_enh_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + interv_ul_hop_pusch_enh_r14_c_() : type_(types::nulltype) {} + interv_ul_hop_pusch_enh_r14_c_(const interv_ul_hop_pusch_enh_r14_c_& other); + interv_ul_hop_pusch_enh_r14_c_& operator=(const interv_ul_hop_pusch_enh_r14_c_& other); + ~interv_ul_hop_pusch_enh_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + interv_fdd_pusch_enh_r14_e_& interv_fdd_pusch_enh_r14() + { + assert_choice_type("interval-FDD-PUSCH-Enh-r14", type_.to_string(), "interval-ULHoppingPUSCH-Enh-r14"); + return c.get(); + } + interv_tdd_pusch_enh_r14_e_& interv_tdd_pusch_enh_r14() + { + assert_choice_type("interval-TDD-PUSCH-Enh-r14", type_.to_string(), "interval-ULHoppingPUSCH-Enh-r14"); + return c.get(); + } + const interv_fdd_pusch_enh_r14_e_& interv_fdd_pusch_enh_r14() const + { + assert_choice_type("interval-FDD-PUSCH-Enh-r14", type_.to_string(), "interval-ULHoppingPUSCH-Enh-r14"); + return c.get(); + } + const interv_tdd_pusch_enh_r14_e_& interv_tdd_pusch_enh_r14() const + { + assert_choice_type("interval-TDD-PUSCH-Enh-r14", type_.to_string(), "interval-ULHoppingPUSCH-Enh-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool pusch_hop_offset_pusch_enh_r14_present; + bool interv_ul_hop_pusch_enh_r14_present; + uint8_t pusch_hop_offset_pusch_enh_r14; + interv_ul_hop_pusch_enh_r14_c_ interv_ul_hop_pusch_enh_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + pusch_enhance_cfg_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "PUSCH-EnhancementsConfig-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "PUSCH-EnhancementsConfig-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// PeriodicBSR-Timer-r12 ::= ENUMERATED +struct periodic_bsr_timer_r12_e { + enum options { + sf5, + sf10, + sf16, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf320, + sf640, + sf1280, + sf2560, + infinity, + spare1 + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodic_bsr_timer_r12_e() {} + periodic_bsr_timer_r12_e(options v) : value(v) {} + periodic_bsr_timer_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; +}; + +// PhysicalConfigDedicatedSTTI-r15 ::= CHOICE +struct phys_cfg_ded_stti_r15_c { + struct setup_s_ { + // member variables + bool ant_info_ded_stti_r15_present; + bool ant_info_ul_stti_r15_present; + bool pucch_cfg_ded_v1530_present; + bool sched_request_cfg_v1530_present; + bool ul_pwr_ctrl_ded_stti_r15_present; + bool cqi_report_cfg_r15_present; + bool csi_rs_cfg_r15_present; + bool csi_rs_cfg_nzp_to_release_list_r15_present; + bool csi_rs_cfg_nzp_to_add_mod_list_r15_present; + bool csi_rs_cfg_zp_to_release_list_r15_present; + bool csi_rs_cfg_zp_to_add_mod_list_r11_present; + bool csi_rs_cfg_zp_ap_list_r15_present; + bool eimta_main_cfg_r12_present; + bool eimta_main_cfg_serv_cell_r15_present; + bool slot_or_subslot_pdsch_cfg_r15_present; + bool slot_or_subslot_pusch_cfg_r15_present; + bool spdcch_cfg_r15_present; + bool spucch_cfg_r15_present; + bool short_tti_r15_present; + ant_info_ded_stti_r15_c ant_info_ded_stti_r15; + ant_info_ul_stti_r15_s ant_info_ul_stti_r15; + pucch_cfg_ded_v1530_s pucch_cfg_ded_v1530; + sched_request_cfg_v1530_c sched_request_cfg_v1530; + ul_pwr_ctrl_ded_stti_r15_s ul_pwr_ctrl_ded_stti_r15; + cqi_report_cfg_r15_c cqi_report_cfg_r15; + csi_rs_cfg_r15_c csi_rs_cfg_r15; + csi_rs_cfg_nzp_to_release_list_r15_l csi_rs_cfg_nzp_to_release_list_r15; + csi_rs_cfg_nzp_to_add_mod_list_r15_l csi_rs_cfg_nzp_to_add_mod_list_r15; + csi_rs_cfg_zp_to_release_list_r11_l csi_rs_cfg_zp_to_release_list_r15; + csi_rs_cfg_zp_to_add_mod_list_r11_l csi_rs_cfg_zp_to_add_mod_list_r11; + csi_rs_cfg_zp_ap_list_r14_c csi_rs_cfg_zp_ap_list_r15; + eimta_main_cfg_r12_c eimta_main_cfg_r12; + eimta_main_cfg_serv_cell_r12_c eimta_main_cfg_serv_cell_r15; + bool semi_open_loop_stti_r15; + slot_or_subslot_pdsch_cfg_r15_c slot_or_subslot_pdsch_cfg_r15; + slot_or_subslot_pusch_cfg_r15_c slot_or_subslot_pusch_cfg_r15; + spdcch_cfg_r15_c spdcch_cfg_r15; + spucch_cfg_r15_c spucch_cfg_r15; + bool srs_dci7_triggering_cfg_r15; + bool short_processing_time_r15; + short_tti_r15_s short_tti_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + phys_cfg_ded_stti_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "PhysicalConfigDedicatedSTTI-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "PhysicalConfigDedicatedSTTI-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RRCConnectionReject-v1130-IEs ::= SEQUENCE +struct rrc_conn_reject_v1130_ies_s { + struct depriorit_req_r11_s_ { + struct depriorit_type_r11_e_ { + enum options { freq, e_utra }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + depriorit_type_r11_e_() {} + depriorit_type_r11_e_(options v) : value(v) {} + depriorit_type_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct depriorit_timer_r11_e_ { + enum options { min5, min10, min15, min30 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + depriorit_timer_r11_e_() {} + depriorit_timer_r11_e_(options v) : value(v) {} + depriorit_timer_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + depriorit_type_r11_e_ depriorit_type_r11; + depriorit_timer_r11_e_ depriorit_timer_r11; + }; + + // member variables + bool depriorit_req_r11_present; + bool non_crit_ext_present; + depriorit_req_r11_s_ depriorit_req_r11; + rrc_conn_reject_v1320_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reject_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RetxBSR-Timer-r12 ::= ENUMERATED +struct retx_bsr_timer_r12_e { + enum options { sf320, sf640, sf1280, sf2560, sf5120, sf10240, spare2, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + retx_bsr_timer_r12_e() {} + retx_bsr_timer_r12_e(options v) : value(v) {} + retx_bsr_timer_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// SPS-ConfigDL ::= CHOICE +struct sps_cfg_dl_c { + struct setup_s_ { + struct semi_persist_sched_interv_dl_e_ { + enum options { + sf10, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf320, + sf640, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + semi_persist_sched_interv_dl_e_() {} + semi_persist_sched_interv_dl_e_(options v) : value(v) {} + semi_persist_sched_interv_dl_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct two_ant_port_activ_r10_c_ { + struct setup_s_ { + // member variables + n1_pucch_an_persistent_list_l n1_pucch_an_persistent_list_p1_r10; + }; + typedef setup_e types; + + // choice methods + two_ant_port_activ_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivated-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivated-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + semi_persist_sched_interv_dl_e_ semi_persist_sched_interv_dl; + uint8_t nof_conf_sps_processes; + n1_pucch_an_persistent_list_l n1_pucch_an_persistent_list; + // ... + // group 0 + bool two_ant_port_activ_r10_present; + copy_ptr two_ant_port_activ_r10; + + // sequence methods + setup_s_(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + }; + typedef setup_e types; + + // choice methods + sps_cfg_dl_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigDL"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigDL"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SPS-ConfigSL-ToAddModList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF SPS-ConfigSL-r14 +typedef dyn_array sps_cfg_sl_to_add_mod_list_r14_l; + +// SPS-ConfigSL-ToReleaseList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF INTEGER +typedef bounded_array sps_cfg_sl_to_release_list_r14_l; + +// SPS-ConfigUL-STTI-ToAddModList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF SPS-ConfigUL-STTI-r15 +typedef dyn_array sps_cfg_ul_stti_to_add_mod_list_r15_l; + +// SPS-ConfigUL-STTI-ToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF INTEGER +typedef bounded_array sps_cfg_ul_stti_to_release_list_r15_l; + +// SPS-ConfigUL-ToAddModList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF SPS-ConfigUL +typedef dyn_array sps_cfg_ul_to_add_mod_list_r14_l; + +// SPS-ConfigUL-ToAddModList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF SPS-ConfigUL +typedef dyn_array sps_cfg_ul_to_add_mod_list_r15_l; + +// SPS-ConfigUL-ToReleaseList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF INTEGER +typedef bounded_array sps_cfg_ul_to_release_list_r14_l; + +// SPS-ConfigUL-ToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF INTEGER +typedef bounded_array sps_cfg_ul_to_release_list_r15_l; + +// SRB-ToAddMod ::= SEQUENCE +struct srb_to_add_mod_s { + struct rlc_cfg_c_ { + struct types { + enum options { explicit_value, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + rlc_cfg_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rlc_cfg_c& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "rlc-Config"); + return c; + } + const rlc_cfg_c& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "rlc-Config"); + return c; + } + + private: + types type_; + rlc_cfg_c c; + }; + struct lc_ch_cfg_c_ { + struct types { + enum options { explicit_value, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + lc_ch_cfg_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + lc_ch_cfg_s& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "logicalChannelConfig"); + return c; + } + const lc_ch_cfg_s& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "logicalChannelConfig"); + return c; + } + + private: + types type_; + lc_ch_cfg_s c; + }; + + // member variables + bool ext; + bool rlc_cfg_present; + bool lc_ch_cfg_present; + uint8_t srb_id; + rlc_cfg_c_ rlc_cfg; + lc_ch_cfg_c_ lc_ch_cfg; + // ... + // group 0 + bool pdcp_ver_change_r15_present; + bool rlc_cfg_v1530_present; + bool rlc_bearer_cfg_dupl_r15_present; + bool srb_id_v1530_present; + copy_ptr rlc_cfg_v1530; + copy_ptr rlc_bearer_cfg_dupl_r15; + uint8_t srb_id_v1530; + + // sequence methods + srb_to_add_mod_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-TPC-PDCCH-Config-r14 ::= CHOICE +struct srs_tpc_pdcch_cfg_r14_c { + struct setup_s_ { + typedef dyn_array srs_cc_set_idxlist_r14_l_; + + // member variables + bool srs_cc_set_idxlist_r14_present; + fixed_bitstring<16> srs_tpc_rnti_r14; + uint8_t start_bit_of_format3_b_r14; + uint8_t field_type_format3_b_r14; + srs_cc_set_idxlist_r14_l_ srs_cc_set_idxlist_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_tpc_pdcch_cfg_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SRS-TPC-PDCCH-Config-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SRS-TPC-PDCCH-Config-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// STAG-ToAddModList-r11 ::= SEQUENCE (SIZE (1..maxSTAG-r11)) OF STAG-ToAddMod-r11 +typedef dyn_array stag_to_add_mod_list_r11_l; + +// STAG-ToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxSTAG-r11)) OF INTEGER +typedef bounded_array stag_to_release_list_r11_l; + +// SchedulingRequestConfig ::= CHOICE +struct sched_request_cfg_c { + struct setup_s_ { + struct dsr_trans_max_e_ { + enum options { n4, n8, n16, n32, n64, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dsr_trans_max_e_() {} + dsr_trans_max_e_(options v) : value(v) {} + dsr_trans_max_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint16_t sr_pucch_res_idx; + uint8_t sr_cfg_idx; + dsr_trans_max_e_ dsr_trans_max; + }; + typedef setup_e types; + + // choice methods + sched_request_cfg_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SchedulingRequestConfig"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SchedulingRequestConfig"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SchedulingRequestConfig-v1020 ::= SEQUENCE +struct sched_request_cfg_v1020_s { + // member variables + bool sr_pucch_res_idx_p1_r10_present; + uint16_t sr_pucch_res_idx_p1_r10; + + // sequence methods + sched_request_cfg_v1020_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SoundingRS-UL-ConfigDedicated ::= CHOICE +struct srs_ul_cfg_ded_c { + struct setup_s_ { + struct srs_bw_e_ { + enum options { bw0, bw1, bw2, bw3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_bw_e_() {} + srs_bw_e_(options v) : value(v) {} + srs_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct srs_hop_bw_e_ { + enum options { hbw0, hbw1, hbw2, hbw3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_hop_bw_e_() {} + srs_hop_bw_e_(options v) : value(v) {} + srs_hop_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct cyclic_shift_e_ { + enum options { cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_e_() {} + cyclic_shift_e_(options v) : value(v) {} + cyclic_shift_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + srs_bw_e_ srs_bw; + srs_hop_bw_e_ srs_hop_bw; + uint8_t freq_domain_position; + bool dur; + uint16_t srs_cfg_idx; + uint8_t tx_comb; + cyclic_shift_e_ cyclic_shift; + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicated"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicated"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SoundingRS-UL-ConfigDedicated-v1020 ::= SEQUENCE +struct srs_ul_cfg_ded_v1020_s { + // member variables + srs_ant_port_e srs_ant_port_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SoundingRS-UL-ConfigDedicated-v1310 ::= CHOICE +struct srs_ul_cfg_ded_v1310_c { + struct setup_s_ { + struct cyclic_shift_v1310_e_ { + enum options { cs8, cs9, cs10, cs11 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_v1310_e_() {} + cyclic_shift_v1310_e_(options v) : value(v) {} + cyclic_shift_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct tx_comb_num_r13_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_comb_num_r13_e_() {} + tx_comb_num_r13_e_(options v) : value(v) {} + tx_comb_num_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool tx_comb_v1310_present; + bool cyclic_shift_v1310_present; + bool tx_comb_num_r13_present; + uint8_t tx_comb_v1310; + cyclic_shift_v1310_e_ cyclic_shift_v1310; + tx_comb_num_r13_e_ tx_comb_num_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_v1310_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicated-v1310"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicated-v1310"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SoundingRS-UL-ConfigDedicatedAperiodic-r10 ::= CHOICE +struct srs_ul_cfg_ded_aperiodic_r10_c { + struct setup_s_ { + typedef dyn_array srs_cfg_ap_dci_format4_r10_l_; + struct srs_activ_ap_r10_c_ { + struct setup_s_ { + // member variables + bool ext; + srs_cfg_ap_r10_s srs_cfg_ap_dci_format0_r10; + srs_cfg_ap_r10_s srs_cfg_ap_dci_format1a2b2c_r10; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_activ_ap_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "srs-ActivateAp-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "srs-ActivateAp-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool srs_cfg_ap_dci_format4_r10_present; + bool srs_activ_ap_r10_present; + uint8_t srs_cfg_idx_ap_r10; + srs_cfg_ap_dci_format4_r10_l_ srs_cfg_ap_dci_format4_r10; + srs_activ_ap_r10_c_ srs_activ_ap_r10; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_aperiodic_r10_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodic-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodic-r10"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SoundingRS-UL-ConfigDedicatedAperiodic-v1310 ::= CHOICE +struct srs_ul_cfg_ded_aperiodic_v1310_c { + struct setup_s_ { + typedef dyn_array srs_cfg_ap_dci_format4_v1310_l_; + struct srs_activ_ap_v1310_c_ { + struct setup_s_ { + // member variables + bool srs_cfg_ap_dci_format0_v1310_present; + bool srs_cfg_ap_dci_format1a2b2c_v1310_present; + srs_cfg_ap_v1310_s srs_cfg_ap_dci_format0_v1310; + srs_cfg_ap_v1310_s srs_cfg_ap_dci_format1a2b2c_v1310; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_activ_ap_v1310_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "srs-ActivateAp-v1310"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "srs-ActivateAp-v1310"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool srs_cfg_ap_dci_format4_v1310_present; + bool srs_activ_ap_v1310_present; + srs_cfg_ap_dci_format4_v1310_l_ srs_cfg_ap_dci_format4_v1310; + srs_activ_ap_v1310_c_ srs_activ_ap_v1310; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_aperiodic_v1310_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodic-v1310"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodic-v1310"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 ::= CHOICE +struct srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c { + struct setup_s_ { + struct srs_up_pts_add_r13_e_ { + enum options { sym2, sym4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_up_pts_add_r13_e_() {} + srs_up_pts_add_r13_e_(options v) : value(v) {} + srs_up_pts_add_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + typedef dyn_array srs_cfg_ap_dci_format4_r13_l_; + struct srs_activ_ap_r13_c_ { + struct setup_s_ { + // member variables + srs_cfg_ap_r13_s srs_cfg_ap_dci_format0_r13; + srs_cfg_ap_r13_s srs_cfg_ap_dci_format1a2b2c_r13; + }; + typedef setup_e types; + + // choice methods + srs_activ_ap_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "srs-ActivateAp-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "srs-ActivateAp-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool srs_cfg_ap_dci_format4_r13_present; + bool srs_activ_ap_r13_present; + srs_up_pts_add_r13_e_ srs_up_pts_add_r13; + uint8_t srs_cfg_idx_ap_r13; + srs_cfg_ap_dci_format4_r13_l_ srs_cfg_ap_dci_format4_r13; + srs_activ_ap_r13_c_ srs_activ_ap_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 ::= CHOICE +struct srs_ul_cfg_ded_up_pts_ext_r13_c { + struct setup_s_ { + struct srs_up_pts_add_r13_e_ { + enum options { sym2, sym4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_up_pts_add_r13_e_() {} + srs_up_pts_add_r13_e_(options v) : value(v) {} + srs_up_pts_add_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct srs_bw_r13_e_ { + enum options { bw0, bw1, bw2, bw3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_bw_r13_e_() {} + srs_bw_r13_e_(options v) : value(v) {} + srs_bw_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct srs_hop_bw_r13_e_ { + enum options { hbw0, hbw1, hbw2, hbw3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + srs_hop_bw_r13_e_() {} + srs_hop_bw_r13_e_(options v) : value(v) {} + srs_hop_bw_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct cyclic_shift_r13_e_ { + enum options { cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, cs8, cs9, cs10, cs11 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 12, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cyclic_shift_r13_e_() {} + cyclic_shift_r13_e_(options v) : value(v) {} + cyclic_shift_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct tx_comb_num_r13_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_comb_num_r13_e_() {} + tx_comb_num_r13_e_(options v) : value(v) {} + tx_comb_num_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + srs_up_pts_add_r13_e_ srs_up_pts_add_r13; + srs_bw_r13_e_ srs_bw_r13; + srs_hop_bw_r13_e_ srs_hop_bw_r13; + uint8_t freq_domain_position_r13; + bool dur_r13; + uint16_t srs_cfg_idx_r13; + uint8_t tx_comb_r13; + cyclic_shift_r13_e_ cyclic_shift_r13; + srs_ant_port_e srs_ant_port_r13; + tx_comb_num_r13_e_ tx_comb_num_r13; + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_up_pts_ext_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedUpPTsExt-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedUpPTsExt-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// UplinkPowerControlDedicated ::= SEQUENCE +struct ul_pwr_ctrl_ded_s { + struct delta_mcs_enabled_e_ { + enum options { en0, en1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_mcs_enabled_e_() {} + delta_mcs_enabled_e_(options v) : value(v) {} + delta_mcs_enabled_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool filt_coef_present; + int8_t p0_ue_pusch; + delta_mcs_enabled_e_ delta_mcs_enabled; + bool accumulation_enabled; + int8_t p0_ue_pucch; + uint8_t p_srs_offset; + filt_coef_e filt_coef; + + // sequence methods + ul_pwr_ctrl_ded_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlDedicated-v1020 ::= SEQUENCE +struct ul_pwr_ctrl_ded_v1020_s { + // member variables + bool delta_tx_d_offset_list_pucch_r10_present; + bool p_srs_offset_ap_r10_present; + delta_tx_d_offset_list_pucch_r10_s delta_tx_d_offset_list_pucch_r10; + uint8_t p_srs_offset_ap_r10; + + // sequence methods + ul_pwr_ctrl_ded_v1020_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlDedicated-v1130 ::= SEQUENCE +struct ul_pwr_ctrl_ded_v1130_s { + // member variables + bool p_srs_offset_v1130_present; + bool p_srs_offset_ap_v1130_present; + bool delta_tx_d_offset_list_pucch_v1130_present; + uint8_t p_srs_offset_v1130; + uint8_t p_srs_offset_ap_v1130; + delta_tx_d_offset_list_pucch_v1130_s delta_tx_d_offset_list_pucch_v1130; + + // sequence methods + ul_pwr_ctrl_ded_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlDedicated-v1250 ::= SEQUENCE +struct ul_pwr_ctrl_ded_v1250_s { + struct set2_pwr_ctrl_param_c_ { + struct setup_s_ { + // member variables + fixed_bitstring<10> tpc_sf_set_r12; + int8_t p0_nominal_pusch_sf_set2_r12; + alpha_r12_e alpha_sf_set2_r12; + int8_t p0_ue_pusch_sf_set2_r12; + }; + typedef setup_e types; + + // choice methods + set2_pwr_ctrl_param_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "set2PowerControlParameter"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "set2PowerControlParameter"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + set2_pwr_ctrl_param_c_ set2_pwr_ctrl_param; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlDedicated-v1530 ::= SEQUENCE +struct ul_pwr_ctrl_ded_v1530_s { + // member variables + bool alpha_ue_r15_present; + bool p0_ue_pusch_r15_present; + alpha_r12_e alpha_ue_r15; + int8_t p0_ue_pusch_r15; + + // sequence methods + ul_pwr_ctrl_ded_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandClassPriorityList1XRTT ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandClassPriority1XRTT +typedef dyn_array band_class_prio_list1_xrtt_l; + +// BandClassPriorityListHRPD ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandClassPriorityHRPD +typedef dyn_array band_class_prio_list_hrpd_l; + +// CarrierFreqCDMA2000 ::= SEQUENCE +struct carrier_freq_cdma2000_s { + // member variables + bandclass_cdma2000_e band_class; + uint16_t arfcn; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqListUTRA-TDD-r10 ::= SEQUENCE (SIZE (1..maxFreqUTRA-TDD-r10)) OF INTEGER +typedef bounded_array carrier_freq_list_utra_tdd_r10_l; + +// DRB-ToAddModList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddMod +typedef dyn_array drb_to_add_mod_list_l; + +// DRB-ToAddModList-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-ToAddMod +typedef dyn_array drb_to_add_mod_list_r15_l; + +// DRB-ToReleaseList ::= SEQUENCE (SIZE (1..maxDRB)) OF INTEGER +typedef bounded_array drb_to_release_list_l; + +// DRB-ToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF INTEGER +typedef bounded_array drb_to_release_list_r15_l; + +// FreqPriorityEUTRA-v9e0 ::= SEQUENCE +struct freq_prio_eutra_v9e0_s { + // member variables + bool carrier_freq_v9e0_present; + uint32_t carrier_freq_v9e0; + + // sequence methods + freq_prio_eutra_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityListEUTRA ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA +typedef dyn_array freq_prio_list_eutra_l; + +// FreqPriorityListEUTRA-v1310 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-v1310 +typedef dyn_array freq_prio_list_eutra_v1310_l; + +// FreqPriorityListExtEUTRA-r12 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-r12 +typedef dyn_array freq_prio_list_ext_eutra_r12_l; + +// FreqPriorityListExtEUTRA-v1310 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-v1310 +typedef dyn_array freq_prio_list_ext_eutra_v1310_l; + +// FreqPriorityListNR-r15 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityNR-r15 +typedef dyn_array freq_prio_list_nr_r15_l; + +// FreqPriorityListUTRA-FDD ::= SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF FreqPriorityUTRA-FDD +typedef dyn_array freq_prio_list_utra_fdd_l; + +// FreqPriorityListUTRA-TDD ::= SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF FreqPriorityUTRA-TDD +typedef dyn_array freq_prio_list_utra_tdd_l; + +// FreqsPriorityListGERAN ::= SEQUENCE (SIZE (1..maxGNFG)) OF FreqsPriorityGERAN +typedef dyn_array freqs_prio_list_geran_l; + +// MAC-MainConfig ::= SEQUENCE +struct mac_main_cfg_s { + struct ul_sch_cfg_s_ { + struct max_harq_tx_e_ { + enum options { n1, n2, n3, n4, n5, n6, n7, n8, n10, n12, n16, n20, n24, n28, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_harq_tx_e_() {} + max_harq_tx_e_(options v) : value(v) {} + max_harq_tx_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool max_harq_tx_present; + bool periodic_bsr_timer_present; + max_harq_tx_e_ max_harq_tx; + periodic_bsr_timer_r12_e periodic_bsr_timer; + retx_bsr_timer_r12_e retx_bsr_timer; + bool tti_bundling; + + // sequence methods + ul_sch_cfg_s_(); + }; + struct phr_cfg_c_ { + struct setup_s_ { + struct periodic_phr_timer_e_ { + enum options { sf10, sf20, sf50, sf100, sf200, sf500, sf1000, infinity }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodic_phr_timer_e_() {} + periodic_phr_timer_e_(options v) : value(v) {} + periodic_phr_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; + }; + struct prohibit_phr_timer_e_ { + enum options { sf0, sf10, sf20, sf50, sf100, sf200, sf500, sf1000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + prohibit_phr_timer_e_() {} + prohibit_phr_timer_e_(options v) : value(v) {} + prohibit_phr_timer_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct dl_pathloss_change_e_ { + enum options { db1, db3, db6, infinity }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dl_pathloss_change_e_() {} + dl_pathloss_change_e_(options v) : value(v) {} + dl_pathloss_change_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // member variables + periodic_phr_timer_e_ periodic_phr_timer; + prohibit_phr_timer_e_ prohibit_phr_timer; + dl_pathloss_change_e_ dl_pathloss_change; + }; + typedef setup_e types; + + // choice methods + phr_cfg_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "phr-Config"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "phr-Config"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct mac_main_cfg_v1020_s_ { + struct s_cell_deactivation_timer_r10_e_ { + enum options { rf2, rf4, rf8, rf16, rf32, rf64, rf128, spare }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + s_cell_deactivation_timer_r10_e_() {} + s_cell_deactivation_timer_r10_e_(options v) : value(v) {} + s_cell_deactivation_timer_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool s_cell_deactivation_timer_r10_present; + bool extended_bsr_sizes_r10_present; + bool extended_phr_r10_present; + s_cell_deactivation_timer_r10_e_ s_cell_deactivation_timer_r10; + + // sequence methods + mac_main_cfg_v1020_s_(); + }; + struct dual_connect_phr_c_ { + struct setup_s_ { + struct phr_mode_other_cg_r12_e_ { + enum options { real, virtual_type }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + phr_mode_other_cg_r12_e_() {} + phr_mode_other_cg_r12_e_(options v) : value(v) {} + phr_mode_other_cg_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + phr_mode_other_cg_r12_e_ phr_mode_other_cg_r12; + }; + typedef setup_e types; + + // choice methods + dual_connect_phr_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "dualConnectivityPHR"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "dualConnectivityPHR"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct lc_ch_sr_cfg_r12_c_ { + struct setup_s_ { + struct lc_ch_sr_prohibit_timer_r12_e_ { + enum options { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + lc_ch_sr_prohibit_timer_r12_e_() {} + lc_ch_sr_prohibit_timer_r12_e_(options v) : value(v) {} + lc_ch_sr_prohibit_timer_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + lc_ch_sr_prohibit_timer_r12_e_ lc_ch_sr_prohibit_timer_r12; + }; + typedef setup_e types; + + // choice methods + lc_ch_sr_cfg_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "logicalChannelSR-Config-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "logicalChannelSR-Config-r12"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct e_drx_cfg_cycle_start_offset_r13_c_ { + struct setup_c_ { + struct types { + enum options { sf5120, sf10240, nulltype }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf5120() + { + assert_choice_type("sf5120", type_.to_string(), "setup"); + return c.get(); + } + uint8_t& sf10240() + { + assert_choice_type("sf10240", type_.to_string(), "setup"); + return c.get(); + } + const uint8_t& sf5120() const + { + assert_choice_type("sf5120", type_.to_string(), "setup"); + return c.get(); + } + const uint8_t& sf10240() const + { + assert_choice_type("sf10240", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + e_drx_cfg_cycle_start_offset_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "eDRX-Config-CycleStartOffset-r13"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "eDRX-Config-CycleStartOffset-r13"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct drx_cfg_r13_c_ { + typedef setup_e types; + + // choice methods + drx_cfg_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + drx_cfg_r13_s& setup() + { + assert_choice_type("setup", type_.to_string(), "drx-Config-r13"); + return c; + } + const drx_cfg_r13_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "drx-Config-r13"); + return c; + } + + private: + types type_; + drx_cfg_r13_s c; + }; + struct skip_ul_tx_r14_c_ { + struct setup_s_ { + // member variables + bool skip_ul_tx_sps_r14_present; + bool skip_ul_tx_dynamic_r14_present; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + skip_ul_tx_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "skipUplinkTx-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "skipUplinkTx-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct data_inactivity_timer_cfg_r14_c_ { + struct setup_s_ { + // member variables + data_inactivity_timer_r14_e data_inactivity_timer_r14; + }; + typedef setup_e types; + + // choice methods + data_inactivity_timer_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "dataInactivityTimerConfig-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "dataInactivityTimerConfig-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct short_tti_and_spt_r15_c_ { + struct setup_s_ { + struct periodic_bsr_timer_r15_e_ { + enum options { + sf1, + sf5, + sf10, + sf16, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf320, + sf640, + sf1280, + sf2560, + infinity + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodic_bsr_timer_r15_e_() {} + periodic_bsr_timer_r15_e_(options v) : value(v) {} + periodic_bsr_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; + }; + struct proc_timeline_r15_e_ { + enum options { nplus4set1, nplus6set1, nplus6set2, nplus8set2 }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + proc_timeline_r15_e_() {} + proc_timeline_r15_e_(options v) : value(v) {} + proc_timeline_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool drx_cfg_r15_present; + bool periodic_bsr_timer_r15_present; + bool proc_timeline_r15_present; + bool ssr_prohibit_timer_r15_present; + drx_cfg_r15_s drx_cfg_r15; + periodic_bsr_timer_r15_e_ periodic_bsr_timer_r15; + proc_timeline_r15_e_ proc_timeline_r15; + uint8_t ssr_prohibit_timer_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + short_tti_and_spt_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "shortTTI-AndSPT-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "shortTTI-AndSPT-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct dormant_state_timers_r15_c_ { + struct setup_s_ { + struct s_cell_hibernation_timer_r15_e_ { + enum options { rf2, rf4, rf8, rf16, rf32, rf64, rf128, spare }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + s_cell_hibernation_timer_r15_e_() {} + s_cell_hibernation_timer_r15_e_(options v) : value(v) {} + s_cell_hibernation_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct dormant_scell_deactivation_timer_r15_e_ { + enum options { + rf2, + rf4, + rf8, + rf16, + rf32, + rf64, + rf128, + rf320, + rf640, + rf1280, + rf2560, + rf5120, + rf10240, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dormant_scell_deactivation_timer_r15_e_() {} + dormant_scell_deactivation_timer_r15_e_(options v) : value(v) {} + dormant_scell_deactivation_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool s_cell_hibernation_timer_r15_present; + bool dormant_scell_deactivation_timer_r15_present; + s_cell_hibernation_timer_r15_e_ s_cell_hibernation_timer_r15; + dormant_scell_deactivation_timer_r15_e_ dormant_scell_deactivation_timer_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + dormant_state_timers_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "dormantStateTimers-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "dormantStateTimers-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool ul_sch_cfg_present; + bool drx_cfg_present; + bool phr_cfg_present; + ul_sch_cfg_s_ ul_sch_cfg; + drx_cfg_c drx_cfg; + time_align_timer_e time_align_timer_ded; + phr_cfg_c_ phr_cfg; + // ... + // group 0 + bool sr_prohibit_timer_r9_present; + uint8_t sr_prohibit_timer_r9; + // group 1 + bool mac_main_cfg_v1020_present; + copy_ptr mac_main_cfg_v1020; + // group 2 + bool stag_to_release_list_r11_present; + bool stag_to_add_mod_list_r11_present; + bool drx_cfg_v1130_present; + copy_ptr stag_to_release_list_r11; + copy_ptr stag_to_add_mod_list_r11; + copy_ptr drx_cfg_v1130; + // group 3 + bool e_harq_pattern_r12_present; + bool dual_connect_phr_present; + bool lc_ch_sr_cfg_r12_present; + bool e_harq_pattern_r12; + copy_ptr dual_connect_phr; + copy_ptr lc_ch_sr_cfg_r12; + // group 4 + bool drx_cfg_v1310_present; + bool extended_phr2_r13_present; + bool e_drx_cfg_cycle_start_offset_r13_present; + copy_ptr drx_cfg_v1310; + bool extended_phr2_r13; + copy_ptr e_drx_cfg_cycle_start_offset_r13; + // group 5 + bool drx_cfg_r13_present; + copy_ptr drx_cfg_r13; + // group 6 + bool skip_ul_tx_r14_present; + bool data_inactivity_timer_cfg_r14_present; + copy_ptr skip_ul_tx_r14; + copy_ptr data_inactivity_timer_cfg_r14; + // group 7 + bool rai_activation_r14_present; + // group 8 + bool short_tti_and_spt_r15_present; + bool mpdcch_ul_harq_ack_feedback_cfg_r15_present; + bool dormant_state_timers_r15_present; + copy_ptr short_tti_and_spt_r15; + bool mpdcch_ul_harq_ack_feedback_cfg_r15; + copy_ptr dormant_state_timers_r15; + + // sequence methods + mac_main_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasSubframePatternPCell-r10 ::= CHOICE +struct meas_sf_pattern_pcell_r10_c { + typedef setup_e types; + + // choice methods + meas_sf_pattern_pcell_r10_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_sf_pattern_r10_c& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasSubframePatternPCell-r10"); + return c; + } + const meas_sf_pattern_r10_c& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasSubframePatternPCell-r10"); + return c; + } + +private: + types type_; + meas_sf_pattern_r10_c c; +}; + +// NAICS-AssistanceInfo-r12 ::= CHOICE +struct naics_assist_info_r12_c { + struct setup_s_ { + // member variables + bool neigh_cells_to_release_list_r12_present; + bool neigh_cells_to_add_mod_list_r12_present; + bool serv_cellp_a_r12_present; + neigh_cells_to_release_list_r12_l neigh_cells_to_release_list_r12; + neigh_cells_to_add_mod_list_r12_l neigh_cells_to_add_mod_list_r12; + p_a_e serv_cellp_a_r12; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + naics_assist_info_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "NAICS-AssistanceInfo-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "NAICS-AssistanceInfo-r12"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// NeighCellsCRS-Info-r11 ::= CHOICE +struct neigh_cells_crs_info_r11_c { + typedef setup_e types; + + // choice methods + neigh_cells_crs_info_r11_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + crs_assist_info_list_r11_l& setup() + { + assert_choice_type("setup", type_.to_string(), "NeighCellsCRS-Info-r11"); + return c; + } + const crs_assist_info_list_r11_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "NeighCellsCRS-Info-r11"); + return c; + } + +private: + types type_; + crs_assist_info_list_r11_l c; +}; + +// NeighCellsCRS-Info-r13 ::= CHOICE +struct neigh_cells_crs_info_r13_c { + typedef setup_e types; + + // choice methods + neigh_cells_crs_info_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + crs_assist_info_list_r13_l& setup() + { + assert_choice_type("setup", type_.to_string(), "NeighCellsCRS-Info-r13"); + return c; + } + const crs_assist_info_list_r13_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "NeighCellsCRS-Info-r13"); + return c; + } + +private: + types type_; + crs_assist_info_list_r13_l c; +}; + +// NeighCellsCRS-Info-r15 ::= CHOICE +struct neigh_cells_crs_info_r15_c { + typedef setup_e types; + + // choice methods + neigh_cells_crs_info_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + crs_assist_info_list_r15_l& setup() + { + assert_choice_type("setup", type_.to_string(), "NeighCellsCRS-Info-r15"); + return c; + } + const crs_assist_info_list_r15_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "NeighCellsCRS-Info-r15"); + return c; + } + +private: + types type_; + crs_assist_info_list_r15_l c; +}; + +// PhysicalConfigDedicated ::= SEQUENCE +struct phys_cfg_ded_s { + struct ant_info_c_ { + struct types { + enum options { explicit_value, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ant_info_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ant_info_ded_s& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "antennaInfo"); + return c; + } + const ant_info_ded_s& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "antennaInfo"); + return c; + } + + private: + types type_; + ant_info_ded_s c; + }; + struct ant_info_r10_c_ { + struct types { + enum options { explicit_value_r10, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ant_info_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ant_info_ded_r10_s& explicit_value_r10() + { + assert_choice_type("explicitValue-r10", type_.to_string(), "antennaInfo-r10"); + return c; + } + const ant_info_ded_r10_s& explicit_value_r10() const + { + assert_choice_type("explicitValue-r10", type_.to_string(), "antennaInfo-r10"); + return c; + } + + private: + types type_; + ant_info_ded_r10_s c; + }; + struct add_spec_emission_ca_r10_c_ { + struct setup_s_ { + // member variables + uint8_t add_spec_emission_pcell_r10; + }; + typedef setup_e types; + + // choice methods + add_spec_emission_ca_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "additionalSpectrumEmissionCA-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "additionalSpectrumEmissionCA-r10"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct ce_mode_r13_c_ { + struct setup_e_ { + enum options { ce_mode_a, ce_mode_b }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + typedef setup_e types; + + // choice methods + ce_mode_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "ce-Mode-r13"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "ce-Mode-r13"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + struct type_a_srs_tpc_pdcch_group_r14_c_ { + typedef dyn_array setup_l_; + typedef setup_e types; + + // choice methods + type_a_srs_tpc_pdcch_group_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_l_& setup() + { + assert_choice_type("setup", type_.to_string(), "typeA-SRS-TPC-PDCCH-Group-r14"); + return c; + } + const setup_l_& setup() const + { + assert_choice_type("setup", type_.to_string(), "typeA-SRS-TPC-PDCCH-Group-r14"); + return c; + } + + private: + types type_; + setup_l_ c; + }; + struct must_cfg_r14_c_ { + struct setup_s_ { + struct k_max_r14_e_ { + enum options { l1, l3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + k_max_r14_e_() {} + k_max_r14_e_(options v) : value(v) {} + k_max_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct p_a_must_r14_e_ { + enum options { db_minus6, db_minus4dot77, db_minus3, db_minus1dot77, db0, db1, db2, db3 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + p_a_must_r14_e_() {} + p_a_must_r14_e_(options v) : value(v) {} + p_a_must_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool p_a_must_r14_present; + k_max_r14_e_ k_max_r14; + p_a_must_r14_e_ p_a_must_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + must_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "must-Config-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "must-Config-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + typedef dyn_array srs_ul_periodic_cfg_ded_list_r14_l_; + typedef dyn_array srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_l_; + typedef dyn_array srs_ul_aperiodic_cfg_ded_list_r14_l_; + typedef dyn_array srs_ul_cfg_ded_ap_up_pts_ext_list_r14_l_; + struct semi_static_cfi_cfg_r15_c_ { + struct setup_c_ { + struct types { + enum options { cfi_cfg_r15, cfi_pattern_cfg_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cfi_cfg_r15_s& cfi_cfg_r15() + { + assert_choice_type("cfi-Config-r15", type_.to_string(), "setup"); + return c.get(); + } + cfi_pattern_cfg_r15_s& cfi_pattern_cfg_r15() + { + assert_choice_type("cfi-PatternConfig-r15", type_.to_string(), "setup"); + return c.get(); + } + const cfi_cfg_r15_s& cfi_cfg_r15() const + { + assert_choice_type("cfi-Config-r15", type_.to_string(), "setup"); + return c.get(); + } + const cfi_pattern_cfg_r15_s& cfi_pattern_cfg_r15() const + { + assert_choice_type("cfi-PatternConfig-r15", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + semi_static_cfi_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "semiStaticCFI-Config-r15"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "semiStaticCFI-Config-r15"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct blind_pdsch_repeat_cfg_r15_c_ { + struct setup_s_ { + struct max_num_sf_pdsch_repeats_r15_e_ { + enum options { n4, n6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_sf_pdsch_repeats_r15_e_() {} + max_num_sf_pdsch_repeats_r15_e_(options v) : value(v) {} + max_num_sf_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct max_num_slot_subslot_pdsch_repeats_r15_e_ { + enum options { n4, n6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_slot_subslot_pdsch_repeats_r15_e_() {} + max_num_slot_subslot_pdsch_repeats_r15_e_(options v) : value(v) {} + max_num_slot_subslot_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rv_sf_pdsch_repeats_r15_e_ { + enum options { dlrvseq1, dlrvseq2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rv_sf_pdsch_repeats_r15_e_() {} + rv_sf_pdsch_repeats_r15_e_(options v) : value(v) {} + rv_sf_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rv_slotsublot_pdsch_repeats_r15_e_ { + enum options { dlrvseq1, dlrvseq2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rv_slotsublot_pdsch_repeats_r15_e_() {} + rv_slotsublot_pdsch_repeats_r15_e_(options v) : value(v) {} + rv_slotsublot_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mcs_restrict_sf_pdsch_repeats_r15_e_ { + enum options { n0, n1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcs_restrict_sf_pdsch_repeats_r15_e_() {} + mcs_restrict_sf_pdsch_repeats_r15_e_(options v) : value(v) {} + mcs_restrict_sf_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mcs_restrict_slot_subslot_pdsch_repeats_r15_e_ { + enum options { n0, n1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_() {} + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_(options v) : value(v) {} + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool max_num_sf_pdsch_repeats_r15_present; + bool max_num_slot_subslot_pdsch_repeats_r15_present; + bool rv_sf_pdsch_repeats_r15_present; + bool rv_slotsublot_pdsch_repeats_r15_present; + bool nof_processes_sf_pdsch_repeats_r15_present; + bool nof_processes_slot_subslot_pdsch_repeats_r15_present; + bool mcs_restrict_sf_pdsch_repeats_r15_present; + bool mcs_restrict_slot_subslot_pdsch_repeats_r15_present; + bool blind_sf_pdsch_repeats_r15; + bool blind_slot_subslot_pdsch_repeats_r15; + max_num_sf_pdsch_repeats_r15_e_ max_num_sf_pdsch_repeats_r15; + max_num_slot_subslot_pdsch_repeats_r15_e_ max_num_slot_subslot_pdsch_repeats_r15; + rv_sf_pdsch_repeats_r15_e_ rv_sf_pdsch_repeats_r15; + rv_slotsublot_pdsch_repeats_r15_e_ rv_slotsublot_pdsch_repeats_r15; + uint8_t nof_processes_sf_pdsch_repeats_r15; + uint8_t nof_processes_slot_subslot_pdsch_repeats_r15; + mcs_restrict_sf_pdsch_repeats_r15_e_ mcs_restrict_sf_pdsch_repeats_r15; + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_ mcs_restrict_slot_subslot_pdsch_repeats_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + blind_pdsch_repeat_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "blindPDSCH-Repetition-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "blindPDSCH-Repetition-Config-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool pdsch_cfg_ded_present; + bool pucch_cfg_ded_present; + bool pusch_cfg_ded_present; + bool ul_pwr_ctrl_ded_present; + bool tpc_pdcch_cfg_pucch_present; + bool tpc_pdcch_cfg_pusch_present; + bool cqi_report_cfg_present; + bool srs_ul_cfg_ded_present; + bool ant_info_present; + bool sched_request_cfg_present; + pdsch_cfg_ded_s pdsch_cfg_ded; + pucch_cfg_ded_s pucch_cfg_ded; + pusch_cfg_ded_s pusch_cfg_ded; + ul_pwr_ctrl_ded_s ul_pwr_ctrl_ded; + tpc_pdcch_cfg_c tpc_pdcch_cfg_pucch; + tpc_pdcch_cfg_c tpc_pdcch_cfg_pusch; + cqi_report_cfg_s cqi_report_cfg; + srs_ul_cfg_ded_c srs_ul_cfg_ded; + ant_info_c_ ant_info; + sched_request_cfg_c sched_request_cfg; + // ... + // group 0 + bool cqi_report_cfg_v920_present; + bool ant_info_v920_present; + copy_ptr cqi_report_cfg_v920; + copy_ptr ant_info_v920; + // group 1 + bool ant_info_r10_present; + bool ant_info_ul_r10_present; + bool cif_presence_r10_present; + bool cqi_report_cfg_r10_present; + bool csi_rs_cfg_r10_present; + bool pucch_cfg_ded_v1020_present; + bool pusch_cfg_ded_v1020_present; + bool sched_request_cfg_v1020_present; + bool srs_ul_cfg_ded_v1020_present; + bool srs_ul_cfg_ded_aperiodic_r10_present; + bool ul_pwr_ctrl_ded_v1020_present; + copy_ptr ant_info_r10; + copy_ptr ant_info_ul_r10; + bool cif_presence_r10; + copy_ptr cqi_report_cfg_r10; + copy_ptr csi_rs_cfg_r10; + copy_ptr pucch_cfg_ded_v1020; + copy_ptr pusch_cfg_ded_v1020; + copy_ptr sched_request_cfg_v1020; + copy_ptr srs_ul_cfg_ded_v1020; + copy_ptr srs_ul_cfg_ded_aperiodic_r10; + copy_ptr ul_pwr_ctrl_ded_v1020; + // group 2 + bool add_spec_emission_ca_r10_present; + copy_ptr add_spec_emission_ca_r10; + // group 3 + bool csi_rs_cfg_nzp_to_release_list_r11_present; + bool csi_rs_cfg_nzp_to_add_mod_list_r11_present; + bool csi_rs_cfg_zp_to_release_list_r11_present; + bool csi_rs_cfg_zp_to_add_mod_list_r11_present; + bool epdcch_cfg_r11_present; + bool pdsch_cfg_ded_v1130_present; + bool cqi_report_cfg_v1130_present; + bool pucch_cfg_ded_v1130_present; + bool pusch_cfg_ded_v1130_present; + bool ul_pwr_ctrl_ded_v1130_present; + copy_ptr csi_rs_cfg_nzp_to_release_list_r11; + copy_ptr csi_rs_cfg_nzp_to_add_mod_list_r11; + copy_ptr csi_rs_cfg_zp_to_release_list_r11; + copy_ptr csi_rs_cfg_zp_to_add_mod_list_r11; + copy_ptr epdcch_cfg_r11; + copy_ptr pdsch_cfg_ded_v1130; + copy_ptr cqi_report_cfg_v1130; + copy_ptr pucch_cfg_ded_v1130; + copy_ptr pusch_cfg_ded_v1130; + copy_ptr ul_pwr_ctrl_ded_v1130; + // group 4 + bool ant_info_v1250_present; + bool eimta_main_cfg_r12_present; + bool eimta_main_cfg_pcell_r12_present; + bool pucch_cfg_ded_v1250_present; + bool cqi_report_cfg_pcell_v1250_present; + bool ul_pwr_ctrl_ded_v1250_present; + bool pusch_cfg_ded_v1250_present; + bool csi_rs_cfg_v1250_present; + copy_ptr ant_info_v1250; + copy_ptr eimta_main_cfg_r12; + copy_ptr eimta_main_cfg_pcell_r12; + copy_ptr pucch_cfg_ded_v1250; + copy_ptr cqi_report_cfg_pcell_v1250; + copy_ptr ul_pwr_ctrl_ded_v1250; + copy_ptr pusch_cfg_ded_v1250; + copy_ptr csi_rs_cfg_v1250; + // group 5 + bool pdsch_cfg_ded_v1280_present; + copy_ptr pdsch_cfg_ded_v1280; + // group 6 + bool pdsch_cfg_ded_v1310_present; + bool pucch_cfg_ded_r13_present; + bool pusch_cfg_ded_r13_present; + bool pdcch_candidate_reductions_r13_present; + bool cqi_report_cfg_v1310_present; + bool srs_ul_cfg_ded_v1310_present; + bool srs_ul_cfg_ded_up_pts_ext_r13_present; + bool srs_ul_cfg_ded_aperiodic_v1310_present; + bool srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present; + bool csi_rs_cfg_v1310_present; + bool ce_mode_r13_present; + bool csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present; + bool csi_rs_cfg_nzp_to_release_list_ext_r13_present; + copy_ptr pdsch_cfg_ded_v1310; + copy_ptr pucch_cfg_ded_r13; + copy_ptr pusch_cfg_ded_r13; + copy_ptr pdcch_candidate_reductions_r13; + copy_ptr cqi_report_cfg_v1310; + copy_ptr srs_ul_cfg_ded_v1310; + copy_ptr srs_ul_cfg_ded_up_pts_ext_r13; + copy_ptr srs_ul_cfg_ded_aperiodic_v1310; + copy_ptr srs_ul_cfg_ded_aperiodic_up_pts_ext_r13; + copy_ptr csi_rs_cfg_v1310; + copy_ptr ce_mode_r13; + copy_ptr csi_rs_cfg_nzp_to_add_mod_list_ext_r13; + copy_ptr csi_rs_cfg_nzp_to_release_list_ext_r13; + // group 7 + bool cqi_report_cfg_v1320_present; + copy_ptr cqi_report_cfg_v1320; + // group 8 + bool type_a_srs_tpc_pdcch_group_r14_present; + bool must_cfg_r14_present; + bool pusch_enhance_cfg_r14_present; + bool ce_pdsch_pusch_enhancement_cfg_r14_present; + bool ant_info_v1430_present; + bool pucch_cfg_ded_v1430_present; + bool pdsch_cfg_ded_v1430_present; + bool pusch_cfg_ded_v1430_present; + bool srs_ul_periodic_cfg_ded_list_r14_present; + bool srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present; + bool srs_ul_aperiodic_cfg_ded_list_r14_present; + bool srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present; + bool csi_rs_cfg_v1430_present; + bool csi_rs_cfg_zp_ap_list_r14_present; + bool cqi_report_cfg_v1430_present; + bool semi_open_loop_r14_present; + copy_ptr type_a_srs_tpc_pdcch_group_r14; + copy_ptr must_cfg_r14; + copy_ptr pusch_enhance_cfg_r14; + copy_ptr ant_info_v1430; + copy_ptr pucch_cfg_ded_v1430; + copy_ptr pdsch_cfg_ded_v1430; + copy_ptr pusch_cfg_ded_v1430; + copy_ptr srs_ul_periodic_cfg_ded_list_r14; + copy_ptr srs_ul_periodic_cfg_ded_up_pts_ext_list_r14; + copy_ptr srs_ul_aperiodic_cfg_ded_list_r14; + copy_ptr srs_ul_cfg_ded_ap_up_pts_ext_list_r14; + copy_ptr csi_rs_cfg_v1430; + copy_ptr csi_rs_cfg_zp_ap_list_r14; + copy_ptr cqi_report_cfg_v1430; + bool semi_open_loop_r14; + // group 9 + bool csi_rs_cfg_v1480_present; + copy_ptr csi_rs_cfg_v1480; + // group 10 + bool phys_cfg_ded_stti_r15_present; + bool pdsch_cfg_ded_v1530_present; + bool pusch_cfg_ded_v1530_present; + bool cqi_report_cfg_v1530_present; + bool ant_info_v1530_present; + bool csi_rs_cfg_v1530_present; + bool ul_pwr_ctrl_ded_v1530_present; + bool semi_static_cfi_cfg_r15_present; + bool blind_pdsch_repeat_cfg_r15_present; + copy_ptr phys_cfg_ded_stti_r15; + copy_ptr pdsch_cfg_ded_v1530; + copy_ptr pusch_cfg_ded_v1530; + copy_ptr cqi_report_cfg_v1530; + copy_ptr ant_info_v1530; + copy_ptr csi_rs_cfg_v1530; + copy_ptr ul_pwr_ctrl_ded_v1530; + copy_ptr semi_static_cfi_cfg_r15; + copy_ptr blind_pdsch_repeat_cfg_r15; + + // sequence methods + phys_cfg_ded_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLF-TimersAndConstants-r13 ::= CHOICE +struct rlf_timers_and_consts_r13_c { + struct setup_s_ { + struct t301_v1310_e_ { + enum options { ms2500, ms3000, ms3500, ms4000, ms5000, ms6000, ms8000, ms10000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t301_v1310_e_() {} + t301_v1310_e_(options v) : value(v) {} + t301_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t310_v1330_e_ { + enum options { ms4000, ms6000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t310_v1330_e_() {} + t310_v1330_e_(options v) : value(v) {} + t310_v1330_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + t301_v1310_e_ t301_v1310; + // ... + // group 0 + bool t310_v1330_present; + t310_v1330_e_ t310_v1330; + + // sequence methods + setup_s_(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + }; + typedef setup_e types; + + // choice methods + rlf_timers_and_consts_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RLF-TimersAndConstants-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RLF-TimersAndConstants-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RLF-TimersAndConstants-r9 ::= CHOICE +struct rlf_timers_and_consts_r9_c { + struct setup_s_ { + struct t301_r9_e_ { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t301_r9_e_() {} + t301_r9_e_(options v) : value(v) {} + t301_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct t310_r9_e_ { + enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t310_r9_e_() {} + t310_r9_e_(options v) : value(v) {} + t310_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct n310_r9_e_ { + enum options { n1, n2, n3, n4, n6, n8, n10, n20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n310_r9_e_() {} + n310_r9_e_(options v) : value(v) {} + n310_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct t311_r9_e_ { + enum options { ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t311_r9_e_() {} + t311_r9_e_(options v) : value(v) {} + t311_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct n311_r9_e_ { + enum options { n1, n2, n3, n4, n5, n6, n8, n10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n311_r9_e_() {} + n311_r9_e_(options v) : value(v) {} + n311_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + t301_r9_e_ t301_r9; + t310_r9_e_ t310_r9; + n310_r9_e_ n310_r9; + t311_r9_e_ t311_r9; + n311_r9_e_ n311_r9; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + rlf_timers_and_consts_r9_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RLF-TimersAndConstants-r9"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RLF-TimersAndConstants-r9"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RRCConnectionReject-v1020-IEs ::= SEQUENCE +struct rrc_conn_reject_v1020_ies_s { + // member variables + bool extended_wait_time_r10_present; + bool non_crit_ext_present; + uint16_t extended_wait_time_r10; + rrc_conn_reject_v1130_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reject_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPS-Config ::= SEQUENCE +struct sps_cfg_s { + // member variables + bool semi_persist_sched_c_rnti_present; + bool sps_cfg_dl_present; + bool sps_cfg_ul_present; + fixed_bitstring<16> semi_persist_sched_c_rnti; + sps_cfg_dl_c sps_cfg_dl; + sps_cfg_ul_c sps_cfg_ul; + + // sequence methods + sps_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPS-Config-v1430 ::= SEQUENCE +struct sps_cfg_v1430_s { + // member variables + bool ul_sps_v_rnti_r14_present; + bool sl_sps_v_rnti_r14_present; + bool sps_cfg_ul_to_add_mod_list_r14_present; + bool sps_cfg_ul_to_release_list_r14_present; + bool sps_cfg_sl_to_add_mod_list_r14_present; + bool sps_cfg_sl_to_release_list_r14_present; + fixed_bitstring<16> ul_sps_v_rnti_r14; + fixed_bitstring<16> sl_sps_v_rnti_r14; + sps_cfg_ul_to_add_mod_list_r14_l sps_cfg_ul_to_add_mod_list_r14; + sps_cfg_ul_to_release_list_r14_l sps_cfg_ul_to_release_list_r14; + sps_cfg_sl_to_add_mod_list_r14_l sps_cfg_sl_to_add_mod_list_r14; + sps_cfg_sl_to_release_list_r14_l sps_cfg_sl_to_release_list_r14; + + // sequence methods + sps_cfg_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPS-Config-v1530 ::= SEQUENCE +struct sps_cfg_v1530_s { + // member variables + bool semi_persist_sched_c_rnti_r15_present; + bool sps_cfg_dl_present; + bool sps_cfg_ul_stti_to_add_mod_list_r15_present; + bool sps_cfg_ul_stti_to_release_list_r15_present; + bool sps_cfg_ul_to_add_mod_list_r15_present; + bool sps_cfg_ul_to_release_list_r15_present; + fixed_bitstring<16> semi_persist_sched_c_rnti_r15; + sps_cfg_dl_c sps_cfg_dl; + sps_cfg_ul_stti_to_add_mod_list_r15_l sps_cfg_ul_stti_to_add_mod_list_r15; + sps_cfg_ul_stti_to_release_list_r15_l sps_cfg_ul_stti_to_release_list_r15; + sps_cfg_ul_to_add_mod_list_r15_l sps_cfg_ul_to_add_mod_list_r15; + sps_cfg_ul_to_release_list_r15_l sps_cfg_ul_to_release_list_r15; + + // sequence methods + sps_cfg_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRB-ToAddModExtList-r15 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod +typedef fixed_array srb_to_add_mod_ext_list_r15_l; + +// SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod +typedef dyn_array srb_to_add_mod_list_l; + +// SRB-ToReleaseListDupl-r15 ::= SEQUENCE (SIZE (1..2)) OF INTEGER +typedef bounded_array srb_to_release_list_dupl_r15_l; + +// IdleModeMobilityControlInfo ::= SEQUENCE +struct idle_mode_mob_ctrl_info_s { + struct t320_e_ { + enum options { min5, min10, min20, min30, min60, min120, min180, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t320_e_() {} + t320_e_(options v) : value(v) {} + t320_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool freq_prio_list_eutra_present; + bool freq_prio_list_geran_present; + bool freq_prio_list_utra_fdd_present; + bool freq_prio_list_utra_tdd_present; + bool band_class_prio_list_hrpd_present; + bool band_class_prio_list1_xrtt_present; + bool t320_present; + freq_prio_list_eutra_l freq_prio_list_eutra; + freqs_prio_list_geran_l freq_prio_list_geran; + freq_prio_list_utra_fdd_l freq_prio_list_utra_fdd; + freq_prio_list_utra_tdd_l freq_prio_list_utra_tdd; + band_class_prio_list_hrpd_l band_class_prio_list_hrpd; + band_class_prio_list1_xrtt_l band_class_prio_list1_xrtt; + t320_e_ t320; + // ... + // group 0 + bool freq_prio_list_ext_eutra_r12_present; + copy_ptr freq_prio_list_ext_eutra_r12; + // group 1 + bool freq_prio_list_eutra_v1310_present; + bool freq_prio_list_ext_eutra_v1310_present; + copy_ptr freq_prio_list_eutra_v1310; + copy_ptr freq_prio_list_ext_eutra_v1310; + // group 2 + bool freq_prio_list_nr_r15_present; + copy_ptr freq_prio_list_nr_r15; + + // sequence methods + idle_mode_mob_ctrl_info_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IdleModeMobilityControlInfo-v9e0 ::= SEQUENCE +struct idle_mode_mob_ctrl_info_v9e0_s { + typedef dyn_array freq_prio_list_eutra_v9e0_l_; + + // member variables + freq_prio_list_eutra_v9e0_l_ freq_prio_list_eutra_v9e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishment-v8a0-IEs ::= SEQUENCE +struct rrc_conn_reest_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + rrc_conn_reest_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentReject-v8a0-IEs ::= SEQUENCE +struct rrc_conn_reest_reject_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + rrc_conn_reest_reject_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReject-v8a0-IEs ::= SEQUENCE +struct rrc_conn_reject_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_reject_v1020_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reject_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetup-v8a0-IEs ::= SEQUENCE +struct rrc_conn_setup_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + rrc_conn_setup_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigDedicated ::= SEQUENCE +struct rr_cfg_ded_s { + struct mac_main_cfg_c_ { + struct types { + enum options { explicit_value, default_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mac_main_cfg_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mac_main_cfg_s& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "mac-MainConfig"); + return c; + } + const mac_main_cfg_s& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "mac-MainConfig"); + return c; + } + + private: + types type_; + mac_main_cfg_s c; + }; + struct crs_intf_mitig_cfg_r15_c_ { + struct setup_c_ { + struct crs_intf_mitig_num_prbs_r15_e_ { + enum options { n6, n24 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + crs_intf_mitig_num_prbs_r15_e_() {} + crs_intf_mitig_num_prbs_r15_e_(options v) : value(v) {} + crs_intf_mitig_num_prbs_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { crs_intf_mitig_enabled_minus15, crs_intf_mitig_num_prbs_r15, nulltype }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() + { + assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "setup"); + return c; + } + const crs_intf_mitig_num_prbs_r15_e_& crs_intf_mitig_num_prbs_r15() const + { + assert_choice_type("crs-IntfMitigNumPRBs-r15", type_.to_string(), "setup"); + return c; + } + + private: + types type_; + crs_intf_mitig_num_prbs_r15_e_ c; + }; + typedef setup_e types; + + // choice methods + crs_intf_mitig_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "crs-IntfMitigConfig-r15"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "crs-IntfMitigConfig-r15"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + + // member variables + bool ext; + bool srb_to_add_mod_list_present; + bool drb_to_add_mod_list_present; + bool drb_to_release_list_present; + bool mac_main_cfg_present; + bool sps_cfg_present; + bool phys_cfg_ded_present; + 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; + mac_main_cfg_c_ mac_main_cfg; + sps_cfg_s sps_cfg; + phys_cfg_ded_s phys_cfg_ded; + // ... + // group 0 + bool rlf_timers_and_consts_r9_present; + copy_ptr rlf_timers_and_consts_r9; + // group 1 + bool meas_sf_pattern_pcell_r10_present; + copy_ptr meas_sf_pattern_pcell_r10; + // group 2 + bool neigh_cells_crs_info_r11_present; + copy_ptr neigh_cells_crs_info_r11; + // group 3 + bool naics_info_r12_present; + copy_ptr naics_info_r12; + // group 4 + bool neigh_cells_crs_info_r13_present; + bool rlf_timers_and_consts_r13_present; + copy_ptr neigh_cells_crs_info_r13; + copy_ptr rlf_timers_and_consts_r13; + // group 5 + bool sps_cfg_v1430_present; + copy_ptr sps_cfg_v1430; + // group 6 + bool srb_to_add_mod_ext_list_r15_present; + bool srb_to_release_ext_list_r15_present; + bool sps_cfg_v1530_present; + bool crs_intf_mitig_cfg_r15_present; + bool neigh_cells_crs_info_r15_present; + bool drb_to_add_mod_list_r15_present; + bool drb_to_release_list_r15_present; + bool srb_to_release_list_dupl_r15_present; + copy_ptr srb_to_add_mod_ext_list_r15; + uint8_t srb_to_release_ext_list_r15; + copy_ptr sps_cfg_v1530; + copy_ptr crs_intf_mitig_cfg_r15; + copy_ptr neigh_cells_crs_info_r15; + copy_ptr drb_to_add_mod_list_r15; + copy_ptr drb_to_release_list_r15; + copy_ptr srb_to_release_list_dupl_r15; + + // sequence methods + rr_cfg_ded_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RedirectedCarrierInfo-r15-IEs ::= CHOICE +struct redirected_carrier_info_r15_ies_c { + struct types { + enum options { + eutra_r15, + geran_r15, + utra_fdd_r15, + cdma2000_hrpd_r15, + cdma2000_minus1x_rtt_r15, + utra_tdd_r15, + nulltype + }; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + redirected_carrier_info_r15_ies_c() : type_(types::nulltype) {} + redirected_carrier_info_r15_ies_c(const redirected_carrier_info_r15_ies_c& other); + redirected_carrier_info_r15_ies_c& operator=(const redirected_carrier_info_r15_ies_c& other); + ~redirected_carrier_info_r15_ies_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint32_t& eutra_r15() + { + assert_choice_type("eutra-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + carrier_freqs_geran_s& geran_r15() + { + assert_choice_type("geran-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + uint16_t& utra_fdd_r15() + { + assert_choice_type("utra-FDD-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + carrier_freq_cdma2000_s& cdma2000_hrpd_r15() + { + assert_choice_type("cdma2000-HRPD-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + carrier_freq_cdma2000_s& cdma2000_minus1x_rtt_r15() + { + assert_choice_type("cdma2000-1xRTT-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + carrier_freq_list_utra_tdd_r10_l& utra_tdd_r15() + { + assert_choice_type("utra-TDD-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + const uint32_t& eutra_r15() const + { + assert_choice_type("eutra-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + const carrier_freqs_geran_s& geran_r15() const + { + assert_choice_type("geran-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + const uint16_t& utra_fdd_r15() const + { + assert_choice_type("utra-FDD-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + const carrier_freq_cdma2000_s& cdma2000_hrpd_r15() const + { + assert_choice_type("cdma2000-HRPD-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + const carrier_freq_cdma2000_s& cdma2000_minus1x_rtt_r15() const + { + assert_choice_type("cdma2000-1xRTT-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + const carrier_freq_list_utra_tdd_r10_l& utra_tdd_r15() const + { + assert_choice_type("utra-TDD-r15", type_.to_string(), "RedirectedCarrierInfo-r15-IEs"); + return c.get(); + } + +private: + types type_; + choice_buffer_t + c; + + void destroy_(); +}; + +// RRCConnectionReestablishment-r8-IEs ::= SEQUENCE +struct rrc_conn_reest_r8_ies_s { + // member variables + bool non_crit_ext_present; + rr_cfg_ded_s rr_cfg_ded; + uint8_t next_hop_chaining_count; + rrc_conn_reest_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentReject-r8-IEs ::= SEQUENCE +struct rrc_conn_reest_reject_r8_ies_s { + // member variables + bool non_crit_ext_present; + rrc_conn_reest_reject_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_reject_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReject-r8-IEs ::= SEQUENCE +struct rrc_conn_reject_r8_ies_s { + // member variables + bool non_crit_ext_present; + uint8_t wait_time; + rrc_conn_reject_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reject_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetup-r8-IEs ::= SEQUENCE +struct rrc_conn_setup_r8_ies_s { + // member variables + bool non_crit_ext_present; + rr_cfg_ded_s rr_cfg_ded; + rrc_conn_setup_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCEarlyDataComplete-r15-IEs ::= SEQUENCE +struct rrc_early_data_complete_r15_ies_s { + // member variables + bool ded_info_nas_r15_present; + bool extended_wait_time_r15_present; + bool idle_mode_mob_ctrl_info_r15_present; + bool idle_mode_mob_ctrl_info_ext_r15_present; + bool redirected_carrier_info_r15_present; + bool non_crit_ext_present; + dyn_octstring ded_info_nas_r15; + uint16_t extended_wait_time_r15; + idle_mode_mob_ctrl_info_s idle_mode_mob_ctrl_info_r15; + idle_mode_mob_ctrl_info_v9e0_s idle_mode_mob_ctrl_info_ext_r15; + redirected_carrier_info_r15_ies_c redirected_carrier_info_r15; + + // sequence methods + rrc_early_data_complete_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +struct c1_or_crit_ext_e { + enum options { c1, crit_exts_future, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + c1_or_crit_ext_e() {} + c1_or_crit_ext_e(options v) : value(v) {} + c1_or_crit_ext_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// RRCConnectionReestablishment ::= SEQUENCE +struct rrc_conn_reest_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_reest_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reest_r8_ies_s& rrc_conn_reest_r8() + { + assert_choice_type("rrcConnectionReestablishment-r8", type_.to_string(), "c1"); + return c; + } + const rrc_conn_reest_r8_ies_s& rrc_conn_reest_r8() const + { + assert_choice_type("rrcConnectionReestablishment-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_reest_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentReject ::= SEQUENCE +struct rrc_conn_reest_reject_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_reest_reject_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reest_reject_r8_ies_s& rrc_conn_reest_reject_r8() + { + assert_choice_type("rrcConnectionReestablishmentReject-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_reest_reject_r8_ies_s& rrc_conn_reest_reject_r8() const + { + assert_choice_type("rrcConnectionReestablishmentReject-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReject ::= SEQUENCE +struct rrc_conn_reject_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_reject_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reject_r8_ies_s& rrc_conn_reject_r8() + { + assert_choice_type("rrcConnectionReject-r8", type_.to_string(), "c1"); + return c; + } + const rrc_conn_reject_r8_ies_s& rrc_conn_reject_r8() const + { + assert_choice_type("rrcConnectionReject-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_reject_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetup ::= SEQUENCE +struct rrc_conn_setup_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_setup_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_setup_r8_ies_s& rrc_conn_setup_r8() + { + assert_choice_type("rrcConnectionSetup-r8", type_.to_string(), "c1"); + return c; + } + const rrc_conn_setup_r8_ies_s& rrc_conn_setup_r8() const + { + assert_choice_type("rrcConnectionSetup-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_setup_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCEarlyDataComplete-r15 ::= SEQUENCE +struct rrc_early_data_complete_r15_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_early_data_complete_r15, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_early_data_complete_r15_ies_s& rrc_early_data_complete_r15() + { + assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_early_data_complete_r15_ies_s& rrc_early_data_complete_r15() const + { + assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-CCCH-MessageType ::= CHOICE +struct dl_ccch_msg_type_c { + struct c1_c_ { + struct types { + enum options { rrc_conn_reest, rrc_conn_reest_reject, rrc_conn_reject, rrc_conn_setup, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reest_s& rrc_conn_reest() + { + assert_choice_type("rrcConnectionReestablishment", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_reest_reject_s& rrc_conn_reest_reject() + { + assert_choice_type("rrcConnectionReestablishmentReject", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_reject_s& rrc_conn_reject() + { + assert_choice_type("rrcConnectionReject", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_setup_s& rrc_conn_setup() + { + assert_choice_type("rrcConnectionSetup", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_reest_s& rrc_conn_reest() const + { + assert_choice_type("rrcConnectionReestablishment", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_reest_reject_s& rrc_conn_reest_reject() const + { + assert_choice_type("rrcConnectionReestablishmentReject", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_reject_s& rrc_conn_reject() const + { + assert_choice_type("rrcConnectionReject", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_setup_s& rrc_conn_setup() const + { + assert_choice_type("rrcConnectionSetup", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + struct msg_class_ext_c_ { + struct c2_c_ { + struct types { + enum options { rrc_early_data_complete_r15, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c2_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_early_data_complete_r15_s& rrc_early_data_complete_r15() + { + assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "c2"); + return c; + } + const rrc_early_data_complete_r15_s& rrc_early_data_complete_r15() const + { + assert_choice_type("rrcEarlyDataComplete-r15", type_.to_string(), "c2"); + return c; + } + + private: + types type_; + rrc_early_data_complete_r15_s c; + }; + struct types { + enum options { c2, msg_class_ext_future_r15, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + msg_class_ext_c_() : type_(types::nulltype) {} + msg_class_ext_c_(const msg_class_ext_c_& other); + msg_class_ext_c_& operator=(const msg_class_ext_c_& other); + ~msg_class_ext_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c2_c_& c2() + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + const c2_c_& c2() const + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + dl_ccch_msg_type_c() : type_(types::nulltype) {} + dl_ccch_msg_type_c(const dl_ccch_msg_type_c& other); + dl_ccch_msg_type_c& operator=(const dl_ccch_msg_type_c& other); + ~dl_ccch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "DL-CCCH-MessageType"); + return c.get(); + } + msg_class_ext_c_& msg_class_ext() + { + assert_choice_type("messageClassExtension", type_.to_string(), "DL-CCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "DL-CCCH-MessageType"); + return c.get(); + } + const msg_class_ext_c_& msg_class_ext() const + { + assert_choice_type("messageClassExtension", type_.to_string(), "DL-CCCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// DL-CCCH-Message ::= SEQUENCE +struct dl_ccch_msg_s { + // member variables + dl_ccch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCCH-CandidateReductionValue-r14 ::= ENUMERATED +struct pdcch_candidate_reduction_value_r14_e { + enum options { n0, n50, n100, n150 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pdcch_candidate_reduction_value_r14_e() {} + pdcch_candidate_reduction_value_r14_e(options v) : value(v) {} + pdcch_candidate_reduction_value_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// PDCCH-CandidateReductionsLAA-UL-r14 ::= CHOICE +struct pdcch_candidate_reductions_laa_ul_r14_c { + struct setup_s_ { + // member variables + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al1_r14; + pdcch_candidate_reduction_value_r13_e pdcch_candidate_reduction_al2_r14; + pdcch_candidate_reduction_value_r14_e pdcch_candidate_reduction_al3_r14; + pdcch_candidate_reduction_value_r14_e pdcch_candidate_reduction_al4_r14; + pdcch_candidate_reduction_value_r14_e pdcch_candidate_reduction_al5_r14; + }; + typedef setup_e types; + + // choice methods + pdcch_candidate_reductions_laa_ul_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "PDCCH-CandidateReductionsLAA-UL-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "PDCCH-CandidateReductionsLAA-UL-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// AUL-Config-r15 ::= CHOICE +struct aul_cfg_r15_c { + struct setup_s_ { + struct tx_mode_ul_aul_r15_e_ { + enum options { tm1, tm2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_mode_ul_aul_r15_e_() {} + tx_mode_ul_aul_r15_e_(options v) : value(v) {} + tx_mode_ul_aul_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct aul_start_partial_bw_inside_mcot_r15_e_ { + enum options { o34, o43, o52, o61, o_os1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + aul_start_partial_bw_inside_mcot_r15_e_() {} + aul_start_partial_bw_inside_mcot_r15_e_(options v) : value(v) {} + aul_start_partial_bw_inside_mcot_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct aul_start_partial_bw_outside_mcot_r15_e_ { + enum options { o16, o25, o34, o43, o52, o61, o_os1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + aul_start_partial_bw_outside_mcot_r15_e_() {} + aul_start_partial_bw_outside_mcot_r15_e_(options v) : value(v) {} + aul_start_partial_bw_outside_mcot_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct aul_retx_timer_r15_e_ { + enum options { + psf4, + psf5, + psf6, + psf8, + psf10, + psf12, + psf20, + psf28, + psf37, + psf44, + psf68, + psf84, + psf100, + psf116, + psf132, + psf164, + psf324 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 17, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + aul_retx_timer_r15_e_() {} + aul_retx_timer_r15_e_(options v) : value(v) {} + aul_retx_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct contention_win_size_timer_r15_e_ { + enum options { n0, n5, n10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + contention_win_size_timer_r15_e_() {} + contention_win_size_timer_r15_e_(options v) : value(v) {} + contention_win_size_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + fixed_bitstring<16> aul_crnti_r15; + fixed_bitstring<40> aul_sfs_r15; + uint8_t aul_harq_processes_r15; + tx_mode_ul_aul_r15_e_ tx_mode_ul_aul_r15; + fixed_bitstring<5> aul_start_full_bw_inside_mcot_r15; + fixed_bitstring<7> aul_start_full_bw_outside_mcot_r15; + aul_start_partial_bw_inside_mcot_r15_e_ aul_start_partial_bw_inside_mcot_r15; + aul_start_partial_bw_outside_mcot_r15_e_ aul_start_partial_bw_outside_mcot_r15; + aul_retx_timer_r15_e_ aul_retx_timer_r15; + uint8_t ending_symbol_aul_r15; + uint8_t sf_offset_cot_sharing_r15; + contention_win_size_timer_r15_e_ contention_win_size_timer_r15; + }; + typedef setup_e types; + + // choice methods + aul_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "AUL-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "AUL-Config-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportPeriodicSCell-r15 ::= CHOICE +struct cqi_report_periodic_scell_r15_c { + struct setup_s_ { + struct csi_sf_pattern_dormant_r15_c_ { + struct setup_s_ { + // member variables + meas_sf_pattern_r10_c csi_meas_sf_set1_r15; + meas_sf_pattern_r10_c csi_meas_sf_set2_r15; + }; + typedef setup_e types; + + // choice methods + csi_sf_pattern_dormant_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "csi-SubframePatternDormant-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "csi-SubframePatternDormant-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct cqi_format_ind_dormant_r15_c_ { + struct wideband_cqi_r15_s_ { + struct csi_report_mode_r15_e_ { + enum options { submode1, submode2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_report_mode_r15_e_() {} + csi_report_mode_r15_e_(options v) : value(v) {} + csi_report_mode_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_report_mode_r15_present; + csi_report_mode_r15_e_ csi_report_mode_r15; + + // sequence methods + wideband_cqi_r15_s_(); + }; + struct subband_cqi_r15_s_ { + struct periodicity_factor_r15_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_factor_r15_e_() {} + periodicity_factor_r15_e_(options v) : value(v) {} + periodicity_factor_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t k_r15; + periodicity_factor_r15_e_ periodicity_factor_r15; + }; + struct types { + enum options { wideband_cqi_r15, subband_cqi_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cqi_format_ind_dormant_r15_c_() : type_(types::nulltype) {} + cqi_format_ind_dormant_r15_c_(const cqi_format_ind_dormant_r15_c_& other); + cqi_format_ind_dormant_r15_c_& operator=(const cqi_format_ind_dormant_r15_c_& other); + ~cqi_format_ind_dormant_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + wideband_cqi_r15_s_& wideband_cqi_r15() + { + assert_choice_type("widebandCQI-r15", type_.to_string(), "cqi-FormatIndicatorDormant-r15"); + return c.get(); + } + subband_cqi_r15_s_& subband_cqi_r15() + { + assert_choice_type("subbandCQI-r15", type_.to_string(), "cqi-FormatIndicatorDormant-r15"); + return c.get(); + } + const wideband_cqi_r15_s_& wideband_cqi_r15() const + { + assert_choice_type("widebandCQI-r15", type_.to_string(), "cqi-FormatIndicatorDormant-r15"); + return c.get(); + } + const subband_cqi_r15_s_& subband_cqi_r15() const + { + assert_choice_type("subbandCQI-r15", type_.to_string(), "cqi-FormatIndicatorDormant-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ri_cfg_idx_dormant_r15_present; + bool csi_sf_pattern_dormant_r15_present; + bool cqi_format_ind_dormant_r15_present; + uint16_t cqi_pmi_cfg_idx_dormant_r15; + uint16_t ri_cfg_idx_dormant_r15; + csi_sf_pattern_dormant_r15_c_ csi_sf_pattern_dormant_r15; + cqi_format_ind_dormant_r15_c_ cqi_format_ind_dormant_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_report_periodic_scell_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportPeriodicSCell-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ReportPeriodicSCell-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CrossCarrierSchedulingConfigLAA-UL-r14 ::= SEQUENCE +struct cross_carrier_sched_cfg_laa_ul_r14_s { + // member variables + uint8_t sched_cell_id_r14; + uint8_t cif_in_sched_cell_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LBT-Config-r14 ::= CHOICE +struct lbt_cfg_r14_c { + struct types { + enum options { max_energy_detection_thres_r14, energy_detection_thres_offset_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + lbt_cfg_r14_c() : type_(types::nulltype) {} + lbt_cfg_r14_c(const lbt_cfg_r14_c& other); + lbt_cfg_r14_c& operator=(const lbt_cfg_r14_c& other); + ~lbt_cfg_r14_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + int8_t& max_energy_detection_thres_r14() + { + assert_choice_type("maxEnergyDetectionThreshold-r14", type_.to_string(), "LBT-Config-r14"); + return c.get(); + } + int8_t& energy_detection_thres_offset_r14() + { + assert_choice_type("energyDetectionThresholdOffset-r14", type_.to_string(), "LBT-Config-r14"); + return c.get(); + } + const int8_t& max_energy_detection_thres_r14() const + { + assert_choice_type("maxEnergyDetectionThreshold-r14", type_.to_string(), "LBT-Config-r14"); + return c.get(); + } + const int8_t& energy_detection_thres_offset_r14() const + { + assert_choice_type("energyDetectionThresholdOffset-r14", type_.to_string(), "LBT-Config-r14"); + return c.get(); + } + +private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); +}; + +// PDCCH-ConfigLAA-r14 ::= SEQUENCE +struct pdcch_cfg_laa_r14_s { + struct max_nof_sched_sfs_format0_b_r14_e_ { + enum options { sf2, sf3, sf4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_nof_sched_sfs_format0_b_r14_e_() {} + max_nof_sched_sfs_format0_b_r14_e_(options v) : value(v) {} + max_nof_sched_sfs_format0_b_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct max_nof_sched_sfs_format4_b_r14_e_ { + enum options { sf2, sf3, sf4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_nof_sched_sfs_format4_b_r14_e_() {} + max_nof_sched_sfs_format4_b_r14_e_(options v) : value(v) {} + max_nof_sched_sfs_format4_b_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool max_nof_sched_sfs_format0_b_r14_present; + bool max_nof_sched_sfs_format4_b_r14_present; + bool skip_monitoring_dci_format0_a_r14_present; + bool skip_monitoring_dci_format4_a_r14_present; + bool pdcch_candidate_reductions_format0_a_r14_present; + bool pdcch_candidate_reductions_format4_a_r14_present; + bool pdcch_candidate_reductions_format0_b_r14_present; + bool pdcch_candidate_reductions_format4_b_r14_present; + max_nof_sched_sfs_format0_b_r14_e_ max_nof_sched_sfs_format0_b_r14; + max_nof_sched_sfs_format4_b_r14_e_ max_nof_sched_sfs_format4_b_r14; + pdcch_candidate_reductions_r13_c pdcch_candidate_reductions_format0_a_r14; + pdcch_candidate_reductions_laa_ul_r14_c pdcch_candidate_reductions_format4_a_r14; + pdcch_candidate_reductions_laa_ul_r14_c pdcch_candidate_reductions_format0_b_r14; + pdcch_candidate_reductions_laa_ul_r14_c pdcch_candidate_reductions_format4_b_r14; + + // sequence methods + pdcch_cfg_laa_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ModeConfigLAA-r15 ::= SEQUENCE +struct pusch_mode_cfg_laa_r15_s { + // member variables + bool laa_pusch_mode1; + bool laa_pusch_mode2; + bool laa_pusch_mode3; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SoundingRS-UL-ConfigDedicatedAperiodic-v1430 ::= CHOICE +struct srs_ul_cfg_ded_aperiodic_v1430_c { + struct setup_s_ { + // member variables + bool srs_sf_ind_r14_present; + uint8_t srs_sf_ind_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + srs_ul_cfg_ded_aperiodic_v1430_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodic-v1430"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SoundingRS-UL-ConfigDedicatedAperiodic-v1430"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CQI-ReportConfigSCell-r10 ::= SEQUENCE +struct cqi_report_cfg_scell_r10_s { + // member variables + bool cqi_report_mode_aperiodic_r10_present; + bool cqi_report_periodic_scell_r10_present; + bool pmi_ri_report_r10_present; + cqi_report_mode_aperiodic_e cqi_report_mode_aperiodic_r10; + int8_t nom_pdsch_rs_epre_offset_r10; + cqi_report_periodic_r10_c cqi_report_periodic_scell_r10; + + // sequence methods + cqi_report_cfg_scell_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ReportConfigSCell-r15 ::= SEQUENCE +struct cqi_report_cfg_scell_r15_s { + struct alt_cqi_table_minus1024_qam_r15_e_ { + enum options { all_sfs, csi_sf_set1, csi_sf_set2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + alt_cqi_table_minus1024_qam_r15_e_() {} + alt_cqi_table_minus1024_qam_r15_e_(options v) : value(v) {} + alt_cqi_table_minus1024_qam_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool cqi_report_periodic_scell_r15_present; + bool alt_cqi_table_minus1024_qam_r15_present; + cqi_report_periodic_scell_r15_c cqi_report_periodic_scell_r15; + alt_cqi_table_minus1024_qam_r15_e_ alt_cqi_table_minus1024_qam_r15; + + // sequence methods + cqi_report_cfg_scell_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CQI-ShortConfigSCell-r15 ::= CHOICE +struct cqi_short_cfg_scell_r15_c { + struct setup_s_ { + struct cqi_format_ind_short_r15_c_ { + struct wideband_cqi_short_r15_s_ { + struct csi_report_mode_short_r15_e_ { + enum options { submode1, submode2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_report_mode_short_r15_e_() {} + csi_report_mode_short_r15_e_(options v) : value(v) {} + csi_report_mode_short_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_report_mode_short_r15_present; + csi_report_mode_short_r15_e_ csi_report_mode_short_r15; + + // sequence methods + wideband_cqi_short_r15_s_(); + }; + struct subband_cqi_short_r15_s_ { + struct periodicity_factor_r15_e_ { + enum options { n2, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodicity_factor_r15_e_() {} + periodicity_factor_r15_e_(options v) : value(v) {} + periodicity_factor_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t k_r15; + periodicity_factor_r15_e_ periodicity_factor_r15; + }; + struct types { + enum options { wideband_cqi_short_r15, subband_cqi_short_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cqi_format_ind_short_r15_c_() : type_(types::nulltype) {} + cqi_format_ind_short_r15_c_(const cqi_format_ind_short_r15_c_& other); + cqi_format_ind_short_r15_c_& operator=(const cqi_format_ind_short_r15_c_& other); + ~cqi_format_ind_short_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + wideband_cqi_short_r15_s_& wideband_cqi_short_r15() + { + assert_choice_type("widebandCQI-Short-r15", type_.to_string(), "cqi-FormatIndicatorShort-r15"); + return c.get(); + } + subband_cqi_short_r15_s_& subband_cqi_short_r15() + { + assert_choice_type("subbandCQI-Short-r15", type_.to_string(), "cqi-FormatIndicatorShort-r15"); + return c.get(); + } + const wideband_cqi_short_r15_s_& wideband_cqi_short_r15() const + { + assert_choice_type("widebandCQI-Short-r15", type_.to_string(), "cqi-FormatIndicatorShort-r15"); + return c.get(); + } + const subband_cqi_short_r15_s_& subband_cqi_short_r15() const + { + assert_choice_type("subbandCQI-Short-r15", type_.to_string(), "cqi-FormatIndicatorShort-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ri_cfg_idx_short_r15_present; + bool cqi_format_ind_short_r15_present; + uint16_t cqi_pmi_cfg_idx_short_r15; + uint16_t ri_cfg_idx_short_r15; + cqi_format_ind_short_r15_c_ cqi_format_ind_short_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + cqi_short_cfg_scell_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "CQI-ShortConfigSCell-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "CQI-ShortConfigSCell-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// CrossCarrierSchedulingConfig-r10 ::= SEQUENCE +struct cross_carrier_sched_cfg_r10_s { + struct sched_cell_info_r10_c_ { + struct own_r10_s_ { + // member variables + bool cif_presence_r10; + }; + struct other_r10_s_ { + // member variables + uint8_t sched_cell_id_r10; + uint8_t pdsch_start_r10; + }; + struct types { + enum options { own_r10, other_r10, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sched_cell_info_r10_c_() : type_(types::nulltype) {} + sched_cell_info_r10_c_(const sched_cell_info_r10_c_& other); + sched_cell_info_r10_c_& operator=(const sched_cell_info_r10_c_& other); + ~sched_cell_info_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + own_r10_s_& own_r10() + { + assert_choice_type("own-r10", type_.to_string(), "schedulingCellInfo-r10"); + return c.get(); + } + other_r10_s_& other_r10() + { + assert_choice_type("other-r10", type_.to_string(), "schedulingCellInfo-r10"); + return c.get(); + } + const own_r10_s_& own_r10() const + { + assert_choice_type("own-r10", type_.to_string(), "schedulingCellInfo-r10"); + return c.get(); + } + const other_r10_s_& other_r10() const + { + assert_choice_type("other-r10", type_.to_string(), "schedulingCellInfo-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + sched_cell_info_r10_c_ sched_cell_info_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CrossCarrierSchedulingConfig-r13 ::= SEQUENCE +struct cross_carrier_sched_cfg_r13_s { + struct sched_cell_info_r13_c_ { + struct own_r13_s_ { + // member variables + bool cif_presence_r13; + }; + struct other_r13_s_ { + // member variables + uint8_t sched_cell_id_r13; + uint8_t pdsch_start_r13; + uint8_t cif_in_sched_cell_r13; + }; + struct types { + enum options { own_r13, other_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sched_cell_info_r13_c_() : type_(types::nulltype) {} + sched_cell_info_r13_c_(const sched_cell_info_r13_c_& other); + sched_cell_info_r13_c_& operator=(const sched_cell_info_r13_c_& other); + ~sched_cell_info_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + own_r13_s_& own_r13() + { + assert_choice_type("own-r13", type_.to_string(), "schedulingCellInfo-r13"); + return c.get(); + } + other_r13_s_& other_r13() + { + assert_choice_type("other-r13", type_.to_string(), "schedulingCellInfo-r13"); + return c.get(); + } + const own_r13_s_& own_r13() const + { + assert_choice_type("own-r13", type_.to_string(), "schedulingCellInfo-r13"); + return c.get(); + } + const other_r13_s_& other_r13() const + { + assert_choice_type("other-r13", type_.to_string(), "schedulingCellInfo-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + sched_cell_info_r13_c_ sched_cell_info_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DeltaFList-SPUCCH-r15 ::= CHOICE +struct delta_flist_spucch_r15_c { + struct setup_s_ { + struct delta_f_slot_spucch_format1_r15_e_ { + enum options { delta_f_minus1, delta_f0, delta_f1, delta_f2, delta_f3, delta_f4, delta_f5, delta_f6 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_slot_spucch_format1_r15_e_() {} + delta_f_slot_spucch_format1_r15_e_(options v) : value(v) {} + delta_f_slot_spucch_format1_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_slot_spucch_format1a_r15_e_ { + enum options { delta_f1, delta_f2, delta_f3, delta_f4, delta_f5, delta_f6, delta_f7, delta_f8 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_slot_spucch_format1a_r15_e_() {} + delta_f_slot_spucch_format1a_r15_e_(options v) : value(v) {} + delta_f_slot_spucch_format1a_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_slot_spucch_format1b_r15_e_ { + enum options { delta_f3, delta_f4, delta_f5, delta_f6, delta_f7, delta_f8, delta_f9, delta_f10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_slot_spucch_format1b_r15_e_() {} + delta_f_slot_spucch_format1b_r15_e_(options v) : value(v) {} + delta_f_slot_spucch_format1b_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_slot_spucch_format3_r15_e_ { + enum options { delta_f4, delta_f5, delta_f6, delta_f7, delta_f8, delta_f9, delta_f10, delta_f11 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_slot_spucch_format3_r15_e_() {} + delta_f_slot_spucch_format3_r15_e_(options v) : value(v) {} + delta_f_slot_spucch_format3_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_slot_spucch_rm_format4_r15_e_ { + enum options { delta_f13, delta_f14, delta_f15, delta_f16, delta_f17, delta_f18, delta_f19, delta_f20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_slot_spucch_rm_format4_r15_e_() {} + delta_f_slot_spucch_rm_format4_r15_e_(options v) : value(v) {} + delta_f_slot_spucch_rm_format4_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_slot_spucch_tbcc_format4_r15_e_ { + enum options { delta_f10, delta_f11, delta_f12, delta_f13, delta_f14, delta_f15, delta_f16, delta_f17 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_slot_spucch_tbcc_format4_r15_e_() {} + delta_f_slot_spucch_tbcc_format4_r15_e_(options v) : value(v) {} + delta_f_slot_spucch_tbcc_format4_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_subslot_spucch_format1and1a_r15_e_ { + enum options { delta_f5, delta_f6, delta_f7, delta_f8, delta_f9, delta_f10, delta_f11, delta_f12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_subslot_spucch_format1and1a_r15_e_() {} + delta_f_subslot_spucch_format1and1a_r15_e_(options v) : value(v) {} + delta_f_subslot_spucch_format1and1a_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_subslot_spucch_format1b_r15_e_ { + enum options { delta_f6, delta_f7, delta_f8, delta_f9, delta_f10, delta_f11, delta_f12, delta_f13 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_subslot_spucch_format1b_r15_e_() {} + delta_f_subslot_spucch_format1b_r15_e_(options v) : value(v) {} + delta_f_subslot_spucch_format1b_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_subslot_spucch_rm_format4_r15_e_ { + enum options { delta_f15, delta_f16, delta_f17, delta_f18, delta_f19, delta_f20, delta_f21, delta_f22 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_subslot_spucch_rm_format4_r15_e_() {} + delta_f_subslot_spucch_rm_format4_r15_e_(options v) : value(v) {} + delta_f_subslot_spucch_rm_format4_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_subslot_spucch_tbcc_format4_r15_e_ { + enum options { delta_f10, delta_f11, delta_f12, delta_f13, delta_f14, delta_f15, delta_f16, delta_f17 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_subslot_spucch_tbcc_format4_r15_e_() {} + delta_f_subslot_spucch_tbcc_format4_r15_e_(options v) : value(v) {} + delta_f_subslot_spucch_tbcc_format4_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool delta_f_slot_spucch_format1_r15_present; + bool delta_f_slot_spucch_format1a_r15_present; + bool delta_f_slot_spucch_format1b_r15_present; + bool delta_f_slot_spucch_format3_r15_present; + bool delta_f_slot_spucch_rm_format4_r15_present; + bool delta_f_slot_spucch_tbcc_format4_r15_present; + bool delta_f_subslot_spucch_format1and1a_r15_present; + bool delta_f_subslot_spucch_format1b_r15_present; + bool delta_f_subslot_spucch_rm_format4_r15_present; + bool delta_f_subslot_spucch_tbcc_format4_r15_present; + delta_f_slot_spucch_format1_r15_e_ delta_f_slot_spucch_format1_r15; + delta_f_slot_spucch_format1a_r15_e_ delta_f_slot_spucch_format1a_r15; + delta_f_slot_spucch_format1b_r15_e_ delta_f_slot_spucch_format1b_r15; + delta_f_slot_spucch_format3_r15_e_ delta_f_slot_spucch_format3_r15; + delta_f_slot_spucch_rm_format4_r15_e_ delta_f_slot_spucch_rm_format4_r15; + delta_f_slot_spucch_tbcc_format4_r15_e_ delta_f_slot_spucch_tbcc_format4_r15; + delta_f_subslot_spucch_format1and1a_r15_e_ delta_f_subslot_spucch_format1and1a_r15; + delta_f_subslot_spucch_format1b_r15_e_ delta_f_subslot_spucch_format1b_r15; + delta_f_subslot_spucch_rm_format4_r15_e_ delta_f_subslot_spucch_rm_format4_r15; + delta_f_subslot_spucch_tbcc_format4_r15_e_ delta_f_subslot_spucch_tbcc_format4_r15; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + delta_flist_spucch_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "DeltaFList-SPUCCH-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "DeltaFList-SPUCCH-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// LAA-SCellConfiguration-r13 ::= SEQUENCE +struct laa_scell_cfg_r13_s { + struct sf_start_position_r13_e_ { + enum options { s0, s07 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_start_position_r13_e_() {} + sf_start_position_r13_e_(options v) : value(v) {} + sf_start_position_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + sf_start_position_r13_e_ sf_start_position_r13; + fixed_bitstring<8> laa_scell_sf_cfg_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LAA-SCellConfiguration-v1430 ::= SEQUENCE +struct laa_scell_cfg_v1430_s { + struct cross_carrier_sched_cfg_ul_r14_c_ { + struct setup_s_ { + // member variables + cross_carrier_sched_cfg_laa_ul_r14_s cross_carrier_sched_cfg_laa_ul_r14; + }; + typedef setup_e types; + + // choice methods + cross_carrier_sched_cfg_ul_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "crossCarrierSchedulingConfig-UL-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "crossCarrierSchedulingConfig-UL-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool cross_carrier_sched_cfg_ul_r14_present; + bool lbt_cfg_r14_present; + bool pdcch_cfg_laa_r14_present; + bool absence_of_any_other_technology_r14_present; + bool srs_ul_cfg_ded_aperiodic_v1430_present; + cross_carrier_sched_cfg_ul_r14_c_ cross_carrier_sched_cfg_ul_r14; + lbt_cfg_r14_c lbt_cfg_r14; + pdcch_cfg_laa_r14_s pdcch_cfg_laa_r14; + srs_ul_cfg_ded_aperiodic_v1430_c srs_ul_cfg_ded_aperiodic_v1430; + + // sequence methods + laa_scell_cfg_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LAA-SCellConfiguration-v1530 ::= SEQUENCE +struct laa_scell_cfg_v1530_s { + // member variables + bool aul_cfg_r15_present; + bool pusch_mode_cfg_laa_r15_present; + aul_cfg_r15_c aul_cfg_r15; + pusch_mode_cfg_laa_r15_s pusch_mode_cfg_laa_r15; + + // sequence methods + laa_scell_cfg_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCCH-ConfigSCell-r13 ::= SEQUENCE +struct pdcch_cfg_scell_r13_s { + // member variables + bool skip_monitoring_dci_format0_minus1_a_r13_present; + + // sequence methods + pdcch_cfg_scell_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigDedicatedSCell-v1430 ::= SEQUENCE +struct pdsch_cfg_ded_scell_v1430_s { + // member variables + bool tbs_idx_alt2_r14_present; + + // sequence methods + pdsch_cfg_ded_scell_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigDedicated-v1370 ::= SEQUENCE +struct pucch_cfg_ded_v1370_s { + struct pucch_format_v1370_c_ { + typedef setup_e types; + + // choice methods + pucch_format_v1370_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + pucch_format3_conf_r13_s& setup() + { + assert_choice_type("setup", type_.to_string(), "pucch-Format-v1370"); + return c; + } + const pucch_format3_conf_r13_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "pucch-Format-v1370"); + return c; + } + + private: + types type_; + pucch_format3_conf_r13_s c; + }; + + // member variables + pucch_format_v1370_c_ pucch_format_v1370; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicatedSCell-r10 ::= SEQUENCE +struct pusch_cfg_ded_scell_r10_s { + // member variables + bool group_hop_disabled_r10_present; + bool dmrs_with_occ_activ_r10_present; + + // sequence methods + pusch_cfg_ded_scell_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicatedSCell-v1430 ::= SEQUENCE +struct pusch_cfg_ded_scell_v1430_s { + // member variables + bool enable256_qam_r14_present; + enable256_qam_r14_c enable256_qam_r14; + + // sequence methods + pusch_cfg_ded_scell_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigDedicatedScell-v1530 ::= SEQUENCE +struct pusch_cfg_ded_scell_v1530_s { + struct uci_on_pusch_r15_c_ { + struct setup_s_ { + // member variables + uint8_t beta_offset_aul_r15; + }; + typedef setup_e types; + + // choice methods + uci_on_pusch_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "uci-OnPUSCH-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "uci-OnPUSCH-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + uci_on_pusch_r15_c_ uci_on_pusch_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingRequestConfigSCell-r13 ::= CHOICE +struct sched_request_cfg_scell_r13_c { + struct setup_s_ { + struct dsr_trans_max_r13_e_ { + enum options { n4, n8, n16, n32, n64, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dsr_trans_max_r13_e_() {} + dsr_trans_max_r13_e_(options v) : value(v) {} + dsr_trans_max_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool sr_pucch_res_idx_p1_r13_present; + uint16_t sr_pucch_res_idx_r13; + uint16_t sr_pucch_res_idx_p1_r13; + uint8_t sr_cfg_idx_r13; + dsr_trans_max_r13_e_ dsr_trans_max_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + sched_request_cfg_scell_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SchedulingRequestConfigSCell-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SchedulingRequestConfigSCell-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SoundingRS-AperiodicSet-r14 ::= SEQUENCE +struct srs_aperiodic_set_r14_s { + typedef dyn_array srs_cc_set_idx_list_r14_l_; + + // member variables + bool srs_cc_set_idx_list_r14_present; + srs_cc_set_idx_list_r14_l_ srs_cc_set_idx_list_r14; + srs_ul_cfg_ded_aperiodic_r10_c srs_ul_cfg_ded_aperiodic_r14; + + // sequence methods + srs_aperiodic_set_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SoundingRS-AperiodicSetUpPTsExt-r14 ::= SEQUENCE +struct srs_aperiodic_set_up_pts_ext_r14_s { + typedef dyn_array srs_cc_set_idx_list_r14_l_; + + // member variables + bool srs_cc_set_idx_list_r14_present; + srs_cc_set_idx_list_r14_l_ srs_cc_set_idx_list_r14; + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c srs_ul_cfg_ded_aperiodic_up_pts_ext_r14; + + // sequence methods + srs_aperiodic_set_up_pts_ext_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TPC-PDCCH-ConfigSCell-r13 ::= CHOICE +struct tpc_pdcch_cfg_scell_r13_c { + struct setup_s_ { + // member variables + tpc_idx_c tpc_idx_pucch_scell_r13; + }; + typedef setup_e types; + + // choice methods + tpc_pdcch_cfg_scell_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "TPC-PDCCH-ConfigSCell-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "TPC-PDCCH-ConfigSCell-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// UplinkPUSCH-LessPowerControlDedicated-v1430 ::= SEQUENCE +struct ul_pusch_less_pwr_ctrl_ded_v1430_s { + // member variables + bool p0_ue_periodic_srs_r14_present; + bool p0_ue_aperiodic_srs_r14_present; + int8_t p0_ue_periodic_srs_r14; + int8_t p0_ue_aperiodic_srs_r14; + bool accumulation_enabled_r14; + + // sequence methods + ul_pusch_less_pwr_ctrl_ded_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlDedicatedSCell-r10 ::= SEQUENCE +struct ul_pwr_ctrl_ded_scell_r10_s { + struct delta_mcs_enabled_r10_e_ { + enum options { en0, en1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_mcs_enabled_r10_e_() {} + delta_mcs_enabled_r10_e_(options v) : value(v) {} + delta_mcs_enabled_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct pathloss_ref_linking_r10_e_ { + enum options { p_cell, s_cell }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pathloss_ref_linking_r10_e_() {} + pathloss_ref_linking_r10_e_(options v) : value(v) {} + pathloss_ref_linking_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool p_srs_offset_ap_r10_present; + bool filt_coef_r10_present; + int8_t p0_ue_pusch_r10; + delta_mcs_enabled_r10_e_ delta_mcs_enabled_r10; + bool accumulation_enabled_r10; + uint8_t p_srs_offset_r10; + uint8_t p_srs_offset_ap_r10; + filt_coef_e filt_coef_r10; + pathloss_ref_linking_r10_e_ pathloss_ref_linking_r10; + + // sequence methods + ul_pwr_ctrl_ded_scell_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlDedicatedSCell-v1310 ::= SEQUENCE +struct ul_pwr_ctrl_ded_scell_v1310_s { + // member variables + bool delta_tx_d_offset_list_pucch_r10_present; + int8_t p0_ue_pucch; + delta_tx_d_offset_list_pucch_r10_s delta_tx_d_offset_list_pucch_r10; + + // sequence methods + ul_pwr_ctrl_ded_scell_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoCommon ::= SEQUENCE +struct ant_info_common_s { + struct ant_ports_count_e_ { + enum options { an1, an2, an4, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ant_ports_count_e_() {} + ant_ports_count_e_(options v) : value(v) {} + ant_ports_count_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + ant_ports_count_e_ ant_ports_count; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HighSpeedConfigSCell-r14 ::= SEQUENCE +struct high_speed_cfg_scell_r14_s { + // member variables + bool high_speed_enhanced_demod_flag_r14_present; + + // sequence methods + high_speed_cfg_scell_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-MainConfigSCell-r11 ::= SEQUENCE +struct mac_main_cfg_scell_r11_s { + // member variables + bool ext; + bool stag_id_r11_present; + uint8_t stag_id_r11; + // ... + + // sequence methods + mac_main_cfg_scell_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-Config ::= SEQUENCE +struct prach_cfg_s { + // member variables + bool prach_cfg_info_present; + uint16_t root_seq_idx; + prach_cfg_info_s prach_cfg_info; + + // sequence methods + prach_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PRACH-ConfigSCell-r10 ::= SEQUENCE +struct prach_cfg_scell_r10_s { + // member variables + uint8_t prach_cfg_idx_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysicalConfigDedicatedSCell-r10 ::= SEQUENCE +struct phys_cfg_ded_scell_r10_s { + struct non_ul_cfg_r10_s_ { + // member variables + bool ant_info_r10_present; + bool cross_carrier_sched_cfg_r10_present; + bool csi_rs_cfg_r10_present; + bool pdsch_cfg_ded_r10_present; + ant_info_ded_r10_s ant_info_r10; + cross_carrier_sched_cfg_r10_s cross_carrier_sched_cfg_r10; + csi_rs_cfg_r10_s csi_rs_cfg_r10; + pdsch_cfg_ded_s pdsch_cfg_ded_r10; + + // sequence methods + non_ul_cfg_r10_s_(); + }; + struct ul_cfg_r10_s_ { + // member variables + bool ant_info_ul_r10_present; + bool pusch_cfg_ded_scell_r10_present; + bool ul_pwr_ctrl_ded_scell_r10_present; + bool cqi_report_cfg_scell_r10_present; + bool srs_ul_cfg_ded_r10_present; + bool srs_ul_cfg_ded_v1020_present; + bool srs_ul_cfg_ded_aperiodic_r10_present; + ant_info_ul_r10_s ant_info_ul_r10; + pusch_cfg_ded_scell_r10_s pusch_cfg_ded_scell_r10; + ul_pwr_ctrl_ded_scell_r10_s ul_pwr_ctrl_ded_scell_r10; + cqi_report_cfg_scell_r10_s cqi_report_cfg_scell_r10; + srs_ul_cfg_ded_c srs_ul_cfg_ded_r10; + srs_ul_cfg_ded_v1020_s srs_ul_cfg_ded_v1020; + srs_ul_cfg_ded_aperiodic_r10_c srs_ul_cfg_ded_aperiodic_r10; + + // sequence methods + ul_cfg_r10_s_(); + }; + struct pucch_scell_c_ { + struct setup_s_ { + // member variables + bool pucch_cfg_ded_r13_present; + bool sched_request_cfg_r13_present; + bool tpc_pdcch_cfg_pucch_scell_r13_present; + bool pusch_cfg_ded_r13_present; + bool ul_pwr_ctrl_ded_r13_present; + pucch_cfg_ded_r13_s pucch_cfg_ded_r13; + sched_request_cfg_scell_r13_c sched_request_cfg_r13; + tpc_pdcch_cfg_scell_r13_c tpc_pdcch_cfg_pucch_scell_r13; + pusch_cfg_ded_r13_s pusch_cfg_ded_r13; + ul_pwr_ctrl_ded_scell_v1310_s ul_pwr_ctrl_ded_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + pucch_scell_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "pucch-SCell"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "pucch-SCell"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + typedef dyn_array srs_ul_periodic_cfg_ded_list_r14_l_; + typedef dyn_array srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_l_; + typedef dyn_array srs_ul_aperiodic_cfg_ded_list_r14_l_; + typedef dyn_array srs_ul_cfg_ded_ap_up_pts_ext_list_r14_l_; + struct must_cfg_r14_c_ { + struct setup_s_ { + struct k_max_r14_e_ { + enum options { l1, l3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + k_max_r14_e_() {} + k_max_r14_e_(options v) : value(v) {} + k_max_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct p_a_must_r14_e_ { + enum options { db_minus6, db_minus4dot77, db_minus3, db_minus1dot77, db0, db1, db2, db3 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + p_a_must_r14_e_() {} + p_a_must_r14_e_(options v) : value(v) {} + p_a_must_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool p_a_must_r14_present; + k_max_r14_e_ k_max_r14; + p_a_must_r14_e_ p_a_must_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + must_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "must-Config-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "must-Config-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct semi_static_cfi_cfg_r15_c_ { + struct setup_c_ { + struct types { + enum options { cfi_cfg_r15, cfi_pattern_cfg_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cfi_cfg_r15_s& cfi_cfg_r15() + { + assert_choice_type("cfi-Config-r15", type_.to_string(), "setup"); + return c.get(); + } + cfi_pattern_cfg_r15_s& cfi_pattern_cfg_r15() + { + assert_choice_type("cfi-PatternConfig-r15", type_.to_string(), "setup"); + return c.get(); + } + const cfi_cfg_r15_s& cfi_cfg_r15() const + { + assert_choice_type("cfi-Config-r15", type_.to_string(), "setup"); + return c.get(); + } + const cfi_pattern_cfg_r15_s& cfi_pattern_cfg_r15() const + { + assert_choice_type("cfi-PatternConfig-r15", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + semi_static_cfi_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "semiStaticCFI-Config-r15"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "semiStaticCFI-Config-r15"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct blind_pdsch_repeat_cfg_r15_c_ { + struct setup_s_ { + struct max_num_sf_pdsch_repeats_r15_e_ { + enum options { n4, n6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_sf_pdsch_repeats_r15_e_() {} + max_num_sf_pdsch_repeats_r15_e_(options v) : value(v) {} + max_num_sf_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct max_num_slot_subslot_pdsch_repeats_r15_e_ { + enum options { n4, n6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_slot_subslot_pdsch_repeats_r15_e_() {} + max_num_slot_subslot_pdsch_repeats_r15_e_(options v) : value(v) {} + max_num_slot_subslot_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rv_sf_pdsch_repeats_r15_e_ { + enum options { dlrvseq1, dlrvseq2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rv_sf_pdsch_repeats_r15_e_() {} + rv_sf_pdsch_repeats_r15_e_(options v) : value(v) {} + rv_sf_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct rv_slotsublot_pdsch_repeats_r15_e_ { + enum options { dlrvseq1, dlrvseq2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rv_slotsublot_pdsch_repeats_r15_e_() {} + rv_slotsublot_pdsch_repeats_r15_e_(options v) : value(v) {} + rv_slotsublot_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mcs_restrict_sf_pdsch_repeats_r15_e_ { + enum options { n0, n1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcs_restrict_sf_pdsch_repeats_r15_e_() {} + mcs_restrict_sf_pdsch_repeats_r15_e_(options v) : value(v) {} + mcs_restrict_sf_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mcs_restrict_slot_subslot_pdsch_repeats_r15_e_ { + enum options { n0, n1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_() {} + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_(options v) : value(v) {} + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool max_num_sf_pdsch_repeats_r15_present; + bool max_num_slot_subslot_pdsch_repeats_r15_present; + bool rv_sf_pdsch_repeats_r15_present; + bool rv_slotsublot_pdsch_repeats_r15_present; + bool nof_processes_sf_pdsch_repeats_r15_present; + bool nof_processes_slot_subslot_pdsch_repeats_r15_present; + bool mcs_restrict_sf_pdsch_repeats_r15_present; + bool mcs_restrict_slot_subslot_pdsch_repeats_r15_present; + bool blind_sf_pdsch_repeats_r15; + bool blind_slot_subslot_pdsch_repeats_r15; + max_num_sf_pdsch_repeats_r15_e_ max_num_sf_pdsch_repeats_r15; + max_num_slot_subslot_pdsch_repeats_r15_e_ max_num_slot_subslot_pdsch_repeats_r15; + rv_sf_pdsch_repeats_r15_e_ rv_sf_pdsch_repeats_r15; + rv_slotsublot_pdsch_repeats_r15_e_ rv_slotsublot_pdsch_repeats_r15; + uint8_t nof_processes_sf_pdsch_repeats_r15; + uint8_t nof_processes_slot_subslot_pdsch_repeats_r15; + mcs_restrict_sf_pdsch_repeats_r15_e_ mcs_restrict_sf_pdsch_repeats_r15; + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_ mcs_restrict_slot_subslot_pdsch_repeats_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + blind_pdsch_repeat_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "blindPDSCH-Repetition-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "blindPDSCH-Repetition-Config-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool non_ul_cfg_r10_present; + bool ul_cfg_r10_present; + non_ul_cfg_r10_s_ non_ul_cfg_r10; + ul_cfg_r10_s_ ul_cfg_r10; + // ... + // group 0 + bool csi_rs_cfg_nzp_to_release_list_r11_present; + bool csi_rs_cfg_nzp_to_add_mod_list_r11_present; + bool csi_rs_cfg_zp_to_release_list_r11_present; + bool csi_rs_cfg_zp_to_add_mod_list_r11_present; + bool epdcch_cfg_r11_present; + bool pdsch_cfg_ded_v1130_present; + bool cqi_report_cfg_v1130_present; + bool pusch_cfg_ded_v1130_present; + bool ul_pwr_ctrl_ded_scell_v1130_present; + copy_ptr csi_rs_cfg_nzp_to_release_list_r11; + copy_ptr csi_rs_cfg_nzp_to_add_mod_list_r11; + copy_ptr csi_rs_cfg_zp_to_release_list_r11; + copy_ptr csi_rs_cfg_zp_to_add_mod_list_r11; + copy_ptr epdcch_cfg_r11; + copy_ptr pdsch_cfg_ded_v1130; + copy_ptr cqi_report_cfg_v1130; + copy_ptr pusch_cfg_ded_v1130; + copy_ptr ul_pwr_ctrl_ded_scell_v1130; + // group 1 + bool ant_info_v1250_present; + bool eimta_main_cfg_scell_r12_present; + bool cqi_report_cfg_scell_v1250_present; + bool ul_pwr_ctrl_ded_scell_v1250_present; + bool csi_rs_cfg_v1250_present; + copy_ptr ant_info_v1250; + copy_ptr eimta_main_cfg_scell_r12; + copy_ptr cqi_report_cfg_scell_v1250; + copy_ptr ul_pwr_ctrl_ded_scell_v1250; + copy_ptr csi_rs_cfg_v1250; + // group 2 + bool pdsch_cfg_ded_v1280_present; + copy_ptr pdsch_cfg_ded_v1280; + // group 3 + bool pucch_cell_r13_present; + bool pucch_scell_present; + bool cross_carrier_sched_cfg_r13_present; + bool pdcch_cfg_scell_r13_present; + bool cqi_report_cfg_v1310_present; + bool pdsch_cfg_ded_v1310_present; + bool srs_ul_cfg_ded_v1310_present; + bool srs_ul_cfg_ded_up_pts_ext_r13_present; + bool srs_ul_cfg_ded_aperiodic_v1310_present; + bool srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present; + bool csi_rs_cfg_v1310_present; + bool laa_scell_cfg_r13_present; + bool csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present; + bool csi_rs_cfg_nzp_to_release_list_ext_r13_present; + copy_ptr pucch_scell; + copy_ptr cross_carrier_sched_cfg_r13; + copy_ptr pdcch_cfg_scell_r13; + copy_ptr cqi_report_cfg_v1310; + copy_ptr pdsch_cfg_ded_v1310; + copy_ptr srs_ul_cfg_ded_v1310; + copy_ptr srs_ul_cfg_ded_up_pts_ext_r13; + copy_ptr srs_ul_cfg_ded_aperiodic_v1310; + copy_ptr srs_ul_cfg_ded_aperiodic_up_pts_ext_r13; + copy_ptr csi_rs_cfg_v1310; + copy_ptr laa_scell_cfg_r13; + copy_ptr csi_rs_cfg_nzp_to_add_mod_list_ext_r13; + copy_ptr csi_rs_cfg_nzp_to_release_list_ext_r13; + // group 4 + bool cqi_report_cfg_v1320_present; + copy_ptr cqi_report_cfg_v1320; + // group 5 + bool laa_scell_cfg_v1430_present; + bool type_b_srs_tpc_pdcch_cfg_r14_present; + bool ul_pusch_less_pwr_ctrl_ded_v1430_present; + bool srs_ul_periodic_cfg_ded_list_r14_present; + bool srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present; + bool srs_ul_aperiodic_cfg_ded_list_r14_present; + bool srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present; + bool must_cfg_r14_present; + bool pusch_cfg_ded_v1430_present; + bool csi_rs_cfg_v1430_present; + bool csi_rs_cfg_zp_ap_list_r14_present; + bool cqi_report_cfg_v1430_present; + bool semi_open_loop_r14_present; + bool pdsch_cfg_ded_scell_v1430_present; + copy_ptr laa_scell_cfg_v1430; + copy_ptr type_b_srs_tpc_pdcch_cfg_r14; + copy_ptr ul_pusch_less_pwr_ctrl_ded_v1430; + copy_ptr srs_ul_periodic_cfg_ded_list_r14; + copy_ptr srs_ul_periodic_cfg_ded_up_pts_ext_list_r14; + copy_ptr srs_ul_aperiodic_cfg_ded_list_r14; + copy_ptr srs_ul_cfg_ded_ap_up_pts_ext_list_r14; + copy_ptr must_cfg_r14; + copy_ptr pusch_cfg_ded_v1430; + copy_ptr csi_rs_cfg_v1430; + copy_ptr csi_rs_cfg_zp_ap_list_r14; + copy_ptr cqi_report_cfg_v1430; + bool semi_open_loop_r14; + copy_ptr pdsch_cfg_ded_scell_v1430; + // group 6 + bool csi_rs_cfg_v1480_present; + copy_ptr csi_rs_cfg_v1480; + // group 7 + bool phys_cfg_ded_stti_r15_present; + bool pdsch_cfg_ded_v1530_present; + bool cqi_report_cfg_v1530_present; + bool cqi_report_cfg_scell_r15_present; + bool cqi_short_cfg_scell_r15_present; + bool csi_rs_cfg_v1530_present; + bool ul_pwr_ctrl_ded_scell_v1530_present; + bool laa_scell_cfg_v1530_present; + bool pusch_cfg_ded_v1530_present; + bool semi_static_cfi_cfg_r15_present; + bool blind_pdsch_repeat_cfg_r15_present; + copy_ptr phys_cfg_ded_stti_r15; + copy_ptr pdsch_cfg_ded_v1530; + copy_ptr cqi_report_cfg_v1530; + copy_ptr cqi_report_cfg_scell_r15; + copy_ptr cqi_short_cfg_scell_r15; + copy_ptr csi_rs_cfg_v1530; + copy_ptr ul_pwr_ctrl_ded_scell_v1530; + copy_ptr laa_scell_cfg_v1530; + copy_ptr pusch_cfg_ded_v1530; + copy_ptr semi_static_cfi_cfg_r15; + copy_ptr blind_pdsch_repeat_cfg_r15; + + // sequence methods + phys_cfg_ded_scell_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysicalConfigDedicatedSCell-v1370 ::= SEQUENCE +struct phys_cfg_ded_scell_v1370_s { + struct pucch_scell_v1370_c_ { + struct setup_s_ { + // member variables + bool pucch_cfg_ded_v1370_present; + pucch_cfg_ded_v1370_s pucch_cfg_ded_v1370; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + pucch_scell_v1370_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "pucch-SCell-v1370"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "pucch-SCell-v1370"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + pucch_scell_v1370_c_ pucch_scell_v1370; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigCommonSCell-r11 ::= SEQUENCE +struct rach_cfg_common_scell_r11_s { + struct ra_supervision_info_r11_s_ { + // member variables + preamb_trans_max_e preamb_trans_max_r11; + }; + + // member variables + bool ext; + pwr_ramp_params_s pwr_ramp_params_r11; + ra_supervision_info_r11_s_ ra_supervision_info_r11; + // ... + + // sequence methods + rach_cfg_common_scell_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommon-v1530 ::= SEQUENCE +struct ul_pwr_ctrl_common_v1530_s { + // member variables + delta_flist_spucch_r15_c delta_flist_spucch_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommonPUSCH-LessCell-v1430 ::= SEQUENCE +struct ul_pwr_ctrl_common_pusch_less_cell_v1430_s { + // member variables + bool p0_nominal_periodic_srs_r14_present; + bool p0_nominal_aperiodic_srs_r14_present; + bool alpha_srs_r14_present; + int8_t p0_nominal_periodic_srs_r14; + int8_t p0_nominal_aperiodic_srs_r14; + alpha_r12_e alpha_srs_r14; + + // sequence methods + ul_pwr_ctrl_common_pusch_less_cell_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommonSCell-r10 ::= SEQUENCE +struct ul_pwr_ctrl_common_scell_r10_s { + // member variables + int8_t p0_nominal_pusch_r10; + alpha_r12_e alpha_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommonSCell-v1130 ::= SEQUENCE +struct ul_pwr_ctrl_common_scell_v1130_s { + // member variables + int8_t delta_preamb_msg3_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommonSCell-v1310 ::= SEQUENCE +struct ul_pwr_ctrl_common_scell_v1310_s { + struct delta_f_pucch_format3_r12_e_ { + enum options { delta_f_minus1, delta_f0, delta_f1, delta_f2, delta_f3, delta_f4, delta_f5, delta_f6 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format3_r12_e_() {} + delta_f_pucch_format3_r12_e_(options v) : value(v) {} + delta_f_pucch_format3_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_pucch_format1b_cs_r12_e_ { + enum options { delta_f1, delta_f2, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format1b_cs_r12_e_() {} + delta_f_pucch_format1b_cs_r12_e_(options v) : value(v) {} + delta_f_pucch_format1b_cs_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_pucch_format4_r13_e_ { + enum options { delta_f16, delta_f15, delta_f14, delta_f13, delta_f12, delta_f11, delta_f10, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format4_r13_e_() {} + delta_f_pucch_format4_r13_e_(options v) : value(v) {} + delta_f_pucch_format4_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_pucch_format5_minus13_e_ { + enum options { delta_f13, delta_f12, delta_f11, delta_f10, delta_f9, delta_f8, delta_f7, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format5_minus13_e_() {} + delta_f_pucch_format5_minus13_e_(options v) : value(v) {} + delta_f_pucch_format5_minus13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool delta_f_pucch_format3_r12_present; + bool delta_f_pucch_format1b_cs_r12_present; + bool delta_f_pucch_format4_r13_present; + bool delta_f_pucch_format5_minus13_present; + int8_t p0_nominal_pucch; + delta_flist_pucch_s delta_flist_pucch; + delta_f_pucch_format3_r12_e_ delta_f_pucch_format3_r12; + delta_f_pucch_format1b_cs_r12_e_ delta_f_pucch_format1b_cs_r12; + delta_f_pucch_format4_r13_e_ delta_f_pucch_format4_r13; + delta_f_pucch_format5_minus13_e_ delta_f_pucch_format5_minus13; + + // sequence methods + ul_pwr_ctrl_common_scell_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AntennaInfoDedicated-v10i0 ::= SEQUENCE +struct ant_info_ded_v10i0_s { + struct max_layers_mimo_r10_e_ { + enum options { two_layers, four_layers, eight_layers }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_layers_mimo_r10_e_() {} + max_layers_mimo_r10_e_(options v) : value(v) {} + max_layers_mimo_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool max_layers_mimo_r10_present; + max_layers_mimo_r10_e_ max_layers_mimo_r10; + + // sequence methods + ant_info_ded_v10i0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommonSCell-r10 ::= SEQUENCE +struct rr_cfg_common_scell_r10_s { + struct non_ul_cfg_r10_s_ { + struct dl_bw_r10_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dl_bw_r10_e_() {} + dl_bw_r10_e_(options v) : value(v) {} + dl_bw_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool mbsfn_sf_cfg_list_r10_present; + bool tdd_cfg_r10_present; + dl_bw_r10_e_ dl_bw_r10; + ant_info_common_s ant_info_common_r10; + mbsfn_sf_cfg_list_l mbsfn_sf_cfg_list_r10; + phich_cfg_s phich_cfg_r10; + pdsch_cfg_common_s pdsch_cfg_common_r10; + tdd_cfg_s tdd_cfg_r10; + + // sequence methods + non_ul_cfg_r10_s_(); + }; + struct ul_cfg_r10_s_ { + struct ul_freq_info_r10_s_ { + struct ul_bw_r10_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_bw_r10_e_() {} + ul_bw_r10_e_(options v) : value(v) {} + ul_bw_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ul_carrier_freq_r10_present; + bool ul_bw_r10_present; + uint16_t ul_carrier_freq_r10; + ul_bw_r10_e_ ul_bw_r10; + uint8_t add_spec_emission_scell_r10; + + // sequence methods + ul_freq_info_r10_s_(); + }; + + // member variables + bool p_max_r10_present; + bool prach_cfg_scell_r10_present; + ul_freq_info_r10_s_ ul_freq_info_r10; + int8_t p_max_r10; + ul_pwr_ctrl_common_scell_r10_s ul_pwr_ctrl_common_scell_r10; + srs_ul_cfg_common_c srs_ul_cfg_common_r10; + ul_cp_len_e ul_cp_len_r10; + prach_cfg_scell_r10_s prach_cfg_scell_r10; + pusch_cfg_common_s pusch_cfg_common_r10; + + // sequence methods + ul_cfg_r10_s_(); + }; + struct ul_cfg_r14_s_ { + struct ul_freq_info_r14_s_ { + struct ul_bw_r14_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_bw_r14_e_() {} + ul_bw_r14_e_(options v) : value(v) {} + ul_bw_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ul_carrier_freq_r14_present; + bool ul_bw_r14_present; + uint32_t ul_carrier_freq_r14; + ul_bw_r14_e_ ul_bw_r14; + uint8_t add_spec_emission_scell_r14; + + // sequence methods + ul_freq_info_r14_s_(); + }; + + // member variables + bool p_max_r14_present; + bool prach_cfg_scell_r14_present; + bool ul_pwr_ctrl_common_pusch_less_cell_v1430_present; + ul_freq_info_r14_s_ ul_freq_info_r14; + int8_t p_max_r14; + srs_ul_cfg_common_c srs_ul_cfg_common_r14; + ul_cp_len_e ul_cp_len_r14; + prach_cfg_scell_r10_s prach_cfg_scell_r14; + ul_pwr_ctrl_common_pusch_less_cell_v1430_s ul_pwr_ctrl_common_pusch_less_cell_v1430; + + // sequence methods + ul_cfg_r14_s_(); + }; + struct harq_ref_cfg_r14_e_ { + enum options { sa2, sa4, sa5 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + harq_ref_cfg_r14_e_() {} + harq_ref_cfg_r14_e_(options v) : value(v) {} + harq_ref_cfg_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool ul_cfg_r10_present; + non_ul_cfg_r10_s_ non_ul_cfg_r10; + ul_cfg_r10_s_ ul_cfg_r10; + // ... + // group 0 + bool ul_carrier_freq_v1090_present; + uint32_t ul_carrier_freq_v1090; + // group 1 + bool rach_cfg_common_scell_r11_present; + bool prach_cfg_scell_r11_present; + bool tdd_cfg_v1130_present; + bool ul_pwr_ctrl_common_scell_v1130_present; + copy_ptr rach_cfg_common_scell_r11; + copy_ptr prach_cfg_scell_r11; + copy_ptr tdd_cfg_v1130; + copy_ptr ul_pwr_ctrl_common_scell_v1130; + // group 2 + bool pusch_cfg_common_v1270_present; + copy_ptr pusch_cfg_common_v1270; + // group 3 + bool pucch_cfg_common_r13_present; + bool ul_pwr_ctrl_common_scell_v1310_present; + copy_ptr pucch_cfg_common_r13; + copy_ptr ul_pwr_ctrl_common_scell_v1310; + // group 4 + bool high_speed_cfg_scell_r14_present; + bool prach_cfg_v1430_present; + bool ul_cfg_r14_present; + bool harq_ref_cfg_r14_present; + bool srs_flex_timing_r14_present; + copy_ptr high_speed_cfg_scell_r14; + copy_ptr prach_cfg_v1430; + copy_ptr ul_cfg_r14; + harq_ref_cfg_r14_e_ harq_ref_cfg_r14; + // group 5 + bool mbsfn_sf_cfg_list_v1430_present; + copy_ptr mbsfn_sf_cfg_list_v1430; + // group 6 + bool ul_pwr_ctrl_common_scell_v1530_present; + copy_ptr ul_pwr_ctrl_common_scell_v1530; + + // sequence methods + rr_cfg_common_scell_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigDedicatedSCell-r10 ::= SEQUENCE +struct rr_cfg_ded_scell_r10_s { + // member variables + bool ext; + bool phys_cfg_ded_scell_r10_present; + phys_cfg_ded_scell_r10_s phys_cfg_ded_scell_r10; + // ... + // group 0 + bool mac_main_cfg_scell_r11_present; + copy_ptr mac_main_cfg_scell_r11; + // group 1 + bool naics_info_r12_present; + copy_ptr naics_info_r12; + // group 2 + bool neigh_cells_crs_info_scell_r13_present; + copy_ptr neigh_cells_crs_info_scell_r13; + // group 3 + bool phys_cfg_ded_scell_v1370_present; + copy_ptr phys_cfg_ded_scell_v1370; + // group 4 + bool crs_intf_mitig_enabled_r15_present; + bool neigh_cells_crs_info_r15_present; + bool sps_cfg_v1530_present; + bool crs_intf_mitig_enabled_r15; + copy_ptr neigh_cells_crs_info_r15; + copy_ptr sps_cfg_v1530; + + // sequence methods + rr_cfg_ded_scell_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModExt-r13 ::= SEQUENCE +struct scell_to_add_mod_ext_r13_s { + struct cell_identif_r13_s_ { + // member variables + uint16_t pci_r13; + uint32_t dl_carrier_freq_r13; + }; + + // member variables + bool cell_identif_r13_present; + bool rr_cfg_common_scell_r13_present; + bool rr_cfg_ded_scell_r13_present; + bool ant_info_ded_scell_r13_present; + uint8_t s_cell_idx_r13; + cell_identif_r13_s_ cell_identif_r13; + rr_cfg_common_scell_r10_s rr_cfg_common_scell_r13; + rr_cfg_ded_scell_r10_s rr_cfg_ded_scell_r13; + ant_info_ded_v10i0_s ant_info_ded_scell_r13; + + // sequence methods + scell_to_add_mod_ext_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CipheringAlgorithm-r12 ::= ENUMERATED +struct ciphering_algorithm_r12_e { + enum options { eea0, eea1, eea2, eea3_v1130, spare4, spare3, spare2, spare1, /*...*/ }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + ciphering_algorithm_r12_e() {} + ciphering_algorithm_r12_e(options v) : value(v) {} + ciphering_algorithm_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// SCellConfigCommon-r15 ::= SEQUENCE +struct scell_cfg_common_r15_s { + // member variables + bool rr_cfg_common_scell_r15_present; + bool rr_cfg_ded_scell_r15_present; + bool ant_info_ded_scell_r15_present; + rr_cfg_common_scell_r10_s rr_cfg_common_scell_r15; + rr_cfg_ded_scell_r10_s rr_cfg_ded_scell_r15; + ant_info_ded_v10i0_s ant_info_ded_scell_r15; + + // sequence methods + scell_cfg_common_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellToAddModExt-r13 +typedef dyn_array scell_to_add_mod_list_ext_r13_l; + +// SCellToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF INTEGER +typedef bounded_array scell_to_release_list_ext_r13_l; + +// SL-DiscTxPoolToAddMod-r12 ::= SEQUENCE +struct sl_disc_tx_pool_to_add_mod_r12_s { + // member variables + uint8_t pool_id_r12; + sl_disc_res_pool_r12_s pool_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TF-IndexPair-r12b ::= SEQUENCE +struct sl_tf_idx_pair_r12b_s { + // member variables + bool disc_sf_idx_r12b_present; + bool disc_prb_idx_r12b_present; + uint8_t disc_sf_idx_r12b; + uint8_t disc_prb_idx_r12b; + + // sequence methods + sl_tf_idx_pair_r12b_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellGroupToAddMod-r15 ::= SEQUENCE +struct scell_group_to_add_mod_r15_s { + // member variables + bool s_cell_cfg_common_r15_present; + bool s_cell_to_release_list_r15_present; + bool s_cell_to_add_mod_list_r15_present; + uint8_t s_cell_group_idx_r15; + scell_cfg_common_r15_s s_cell_cfg_common_r15; + scell_to_release_list_ext_r13_l s_cell_to_release_list_r15; + scell_to_add_mod_list_ext_r13_l s_cell_to_add_mod_list_r15; + + // sequence methods + scell_group_to_add_mod_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscTxPoolToAddModList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-DiscTxPoolToAddMod-r12 +typedef dyn_array sl_disc_tx_pool_to_add_mod_list_r12_l; + +// SL-HoppingConfigDisc-r12 ::= SEQUENCE +struct sl_hop_cfg_disc_r12_s { + struct c_r12_e_ { + enum options { n1, n5 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + c_r12_e_() {} + c_r12_e_(options v) : value(v) {} + c_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t a_r12; + uint8_t b_r12; + c_r12_e_ c_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TF-IndexPairList-r12b ::= SEQUENCE (SIZE (1..maxSL-TF-IndexPair-r12)) OF SL-TF-IndexPair-r12b +typedef dyn_array sl_tf_idx_pair_list_r12b_l; + +// SL-TxPoolToReleaseList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF INTEGER +typedef bounded_array sl_tx_pool_to_release_list_r12_l; + +// SecurityAlgorithmConfig ::= SEQUENCE +struct security_algorithm_cfg_s { + struct integrity_prot_algorithm_e_ { + enum options { eia0_v920, eia1, eia2, eia3_v1130, spare4, spare3, spare2, spare1, /*...*/ }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + integrity_prot_algorithm_e_() {} + integrity_prot_algorithm_e_(options v) : value(v) {} + integrity_prot_algorithm_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + ciphering_algorithm_r12_e ciphering_algorithm; + integrity_prot_algorithm_e_ integrity_prot_algorithm; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-ToAddModSCG-r12 ::= SEQUENCE +struct drb_to_add_mod_scg_r12_s { + struct drb_type_r12_c_ { + struct scg_r12_s_ { + // member variables + bool eps_bearer_id_r12_present; + bool pdcp_cfg_r12_present; + uint8_t eps_bearer_id_r12; + pdcp_cfg_s pdcp_cfg_r12; + + // sequence methods + scg_r12_s_(); + }; + struct types { + enum options { split_r12, scg_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + drb_type_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scg_r12_s_& scg_r12() + { + assert_choice_type("scg-r12", type_.to_string(), "drb-Type-r12"); + return c; + } + const scg_r12_s_& scg_r12() const + { + assert_choice_type("scg-r12", type_.to_string(), "drb-Type-r12"); + return c; + } + + private: + types type_; + scg_r12_s_ c; + }; + + // member variables + bool ext; + bool drb_type_r12_present; + bool rlc_cfg_scg_r12_present; + bool rlc_cfg_v1250_present; + bool lc_ch_id_scg_r12_present; + bool lc_ch_cfg_scg_r12_present; + uint8_t drb_id_r12; + drb_type_r12_c_ drb_type_r12; + rlc_cfg_c rlc_cfg_scg_r12; + rlc_cfg_v1250_s rlc_cfg_v1250; + uint8_t lc_ch_id_scg_r12; + lc_ch_cfg_s lc_ch_cfg_scg_r12; + // ... + // group 0 + bool rlc_cfg_v1430_present; + copy_ptr rlc_cfg_v1430; + // group 1 + bool lc_ch_id_scg_r15_present; + bool rlc_cfg_v1530_present; + bool rlc_bearer_cfg_dupl_r15_present; + uint8_t lc_ch_id_scg_r15; + copy_ptr rlc_cfg_v1530; + copy_ptr rlc_bearer_cfg_dupl_r15; + + // sequence methods + drb_to_add_mod_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IKE-Identity-r13 ::= SEQUENCE +struct ike_id_r13_s { + // member variables + dyn_octstring id_i_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IP-Address-r13 ::= CHOICE +struct ip_address_r13_c { + struct types { + enum options { ipv4_r13, ipv6_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + ip_address_r13_c() : type_(types::nulltype) {} + ip_address_r13_c(const ip_address_r13_c& other); + ip_address_r13_c& operator=(const ip_address_r13_c& other); + ~ip_address_r13_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<32>& ipv4_r13() + { + assert_choice_type("ipv4-r13", type_.to_string(), "IP-Address-r13"); + return c.get >(); + } + fixed_bitstring<128>& ipv6_r13() + { + assert_choice_type("ipv6-r13", type_.to_string(), "IP-Address-r13"); + return c.get >(); + } + const fixed_bitstring<32>& ipv4_r13() const + { + assert_choice_type("ipv4-r13", type_.to_string(), "IP-Address-r13"); + return c.get >(); + } + const fixed_bitstring<128>& ipv6_r13() const + { + assert_choice_type("ipv6-r13", type_.to_string(), "IP-Address-r13"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t)> c; + + void destroy_(); +}; + +// PhysicalConfigDedicated-v1370 ::= SEQUENCE +struct phys_cfg_ded_v1370_s { + // member variables + bool pucch_cfg_ded_v1370_present; + pucch_cfg_ded_v1370_s pucch_cfg_ded_v1370; + + // sequence methods + phys_cfg_ded_v1370_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAN-AreaConfig-r15 ::= SEQUENCE +struct ran_area_cfg_r15_s { + typedef bounded_array ran_area_code_list_r15_l_; + + // member variables + bool ran_area_code_list_r15_present; + fixed_bitstring<24> tac_minus5_gc_r15; + ran_area_code_list_r15_l_ ran_area_code_list_r15; + + // sequence methods + ran_area_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommonSCell-v10l0 ::= SEQUENCE +struct rr_cfg_common_scell_v10l0_s { + struct ul_cfg_v10l0_s_ { + // member variables + uint16_t add_spec_emission_scell_v10l0; + }; + + // member variables + ul_cfg_v10l0_s_ ul_cfg_v10l0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommonSCell-v1440 ::= SEQUENCE +struct rr_cfg_common_scell_v1440_s { + struct ul_cfg_v1440_s_ { + struct ul_freq_info_v1440_s_ { + // member variables + uint16_t add_spec_emission_scell_v1440; + }; + + // member variables + ul_freq_info_v1440_s_ ul_freq_info_v1440; + }; + + // member variables + ul_cfg_v1440_s_ ul_cfg_v1440; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellGroupToAddModList-r15 ::= SEQUENCE (SIZE (1..maxSCellGroups-r15)) OF SCellGroupToAddMod-r15 +typedef dyn_array scell_group_to_add_mod_list_r15_l; + +// SCellGroupToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxSCellGroups-r15)) OF INTEGER +typedef bounded_array scell_group_to_release_list_r15_l; + +// SL-DiscTxConfigScheduled-r13 ::= SEQUENCE +struct sl_disc_tx_cfg_sched_r13_s { + // member variables + bool ext; + bool disc_tx_cfg_r13_present; + bool disc_tf_idx_list_r13_present; + bool disc_hop_cfg_r13_present; + sl_disc_res_pool_r12_s disc_tx_cfg_r13; + sl_tf_idx_pair_list_r12b_l disc_tf_idx_list_r13; + sl_hop_cfg_disc_r12_s disc_hop_cfg_r13; + // ... + + // sequence methods + sl_disc_tx_cfg_sched_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscTxPoolDedicated-r13 ::= SEQUENCE +struct sl_disc_tx_pool_ded_r13_s { + // member variables + bool pool_to_release_list_r13_present; + bool pool_to_add_mod_list_r13_present; + sl_tx_pool_to_release_list_r12_l pool_to_release_list_r13; + sl_disc_tx_pool_to_add_mod_list_r12_l pool_to_add_mod_list_r13; + + // sequence methods + sl_disc_tx_pool_ded_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-ReliabilityList-r15 ::= SEQUENCE (SIZE (1..maxSL-Reliability-r15)) OF INTEGER +typedef bounded_array sl_reliability_list_r15_l; + +// SL-TxPoolToAddMod-r14 ::= SEQUENCE +struct sl_tx_pool_to_add_mod_r14_s { + // member variables + uint8_t pool_id_r14; + sl_comm_res_pool_v2x_r14_s pool_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityConfigHO-v1530 ::= SEQUENCE +struct security_cfg_ho_v1530_s { + struct ho_type_v1530_c_ { + struct intra5_gc_r15_s_ { + // member variables + bool security_algorithm_cfg_r15_present; + bool nas_container_r15_present; + security_algorithm_cfg_s security_algorithm_cfg_r15; + bool key_change_ind_r15; + uint8_t next_hop_chaining_count_r15; + dyn_octstring nas_container_r15; + + // sequence methods + intra5_gc_r15_s_(); + }; + struct ngc_to_epc_r15_s_ { + // member variables + security_algorithm_cfg_s security_algorithm_cfg_r15; + uint8_t next_hop_chaining_count_r15; + }; + struct epc_to_ngc_r15_s_ { + // member variables + security_algorithm_cfg_s security_algorithm_cfg_r15; + dyn_octstring nas_container_r15; + }; + struct types { + enum options { intra5_gc_r15, ngc_to_epc_r15, epc_to_ngc_r15, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + ho_type_v1530_c_() : type_(types::nulltype) {} + ho_type_v1530_c_(const ho_type_v1530_c_& other); + ho_type_v1530_c_& operator=(const ho_type_v1530_c_& other); + ~ho_type_v1530_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + intra5_gc_r15_s_& intra5_gc_r15() + { + assert_choice_type("intra5GC-r15", type_.to_string(), "handoverType-v1530"); + return c.get(); + } + ngc_to_epc_r15_s_& ngc_to_epc_r15() + { + assert_choice_type("ngc-ToEPC-r15", type_.to_string(), "handoverType-v1530"); + return c.get(); + } + epc_to_ngc_r15_s_& epc_to_ngc_r15() + { + assert_choice_type("epc-ToNGC-r15", type_.to_string(), "handoverType-v1530"); + return c.get(); + } + const intra5_gc_r15_s_& intra5_gc_r15() const + { + assert_choice_type("intra5GC-r15", type_.to_string(), "handoverType-v1530"); + return c.get(); + } + const ngc_to_epc_r15_s_& ngc_to_epc_r15() const + { + assert_choice_type("ngc-ToEPC-r15", type_.to_string(), "handoverType-v1530"); + return c.get(); + } + const epc_to_ngc_r15_s_& epc_to_ngc_r15() const + { + assert_choice_type("epc-ToNGC-r15", type_.to_string(), "handoverType-v1530"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + ho_type_v1530_c_ ho_type_v1530; + // ... + + // sequence methods + security_cfg_ho_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommon-v1310 ::= SEQUENCE +struct ul_pwr_ctrl_common_v1310_s { + struct delta_f_pucch_format4_r13_e_ { + enum options { delta_f16, delta_f15, delta_f14, delta_f13, delta_f12, delta_f11, delta_f10, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format4_r13_e_() {} + delta_f_pucch_format4_r13_e_(options v) : value(v) {} + delta_f_pucch_format4_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct delta_f_pucch_format5_minus13_e_ { + enum options { delta_f13, delta_f12, delta_f11, delta_f10, delta_f9, delta_f8, delta_f7, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format5_minus13_e_() {} + delta_f_pucch_format5_minus13_e_(options v) : value(v) {} + delta_f_pucch_format5_minus13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool delta_f_pucch_format4_r13_present; + bool delta_f_pucch_format5_minus13_present; + delta_f_pucch_format4_r13_e_ delta_f_pucch_format4_r13; + delta_f_pucch_format5_minus13_e_ delta_f_pucch_format5_minus13; + + // sequence methods + ul_pwr_ctrl_common_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE +struct ul_pwr_ctrl_common_ps_cell_r12_s { + struct delta_f_pucch_format3_r12_e_ { + enum options { delta_f_minus1, delta_f0, delta_f1, delta_f2, delta_f3, delta_f4, delta_f5, delta_f6 }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format3_r12_e_() {} + delta_f_pucch_format3_r12_e_(options v) : value(v) {} + delta_f_pucch_format3_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct delta_f_pucch_format1b_cs_r12_e_ { + enum options { delta_f1, delta_f2, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delta_f_pucch_format1b_cs_r12_e_() {} + delta_f_pucch_format1b_cs_r12_e_(options v) : value(v) {} + delta_f_pucch_format1b_cs_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + delta_f_pucch_format3_r12_e_ delta_f_pucch_format3_r12; + delta_f_pucch_format1b_cs_r12_e_ delta_f_pucch_format1b_cs_r12; + int8_t p0_nominal_pucch_r12; + delta_flist_pucch_s delta_flist_pucch_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-Id-List-r13 ::= SEQUENCE (SIZE (1..maxWLAN-Id-r13)) OF WLAN-Identifiers-r12 +typedef dyn_array wlan_id_list_r13_l; + +// WLAN-SuspendConfig-r14 ::= SEQUENCE +struct wlan_suspend_cfg_r14_s { + // member variables + bool wlan_suspend_resume_allowed_r14_present; + bool wlan_suspend_triggers_status_report_r14_present; + bool wlan_suspend_resume_allowed_r14; + bool wlan_suspend_triggers_status_report_r14; + + // sequence methods + wlan_suspend_cfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-ToAddModListSCG-r12 ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddModSCG-r12 +typedef dyn_array drb_to_add_mod_list_scg_r12_l; + +// DRB-ToAddModListSCG-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-ToAddModSCG-r12 +typedef dyn_array drb_to_add_mod_list_scg_r15_l; + +// LogicalChGroupInfoList-r13 ::= SEQUENCE (SIZE (1..maxLCG-r13)) OF SL-PriorityList-r13 +typedef dyn_array lc_ch_group_info_list_r13_l; + +// LogicalChGroupInfoList-v1530 ::= SEQUENCE (SIZE (1..maxLCG-r13)) OF SL-ReliabilityList-r15 +typedef dyn_array lc_ch_group_info_list_v1530_l; + +// MAC-MainConfigSL-r12 ::= SEQUENCE +struct mac_main_cfg_sl_r12_s { + // member variables + bool periodic_bsr_timer_sl_present; + periodic_bsr_timer_r12_e periodic_bsr_timer_sl; + retx_bsr_timer_r12_e retx_bsr_timer_sl; + + // sequence methods + mac_main_cfg_sl_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-RAN-AreaCell-r15 ::= SEQUENCE +struct plmn_ran_area_cell_r15_s { + typedef bounded_array, 32> ran_area_cells_r15_l_; + + // member variables + bool plmn_id_r15_present; + plmn_id_s plmn_id_r15; + ran_area_cells_r15_l_ ran_area_cells_r15; + + // sequence methods + plmn_ran_area_cell_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-RAN-AreaConfig-r15 ::= SEQUENCE +struct plmn_ran_area_cfg_r15_s { + typedef dyn_array ran_area_r15_l_; + + // member variables + bool plmn_id_r15_present; + plmn_id_s plmn_id_r15; + ran_area_r15_l_ ran_area_r15; + + // sequence methods + plmn_ran_area_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigDedicated ::= SEQUENCE +struct rach_cfg_ded_s { + // member variables + uint8_t ra_preamb_idx; + uint8_t ra_prach_mask_idx; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-Skip-r14 ::= SEQUENCE +struct rach_skip_r14_s { + struct target_ta_r14_c_ { + struct types { + enum options { ta0_r14, mcg_ptag_r14, scg_ptag_r14, mcg_stag_r14, scg_stag_r14, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + target_ta_r14_c_() : type_(types::nulltype) {} + target_ta_r14_c_(const target_ta_r14_c_& other); + target_ta_r14_c_& operator=(const target_ta_r14_c_& other); + ~target_ta_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& mcg_stag_r14() + { + assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + uint8_t& scg_stag_r14() + { + assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + const uint8_t& mcg_stag_r14() const + { + assert_choice_type("mcg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + const uint8_t& scg_stag_r14() const + { + assert_choice_type("scg-STAG-r14", type_.to_string(), "targetTA-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct ul_cfg_info_r14_s_ { + struct ul_sched_interv_r14_e_ { + enum options { sf2, sf5, sf10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_sched_interv_r14_e_() {} + ul_sched_interv_r14_e_(options v) : value(v) {} + ul_sched_interv_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t nof_conf_ul_processes_r14; + ul_sched_interv_r14_e_ ul_sched_interv_r14; + uint8_t ul_start_sf_r14; + fixed_bitstring<16> ul_grant_r14; + }; + + // member variables + bool ul_cfg_info_r14_present; + target_ta_r14_c_ target_ta_r14; + ul_cfg_info_r14_s_ ul_cfg_info_r14; + + // sequence methods + rach_skip_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLF-TimersAndConstantsSCG-r12 ::= CHOICE +struct rlf_timers_and_consts_scg_r12_c { + struct setup_s_ { + struct t313_r12_e_ { + enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t313_r12_e_() {} + t313_r12_e_(options v) : value(v) {} + t313_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct n313_r12_e_ { + enum options { n1, n2, n3, n4, n6, n8, n10, n20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n313_r12_e_() {} + n313_r12_e_(options v) : value(v) {} + n313_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct n314_r12_e_ { + enum options { n1, n2, n3, n4, n5, n6, n8, n10 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n314_r12_e_() {} + n314_r12_e_(options v) : value(v) {} + n314_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + t313_r12_e_ t313_r12; + n313_r12_e_ n313_r12; + n314_r12_e_ n314_r12; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + rlf_timers_and_consts_scg_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RLF-TimersAndConstantsSCG-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RLF-TimersAndConstantsSCG-r12"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RRCConnectionReconfiguration-v1530-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1530_ies_s { + typedef bounded_array ded_info_nas_list_r15_l_; + + // member variables + bool security_cfg_ho_v1530_present; + bool s_cell_group_to_release_list_r15_present; + bool s_cell_group_to_add_mod_list_r15_present; + bool ded_info_nas_list_r15_present; + bool p_max_ue_fr1_r15_present; + bool smtc_r15_present; + bool non_crit_ext_present; + security_cfg_ho_v1530_s security_cfg_ho_v1530; + scell_group_to_release_list_r15_l s_cell_group_to_release_list_r15; + scell_group_to_add_mod_list_r15_l s_cell_group_to_add_mod_list_r15; + ded_info_nas_list_r15_l_ ded_info_nas_list_r15; + int8_t p_max_ue_fr1_r15; + mtc_ssb_nr_r15_s smtc_r15; + + // sequence methods + rrc_conn_recfg_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommonPSCell-r12 ::= SEQUENCE +struct rr_cfg_common_ps_cell_r12_s { + // member variables + bool ext; + rr_cfg_common_scell_r10_s basic_fields_r12; + pucch_cfg_common_s pucch_cfg_common_r12; + rach_cfg_common_s rach_cfg_common_r12; + ul_pwr_ctrl_common_ps_cell_r12_s ul_pwr_ctrl_common_ps_cell_r12; + // ... + // group 0 + bool ul_pwr_ctrl_common_ps_cell_v1310_present; + copy_ptr ul_pwr_ctrl_common_ps_cell_v1310; + // group 1 + bool ul_pwr_ctrl_common_ps_cell_v1530_present; + copy_ptr ul_pwr_ctrl_common_ps_cell_v1530; + + // sequence methods + rr_cfg_common_ps_cell_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommonPSCell-v12f0 ::= SEQUENCE +struct rr_cfg_common_ps_cell_v12f0_s { + // member variables + rr_cfg_common_scell_v10l0_s basic_fields_v12f0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommonPSCell-v1440 ::= SEQUENCE +struct rr_cfg_common_ps_cell_v1440_s { + // member variables + rr_cfg_common_scell_v1440_s basic_fields_v1440; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigDedicatedPSCell-r12 ::= SEQUENCE +struct rr_cfg_ded_ps_cell_r12_s { + // member variables + bool ext; + bool phys_cfg_ded_ps_cell_r12_present; + bool sps_cfg_r12_present; + bool naics_info_r12_present; + phys_cfg_ded_s phys_cfg_ded_ps_cell_r12; + sps_cfg_s sps_cfg_r12; + naics_assist_info_r12_c naics_info_r12; + // ... + // group 0 + bool neigh_cells_crs_info_ps_cell_r13_present; + copy_ptr neigh_cells_crs_info_ps_cell_r13; + // group 1 + bool sps_cfg_v1430_present; + copy_ptr sps_cfg_v1430; + // group 2 + bool sps_cfg_v1530_present; + bool crs_intf_mitig_enabled_r15_present; + bool neigh_cells_crs_info_r15_present; + copy_ptr sps_cfg_v1530; + bool crs_intf_mitig_enabled_r15; + copy_ptr neigh_cells_crs_info_r15; + + // sequence methods + rr_cfg_ded_ps_cell_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigDedicatedPSCell-v1370 ::= SEQUENCE +struct rr_cfg_ded_ps_cell_v1370_s { + // member variables + bool phys_cfg_ded_ps_cell_v1370_present; + phys_cfg_ded_v1370_s phys_cfg_ded_ps_cell_v1370; + + // sequence methods + rr_cfg_ded_ps_cell_v1370_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddMod-r10 ::= SEQUENCE +struct scell_to_add_mod_r10_s { + struct cell_identif_r10_s_ { + // member variables + uint16_t pci_r10; + uint16_t dl_carrier_freq_r10; + }; + struct s_cell_state_r15_e_ { + enum options { activ, dormant }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + s_cell_state_r15_e_() {} + s_cell_state_r15_e_(options v) : value(v) {} + s_cell_state_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool cell_identif_r10_present; + bool rr_cfg_common_scell_r10_present; + bool rr_cfg_ded_scell_r10_present; + uint8_t s_cell_idx_r10; + cell_identif_r10_s_ cell_identif_r10; + rr_cfg_common_scell_r10_s rr_cfg_common_scell_r10; + rr_cfg_ded_scell_r10_s rr_cfg_ded_scell_r10; + // ... + // group 0 + bool dl_carrier_freq_v1090_present; + uint32_t dl_carrier_freq_v1090; + // group 1 + bool ant_info_ded_scell_v10i0_present; + copy_ptr ant_info_ded_scell_v10i0; + // group 2 + bool srs_switch_from_serv_cell_idx_r14_present; + uint8_t srs_switch_from_serv_cell_idx_r14; + // group 3 + bool s_cell_state_r15_present; + s_cell_state_r15_e_ s_cell_state_r15; + + // sequence methods + scell_to_add_mod_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddMod-v10l0 ::= SEQUENCE +struct scell_to_add_mod_v10l0_s { + // member variables + bool rr_cfg_common_scell_v10l0_present; + rr_cfg_common_scell_v10l0_s rr_cfg_common_scell_v10l0; + + // sequence methods + scell_to_add_mod_v10l0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModExt-v1370 ::= SEQUENCE +struct scell_to_add_mod_ext_v1370_s { + // member variables + bool rr_cfg_common_scell_v1370_present; + rr_cfg_common_scell_v10l0_s rr_cfg_common_scell_v1370; + + // sequence methods + scell_to_add_mod_ext_v1370_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModExt-v1430 ::= SEQUENCE +struct scell_to_add_mod_ext_v1430_s { + struct s_cell_state_r15_e_ { + enum options { activ, dormant }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + s_cell_state_r15_e_() {} + s_cell_state_r15_e_(options v) : value(v) {} + s_cell_state_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool srs_switch_from_serv_cell_idx_r14_present; + uint8_t srs_switch_from_serv_cell_idx_r14; + // ... + // group 0 + bool s_cell_state_r15_present; + s_cell_state_r15_e_ s_cell_state_r15; + + // sequence methods + scell_to_add_mod_ext_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscTxRefCarrierDedicated-r13 ::= CHOICE +struct sl_disc_tx_ref_carrier_ded_r13_c { + struct types { + enum options { p_cell, s_cell, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sl_disc_tx_ref_carrier_ded_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& s_cell() + { + assert_choice_type("sCell", type_.to_string(), "SL-DiscTxRefCarrierDedicated-r13"); + return c; + } + const uint8_t& s_cell() const + { + assert_choice_type("sCell", type_.to_string(), "SL-DiscTxRefCarrierDedicated-r13"); + return c; + } + +private: + types type_; + uint8_t c; +}; + +// SL-DiscTxResource-r13 ::= CHOICE +struct sl_disc_tx_res_r13_c { + struct setup_c_ { + struct types { + enum options { sched_r13, ue_sel_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_disc_tx_cfg_sched_r13_s& sched_r13() + { + assert_choice_type("scheduled-r13", type_.to_string(), "setup"); + return c.get(); + } + sl_disc_tx_pool_ded_r13_s& ue_sel_r13() + { + assert_choice_type("ue-Selected-r13", type_.to_string(), "setup"); + return c.get(); + } + const sl_disc_tx_cfg_sched_r13_s& sched_r13() const + { + assert_choice_type("scheduled-r13", type_.to_string(), "setup"); + return c.get(); + } + const sl_disc_tx_pool_ded_r13_s& ue_sel_r13() const + { + assert_choice_type("ue-Selected-r13", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + sl_disc_tx_res_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "SL-DiscTxResource-r13"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SL-DiscTxResource-r13"); + return c; + } + +private: + types type_; + setup_c_ c; +}; + +// SL-GapPattern-r13 ::= SEQUENCE +struct sl_gap_pattern_r13_s { + struct gap_period_r13_e_ { + enum options { + sf40, + sf60, + sf70, + sf80, + sf120, + sf140, + sf160, + sf240, + sf280, + sf320, + sf640, + sf1280, + sf2560, + sf5120, + sf10240 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 15, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + gap_period_r13_e_() {} + gap_period_r13_e_(options v) : value(v) {} + gap_period_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + gap_period_r13_e_ gap_period_r13; + sl_offset_ind_r12_c gap_offset_r12; + dyn_bitstring gap_sf_bitmap_r13; + // ... + + // sequence methods + sl_gap_pattern_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxPoolToAddModListV2X-r14 ::= SEQUENCE (SIZE (1.. maxSL-V2X-TxPool-r14)) OF SL-TxPoolToAddMod-r14 +typedef dyn_array sl_tx_pool_to_add_mod_list_v2x_r14_l; + +// SL-TxPoolToReleaseListV2X-r14 ::= SEQUENCE (SIZE (1.. maxSL-V2X-TxPool-r14)) OF INTEGER +typedef bounded_array sl_tx_pool_to_release_list_v2x_r14_l; + +// SubframeAssignment-r15 ::= ENUMERATED +struct sf_assign_r15_e { + enum options { sa0, sa1, sa2, sa3, sa4, sa5, sa6 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_assign_r15_e() {} + sf_assign_r15_e(options v) : value(v) {} + sf_assign_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// TunnelConfigLWIP-r13 ::= SEQUENCE +struct tunnel_cfg_lwip_r13_s { + // member variables + bool ext; + ip_address_r13_c ip_address_r13; + ike_id_r13_s ike_id_r13; + // ... + // group 0 + bool lwip_counter_r13_present; + uint16_t lwip_counter_r13; + + // sequence methods + tunnel_cfg_lwip_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-MobilityConfig-r13 ::= SEQUENCE +struct wlan_mob_cfg_r13_s { + struct association_timer_r13_e_ { + enum options { s10, s30, s60, s120, s240 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + association_timer_r13_e_() {} + association_timer_r13_e_(options v) : value(v) {} + association_timer_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool wlan_to_release_list_r13_present; + bool wlan_to_add_list_r13_present; + bool association_timer_r13_present; + bool success_report_requested_r13_present; + wlan_id_list_r13_l wlan_to_release_list_r13; + wlan_id_list_r13_l wlan_to_add_list_r13; + association_timer_r13_e_ association_timer_r13; + // ... + // group 0 + bool wlan_suspend_cfg_r14_present; + copy_ptr wlan_suspend_cfg_r14; + + // sequence methods + wlan_mob_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-BandwidthClass-r10 ::= ENUMERATED +struct ca_bw_class_r10_e { + enum options { a, b, c, d, e, f, /*...*/ }; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + ca_bw_class_r10_e() {} + ca_bw_class_r10_e(options v) : value(v) {} + ca_bw_class_r10_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// LWA-Config-r13 ::= SEQUENCE +struct lwa_cfg_r13_s { + // member variables + bool ext; + bool lwa_mob_cfg_r13_present; + bool lwa_wt_counter_r13_present; + wlan_mob_cfg_r13_s lwa_mob_cfg_r13; + uint16_t lwa_wt_counter_r13; + // ... + // group 0 + bool wt_mac_address_r14_present; + fixed_octstring<6> wt_mac_address_r14; + + // sequence methods + lwa_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWIP-Config-r13 ::= SEQUENCE +struct lwip_cfg_r13_s { + // member variables + bool ext; + bool lwip_mob_cfg_r13_present; + bool tunnel_cfg_lwip_r13_present; + wlan_mob_cfg_r13_s lwip_mob_cfg_r13; + tunnel_cfg_lwip_r13_s tunnel_cfg_lwip_r13; + // ... + + // sequence methods + lwip_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityControlInfoSCG-r12 ::= SEQUENCE +struct mob_ctrl_info_scg_r12_s { + struct t307_r12_e_ { + enum options { ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t307_r12_e_() {} + t307_r12_e_(options v) : value(v) {} + t307_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool ue_id_scg_r12_present; + bool rach_cfg_ded_r12_present; + bool ciphering_algorithm_scg_r12_present; + t307_r12_e_ t307_r12; + fixed_bitstring<16> ue_id_scg_r12; + rach_cfg_ded_s rach_cfg_ded_r12; + ciphering_algorithm_r12_e ciphering_algorithm_scg_r12; + // ... + // group 0 + bool make_before_break_scg_r14_present; + bool rach_skip_scg_r14_present; + copy_ptr rach_skip_scg_r14; + + // sequence methods + mob_ctrl_info_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-RAN-AreaCellList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r15)) OF PLMN-RAN-AreaCell-r15 +typedef dyn_array plmn_ran_area_cell_list_r15_l; + +// PLMN-RAN-AreaConfigList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r15)) OF PLMN-RAN-AreaConfig-r15 +typedef dyn_array plmn_ran_area_cfg_list_r15_l; + +// PSCellToAddMod-r12 ::= SEQUENCE +struct ps_cell_to_add_mod_r12_s { + struct cell_identif_r12_s_ { + // member variables + uint16_t pci_r12; + uint32_t dl_carrier_freq_r12; + }; + + // member variables + bool ext; + bool cell_identif_r12_present; + bool rr_cfg_common_ps_cell_r12_present; + bool rr_cfg_ded_ps_cell_r12_present; + uint8_t s_cell_idx_r12; + cell_identif_r12_s_ cell_identif_r12; + rr_cfg_common_ps_cell_r12_s rr_cfg_common_ps_cell_r12; + rr_cfg_ded_ps_cell_r12_s rr_cfg_ded_ps_cell_r12; + // ... + // group 0 + bool ant_info_ded_ps_cell_v1280_present; + copy_ptr ant_info_ded_ps_cell_v1280; + // group 1 + bool s_cell_idx_r13_present; + uint8_t s_cell_idx_r13; + // group 2 + bool rr_cfg_ded_ps_cell_v1370_present; + copy_ptr rr_cfg_ded_ps_cell_v1370; + + // sequence methods + ps_cell_to_add_mod_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PSCellToAddMod-v12f0 ::= SEQUENCE +struct ps_cell_to_add_mod_v12f0_s { + // member variables + bool rr_cfg_common_ps_cell_r12_present; + rr_cfg_common_ps_cell_v12f0_s rr_cfg_common_ps_cell_r12; + + // sequence methods + ps_cell_to_add_mod_v12f0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PSCellToAddMod-v1440 ::= SEQUENCE +struct ps_cell_to_add_mod_v1440_s { + // member variables + bool rr_cfg_common_ps_cell_r14_present; + rr_cfg_common_ps_cell_v1440_s rr_cfg_common_ps_cell_r14; + + // sequence methods + ps_cell_to_add_mod_v1440_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RCLWI-Config-r13 ::= SEQUENCE +struct rclwi_cfg_r13_s { + struct cmd_c_ { + struct steer_to_wlan_r13_s_ { + // member variables + wlan_id_list_r12_l mob_cfg_r13; + }; + struct types { + enum options { steer_to_wlan_r13, steer_to_lte_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cmd_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + steer_to_wlan_r13_s_& steer_to_wlan_r13() + { + assert_choice_type("steerToWLAN-r13", type_.to_string(), "command"); + return c; + } + const steer_to_wlan_r13_s_& steer_to_wlan_r13() const + { + assert_choice_type("steerToWLAN-r13", type_.to_string(), "command"); + return c; + } + + private: + types type_; + steer_to_wlan_r13_s_ c; + }; + + // member variables + bool ext; + cmd_c_ cmd; + // ... + + // sequence methods + rclwi_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v1510-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1510_ies_s { + struct nr_cfg_r15_c_ { + struct setup_s_ { + // member variables + bool nr_secondary_cell_group_cfg_r15_present; + bool p_max_eutra_r15_present; + bool endc_release_and_add_r15; + dyn_octstring nr_secondary_cell_group_cfg_r15; + int8_t p_max_eutra_r15; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + nr_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "nr-Config-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "nr-Config-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct tdm_pattern_cfg_r15_c_ { + struct setup_s_ { + // member variables + sf_assign_r15_e sf_assign_r15; + uint8_t harq_offset_r15; + }; + typedef setup_e types; + + // choice methods + tdm_pattern_cfg_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "tdm-PatternConfig-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "tdm-PatternConfig-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool nr_cfg_r15_present; + bool sk_counter_r15_present; + bool nr_radio_bearer_cfg1_r15_present; + bool nr_radio_bearer_cfg2_r15_present; + bool tdm_pattern_cfg_r15_present; + bool non_crit_ext_present; + nr_cfg_r15_c_ nr_cfg_r15; + uint16_t sk_counter_r15; + dyn_octstring nr_radio_bearer_cfg1_r15; + dyn_octstring nr_radio_bearer_cfg2_r15; + tdm_pattern_cfg_r15_c_ tdm_pattern_cfg_r15; + rrc_conn_recfg_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v1510_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigDedicatedSCG-r12 ::= SEQUENCE +struct rr_cfg_ded_scg_r12_s { + // member variables + bool ext; + bool drb_to_add_mod_list_scg_r12_present; + bool mac_main_cfg_scg_r12_present; + bool rlf_timers_and_consts_scg_r12_present; + drb_to_add_mod_list_scg_r12_l drb_to_add_mod_list_scg_r12; + mac_main_cfg_s mac_main_cfg_scg_r12; + rlf_timers_and_consts_scg_r12_c rlf_timers_and_consts_scg_r12; + // ... + // group 0 + bool drb_to_add_mod_list_scg_r15_present; + copy_ptr drb_to_add_mod_list_scg_r15; + + // sequence methods + rr_cfg_ded_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModList-r10 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF SCellToAddMod-r10 +typedef dyn_array scell_to_add_mod_list_r10_l; + +// SCellToAddModList-v10l0 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF SCellToAddMod-v10l0 +typedef dyn_array scell_to_add_mod_list_v10l0_l; + +// SCellToAddModListExt-v1370 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellToAddModExt-v1370 +typedef dyn_array scell_to_add_mod_list_ext_v1370_l; + +// SCellToAddModListExt-v1430 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellToAddModExt-v1430 +typedef dyn_array scell_to_add_mod_list_ext_v1430_l; + +// SCellToReleaseList-r10 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF INTEGER +typedef bounded_array scell_to_release_list_r10_l; + +// SL-CommTxPoolToAddMod-r12 ::= SEQUENCE +struct sl_comm_tx_pool_to_add_mod_r12_s { + // member variables + uint8_t pool_id_r12; + sl_comm_res_pool_r12_s pool_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CommTxPoolToAddModExt-r13 ::= SEQUENCE +struct sl_comm_tx_pool_to_add_mod_ext_r13_s { + // member variables + uint8_t pool_id_v1310; + sl_comm_res_pool_r12_s pool_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscTxResourceInfoPerFreq-r13 ::= SEQUENCE +struct sl_disc_tx_res_info_per_freq_r13_s { + // member variables + bool ext; + bool disc_tx_res_r13_present; + bool disc_tx_res_ps_r13_present; + bool disc_tx_ref_carrier_ded_r13_present; + bool disc_cell_sel_info_r13_present; + uint32_t disc_tx_carrier_freq_r13; + sl_disc_tx_res_r13_c disc_tx_res_r13; + sl_disc_tx_res_r13_c disc_tx_res_ps_r13; + sl_disc_tx_ref_carrier_ded_r13_c disc_tx_ref_carrier_ded_r13; + cell_sel_info_nfreq_r13_s disc_cell_sel_info_r13; + // ... + + // sequence methods + sl_disc_tx_res_info_per_freq_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-GapPatternList-r13 ::= SEQUENCE (SIZE (1..maxSL-GP-r13)) OF SL-GapPattern-r13 +typedef dyn_array sl_gap_pattern_list_r13_l; + +// SL-TF-IndexPair-r12 ::= SEQUENCE +struct sl_tf_idx_pair_r12_s { + // member variables + bool disc_sf_idx_r12_present; + bool disc_prb_idx_r12_present; + uint8_t disc_sf_idx_r12; + uint8_t disc_prb_idx_r12; + + // sequence methods + sl_tf_idx_pair_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-ConfigDedicated-r14 ::= SEQUENCE +struct sl_v2x_cfg_ded_r14_s { + struct comm_tx_res_r14_c_ { + struct setup_c_ { + struct sched_r14_s_ { + // member variables + bool v2x_sched_pool_r14_present; + bool mcs_r14_present; + fixed_bitstring<16> sl_v_rnti_r14; + mac_main_cfg_sl_r12_s mac_main_cfg_r14; + sl_comm_res_pool_v2x_r14_s v2x_sched_pool_r14; + uint8_t mcs_r14; + lc_ch_group_info_list_r13_l lc_ch_group_info_list_r14; + + // sequence methods + sched_r14_s_(); + }; + struct ue_sel_r14_s_ { + struct v2x_comm_tx_pool_normal_ded_r14_s_ { + // member variables + bool pool_to_release_list_r14_present; + bool pool_to_add_mod_list_r14_present; + bool v2x_comm_tx_pool_sensing_cfg_r14_present; + sl_tx_pool_to_release_list_v2x_r14_l pool_to_release_list_r14; + sl_tx_pool_to_add_mod_list_v2x_r14_l pool_to_add_mod_list_r14; + sl_comm_tx_pool_sensing_cfg_r14_s v2x_comm_tx_pool_sensing_cfg_r14; + + // sequence methods + v2x_comm_tx_pool_normal_ded_r14_s_(); + }; + + // member variables + v2x_comm_tx_pool_normal_ded_r14_s_ v2x_comm_tx_pool_normal_ded_r14; + }; + struct types { + enum options { sched_r14, ue_sel_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sched_r14_s_& sched_r14() + { + assert_choice_type("scheduled-r14", type_.to_string(), "setup"); + return c.get(); + } + ue_sel_r14_s_& ue_sel_r14() + { + assert_choice_type("ue-Selected-r14", type_.to_string(), "setup"); + return c.get(); + } + const sched_r14_s_& sched_r14() const + { + assert_choice_type("scheduled-r14", type_.to_string(), "setup"); + return c.get(); + } + const ue_sel_r14_s_& ue_sel_r14() const + { + assert_choice_type("ue-Selected-r14", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + comm_tx_res_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "commTxResources-r14"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "commTxResources-r14"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct comm_tx_res_v1530_c_ { + struct setup_c_ { + struct sched_v1530_s_ { + // member variables + bool lc_ch_group_info_list_v1530_present; + bool mcs_r15_present; + lc_ch_group_info_list_v1530_l lc_ch_group_info_list_v1530; + uint8_t mcs_r15; + + // sequence methods + sched_v1530_s_(); + }; + struct ue_sel_v1530_s_ { + // member variables + bool v2x_freq_sel_cfg_list_r15_present; + sl_v2x_freq_sel_cfg_list_r15_l v2x_freq_sel_cfg_list_r15; + + // sequence methods + ue_sel_v1530_s_(); + }; + struct types { + enum options { sched_v1530, ue_sel_v1530, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sched_v1530_s_& sched_v1530() + { + assert_choice_type("scheduled-v1530", type_.to_string(), "setup"); + return c.get(); + } + ue_sel_v1530_s_& ue_sel_v1530() + { + assert_choice_type("ue-Selected-v1530", type_.to_string(), "setup"); + return c.get(); + } + const sched_v1530_s_& sched_v1530() const + { + assert_choice_type("scheduled-v1530", type_.to_string(), "setup"); + return c.get(); + } + const ue_sel_v1530_s_& ue_sel_v1530() const + { + assert_choice_type("ue-Selected-v1530", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + comm_tx_res_v1530_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "commTxResources-v1530"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "commTxResources-v1530"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + + // member variables + bool ext; + bool comm_tx_res_r14_present; + bool v2x_inter_freq_info_list_r14_present; + bool thres_sl_tx_prioritization_r14_present; + bool type_tx_sync_r14_present; + bool cbr_ded_tx_cfg_list_r14_present; + comm_tx_res_r14_c_ comm_tx_res_r14; + sl_inter_freq_info_list_v2x_r14_l v2x_inter_freq_info_list_r14; + uint8_t thres_sl_tx_prioritization_r14; + sl_type_tx_sync_r14_e type_tx_sync_r14; + sl_cbr_common_tx_cfg_list_r14_s cbr_ded_tx_cfg_list_r14; + // ... + // group 0 + bool comm_tx_res_v1530_present; + bool v2x_packet_dupl_cfg_r15_present; + bool sync_freq_list_r15_present; + bool slss_tx_multi_freq_r15_present; + copy_ptr comm_tx_res_v1530; + copy_ptr v2x_packet_dupl_cfg_r15; + copy_ptr sync_freq_list_r15; + + // sequence methods + sl_v2x_cfg_ded_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandIndication-r14 ::= SEQUENCE +struct band_ind_r14_s { + // member variables + bool ca_bw_class_ul_r14_present; + uint16_t band_eutra_r14; + ca_bw_class_r10_e ca_bw_class_dl_r14; + ca_bw_class_r10_e ca_bw_class_ul_r14; + + // sequence methods + band_ind_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWA-Configuration-r13 ::= CHOICE +struct lwa_cfg_r13_c { + struct setup_s_ { + // member variables + lwa_cfg_r13_s lwa_cfg_r13; + }; + typedef setup_e types; + + // choice methods + lwa_cfg_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "LWA-Configuration-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "LWA-Configuration-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// LWIP-Configuration-r13 ::= CHOICE +struct lwip_cfg_r13_c { + struct setup_s_ { + // member variables + lwip_cfg_r13_s lwip_cfg_r13; + }; + typedef setup_e types; + + // choice methods + lwip_cfg_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "LWIP-Configuration-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "LWIP-Configuration-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MeasCSI-RS-Config-r12 ::= SEQUENCE +struct meas_csi_rs_cfg_r12_s { + // member variables + bool ext; + uint8_t meas_csi_rs_id_r12; + uint16_t pci_r12; + uint16_t scrambling_id_r12; + uint8_t res_cfg_r12; + uint8_t sf_offset_r12; + q_offset_range_e csi_rs_individual_offset_r12; + // ... + + // sequence methods + meas_csi_rs_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysCellIdRangeUTRA-FDD-r9 ::= SEQUENCE +struct pci_range_utra_fdd_r9_s { + // member variables + bool range_r9_present; + uint16_t start_r9; + uint16_t range_r9; + + // sequence methods + pci_range_utra_fdd_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PowerCoordinationInfo-r12 ::= SEQUENCE +struct pwr_coordination_info_r12_s { + // member variables + uint8_t p_me_nb_r12; + uint8_t p_se_nb_r12; + uint8_t pwr_ctrl_mode_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAN-NotificationAreaInfo-r15 ::= CHOICE +struct ran_notif_area_info_r15_c { + struct types { + enum options { cell_list_r15, ran_area_cfg_list_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ran_notif_area_info_r15_c() : type_(types::nulltype) {} + ran_notif_area_info_r15_c(const ran_notif_area_info_r15_c& other); + ran_notif_area_info_r15_c& operator=(const ran_notif_area_info_r15_c& other); + ~ran_notif_area_info_r15_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + plmn_ran_area_cell_list_r15_l& cell_list_r15() + { + assert_choice_type("cellList-r15", type_.to_string(), "RAN-NotificationAreaInfo-r15"); + return c.get(); + } + plmn_ran_area_cfg_list_r15_l& ran_area_cfg_list_r15() + { + assert_choice_type("ran-AreaConfigList-r15", type_.to_string(), "RAN-NotificationAreaInfo-r15"); + return c.get(); + } + const plmn_ran_area_cell_list_r15_l& cell_list_r15() const + { + assert_choice_type("cellList-r15", type_.to_string(), "RAN-NotificationAreaInfo-r15"); + return c.get(); + } + const plmn_ran_area_cfg_list_r15_l& ran_area_cfg_list_r15() const + { + assert_choice_type("ran-AreaConfigList-r15", type_.to_string(), "RAN-NotificationAreaInfo-r15"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// RCLWI-Configuration-r13 ::= CHOICE +struct rclwi_cfg_r13_c { + struct setup_s_ { + // member variables + rclwi_cfg_r13_s rclwi_cfg_r13; + }; + typedef setup_e types; + + // choice methods + rclwi_cfg_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RCLWI-Configuration-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RCLWI-Configuration-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RRCConnectionReconfiguration-v1430-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1430_ies_s { + // member variables + bool sl_v2x_cfg_ded_r14_present; + bool s_cell_to_add_mod_list_ext_v1430_present; + bool per_cc_gap_ind_request_r14_present; + bool sib_type2_ded_r14_present; + bool non_crit_ext_present; + sl_v2x_cfg_ded_r14_s sl_v2x_cfg_ded_r14; + scell_to_add_mod_list_ext_v1430_l s_cell_to_add_mod_list_ext_v1430; + dyn_octstring sib_type2_ded_r14; + rrc_conn_recfg_v1510_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigDedicated-v1370 ::= SEQUENCE +struct rr_cfg_ded_v1370_s { + // member variables + bool phys_cfg_ded_v1370_present; + phys_cfg_ded_v1370_s phys_cfg_ded_v1370; + + // sequence methods + rr_cfg_ded_v1370_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigPartSCG-r12 ::= SEQUENCE +struct scg_cfg_part_scg_r12_s { + // member variables + bool ext; + bool rr_cfg_ded_scg_r12_present; + bool s_cell_to_release_list_scg_r12_present; + bool p_scell_to_add_mod_r12_present; + bool s_cell_to_add_mod_list_scg_r12_present; + bool mob_ctrl_info_scg_r12_present; + rr_cfg_ded_scg_r12_s rr_cfg_ded_scg_r12; + scell_to_release_list_r10_l s_cell_to_release_list_scg_r12; + ps_cell_to_add_mod_r12_s p_scell_to_add_mod_r12; + scell_to_add_mod_list_r10_l s_cell_to_add_mod_list_scg_r12; + mob_ctrl_info_scg_r12_s mob_ctrl_info_scg_r12; + // ... + // group 0 + bool s_cell_to_release_list_scg_ext_r13_present; + bool s_cell_to_add_mod_list_scg_ext_r13_present; + copy_ptr s_cell_to_release_list_scg_ext_r13; + copy_ptr s_cell_to_add_mod_list_scg_ext_r13; + // group 1 + bool s_cell_to_add_mod_list_scg_ext_v1370_present; + copy_ptr s_cell_to_add_mod_list_scg_ext_v1370; + // group 2 + bool p_scell_to_add_mod_v1440_present; + copy_ptr p_scell_to_add_mod_v1440; + // group 3 + bool s_cell_group_to_release_list_scg_r15_present; + bool s_cell_group_to_add_mod_list_scg_r15_present; + copy_ptr s_cell_group_to_release_list_scg_r15; + copy_ptr s_cell_group_to_add_mod_list_scg_r15; + + // sequence methods + scg_cfg_part_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigPartSCG-v12f0 ::= SEQUENCE +struct scg_cfg_part_scg_v12f0_s { + // member variables + bool p_scell_to_add_mod_v12f0_present; + bool s_cell_to_add_mod_list_scg_v12f0_present; + ps_cell_to_add_mod_v12f0_s p_scell_to_add_mod_v12f0; + scell_to_add_mod_list_v10l0_l s_cell_to_add_mod_list_scg_v12f0; + + // sequence methods + scg_cfg_part_scg_v12f0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CommTxPoolToAddModList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-CommTxPoolToAddMod-r12 +typedef dyn_array sl_comm_tx_pool_to_add_mod_list_r12_l; + +// SL-CommTxPoolToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxSL-TxPool-v1310)) OF SL-CommTxPoolToAddModExt-r13 +typedef dyn_array sl_comm_tx_pool_to_add_mod_list_ext_r13_l; + +// SL-DiscSysInfoToReportFreqList-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF INTEGER +typedef bounded_array sl_disc_sys_info_to_report_freq_list_r13_l; + +// SL-DiscTxInfoInterFreqListAdd-r13 ::= SEQUENCE +struct sl_disc_tx_info_inter_freq_list_add_r13_s { + typedef dyn_array disc_tx_freq_to_add_mod_list_r13_l_; + typedef bounded_array disc_tx_freq_to_release_list_r13_l_; + + // member variables + bool ext; + bool disc_tx_freq_to_add_mod_list_r13_present; + bool disc_tx_freq_to_release_list_r13_present; + disc_tx_freq_to_add_mod_list_r13_l_ disc_tx_freq_to_add_mod_list_r13; + disc_tx_freq_to_release_list_r13_l_ disc_tx_freq_to_release_list_r13; + // ... + + // sequence methods + sl_disc_tx_info_inter_freq_list_add_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-GapConfig-r13 ::= SEQUENCE +struct sl_gap_cfg_r13_s { + // member variables + sl_gap_pattern_list_r13_l gap_pattern_list_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TF-IndexPairList-r12 ::= SEQUENCE (SIZE (1..maxSL-TF-IndexPair-r12)) OF SL-TF-IndexPair-r12 +typedef dyn_array sl_tf_idx_pair_list_r12_l; + +// SL-TxPoolToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxSL-TxPool-v1310)) OF INTEGER +typedef bounded_array sl_tx_pool_to_release_list_ext_r13_l; + +// AltTTT-CellsToAddMod-r12 ::= SEQUENCE +struct alt_ttt_cells_to_add_mod_r12_s { + // member variables + uint8_t cell_idx_r12; + pci_range_s pci_range_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BT-NameList-r15 ::= SEQUENCE (SIZE (1..maxBT-Name-r15)) OF OCTET STRING +typedef bounded_array bt_name_list_r15_l; + +// BandCombination-r14 ::= SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandIndication-r14 +typedef dyn_array band_combination_r14_l; + +// BlackCellsToAddMod ::= SEQUENCE +struct black_cells_to_add_mod_s { + // member variables + uint8_t cell_idx; + pci_range_s pci_range; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddMod ::= SEQUENCE +struct cells_to_add_mod_s { + // member variables + uint8_t cell_idx; + uint16_t pci; + q_offset_range_e cell_individual_offset; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddModCDMA2000 ::= SEQUENCE +struct cells_to_add_mod_cdma2000_s { + // member variables + uint8_t cell_idx; + uint16_t pci; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddModNR-r15 ::= SEQUENCE +struct cells_to_add_mod_nr_r15_s { + // member variables + uint8_t cell_idx_r15; + uint16_t pci_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddModUTRA-FDD ::= SEQUENCE +struct cells_to_add_mod_utra_fdd_s { + // member variables + uint8_t cell_idx; + uint16_t pci; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddModUTRA-TDD ::= SEQUENCE +struct cells_to_add_mod_utra_tdd_s { + // member variables + uint8_t cell_idx; + uint8_t pci; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FlightPathInfoReportConfig-r15 ::= SEQUENCE +struct flight_path_info_report_cfg_r15_s { + // member variables + bool include_time_stamp_r15_present; + uint8_t max_way_point_num_r15; + + // sequence methods + flight_path_info_report_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasCSI-RS-ToAddModList-r12 ::= SEQUENCE (SIZE (1..maxCSI-RS-Meas-r12)) OF MeasCSI-RS-Config-r12 +typedef dyn_array meas_csi_rs_to_add_mod_list_r12_l; + +// MeasCSI-RS-ToRemoveList-r12 ::= SEQUENCE (SIZE (1..maxCSI-RS-Meas-r12)) OF INTEGER +typedef dyn_array meas_csi_rs_to_rem_list_r12_l; + +// MeasIdleConfigDedicated-r15 ::= SEQUENCE +struct meas_idle_cfg_ded_r15_s { + struct meas_idle_dur_r15_e_ { + enum options { sec10, sec30, sec60, sec120, sec180, sec240, sec300, spare }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_idle_dur_r15_e_() {} + meas_idle_dur_r15_e_(options v) : value(v) {} + meas_idle_dur_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool meas_idle_carrier_list_eutra_r15_present; + eutra_carrier_list_r15_l meas_idle_carrier_list_eutra_r15; + meas_idle_dur_r15_e_ meas_idle_dur_r15; + // ... + + // sequence methods + meas_idle_cfg_ded_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasSubframeCellList-r10 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF PhysCellIdRange +typedef dyn_array meas_sf_cell_list_r10_l; + +// PhysCellIdRangeUTRA-FDDList-r9 ::= SEQUENCE (SIZE (1..maxPhysCellIdRange-r9)) OF PhysCellIdRangeUTRA-FDD-r9 +typedef dyn_array pci_range_utra_fdd_list_r9_l; + +// RRC-InactiveConfig-r15 ::= SEQUENCE +struct rrc_inactive_cfg_r15_s { + struct ran_paging_cycle_r15_e_ { + enum options { rf32, rf64, rf128, rf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ran_paging_cycle_r15_e_() {} + ran_paging_cycle_r15_e_(options v) : value(v) {} + ran_paging_cycle_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct periodic_rnau_timer_r15_e_ { + enum options { min5, min10, min20, min30, min60, min120, min360, min720 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + periodic_rnau_timer_r15_e_() {} + periodic_rnau_timer_r15_e_(options v) : value(v) {} + periodic_rnau_timer_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ran_paging_cycle_r15_present; + bool ran_notif_area_info_r15_present; + bool periodic_rnau_timer_r15_present; + bool next_hop_chaining_count_r15_present; + bool non_crit_ext_present; + fixed_bitstring<40> full_i_rnti_r15; + fixed_bitstring<24> short_i_rnti_r15; + ran_paging_cycle_r15_e_ ran_paging_cycle_r15; + ran_notif_area_info_r15_c ran_notif_area_info_r15; + periodic_rnau_timer_r15_e_ periodic_rnau_timer_r15; + uint8_t next_hop_chaining_count_r15; + + // sequence methods + rrc_inactive_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v1310-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1310_ies_s { + // member variables + bool s_cell_to_release_list_ext_r13_present; + bool s_cell_to_add_mod_list_ext_r13_present; + bool lwa_cfg_r13_present; + bool lwip_cfg_r13_present; + bool rclwi_cfg_r13_present; + bool non_crit_ext_present; + scell_to_release_list_ext_r13_l s_cell_to_release_list_ext_r13; + scell_to_add_mod_list_ext_r13_l s_cell_to_add_mod_list_ext_r13; + lwa_cfg_r13_c lwa_cfg_r13; + lwip_cfg_r13_c lwip_cfg_r13; + rclwi_cfg_r13_c rclwi_cfg_r13; + rrc_conn_recfg_v1430_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v1370-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1370_ies_s { + // member variables + bool rr_cfg_ded_v1370_present; + bool s_cell_to_add_mod_list_ext_v1370_present; + bool non_crit_ext_present; + rr_cfg_ded_v1370_s rr_cfg_ded_v1370; + scell_to_add_mod_list_ext_v1370_l s_cell_to_add_mod_list_ext_v1370; + + // sequence methods + rrc_conn_recfg_v1370_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-Configuration-r12 ::= CHOICE +struct scg_cfg_r12_c { + struct setup_s_ { + struct scg_cfg_part_mcg_r12_s_ { + // member variables + bool ext; + bool scg_counter_r12_present; + bool pwr_coordination_info_r12_present; + uint16_t scg_counter_r12; + pwr_coordination_info_r12_s pwr_coordination_info_r12; + // ... + + // sequence methods + scg_cfg_part_mcg_r12_s_(); + }; + + // member variables + bool scg_cfg_part_mcg_r12_present; + bool scg_cfg_part_scg_r12_present; + scg_cfg_part_mcg_r12_s_ scg_cfg_part_mcg_r12; + scg_cfg_part_scg_r12_s scg_cfg_part_scg_r12; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + scg_cfg_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SCG-Configuration-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SCG-Configuration-r12"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SCG-Configuration-v12f0 ::= CHOICE +struct scg_cfg_v12f0_c { + struct setup_s_ { + // member variables + bool scg_cfg_part_scg_v12f0_present; + scg_cfg_part_scg_v12f0_s scg_cfg_part_scg_v12f0; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + scg_cfg_v12f0_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SCG-Configuration-v12f0"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SCG-Configuration-v12f0"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// SL-CommConfig-r12 ::= SEQUENCE +struct sl_comm_cfg_r12_s { + struct comm_tx_res_r12_c_ { + struct setup_c_ { + struct sched_r12_s_ { + // member variables + bool mcs_r12_present; + fixed_bitstring<16> sl_rnti_r12; + mac_main_cfg_sl_r12_s mac_main_cfg_r12; + sl_comm_res_pool_r12_s sc_comm_tx_cfg_r12; + uint8_t mcs_r12; + + // sequence methods + sched_r12_s_(); + }; + struct ue_sel_r12_s_ { + struct comm_tx_pool_normal_ded_r12_s_ { + // member variables + bool pool_to_release_list_r12_present; + bool pool_to_add_mod_list_r12_present; + sl_tx_pool_to_release_list_r12_l pool_to_release_list_r12; + sl_comm_tx_pool_to_add_mod_list_r12_l pool_to_add_mod_list_r12; + + // sequence methods + comm_tx_pool_normal_ded_r12_s_(); + }; + + // member variables + comm_tx_pool_normal_ded_r12_s_ comm_tx_pool_normal_ded_r12; + }; + struct types { + enum options { sched_r12, ue_sel_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sched_r12_s_& sched_r12() + { + assert_choice_type("scheduled-r12", type_.to_string(), "setup"); + return c.get(); + } + ue_sel_r12_s_& ue_sel_r12() + { + assert_choice_type("ue-Selected-r12", type_.to_string(), "setup"); + return c.get(); + } + const sched_r12_s_& sched_r12() const + { + assert_choice_type("scheduled-r12", type_.to_string(), "setup"); + return c.get(); + } + const ue_sel_r12_s_& ue_sel_r12() const + { + assert_choice_type("ue-Selected-r12", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + comm_tx_res_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "commTxResources-r12"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "commTxResources-r12"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct comm_tx_res_v1310_c_ { + struct setup_c_ { + struct sched_v1310_s_ { + // member variables + lc_ch_group_info_list_r13_l lc_ch_group_info_list_r13; + bool multiple_tx_r13; + }; + struct ue_sel_v1310_s_ { + struct comm_tx_pool_normal_ded_ext_r13_s_ { + // member variables + bool pool_to_release_list_ext_r13_present; + bool pool_to_add_mod_list_ext_r13_present; + sl_tx_pool_to_release_list_ext_r13_l pool_to_release_list_ext_r13; + sl_comm_tx_pool_to_add_mod_list_ext_r13_l pool_to_add_mod_list_ext_r13; + + // sequence methods + comm_tx_pool_normal_ded_ext_r13_s_(); + }; + + // member variables + comm_tx_pool_normal_ded_ext_r13_s_ comm_tx_pool_normal_ded_ext_r13; + }; + struct types { + enum options { sched_v1310, ue_sel_v1310, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sched_v1310_s_& sched_v1310() + { + assert_choice_type("scheduled-v1310", type_.to_string(), "setup"); + return c.get(); + } + ue_sel_v1310_s_& ue_sel_v1310() + { + assert_choice_type("ue-Selected-v1310", type_.to_string(), "setup"); + return c.get(); + } + const sched_v1310_s_& sched_v1310() const + { + assert_choice_type("scheduled-v1310", type_.to_string(), "setup"); + return c.get(); + } + const ue_sel_v1310_s_& ue_sel_v1310() const + { + assert_choice_type("ue-Selected-v1310", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + comm_tx_res_v1310_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "commTxResources-v1310"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "commTxResources-v1310"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + + // member variables + bool ext; + bool comm_tx_res_r12_present; + comm_tx_res_r12_c_ comm_tx_res_r12; + // ... + // group 0 + bool comm_tx_res_v1310_present; + bool comm_tx_allow_relay_ded_r13_present; + copy_ptr comm_tx_res_v1310; + bool comm_tx_allow_relay_ded_r13; + + // sequence methods + sl_comm_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscConfig-r12 ::= SEQUENCE +struct sl_disc_cfg_r12_s { + struct disc_tx_res_r12_c_ { + struct setup_c_ { + struct sched_r12_s_ { + // member variables + bool disc_tx_cfg_r12_present; + bool disc_tf_idx_list_r12_present; + bool disc_hop_cfg_r12_present; + sl_disc_res_pool_r12_s disc_tx_cfg_r12; + sl_tf_idx_pair_list_r12_l disc_tf_idx_list_r12; + sl_hop_cfg_disc_r12_s disc_hop_cfg_r12; + + // sequence methods + sched_r12_s_(); + }; + struct ue_sel_r12_s_ { + struct disc_tx_pool_ded_r12_s_ { + // member variables + bool pool_to_release_list_r12_present; + bool pool_to_add_mod_list_r12_present; + sl_tx_pool_to_release_list_r12_l pool_to_release_list_r12; + sl_disc_tx_pool_to_add_mod_list_r12_l pool_to_add_mod_list_r12; + + // sequence methods + disc_tx_pool_ded_r12_s_(); + }; + + // member variables + bool disc_tx_pool_ded_r12_present; + disc_tx_pool_ded_r12_s_ disc_tx_pool_ded_r12; + + // sequence methods + ue_sel_r12_s_(); + }; + struct types { + enum options { sched_r12, ue_sel_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sched_r12_s_& sched_r12() + { + assert_choice_type("scheduled-r12", type_.to_string(), "setup"); + return c.get(); + } + ue_sel_r12_s_& ue_sel_r12() + { + assert_choice_type("ue-Selected-r12", type_.to_string(), "setup"); + return c.get(); + } + const sched_r12_s_& sched_r12() const + { + assert_choice_type("scheduled-r12", type_.to_string(), "setup"); + return c.get(); + } + const ue_sel_r12_s_& ue_sel_r12() const + { + assert_choice_type("ue-Selected-r12", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + disc_tx_res_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "discTxResources-r12"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "discTxResources-r12"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct disc_tf_idx_list_v1260_c_ { + struct setup_s_ { + // member variables + sl_tf_idx_pair_list_r12b_l disc_tf_idx_list_r12b; + }; + typedef setup_e types; + + // choice methods + disc_tf_idx_list_v1260_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "discTF-IndexList-v1260"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "discTF-IndexList-v1260"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct disc_tx_res_ps_r13_c_ { + struct setup_c_ { + struct ue_sel_r13_s_ { + // member variables + sl_disc_tx_pool_ded_r13_s disc_tx_pool_ps_ded_r13; + }; + struct types { + enum options { sched_r13, ue_sel_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + setup_c_() : type_(types::nulltype) {} + setup_c_(const setup_c_& other); + setup_c_& operator=(const setup_c_& other); + ~setup_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_disc_tx_cfg_sched_r13_s& sched_r13() + { + assert_choice_type("scheduled-r13", type_.to_string(), "setup"); + return c.get(); + } + ue_sel_r13_s_& ue_sel_r13() + { + assert_choice_type("ue-Selected-r13", type_.to_string(), "setup"); + return c.get(); + } + const sl_disc_tx_cfg_sched_r13_s& sched_r13() const + { + assert_choice_type("scheduled-r13", type_.to_string(), "setup"); + return c.get(); + } + const ue_sel_r13_s_& ue_sel_r13() const + { + assert_choice_type("ue-Selected-r13", type_.to_string(), "setup"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef setup_e types; + + // choice methods + disc_tx_res_ps_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_c_& setup() + { + assert_choice_type("setup", type_.to_string(), "discTxResourcesPS-r13"); + return c; + } + const setup_c_& setup() const + { + assert_choice_type("setup", type_.to_string(), "discTxResourcesPS-r13"); + return c; + } + + private: + types type_; + setup_c_ c; + }; + struct disc_tx_inter_freq_info_r13_c_ { + struct setup_s_ { + // member variables + bool disc_tx_carrier_freq_r13_present; + bool disc_tx_ref_carrier_ded_r13_present; + bool disc_tx_info_inter_freq_list_add_r13_present; + uint32_t disc_tx_carrier_freq_r13; + sl_disc_tx_ref_carrier_ded_r13_c disc_tx_ref_carrier_ded_r13; + sl_disc_tx_info_inter_freq_list_add_r13_s disc_tx_info_inter_freq_list_add_r13; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + disc_tx_inter_freq_info_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "discTxInterFreqInfo-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "discTxInterFreqInfo-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct disc_rx_gap_cfg_r13_c_ { + typedef setup_e types; + + // choice methods + disc_rx_gap_cfg_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_gap_cfg_r13_s& setup() + { + assert_choice_type("setup", type_.to_string(), "discRxGapConfig-r13"); + return c; + } + const sl_gap_cfg_r13_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "discRxGapConfig-r13"); + return c; + } + + private: + types type_; + sl_gap_cfg_r13_s c; + }; + struct disc_tx_gap_cfg_r13_c_ { + typedef setup_e types; + + // choice methods + disc_tx_gap_cfg_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_gap_cfg_r13_s& setup() + { + assert_choice_type("setup", type_.to_string(), "discTxGapConfig-r13"); + return c; + } + const sl_gap_cfg_r13_s& setup() const + { + assert_choice_type("setup", type_.to_string(), "discTxGapConfig-r13"); + return c; + } + + private: + types type_; + sl_gap_cfg_r13_s c; + }; + struct disc_sys_info_to_report_cfg_r13_c_ { + typedef setup_e types; + + // choice methods + disc_sys_info_to_report_cfg_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sl_disc_sys_info_to_report_freq_list_r13_l& setup() + { + assert_choice_type("setup", type_.to_string(), "discSysInfoToReportConfig-r13"); + return c; + } + const sl_disc_sys_info_to_report_freq_list_r13_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "discSysInfoToReportConfig-r13"); + return c; + } + + private: + types type_; + sl_disc_sys_info_to_report_freq_list_r13_l c; + }; + + // member variables + bool ext; + bool disc_tx_res_r12_present; + disc_tx_res_r12_c_ disc_tx_res_r12; + // ... + // group 0 + bool disc_tf_idx_list_v1260_present; + copy_ptr disc_tf_idx_list_v1260; + // group 1 + bool disc_tx_res_ps_r13_present; + bool disc_tx_inter_freq_info_r13_present; + bool gap_requests_allowed_ded_r13_present; + bool disc_rx_gap_cfg_r13_present; + bool disc_tx_gap_cfg_r13_present; + bool disc_sys_info_to_report_cfg_r13_present; + copy_ptr disc_tx_res_ps_r13; + copy_ptr disc_tx_inter_freq_info_r13; + bool gap_requests_allowed_ded_r13; + copy_ptr disc_rx_gap_cfg_r13; + copy_ptr disc_tx_gap_cfg_r13; + copy_ptr disc_sys_info_to_report_cfg_r13; + + // sequence methods + sl_disc_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-SyncTxControl-r12 ::= SEQUENCE +struct sl_sync_tx_ctrl_r12_s { + struct network_ctrl_sync_tx_r12_e_ { + enum options { on, off }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + network_ctrl_sync_tx_r12_e_() {} + network_ctrl_sync_tx_r12_e_(options v) : value(v) {} + network_ctrl_sync_tx_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool network_ctrl_sync_tx_r12_present; + network_ctrl_sync_tx_r12_e_ network_ctrl_sync_tx_r12; + + // sequence methods + sl_sync_tx_ctrl_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry-v1530-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1530_ies_s { + // member variables + bool request_stti_spt_cap_r15_present; + bool eutra_nr_only_r15_present; + bool non_crit_ext_present; + + // sequence methods + ue_cap_enquiry_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-ChannelList-r13 ::= SEQUENCE (SIZE (1..maxWLAN-Channels-r13)) OF INTEGER +typedef bounded_array wlan_ch_list_r13_l; + +// WLAN-NameList-r15 ::= SEQUENCE (SIZE (1..maxWLAN-Name-r15)) OF OCTET STRING +typedef bounded_array wlan_name_list_r15_l; + +// WhiteCellsToAddMod-r13 ::= SEQUENCE +struct white_cells_to_add_mod_r13_s { + // member variables + uint8_t cell_idx_r13; + pci_range_s pci_range_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AltTTT-CellsToAddModList-r12 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF AltTTT-CellsToAddMod-r12 +typedef dyn_array alt_ttt_cells_to_add_mod_list_r12_l; + +// BT-NameListConfig-r15 ::= CHOICE +struct bt_name_list_cfg_r15_c { + typedef setup_e types; + + // choice methods + bt_name_list_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + bt_name_list_r15_l& setup() + { + assert_choice_type("setup", type_.to_string(), "BT-NameListConfig-r15"); + return c; + } + const bt_name_list_r15_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "BT-NameListConfig-r15"); + return c; + } + +private: + types type_; + bt_name_list_r15_l c; +}; + +// BandCombinationList-r14 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombination-r14 +typedef dyn_array band_combination_list_r14_l; + +// BlackCellsToAddModList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF BlackCellsToAddMod +typedef dyn_array black_cells_to_add_mod_list_l; + +// CDMA2000-Type ::= ENUMERATED +struct cdma2000_type_e { + enum options { type1_xrtt, type_hrpd }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cdma2000_type_e() {} + cdma2000_type_e(options v) : value(v) {} + cdma2000_type_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// CSG-AllowedReportingCells-r9 ::= SEQUENCE +struct csg_allowed_report_cells_r9_s { + // member variables + bool pci_range_utra_fdd_list_r9_present; + pci_range_utra_fdd_list_r9_l pci_range_utra_fdd_list_r9; + + // sequence methods + csg_allowed_report_cells_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CandidateServingFreqListNR-r15 ::= SEQUENCE (SIZE (1..maxFreqIDC-r11)) OF INTEGER +typedef bounded_array candidate_serving_freq_list_nr_r15_l; + +// CarrierFreqGERAN ::= SEQUENCE +struct carrier_freq_geran_s { + // member variables + uint16_t arfcn; + band_ind_geran_e band_ind; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellIndexList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF INTEGER +typedef bounded_array cell_idx_list_l; + +// CellsToAddModList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddMod +typedef dyn_array cells_to_add_mod_list_l; + +// CellsToAddModListCDMA2000 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModCDMA2000 +typedef dyn_array cells_to_add_mod_list_cdma2000_l; + +// CellsToAddModListNR-r15 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModNR-r15 +typedef dyn_array cells_to_add_mod_list_nr_r15_l; + +// CellsToAddModListUTRA-FDD ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModUTRA-FDD +typedef dyn_array cells_to_add_mod_list_utra_fdd_l; + +// CellsToAddModListUTRA-TDD ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModUTRA-TDD +typedef dyn_array cells_to_add_mod_list_utra_tdd_l; + +// MeasCycleSCell-r10 ::= ENUMERATED +struct meas_cycle_scell_r10_e { + enum options { sf160, sf256, sf320, sf512, sf640, sf1024, sf1280, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_cycle_scell_r10_e() {} + meas_cycle_scell_r10_e(options v) : value(v) {} + meas_cycle_scell_r10_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// MeasDS-Config-r12 ::= CHOICE +struct meas_ds_cfg_r12_c { + struct setup_s_ { + struct dmtc_period_offset_r12_c_ { + struct types { + enum options { ms40_r12, ms80_r12, ms160_r12, /*...*/ nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + dmtc_period_offset_r12_c_() : type_(types::nulltype) {} + dmtc_period_offset_r12_c_(const dmtc_period_offset_r12_c_& other); + dmtc_period_offset_r12_c_& operator=(const dmtc_period_offset_r12_c_& other); + ~dmtc_period_offset_r12_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& ms40_r12() + { + assert_choice_type("ms40-r12", type_.to_string(), "dmtc-PeriodOffset-r12"); + return c.get(); + } + uint8_t& ms80_r12() + { + assert_choice_type("ms80-r12", type_.to_string(), "dmtc-PeriodOffset-r12"); + return c.get(); + } + uint8_t& ms160_r12() + { + assert_choice_type("ms160-r12", type_.to_string(), "dmtc-PeriodOffset-r12"); + return c.get(); + } + const uint8_t& ms40_r12() const + { + assert_choice_type("ms40-r12", type_.to_string(), "dmtc-PeriodOffset-r12"); + return c.get(); + } + const uint8_t& ms80_r12() const + { + assert_choice_type("ms80-r12", type_.to_string(), "dmtc-PeriodOffset-r12"); + return c.get(); + } + const uint8_t& ms160_r12() const + { + assert_choice_type("ms160-r12", type_.to_string(), "dmtc-PeriodOffset-r12"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct ds_occasion_dur_r12_c_ { + struct types { + enum options { dur_fdd_r12, dur_tdd_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ds_occasion_dur_r12_c_() : type_(types::nulltype) {} + ds_occasion_dur_r12_c_(const ds_occasion_dur_r12_c_& other); + ds_occasion_dur_r12_c_& operator=(const ds_occasion_dur_r12_c_& other); + ~ds_occasion_dur_r12_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& dur_fdd_r12() + { + assert_choice_type("durationFDD-r12", type_.to_string(), "ds-OccasionDuration-r12"); + return c.get(); + } + uint8_t& dur_tdd_r12() + { + assert_choice_type("durationTDD-r12", type_.to_string(), "ds-OccasionDuration-r12"); + return c.get(); + } + const uint8_t& dur_fdd_r12() const + { + assert_choice_type("durationFDD-r12", type_.to_string(), "ds-OccasionDuration-r12"); + return c.get(); + } + const uint8_t& dur_tdd_r12() const + { + assert_choice_type("durationTDD-r12", type_.to_string(), "ds-OccasionDuration-r12"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + bool meas_csi_rs_to_rem_list_r12_present; + bool meas_csi_rs_to_add_mod_list_r12_present; + dmtc_period_offset_r12_c_ dmtc_period_offset_r12; + ds_occasion_dur_r12_c_ ds_occasion_dur_r12; + meas_csi_rs_to_rem_list_r12_l meas_csi_rs_to_rem_list_r12; + meas_csi_rs_to_add_mod_list_r12_l meas_csi_rs_to_add_mod_list_r12; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + meas_ds_cfg_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasDS-Config-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasDS-Config-r12"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MeasGapConfig ::= CHOICE +struct meas_gap_cfg_c { + struct setup_s_ { + struct gap_offset_c_ { + struct types { + enum options { + gp0, + gp1, + // ... + gp2_r14, + gp3_r14, + gp_ncsg0_r14, + gp_ncsg1_r14, + gp_ncsg2_r14, + gp_ncsg3_r14, + gp_non_uniform1_r14, + gp_non_uniform2_r14, + gp_non_uniform3_r14, + gp_non_uniform4_r14, + gp4_r15, + gp5_r15, + gp6_r15, + gp7_r15, + gp8_r15, + gp9_r15, + gp10_r15, + gp11_r15, + nulltype + }; + + options value; + static const uint32_t nof_types = 20, nof_exts = 18; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + gap_offset_c_() : type_(types::nulltype) {} + gap_offset_c_(const gap_offset_c_& other); + gap_offset_c_& operator=(const gap_offset_c_& other); + ~gap_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& gp0() + { + assert_choice_type("gp0", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp1() + { + assert_choice_type("gp1", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp2_r14() + { + assert_choice_type("gp2-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp3_r14() + { + assert_choice_type("gp3-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp_ncsg0_r14() + { + assert_choice_type("gp-ncsg0-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp_ncsg1_r14() + { + assert_choice_type("gp-ncsg1-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp_ncsg2_r14() + { + assert_choice_type("gp-ncsg2-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp_ncsg3_r14() + { + assert_choice_type("gp-ncsg3-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint16_t& gp_non_uniform1_r14() + { + assert_choice_type("gp-nonUniform1-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint16_t& gp_non_uniform2_r14() + { + assert_choice_type("gp-nonUniform2-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint16_t& gp_non_uniform3_r14() + { + assert_choice_type("gp-nonUniform3-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint16_t& gp_non_uniform4_r14() + { + assert_choice_type("gp-nonUniform4-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp4_r15() + { + assert_choice_type("gp4-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp5_r15() + { + assert_choice_type("gp5-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp6_r15() + { + assert_choice_type("gp6-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp7_r15() + { + assert_choice_type("gp7-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp8_r15() + { + assert_choice_type("gp8-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp9_r15() + { + assert_choice_type("gp9-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp10_r15() + { + assert_choice_type("gp10-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + uint8_t& gp11_r15() + { + assert_choice_type("gp11-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp0() const + { + assert_choice_type("gp0", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp1() const + { + assert_choice_type("gp1", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp2_r14() const + { + assert_choice_type("gp2-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp3_r14() const + { + assert_choice_type("gp3-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp_ncsg0_r14() const + { + assert_choice_type("gp-ncsg0-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp_ncsg1_r14() const + { + assert_choice_type("gp-ncsg1-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp_ncsg2_r14() const + { + assert_choice_type("gp-ncsg2-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp_ncsg3_r14() const + { + assert_choice_type("gp-ncsg3-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint16_t& gp_non_uniform1_r14() const + { + assert_choice_type("gp-nonUniform1-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint16_t& gp_non_uniform2_r14() const + { + assert_choice_type("gp-nonUniform2-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint16_t& gp_non_uniform3_r14() const + { + assert_choice_type("gp-nonUniform3-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint16_t& gp_non_uniform4_r14() const + { + assert_choice_type("gp-nonUniform4-r14", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp4_r15() const + { + assert_choice_type("gp4-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp5_r15() const + { + assert_choice_type("gp5-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp6_r15() const + { + assert_choice_type("gp6-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp7_r15() const + { + assert_choice_type("gp7-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp8_r15() const + { + assert_choice_type("gp8-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp9_r15() const + { + assert_choice_type("gp9-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp10_r15() const + { + assert_choice_type("gp10-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + const uint8_t& gp11_r15() const + { + assert_choice_type("gp11-r15", type_.to_string(), "gapOffset"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + gap_offset_c_ gap_offset; + }; + typedef setup_e types; + + // choice methods + meas_gap_cfg_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasGapConfig"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasGapConfig"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MeasRSSI-ReportConfig-r13 ::= SEQUENCE +struct meas_rssi_report_cfg_r13_s { + // member variables + bool ch_occupancy_thres_r13_present; + uint8_t ch_occupancy_thres_r13; + + // sequence methods + meas_rssi_report_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasSensing-Config-r15 ::= SEQUENCE +struct meas_sensing_cfg_r15_s { + struct sensing_periodicity_r15_e_ { + enum options { ms20, ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms700, ms800, ms900, ms1000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 12, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sensing_periodicity_r15_e_() {} + sensing_periodicity_r15_e_(options v) : value(v) {} + sensing_periodicity_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + uint8_t sensing_subch_num_r15; + sensing_periodicity_r15_e_ sensing_periodicity_r15; + uint8_t sensing_resel_counter_r15; + uint8_t sensing_prio_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasSubframePatternConfigNeigh-r10 ::= CHOICE +struct meas_sf_pattern_cfg_neigh_r10_c { + struct setup_s_ { + // member variables + bool meas_sf_cell_list_r10_present; + meas_sf_pattern_r10_c meas_sf_pattern_neigh_r10; + meas_sf_cell_list_r10_l meas_sf_cell_list_r10; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + meas_sf_pattern_cfg_neigh_r10_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasSubframePatternConfigNeigh-r10"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasSubframePatternConfigNeigh-r10"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MobilityControlInfo-v10l0 ::= SEQUENCE +struct mob_ctrl_info_v10l0_s { + // member variables + bool add_spec_emission_v10l0_present; + uint16_t add_spec_emission_v10l0; + + // sequence methods + mob_ctrl_info_v10l0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhysCellIdGERAN ::= SEQUENCE +struct pci_geran_s { + // member variables + fixed_bitstring<3> network_colour_code; + fixed_bitstring<3> base_station_colour_code; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigRS-NR-r15 ::= SEQUENCE +struct quant_cfg_rs_nr_r15_s { + // member variables + bool filt_coeff_rsrp_r15_present; + bool filt_coeff_rsrq_r15_present; + bool filt_coef_sinr_r13_present; + filt_coef_e filt_coeff_rsrp_r15; + filt_coef_e filt_coeff_rsrq_r15; + filt_coef_e filt_coef_sinr_r13; + + // sequence methods + quant_cfg_rs_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RMTC-Config-r13 ::= CHOICE +struct rmtc_cfg_r13_c { + struct setup_s_ { + struct rmtc_period_r13_e_ { + enum options { ms40, ms80, ms160, ms320, ms640 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rmtc_period_r13_e_() {} + rmtc_period_r13_e_(options v) : value(v) {} + rmtc_period_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct meas_dur_r13_e_ { + enum options { sym1, sym14, sym28, sym42, sym70 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_dur_r13_e_() {} + meas_dur_r13_e_(options v) : value(v) {} + meas_dur_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool rmtc_sf_offset_r13_present; + rmtc_period_r13_e_ rmtc_period_r13; + uint16_t rmtc_sf_offset_r13; + meas_dur_r13_e_ meas_dur_r13; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + rmtc_cfg_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "RMTC-Config-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "RMTC-Config-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// RRCConnectionReconfiguration-v1250-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1250_ies_s { + struct wlan_offload_info_r12_c_ { + struct setup_s_ { + struct t350_r12_e_ { + enum options { min5, min10, min20, min30, min60, min120, min180, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t350_r12_e_() {} + t350_r12_e_(options v) : value(v) {} + t350_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool t350_r12_present; + wlan_offload_cfg_r12_s wlan_offload_cfg_ded_r12; + t350_r12_e_ t350_r12; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + wlan_offload_info_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "wlan-OffloadInfo-r12"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "wlan-OffloadInfo-r12"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool wlan_offload_info_r12_present; + bool scg_cfg_r12_present; + bool sl_sync_tx_ctrl_r12_present; + bool sl_disc_cfg_r12_present; + bool sl_comm_cfg_r12_present; + bool non_crit_ext_present; + wlan_offload_info_r12_c_ wlan_offload_info_r12; + scg_cfg_r12_c scg_cfg_r12; + sl_sync_tx_ctrl_r12_s sl_sync_tx_ctrl_r12; + sl_disc_cfg_r12_s sl_disc_cfg_r12; + sl_comm_cfg_r12_s sl_comm_cfg_r12; + rrc_conn_recfg_v1310_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v12f0-IEs ::= SEQUENCE +struct rrc_conn_recfg_v12f0_ies_s { + // member variables + bool scg_cfg_v12f0_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + scg_cfg_v12f0_c scg_cfg_v12f0; + dyn_octstring late_non_crit_ext; + rrc_conn_recfg_v1370_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v12f0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-v1530-IEs ::= SEQUENCE +struct rrc_conn_release_v1530_ies_s { + struct cn_type_r15_e_ { + enum options { epc, fivegc }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cn_type_r15_e_() {} + cn_type_r15_e_(options v) : value(v) {} + cn_type_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool drb_continue_rohc_r15_present; + bool next_hop_chaining_count_r15_present; + bool meas_idle_cfg_r15_present; + bool rrc_inactive_cfg_r15_present; + bool cn_type_r15_present; + bool non_crit_ext_present; + uint8_t next_hop_chaining_count_r15; + meas_idle_cfg_ded_r15_s meas_idle_cfg_r15; + rrc_inactive_cfg_r15_s rrc_inactive_cfg_r15; + cn_type_r15_e_ cn_type_r15; + + // sequence methods + rrc_conn_release_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RS-ConfigSSB-NR-r15 ::= SEQUENCE +struct rs_cfg_ssb_nr_r15_s { + struct subcarrier_spacing_ssb_r15_e_ { + enum options { k_hz15, k_hz30, k_hz120, k_hz240 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + subcarrier_spacing_ssb_r15_e_() {} + subcarrier_spacing_ssb_r15_e_(options v) : value(v) {} + subcarrier_spacing_ssb_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + mtc_ssb_nr_r15_s meas_timing_cfg_r15; + subcarrier_spacing_ssb_r15_e_ subcarrier_spacing_ssb_r15; + // ... + + // sequence methods + rs_cfg_ssb_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSRQ-RangeConfig-r12 ::= CHOICE +struct rsrq_range_cfg_r12_c { + typedef setup_e types; + + // choice methods + rsrq_range_cfg_r12_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + int8_t& setup() + { + assert_choice_type("setup", type_.to_string(), "RSRQ-RangeConfig-r12"); + return c; + } + const int8_t& setup() const + { + assert_choice_type("setup", type_.to_string(), "RSRQ-RangeConfig-r12"); + return c; + } + +private: + types type_; + int8_t c; +}; + +// ReportInterval ::= ENUMERATED +struct report_interv_e { + enum options { + ms120, + ms240, + ms480, + ms640, + ms1024, + ms2048, + ms5120, + ms10240, + min1, + min6, + min12, + min30, + min60, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_interv_e() {} + report_interv_e(options v) : value(v) {} + report_interv_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// ReportQuantityNR-r15 ::= SEQUENCE +struct report_quant_nr_r15_s { + // member variables + bool ss_rsrp; + bool ss_rsrq; + bool ss_sinr; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportQuantityWLAN-r13 ::= SEQUENCE +struct report_quant_wlan_r13_s { + // member variables + bool ext; + bool band_request_wlan_r13_present; + bool carrier_info_request_wlan_r13_present; + bool available_admission_capacity_request_wlan_r13_present; + bool backhaul_dl_bw_request_wlan_r13_present; + bool backhaul_ul_bw_request_wlan_r13_present; + bool ch_utilization_request_wlan_r13_present; + bool station_count_request_wlan_r13_present; + // ... + + // sequence methods + report_quant_wlan_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SystemInfoListGERAN ::= SEQUENCE (SIZE (1..maxGERAN-SI)) OF OCTET STRING +typedef bounded_array sys_info_list_geran_l; + +// TargetMBSFN-Area-r12 ::= SEQUENCE +struct target_mbsfn_area_r12_s { + // member variables + bool ext; + bool mbsfn_area_id_r12_present; + uint8_t mbsfn_area_id_r12; + uint32_t carrier_freq_r12; + // ... + + // sequence methods + target_mbsfn_area_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ThresholdEUTRA ::= CHOICE +struct thres_eutra_c { + struct types { + enum options { thres_rsrp, thres_rsrq, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + thres_eutra_c() : type_(types::nulltype) {} + thres_eutra_c(const thres_eutra_c& other); + thres_eutra_c& operator=(const thres_eutra_c& other); + ~thres_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& thres_rsrp() + { + assert_choice_type("threshold-RSRP", type_.to_string(), "ThresholdEUTRA"); + return c.get(); + } + uint8_t& thres_rsrq() + { + assert_choice_type("threshold-RSRQ", type_.to_string(), "ThresholdEUTRA"); + return c.get(); + } + const uint8_t& thres_rsrp() const + { + assert_choice_type("threshold-RSRP", type_.to_string(), "ThresholdEUTRA"); + return c.get(); + } + const uint8_t& thres_rsrq() const + { + assert_choice_type("threshold-RSRQ", type_.to_string(), "ThresholdEUTRA"); + return c.get(); + } + +private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); +}; + +// ThresholdNR-r15 ::= CHOICE +struct thres_nr_r15_c { + struct types { + enum options { nr_rsrp_r15, nr_rsrq_r15, nr_sinr_r15, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + thres_nr_r15_c() : type_(types::nulltype) {} + thres_nr_r15_c(const thres_nr_r15_c& other); + thres_nr_r15_c& operator=(const thres_nr_r15_c& other); + ~thres_nr_r15_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& nr_rsrp_r15() + { + assert_choice_type("nr-RSRP-r15", type_.to_string(), "ThresholdNR-r15"); + return c.get(); + } + uint8_t& nr_rsrq_r15() + { + assert_choice_type("nr-RSRQ-r15", type_.to_string(), "ThresholdNR-r15"); + return c.get(); + } + uint8_t& nr_sinr_r15() + { + assert_choice_type("nr-SINR-r15", type_.to_string(), "ThresholdNR-r15"); + return c.get(); + } + const uint8_t& nr_rsrp_r15() const + { + assert_choice_type("nr-RSRP-r15", type_.to_string(), "ThresholdNR-r15"); + return c.get(); + } + const uint8_t& nr_rsrq_r15() const + { + assert_choice_type("nr-RSRQ-r15", type_.to_string(), "ThresholdNR-r15"); + return c.get(); + } + const uint8_t& nr_sinr_r15() const + { + assert_choice_type("nr-SINR-r15", type_.to_string(), "ThresholdNR-r15"); + return c.get(); + } + +private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); +}; + +// ThresholdUTRA ::= CHOICE +struct thres_utra_c { + struct types { + enum options { utra_rscp, utra_ec_n0, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + thres_utra_c() : type_(types::nulltype) {} + thres_utra_c(const thres_utra_c& other); + thres_utra_c& operator=(const thres_utra_c& other); + ~thres_utra_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + int8_t& utra_rscp() + { + assert_choice_type("utra-RSCP", type_.to_string(), "ThresholdUTRA"); + return c.get(); + } + uint8_t& utra_ec_n0() + { + assert_choice_type("utra-EcN0", type_.to_string(), "ThresholdUTRA"); + return c.get(); + } + const int8_t& utra_rscp() const + { + assert_choice_type("utra-RSCP", type_.to_string(), "ThresholdUTRA"); + return c.get(); + } + const uint8_t& utra_ec_n0() const + { + assert_choice_type("utra-EcN0", type_.to_string(), "ThresholdUTRA"); + return c.get(); + } + +private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); +}; + +// TimeToTrigger ::= ENUMERATED +struct time_to_trigger_e { + enum options { + ms0, + ms40, + ms64, + ms80, + ms100, + ms128, + ms160, + ms256, + ms320, + ms480, + ms512, + ms640, + ms1024, + ms1280, + ms2560, + ms5120 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + time_to_trigger_e() {} + time_to_trigger_e(options v) : value(v) {} + time_to_trigger_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// Tx-ResourcePoolMeasList-r14 ::= SEQUENCE (SIZE (1..maxSL-PoolToMeasure-r14)) OF INTEGER +typedef dyn_array tx_res_pool_meas_list_r14_l; + +// UECapabilityEnquiry-v1510-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1510_ies_s { + // member variables + bool requested_freq_bands_nr_mrdc_r15_present; + bool non_crit_ext_present; + dyn_octstring requested_freq_bands_nr_mrdc_r15; + ue_cap_enquiry_v1530_ies_s non_crit_ext; + + // sequence methods + ue_cap_enquiry_v1510_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-v1530-IEs ::= SEQUENCE +struct ue_info_request_v1530_ies_s { + // member variables + bool idle_mode_meas_req_r15_present; + bool flight_path_info_req_r15_present; + bool non_crit_ext_present; + flight_path_info_report_cfg_r15_s flight_path_info_req_r15; + + // sequence methods + ue_info_request_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-DelayConfig-r13 ::= CHOICE +struct ul_delay_cfg_r13_c { + struct setup_s_ { + struct delay_thres_r13_e_ { + enum options { + ms30, + ms40, + ms50, + ms60, + ms70, + ms80, + ms90, + ms100, + ms150, + ms300, + ms500, + ms750, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delay_thres_r13_e_() {} + delay_thres_r13_e_(options v) : value(v) {} + delay_thres_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + delay_thres_r13_e_ delay_thres_r13; + }; + typedef setup_e types; + + // choice methods + ul_delay_cfg_r13_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "UL-DelayConfig-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "UL-DelayConfig-r13"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// WLAN-BandIndicator-r13 ::= ENUMERATED +struct wlan_band_ind_r13_e { + enum options { band2dot4, band5, band60_v1430, spare5, spare4, spare3, spare2, spare1, /*...*/ }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + wlan_band_ind_r13_e() {} + wlan_band_ind_r13_e(options v) : value(v) {} + wlan_band_ind_r13_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; +}; + +// WLAN-CarrierInfo-r13 ::= SEQUENCE +struct wlan_carrier_info_r13_s { + struct country_code_r13_e_ { + enum options { united_states, europe, japan, global, /*...*/ }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + country_code_r13_e_() {} + country_code_r13_e_(options v) : value(v) {} + country_code_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool operating_class_r13_present; + bool country_code_r13_present; + bool ch_nums_r13_present; + uint8_t operating_class_r13; + country_code_r13_e_ country_code_r13; + wlan_ch_list_r13_l ch_nums_r13; + // ... + + // sequence methods + wlan_carrier_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-NameListConfig-r15 ::= CHOICE +struct wlan_name_list_cfg_r15_c { + typedef setup_e types; + + // choice methods + wlan_name_list_cfg_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + wlan_name_list_r15_l& setup() + { + assert_choice_type("setup", type_.to_string(), "WLAN-NameListConfig-r15"); + return c; + } + const wlan_name_list_r15_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "WLAN-NameListConfig-r15"); + return c; + } + +private: + types type_; + wlan_name_list_r15_l c; +}; + +// WhiteCellsToAddModList-r13 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF WhiteCellsToAddMod-r13 +typedef dyn_array white_cells_to_add_mod_list_r13_l; + +// CellInfoGERAN-r9 ::= SEQUENCE +struct cell_info_geran_r9_s { + // member variables + pci_geran_s pci_r9; + carrier_freq_geran_s carrier_freq_r9; + sys_info_list_geran_l sys_info_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellInfoUTRA-FDD-r9 ::= SEQUENCE +struct cell_info_utra_fdd_r9_s { + // member variables + uint16_t pci_r9; + dyn_octstring utra_bcch_container_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellInfoUTRA-TDD-r10 ::= SEQUENCE +struct cell_info_utra_tdd_r10_s { + // member variables + uint8_t pci_r10; + uint16_t carrier_freq_r10; + dyn_octstring utra_bcch_container_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellInfoUTRA-TDD-r9 ::= SEQUENCE +struct cell_info_utra_tdd_r9_s { + // member variables + uint8_t pci_r9; + dyn_octstring utra_bcch_container_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-CountMSB-Info ::= SEQUENCE +struct drb_count_msb_info_s { + // member variables + uint8_t drb_id; + uint32_t count_msb_ul; + uint32_t count_msb_dl; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IDC-Config-r11 ::= SEQUENCE +struct idc_cfg_r11_s { + struct autonomous_denial_params_r11_s_ { + struct autonomous_denial_sfs_r11_e_ { + enum options { n2, n5, n10, n15, n20, n30, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + autonomous_denial_sfs_r11_e_() {} + autonomous_denial_sfs_r11_e_(options v) : value(v) {} + autonomous_denial_sfs_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct autonomous_denial_validity_r11_e_ { + enum options { sf200, sf500, sf1000, sf2000, spare4, spare3, spare2, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + autonomous_denial_validity_r11_e_() {} + autonomous_denial_validity_r11_e_(options v) : value(v) {} + autonomous_denial_validity_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + autonomous_denial_sfs_r11_e_ autonomous_denial_sfs_r11; + autonomous_denial_validity_r11_e_ autonomous_denial_validity_r11; + }; + struct idc_ind_mrdc_r15_c_ { + typedef setup_e types; + + // choice methods + idc_ind_mrdc_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + candidate_serving_freq_list_nr_r15_l& setup() + { + assert_choice_type("setup", type_.to_string(), "idc-Indication-MRDC-r15"); + return c; + } + const candidate_serving_freq_list_nr_r15_l& setup() const + { + assert_choice_type("setup", type_.to_string(), "idc-Indication-MRDC-r15"); + return c; + } + + private: + types type_; + candidate_serving_freq_list_nr_r15_l c; + }; + + // member variables + bool ext; + bool idc_ind_r11_present; + bool autonomous_denial_params_r11_present; + autonomous_denial_params_r11_s_ autonomous_denial_params_r11; + // ... + // group 0 + bool idc_ind_ul_ca_r11_present; + // group 1 + bool idc_hardware_sharing_ind_r13_present; + // group 2 + bool idc_ind_mrdc_r15_present; + copy_ptr idc_ind_mrdc_r15; + + // sequence methods + idc_cfg_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE +struct logged_meas_cfg_v1530_ies_s { + // member variables + bool bt_name_list_r15_present; + bool wlan_name_list_r15_present; + bool non_crit_ext_present; + bt_name_list_r15_l bt_name_list_r15; + wlan_name_list_r15_l wlan_name_list_r15; + + // sequence methods + logged_meas_cfg_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasGapConfigPerCC-r14 ::= SEQUENCE +struct meas_gap_cfg_per_cc_r14_s { + // member variables + uint8_t serv_cell_id_r14; + meas_gap_cfg_c meas_gap_cfg_cc_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectCDMA2000 ::= SEQUENCE +struct meas_obj_cdma2000_s { + // member variables + bool ext; + bool search_win_size_present; + bool offset_freq_present; + bool cells_to_rem_list_present; + bool cells_to_add_mod_list_present; + bool cell_for_which_to_report_cgi_present; + cdma2000_type_e cdma2000_type; + carrier_freq_cdma2000_s carrier_freq; + uint8_t search_win_size; + int8_t offset_freq; + cell_idx_list_l cells_to_rem_list; + cells_to_add_mod_list_cdma2000_l cells_to_add_mod_list; + uint16_t cell_for_which_to_report_cgi; + // ... + + // sequence methods + meas_obj_cdma2000_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectEUTRA ::= SEQUENCE +struct meas_obj_eutra_s { + struct t312_r12_c_ { + struct setup_e_ { + enum options { ms0, ms50, ms100, ms200, ms300, ms400, ms500, ms1000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + setup_e_() {} + setup_e_(options v) : value(v) {} + setup_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + typedef setup_e types; + + // choice methods + t312_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_e_& setup() + { + assert_choice_type("setup", type_.to_string(), "t312-r12"); + return c; + } + const setup_e_& setup() const + { + assert_choice_type("setup", type_.to_string(), "t312-r12"); + return c; + } + + private: + types type_; + setup_e_ c; + }; + + // member variables + bool ext; + bool offset_freq_present; + bool cells_to_rem_list_present; + bool cells_to_add_mod_list_present; + bool black_cells_to_rem_list_present; + bool black_cells_to_add_mod_list_present; + bool cell_for_which_to_report_cgi_present; + uint16_t carrier_freq; + allowed_meas_bw_e allowed_meas_bw; + bool presence_ant_port1; + fixed_bitstring<2> neigh_cell_cfg; + q_offset_range_e offset_freq; + cell_idx_list_l cells_to_rem_list; + cells_to_add_mod_list_l cells_to_add_mod_list; + cell_idx_list_l black_cells_to_rem_list; + black_cells_to_add_mod_list_l black_cells_to_add_mod_list; + uint16_t cell_for_which_to_report_cgi; + // ... + // group 0 + bool meas_cycle_scell_r10_present; + bool meas_sf_pattern_cfg_neigh_r10_present; + meas_cycle_scell_r10_e meas_cycle_scell_r10; + copy_ptr meas_sf_pattern_cfg_neigh_r10; + // group 1 + bool wideband_rsrq_meas_r11_present; + bool wideband_rsrq_meas_r11; + // group 2 + bool alt_ttt_cells_to_rem_list_r12_present; + bool alt_ttt_cells_to_add_mod_list_r12_present; + bool t312_r12_present; + bool reduced_meas_performance_r12_present; + bool meas_ds_cfg_r12_present; + copy_ptr alt_ttt_cells_to_rem_list_r12; + copy_ptr alt_ttt_cells_to_add_mod_list_r12; + copy_ptr t312_r12; + bool reduced_meas_performance_r12; + copy_ptr meas_ds_cfg_r12; + // group 3 + bool white_cells_to_rem_list_r13_present; + bool white_cells_to_add_mod_list_r13_present; + bool rmtc_cfg_r13_present; + bool carrier_freq_r13_present; + copy_ptr white_cells_to_rem_list_r13; + copy_ptr white_cells_to_add_mod_list_r13; + copy_ptr rmtc_cfg_r13; + uint32_t carrier_freq_r13; + // group 4 + bool tx_res_pool_to_rem_list_r14_present; + bool tx_res_pool_to_add_list_r14_present; + bool fembms_mixed_carrier_r14_present; + copy_ptr tx_res_pool_to_rem_list_r14; + copy_ptr tx_res_pool_to_add_list_r14; + bool fembms_mixed_carrier_r14; + // group 5 + bool meas_sensing_cfg_r15_present; + copy_ptr meas_sensing_cfg_r15; + + // sequence methods + meas_obj_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectEUTRA-v9e0 ::= SEQUENCE +struct meas_obj_eutra_v9e0_s { + // member variables + uint32_t carrier_freq_v9e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectGERAN ::= SEQUENCE +struct meas_obj_geran_s { + // member variables + bool ext; + bool offset_freq_present; + bool ncc_permitted_present; + bool cell_for_which_to_report_cgi_present; + carrier_freqs_geran_s carrier_freqs; + int8_t offset_freq; + fixed_bitstring<8> ncc_permitted; + pci_geran_s cell_for_which_to_report_cgi; + // ... + + // sequence methods + meas_obj_geran_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectNR-r15 ::= SEQUENCE +struct meas_obj_nr_r15_s { + typedef bounded_array cells_for_which_to_report_sftd_r15_l_; + struct band_nr_r15_c_ { + typedef setup_e types; + + // choice methods + band_nr_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& setup() + { + assert_choice_type("setup", type_.to_string(), "bandNR-r15"); + return c; + } + const uint16_t& setup() const + { + assert_choice_type("setup", type_.to_string(), "bandNR-r15"); + return c; + } + + private: + types type_; + uint16_t c; + }; + + // member variables + bool ext; + bool thresh_rs_idx_r15_present; + bool max_rs_idx_cell_qual_r15_present; + bool offset_freq_r15_present; + bool black_cells_to_rem_list_r15_present; + bool black_cells_to_add_mod_list_r15_present; + bool cells_for_which_to_report_sftd_r15_present; + uint32_t carrier_freq_r15; + rs_cfg_ssb_nr_r15_s rs_cfg_ssb_r15; + thres_list_nr_r15_s thresh_rs_idx_r15; + uint8_t max_rs_idx_cell_qual_r15; + int8_t offset_freq_r15; + cell_idx_list_l black_cells_to_rem_list_r15; + cells_to_add_mod_list_nr_r15_l black_cells_to_add_mod_list_r15; + uint8_t quant_cfg_set_r15; + cells_for_which_to_report_sftd_r15_l_ cells_for_which_to_report_sftd_r15; + // ... + // group 0 + bool cell_for_which_to_report_cgi_r15_present; + bool derive_ssb_idx_from_cell_r15_present; + bool ss_rssi_meas_r15_present; + bool band_nr_r15_present; + uint16_t cell_for_which_to_report_cgi_r15; + bool derive_ssb_idx_from_cell_r15; + copy_ptr ss_rssi_meas_r15; + copy_ptr band_nr_r15; + + // sequence methods + meas_obj_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectUTRA ::= SEQUENCE +struct meas_obj_utra_s { + struct cells_to_add_mod_list_c_ { + struct types { + enum options { cells_to_add_mod_list_utra_fdd, cells_to_add_mod_list_utra_tdd, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cells_to_add_mod_list_c_() : type_(types::nulltype) {} + cells_to_add_mod_list_c_(const cells_to_add_mod_list_c_& other); + cells_to_add_mod_list_c_& operator=(const cells_to_add_mod_list_c_& other); + ~cells_to_add_mod_list_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cells_to_add_mod_list_utra_fdd_l& cells_to_add_mod_list_utra_fdd() + { + assert_choice_type("cellsToAddModListUTRA-FDD", type_.to_string(), "cellsToAddModList"); + return c.get(); + } + cells_to_add_mod_list_utra_tdd_l& cells_to_add_mod_list_utra_tdd() + { + assert_choice_type("cellsToAddModListUTRA-TDD", type_.to_string(), "cellsToAddModList"); + return c.get(); + } + const cells_to_add_mod_list_utra_fdd_l& cells_to_add_mod_list_utra_fdd() const + { + assert_choice_type("cellsToAddModListUTRA-FDD", type_.to_string(), "cellsToAddModList"); + return c.get(); + } + const cells_to_add_mod_list_utra_tdd_l& cells_to_add_mod_list_utra_tdd() const + { + assert_choice_type("cellsToAddModListUTRA-TDD", type_.to_string(), "cellsToAddModList"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct cell_for_which_to_report_cgi_c_ { + struct types { + enum options { utra_fdd, utra_tdd, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cell_for_which_to_report_cgi_c_() : type_(types::nulltype) {} + cell_for_which_to_report_cgi_c_(const cell_for_which_to_report_cgi_c_& other); + cell_for_which_to_report_cgi_c_& operator=(const cell_for_which_to_report_cgi_c_& other); + ~cell_for_which_to_report_cgi_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& utra_fdd() + { + assert_choice_type("utra-FDD", type_.to_string(), "cellForWhichToReportCGI"); + return c.get(); + } + uint8_t& utra_tdd() + { + assert_choice_type("utra-TDD", type_.to_string(), "cellForWhichToReportCGI"); + return c.get(); + } + const uint16_t& utra_fdd() const + { + assert_choice_type("utra-FDD", type_.to_string(), "cellForWhichToReportCGI"); + return c.get(); + } + const uint8_t& utra_tdd() const + { + assert_choice_type("utra-TDD", type_.to_string(), "cellForWhichToReportCGI"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + bool offset_freq_present; + bool cells_to_rem_list_present; + bool cells_to_add_mod_list_present; + bool cell_for_which_to_report_cgi_present; + uint16_t carrier_freq; + int8_t offset_freq; + cell_idx_list_l cells_to_rem_list; + cells_to_add_mod_list_c_ cells_to_add_mod_list; + cell_for_which_to_report_cgi_c_ cell_for_which_to_report_cgi; + // ... + // group 0 + bool csg_allowed_report_cells_v930_present; + copy_ptr csg_allowed_report_cells_v930; + // group 1 + bool reduced_meas_performance_r12_present; + bool reduced_meas_performance_r12; + + // sequence methods + meas_obj_utra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectWLAN-r13 ::= SEQUENCE +struct meas_obj_wlan_r13_s { + struct carrier_freq_r13_c_ { + typedef bounded_array band_ind_list_wlan_r13_l_; + typedef dyn_array carrier_info_list_wlan_r13_l_; + struct types { + enum options { band_ind_list_wlan_r13, carrier_info_list_wlan_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + carrier_freq_r13_c_() : type_(types::nulltype) {} + carrier_freq_r13_c_(const carrier_freq_r13_c_& other); + carrier_freq_r13_c_& operator=(const carrier_freq_r13_c_& other); + ~carrier_freq_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + band_ind_list_wlan_r13_l_& band_ind_list_wlan_r13() + { + assert_choice_type("bandIndicatorListWLAN-r13", type_.to_string(), "carrierFreq-r13"); + return c.get(); + } + carrier_info_list_wlan_r13_l_& carrier_info_list_wlan_r13() + { + assert_choice_type("carrierInfoListWLAN-r13", type_.to_string(), "carrierFreq-r13"); + return c.get(); + } + const band_ind_list_wlan_r13_l_& band_ind_list_wlan_r13() const + { + assert_choice_type("bandIndicatorListWLAN-r13", type_.to_string(), "carrierFreq-r13"); + return c.get(); + } + const carrier_info_list_wlan_r13_l_& carrier_info_list_wlan_r13() const + { + assert_choice_type("carrierInfoListWLAN-r13", type_.to_string(), "carrierFreq-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + bool carrier_freq_r13_present; + bool wlan_to_add_mod_list_r13_present; + bool wlan_to_rem_list_r13_present; + carrier_freq_r13_c_ carrier_freq_r13; + wlan_id_list_r13_l wlan_to_add_mod_list_r13; + wlan_id_list_r13_l wlan_to_rem_list_r13; + // ... + + // sequence methods + meas_obj_wlan_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ObtainLocationConfig-r11 ::= SEQUENCE +struct obtain_location_cfg_r11_s { + // member variables + bool obtain_location_r11_present; + + // sequence methods + obtain_location_cfg_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PowerPrefIndicationConfig-r11 ::= CHOICE +struct pwr_pref_ind_cfg_r11_c { + struct setup_s_ { + struct pwr_pref_ind_timer_r11_e_ { + enum options { s0, s0dot5, s1, s2, s5, s10, s20, s30, s60, s90, s120, s300, s600, spare3, spare2, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pwr_pref_ind_timer_r11_e_() {} + pwr_pref_ind_timer_r11_e_(options v) : value(v) {} + pwr_pref_ind_timer_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + pwr_pref_ind_timer_r11_e_ pwr_pref_ind_timer_r11; + }; + typedef setup_e types; + + // choice methods + pwr_pref_ind_cfg_r11_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "PowerPrefIndicationConfig-r11"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "PowerPrefIndicationConfig-r11"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// QuantityConfigNR-r15 ::= SEQUENCE +struct quant_cfg_nr_r15_s { + // member variables + bool meas_quant_rs_idx_nr_r15_present; + quant_cfg_rs_nr_r15_s meas_quant_cell_nr_r15; + quant_cfg_rs_nr_r15_s meas_quant_rs_idx_nr_r15; + + // sequence methods + quant_cfg_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v10l0-IEs ::= SEQUENCE +struct rrc_conn_recfg_v10l0_ies_s { + // member variables + bool mob_ctrl_info_v10l0_present; + bool s_cell_to_add_mod_list_v10l0_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + mob_ctrl_info_v10l0_s mob_ctrl_info_v10l0; + scell_to_add_mod_list_v10l0_l s_cell_to_add_mod_list_v10l0; + dyn_octstring late_non_crit_ext; + rrc_conn_recfg_v12f0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v10l0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v1130-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1130_ies_s { + // member variables + bool sib_type1_ded_r11_present; + bool non_crit_ext_present; + dyn_octstring sib_type1_ded_r11; + rrc_conn_recfg_v1250_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-v1320-IEs ::= SEQUENCE +struct rrc_conn_release_v1320_ies_s { + // member variables + bool resume_id_r13_present; + bool non_crit_ext_present; + fixed_bitstring<40> resume_id_r13; + rrc_conn_release_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_release_v1320_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +struct eutra_event_s { + struct event_id_c_ { + struct event_a1_s_ { + // member variables + thres_eutra_c a1_thres; + }; + struct event_a2_s_ { + // member variables + thres_eutra_c a2_thres; + }; + struct event_a3_s_ { + // member variables + int8_t a3_offset; + bool report_on_leave; + }; + struct event_a4_s_ { + // member variables + thres_eutra_c a4_thres; + }; + struct event_a5_s_ { + // member variables + thres_eutra_c a5_thres1; + thres_eutra_c a5_thres2; + }; + struct event_a6_r10_s_ { + // member variables + int8_t a6_offset_r10; + bool a6_report_on_leave_r10; + }; + struct event_c1_r12_s_ { + // member variables + uint8_t c1_thres_r12; + bool c1_report_on_leave_r12; + }; + struct event_c2_r12_s_ { + // member variables + uint8_t c2_ref_csi_rs_r12; + int8_t c2_offset_r12; + bool c2_report_on_leave_r12; + }; + struct event_v1_r14_s_ { + // member variables + uint8_t v1_thres_r14; + }; + struct event_v2_r14_s_ { + // member variables + uint8_t v2_thres_r14; + }; + struct event_h1_r15_s_ { + // member variables + uint16_t h1_thres_offset_r15; + uint8_t h1_hysteresis_minus15; + }; + struct event_h2_r15_s_ { + // member variables + uint16_t h2_thres_offset_r15; + uint8_t h2_hysteresis_minus15; + }; + struct types { + enum options { + event_a1, + event_a2, + event_a3, + event_a4, + event_a5, + // ... + event_a6_r10, + event_c1_r12, + event_c2_r12, + event_v1_r14, + event_v2_r14, + event_h1_r15, + event_h2_r15, + nulltype + }; + + options value; + static const uint32_t nof_types = 12, nof_exts = 7; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + event_id_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + event_a1_s_& event_a1() + { + assert_choice_type("eventA1", type_.to_string(), "eventId"); + return c.get(); + } + event_a2_s_& event_a2() + { + assert_choice_type("eventA2", type_.to_string(), "eventId"); + return c.get(); + } + event_a3_s_& event_a3() + { + assert_choice_type("eventA3", type_.to_string(), "eventId"); + return c.get(); + } + event_a4_s_& event_a4() + { + assert_choice_type("eventA4", type_.to_string(), "eventId"); + return c.get(); + } + event_a5_s_& event_a5() + { + assert_choice_type("eventA5", type_.to_string(), "eventId"); + return c.get(); + } + event_a6_r10_s_& event_a6_r10() + { + assert_choice_type("eventA6-r10", type_.to_string(), "eventId"); + return c.get(); + } + event_c1_r12_s_& event_c1_r12() + { + assert_choice_type("eventC1-r12", type_.to_string(), "eventId"); + return c.get(); + } + event_c2_r12_s_& event_c2_r12() + { + assert_choice_type("eventC2-r12", type_.to_string(), "eventId"); + return c.get(); + } + event_v1_r14_s_& event_v1_r14() + { + assert_choice_type("eventV1-r14", type_.to_string(), "eventId"); + return c.get(); + } + event_v2_r14_s_& event_v2_r14() + { + assert_choice_type("eventV2-r14", type_.to_string(), "eventId"); + return c.get(); + } + event_h1_r15_s_& event_h1_r15() + { + assert_choice_type("eventH1-r15", type_.to_string(), "eventId"); + return c.get(); + } + event_h2_r15_s_& event_h2_r15() + { + assert_choice_type("eventH2-r15", type_.to_string(), "eventId"); + return c.get(); + } + const event_a1_s_& event_a1() const + { + assert_choice_type("eventA1", type_.to_string(), "eventId"); + return c.get(); + } + const event_a2_s_& event_a2() const + { + assert_choice_type("eventA2", type_.to_string(), "eventId"); + return c.get(); + } + const event_a3_s_& event_a3() const + { + assert_choice_type("eventA3", type_.to_string(), "eventId"); + return c.get(); + } + const event_a4_s_& event_a4() const + { + assert_choice_type("eventA4", type_.to_string(), "eventId"); + return c.get(); + } + const event_a5_s_& event_a5() const + { + assert_choice_type("eventA5", type_.to_string(), "eventId"); + return c.get(); + } + const event_a6_r10_s_& event_a6_r10() const + { + assert_choice_type("eventA6-r10", type_.to_string(), "eventId"); + return c.get(); + } + const event_c1_r12_s_& event_c1_r12() const + { + assert_choice_type("eventC1-r12", type_.to_string(), "eventId"); + return c.get(); + } + const event_c2_r12_s_& event_c2_r12() const + { + assert_choice_type("eventC2-r12", type_.to_string(), "eventId"); + return c.get(); + } + const event_v1_r14_s_& event_v1_r14() const + { + assert_choice_type("eventV1-r14", type_.to_string(), "eventId"); + return c.get(); + } + const event_v2_r14_s_& event_v2_r14() const + { + assert_choice_type("eventV2-r14", type_.to_string(), "eventId"); + return c.get(); + } + const event_h1_r15_s_& event_h1_r15() const + { + assert_choice_type("eventH1-r15", type_.to_string(), "eventId"); + return c.get(); + } + const event_h2_r15_s_& event_h2_r15() const + { + assert_choice_type("eventH2-r15", type_.to_string(), "eventId"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + event_id_c_ event_id; + uint8_t hysteresis; + time_to_trigger_e time_to_trigger; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigEUTRA ::= SEQUENCE +struct report_cfg_eutra_s { + struct trigger_type_c_ { + typedef eutra_event_s event_s_; + struct periodical_s_ { + struct purpose_e_ { + enum options { report_strongest_cells, report_cgi }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + purpose_e_() {} + purpose_e_(options v) : value(v) {} + purpose_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + purpose_e_ purpose; + }; + struct types { + enum options { event, periodical, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + trigger_type_c_() : type_(types::nulltype) {} + trigger_type_c_(const trigger_type_c_& other); + trigger_type_c_& operator=(const trigger_type_c_& other); + ~trigger_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + event_s_& event() + { + assert_choice_type("event", type_.to_string(), "triggerType"); + return c.get(); + } + periodical_s_& periodical() + { + assert_choice_type("periodical", type_.to_string(), "triggerType"); + return c.get(); + } + const event_s_& event() const + { + assert_choice_type("event", type_.to_string(), "triggerType"); + return c.get(); + } + const periodical_s_& periodical() const + { + assert_choice_type("periodical", type_.to_string(), "triggerType"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct trigger_quant_e_ { + enum options { rsrp, rsrq }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + trigger_quant_e_() {} + trigger_quant_e_(options v) : value(v) {} + trigger_quant_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct report_quant_e_ { + enum options { same_as_trigger_quant, both }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_quant_e_() {} + report_quant_e_(options v) : value(v) {} + report_quant_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct report_amount_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_amount_e_() {} + report_amount_e_(options v) : value(v) {} + report_amount_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct alternative_time_to_trigger_r12_c_ { + typedef setup_e types; + + // choice methods + alternative_time_to_trigger_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + time_to_trigger_e& setup() + { + assert_choice_type("setup", type_.to_string(), "alternativeTimeToTrigger-r12"); + return c; + } + const time_to_trigger_e& setup() const + { + assert_choice_type("setup", type_.to_string(), "alternativeTimeToTrigger-r12"); + return c; + } + + private: + types type_; + time_to_trigger_e c; + }; + struct rs_sinr_cfg_r13_c_ { + struct setup_s_ { + struct report_quant_v1310_e_ { + enum options { rsrp_andsinr, rsrq_andsinr, all }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_quant_v1310_e_() {} + report_quant_v1310_e_(options v) : value(v) {} + report_quant_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool trigger_quant_v1310_present; + bool a_n_thres1_r13_present; + bool a5_thres2_r13_present; + uint8_t a_n_thres1_r13; + uint8_t a5_thres2_r13; + report_quant_v1310_e_ report_quant_v1310; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + rs_sinr_cfg_r13_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "rs-sinr-Config-r13"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "rs-sinr-Config-r13"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct purpose_v1430_e_ { + enum options { report_location, sidelink, spare2, spare1 }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + purpose_v1430_e_() {} + purpose_v1430_e_(options v) : value(v) {} + purpose_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + trigger_type_c_ trigger_type; + trigger_quant_e_ trigger_quant; + report_quant_e_ report_quant; + uint8_t max_report_cells; + report_interv_e report_interv; + report_amount_e_ report_amount; + // ... + // group 0 + bool si_request_for_ho_r9_present; + bool ue_rx_tx_time_diff_periodical_r9_present; + // group 1 + bool include_location_info_r10_present; + bool report_add_neigh_meas_r10_present; + // group 2 + bool alternative_time_to_trigger_r12_present; + bool use_t312_r12_present; + bool use_ps_cell_r12_present; + bool a_n_thres1_v1250_present; + bool a5_thres2_v1250_present; + bool report_strongest_csi_rss_r12_present; + bool report_crs_meas_r12_present; + bool trigger_quant_csi_rs_r12_present; + copy_ptr alternative_time_to_trigger_r12; + bool use_t312_r12; + bool use_ps_cell_r12; + copy_ptr a_n_thres1_v1250; + copy_ptr a5_thres2_v1250; + bool report_strongest_csi_rss_r12; + bool report_crs_meas_r12; + bool trigger_quant_csi_rs_r12; + // group 3 + bool report_sstd_meas_r13_present; + bool rs_sinr_cfg_r13_present; + bool use_white_cell_list_r13_present; + bool meas_rssi_report_cfg_r13_present; + bool include_multi_band_info_r13_present; + bool ul_delay_cfg_r13_present; + bool report_sstd_meas_r13; + copy_ptr rs_sinr_cfg_r13; + bool use_white_cell_list_r13; + copy_ptr meas_rssi_report_cfg_r13; + copy_ptr ul_delay_cfg_r13; + // group 4 + bool ue_rx_tx_time_diff_periodical_tdd_r13_present; + bool ue_rx_tx_time_diff_periodical_tdd_r13; + // group 5 + bool purpose_v1430_present; + purpose_v1430_e_ purpose_v1430; + // group 6 + bool max_report_rs_idx_r15_present; + uint8_t max_report_rs_idx_r15; + // group 7 + bool include_bt_meas_r15_present; + bool include_wlan_meas_r15_present; + bool purpose_r15_present; + bool nof_triggering_cells_r15_present; + bool a4_a5_report_on_leave_r15_present; + copy_ptr include_bt_meas_r15; + copy_ptr include_wlan_meas_r15; + uint8_t nof_triggering_cells_r15; + bool a4_a5_report_on_leave_r15; + + // sequence methods + report_cfg_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigInterRAT ::= SEQUENCE +struct report_cfg_inter_rat_s { + struct trigger_type_c_ { + struct event_s_ { + struct event_id_c_ { + struct event_b1_s_ { + struct b1_thres_c_ { + struct types { + enum options { b1_thres_utra, b1_thres_geran, b1_thres_cdma2000, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + b1_thres_c_() : type_(types::nulltype) {} + b1_thres_c_(const b1_thres_c_& other); + b1_thres_c_& operator=(const b1_thres_c_& other); + ~b1_thres_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + thres_utra_c& b1_thres_utra() + { + assert_choice_type("b1-ThresholdUTRA", type_.to_string(), "b1-Threshold"); + return c.get(); + } + uint8_t& b1_thres_geran() + { + assert_choice_type("b1-ThresholdGERAN", type_.to_string(), "b1-Threshold"); + return c.get(); + } + uint8_t& b1_thres_cdma2000() + { + assert_choice_type("b1-ThresholdCDMA2000", type_.to_string(), "b1-Threshold"); + return c.get(); + } + const thres_utra_c& b1_thres_utra() const + { + assert_choice_type("b1-ThresholdUTRA", type_.to_string(), "b1-Threshold"); + return c.get(); + } + const uint8_t& b1_thres_geran() const + { + assert_choice_type("b1-ThresholdGERAN", type_.to_string(), "b1-Threshold"); + return c.get(); + } + const uint8_t& b1_thres_cdma2000() const + { + assert_choice_type("b1-ThresholdCDMA2000", type_.to_string(), "b1-Threshold"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + b1_thres_c_ b1_thres; + }; + struct event_b2_s_ { + struct b2_thres2_c_ { + struct types { + enum options { b2_thres2_utra, b2_thres2_geran, b2_thres2_cdma2000, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + b2_thres2_c_() : type_(types::nulltype) {} + b2_thres2_c_(const b2_thres2_c_& other); + b2_thres2_c_& operator=(const b2_thres2_c_& other); + ~b2_thres2_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + thres_utra_c& b2_thres2_utra() + { + assert_choice_type("b2-Threshold2UTRA", type_.to_string(), "b2-Threshold2"); + return c.get(); + } + uint8_t& b2_thres2_geran() + { + assert_choice_type("b2-Threshold2GERAN", type_.to_string(), "b2-Threshold2"); + return c.get(); + } + uint8_t& b2_thres2_cdma2000() + { + assert_choice_type("b2-Threshold2CDMA2000", type_.to_string(), "b2-Threshold2"); + return c.get(); + } + const thres_utra_c& b2_thres2_utra() const + { + assert_choice_type("b2-Threshold2UTRA", type_.to_string(), "b2-Threshold2"); + return c.get(); + } + const uint8_t& b2_thres2_geran() const + { + assert_choice_type("b2-Threshold2GERAN", type_.to_string(), "b2-Threshold2"); + return c.get(); + } + const uint8_t& b2_thres2_cdma2000() const + { + assert_choice_type("b2-Threshold2CDMA2000", type_.to_string(), "b2-Threshold2"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + thres_eutra_c b2_thres1; + b2_thres2_c_ b2_thres2; + }; + struct event_w1_r13_s_ { + // member variables + uint8_t w1_thres_r13; + }; + struct event_w2_r13_s_ { + // member variables + uint8_t w2_thres1_r13; + uint8_t w2_thres2_r13; + }; + struct event_w3_r13_s_ { + // member variables + uint8_t w3_thres_r13; + }; + struct event_b1_nr_r15_s_ { + // member variables + thres_nr_r15_c b1_thres_nr_r15; + bool report_on_leave_r15; + }; + struct event_b2_nr_r15_s_ { + // member variables + thres_eutra_c b2_thres1_r15; + thres_nr_r15_c b2_thres2_nr_r15; + bool report_on_leave_r15; + }; + struct types { + enum options { + event_b1, + event_b2, + // ... + event_w1_r13, + event_w2_r13, + event_w3_r13, + event_b1_nr_r15, + event_b2_nr_r15, + nulltype + }; + + options value; + static const uint32_t nof_types = 7, nof_exts = 5; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + event_id_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + event_b1_s_& event_b1() + { + assert_choice_type("eventB1", type_.to_string(), "eventId"); + return c.get(); + } + event_b2_s_& event_b2() + { + assert_choice_type("eventB2", type_.to_string(), "eventId"); + return c.get(); + } + event_w1_r13_s_& event_w1_r13() + { + assert_choice_type("eventW1-r13", type_.to_string(), "eventId"); + return c.get(); + } + event_w2_r13_s_& event_w2_r13() + { + assert_choice_type("eventW2-r13", type_.to_string(), "eventId"); + return c.get(); + } + event_w3_r13_s_& event_w3_r13() + { + assert_choice_type("eventW3-r13", type_.to_string(), "eventId"); + return c.get(); + } + event_b1_nr_r15_s_& event_b1_nr_r15() + { + assert_choice_type("eventB1-NR-r15", type_.to_string(), "eventId"); + return c.get(); + } + event_b2_nr_r15_s_& event_b2_nr_r15() + { + assert_choice_type("eventB2-NR-r15", type_.to_string(), "eventId"); + return c.get(); + } + const event_b1_s_& event_b1() const + { + assert_choice_type("eventB1", type_.to_string(), "eventId"); + return c.get(); + } + const event_b2_s_& event_b2() const + { + assert_choice_type("eventB2", type_.to_string(), "eventId"); + return c.get(); + } + const event_w1_r13_s_& event_w1_r13() const + { + assert_choice_type("eventW1-r13", type_.to_string(), "eventId"); + return c.get(); + } + const event_w2_r13_s_& event_w2_r13() const + { + assert_choice_type("eventW2-r13", type_.to_string(), "eventId"); + return c.get(); + } + const event_w3_r13_s_& event_w3_r13() const + { + assert_choice_type("eventW3-r13", type_.to_string(), "eventId"); + return c.get(); + } + const event_b1_nr_r15_s_& event_b1_nr_r15() const + { + assert_choice_type("eventB1-NR-r15", type_.to_string(), "eventId"); + return c.get(); + } + const event_b2_nr_r15_s_& event_b2_nr_r15() const + { + assert_choice_type("eventB2-NR-r15", type_.to_string(), "eventId"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + event_id_c_ event_id; + uint8_t hysteresis; + time_to_trigger_e time_to_trigger; + }; + struct periodical_s_ { + struct purpose_e_ { + enum options { report_strongest_cells, report_strongest_cells_for_son, report_cgi }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + purpose_e_() {} + purpose_e_(options v) : value(v) {} + purpose_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + purpose_e_ purpose; + }; + struct types { + enum options { event, periodical, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + trigger_type_c_() : type_(types::nulltype) {} + trigger_type_c_(const trigger_type_c_& other); + trigger_type_c_& operator=(const trigger_type_c_& other); + ~trigger_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + event_s_& event() + { + assert_choice_type("event", type_.to_string(), "triggerType"); + return c.get(); + } + periodical_s_& periodical() + { + assert_choice_type("periodical", type_.to_string(), "triggerType"); + return c.get(); + } + const event_s_& event() const + { + assert_choice_type("event", type_.to_string(), "triggerType"); + return c.get(); + } + const periodical_s_& periodical() const + { + assert_choice_type("periodical", type_.to_string(), "triggerType"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct report_amount_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_amount_e_() {} + report_amount_e_(options v) : value(v) {} + report_amount_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + struct b2_thres1_v1250_c_ { + typedef setup_e types; + + // choice methods + b2_thres1_v1250_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + int8_t& setup() + { + assert_choice_type("setup", type_.to_string(), "b2-Threshold1-v1250"); + return c; + } + const int8_t& setup() const + { + assert_choice_type("setup", type_.to_string(), "b2-Threshold1-v1250"); + return c; + } + + private: + types type_; + int8_t c; + }; + struct report_sftd_meas_r15_e_ { + enum options { p_scell, neighbor_cells }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + report_sftd_meas_r15_e_() {} + report_sftd_meas_r15_e_(options v) : value(v) {} + report_sftd_meas_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + trigger_type_c_ trigger_type; + uint8_t max_report_cells; + report_interv_e report_interv; + report_amount_e_ report_amount; + // ... + // group 0 + bool si_request_for_ho_r9_present; + // group 1 + bool report_quant_utra_fdd_r10_present; + // group 2 + bool include_location_info_r11_present; + bool include_location_info_r11; + // group 3 + bool b2_thres1_v1250_present; + copy_ptr b2_thres1_v1250; + // group 4 + bool report_quant_wlan_r13_present; + copy_ptr report_quant_wlan_r13; + // group 5 + bool report_any_wlan_r14_present; + bool report_any_wlan_r14; + // group 6 + bool report_quant_cell_nr_r15_present; + bool max_report_rs_idx_r15_present; + bool report_quant_rs_idx_nr_r15_present; + bool report_rs_idx_results_nr_present; + bool report_sftd_meas_r15_present; + copy_ptr report_quant_cell_nr_r15; + uint8_t max_report_rs_idx_r15; + copy_ptr report_quant_rs_idx_nr_r15; + bool report_rs_idx_results_nr; + report_sftd_meas_r15_e_ report_sftd_meas_r15; + + // sequence methods + report_cfg_inter_rat_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportProximityConfig-r9 ::= SEQUENCE +struct report_proximity_cfg_r9_s { + // member variables + bool proximity_ind_eutra_r9_present; + bool proximity_ind_utra_r9_present; + + // sequence methods + report_proximity_cfg_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TargetMBSFN-AreaList-r12 ::= SEQUENCE (SIZE (0..maxMBSFN-Area)) OF TargetMBSFN-Area-r12 +typedef dyn_array target_mbsfn_area_list_r12_l; + +// TrackingAreaCodeList-v1130 ::= SEQUENCE +struct tac_list_v1130_s { + typedef dyn_array plmn_id_per_tac_list_r11_l_; + + // member variables + plmn_id_per_tac_list_r11_l_ plmn_id_per_tac_list_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry-v1430-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1430_ies_s { + // member variables + bool request_diff_fallback_comb_list_r14_present; + bool non_crit_ext_present; + band_combination_list_r14_l request_diff_fallback_comb_list_r14; + ue_cap_enquiry_v1510_ies_s non_crit_ext; + + // sequence methods + ue_cap_enquiry_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-v1250-IEs ::= SEQUENCE +struct ue_info_request_v1250_ies_s { + // member variables + bool mob_history_report_req_r12_present; + bool non_crit_ext_present; + ue_info_request_v1530_ies_s non_crit_ext; + + // sequence methods + ue_info_request_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AreaConfiguration-v1130 ::= SEQUENCE +struct area_cfg_v1130_s { + // member variables + tac_list_v1130_s tac_list_v1130; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGlobalIdEUTRA ::= SEQUENCE +struct cell_global_id_eutra_s { + // member variables + plmn_id_s plmn_id; + fixed_bitstring<28> cell_id; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellInfoListGERAN-r9 ::= SEQUENCE (SIZE (1..maxCellInfoGERAN-r9)) OF CellInfoGERAN-r9 +typedef dyn_array cell_info_list_geran_r9_l; + +// CellInfoListUTRA-FDD-r9 ::= SEQUENCE (SIZE (1..maxCellInfoUTRA-r9)) OF CellInfoUTRA-FDD-r9 +typedef dyn_array cell_info_list_utra_fdd_r9_l; + +// CellInfoListUTRA-TDD-r10 ::= SEQUENCE (SIZE (1..maxCellInfoUTRA-r9)) OF CellInfoUTRA-TDD-r10 +typedef dyn_array cell_info_list_utra_tdd_r10_l; + +// CellInfoListUTRA-TDD-r9 ::= SEQUENCE (SIZE (1..maxCellInfoUTRA-r9)) OF CellInfoUTRA-TDD-r9 +typedef dyn_array cell_info_list_utra_tdd_r9_l; + +// DRB-CountMSB-InfoListExt-r15 ::= SEQUENCE (SIZE (1..maxDRBExt-r15)) OF DRB-CountMSB-Info +typedef dyn_array drb_count_msb_info_list_ext_r15_l; + +// HandoverFromEUTRAPreparationRequest-v1020-IEs ::= SEQUENCE +struct ho_from_eutra_prep_request_v1020_ies_s { + // member variables + bool dual_rx_tx_redirect_ind_r10_present; + bool redirect_carrier_cdma2000_minus1_xrtt_r10_present; + bool non_crit_ext_present; + carrier_freq_cdma2000_s redirect_carrier_cdma2000_minus1_xrtt_r10; + + // sequence methods + ho_from_eutra_prep_request_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-v1250-IEs ::= SEQUENCE +struct logged_meas_cfg_v1250_ies_s { + // member variables + bool target_mbsfn_area_list_r12_present; + bool non_crit_ext_present; + target_mbsfn_area_list_r12_l target_mbsfn_area_list_r12; + logged_meas_cfg_v1530_ies_s non_crit_ext; + + // sequence methods + logged_meas_cfg_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasGapConfigToAddModList-r14 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasGapConfigPerCC-r14 +typedef dyn_array meas_gap_cfg_to_add_mod_list_r14_l; + +// MeasGapConfigToRemoveList-r14 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF INTEGER +typedef bounded_array meas_gap_cfg_to_rem_list_r14_l; + +// MeasIdToAddMod ::= SEQUENCE +struct meas_id_to_add_mod_s { + // member variables + uint8_t meas_id; + uint8_t meas_obj_id; + uint8_t report_cfg_id; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasIdToAddMod-v1310 ::= SEQUENCE +struct meas_id_to_add_mod_v1310_s { + // member variables + bool meas_obj_id_v1310_present; + uint8_t meas_obj_id_v1310; + + // sequence methods + meas_id_to_add_mod_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasIdToAddModExt-r12 ::= SEQUENCE +struct meas_id_to_add_mod_ext_r12_s { + // member variables + uint8_t meas_id_v1250; + uint8_t meas_obj_id_r12; + uint8_t report_cfg_id_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectToAddMod ::= SEQUENCE +struct meas_obj_to_add_mod_s { + struct meas_obj_c_ { + struct types { + enum options { + meas_obj_eutra, + meas_obj_utra, + meas_obj_geran, + meas_obj_cdma2000, + // ... + meas_obj_wlan_r13, + meas_obj_nr_r15, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 2; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + meas_obj_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_obj_eutra_s& meas_obj_eutra() + { + assert_choice_type("measObjectEUTRA", type_.to_string(), "measObject"); + return c.get(); + } + meas_obj_utra_s& meas_obj_utra() + { + assert_choice_type("measObjectUTRA", type_.to_string(), "measObject"); + return c.get(); + } + meas_obj_geran_s& meas_obj_geran() + { + assert_choice_type("measObjectGERAN", type_.to_string(), "measObject"); + return c.get(); + } + meas_obj_cdma2000_s& meas_obj_cdma2000() + { + assert_choice_type("measObjectCDMA2000", type_.to_string(), "measObject"); + return c.get(); + } + meas_obj_wlan_r13_s& meas_obj_wlan_r13() + { + assert_choice_type("measObjectWLAN-r13", type_.to_string(), "measObject"); + return c.get(); + } + meas_obj_nr_r15_s& meas_obj_nr_r15() + { + assert_choice_type("measObjectNR-r15", type_.to_string(), "measObject"); + return c.get(); + } + const meas_obj_eutra_s& meas_obj_eutra() const + { + assert_choice_type("measObjectEUTRA", type_.to_string(), "measObject"); + return c.get(); + } + const meas_obj_utra_s& meas_obj_utra() const + { + assert_choice_type("measObjectUTRA", type_.to_string(), "measObject"); + return c.get(); + } + const meas_obj_geran_s& meas_obj_geran() const + { + assert_choice_type("measObjectGERAN", type_.to_string(), "measObject"); + return c.get(); + } + const meas_obj_cdma2000_s& meas_obj_cdma2000() const + { + assert_choice_type("measObjectCDMA2000", type_.to_string(), "measObject"); + return c.get(); + } + const meas_obj_wlan_r13_s& meas_obj_wlan_r13() const + { + assert_choice_type("measObjectWLAN-r13", type_.to_string(), "measObject"); + return c.get(); + } + const meas_obj_nr_r15_s& meas_obj_nr_r15() const + { + assert_choice_type("measObjectNR-r15", type_.to_string(), "measObject"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + uint8_t meas_obj_id; + meas_obj_c_ meas_obj; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectToAddMod-v9e0 ::= SEQUENCE +struct meas_obj_to_add_mod_v9e0_s { + // member variables + bool meas_obj_eutra_v9e0_present; + meas_obj_eutra_v9e0_s meas_obj_eutra_v9e0; + + // sequence methods + meas_obj_to_add_mod_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectToAddModExt-r13 ::= SEQUENCE +struct meas_obj_to_add_mod_ext_r13_s { + struct meas_obj_r13_c_ { + struct types { + enum options { + meas_obj_eutra_r13, + meas_obj_utra_r13, + meas_obj_geran_r13, + meas_obj_cdma2000_r13, + // ... + meas_obj_wlan_v1320, + meas_obj_nr_r15, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 2; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + meas_obj_r13_c_() : type_(types::nulltype) {} + meas_obj_r13_c_(const meas_obj_r13_c_& other); + meas_obj_r13_c_& operator=(const meas_obj_r13_c_& other); + ~meas_obj_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_obj_eutra_s& meas_obj_eutra_r13() + { + assert_choice_type("measObjectEUTRA-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + meas_obj_utra_s& meas_obj_utra_r13() + { + assert_choice_type("measObjectUTRA-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + meas_obj_geran_s& meas_obj_geran_r13() + { + assert_choice_type("measObjectGERAN-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + meas_obj_cdma2000_s& meas_obj_cdma2000_r13() + { + assert_choice_type("measObjectCDMA2000-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + meas_obj_wlan_r13_s& meas_obj_wlan_v1320() + { + assert_choice_type("measObjectWLAN-v1320", type_.to_string(), "measObject-r13"); + return c.get(); + } + meas_obj_nr_r15_s& meas_obj_nr_r15() + { + assert_choice_type("measObjectNR-r15", type_.to_string(), "measObject-r13"); + return c.get(); + } + const meas_obj_eutra_s& meas_obj_eutra_r13() const + { + assert_choice_type("measObjectEUTRA-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + const meas_obj_utra_s& meas_obj_utra_r13() const + { + assert_choice_type("measObjectUTRA-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + const meas_obj_geran_s& meas_obj_geran_r13() const + { + assert_choice_type("measObjectGERAN-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + const meas_obj_cdma2000_s& meas_obj_cdma2000_r13() const + { + assert_choice_type("measObjectCDMA2000-r13", type_.to_string(), "measObject-r13"); + return c.get(); + } + const meas_obj_wlan_r13_s& meas_obj_wlan_v1320() const + { + assert_choice_type("measObjectWLAN-v1320", type_.to_string(), "measObject-r13"); + return c.get(); + } + const meas_obj_nr_r15_s& meas_obj_nr_r15() const + { + assert_choice_type("measObjectNR-r15", type_.to_string(), "measObject-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + uint8_t meas_obj_id_r13; + meas_obj_r13_c_ meas_obj_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-v1530-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_v1530_ies_s { + // member variables + bool smtc_r15_present; + bool non_crit_ext_present; + mtc_ssb_nr_r15_s smtc_r15; + + // sequence methods + mob_from_eutra_cmd_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OtherConfig-r9 ::= SEQUENCE +struct other_cfg_r9_s { + struct bw_pref_ind_timer_r14_e_ { + enum options { s0, s0dot5, s1, s2, s5, s10, s20, s30, s60, s90, s120, s300, s600, spare3, spare2, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + bw_pref_ind_timer_r14_e_() {} + bw_pref_ind_timer_r14_e_(options v) : value(v) {} + bw_pref_ind_timer_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct delay_budget_report_cfg_r14_c_ { + struct setup_s_ { + struct delay_budget_report_prohibit_timer_r14_e_ { + enum options { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + delay_budget_report_prohibit_timer_r14_e_() {} + delay_budget_report_prohibit_timer_r14_e_(options v) : value(v) {} + delay_budget_report_prohibit_timer_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + delay_budget_report_prohibit_timer_r14_e_ delay_budget_report_prohibit_timer_r14; + }; + typedef setup_e types; + + // choice methods + delay_budget_report_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "delayBudgetReportingConfig-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "delayBudgetReportingConfig-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct rlm_report_cfg_r14_c_ { + struct setup_s_ { + struct rlm_report_timer_r14_e_ { + enum options { s0, s0dot5, s1, s2, s5, s10, s20, s30, s60, s90, s120, s300, s600, spare3, spare2, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rlm_report_timer_r14_e_() {} + rlm_report_timer_r14_e_(options v) : value(v) {} + rlm_report_timer_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool rlm_report_rep_mpdcch_r14_present; + rlm_report_timer_r14_e_ rlm_report_timer_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + rlm_report_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "rlm-ReportConfig-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "rlm-ReportConfig-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct overheat_assist_cfg_r14_c_ { + struct setup_s_ { + struct overheat_ind_prohibit_timer_r14_e_ { + enum options { s0, s0dot5, s1, s2, s5, s10, s20, s30, s60, s90, s120, s300, s600, spare3, spare2, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + overheat_ind_prohibit_timer_r14_e_() {} + overheat_ind_prohibit_timer_r14_e_(options v) : value(v) {} + overheat_ind_prohibit_timer_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + overheat_ind_prohibit_timer_r14_e_ overheat_ind_prohibit_timer_r14; + }; + typedef setup_e types; + + // choice methods + overheat_assist_cfg_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "overheatingAssistanceConfig-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "overheatingAssistanceConfig-r14"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct meas_cfg_app_layer_r15_c_ { + struct setup_s_ { + struct service_type_e_ { + enum options { qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1 }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + service_type_e_() {} + service_type_e_(options v) : value(v) {} + service_type_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + dyn_octstring meas_cfg_app_layer_container_r15; + service_type_e_ service_type; + }; + typedef setup_e types; + + // choice methods + meas_cfg_app_layer_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "measConfigAppLayer-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "measConfigAppLayer-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool report_proximity_cfg_r9_present; + report_proximity_cfg_r9_s report_proximity_cfg_r9; + // ... + // group 0 + bool idc_cfg_r11_present; + bool pwr_pref_ind_cfg_r11_present; + bool obtain_location_cfg_r11_present; + copy_ptr idc_cfg_r11; + copy_ptr pwr_pref_ind_cfg_r11; + copy_ptr obtain_location_cfg_r11; + // group 1 + bool bw_pref_ind_timer_r14_present; + bool sps_assist_info_report_r14_present; + bool delay_budget_report_cfg_r14_present; + bool rlm_report_cfg_r14_present; + bw_pref_ind_timer_r14_e_ bw_pref_ind_timer_r14; + bool sps_assist_info_report_r14; + copy_ptr delay_budget_report_cfg_r14; + copy_ptr rlm_report_cfg_r14; + // group 2 + bool overheat_assist_cfg_r14_present; + copy_ptr overheat_assist_cfg_r14; + // group 3 + bool meas_cfg_app_layer_r15_present; + bool ailc_bit_cfg_r15_present; + bool bt_name_list_cfg_r15_present; + bool wlan_name_list_cfg_r15_present; + copy_ptr meas_cfg_app_layer_r15; + bool ailc_bit_cfg_r15; + copy_ptr bt_name_list_cfg_r15; + copy_ptr wlan_name_list_cfg_r15; + + // sequence methods + other_cfg_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList3-r11 ::= SEQUENCE (SIZE (1..16)) OF PLMN-Identity +typedef dyn_array plmn_id_list3_r11_l; + +// PRACH-Config-v1310 ::= SEQUENCE +struct prach_cfg_v1310_s { + struct mpdcch_start_sf_css_ra_r13_c_ { + struct fdd_r13_e_ { + enum options { v1, v1dot5, v2, v2dot5, v4, v5, v8, v10 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fdd_r13_e_() {} + fdd_r13_e_(options v) : value(v) {} + fdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct tdd_r13_e_ { + enum options { v1, v2, v4, v5, v8, v10, v20, spare }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_r13_e_() {} + tdd_r13_e_(options v) : value(v) {} + tdd_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { fdd_r13, tdd_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mpdcch_start_sf_css_ra_r13_c_() : type_(types::nulltype) {} + mpdcch_start_sf_css_ra_r13_c_(const mpdcch_start_sf_css_ra_r13_c_& other); + mpdcch_start_sf_css_ra_r13_c_& operator=(const mpdcch_start_sf_css_ra_r13_c_& other); + ~mpdcch_start_sf_css_ra_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fdd_r13_e_& fdd_r13() + { + assert_choice_type("fdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + tdd_r13_e_& tdd_r13() + { + assert_choice_type("tdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + const fdd_r13_e_& fdd_r13() const + { + assert_choice_type("fdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + const tdd_r13_e_& tdd_r13() const + { + assert_choice_type("tdd-r13", type_.to_string(), "mpdcch-startSF-CSS-RA-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool rsrp_thress_prach_info_list_r13_present; + bool mpdcch_start_sf_css_ra_r13_present; + bool prach_hop_offset_r13_present; + bool prach_params_list_ce_r13_present; + bool init_ce_level_r13_present; + rsrp_thress_prach_info_list_r13_l rsrp_thress_prach_info_list_r13; + mpdcch_start_sf_css_ra_r13_c_ mpdcch_start_sf_css_ra_r13; + uint8_t prach_hop_offset_r13; + prach_params_list_ce_r13_l prach_params_list_ce_r13; + uint8_t init_ce_level_r13; + + // sequence methods + prach_cfg_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigCDMA2000 ::= SEQUENCE +struct quant_cfg_cdma2000_s { + struct meas_quant_cdma2000_e_ { + enum options { pilot_strength, pilot_pn_phase_and_pilot_strength }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_quant_cdma2000_e_() {} + meas_quant_cdma2000_e_(options v) : value(v) {} + meas_quant_cdma2000_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + meas_quant_cdma2000_e_ meas_quant_cdma2000; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigEUTRA ::= SEQUENCE +struct quant_cfg_eutra_s { + // member variables + bool filt_coef_rsrp_present; + bool filt_coef_rsrq_present; + filt_coef_e filt_coef_rsrp; + filt_coef_e filt_coef_rsrq; + + // sequence methods + quant_cfg_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigEUTRA-v1250 ::= SEQUENCE +struct quant_cfg_eutra_v1250_s { + // member variables + bool filt_coef_csi_rsrp_r12_present; + filt_coef_e filt_coef_csi_rsrp_r12; + + // sequence methods + quant_cfg_eutra_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigEUTRA-v1310 ::= SEQUENCE +struct quant_cfg_eutra_v1310_s { + // member variables + bool filt_coef_rs_sinr_r13_present; + filt_coef_e filt_coef_rs_sinr_r13; + + // sequence methods + quant_cfg_eutra_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigGERAN ::= SEQUENCE +struct quant_cfg_geran_s { + // member variables + bool filt_coef_present; + filt_coef_e filt_coef; + + // sequence methods + quant_cfg_geran_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigNRList-r15 ::= SEQUENCE (SIZE (1..maxQuantSetsNR-r15)) OF QuantityConfigNR-r15 +typedef dyn_array quant_cfg_nr_list_r15_l; + +// QuantityConfigUTRA ::= SEQUENCE +struct quant_cfg_utra_s { + struct meas_quant_utra_fdd_e_ { + enum options { cpich_rscp, cpich_ec_n0 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_quant_utra_fdd_e_() {} + meas_quant_utra_fdd_e_(options v) : value(v) {} + meas_quant_utra_fdd_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool filt_coef_present; + meas_quant_utra_fdd_e_ meas_quant_utra_fdd; + filt_coef_e filt_coef; + + // sequence methods + quant_cfg_utra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigUTRA-v1020 ::= SEQUENCE +struct quant_cfg_utra_v1020_s { + // member variables + bool filt_coef2_fdd_r10_present; + filt_coef_e filt_coef2_fdd_r10; + + // sequence methods + quant_cfg_utra_v1020_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfigWLAN-r13 ::= SEQUENCE +struct quant_cfg_wlan_r13_s { + // member variables + bool filt_coef_r13_present; + filt_coef_e filt_coef_r13; + + // sequence methods + quant_cfg_wlan_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v1020-IEs ::= SEQUENCE +struct rrc_conn_recfg_v1020_ies_s { + // member variables + bool s_cell_to_release_list_r10_present; + bool s_cell_to_add_mod_list_r10_present; + bool non_crit_ext_present; + scell_to_release_list_r10_l s_cell_to_release_list_r10; + scell_to_add_mod_list_r10_l s_cell_to_add_mod_list_r10; + rrc_conn_recfg_v1130_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v10i0-IEs ::= SEQUENCE +struct rrc_conn_recfg_v10i0_ies_s { + // member variables + bool ant_info_ded_pcell_v10i0_present; + bool non_crit_ext_present; + ant_info_ded_v10i0_s ant_info_ded_pcell_v10i0; + rrc_conn_recfg_v10l0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v10i0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-v1020-IEs ::= SEQUENCE +struct rrc_conn_release_v1020_ies_s { + // member variables + bool extended_wait_time_r10_present; + bool non_crit_ext_present; + uint16_t extended_wait_time_r10; + rrc_conn_release_v1320_ies_s non_crit_ext; + + // sequence methods + rrc_conn_release_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResume-v1530-IEs ::= SEQUENCE +struct rrc_conn_resume_v1530_ies_s { + // member variables + bool full_cfg_r15_present; + bool non_crit_ext_present; + + // sequence methods + rrc_conn_resume_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RedirectedCarrierInfo-v9e0 ::= SEQUENCE +struct redirected_carrier_info_v9e0_s { + // member variables + uint32_t eutra_v9e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigToAddMod ::= SEQUENCE +struct report_cfg_to_add_mod_s { + struct report_cfg_c_ { + struct types { + enum options { report_cfg_eutra, report_cfg_inter_rat, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + report_cfg_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + report_cfg_eutra_s& report_cfg_eutra() + { + assert_choice_type("reportConfigEUTRA", type_.to_string(), "reportConfig"); + return c.get(); + } + report_cfg_inter_rat_s& report_cfg_inter_rat() + { + assert_choice_type("reportConfigInterRAT", type_.to_string(), "reportConfig"); + return c.get(); + } + const report_cfg_eutra_s& report_cfg_eutra() const + { + assert_choice_type("reportConfigEUTRA", type_.to_string(), "reportConfig"); + return c.get(); + } + const report_cfg_inter_rat_s& report_cfg_inter_rat() const + { + assert_choice_type("reportConfigInterRAT", type_.to_string(), "reportConfig"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t report_cfg_id; + report_cfg_c_ report_cfg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry-v1310-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1310_ies_s { + // member variables + bool request_reduced_format_r13_present; + bool request_skip_fallback_comb_r13_present; + bool requested_max_ccs_dl_r13_present; + bool requested_max_ccs_ul_r13_present; + bool request_reduced_int_non_cont_comb_r13_present; + bool non_crit_ext_present; + uint8_t requested_max_ccs_dl_r13; + uint8_t requested_max_ccs_ul_r13; + ue_cap_enquiry_v1430_ies_s non_crit_ext; + + // sequence methods + ue_cap_enquiry_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-v1130-IEs ::= SEQUENCE +struct ue_info_request_v1130_ies_s { + // member variables + bool conn_est_fail_report_req_r11_present; + bool non_crit_ext_present; + ue_info_request_v1250_ies_s non_crit_ext; + + // sequence methods + ue_info_request_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierBandwidthEUTRA ::= SEQUENCE +struct carrier_bw_eutra_s { + struct dl_bw_e_ { + enum options { + n6, + n15, + n25, + n50, + n75, + n100, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dl_bw_e_() {} + dl_bw_e_(options v) : value(v) {} + dl_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct ul_bw_e_ { + enum options { + n6, + n15, + n25, + n50, + n75, + n100, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_bw_e_() {} + ul_bw_e_(options v) : value(v) {} + ul_bw_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ul_bw_present; + dl_bw_e_ dl_bw; + ul_bw_e_ ul_bw; + + // sequence methods + carrier_bw_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqEUTRA ::= SEQUENCE +struct carrier_freq_eutra_s { + // member variables + bool ul_carrier_freq_present; + uint16_t dl_carrier_freq; + uint16_t ul_carrier_freq; + + // sequence methods + carrier_freq_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqEUTRA-v9e0 ::= SEQUENCE +struct carrier_freq_eutra_v9e0_s { + // member variables + bool ul_carrier_freq_v9e0_present; + uint32_t dl_carrier_freq_v9e0; + uint32_t ul_carrier_freq_v9e0; + + // sequence methods + carrier_freq_eutra_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierInfoNR-r15 ::= SEQUENCE +struct carrier_info_nr_r15_s { + struct subcarrier_spacing_ssb_r15_e_ { + enum options { k_hz15, k_hz30, k_hz120, k_hz240 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + subcarrier_spacing_ssb_r15_e_() {} + subcarrier_spacing_ssb_r15_e_(options v) : value(v) {} + subcarrier_spacing_ssb_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool smtc_r15_present; + uint32_t carrier_freq_r15; + subcarrier_spacing_ssb_r15_e_ subcarrier_spacing_ssb_r15; + mtc_ssb_nr_r15_s smtc_r15; + + // sequence methods + carrier_info_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGlobalIdList-r10 ::= SEQUENCE (SIZE (1..32)) OF CellGlobalIdEUTRA +typedef dyn_array cell_global_id_list_r10_l; + +// CounterCheck-v1530-IEs ::= SEQUENCE +struct counter_check_v1530_ies_s { + // member variables + bool drb_count_msb_info_list_ext_r15_present; + bool non_crit_ext_present; + drb_count_msb_info_list_ext_r15_l drb_count_msb_info_list_ext_r15; + + // sequence methods + counter_check_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverFromEUTRAPreparationRequest-v920-IEs ::= SEQUENCE +struct ho_from_eutra_prep_request_v920_ies_s { + // member variables + bool concurr_prep_cdma2000_hrpd_r9_present; + bool non_crit_ext_present; + bool concurr_prep_cdma2000_hrpd_r9; + ho_from_eutra_prep_request_v1020_ies_s non_crit_ext; + + // sequence methods + ho_from_eutra_prep_request_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-v1130-IEs ::= SEQUENCE +struct logged_meas_cfg_v1130_ies_s { + // member variables + bool plmn_id_list_r11_present; + bool area_cfg_v1130_present; + bool non_crit_ext_present; + plmn_id_list3_r11_l plmn_id_list_r11; + area_cfg_v1130_s area_cfg_v1130; + logged_meas_cfg_v1250_ies_s non_crit_ext; + + // sequence methods + logged_meas_cfg_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasGapConfigDensePRS-r15 ::= CHOICE +struct meas_gap_cfg_dense_prs_r15_c { + struct setup_s_ { + struct gap_offset_dense_prs_r15_c_ { + struct types { + enum options { + rstd0_r15, + rstd1_r15, + rstd2_r15, + rstd3_r15, + rstd4_r15, + rstd5_r15, + rstd6_r15, + rstd7_r15, + rstd8_r15, + rstd9_r15, + rstd10_r15, + rstd11_r15, + rstd12_r15, + rstd13_r15, + rstd14_r15, + rstd15_r15, + rstd16_r15, + rstd17_r15, + rstd18_r15, + rstd19_r15, + rstd20_r15, + // ... + nulltype + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 21, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + gap_offset_dense_prs_r15_c_() : type_(types::nulltype) {} + gap_offset_dense_prs_r15_c_(const gap_offset_dense_prs_r15_c_& other); + gap_offset_dense_prs_r15_c_& operator=(const gap_offset_dense_prs_r15_c_& other); + ~gap_offset_dense_prs_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& rstd0_r15() + { + assert_choice_type("rstd0-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint8_t& rstd1_r15() + { + assert_choice_type("rstd1-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd2_r15() + { + assert_choice_type("rstd2-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd3_r15() + { + assert_choice_type("rstd3-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd4_r15() + { + assert_choice_type("rstd4-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint8_t& rstd5_r15() + { + assert_choice_type("rstd5-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd6_r15() + { + assert_choice_type("rstd6-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd7_r15() + { + assert_choice_type("rstd7-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd8_r15() + { + assert_choice_type("rstd8-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd9_r15() + { + assert_choice_type("rstd9-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd10_r15() + { + assert_choice_type("rstd10-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd11_r15() + { + assert_choice_type("rstd11-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd12_r15() + { + assert_choice_type("rstd12-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd13_r15() + { + assert_choice_type("rstd13-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd14_r15() + { + assert_choice_type("rstd14-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd15_r15() + { + assert_choice_type("rstd15-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd16_r15() + { + assert_choice_type("rstd16-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd17_r15() + { + assert_choice_type("rstd17-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd18_r15() + { + assert_choice_type("rstd18-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd19_r15() + { + assert_choice_type("rstd19-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + uint16_t& rstd20_r15() + { + assert_choice_type("rstd20-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint8_t& rstd0_r15() const + { + assert_choice_type("rstd0-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint8_t& rstd1_r15() const + { + assert_choice_type("rstd1-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd2_r15() const + { + assert_choice_type("rstd2-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd3_r15() const + { + assert_choice_type("rstd3-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd4_r15() const + { + assert_choice_type("rstd4-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint8_t& rstd5_r15() const + { + assert_choice_type("rstd5-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd6_r15() const + { + assert_choice_type("rstd6-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd7_r15() const + { + assert_choice_type("rstd7-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd8_r15() const + { + assert_choice_type("rstd8-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd9_r15() const + { + assert_choice_type("rstd9-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd10_r15() const + { + assert_choice_type("rstd10-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd11_r15() const + { + assert_choice_type("rstd11-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd12_r15() const + { + assert_choice_type("rstd12-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd13_r15() const + { + assert_choice_type("rstd13-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd14_r15() const + { + assert_choice_type("rstd14-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd15_r15() const + { + assert_choice_type("rstd15-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd16_r15() const + { + assert_choice_type("rstd16-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd17_r15() const + { + assert_choice_type("rstd17-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd18_r15() const + { + assert_choice_type("rstd18-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd19_r15() const + { + assert_choice_type("rstd19-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + const uint16_t& rstd20_r15() const + { + assert_choice_type("rstd20-r15", type_.to_string(), "gapOffsetDensePRS-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + gap_offset_dense_prs_r15_c_ gap_offset_dense_prs_r15; + }; + typedef setup_e types; + + // choice methods + meas_gap_cfg_dense_prs_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasGapConfigDensePRS-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasGapConfigDensePRS-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MeasGapConfigPerCC-List-r14 ::= CHOICE +struct meas_gap_cfg_per_cc_list_r14_c { + struct setup_s_ { + // member variables + bool meas_gap_cfg_to_rem_list_r14_present; + bool meas_gap_cfg_to_add_mod_list_r14_present; + meas_gap_cfg_to_rem_list_r14_l meas_gap_cfg_to_rem_list_r14; + meas_gap_cfg_to_add_mod_list_r14_l meas_gap_cfg_to_add_mod_list_r14; + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + meas_gap_cfg_per_cc_list_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasGapConfigPerCC-List-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasGapConfigPerCC-List-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MeasGapSharingConfig-r14 ::= CHOICE +struct meas_gap_sharing_cfg_r14_c { + struct setup_s_ { + struct meas_gap_sharing_scheme_r14_e_ { + enum options { scheme00, scheme01, scheme10, scheme11 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_gap_sharing_scheme_r14_e_() {} + meas_gap_sharing_scheme_r14_e_(options v) : value(v) {} + meas_gap_sharing_scheme_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + meas_gap_sharing_scheme_r14_e_ meas_gap_sharing_scheme_r14; + }; + typedef setup_e types; + + // choice methods + meas_gap_sharing_cfg_r14_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "MeasGapSharingConfig-r14"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "MeasGapSharingConfig-r14"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// MeasIdToAddModList ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddMod +typedef dyn_array meas_id_to_add_mod_list_l; + +// MeasIdToAddModList-v1310 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddMod-v1310 +typedef dyn_array meas_id_to_add_mod_list_v1310_l; + +// MeasIdToAddModListExt-r12 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddModExt-r12 +typedef dyn_array meas_id_to_add_mod_list_ext_r12_l; + +// MeasIdToAddModListExt-v1310 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddMod-v1310 +typedef dyn_array meas_id_to_add_mod_list_ext_v1310_l; + +// MeasIdToRemoveList ::= SEQUENCE (SIZE (1..maxMeasId)) OF INTEGER +typedef bounded_array meas_id_to_rem_list_l; + +// MeasIdToRemoveListExt-r12 ::= SEQUENCE (SIZE (1..maxMeasId)) OF INTEGER +typedef bounded_array meas_id_to_rem_list_ext_r12_l; + +// MeasObjectToAddModList ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectToAddMod +typedef dyn_array meas_obj_to_add_mod_list_l; + +// MeasObjectToAddModList-v9e0 ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectToAddMod-v9e0 +typedef dyn_array meas_obj_to_add_mod_list_v9e0_l; + +// MeasObjectToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectToAddModExt-r13 +typedef dyn_array meas_obj_to_add_mod_list_ext_r13_l; + +// MeasObjectToRemoveList ::= SEQUENCE (SIZE (1..maxObjectId)) OF INTEGER +typedef bounded_array meas_obj_to_rem_list_l; + +// MeasObjectToRemoveListExt-r13 ::= SEQUENCE (SIZE (1..maxObjectId)) OF INTEGER +typedef bounded_array meas_obj_to_rem_list_ext_r13_l; + +// MeasScaleFactor-r12 ::= ENUMERATED +struct meas_scale_factor_r12_e { + enum options { sf_eutra_cf1, sf_eutra_cf2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_scale_factor_r12_e() {} + meas_scale_factor_r12_e(options v) : value(v) {} + meas_scale_factor_r12_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// MobilityControlInfoV2X-r14 ::= SEQUENCE +struct mob_ctrl_info_v2x_r14_s { + // member variables + bool v2x_comm_tx_pool_exceptional_r14_present; + bool v2x_comm_rx_pool_r14_present; + bool v2x_comm_sync_cfg_r14_present; + bool cbr_mob_tx_cfg_list_r14_present; + sl_comm_res_pool_v2x_r14_s v2x_comm_tx_pool_exceptional_r14; + sl_comm_rx_pool_list_v2x_r14_l v2x_comm_rx_pool_r14; + sl_sync_cfg_list_v2x_r14_l v2x_comm_sync_cfg_r14; + sl_cbr_common_tx_cfg_list_r14_s cbr_mob_tx_cfg_list_r14; + + // sequence methods + mob_ctrl_info_v2x_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-v8d0-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_v8d0_ies_s { + // member variables + bool band_ind_present; + bool non_crit_ext_present; + band_ind_geran_e band_ind; + + // sequence methods + mob_from_eutra_cmd_v8d0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-v960-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_v960_ies_s { + // member variables + bool band_ind_present; + bool non_crit_ext_present; + band_ind_geran_e band_ind; + mob_from_eutra_cmd_v1530_ies_s non_crit_ext; + + // sequence methods + mob_from_eutra_cmd_v960_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// QuantityConfig ::= SEQUENCE +struct quant_cfg_s { + // member variables + bool ext; + bool quant_cfg_eutra_present; + bool quant_cfg_utra_present; + bool quant_cfg_geran_present; + bool quant_cfg_cdma2000_present; + quant_cfg_eutra_s quant_cfg_eutra; + quant_cfg_utra_s quant_cfg_utra; + quant_cfg_geran_s quant_cfg_geran; + quant_cfg_cdma2000_s quant_cfg_cdma2000; + // ... + // group 0 + bool quant_cfg_utra_v1020_present; + copy_ptr quant_cfg_utra_v1020; + // group 1 + bool quant_cfg_eutra_v1250_present; + copy_ptr quant_cfg_eutra_v1250; + // group 2 + bool quant_cfg_eutra_v1310_present; + bool quant_cfg_wlan_r13_present; + copy_ptr quant_cfg_eutra_v1310; + copy_ptr quant_cfg_wlan_r13; + // group 3 + bool quant_cfg_nr_list_r15_present; + copy_ptr quant_cfg_nr_list_r15; + + // sequence methods + quant_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAT-Type ::= ENUMERATED +struct rat_type_e { + enum options { eutra, utra, geran_cs, geran_ps, cdma2000_minus1_xrtt, nr, eutra_nr, spare1, /*...*/ }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + rat_type_e() {} + rat_type_e(options v) : value(v) {} + rat_type_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// RRCConnectionReconfiguration-v8m0-IEs ::= SEQUENCE +struct rrc_conn_recfg_v8m0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_recfg_v10i0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v8m0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v920-IEs ::= SEQUENCE +struct rrc_conn_recfg_v920_ies_s { + // member variables + bool other_cfg_r9_present; + bool full_cfg_r9_present; + bool non_crit_ext_present; + other_cfg_r9_s other_cfg_r9; + rrc_conn_recfg_v1020_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-v920-IEs ::= SEQUENCE +struct rrc_conn_release_v920_ies_s { + struct cell_info_list_r9_c_ { + struct types { + enum options { geran_r9, utra_fdd_r9, utra_tdd_r9, /*...*/ utra_tdd_r10, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 1; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + cell_info_list_r9_c_() : type_(types::nulltype) {} + cell_info_list_r9_c_(const cell_info_list_r9_c_& other); + cell_info_list_r9_c_& operator=(const cell_info_list_r9_c_& other); + ~cell_info_list_r9_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cell_info_list_geran_r9_l& geran_r9() + { + assert_choice_type("geran-r9", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + cell_info_list_utra_fdd_r9_l& utra_fdd_r9() + { + assert_choice_type("utra-FDD-r9", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + cell_info_list_utra_tdd_r9_l& utra_tdd_r9() + { + assert_choice_type("utra-TDD-r9", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + cell_info_list_utra_tdd_r10_l& utra_tdd_r10() + { + assert_choice_type("utra-TDD-r10", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + const cell_info_list_geran_r9_l& geran_r9() const + { + assert_choice_type("geran-r9", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + const cell_info_list_utra_fdd_r9_l& utra_fdd_r9() const + { + assert_choice_type("utra-FDD-r9", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + const cell_info_list_utra_tdd_r9_l& utra_tdd_r9() const + { + assert_choice_type("utra-TDD-r9", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + const cell_info_list_utra_tdd_r10_l& utra_tdd_r10() const + { + assert_choice_type("utra-TDD-r10", type_.to_string(), "cellInfoList-r9"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + bool cell_info_list_r9_present; + bool non_crit_ext_present; + cell_info_list_r9_c_ cell_info_list_r9; + rrc_conn_release_v1020_ies_s non_crit_ext; + + // sequence methods + rrc_conn_release_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-v9e0-IEs ::= SEQUENCE +struct rrc_conn_release_v9e0_ies_s { + // member variables + bool redirected_carrier_info_v9e0_present; + bool idle_mode_mob_ctrl_info_v9e0_present; + bool non_crit_ext_present; + redirected_carrier_info_v9e0_s redirected_carrier_info_v9e0; + idle_mode_mob_ctrl_info_v9e0_s idle_mode_mob_ctrl_info_v9e0; + + // sequence methods + rrc_conn_release_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResume-v1510-IEs ::= SEQUENCE +struct rrc_conn_resume_v1510_ies_s { + // member variables + bool sk_counter_r15_present; + bool nr_radio_bearer_cfg1_r15_present; + bool nr_radio_bearer_cfg2_r15_present; + bool non_crit_ext_present; + uint16_t sk_counter_r15; + dyn_octstring nr_radio_bearer_cfg1_r15; + dyn_octstring nr_radio_bearer_cfg2_r15; + rrc_conn_resume_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_resume_v1510_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RadioResourceConfigCommon ::= SEQUENCE +struct rr_cfg_common_s { + // member variables + bool ext; + bool rach_cfg_common_present; + bool pdsch_cfg_common_present; + bool phich_cfg_present; + bool pucch_cfg_common_present; + bool srs_ul_cfg_common_present; + bool ul_pwr_ctrl_common_present; + bool ant_info_common_present; + bool p_max_present; + bool tdd_cfg_present; + rach_cfg_common_s rach_cfg_common; + prach_cfg_s prach_cfg; + pdsch_cfg_common_s pdsch_cfg_common; + pusch_cfg_common_s pusch_cfg_common; + phich_cfg_s phich_cfg; + pucch_cfg_common_s pucch_cfg_common; + srs_ul_cfg_common_c srs_ul_cfg_common; + ul_pwr_ctrl_common_s ul_pwr_ctrl_common; + ant_info_common_s ant_info_common; + int8_t p_max; + tdd_cfg_s tdd_cfg; + ul_cp_len_e ul_cp_len; + // ... + // group 0 + bool ul_pwr_ctrl_common_v1020_present; + copy_ptr ul_pwr_ctrl_common_v1020; + // group 1 + bool tdd_cfg_v1130_present; + copy_ptr tdd_cfg_v1130; + // group 2 + bool pusch_cfg_common_v1270_present; + copy_ptr pusch_cfg_common_v1270; + // group 3 + bool prach_cfg_v1310_present; + bool freq_hop_params_r13_present; + bool pdsch_cfg_common_v1310_present; + bool pucch_cfg_common_v1310_present; + bool pusch_cfg_common_v1310_present; + bool ul_pwr_ctrl_common_v1310_present; + copy_ptr prach_cfg_v1310; + copy_ptr freq_hop_params_r13; + copy_ptr pdsch_cfg_common_v1310; + copy_ptr pucch_cfg_common_v1310; + copy_ptr pusch_cfg_common_v1310; + copy_ptr ul_pwr_ctrl_common_v1310; + // group 4 + bool high_speed_cfg_r14_present; + bool prach_cfg_v1430_present; + bool pucch_cfg_common_v1430_present; + bool tdd_cfg_v1430_present; + copy_ptr high_speed_cfg_r14; + copy_ptr prach_cfg_v1430; + copy_ptr pucch_cfg_common_v1430; + copy_ptr tdd_cfg_v1430; + // group 5 + bool tdd_cfg_v1450_present; + copy_ptr tdd_cfg_v1450; + // group 6 + bool ul_pwr_ctrl_common_v1530_present; + bool high_speed_cfg_v1530_present; + copy_ptr ul_pwr_ctrl_common_v1530; + copy_ptr high_speed_cfg_v1530; + + // sequence methods + rr_cfg_common_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReportConfigToAddModList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigToAddMod +typedef dyn_array report_cfg_to_add_mod_list_l; + +// ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF INTEGER +typedef bounded_array report_cfg_to_rem_list_l; + +// SI-OrPSI-GERAN ::= CHOICE +struct si_or_psi_geran_c { + struct types { + enum options { si, psi, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + si_or_psi_geran_c() : type_(types::nulltype) {} + si_or_psi_geran_c(const si_or_psi_geran_c& other); + si_or_psi_geran_c& operator=(const si_or_psi_geran_c& other); + ~si_or_psi_geran_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sys_info_list_geran_l& si() + { + assert_choice_type("si", type_.to_string(), "SI-OrPSI-GERAN"); + return c.get(); + } + sys_info_list_geran_l& psi() + { + assert_choice_type("psi", type_.to_string(), "SI-OrPSI-GERAN"); + return c.get(); + } + const sys_info_list_geran_l& si() const + { + assert_choice_type("si", type_.to_string(), "SI-OrPSI-GERAN"); + return c.get(); + } + const sys_info_list_geran_l& psi() const + { + assert_choice_type("psi", type_.to_string(), "SI-OrPSI-GERAN"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// TrackingAreaCodeList-r10 ::= SEQUENCE (SIZE (1..8)) OF BIT STRING +typedef bounded_array, 8> tac_list_r10_l; + +// UECapabilityEnquiry-v1180-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1180_ies_s { + typedef bounded_array requested_freq_bands_r11_l_; + + // member variables + bool requested_freq_bands_r11_present; + bool non_crit_ext_present; + requested_freq_bands_r11_l_ requested_freq_bands_r11; + ue_cap_enquiry_v1310_ies_s non_crit_ext; + + // sequence methods + ue_cap_enquiry_v1180_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-v1020-IEs ::= SEQUENCE +struct ue_info_request_v1020_ies_s { + // member variables + bool log_meas_report_req_r10_present; + bool non_crit_ext_present; + ue_info_request_v1130_ies_s non_crit_ext; + + // sequence methods + ue_info_request_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AreaConfiguration-r10 ::= CHOICE +struct area_cfg_r10_c { + struct types { + enum options { cell_global_id_list_r10, tac_list_r10, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + area_cfg_r10_c() : type_(types::nulltype) {} + area_cfg_r10_c(const area_cfg_r10_c& other); + area_cfg_r10_c& operator=(const area_cfg_r10_c& other); + ~area_cfg_r10_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cell_global_id_list_r10_l& cell_global_id_list_r10() + { + assert_choice_type("cellGlobalIdList-r10", type_.to_string(), "AreaConfiguration-r10"); + return c.get(); + } + tac_list_r10_l& tac_list_r10() + { + assert_choice_type("trackingAreaCodeList-r10", type_.to_string(), "AreaConfiguration-r10"); + return c.get(); + } + const cell_global_id_list_r10_l& cell_global_id_list_r10() const + { + assert_choice_type("cellGlobalIdList-r10", type_.to_string(), "AreaConfiguration-r10"); + return c.get(); + } + const tac_list_r10_l& tac_list_r10() const + { + assert_choice_type("trackingAreaCodeList-r10", type_.to_string(), "AreaConfiguration-r10"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// CSFBParametersResponseCDMA2000-v8a0-IEs ::= SEQUENCE +struct csfb_params_resp_cdma2000_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + csfb_params_resp_cdma2000_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellChangeOrder ::= SEQUENCE +struct cell_change_order_s { + struct t304_e_ { + enum options { ms100, ms200, ms500, ms1000, ms2000, ms4000, ms8000, ms10000_v1310 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t304_e_() {} + t304_e_(options v) : value(v) {} + t304_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct target_rat_type_c_ { + struct geran_s_ { + // member variables + bool network_ctrl_order_present; + bool sys_info_present; + pci_geran_s pci; + carrier_freq_geran_s carrier_freq; + fixed_bitstring<2> network_ctrl_order; + si_or_psi_geran_c sys_info; + + // sequence methods + geran_s_(); + }; + struct types { + enum options { geran, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + target_rat_type_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + geran_s_& geran() + { + assert_choice_type("geran", type_.to_string(), "targetRAT-Type"); + return c; + } + const geran_s_& geran() const + { + assert_choice_type("geran", type_.to_string(), "targetRAT-Type"); + return c; + } + + private: + types type_; + geran_s_ c; + }; + + // member variables + t304_e_ t304; + target_rat_type_c_ target_rat_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheck-v8a0-IEs ::= SEQUENCE +struct counter_check_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + counter_check_v1530_ies_s non_crit_ext; + + // sequence methods + counter_check_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DLInformationTransfer-v8a0-IEs ::= SEQUENCE +struct dl_info_transfer_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + dl_info_transfer_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-CountMSB-Info +typedef dyn_array drb_count_msb_info_list_l; + +// E-CSFB-r9 ::= SEQUENCE +struct e_csfb_r9_s { + struct mob_cdma2000_hrpd_r9_e_ { + enum options { ho, redirection }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mob_cdma2000_hrpd_r9_e_() {} + mob_cdma2000_hrpd_r9_e_(options v) : value(v) {} + mob_cdma2000_hrpd_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool msg_cont_cdma2000_minus1_xrtt_r9_present; + bool mob_cdma2000_hrpd_r9_present; + bool msg_cont_cdma2000_hrpd_r9_present; + bool redirect_carrier_cdma2000_hrpd_r9_present; + dyn_octstring msg_cont_cdma2000_minus1_xrtt_r9; + mob_cdma2000_hrpd_r9_e_ mob_cdma2000_hrpd_r9; + dyn_octstring msg_cont_cdma2000_hrpd_r9; + carrier_freq_cdma2000_s redirect_carrier_cdma2000_hrpd_r9; + + // sequence methods + e_csfb_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Handover ::= SEQUENCE +struct ho_s { + struct target_rat_type_e_ { + enum options { utra, geran, cdma2000_minus1_xrtt, cdma2000_hrpd, nr, eutra, spare2, spare1, /*...*/ }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + target_rat_type_e_() {} + target_rat_type_e_(options v) : value(v) {} + target_rat_type_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool nas_security_param_from_eutra_present; + bool sys_info_present; + target_rat_type_e_ target_rat_type; + dyn_octstring target_rat_msg_container; + fixed_octstring<1> nas_security_param_from_eutra; + si_or_psi_geran_c sys_info; + + // sequence methods + ho_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverFromEUTRAPreparationRequest-v890-IEs ::= SEQUENCE +struct ho_from_eutra_prep_request_v890_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ho_from_eutra_prep_request_v920_ies_s non_crit_ext; + + // sequence methods + ho_from_eutra_prep_request_v890_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-v1080-IEs ::= SEQUENCE +struct logged_meas_cfg_v1080_ies_s { + // member variables + bool late_non_crit_ext_r10_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext_r10; + logged_meas_cfg_v1130_ies_s non_crit_ext; + + // sequence methods + logged_meas_cfg_v1080_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggingDuration-r10 ::= ENUMERATED +struct logging_dur_r10_e { + enum options { min10, min20, min40, min60, min90, min120, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + logging_dur_r10_e() {} + logging_dur_r10_e(options v) : value(v) {} + logging_dur_r10_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// LoggingInterval-r10 ::= ENUMERATED +struct logging_interv_r10_e { + enum options { ms1280, ms2560, ms5120, ms10240, ms20480, ms30720, ms40960, ms61440 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + logging_interv_r10_e() {} + logging_interv_r10_e(options v) : value(v) {} + logging_interv_r10_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; +}; + +// MeasConfig ::= SEQUENCE +struct meas_cfg_s { + struct speed_state_pars_c_ { + struct setup_s_ { + // member variables + mob_state_params_s mob_state_params; + speed_state_scale_factors_s time_to_trigger_sf; + }; + typedef setup_e types; + + // choice methods + speed_state_pars_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "speedStatePars"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "speedStatePars"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + struct meas_scale_factor_r12_c_ { + typedef setup_e types; + + // choice methods + meas_scale_factor_r12_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_scale_factor_r12_e& setup() + { + assert_choice_type("setup", type_.to_string(), "measScaleFactor-r12"); + return c; + } + const meas_scale_factor_r12_e& setup() const + { + assert_choice_type("setup", type_.to_string(), "measScaleFactor-r12"); + return c; + } + + private: + types type_; + meas_scale_factor_r12_e c; + }; + struct height_thresh_ref_r15_c_ { + typedef setup_e types; + + // choice methods + height_thresh_ref_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& setup() + { + assert_choice_type("setup", type_.to_string(), "heightThreshRef-r15"); + return c; + } + const uint8_t& setup() const + { + assert_choice_type("setup", type_.to_string(), "heightThreshRef-r15"); + return c; + } + + private: + types type_; + uint8_t c; + }; + + // member variables + bool ext; + bool meas_obj_to_rem_list_present; + bool meas_obj_to_add_mod_list_present; + bool report_cfg_to_rem_list_present; + bool report_cfg_to_add_mod_list_present; + bool meas_id_to_rem_list_present; + bool meas_id_to_add_mod_list_present; + bool quant_cfg_present; + bool meas_gap_cfg_present; + bool s_measure_present; + bool pre_regist_info_hrpd_present; + bool speed_state_pars_present; + 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; + quant_cfg_s quant_cfg; + meas_gap_cfg_c meas_gap_cfg; + uint8_t s_measure; + pre_regist_info_hrpd_s pre_regist_info_hrpd; + speed_state_pars_c_ speed_state_pars; + // ... + // group 0 + bool meas_obj_to_add_mod_list_v9e0_present; + copy_ptr meas_obj_to_add_mod_list_v9e0; + // group 1 + bool allow_interruptions_r11_present; + bool allow_interruptions_r11; + // group 2 + bool meas_scale_factor_r12_present; + bool meas_id_to_rem_list_ext_r12_present; + bool meas_id_to_add_mod_list_ext_r12_present; + bool meas_rsrq_on_all_symbols_r12_present; + copy_ptr meas_scale_factor_r12; + copy_ptr meas_id_to_rem_list_ext_r12; + copy_ptr meas_id_to_add_mod_list_ext_r12; + bool meas_rsrq_on_all_symbols_r12; + // group 3 + bool meas_obj_to_rem_list_ext_r13_present; + bool meas_obj_to_add_mod_list_ext_r13_present; + bool meas_id_to_add_mod_list_v1310_present; + bool meas_id_to_add_mod_list_ext_v1310_present; + copy_ptr meas_obj_to_rem_list_ext_r13; + copy_ptr meas_obj_to_add_mod_list_ext_r13; + copy_ptr meas_id_to_add_mod_list_v1310; + copy_ptr meas_id_to_add_mod_list_ext_v1310; + // group 4 + bool meas_gap_cfg_per_cc_list_r14_present; + bool meas_gap_sharing_cfg_r14_present; + copy_ptr meas_gap_cfg_per_cc_list_r14; + copy_ptr meas_gap_sharing_cfg_r14; + // group 5 + bool fr1_gap_r15_present; + bool mgta_r15_present; + bool fr1_gap_r15; + bool mgta_r15; + // group 6 + bool meas_gap_cfg_dense_prs_r15_present; + bool height_thresh_ref_r15_present; + copy_ptr meas_gap_cfg_dense_prs_r15; + copy_ptr height_thresh_ref_r15; + + // sequence methods + meas_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityControlInfo ::= SEQUENCE +struct mob_ctrl_info_s { + struct t304_e_ { + enum options { ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, ms10000_v1310 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + t304_e_() {} + t304_e_(options v) : value(v) {} + t304_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct ho_without_wt_change_r14_e_ { + enum options { keep_lwa_cfg, send_end_marker }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ho_without_wt_change_r14_e_() {} + ho_without_wt_change_r14_e_(options v) : value(v) {} + ho_without_wt_change_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool carrier_freq_present; + bool carrier_bw_present; + bool add_spec_emission_present; + bool rach_cfg_ded_present; + uint16_t target_pci; + carrier_freq_eutra_s carrier_freq; + carrier_bw_eutra_s carrier_bw; + uint8_t add_spec_emission; + t304_e_ t304; + fixed_bitstring<16> new_ue_id; + rr_cfg_common_s rr_cfg_common; + rach_cfg_ded_s rach_cfg_ded; + // ... + // group 0 + bool carrier_freq_v9e0_present; + copy_ptr carrier_freq_v9e0; + // group 1 + bool drb_continue_rohc_r11_present; + // group 2 + bool mob_ctrl_info_v2x_r14_present; + bool ho_without_wt_change_r14_present; + bool make_before_break_r14_present; + bool rach_skip_r14_present; + bool same_sfn_ind_r14_present; + copy_ptr mob_ctrl_info_v2x_r14; + ho_without_wt_change_r14_e_ ho_without_wt_change_r14; + copy_ptr rach_skip_r14; + // group 3 + bool mib_repeat_status_r14_present; + bool sched_info_sib1_br_r14_present; + bool mib_repeat_status_r14; + uint8_t sched_info_sib1_br_r14; + + // sequence methods + mob_ctrl_info_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-v8a0-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + mob_from_eutra_cmd_v8d0_ies_s non_crit_ext; + + // sequence methods + mob_from_eutra_cmd_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-v930-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_v930_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + mob_from_eutra_cmd_v960_ies_s non_crit_ext; + + // sequence methods + mob_from_eutra_cmd_v930_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RN-SubframeConfig-r10 ::= SEQUENCE +struct rn_sf_cfg_r10_s { + struct sf_cfg_pattern_r10_c_ { + struct types { + enum options { sf_cfg_pattern_fdd_r10, sf_cfg_pattern_tdd_r10, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + sf_cfg_pattern_r10_c_() : type_(types::nulltype) {} + sf_cfg_pattern_r10_c_(const sf_cfg_pattern_r10_c_& other); + sf_cfg_pattern_r10_c_& operator=(const sf_cfg_pattern_r10_c_& other); + ~sf_cfg_pattern_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<8>& sf_cfg_pattern_fdd_r10() + { + assert_choice_type("subframeConfigPatternFDD-r10", type_.to_string(), "subframeConfigPattern-r10"); + return c.get >(); + } + uint8_t& sf_cfg_pattern_tdd_r10() + { + assert_choice_type("subframeConfigPatternTDD-r10", type_.to_string(), "subframeConfigPattern-r10"); + return c.get(); + } + const fixed_bitstring<8>& sf_cfg_pattern_fdd_r10() const + { + assert_choice_type("subframeConfigPatternFDD-r10", type_.to_string(), "subframeConfigPattern-r10"); + return c.get >(); + } + const uint8_t& sf_cfg_pattern_tdd_r10() const + { + assert_choice_type("subframeConfigPatternTDD-r10", type_.to_string(), "subframeConfigPattern-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct rpdcch_cfg_r10_s_ { + struct res_alloc_type_r10_e_ { + enum options { type0, type1, type2_localized, type2_distributed, spare4, spare3, spare2, spare1 }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + res_alloc_type_r10_e_() {} + res_alloc_type_r10_e_(options v) : value(v) {} + res_alloc_type_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct res_block_assign_r10_c_ { + struct type01_r10_c_ { + struct types { + enum options { nrb6_r10, nrb15_r10, nrb25_r10, nrb50_r10, nrb75_r10, nrb100_r10, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + type01_r10_c_() : type_(types::nulltype) {} + type01_r10_c_(const type01_r10_c_& other); + type01_r10_c_& operator=(const type01_r10_c_& other); + ~type01_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<6>& nrb6_r10() + { + assert_choice_type("nrb6-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + fixed_bitstring<8>& nrb15_r10() + { + assert_choice_type("nrb15-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + fixed_bitstring<13>& nrb25_r10() + { + assert_choice_type("nrb25-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + fixed_bitstring<17>& nrb50_r10() + { + assert_choice_type("nrb50-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + fixed_bitstring<19>& nrb75_r10() + { + assert_choice_type("nrb75-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + fixed_bitstring<25>& nrb100_r10() + { + assert_choice_type("nrb100-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + const fixed_bitstring<6>& nrb6_r10() const + { + assert_choice_type("nrb6-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + const fixed_bitstring<8>& nrb15_r10() const + { + assert_choice_type("nrb15-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + const fixed_bitstring<13>& nrb25_r10() const + { + assert_choice_type("nrb25-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + const fixed_bitstring<17>& nrb50_r10() const + { + assert_choice_type("nrb50-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + const fixed_bitstring<19>& nrb75_r10() const + { + assert_choice_type("nrb75-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + const fixed_bitstring<25>& nrb100_r10() const + { + assert_choice_type("nrb100-r10", type_.to_string(), "type01-r10"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct type2_r10_c_ { + struct types { + enum options { nrb6_r10, nrb15_r10, nrb25_r10, nrb50_r10, nrb75_r10, nrb100_r10, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + type2_r10_c_() : type_(types::nulltype) {} + type2_r10_c_(const type2_r10_c_& other); + type2_r10_c_& operator=(const type2_r10_c_& other); + ~type2_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<5>& nrb6_r10() + { + assert_choice_type("nrb6-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + fixed_bitstring<7>& nrb15_r10() + { + assert_choice_type("nrb15-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + fixed_bitstring<9>& nrb25_r10() + { + assert_choice_type("nrb25-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + fixed_bitstring<11>& nrb50_r10() + { + assert_choice_type("nrb50-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + fixed_bitstring<12>& nrb75_r10() + { + assert_choice_type("nrb75-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + fixed_bitstring<13>& nrb100_r10() + { + assert_choice_type("nrb100-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + const fixed_bitstring<5>& nrb6_r10() const + { + assert_choice_type("nrb6-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + const fixed_bitstring<7>& nrb15_r10() const + { + assert_choice_type("nrb15-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + const fixed_bitstring<9>& nrb25_r10() const + { + assert_choice_type("nrb25-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + const fixed_bitstring<11>& nrb50_r10() const + { + assert_choice_type("nrb50-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + const fixed_bitstring<12>& nrb75_r10() const + { + assert_choice_type("nrb75-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + const fixed_bitstring<13>& nrb100_r10() const + { + assert_choice_type("nrb100-r10", type_.to_string(), "type2-r10"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct types { + enum options { type01_r10, type2_r10, /*...*/ nulltype }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // choice methods + res_block_assign_r10_c_() : type_(types::nulltype) {} + res_block_assign_r10_c_(const res_block_assign_r10_c_& other); + res_block_assign_r10_c_& operator=(const res_block_assign_r10_c_& other); + ~res_block_assign_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + type01_r10_c_& type01_r10() + { + assert_choice_type("type01-r10", type_.to_string(), "resourceBlockAssignment-r10"); + return c.get(); + } + type2_r10_c_& type2_r10() + { + assert_choice_type("type2-r10", type_.to_string(), "resourceBlockAssignment-r10"); + return c.get(); + } + const type01_r10_c_& type01_r10() const + { + assert_choice_type("type01-r10", type_.to_string(), "resourceBlockAssignment-r10"); + return c.get(); + } + const type2_r10_c_& type2_r10() const + { + assert_choice_type("type2-r10", type_.to_string(), "resourceBlockAssignment-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct demod_rs_r10_c_ { + struct no_interleaving_r10_e_ { + enum options { crs, dmrs }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + no_interleaving_r10_e_() {} + no_interleaving_r10_e_(options v) : value(v) {} + no_interleaving_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct types { + enum options { interleaving_r10, no_interleaving_r10, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + demod_rs_r10_c_() : type_(types::nulltype) {} + demod_rs_r10_c_(const demod_rs_r10_c_& other); + demod_rs_r10_c_& operator=(const demod_rs_r10_c_& other); + ~demod_rs_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + no_interleaving_r10_e_& no_interleaving_r10() + { + assert_choice_type("noInterleaving-r10", type_.to_string(), "demodulationRS-r10"); + return c.get(); + } + const no_interleaving_r10_e_& no_interleaving_r10() const + { + assert_choice_type("noInterleaving-r10", type_.to_string(), "demodulationRS-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct pucch_cfg_r10_c_ { + struct tdd_c_ { + struct ch_sel_mux_bundling_s_ { + typedef bounded_array n1_pucch_an_list_r10_l_; + + // member variables + n1_pucch_an_list_r10_l_ n1_pucch_an_list_r10; + }; + struct fallback_for_format3_s_ { + // member variables + bool n1_pucch_an_p1_r10_present; + uint16_t n1_pucch_an_p0_r10; + uint16_t n1_pucch_an_p1_r10; + + // sequence methods + fallback_for_format3_s_(); + }; + struct types { + enum options { ch_sel_mux_bundling, fallback_for_format3, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + tdd_c_() : type_(types::nulltype) {} + tdd_c_(const tdd_c_& other); + tdd_c_& operator=(const tdd_c_& other); + ~tdd_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ch_sel_mux_bundling_s_& ch_sel_mux_bundling() + { + assert_choice_type("channelSelectionMultiplexingBundling", type_.to_string(), "tdd"); + return c.get(); + } + fallback_for_format3_s_& fallback_for_format3() + { + assert_choice_type("fallbackForFormat3", type_.to_string(), "tdd"); + return c.get(); + } + const ch_sel_mux_bundling_s_& ch_sel_mux_bundling() const + { + assert_choice_type("channelSelectionMultiplexingBundling", type_.to_string(), "tdd"); + return c.get(); + } + const fallback_for_format3_s_& fallback_for_format3() const + { + assert_choice_type("fallbackForFormat3", type_.to_string(), "tdd"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct fdd_s_ { + // member variables + bool n1_pucch_an_p1_r10_present; + uint16_t n1_pucch_an_p0_r10; + uint16_t n1_pucch_an_p1_r10; + + // sequence methods + fdd_s_(); + }; + struct types { + enum options { tdd, fdd, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pucch_cfg_r10_c_() : type_(types::nulltype) {} + pucch_cfg_r10_c_(const pucch_cfg_r10_c_& other); + pucch_cfg_r10_c_& operator=(const pucch_cfg_r10_c_& other); + ~pucch_cfg_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + tdd_c_& tdd() + { + assert_choice_type("tdd", type_.to_string(), "pucch-Config-r10"); + return c.get(); + } + fdd_s_& fdd() + { + assert_choice_type("fdd", type_.to_string(), "pucch-Config-r10"); + return c.get(); + } + const tdd_c_& tdd() const + { + assert_choice_type("tdd", type_.to_string(), "pucch-Config-r10"); + return c.get(); + } + const fdd_s_& fdd() const + { + assert_choice_type("fdd", type_.to_string(), "pucch-Config-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + res_alloc_type_r10_e_ res_alloc_type_r10; + res_block_assign_r10_c_ res_block_assign_r10; + demod_rs_r10_c_ demod_rs_r10; + uint8_t pdsch_start_r10; + pucch_cfg_r10_c_ pucch_cfg_r10; + // ... + + // sequence methods + rpdcch_cfg_r10_s_(); + }; + + // member variables + bool ext; + bool sf_cfg_pattern_r10_present; + bool rpdcch_cfg_r10_present; + sf_cfg_pattern_r10_c_ sf_cfg_pattern_r10; + rpdcch_cfg_r10_s_ rpdcch_cfg_r10; + // ... + + // sequence methods + rn_sf_cfg_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RN-SystemInfo-r10 ::= SEQUENCE +struct rn_sys_info_r10_s { + // member variables + bool ext; + bool sib_type1_r10_present; + bool sib_type2_r10_present; + dyn_octstring sib_type1_r10; + sib_type2_s sib_type2_r10; + // ... + + // sequence methods + rn_sys_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-v890-IEs ::= SEQUENCE +struct rrc_conn_recfg_v890_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_recfg_v920_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_v890_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-v890-IEs ::= SEQUENCE +struct rrc_conn_release_v890_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_release_v920_ies_s non_crit_ext; + + // sequence methods + rrc_conn_release_v890_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResume-v1430-IEs ::= SEQUENCE +struct rrc_conn_resume_v1430_ies_s { + // member variables + bool other_cfg_r14_present; + bool rrc_conn_resume_v1510_ies_present; + other_cfg_r9_s other_cfg_r14; + rrc_conn_resume_v1510_ies_s rrc_conn_resume_v1510_ies; + + // sequence methods + rrc_conn_resume_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RedirectedCarrierInfo ::= CHOICE +struct redirected_carrier_info_c { + struct types { + enum options { + eutra, + geran, + utra_fdd, + utra_tdd, + cdma2000_hrpd, + cdma2000_minus1x_rtt, + // ... + utra_tdd_r10, + nr_r15, + nulltype + }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 2; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + redirected_carrier_info_c() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& eutra() + { + assert_choice_type("eutra", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + carrier_freqs_geran_s& geran() + { + assert_choice_type("geran", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + uint16_t& utra_fdd() + { + assert_choice_type("utra-FDD", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + uint16_t& utra_tdd() + { + assert_choice_type("utra-TDD", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + carrier_freq_cdma2000_s& cdma2000_hrpd() + { + assert_choice_type("cdma2000-HRPD", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + carrier_freq_cdma2000_s& cdma2000_minus1x_rtt() + { + assert_choice_type("cdma2000-1xRTT", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + carrier_freq_list_utra_tdd_r10_l& utra_tdd_r10() + { + assert_choice_type("utra-TDD-r10", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + carrier_info_nr_r15_s& nr_r15() + { + assert_choice_type("nr-r15", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const uint16_t& eutra() const + { + assert_choice_type("eutra", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_freqs_geran_s& geran() const + { + assert_choice_type("geran", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const uint16_t& utra_fdd() const + { + assert_choice_type("utra-FDD", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const uint16_t& utra_tdd() const + { + assert_choice_type("utra-TDD", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_freq_cdma2000_s& cdma2000_hrpd() const + { + assert_choice_type("cdma2000-HRPD", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_freq_cdma2000_s& cdma2000_minus1x_rtt() const + { + assert_choice_type("cdma2000-1xRTT", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_freq_list_utra_tdd_r10_l& utra_tdd_r10() const + { + assert_choice_type("utra-TDD-r10", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_info_nr_r15_s& nr_r15() const + { + assert_choice_type("nr-r15", type_.to_string(), "RedirectedCarrierInfo"); + return c.get(); + } + +private: + types type_; + choice_buffer_t + c; + + void destroy_(); +}; + +// ReleaseCause ::= ENUMERATED +struct release_cause_e { + enum options { load_balancing_ta_urequired, other, cs_fallback_high_prio_v1020, rrc_suspend_v1320 }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + release_cause_e() {} + release_cause_e(options v) : value(v) {} + release_cause_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SecurityConfigHO ::= SEQUENCE +struct security_cfg_ho_s { + struct ho_type_c_ { + struct intra_lte_s_ { + // member variables + bool security_algorithm_cfg_present; + security_algorithm_cfg_s security_algorithm_cfg; + bool key_change_ind; + uint8_t next_hop_chaining_count; + + // sequence methods + intra_lte_s_(); + }; + struct inter_rat_s_ { + // member variables + security_algorithm_cfg_s security_algorithm_cfg; + fixed_octstring<6> nas_security_param_to_eutra; + }; + struct types { + enum options { intra_lte, inter_rat, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ho_type_c_() : type_(types::nulltype) {} + ho_type_c_(const ho_type_c_& other); + ho_type_c_& operator=(const ho_type_c_& other); + ~ho_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + intra_lte_s_& intra_lte() + { + assert_choice_type("intraLTE", type_.to_string(), "handoverType"); + return c.get(); + } + inter_rat_s_& inter_rat() + { + assert_choice_type("interRAT", type_.to_string(), "handoverType"); + return c.get(); + } + const intra_lte_s_& intra_lte() const + { + assert_choice_type("intraLTE", type_.to_string(), "handoverType"); + return c.get(); + } + const inter_rat_s_& inter_rat() const + { + assert_choice_type("interRAT", type_.to_string(), "handoverType"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + ho_type_c_ ho_type; + // ... + + // sequence methods + security_cfg_ho_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityConfigSMC ::= SEQUENCE +struct security_cfg_smc_s { + // member variables + bool ext; + security_algorithm_cfg_s security_algorithm_cfg; + // ... + + // sequence methods + security_cfg_smc_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeCommand-v8a0-IEs ::= SEQUENCE +struct security_mode_cmd_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + security_mode_cmd_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TraceReference-r10 ::= SEQUENCE +struct trace_ref_r10_s { + // member variables + plmn_id_s plmn_id_r10; + fixed_octstring<3> trace_id_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-CapabilityRequest ::= SEQUENCE (SIZE (1..maxRAT-Capabilities)) OF RAT-Type +typedef bounded_array ue_cap_request_l; + +// UECapabilityEnquiry-v8a0-IEs ::= SEQUENCE +struct ue_cap_enquiry_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_cap_enquiry_v1180_ies_s non_crit_ext; + + // sequence methods + ue_cap_enquiry_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-v930-IEs ::= SEQUENCE +struct ue_info_request_v930_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_info_request_v1020_ies_s non_crit_ext; + + // sequence methods + ue_info_request_v930_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSFBParametersResponseCDMA2000-r8-IEs ::= SEQUENCE +struct csfb_params_resp_cdma2000_r8_ies_s { + // member variables + bool non_crit_ext_present; + fixed_bitstring<32> rand; + dyn_octstring mob_params; + csfb_params_resp_cdma2000_v8a0_ies_s non_crit_ext; + + // sequence methods + csfb_params_resp_cdma2000_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheck-r8-IEs ::= SEQUENCE +struct counter_check_r8_ies_s { + // member variables + bool non_crit_ext_present; + drb_count_msb_info_list_l drb_count_msb_info_list; + counter_check_v8a0_ies_s non_crit_ext; + + // sequence methods + counter_check_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DLInformationTransfer-r15-IEs ::= SEQUENCE +struct dl_info_transfer_r15_ies_s { + struct ded_info_type_r15_c_ { + struct types { + enum options { ded_info_nas_r15, ded_info_cdma2000_minus1_xrtt_r15, ded_info_cdma2000_hrpd_r15, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ded_info_type_r15_c_() : type_(types::nulltype) {} + ded_info_type_r15_c_(const ded_info_type_r15_c_& other); + ded_info_type_r15_c_& operator=(const ded_info_type_r15_c_& other); + ~ded_info_type_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + dyn_octstring& ded_info_nas_r15() + { + assert_choice_type("dedicatedInfoNAS-r15", type_.to_string(), "dedicatedInfoType-r15"); + return c.get(); + } + dyn_octstring& ded_info_cdma2000_minus1_xrtt_r15() + { + assert_choice_type("dedicatedInfoCDMA2000-1XRTT-r15", type_.to_string(), "dedicatedInfoType-r15"); + return c.get(); + } + dyn_octstring& ded_info_cdma2000_hrpd_r15() + { + assert_choice_type("dedicatedInfoCDMA2000-HRPD-r15", type_.to_string(), "dedicatedInfoType-r15"); + return c.get(); + } + const dyn_octstring& ded_info_nas_r15() const + { + assert_choice_type("dedicatedInfoNAS-r15", type_.to_string(), "dedicatedInfoType-r15"); + return c.get(); + } + const dyn_octstring& ded_info_cdma2000_minus1_xrtt_r15() const + { + assert_choice_type("dedicatedInfoCDMA2000-1XRTT-r15", type_.to_string(), "dedicatedInfoType-r15"); + return c.get(); + } + const dyn_octstring& ded_info_cdma2000_hrpd_r15() const + { + assert_choice_type("dedicatedInfoCDMA2000-HRPD-r15", type_.to_string(), "dedicatedInfoType-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ded_info_type_r15_present; + bool time_ref_info_r15_present; + bool non_crit_ext_present; + ded_info_type_r15_c_ ded_info_type_r15; + time_ref_info_r15_s time_ref_info_r15; + dl_info_transfer_v8a0_ies_s non_crit_ext; + + // sequence methods + dl_info_transfer_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DLInformationTransfer-r8-IEs ::= SEQUENCE +struct dl_info_transfer_r8_ies_s { + struct ded_info_type_c_ { + struct types { + enum options { ded_info_nas, ded_info_cdma2000_minus1_xrtt, ded_info_cdma2000_hrpd, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ded_info_type_c_() : type_(types::nulltype) {} + ded_info_type_c_(const ded_info_type_c_& other); + ded_info_type_c_& operator=(const ded_info_type_c_& other); + ~ded_info_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + dyn_octstring& ded_info_nas() + { + assert_choice_type("dedicatedInfoNAS", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + dyn_octstring& ded_info_cdma2000_minus1_xrtt() + { + assert_choice_type("dedicatedInfoCDMA2000-1XRTT", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + dyn_octstring& ded_info_cdma2000_hrpd() + { + assert_choice_type("dedicatedInfoCDMA2000-HRPD", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + const dyn_octstring& ded_info_nas() const + { + assert_choice_type("dedicatedInfoNAS", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + const dyn_octstring& ded_info_cdma2000_minus1_xrtt() const + { + assert_choice_type("dedicatedInfoCDMA2000-1XRTT", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + const dyn_octstring& ded_info_cdma2000_hrpd() const + { + assert_choice_type("dedicatedInfoCDMA2000-HRPD", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool non_crit_ext_present; + ded_info_type_c_ ded_info_type; + dl_info_transfer_v8a0_ies_s non_crit_ext; + + // sequence methods + dl_info_transfer_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverFromEUTRAPreparationRequest-r8-IEs ::= SEQUENCE +struct ho_from_eutra_prep_request_r8_ies_s { + // member variables + bool rand_present; + bool mob_params_present; + bool non_crit_ext_present; + cdma2000_type_e cdma2000_type; + fixed_bitstring<32> rand; + dyn_octstring mob_params; + ho_from_eutra_prep_request_v890_ies_s non_crit_ext; + + // sequence methods + ho_from_eutra_prep_request_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-r10-IEs ::= SEQUENCE +struct logged_meas_cfg_r10_ies_s { + // member variables + bool area_cfg_r10_present; + bool non_crit_ext_present; + trace_ref_r10_s trace_ref_r10; + fixed_octstring<2> trace_recording_session_ref_r10; + fixed_octstring<1> tce_id_r10; + fixed_bitstring<48> absolute_time_info_r10; + area_cfg_r10_c area_cfg_r10; + logging_dur_r10_e logging_dur_r10; + logging_interv_r10_e logging_interv_r10; + logged_meas_cfg_v1080_ies_s non_crit_ext; + + // sequence methods + logged_meas_cfg_r10_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-r8-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_r8_ies_s { + struct purpose_c_ { + struct types { + enum options { ho, cell_change_order, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + purpose_c_() : type_(types::nulltype) {} + purpose_c_(const purpose_c_& other); + purpose_c_& operator=(const purpose_c_& other); + ~purpose_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ho_s& ho() + { + assert_choice_type("handover", type_.to_string(), "purpose"); + return c.get(); + } + cell_change_order_s& cell_change_order() + { + assert_choice_type("cellChangeOrder", type_.to_string(), "purpose"); + return c.get(); + } + const ho_s& ho() const + { + assert_choice_type("handover", type_.to_string(), "purpose"); + return c.get(); + } + const cell_change_order_s& cell_change_order() const + { + assert_choice_type("cellChangeOrder", type_.to_string(), "purpose"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool non_crit_ext_present; + bool cs_fallback_ind; + purpose_c_ purpose; + mob_from_eutra_cmd_v8a0_ies_s non_crit_ext; + + // sequence methods + mob_from_eutra_cmd_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand-r9-IEs ::= SEQUENCE +struct mob_from_eutra_cmd_r9_ies_s { + struct purpose_c_ { + struct types { + enum options { ho, cell_change_order, e_csfb_r9, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + purpose_c_() : type_(types::nulltype) {} + purpose_c_(const purpose_c_& other); + purpose_c_& operator=(const purpose_c_& other); + ~purpose_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ho_s& ho() + { + assert_choice_type("handover", type_.to_string(), "purpose"); + return c.get(); + } + cell_change_order_s& cell_change_order() + { + assert_choice_type("cellChangeOrder", type_.to_string(), "purpose"); + return c.get(); + } + e_csfb_r9_s& e_csfb_r9() + { + assert_choice_type("e-CSFB-r9", type_.to_string(), "purpose"); + return c.get(); + } + const ho_s& ho() const + { + assert_choice_type("handover", type_.to_string(), "purpose"); + return c.get(); + } + const cell_change_order_s& cell_change_order() const + { + assert_choice_type("cellChangeOrder", type_.to_string(), "purpose"); + return c.get(); + } + const e_csfb_r9_s& e_csfb_r9() const + { + assert_choice_type("e-CSFB-r9", type_.to_string(), "purpose"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool non_crit_ext_present; + bool cs_fallback_ind; + purpose_c_ purpose; + mob_from_eutra_cmd_v930_ies_s non_crit_ext; + + // sequence methods + mob_from_eutra_cmd_r9_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RNReconfiguration-r10-IEs ::= SEQUENCE +struct rn_recfg_r10_ies_s { + // member variables + bool rn_sys_info_r10_present; + bool rn_sf_cfg_r10_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + rn_sys_info_r10_s rn_sys_info_r10; + rn_sf_cfg_r10_s rn_sf_cfg_r10; + dyn_octstring late_non_crit_ext; + + // sequence methods + rn_recfg_r10_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration-r8-IEs ::= SEQUENCE +struct rrc_conn_recfg_r8_ies_s { + typedef bounded_array ded_info_nas_list_l_; + + // member variables + bool meas_cfg_present; + bool mob_ctrl_info_present; + bool ded_info_nas_list_present; + bool rr_cfg_ded_present; + bool security_cfg_ho_present; + bool non_crit_ext_present; + meas_cfg_s meas_cfg; + mob_ctrl_info_s mob_ctrl_info; + ded_info_nas_list_l_ ded_info_nas_list; + rr_cfg_ded_s rr_cfg_ded; + security_cfg_ho_s security_cfg_ho; + rrc_conn_recfg_v890_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease-r8-IEs ::= SEQUENCE +struct rrc_conn_release_r8_ies_s { + // member variables + bool redirected_carrier_info_present; + bool idle_mode_mob_ctrl_info_present; + bool non_crit_ext_present; + release_cause_e release_cause; + redirected_carrier_info_c redirected_carrier_info; + idle_mode_mob_ctrl_info_s idle_mode_mob_ctrl_info; + rrc_conn_release_v890_ies_s non_crit_ext; + + // sequence methods + rrc_conn_release_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResume-r13-IEs ::= SEQUENCE +struct rrc_conn_resume_r13_ies_s { + // member variables + bool rr_cfg_ded_r13_present; + bool meas_cfg_r13_present; + bool ant_info_ded_pcell_r13_present; + bool drb_continue_rohc_r13_present; + bool late_non_crit_ext_present; + bool rrc_conn_resume_v1430_ies_present; + rr_cfg_ded_s rr_cfg_ded_r13; + uint8_t next_hop_chaining_count_r13; + meas_cfg_s meas_cfg_r13; + ant_info_ded_v10i0_s ant_info_ded_pcell_r13; + dyn_octstring late_non_crit_ext; + rrc_conn_resume_v1430_ies_s rrc_conn_resume_v1430_ies; + + // sequence methods + rrc_conn_resume_r13_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeCommand-r8-IEs ::= SEQUENCE +struct security_mode_cmd_r8_ies_s { + // member variables + bool non_crit_ext_present; + security_cfg_smc_s security_cfg_smc; + security_mode_cmd_v8a0_ies_s non_crit_ext; + + // sequence methods + security_mode_cmd_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry-r8-IEs ::= SEQUENCE +struct ue_cap_enquiry_r8_ies_s { + // member variables + bool non_crit_ext_present; + ue_cap_request_l ue_cap_request; + ue_cap_enquiry_v8a0_ies_s non_crit_ext; + + // sequence methods + ue_cap_enquiry_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-r9-IEs ::= SEQUENCE +struct ue_info_request_r9_ies_s { + // member variables + bool non_crit_ext_present; + bool rach_report_req_r9; + bool rlf_report_req_r9; + ue_info_request_v930_ies_s non_crit_ext; + + // sequence methods + ue_info_request_r9_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSFBParametersResponseCDMA2000 ::= SEQUENCE +struct csfb_params_resp_cdma2000_s { + struct crit_exts_c_ { + struct types { + enum options { csfb_params_resp_cdma2000_r8, crit_exts_future, nulltype }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csfb_params_resp_cdma2000_r8_ies_s& csfb_params_resp_cdma2000_r8() + { + assert_choice_type("csfbParametersResponseCDMA2000-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const csfb_params_resp_cdma2000_r8_ies_s& csfb_params_resp_cdma2000_r8() const + { + assert_choice_type("csfbParametersResponseCDMA2000-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheck ::= SEQUENCE +struct counter_check_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { counter_check_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + counter_check_r8_ies_s& counter_check_r8() + { + assert_choice_type("counterCheck-r8", type_.to_string(), "c1"); + return c; + } + const counter_check_r8_ies_s& counter_check_r8() const + { + assert_choice_type("counterCheck-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + counter_check_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DLInformationTransfer ::= SEQUENCE +struct dl_info_transfer_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { dl_info_transfer_r8, dl_info_transfer_r15, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + dl_info_transfer_r8_ies_s& dl_info_transfer_r8() + { + assert_choice_type("dlInformationTransfer-r8", type_.to_string(), "c1"); + return c.get(); + } + dl_info_transfer_r15_ies_s& dl_info_transfer_r15() + { + assert_choice_type("dlInformationTransfer-r15", type_.to_string(), "c1"); + return c.get(); + } + const dl_info_transfer_r8_ies_s& dl_info_transfer_r8() const + { + assert_choice_type("dlInformationTransfer-r8", type_.to_string(), "c1"); + return c.get(); + } + const dl_info_transfer_r15_ies_s& dl_info_transfer_r15() const + { + assert_choice_type("dlInformationTransfer-r15", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverFromEUTRAPreparationRequest ::= SEQUENCE +struct ho_from_eutra_prep_request_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ho_from_eutra_prep_request_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ho_from_eutra_prep_request_r8_ies_s& ho_from_eutra_prep_request_r8() + { + assert_choice_type("handoverFromEUTRAPreparationRequest-r8", type_.to_string(), "c1"); + return c; + } + const ho_from_eutra_prep_request_r8_ies_s& ho_from_eutra_prep_request_r8() const + { + assert_choice_type("handoverFromEUTRAPreparationRequest-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ho_from_eutra_prep_request_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-r10 ::= SEQUENCE +struct logged_meas_cfg_r10_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { logged_meas_cfg_r10, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + logged_meas_cfg_r10_ies_s& logged_meas_cfg_r10() + { + assert_choice_type("loggedMeasurementConfiguration-r10", type_.to_string(), "c1"); + return c; + } + const logged_meas_cfg_r10_ies_s& logged_meas_cfg_r10() const + { + assert_choice_type("loggedMeasurementConfiguration-r10", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + logged_meas_cfg_r10_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromEUTRACommand ::= SEQUENCE +struct mob_from_eutra_cmd_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { mob_from_eutra_cmd_r8, mob_from_eutra_cmd_r9, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mob_from_eutra_cmd_r8_ies_s& mob_from_eutra_cmd_r8() + { + assert_choice_type("mobilityFromEUTRACommand-r8", type_.to_string(), "c1"); + return c.get(); + } + mob_from_eutra_cmd_r9_ies_s& mob_from_eutra_cmd_r9() + { + assert_choice_type("mobilityFromEUTRACommand-r9", type_.to_string(), "c1"); + return c.get(); + } + const mob_from_eutra_cmd_r8_ies_s& mob_from_eutra_cmd_r8() const + { + assert_choice_type("mobilityFromEUTRACommand-r8", type_.to_string(), "c1"); + return c.get(); + } + const mob_from_eutra_cmd_r9_ies_s& mob_from_eutra_cmd_r9() const + { + assert_choice_type("mobilityFromEUTRACommand-r9", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RNReconfiguration-r10 ::= SEQUENCE +struct rn_recfg_r10_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rn_recfg_r10, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rn_recfg_r10_ies_s& rn_recfg_r10() + { + assert_choice_type("rnReconfiguration-r10", type_.to_string(), "c1"); + return c; + } + const rn_recfg_r10_ies_s& rn_recfg_r10() const + { + assert_choice_type("rnReconfiguration-r10", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rn_recfg_r10_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfiguration ::= SEQUENCE +struct rrc_conn_recfg_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_recfg_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_recfg_r8_ies_s& rrc_conn_recfg_r8() + { + assert_choice_type("rrcConnectionReconfiguration-r8", type_.to_string(), "c1"); + return c; + } + const rrc_conn_recfg_r8_ies_s& rrc_conn_recfg_r8() const + { + assert_choice_type("rrcConnectionReconfiguration-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_recfg_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRelease ::= SEQUENCE +struct rrc_conn_release_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_release_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_release_r8_ies_s& rrc_conn_release_r8() + { + assert_choice_type("rrcConnectionRelease-r8", type_.to_string(), "c1"); + return c; + } + const rrc_conn_release_r8_ies_s& rrc_conn_release_r8() const + { + assert_choice_type("rrcConnectionRelease-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_release_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResume-r13 ::= SEQUENCE +struct rrc_conn_resume_r13_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_resume_r13, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_resume_r13_ies_s& rrc_conn_resume_r13() + { + assert_choice_type("rrcConnectionResume-r13", type_.to_string(), "c1"); + return c; + } + const rrc_conn_resume_r13_ies_s& rrc_conn_resume_r13() const + { + assert_choice_type("rrcConnectionResume-r13", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_resume_r13_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeCommand ::= SEQUENCE +struct security_mode_cmd_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { security_mode_cmd_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + security_mode_cmd_r8_ies_s& security_mode_cmd_r8() + { + assert_choice_type("securityModeCommand-r8", type_.to_string(), "c1"); + return c; + } + const security_mode_cmd_r8_ies_s& security_mode_cmd_r8() const + { + assert_choice_type("securityModeCommand-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + security_mode_cmd_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry ::= SEQUENCE +struct ue_cap_enquiry_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_cap_enquiry_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_cap_enquiry_r8_ies_s& ue_cap_enquiry_r8() + { + assert_choice_type("ueCapabilityEnquiry-r8", type_.to_string(), "c1"); + return c; + } + const ue_cap_enquiry_r8_ies_s& ue_cap_enquiry_r8() const + { + assert_choice_type("ueCapabilityEnquiry-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_cap_enquiry_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-r9 ::= SEQUENCE +struct ue_info_request_r9_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_info_request_r9, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_info_request_r9_ies_s& ue_info_request_r9() + { + assert_choice_type("ueInformationRequest-r9", type_.to_string(), "c1"); + return c; + } + const ue_info_request_r9_ies_s& ue_info_request_r9() const + { + assert_choice_type("ueInformationRequest-r9", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_info_request_r9_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-DCCH-MessageType ::= CHOICE +struct dl_dcch_msg_type_c { + struct c1_c_ { + struct types { + enum options { + csfb_params_resp_cdma2000, + dl_info_transfer, + ho_from_eutra_prep_request, + mob_from_eutra_cmd, + rrc_conn_recfg, + rrc_conn_release, + security_mode_cmd, + ue_cap_enquiry, + counter_check, + ue_info_request_r9, + logged_meas_cfg_r10, + rn_recfg_r10, + rrc_conn_resume_r13, + spare3, + spare2, + spare1, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csfb_params_resp_cdma2000_s& csfb_params_resp_cdma2000() + { + assert_choice_type("csfbParametersResponseCDMA2000", type_.to_string(), "c1"); + return c.get(); + } + dl_info_transfer_s& dl_info_transfer() + { + assert_choice_type("dlInformationTransfer", type_.to_string(), "c1"); + return c.get(); + } + ho_from_eutra_prep_request_s& ho_from_eutra_prep_request() + { + assert_choice_type("handoverFromEUTRAPreparationRequest", type_.to_string(), "c1"); + return c.get(); + } + mob_from_eutra_cmd_s& mob_from_eutra_cmd() + { + assert_choice_type("mobilityFromEUTRACommand", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_recfg_s& rrc_conn_recfg() + { + assert_choice_type("rrcConnectionReconfiguration", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_release_s& rrc_conn_release() + { + assert_choice_type("rrcConnectionRelease", type_.to_string(), "c1"); + return c.get(); + } + security_mode_cmd_s& security_mode_cmd() + { + assert_choice_type("securityModeCommand", type_.to_string(), "c1"); + return c.get(); + } + ue_cap_enquiry_s& ue_cap_enquiry() + { + assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "c1"); + return c.get(); + } + counter_check_s& counter_check() + { + assert_choice_type("counterCheck", type_.to_string(), "c1"); + return c.get(); + } + ue_info_request_r9_s& ue_info_request_r9() + { + assert_choice_type("ueInformationRequest-r9", type_.to_string(), "c1"); + return c.get(); + } + logged_meas_cfg_r10_s& logged_meas_cfg_r10() + { + assert_choice_type("loggedMeasurementConfiguration-r10", type_.to_string(), "c1"); + return c.get(); + } + rn_recfg_r10_s& rn_recfg_r10() + { + assert_choice_type("rnReconfiguration-r10", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_resume_r13_s& rrc_conn_resume_r13() + { + assert_choice_type("rrcConnectionResume-r13", type_.to_string(), "c1"); + return c.get(); + } + const csfb_params_resp_cdma2000_s& csfb_params_resp_cdma2000() const + { + assert_choice_type("csfbParametersResponseCDMA2000", type_.to_string(), "c1"); + return c.get(); + } + const dl_info_transfer_s& dl_info_transfer() const + { + assert_choice_type("dlInformationTransfer", type_.to_string(), "c1"); + return c.get(); + } + const ho_from_eutra_prep_request_s& ho_from_eutra_prep_request() const + { + assert_choice_type("handoverFromEUTRAPreparationRequest", type_.to_string(), "c1"); + return c.get(); + } + const mob_from_eutra_cmd_s& mob_from_eutra_cmd() const + { + assert_choice_type("mobilityFromEUTRACommand", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_recfg_s& rrc_conn_recfg() const + { + assert_choice_type("rrcConnectionReconfiguration", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_release_s& rrc_conn_release() const + { + assert_choice_type("rrcConnectionRelease", type_.to_string(), "c1"); + return c.get(); + } + const security_mode_cmd_s& security_mode_cmd() const + { + assert_choice_type("securityModeCommand", type_.to_string(), "c1"); + return c.get(); + } + const ue_cap_enquiry_s& ue_cap_enquiry() const + { + assert_choice_type("ueCapabilityEnquiry", type_.to_string(), "c1"); + return c.get(); + } + const counter_check_s& counter_check() const + { + assert_choice_type("counterCheck", type_.to_string(), "c1"); + return c.get(); + } + const ue_info_request_r9_s& ue_info_request_r9() const + { + assert_choice_type("ueInformationRequest-r9", type_.to_string(), "c1"); + return c.get(); + } + const logged_meas_cfg_r10_s& logged_meas_cfg_r10() const + { + assert_choice_type("loggedMeasurementConfiguration-r10", type_.to_string(), "c1"); + return c.get(); + } + const rn_recfg_r10_s& rn_recfg_r10() const + { + assert_choice_type("rnReconfiguration-r10", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_resume_r13_s& rrc_conn_resume_r13() const + { + assert_choice_type("rrcConnectionResume-r13", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + dl_dcch_msg_type_c() : type_(types::nulltype) {} + dl_dcch_msg_type_c(const dl_dcch_msg_type_c& other); + dl_dcch_msg_type_c& operator=(const dl_dcch_msg_type_c& other); + ~dl_dcch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "DL-DCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "DL-DCCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// DL-DCCH-Message ::= SEQUENCE +struct dl_dcch_msg_s { + // member variables + dl_dcch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TMGI-r9 ::= SEQUENCE +struct tmgi_r9_s { + struct plmn_id_r9_c_ { + struct types { + enum options { plmn_idx_r9, explicit_value_r9, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + plmn_id_r9_c_() : type_(types::nulltype) {} + plmn_id_r9_c_(const plmn_id_r9_c_& other); + plmn_id_r9_c_& operator=(const plmn_id_r9_c_& other); + ~plmn_id_r9_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& plmn_idx_r9() + { + assert_choice_type("plmn-Index-r9", type_.to_string(), "plmn-Id-r9"); + return c.get(); + } + plmn_id_s& explicit_value_r9() + { + assert_choice_type("explicitValue-r9", type_.to_string(), "plmn-Id-r9"); + return c.get(); + } + const uint8_t& plmn_idx_r9() const + { + assert_choice_type("plmn-Index-r9", type_.to_string(), "plmn-Id-r9"); + return c.get(); + } + const plmn_id_s& explicit_value_r9() const + { + assert_choice_type("explicitValue-r9", type_.to_string(), "plmn-Id-r9"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + plmn_id_r9_c_ plmn_id_r9; + fixed_octstring<3> service_id_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-SessionInfo-r9 ::= SEQUENCE +struct mbms_session_info_r9_s { + // member variables + bool ext; + bool session_id_r9_present; + tmgi_r9_s tmgi_r9; + fixed_octstring<1> session_id_r9; + uint8_t lc_ch_id_r9; + // ... + + // sequence methods + mbms_session_info_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-SessionInfoList-r9 ::= SEQUENCE (SIZE (0..maxSessionPerPMCH)) OF MBMS-SessionInfo-r9 +typedef dyn_array mbms_session_info_list_r9_l; + +// PMCH-Config-r12 ::= SEQUENCE +struct pmch_cfg_r12_s { + struct data_mcs_r12_c_ { + struct types { + enum options { normal_r12, higer_order_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + data_mcs_r12_c_() : type_(types::nulltype) {} + data_mcs_r12_c_(const data_mcs_r12_c_& other); + data_mcs_r12_c_& operator=(const data_mcs_r12_c_& other); + ~data_mcs_r12_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& normal_r12() + { + assert_choice_type("normal-r12", type_.to_string(), "dataMCS-r12"); + return c.get(); + } + uint8_t& higer_order_r12() + { + assert_choice_type("higerOrder-r12", type_.to_string(), "dataMCS-r12"); + return c.get(); + } + const uint8_t& normal_r12() const + { + assert_choice_type("normal-r12", type_.to_string(), "dataMCS-r12"); + return c.get(); + } + const uint8_t& higer_order_r12() const + { + assert_choice_type("higerOrder-r12", type_.to_string(), "dataMCS-r12"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct mch_sched_period_r12_e_ { + enum options { rf4, rf8, rf16, rf32, rf64, rf128, rf256, rf512, rf1024 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mch_sched_period_r12_e_() {} + mch_sched_period_r12_e_(options v) : value(v) {} + mch_sched_period_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct mch_sched_period_v1430_e_ { + enum options { rf1, rf2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mch_sched_period_v1430_e_() {} + mch_sched_period_v1430_e_(options v) : value(v) {} + mch_sched_period_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + uint16_t sf_alloc_end_r12; + data_mcs_r12_c_ data_mcs_r12; + mch_sched_period_r12_e_ mch_sched_period_r12; + // ... + // group 0 + bool mch_sched_period_v1430_present; + mch_sched_period_v1430_e_ mch_sched_period_v1430; + + // sequence methods + pmch_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CommonSF-AllocPatternList-r14 ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig-v1430 +typedef dyn_array common_sf_alloc_pattern_list_r14_l; + +// PMCH-InfoExt-r12 ::= SEQUENCE +struct pmch_info_ext_r12_s { + // member variables + bool ext; + pmch_cfg_r12_s pmch_cfg_r12; + mbms_session_info_list_r9_l mbms_session_info_list_r12; + // ... + + // sequence methods + pmch_info_ext_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSFNAreaConfiguration-v1430-IEs ::= SEQUENCE +struct mbsfn_area_cfg_v1430_ies_s { + // member variables + bool non_crit_ext_present; + common_sf_alloc_pattern_list_r14_l common_sf_alloc_r14; + + // sequence methods + mbsfn_area_cfg_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PMCH-Config-r9 ::= SEQUENCE +struct pmch_cfg_r9_s { + struct mch_sched_period_r9_e_ { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, rf1024 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mch_sched_period_r9_e_() {} + mch_sched_period_r9_e_(options v) : value(v) {} + mch_sched_period_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + uint16_t sf_alloc_end_r9; + uint8_t data_mcs_r9; + mch_sched_period_r9_e_ mch_sched_period_r9; + // ... + + // sequence methods + pmch_cfg_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PMCH-InfoListExt-r12 ::= SEQUENCE (SIZE (0..maxPMCH-PerMBSFN)) OF PMCH-InfoExt-r12 +typedef dyn_array pmch_info_list_ext_r12_l; + +// CountingRequestInfo-r10 ::= SEQUENCE +struct count_request_info_r10_s { + // member variables + bool ext; + tmgi_r9_s tmgi_r10; + // ... + + // sequence methods + count_request_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSFNAreaConfiguration-v1250-IEs ::= SEQUENCE +struct mbsfn_area_cfg_v1250_ies_s { + // member variables + bool pmch_info_list_ext_r12_present; + bool non_crit_ext_present; + pmch_info_list_ext_r12_l pmch_info_list_ext_r12; + mbsfn_area_cfg_v1430_ies_s non_crit_ext; + + // sequence methods + mbsfn_area_cfg_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PMCH-Info-r9 ::= SEQUENCE +struct pmch_info_r9_s { + // member variables + bool ext; + pmch_cfg_r9_s pmch_cfg_r9; + mbms_session_info_list_r9_l mbms_session_info_list_r9; + // ... + + // sequence methods + pmch_info_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CommonSF-AllocPatternList-r9 ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig +typedef dyn_array common_sf_alloc_pattern_list_r9_l; + +// CountingRequestList-r10 ::= SEQUENCE (SIZE (1..maxServiceCount)) OF CountingRequestInfo-r10 +typedef dyn_array count_request_list_r10_l; + +// MBSFNAreaConfiguration-v930-IEs ::= SEQUENCE +struct mbsfn_area_cfg_v930_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + mbsfn_area_cfg_v1250_ies_s non_crit_ext; + + // sequence methods + mbsfn_area_cfg_v930_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PMCH-InfoList-r9 ::= SEQUENCE (SIZE (0..maxPMCH-PerMBSFN)) OF PMCH-Info-r9 +typedef dyn_array pmch_info_list_r9_l; + +// MBMSCountingRequest-r10 ::= SEQUENCE +struct mbms_count_request_r10_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + count_request_list_r10_l count_request_list_r10; + dyn_octstring late_non_crit_ext; + + // sequence methods + mbms_count_request_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSFNAreaConfiguration-r9 ::= SEQUENCE +struct mbsfn_area_cfg_r9_s { + struct common_sf_alloc_period_r9_e_ { + enum options { rf4, rf8, rf16, rf32, rf64, rf128, rf256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + common_sf_alloc_period_r9_e_() {} + common_sf_alloc_period_r9_e_(options v) : value(v) {} + common_sf_alloc_period_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool non_crit_ext_present; + common_sf_alloc_pattern_list_r9_l common_sf_alloc_r9; + common_sf_alloc_period_r9_e_ common_sf_alloc_period_r9; + pmch_info_list_r9_l pmch_info_list_r9; + mbsfn_area_cfg_v930_ies_s non_crit_ext; + + // sequence methods + mbsfn_area_cfg_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MCCH-MessageType ::= CHOICE +struct mcch_msg_type_c { + struct c1_c_ { + struct types { + enum options { mbsfn_area_cfg_r9, nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mbsfn_area_cfg_r9_s& mbsfn_area_cfg_r9() + { + assert_choice_type("mbsfnAreaConfiguration-r9", type_.to_string(), "c1"); + return c; + } + const mbsfn_area_cfg_r9_s& mbsfn_area_cfg_r9() const + { + assert_choice_type("mbsfnAreaConfiguration-r9", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + mbsfn_area_cfg_r9_s c; + }; + struct later_c_ { + struct c2_c_ { + struct types { + enum options { mbms_count_request_r10, nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c2_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mbms_count_request_r10_s& mbms_count_request_r10() + { + assert_choice_type("mbmsCountingRequest-r10", type_.to_string(), "c2"); + return c; + } + const mbms_count_request_r10_s& mbms_count_request_r10() const + { + assert_choice_type("mbmsCountingRequest-r10", type_.to_string(), "c2"); + return c; + } + + private: + types type_; + mbms_count_request_r10_s c; + }; + struct types { + enum options { c2, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + later_c_() : type_(types::nulltype) {} + later_c_(const later_c_& other); + later_c_& operator=(const later_c_& other); + ~later_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c2_c_& c2() + { + assert_choice_type("c2", type_.to_string(), "later"); + return c.get(); + } + const c2_c_& c2() const + { + assert_choice_type("c2", type_.to_string(), "later"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, later, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + mcch_msg_type_c() : type_(types::nulltype) {} + mcch_msg_type_c(const mcch_msg_type_c& other); + mcch_msg_type_c& operator=(const mcch_msg_type_c& other); + ~mcch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "MCCH-MessageType"); + return c.get(); + } + later_c_& later() + { + assert_choice_type("later", type_.to_string(), "MCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "MCCH-MessageType"); + return c.get(); + } + const later_c_& later() const + { + assert_choice_type("later", type_.to_string(), "MCCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// MCCH-Message ::= SEQUENCE +struct mcch_msg_s { + // member variables + mcch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Paging-v1530-IEs ::= SEQUENCE +struct paging_v1530_ies_s { + // member variables + bool access_type_present; + bool non_crit_ext_present; + + // sequence methods + paging_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IMSI ::= SEQUENCE (SIZE (6..21)) OF INTEGER +typedef bounded_array imsi_l; + +// Paging-v1310-IEs ::= SEQUENCE +struct paging_v1310_ies_s { + // member variables + bool redist_ind_r13_present; + bool sys_info_mod_e_drx_r13_present; + bool non_crit_ext_present; + paging_v1530_ies_s non_crit_ext; + + // sequence methods + paging_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// S-TMSI ::= SEQUENCE +struct s_tmsi_s { + // member variables + fixed_bitstring<8> mmec; + fixed_bitstring<32> m_tmsi; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Paging-v1130-IEs ::= SEQUENCE +struct paging_v1130_ies_s { + // member variables + bool eab_param_mod_r11_present; + bool non_crit_ext_present; + paging_v1310_ies_s non_crit_ext; + + // sequence methods + paging_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PagingUE-Identity ::= CHOICE +struct paging_ue_id_c { + struct types { + enum options { s_tmsi, imsi, /*...*/ ng_minus5_g_s_tmsi_r15, i_rnti_r15, nulltype }; + typedef int8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 2; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int8_t to_number() const; + }; + + // choice methods + paging_ue_id_c() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + s_tmsi_s& s_tmsi() + { + assert_choice_type("s-TMSI", type_.to_string(), "PagingUE-Identity"); + return c.get(); + } + imsi_l& imsi() + { + assert_choice_type("imsi", type_.to_string(), "PagingUE-Identity"); + return c.get(); + } + fixed_bitstring<48>& ng_minus5_g_s_tmsi_r15() + { + assert_choice_type("ng-5G-S-TMSI-r15", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + fixed_bitstring<40>& i_rnti_r15() + { + assert_choice_type("i-RNTI-r15", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + const s_tmsi_s& s_tmsi() const + { + assert_choice_type("s-TMSI", type_.to_string(), "PagingUE-Identity"); + return c.get(); + } + const imsi_l& imsi() const + { + assert_choice_type("imsi", type_.to_string(), "PagingUE-Identity"); + return c.get(); + } + const fixed_bitstring<48>& ng_minus5_g_s_tmsi_r15() const + { + assert_choice_type("ng-5G-S-TMSI-r15", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + const fixed_bitstring<40>& i_rnti_r15() const + { + assert_choice_type("i-RNTI-r15", type_.to_string(), "PagingUE-Identity"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t), sizeof(imsi_l), sizeof(s_tmsi_s), 0)> c; + + void destroy_(); +}; + +// Paging-v920-IEs ::= SEQUENCE +struct paging_v920_ies_s { + // member variables + bool cmas_ind_r9_present; + bool non_crit_ext_present; + paging_v1130_ies_s non_crit_ext; + + // sequence methods + paging_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PagingRecord ::= SEQUENCE +struct paging_record_s { + struct cn_domain_e_ { + enum options { ps, cs }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cn_domain_e_() {} + cn_domain_e_(options v) : value(v) {} + cn_domain_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + paging_ue_id_c ue_id; + cn_domain_e_ cn_domain; + // ... + + // sequence methods + paging_record_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Paging-v890-IEs ::= SEQUENCE +struct paging_v890_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + paging_v920_ies_s non_crit_ext; + + // sequence methods + paging_v890_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PagingRecordList ::= SEQUENCE (SIZE (1..maxPageRec)) OF PagingRecord +typedef dyn_array paging_record_list_l; + +// Paging ::= SEQUENCE +struct paging_s { + // member variables + bool paging_record_list_present; + bool sys_info_mod_present; + bool etws_ind_present; + bool non_crit_ext_present; + paging_record_list_l paging_record_list; + paging_v890_ies_s non_crit_ext; + + // sequence methods + paging_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCCH-MessageType ::= CHOICE +struct pcch_msg_type_c { + struct c1_c_ { + struct types { + enum options { paging, nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + paging_s& paging() + { + assert_choice_type("paging", type_.to_string(), "c1"); + return c; + } + const paging_s& paging() const + { + assert_choice_type("paging", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + paging_s c; + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + pcch_msg_type_c() : type_(types::nulltype) {} + pcch_msg_type_c(const pcch_msg_type_c& other); + pcch_msg_type_c& operator=(const pcch_msg_type_c& other); + ~pcch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "PCCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// PCCH-Message ::= SEQUENCE +struct pcch_msg_s { + // member variables + pcch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMSSessionInfo-r13 ::= SEQUENCE +struct mbms_session_info_r13_s { + // member variables + bool session_id_r13_present; + tmgi_r9_s tmgi_r13; + fixed_octstring<1> session_id_r13; + + // sequence methods + mbms_session_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MTCH-SchedulingInfo-BR-r14 ::= SEQUENCE +struct sc_mtch_sched_info_br_r14_s { + struct on_dur_timer_scptm_r14_e_ { + enum options { psf300, psf400, psf500, psf600, psf800, psf1000, psf1200, psf1600 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + on_dur_timer_scptm_r14_e_() {} + on_dur_timer_scptm_r14_e_(options v) : value(v) {} + on_dur_timer_scptm_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_inactivity_timer_scptm_r14_e_ { + enum options { + psf0, + psf1, + psf2, + psf4, + psf8, + psf16, + psf32, + psf64, + psf128, + psf256, + ps512, + psf1024, + psf2048, + psf4096, + psf8192, + psf16384 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_inactivity_timer_scptm_r14_e_() {} + drx_inactivity_timer_scptm_r14_e_(options v) : value(v) {} + drx_inactivity_timer_scptm_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct sched_period_start_offset_scptm_r14_c_ { + struct types { + enum options { + sf10, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf256, + sf320, + sf512, + sf640, + sf1024, + sf2048, + sf4096, + sf8192, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + sched_period_start_offset_scptm_r14_c_() : type_(types::nulltype) {} + sched_period_start_offset_scptm_r14_c_(const sched_period_start_offset_scptm_r14_c_& other); + sched_period_start_offset_scptm_r14_c_& operator=(const sched_period_start_offset_scptm_r14_c_& other); + ~sched_period_start_offset_scptm_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf10() + { + assert_choice_type("sf10", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf20() + { + assert_choice_type("sf20", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf32() + { + assert_choice_type("sf32", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf40() + { + assert_choice_type("sf40", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf64() + { + assert_choice_type("sf64", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf80() + { + assert_choice_type("sf80", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf128() + { + assert_choice_type("sf128", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf160() + { + assert_choice_type("sf160", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint8_t& sf256() + { + assert_choice_type("sf256", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf320() + { + assert_choice_type("sf320", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf512() + { + assert_choice_type("sf512", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf640() + { + assert_choice_type("sf640", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf1024() + { + assert_choice_type("sf1024", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf2048() + { + assert_choice_type("sf2048", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf4096() + { + assert_choice_type("sf4096", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + uint16_t& sf8192() + { + assert_choice_type("sf8192", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf10() const + { + assert_choice_type("sf10", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf20() const + { + assert_choice_type("sf20", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf32() const + { + assert_choice_type("sf32", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf40() const + { + assert_choice_type("sf40", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf64() const + { + assert_choice_type("sf64", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf80() const + { + assert_choice_type("sf80", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf128() const + { + assert_choice_type("sf128", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf160() const + { + assert_choice_type("sf160", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint8_t& sf256() const + { + assert_choice_type("sf256", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf320() const + { + assert_choice_type("sf320", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf512() const + { + assert_choice_type("sf512", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf640() const + { + assert_choice_type("sf640", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf1024() const + { + assert_choice_type("sf1024", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf2048() const + { + assert_choice_type("sf2048", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf4096() const + { + assert_choice_type("sf4096", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + const uint16_t& sf8192() const + { + assert_choice_type("sf8192", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + on_dur_timer_scptm_r14_e_ on_dur_timer_scptm_r14; + drx_inactivity_timer_scptm_r14_e_ drx_inactivity_timer_scptm_r14; + sched_period_start_offset_scptm_r14_c_ sched_period_start_offset_scptm_r14; + // ... + + // sequence methods + sc_mtch_sched_info_br_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MTCH-SchedulingInfo-r13 ::= SEQUENCE +struct sc_mtch_sched_info_r13_s { + struct on_dur_timer_scptm_r13_e_ { + enum options { + psf1, + psf2, + psf3, + psf4, + psf5, + psf6, + psf8, + psf10, + psf20, + psf30, + psf40, + psf50, + psf60, + psf80, + psf100, + psf200 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + on_dur_timer_scptm_r13_e_() {} + on_dur_timer_scptm_r13_e_(options v) : value(v) {} + on_dur_timer_scptm_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct drx_inactivity_timer_scptm_r13_e_ { + enum options { + psf0, + psf1, + psf2, + psf4, + psf8, + psf10, + psf20, + psf40, + psf80, + psf160, + ps320, + psf640, + psf960, + psf1280, + psf1920, + psf2560 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_inactivity_timer_scptm_r13_e_() {} + drx_inactivity_timer_scptm_r13_e_(options v) : value(v) {} + drx_inactivity_timer_scptm_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct sched_period_start_offset_scptm_r13_c_ { + struct types { + enum options { + sf10, + sf20, + sf32, + sf40, + sf64, + sf80, + sf128, + sf160, + sf256, + sf320, + sf512, + sf640, + sf1024, + sf2048, + sf4096, + sf8192, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + sched_period_start_offset_scptm_r13_c_() : type_(types::nulltype) {} + sched_period_start_offset_scptm_r13_c_(const sched_period_start_offset_scptm_r13_c_& other); + sched_period_start_offset_scptm_r13_c_& operator=(const sched_period_start_offset_scptm_r13_c_& other); + ~sched_period_start_offset_scptm_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& sf10() + { + assert_choice_type("sf10", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf20() + { + assert_choice_type("sf20", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf32() + { + assert_choice_type("sf32", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf40() + { + assert_choice_type("sf40", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf64() + { + assert_choice_type("sf64", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf80() + { + assert_choice_type("sf80", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf128() + { + assert_choice_type("sf128", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf160() + { + assert_choice_type("sf160", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint8_t& sf256() + { + assert_choice_type("sf256", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf320() + { + assert_choice_type("sf320", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf512() + { + assert_choice_type("sf512", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf640() + { + assert_choice_type("sf640", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf1024() + { + assert_choice_type("sf1024", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf2048() + { + assert_choice_type("sf2048", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf4096() + { + assert_choice_type("sf4096", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + uint16_t& sf8192() + { + assert_choice_type("sf8192", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf10() const + { + assert_choice_type("sf10", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf20() const + { + assert_choice_type("sf20", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf32() const + { + assert_choice_type("sf32", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf40() const + { + assert_choice_type("sf40", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf64() const + { + assert_choice_type("sf64", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf80() const + { + assert_choice_type("sf80", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf128() const + { + assert_choice_type("sf128", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf160() const + { + assert_choice_type("sf160", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint8_t& sf256() const + { + assert_choice_type("sf256", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf320() const + { + assert_choice_type("sf320", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf512() const + { + assert_choice_type("sf512", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf640() const + { + assert_choice_type("sf640", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf1024() const + { + assert_choice_type("sf1024", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf2048() const + { + assert_choice_type("sf2048", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf4096() const + { + assert_choice_type("sf4096", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + const uint16_t& sf8192() const + { + assert_choice_type("sf8192", type_.to_string(), "schedulingPeriodStartOffsetSCPTM-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + on_dur_timer_scptm_r13_e_ on_dur_timer_scptm_r13; + drx_inactivity_timer_scptm_r13_e_ drx_inactivity_timer_scptm_r13; + sched_period_start_offset_scptm_r13_c_ sched_period_start_offset_scptm_r13; + // ... + + // sequence methods + sc_mtch_sched_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCI-ARFCN-r13 ::= SEQUENCE +struct pci_arfcn_r13_s { + // member variables + bool carrier_freq_r13_present; + uint16_t pci_r13; + uint32_t carrier_freq_r13; + + // sequence methods + pci_arfcn_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MTCH-Info-BR-r14 ::= SEQUENCE +struct sc_mtch_info_br_r14_s { + struct mpdcch_num_repeat_sc_mtch_r14_e_ { + enum options { r1, r2, r4, r8, r16, r32, r64, r128, r256 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 9, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_num_repeat_sc_mtch_r14_e_() {} + mpdcch_num_repeat_sc_mtch_r14_e_(options v) : value(v) {} + mpdcch_num_repeat_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct mpdcch_start_sf_sc_mtch_r14_c_ { + struct fdd_r14_e_ { + enum options { v1, v1dot5, v2, v2dot5, v4, v5, v8, v10 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fdd_r14_e_() {} + fdd_r14_e_(options v) : value(v) {} + fdd_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct tdd_r14_e_ { + enum options { v1, v2, v4, v5, v8, v10, v20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tdd_r14_e_() {} + tdd_r14_e_(options v) : value(v) {} + tdd_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct types { + enum options { fdd_r14, tdd_r14, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mpdcch_start_sf_sc_mtch_r14_c_() : type_(types::nulltype) {} + mpdcch_start_sf_sc_mtch_r14_c_(const mpdcch_start_sf_sc_mtch_r14_c_& other); + mpdcch_start_sf_sc_mtch_r14_c_& operator=(const mpdcch_start_sf_sc_mtch_r14_c_& other); + ~mpdcch_start_sf_sc_mtch_r14_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fdd_r14_e_& fdd_r14() + { + assert_choice_type("fdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MTCH-r14"); + return c.get(); + } + tdd_r14_e_& tdd_r14() + { + assert_choice_type("tdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MTCH-r14"); + return c.get(); + } + const fdd_r14_e_& fdd_r14() const + { + assert_choice_type("fdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MTCH-r14"); + return c.get(); + } + const tdd_r14_e_& tdd_r14() const + { + assert_choice_type("tdd-r14", type_.to_string(), "mpdcch-StartSF-SC-MTCH-r14"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_ { + enum options { on, off }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_() {} + mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_(options v) : value(v) {} + mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_ { + enum options { ce_mode_a, ce_mode_b }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_() {} + mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_(options v) : value(v) {} + mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct mpdcch_pdsch_max_bw_sc_mtch_r14_e_ { + enum options { bw1dot4, bw5 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_pdsch_max_bw_sc_mtch_r14_e_() {} + mpdcch_pdsch_max_bw_sc_mtch_r14_e_(options v) : value(v) {} + mpdcch_pdsch_max_bw_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct mpdcch_offset_sc_mtch_r14_e_ { + enum options { zero, one_eighth, one_quarter, three_eighth, one_half, five_eighth, three_quarter, seven_eighth }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mpdcch_offset_sc_mtch_r14_e_() {} + mpdcch_offset_sc_mtch_r14_e_(options v) : value(v) {} + mpdcch_offset_sc_mtch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct p_a_r14_e_ { + enum options { db_minus6, db_minus4dot77, db_minus3, db_minus1dot77, db0, db1, db2, db3 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + p_a_r14_e_() {} + p_a_r14_e_(options v) : value(v) {} + p_a_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool ext; + bool sc_mtch_sched_info_r14_present; + bool sc_mtch_neighbour_cell_r14_present; + bool p_a_r14_present; + uint32_t sc_mtch_carrier_freq_r14; + mbms_session_info_r13_s mbms_session_info_r14; + fixed_bitstring<16> g_rnti_r14; + sc_mtch_sched_info_br_r14_s sc_mtch_sched_info_r14; + fixed_bitstring<8> sc_mtch_neighbour_cell_r14; + uint8_t mpdcch_nb_sc_mtch_r14; + mpdcch_num_repeat_sc_mtch_r14_e_ mpdcch_num_repeat_sc_mtch_r14; + mpdcch_start_sf_sc_mtch_r14_c_ mpdcch_start_sf_sc_mtch_r14; + mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_ mpdcch_pdsch_hop_cfg_sc_mtch_r14; + mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_ mpdcch_pdsch_cemode_cfg_sc_mtch_r14; + mpdcch_pdsch_max_bw_sc_mtch_r14_e_ mpdcch_pdsch_max_bw_sc_mtch_r14; + mpdcch_offset_sc_mtch_r14_e_ mpdcch_offset_sc_mtch_r14; + p_a_r14_e_ p_a_r14; + // ... + + // sequence methods + sc_mtch_info_br_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MTCH-Info-r13 ::= SEQUENCE +struct sc_mtch_info_r13_s { + struct p_a_r13_e_ { + enum options { db_minus6, db_minus4dot77, db_minus3, db_minus1dot77, db0, db1, db2, db3 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + p_a_r13_e_() {} + p_a_r13_e_(options v) : value(v) {} + p_a_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool ext; + bool sc_mtch_sched_info_r13_present; + bool sc_mtch_neighbour_cell_r13_present; + mbms_session_info_r13_s mbms_session_info_r13; + fixed_bitstring<16> g_rnti_r13; + sc_mtch_sched_info_r13_s sc_mtch_sched_info_r13; + fixed_bitstring<8> sc_mtch_neighbour_cell_r13; + // ... + // group 0 + bool p_a_r13_present; + p_a_r13_e_ p_a_r13; + + // sequence methods + sc_mtch_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MTCH-InfoList-BR-r14 ::= SEQUENCE (SIZE (0..maxSC-MTCH-BR-r14)) OF SC-MTCH-Info-BR-r14 +typedef dyn_array sc_mtch_info_list_br_r14_l; + +// SC-MTCH-InfoList-r13 ::= SEQUENCE (SIZE (0..maxSC-MTCH-r13)) OF SC-MTCH-Info-r13 +typedef dyn_array sc_mtch_info_list_r13_l; + +// SCPTM-NeighbourCellList-r13 ::= SEQUENCE (SIZE (1..maxNeighCell-SCPTM-r13)) OF PCI-ARFCN-r13 +typedef dyn_array scptm_neighbour_cell_list_r13_l; + +// SCPTMConfiguration-v1340 ::= SEQUENCE +struct scptm_cfg_v1340_s { + // member variables + bool p_b_r13_present; + bool non_crit_ext_present; + uint8_t p_b_r13; + + // sequence methods + scptm_cfg_v1340_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCPTMConfiguration-BR-r14 ::= SEQUENCE +struct scptm_cfg_br_r14_s { + // member variables + bool scptm_neighbour_cell_list_r14_present; + bool p_b_r14_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + sc_mtch_info_list_br_r14_l sc_mtch_info_list_r14; + scptm_neighbour_cell_list_r13_l scptm_neighbour_cell_list_r14; + uint8_t p_b_r14; + dyn_octstring late_non_crit_ext; + + // sequence methods + scptm_cfg_br_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCPTMConfiguration-r13 ::= SEQUENCE +struct scptm_cfg_r13_s { + // member variables + bool scptm_neighbour_cell_list_r13_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + sc_mtch_info_list_r13_l sc_mtch_info_list_r13; + scptm_neighbour_cell_list_r13_l scptm_neighbour_cell_list_r13; + dyn_octstring late_non_crit_ext; + scptm_cfg_v1340_s non_crit_ext; + + // sequence methods + scptm_cfg_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SC-MCCH-MessageType-r13 ::= CHOICE +struct sc_mcch_msg_type_r13_c { + struct c1_c_ { + struct types { + enum options { scptm_cfg_r13, nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scptm_cfg_r13_s& scptm_cfg_r13() + { + assert_choice_type("scptmConfiguration-r13", type_.to_string(), "c1"); + return c; + } + const scptm_cfg_r13_s& scptm_cfg_r13() const + { + assert_choice_type("scptmConfiguration-r13", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + scptm_cfg_r13_s c; + }; + struct msg_class_ext_c_ { + struct c2_c_ { + struct types { + enum options { scptm_cfg_br_r14, spare, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c2_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scptm_cfg_br_r14_s& scptm_cfg_br_r14() + { + assert_choice_type("scptmConfiguration-BR-r14", type_.to_string(), "c2"); + return c; + } + const scptm_cfg_br_r14_s& scptm_cfg_br_r14() const + { + assert_choice_type("scptmConfiguration-BR-r14", type_.to_string(), "c2"); + return c; + } + + private: + types type_; + scptm_cfg_br_r14_s c; + }; + struct types { + enum options { c2, msg_class_ext_future_r14, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + msg_class_ext_c_() : type_(types::nulltype) {} + msg_class_ext_c_(const msg_class_ext_c_& other); + msg_class_ext_c_& operator=(const msg_class_ext_c_& other); + ~msg_class_ext_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c2_c_& c2() + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + const c2_c_& c2() const + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sc_mcch_msg_type_r13_c() : type_(types::nulltype) {} + sc_mcch_msg_type_r13_c(const sc_mcch_msg_type_r13_c& other); + sc_mcch_msg_type_r13_c& operator=(const sc_mcch_msg_type_r13_c& other); + ~sc_mcch_msg_type_r13_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "SC-MCCH-MessageType-r13"); + return c.get(); + } + msg_class_ext_c_& msg_class_ext() + { + assert_choice_type("messageClassExtension", type_.to_string(), "SC-MCCH-MessageType-r13"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "SC-MCCH-MessageType-r13"); + return c.get(); + } + const msg_class_ext_c_& msg_class_ext() const + { + assert_choice_type("messageClassExtension", type_.to_string(), "SC-MCCH-MessageType-r13"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// SC-MCCH-Message-r13 ::= SEQUENCE +struct sc_mcch_msg_r13_s { + // member variables + sc_mcch_msg_type_r13_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EstablishmentCause ::= ENUMERATED +struct establishment_cause_e { + enum options { + emergency, + high_prio_access, + mt_access, + mo_sig, + mo_data, + delay_tolerant_access_v1020, + mo_voice_call_v1280, + spare1 + }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + establishment_cause_e() {} + establishment_cause_e(options v) : value(v) {} + establishment_cause_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// InitialUE-Identity ::= CHOICE +struct init_ue_id_c { + struct types { + enum options { s_tmsi, random_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + init_ue_id_c() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + s_tmsi_s& s_tmsi() + { + assert_choice_type("s-TMSI", type_.to_string(), "InitialUE-Identity"); + return c.get(); + } + fixed_bitstring<40>& random_value() + { + assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity"); + return c.get >(); + } + const s_tmsi_s& s_tmsi() const + { + assert_choice_type("s-TMSI", type_.to_string(), "InitialUE-Identity"); + return c.get(); + } + const fixed_bitstring<40>& random_value() const + { + assert_choice_type("randomValue", type_.to_string(), "InitialUE-Identity"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t), sizeof(s_tmsi_s))> c; + + void destroy_(); +}; + +// ReestabUE-Identity ::= SEQUENCE +struct reestab_ue_id_s { + // member variables + fixed_bitstring<16> c_rnti; + uint16_t pci; + fixed_bitstring<16> short_mac_i; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReestablishmentCause ::= ENUMERATED +struct reest_cause_e { + enum options { recfg_fail, ho_fail, other_fail, spare1 }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + reest_cause_e() {} + reest_cause_e(options v) : value(v) {} + reest_cause_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// ResumeCause ::= ENUMERATED +struct resume_cause_e { + enum options { + emergency, + high_prio_access, + mt_access, + mo_sig, + mo_data, + delay_tolerant_access_v1020, + mo_voice_call_v1280, + spare1 + }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + resume_cause_e() {} + resume_cause_e(options v) : value(v) {} + resume_cause_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// ResumeCause-r15 ::= ENUMERATED +struct resume_cause_r15_e { + enum options { emergency, high_prio_access, mt_access, mo_sig, mo_data, rna_update, mo_voice_call, spare1 }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + resume_cause_r15_e() {} + resume_cause_r15_e(options v) : value(v) {} + resume_cause_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// RRCConnectionReestablishmentRequest-r8-IEs ::= SEQUENCE +struct rrc_conn_reest_request_r8_ies_s { + // member variables + reestab_ue_id_s ue_id; + reest_cause_e reest_cause; + fixed_bitstring<2> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRequest-r8-IEs ::= SEQUENCE +struct rrc_conn_request_r8_ies_s { + // member variables + 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(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResumeRequest-5GC-r15-IEs ::= SEQUENCE +struct rrc_conn_resume_request_minus5_gc_r15_ies_s { + struct resume_id_r15_c_ { + struct types { + enum options { full_i_rnti_r15, short_i_rnti_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + resume_id_r15_c_() : type_(types::nulltype) {} + resume_id_r15_c_(const resume_id_r15_c_& other); + resume_id_r15_c_& operator=(const resume_id_r15_c_& other); + ~resume_id_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<40>& full_i_rnti_r15() + { + assert_choice_type("fullI-RNTI-r15", type_.to_string(), "resumeIdentity-r15"); + return c.get >(); + } + fixed_bitstring<24>& short_i_rnti_r15() + { + assert_choice_type("shortI-RNTI-r15", type_.to_string(), "resumeIdentity-r15"); + return c.get >(); + } + const fixed_bitstring<40>& full_i_rnti_r15() const + { + assert_choice_type("fullI-RNTI-r15", type_.to_string(), "resumeIdentity-r15"); + return c.get >(); + } + const fixed_bitstring<24>& short_i_rnti_r15() const + { + assert_choice_type("shortI-RNTI-r15", type_.to_string(), "resumeIdentity-r15"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + resume_id_r15_c_ resume_id_r15; + fixed_bitstring<16> short_resume_mac_i_r15; + resume_cause_r15_e resume_cause_r15; + fixed_bitstring<1> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResumeRequest-r13-IEs ::= SEQUENCE +struct rrc_conn_resume_request_r13_ies_s { + struct resume_id_r13_c_ { + struct types { + enum options { resume_id_r13, truncated_resume_id_r13, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + resume_id_r13_c_() : type_(types::nulltype) {} + resume_id_r13_c_(const resume_id_r13_c_& other); + resume_id_r13_c_& operator=(const resume_id_r13_c_& other); + ~resume_id_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<40>& resume_id_r13() + { + assert_choice_type("resumeID-r13", type_.to_string(), "resumeIdentity-r13"); + return c.get >(); + } + fixed_bitstring<24>& truncated_resume_id_r13() + { + assert_choice_type("truncatedResumeID-r13", type_.to_string(), "resumeIdentity-r13"); + return c.get >(); + } + const fixed_bitstring<40>& resume_id_r13() const + { + assert_choice_type("resumeID-r13", type_.to_string(), "resumeIdentity-r13"); + return c.get >(); + } + const fixed_bitstring<24>& truncated_resume_id_r13() const + { + assert_choice_type("truncatedResumeID-r13", type_.to_string(), "resumeIdentity-r13"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + resume_id_r13_c_ resume_id_r13; + fixed_bitstring<16> short_resume_mac_i_r13; + resume_cause_e resume_cause_r13; + fixed_bitstring<1> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCEarlyDataRequest-r15-IEs ::= SEQUENCE +struct rrc_early_data_request_r15_ies_s { + struct establishment_cause_r15_e_ { + enum options { mo_data_r15, delay_tolerant_access_r15 }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + establishment_cause_r15_e_() {} + establishment_cause_r15_e_(options v) : value(v) {} + establishment_cause_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool non_crit_ext_present; + s_tmsi_s s_tmsi_r15; + establishment_cause_r15_e_ establishment_cause_r15; + dyn_octstring ded_info_nas_r15; + + // sequence methods + rrc_early_data_request_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentRequest ::= SEQUENCE +struct rrc_conn_reest_request_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_reest_request_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8() + { + assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_reest_request_r8_ies_s& rrc_conn_reest_request_r8() const + { + assert_choice_type("rrcConnectionReestablishmentRequest-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionRequest ::= SEQUENCE +struct rrc_conn_request_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_request_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_request_r8_ies_s& rrc_conn_request_r8() + { + assert_choice_type("rrcConnectionRequest-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_request_r8_ies_s& rrc_conn_request_r8() const + { + assert_choice_type("rrcConnectionRequest-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResumeRequest-r13 ::= SEQUENCE +struct rrc_conn_resume_request_r13_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_resume_request_r13, rrc_conn_resume_request_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_resume_request_r13_ies_s& rrc_conn_resume_request_r13() + { + assert_choice_type("rrcConnectionResumeRequest-r13", type_.to_string(), "criticalExtensions"); + return c.get(); + } + rrc_conn_resume_request_minus5_gc_r15_ies_s& rrc_conn_resume_request_r15() + { + assert_choice_type("rrcConnectionResumeRequest-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_resume_request_r13_ies_s& rrc_conn_resume_request_r13() const + { + assert_choice_type("rrcConnectionResumeRequest-r13", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_resume_request_minus5_gc_r15_ies_s& rrc_conn_resume_request_r15() const + { + assert_choice_type("rrcConnectionResumeRequest-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCEarlyDataRequest-r15 ::= SEQUENCE +struct rrc_early_data_request_r15_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_early_data_request_r15, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15() + { + assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_early_data_request_r15_ies_s& rrc_early_data_request_r15() const + { + assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-CCCH-MessageType ::= CHOICE +struct ul_ccch_msg_type_c { + struct c1_c_ { + struct types { + enum options { rrc_conn_reest_request, rrc_conn_request, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reest_request_s& rrc_conn_reest_request() + { + assert_choice_type("rrcConnectionReestablishmentRequest", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_request_s& rrc_conn_request() + { + assert_choice_type("rrcConnectionRequest", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_reest_request_s& rrc_conn_reest_request() const + { + assert_choice_type("rrcConnectionReestablishmentRequest", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_request_s& rrc_conn_request() const + { + assert_choice_type("rrcConnectionRequest", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct msg_class_ext_c_ { + struct c2_c_ { + struct types { + enum options { rrc_conn_resume_request_r13, nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c2_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_resume_request_r13_s& rrc_conn_resume_request_r13() + { + assert_choice_type("rrcConnectionResumeRequest-r13", type_.to_string(), "c2"); + return c; + } + const rrc_conn_resume_request_r13_s& rrc_conn_resume_request_r13() const + { + assert_choice_type("rrcConnectionResumeRequest-r13", type_.to_string(), "c2"); + return c; + } + + private: + types type_; + rrc_conn_resume_request_r13_s c; + }; + struct msg_class_ext_future_r13_c_ { + struct c3_c_ { + struct types { + enum options { rrc_early_data_request_r15, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c3_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_early_data_request_r15_s& rrc_early_data_request_r15() + { + assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "c3"); + return c; + } + const rrc_early_data_request_r15_s& rrc_early_data_request_r15() const + { + assert_choice_type("rrcEarlyDataRequest-r15", type_.to_string(), "c3"); + return c; + } + + private: + types type_; + rrc_early_data_request_r15_s c; + }; + struct types { + enum options { c3, msg_class_ext_future_r15, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + msg_class_ext_future_r13_c_() : type_(types::nulltype) {} + msg_class_ext_future_r13_c_(const msg_class_ext_future_r13_c_& other); + msg_class_ext_future_r13_c_& operator=(const msg_class_ext_future_r13_c_& other); + ~msg_class_ext_future_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c3_c_& c3() + { + assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13"); + return c.get(); + } + const c3_c_& c3() const + { + assert_choice_type("c3", type_.to_string(), "messageClassExtensionFuture-r13"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c2, msg_class_ext_future_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + msg_class_ext_c_() : type_(types::nulltype) {} + msg_class_ext_c_(const msg_class_ext_c_& other); + msg_class_ext_c_& operator=(const msg_class_ext_c_& other); + ~msg_class_ext_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c2_c_& c2() + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + msg_class_ext_future_r13_c_& msg_class_ext_future_r13() + { + assert_choice_type("messageClassExtensionFuture-r13", type_.to_string(), "messageClassExtension"); + return c.get(); + } + const c2_c_& c2() const + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + const msg_class_ext_future_r13_c_& msg_class_ext_future_r13() const + { + assert_choice_type("messageClassExtensionFuture-r13", type_.to_string(), "messageClassExtension"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + ul_ccch_msg_type_c() : type_(types::nulltype) {} + ul_ccch_msg_type_c(const ul_ccch_msg_type_c& other); + ul_ccch_msg_type_c& operator=(const ul_ccch_msg_type_c& other); + ~ul_ccch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType"); + return c.get(); + } + msg_class_ext_c_& msg_class_ext() + { + assert_choice_type("messageClassExtension", type_.to_string(), "UL-CCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "UL-CCCH-MessageType"); + return c.get(); + } + const msg_class_ext_c_& msg_class_ext() const + { + assert_choice_type("messageClassExtension", type_.to_string(), "UL-CCCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// UL-CCCH-Message ::= SEQUENCE +struct ul_ccch_msg_s { + // member variables + ul_ccch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGlobalIdCDMA2000 ::= CHOICE +struct cell_global_id_cdma2000_c { + struct types { + enum options { cell_global_id1_xrtt, cell_global_id_hrpd, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + cell_global_id_cdma2000_c() : type_(types::nulltype) {} + cell_global_id_cdma2000_c(const cell_global_id_cdma2000_c& other); + cell_global_id_cdma2000_c& operator=(const cell_global_id_cdma2000_c& other); + ~cell_global_id_cdma2000_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<47>& cell_global_id1_xrtt() + { + assert_choice_type("cellGlobalId1XRTT", type_.to_string(), "CellGlobalIdCDMA2000"); + return c.get >(); + } + fixed_bitstring<128>& cell_global_id_hrpd() + { + assert_choice_type("cellGlobalIdHRPD", type_.to_string(), "CellGlobalIdCDMA2000"); + return c.get >(); + } + const fixed_bitstring<47>& cell_global_id1_xrtt() const + { + assert_choice_type("cellGlobalId1XRTT", type_.to_string(), "CellGlobalIdCDMA2000"); + return c.get >(); + } + const fixed_bitstring<128>& cell_global_id_hrpd() const + { + assert_choice_type("cellGlobalIdHRPD", type_.to_string(), "CellGlobalIdCDMA2000"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t)> c; + + void destroy_(); +}; + +// AdditionalSI-Info-r9 ::= SEQUENCE +struct add_si_info_r9_s { + // member variables + bool csg_member_status_r9_present; + bool csg_id_r9_present; + fixed_bitstring<27> csg_id_r9; + + // sequence methods + add_si_info_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BLER-Result-r12 ::= SEQUENCE +struct bler_result_r12_s { + struct blocks_rx_r12_s_ { + // member variables + fixed_bitstring<3> n_r12; + fixed_bitstring<8> m_r12; + }; + + // member variables + uint8_t bler_r12; + blocks_rx_r12_s_ blocks_rx_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGlobalIdUTRA ::= SEQUENCE +struct cell_global_id_utra_s { + // member variables + plmn_id_s plmn_id; + fixed_bitstring<28> cell_id; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCDMA2000 ::= SEQUENCE +struct meas_result_cdma2000_s { + struct meas_result_s_ { + // member variables + bool ext; + bool pilot_pn_phase_present; + uint16_t pilot_pn_phase; + uint8_t pilot_strength; + // ... + + // sequence methods + meas_result_s_(); + }; + + // member variables + bool cgi_info_present; + uint16_t pci; + cell_global_id_cdma2000_c cgi_info; + meas_result_s_ meas_result; + + // sequence methods + meas_result_cdma2000_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList2 ::= SEQUENCE (SIZE (1..5)) OF PLMN-Identity +typedef dyn_array plmn_id_list2_l; + +// CellGlobalIdGERAN ::= SEQUENCE +struct cell_global_id_geran_s { + // member variables + plmn_id_s plmn_id; + fixed_bitstring<16> location_area_code; + fixed_bitstring<16> cell_id; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DataBLER-MCH-Result-r12 ::= SEQUENCE +struct data_bler_mch_result_r12_s { + // member variables + uint8_t mch_idx_r12; + bler_result_r12_s data_bler_result_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultEUTRA ::= SEQUENCE +struct meas_result_eutra_s { + struct cgi_info_s_ { + // member variables + bool plmn_id_list_present; + cell_global_id_eutra_s cell_global_id; + fixed_bitstring<16> tac; + plmn_id_list2_l plmn_id_list; + + // sequence methods + cgi_info_s_(); + }; + struct meas_result_s_ { + struct cgi_info_v1310_s_ { + // member variables + bool freq_band_ind_r13_present; + bool multi_band_info_list_r13_present; + bool freq_band_ind_prio_r13_present; + uint16_t freq_band_ind_r13; + multi_band_info_list_r11_l multi_band_info_list_r13; + + // sequence methods + cgi_info_v1310_s_(); + }; + typedef dyn_array cgi_info_minus5_gc_r15_l_; + + // member variables + bool ext; + bool rsrp_result_present; + bool rsrq_result_present; + uint8_t rsrp_result; + uint8_t rsrq_result; + // ... + // group 0 + bool add_si_info_r9_present; + copy_ptr add_si_info_r9; + // group 1 + bool primary_plmn_suitable_r12_present; + bool meas_result_v1250_present; + int8_t meas_result_v1250; + // group 2 + bool rs_sinr_result_r13_present; + bool cgi_info_v1310_present; + uint8_t rs_sinr_result_r13; + copy_ptr cgi_info_v1310; + // group 3 + bool meas_result_v1360_present; + int8_t meas_result_v1360; + // group 4 + bool cgi_info_minus5_gc_r15_present; + copy_ptr cgi_info_minus5_gc_r15; + + // sequence methods + meas_result_s_(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + }; + + // member variables + bool cgi_info_present; + uint16_t pci; + cgi_info_s_ cgi_info; + meas_result_s_ meas_result; + + // sequence methods + meas_result_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultIdleEUTRA-r15 ::= SEQUENCE +struct meas_result_idle_eutra_r15_s { + struct meas_result_r15_s_ { + // member variables + uint8_t rsrp_result_r15; + int8_t rsrq_result_r15; + }; + + // member variables + bool ext; + uint32_t carrier_freq_r15; + uint16_t pci_r15; + meas_result_r15_s_ meas_result_r15; + // ... + + // sequence methods + meas_result_idle_eutra_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultListCDMA2000 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultCDMA2000 +typedef dyn_array meas_result_list_cdma2000_l; + +// MeasResultUTRA ::= SEQUENCE +struct meas_result_utra_s { + struct pci_c_ { + struct types { + enum options { fdd, tdd, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pci_c_() : type_(types::nulltype) {} + pci_c_(const pci_c_& other); + pci_c_& operator=(const pci_c_& other); + ~pci_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& fdd() + { + assert_choice_type("fdd", type_.to_string(), "physCellId"); + return c.get(); + } + uint8_t& tdd() + { + assert_choice_type("tdd", type_.to_string(), "physCellId"); + return c.get(); + } + const uint16_t& fdd() const + { + assert_choice_type("fdd", type_.to_string(), "physCellId"); + return c.get(); + } + const uint8_t& tdd() const + { + assert_choice_type("tdd", type_.to_string(), "physCellId"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct cgi_info_s_ { + // member variables + bool location_area_code_present; + bool routing_area_code_present; + bool plmn_id_list_present; + cell_global_id_utra_s cell_global_id; + fixed_bitstring<16> location_area_code; + fixed_bitstring<8> routing_area_code; + plmn_id_list2_l plmn_id_list; + + // sequence methods + cgi_info_s_(); + }; + struct meas_result_s_ { + // member variables + bool ext; + bool utra_rscp_present; + bool utra_ec_n0_present; + int8_t utra_rscp; + uint8_t utra_ec_n0; + // ... + // group 0 + bool add_si_info_r9_present; + copy_ptr add_si_info_r9; + // group 1 + bool primary_plmn_suitable_r12_present; + + // sequence methods + meas_result_s_(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + }; + + // member variables + bool cgi_info_present; + pci_c_ pci; + cgi_info_s_ cgi_info; + meas_result_s_ meas_result; + + // sequence methods + meas_result_utra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityListNR-r15 ::= SEQUENCE (SIZE (1.. maxPLMN-NR-r15)) OF PLMN-Identity +typedef dyn_array plmn_id_list_nr_r15_l; + +// RegisteredAMF-r15 ::= SEQUENCE +struct registered_amf_r15_s { + // member variables + bool plmn_id_r15_present; + plmn_id_s plmn_id_r15; + fixed_bitstring<24> amf_id_r15; + + // sequence methods + registered_amf_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// S-NSSAI-r15 ::= CHOICE +struct s_nssai_r15_c { + struct types { + enum options { sst, sst_sd, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + s_nssai_r15_c() : type_(types::nulltype) {} + s_nssai_r15_c(const s_nssai_r15_c& other); + s_nssai_r15_c& operator=(const s_nssai_r15_c& other); + ~s_nssai_r15_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<8>& sst() + { + assert_choice_type("sst", type_.to_string(), "S-NSSAI-r15"); + return c.get >(); + } + fixed_bitstring<32>& sst_sd() + { + assert_choice_type("sst-SD", type_.to_string(), "S-NSSAI-r15"); + return c.get >(); + } + const fixed_bitstring<8>& sst() const + { + assert_choice_type("sst", type_.to_string(), "S-NSSAI-r15"); + return c.get >(); + } + const fixed_bitstring<32>& sst_sd() const + { + assert_choice_type("sst-SD", type_.to_string(), "S-NSSAI-r15"); + return c.get >(); + } + +private: + types type_; + choice_buffer_t)> c; + + void destroy_(); +}; + +// DataBLER-MCH-ResultList-r12 ::= SEQUENCE (SIZE (1.. maxPMCH-PerMBSFN)) OF DataBLER-MCH-Result-r12 +typedef dyn_array data_bler_mch_result_list_r12_l; + +// LocationInfo-r10 ::= SEQUENCE +struct location_info_r10_s { + struct location_coordinates_r10_c_ { + struct types { + enum options { + ellipsoid_point_r10, + ellipsoid_point_with_altitude_r10, + // ... + ellipsoid_point_with_uncertainty_circle_r11, + ellipsoid_point_with_uncertainty_ellipse_r11, + ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11, + ellipsoid_arc_r11, + polygon_r11, + nulltype + }; + + options value; + static const uint32_t nof_types = 7, nof_exts = 5; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + location_coordinates_r10_c_() : type_(types::nulltype) {} + location_coordinates_r10_c_(const location_coordinates_r10_c_& other); + location_coordinates_r10_c_& operator=(const location_coordinates_r10_c_& other); + ~location_coordinates_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + dyn_octstring& ellipsoid_point_r10() + { + assert_choice_type("ellipsoid-Point-r10", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + dyn_octstring& ellipsoid_point_with_altitude_r10() + { + assert_choice_type("ellipsoidPointWithAltitude-r10", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + dyn_octstring& ellipsoid_point_with_uncertainty_circle_r11() + { + assert_choice_type("ellipsoidPointWithUncertaintyCircle-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + dyn_octstring& ellipsoid_point_with_uncertainty_ellipse_r11() + { + assert_choice_type("ellipsoidPointWithUncertaintyEllipse-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + dyn_octstring& ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11() + { + assert_choice_type("ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11", type_.to_string(), + "locationCoordinates-r10"); + return c.get(); + } + dyn_octstring& ellipsoid_arc_r11() + { + assert_choice_type("ellipsoidArc-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + dyn_octstring& polygon_r11() + { + assert_choice_type("polygon-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& ellipsoid_point_r10() const + { + assert_choice_type("ellipsoid-Point-r10", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& ellipsoid_point_with_altitude_r10() const + { + assert_choice_type("ellipsoidPointWithAltitude-r10", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& ellipsoid_point_with_uncertainty_circle_r11() const + { + assert_choice_type("ellipsoidPointWithUncertaintyCircle-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& ellipsoid_point_with_uncertainty_ellipse_r11() const + { + assert_choice_type("ellipsoidPointWithUncertaintyEllipse-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11() const + { + assert_choice_type("ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11", type_.to_string(), + "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& ellipsoid_arc_r11() const + { + assert_choice_type("ellipsoidArc-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + const dyn_octstring& polygon_r11() const + { + assert_choice_type("polygon-r11", type_.to_string(), "locationCoordinates-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct vertical_velocity_info_r15_c_ { + struct types { + enum options { vertical_velocity_r15, vertical_velocity_and_uncertainty_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + vertical_velocity_info_r15_c_() : type_(types::nulltype) {} + vertical_velocity_info_r15_c_(const vertical_velocity_info_r15_c_& other); + vertical_velocity_info_r15_c_& operator=(const vertical_velocity_info_r15_c_& other); + ~vertical_velocity_info_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + dyn_octstring& vertical_velocity_r15() + { + assert_choice_type("verticalVelocity-r15", type_.to_string(), "verticalVelocityInfo-r15"); + return c.get(); + } + dyn_octstring& vertical_velocity_and_uncertainty_r15() + { + assert_choice_type("verticalVelocityAndUncertainty-r15", type_.to_string(), "verticalVelocityInfo-r15"); + return c.get(); + } + const dyn_octstring& vertical_velocity_r15() const + { + assert_choice_type("verticalVelocity-r15", type_.to_string(), "verticalVelocityInfo-r15"); + return c.get(); + } + const dyn_octstring& vertical_velocity_and_uncertainty_r15() const + { + assert_choice_type("verticalVelocityAndUncertainty-r15", type_.to_string(), "verticalVelocityInfo-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + bool horizontal_velocity_r10_present; + bool gnss_tod_msec_r10_present; + location_coordinates_r10_c_ location_coordinates_r10; + dyn_octstring horizontal_velocity_r10; + dyn_octstring gnss_tod_msec_r10; + // ... + // group 0 + bool vertical_velocity_info_r15_present; + copy_ptr vertical_velocity_info_r15; + + // sequence methods + location_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultGERAN ::= SEQUENCE +struct meas_result_geran_s { + struct cgi_info_s_ { + // member variables + bool routing_area_code_present; + cell_global_id_geran_s cell_global_id; + fixed_bitstring<8> routing_area_code; + + // sequence methods + cgi_info_s_(); + }; + struct meas_result_s_ { + // member variables + bool ext; + uint8_t rssi; + // ... + + // sequence methods + meas_result_s_(); + }; + + // member variables + bool cgi_info_present; + carrier_freq_geran_s carrier_freq; + pci_geran_s pci; + cgi_info_s_ cgi_info; + meas_result_s_ meas_result; + + // sequence methods + meas_result_geran_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultIdleListEUTRA-r15 ::= SEQUENCE (SIZE (1..maxCellMeasIdle-r15)) OF MeasResultIdleEUTRA-r15 +typedef dyn_array meas_result_idle_list_eutra_r15_l; + +// MeasResultListEUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultEUTRA +typedef dyn_array meas_result_list_eutra_l; + +// MeasResultListUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultUTRA +typedef dyn_array meas_result_list_utra_l; + +// MeasResultNR-r15 ::= SEQUENCE +struct meas_result_nr_r15_s { + // member variables + bool ext; + bool rsrp_result_r15_present; + bool rsrq_result_r15_present; + bool rs_sinr_result_r15_present; + uint8_t rsrp_result_r15; + uint8_t rsrq_result_r15; + uint8_t rs_sinr_result_r15; + // ... + + // sequence methods + meas_result_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultsCDMA2000 ::= SEQUENCE +struct meas_results_cdma2000_s { + // member variables + bool pre_regist_status_hrpd; + meas_result_list_cdma2000_l meas_result_list_cdma2000; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityInfoNR-r15 ::= SEQUENCE +struct plmn_id_info_nr_r15_s { + // member variables + bool tac_r15_present; + bool ran_area_code_r15_present; + plmn_id_list_nr_r15_l plmn_id_list_r15; + fixed_bitstring<24> tac_r15; + uint8_t ran_area_code_r15; + fixed_bitstring<36> cell_id_r15; + + // sequence methods + plmn_id_info_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1530-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1530_ies_s { + typedef dyn_array s_nssai_list_r15_l_; + struct ng_minus5_g_s_tmsi_bits_r15_c_ { + struct types { + enum options { ng_minus5_g_s_tmsi_r15, ng_minus5_g_s_tmsi_part2_r15, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ng_minus5_g_s_tmsi_bits_r15_c_() : type_(types::nulltype) {} + ng_minus5_g_s_tmsi_bits_r15_c_(const ng_minus5_g_s_tmsi_bits_r15_c_& other); + ng_minus5_g_s_tmsi_bits_r15_c_& operator=(const ng_minus5_g_s_tmsi_bits_r15_c_& other); + ~ng_minus5_g_s_tmsi_bits_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<48>& ng_minus5_g_s_tmsi_r15() + { + assert_choice_type("ng-5G-S-TMSI-r15", type_.to_string(), "ng-5G-S-TMSI-Bits-r15"); + return c.get >(); + } + fixed_bitstring<8>& ng_minus5_g_s_tmsi_part2_r15() + { + assert_choice_type("ng-5G-S-TMSI-Part2-r15", type_.to_string(), "ng-5G-S-TMSI-Bits-r15"); + return c.get >(); + } + const fixed_bitstring<48>& ng_minus5_g_s_tmsi_r15() const + { + assert_choice_type("ng-5G-S-TMSI-r15", type_.to_string(), "ng-5G-S-TMSI-Bits-r15"); + return c.get >(); + } + const fixed_bitstring<8>& ng_minus5_g_s_tmsi_part2_r15() const + { + assert_choice_type("ng-5G-S-TMSI-Part2-r15", type_.to_string(), "ng-5G-S-TMSI-Bits-r15"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + bool log_meas_available_bt_r15_present; + bool log_meas_available_wlan_r15_present; + bool idle_meas_available_r15_present; + bool flight_path_info_available_r15_present; + bool connect_to5_gc_r15_present; + bool registered_amf_r15_present; + bool s_nssai_list_r15_present; + bool ng_minus5_g_s_tmsi_bits_r15_present; + bool non_crit_ext_present; + registered_amf_r15_s registered_amf_r15; + s_nssai_list_r15_l_ s_nssai_list_r15; + ng_minus5_g_s_tmsi_bits_r15_c_ ng_minus5_g_s_tmsi_bits_r15; + + // sequence methods + rrc_conn_setup_complete_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSRQ-Type-r12 ::= SEQUENCE +struct rsrq_type_r12_s { + // member variables + bool all_symbols_r12; + bool wide_band_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-RTT-r15 ::= SEQUENCE +struct wlan_rtt_r15_s { + struct rtt_units_r15_e_ { + enum options { microseconds, hundredsofnanoseconds, tensofnanoseconds, nanoseconds, tenthsofnanoseconds, /*...*/ }; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + rtt_units_r15_e_() {} + rtt_units_r15_e_(options v) : value(v) {} + rtt_units_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool rtt_accuracy_r15_present; + uint32_t rtt_value_r15; + rtt_units_r15_e_ rtt_units_r15; + uint8_t rtt_accuracy_r15; + // ... + + // sequence methods + wlan_rtt_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqComb-r15 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF INTEGER +typedef bounded_array affected_carrier_freq_comb_r15_l; + +// AffectedCarrierFreqCombNR-r15 ::= SEQUENCE (SIZE (1..maxServCellNR-r15)) OF INTEGER +typedef bounded_array affected_carrier_freq_comb_nr_r15_l; + +// LogMeasResultBT-r15 ::= SEQUENCE +struct log_meas_result_bt_r15_s { + // member variables + bool ext; + bool rssi_bt_r15_present; + fixed_bitstring<48> bt_addr_r15; + int8_t rssi_bt_r15; + // ... + + // sequence methods + log_meas_result_bt_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasResultWLAN-r15 ::= SEQUENCE +struct log_meas_result_wlan_r15_s { + // member variables + bool ext; + bool rssi_wlan_r15_present; + bool rtt_wlan_r15_present; + wlan_ids_r12_s wlan_ids_r15; + uint8_t rssi_wlan_r15; + wlan_rtt_r15_s rtt_wlan_r15; + // ... + + // sequence methods + log_meas_result_wlan_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2CDMA2000-r9 ::= SEQUENCE +struct meas_result2_cdma2000_r9_s { + // member variables + carrier_freq_cdma2000_s carrier_freq_r9; + meas_results_cdma2000_s meas_result_list_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2EUTRA-r9 ::= SEQUENCE +struct meas_result2_eutra_r9_s { + // member variables + uint16_t carrier_freq_r9; + meas_result_list_eutra_l meas_result_list_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2EUTRA-v1250 ::= SEQUENCE +struct meas_result2_eutra_v1250_s { + // member variables + bool rsrq_type_r12_present; + rsrq_type_r12_s rsrq_type_r12; + + // sequence methods + meas_result2_eutra_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2EUTRA-v9e0 ::= SEQUENCE +struct meas_result2_eutra_v9e0_s { + // member variables + bool carrier_freq_v9e0_present; + uint32_t carrier_freq_v9e0; + + // sequence methods + meas_result2_eutra_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2UTRA-r9 ::= SEQUENCE +struct meas_result2_utra_r9_s { + // member variables + uint16_t carrier_freq_r9; + meas_result_list_utra_l meas_result_list_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultIdle-r15 ::= SEQUENCE +struct meas_result_idle_r15_s { + struct meas_result_serving_cell_r15_s_ { + // member variables + uint8_t rsrp_result_r15; + int8_t rsrq_result_r15; + }; + struct meas_result_neigh_cells_r15_c_ { + struct types { + enum options { meas_result_idle_list_eutra_r15, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 1, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + meas_result_neigh_cells_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_result_idle_list_eutra_r15_l& meas_result_idle_list_eutra_r15() + { + assert_choice_type("measResultIdleListEUTRA-r15", type_.to_string(), "measResultNeighCells-r15"); + return c; + } + const meas_result_idle_list_eutra_r15_l& meas_result_idle_list_eutra_r15() const + { + assert_choice_type("measResultIdleListEUTRA-r15", type_.to_string(), "measResultNeighCells-r15"); + return c; + } + + private: + types type_; + meas_result_idle_list_eutra_r15_l c; + }; + + // member variables + bool ext; + bool meas_result_neigh_cells_r15_present; + meas_result_serving_cell_r15_s_ meas_result_serving_cell_r15; + meas_result_neigh_cells_r15_c_ meas_result_neigh_cells_r15; + // ... + + // sequence methods + meas_result_idle_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultListGERAN ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultGERAN +typedef dyn_array meas_result_list_geran_l; + +// MeasResultMBSFN-r12 ::= SEQUENCE +struct meas_result_mbsfn_r12_s { + struct mbsfn_area_r12_s_ { + // member variables + uint8_t mbsfn_area_id_r12; + uint32_t carrier_freq_r12; + }; + + // member variables + bool ext; + bool sig_bler_result_r12_present; + bool data_bler_mch_result_list_r12_present; + mbsfn_area_r12_s_ mbsfn_area_r12; + uint8_t rsrp_result_mbsfn_r12; + uint8_t rsrq_result_mbsfn_r12; + bler_result_r12_s sig_bler_result_r12; + data_bler_mch_result_list_r12_l data_bler_mch_result_list_r12; + // ... + + // sequence methods + meas_result_mbsfn_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultSSB-Index-r15 ::= SEQUENCE +struct meas_result_ssb_idx_r15_s { + // member variables + bool ext; + bool meas_result_ssb_idx_r15_present; + uint8_t ssb_idx_r15; + meas_result_nr_r15_s meas_result_ssb_idx_r15; + // ... + + // sequence methods + meas_result_ssb_idx_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityInfoListNR-r15 ::= SEQUENCE (SIZE (1..maxPLMN-NR-r15)) OF PLMN-IdentityInfoNR-r15 +typedef dyn_array plmn_id_info_list_nr_r15_l; + +// PerCC-GapIndication-r14 ::= SEQUENCE +struct per_cc_gap_ind_r14_s { + struct gap_ind_r14_e_ { + enum options { gap, ncsg, nogap_no_ncsg }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + gap_ind_r14_e_() {} + gap_ind_r14_e_(options v) : value(v) {} + gap_ind_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + uint8_t serv_cell_id_r14; + gap_ind_r14_e_ gap_ind_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfigurationComplete-v1530-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v1530_ies_s { + // member variables + bool log_meas_available_bt_r15_present; + bool log_meas_available_wlan_r15_present; + bool flight_path_info_available_r15_present; + bool non_crit_ext_present; + + // sequence methods + rrc_conn_recfg_complete_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1430-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1430_ies_s { + // member variables + bool dcn_id_r14_present; + bool non_crit_ext_present; + uint16_t dcn_id_r14; + rrc_conn_setup_complete_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VictimSystemType-r11 ::= SEQUENCE +struct victim_sys_type_r11_s { + // member variables + bool gps_r11_present; + bool glonass_r11_present; + bool bds_r11_present; + bool galileo_r11_present; + bool wlan_r11_present; + bool bluetooth_r11_present; + + // sequence methods + victim_sys_type_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VisitedCellInfo-r12 ::= SEQUENCE +struct visited_cell_info_r12_s { + struct visited_cell_id_r12_c_ { + struct pci_arfcn_r12_s_ { + // member variables + uint16_t pci_r12; + uint32_t carrier_freq_r12; + }; + struct types { + enum options { cell_global_id_r12, pci_arfcn_r12, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + visited_cell_id_r12_c_() : type_(types::nulltype) {} + visited_cell_id_r12_c_(const visited_cell_id_r12_c_& other); + visited_cell_id_r12_c_& operator=(const visited_cell_id_r12_c_& other); + ~visited_cell_id_r12_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cell_global_id_eutra_s& cell_global_id_r12() + { + assert_choice_type("cellGlobalId-r12", type_.to_string(), "visitedCellId-r12"); + return c.get(); + } + pci_arfcn_r12_s_& pci_arfcn_r12() + { + assert_choice_type("pci-arfcn-r12", type_.to_string(), "visitedCellId-r12"); + return c.get(); + } + const cell_global_id_eutra_s& cell_global_id_r12() const + { + assert_choice_type("cellGlobalId-r12", type_.to_string(), "visitedCellId-r12"); + return c.get(); + } + const pci_arfcn_r12_s_& pci_arfcn_r12() const + { + assert_choice_type("pci-arfcn-r12", type_.to_string(), "visitedCellId-r12"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext; + bool visited_cell_id_r12_present; + visited_cell_id_r12_c_ visited_cell_id_r12; + uint16_t time_spent_r12; + // ... + + // sequence methods + visited_cell_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WayPointLocation-r15 ::= SEQUENCE +struct way_point_location_r15_s { + // member variables + bool time_stamp_r15_present; + location_info_r10_s way_point_location_r15; + fixed_bitstring<48> time_stamp_r15; + + // sequence methods + way_point_location_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqCombInfoMRDC-r15 ::= SEQUENCE +struct affected_carrier_freq_comb_info_mrdc_r15_s { + struct interference_direction_mrdc_r15_e_ { + enum options { eutra_nr, nr, other, eutra_nr_other, nr_other, spare3, spare2, spare1 }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interference_direction_mrdc_r15_e_() {} + interference_direction_mrdc_r15_e_(options v) : value(v) {} + interference_direction_mrdc_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct affected_carrier_freq_comb_mrdc_r15_s_ { + // member variables + bool affected_carrier_freq_comb_eutra_r15_present; + affected_carrier_freq_comb_r15_l affected_carrier_freq_comb_eutra_r15; + affected_carrier_freq_comb_nr_r15_l affected_carrier_freq_comb_nr_r15; + + // sequence methods + affected_carrier_freq_comb_mrdc_r15_s_(); + }; + + // member variables + bool affected_carrier_freq_comb_mrdc_r15_present; + victim_sys_type_r11_s victim_sys_type_r15; + interference_direction_mrdc_r15_e_ interference_direction_mrdc_r15; + affected_carrier_freq_comb_mrdc_r15_s_ affected_carrier_freq_comb_mrdc_r15; + + // sequence methods + affected_carrier_freq_comb_info_mrdc_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CGI-InfoNR-r15 ::= SEQUENCE +struct cgi_info_nr_r15_s { + struct no_sib1_r15_s_ { + // member variables + uint8_t ssb_subcarrier_offset_r15; + uint8_t pdcch_cfg_sib1_r15; + }; + + // member variables + bool ext; + bool plmn_id_info_list_r15_present; + bool freq_band_list_minus15_present; + bool no_sib1_r15_present; + plmn_id_info_list_nr_r15_l plmn_id_info_list_r15; + multi_freq_band_list_nr_r15_l freq_band_list_minus15; + no_sib1_r15_s_ no_sib1_r15; + // ... + + // sequence methods + cgi_info_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FlightPathInfoReport-r15 ::= SEQUENCE +struct flight_path_info_report_r15_s { + typedef dyn_array flight_path_r15_l_; + + // member variables + bool flight_path_r15_present; + bool non_crit_ext_present; + flight_path_r15_l_ flight_path_r15; + + // sequence methods + flight_path_info_report_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasResultListBT-r15 ::= SEQUENCE (SIZE (1..maxBT-IdReport-r15)) OF LogMeasResultBT-r15 +typedef dyn_array log_meas_result_list_bt_r15_l; + +// LogMeasResultListWLAN-r15 ::= SEQUENCE (SIZE (1..maxWLAN-Id-Report-r14)) OF LogMeasResultWLAN-r15 +typedef dyn_array log_meas_result_list_wlan_r15_l; + +// MeasResultList2CDMA2000-r9 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2CDMA2000-r9 +typedef dyn_array meas_result_list2_cdma2000_r9_l; + +// MeasResultList2EUTRA-r9 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-r9 +typedef dyn_array meas_result_list2_eutra_r9_l; + +// MeasResultList2EUTRA-v1250 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-v1250 +typedef dyn_array meas_result_list2_eutra_v1250_l; + +// MeasResultList2EUTRA-v9e0 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-v9e0 +typedef dyn_array meas_result_list2_eutra_v9e0_l; + +// MeasResultList2GERAN-r10 ::= SEQUENCE (SIZE (1..maxCellListGERAN)) OF MeasResultListGERAN +typedef dyn_array meas_result_list2_geran_r10_l; + +// MeasResultList2UTRA-r9 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2UTRA-r9 +typedef dyn_array meas_result_list2_utra_r9_l; + +// MeasResultListIdle-r15 ::= SEQUENCE (SIZE (1..maxIdleMeasCarriers-r15)) OF MeasResultIdle-r15 +typedef dyn_array meas_result_list_idle_r15_l; + +// MeasResultListMBSFN-r12 ::= SEQUENCE (SIZE (1..maxMBSFN-Area)) OF MeasResultMBSFN-r12 +typedef dyn_array meas_result_list_mbsfn_r12_l; + +// MeasResultSSB-IndexList-r15 ::= SEQUENCE (SIZE (1..maxRS-IndexReport-r15)) OF MeasResultSSB-Index-r15 +typedef dyn_array meas_result_ssb_idx_list_r15_l; + +// PerCC-GapIndicationList-r14 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF PerCC-GapIndication-r14 +typedef dyn_array per_cc_gap_ind_list_r14_l; + +// RRCConnectionReconfigurationComplete-v1510-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v1510_ies_s { + // member variables + bool scg_cfg_resp_nr_r15_present; + bool non_crit_ext_present; + dyn_octstring scg_cfg_resp_nr_r15; + rrc_conn_recfg_complete_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_v1510_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-v1530-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_v1530_ies_s { + // member variables + bool log_meas_available_bt_r15_present; + bool log_meas_available_wlan_r15_present; + bool flight_path_info_available_r15_present; + bool non_crit_ext_present; + + // sequence methods + rrc_conn_reest_complete_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1330-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1330_ies_s { + // member variables + bool ue_ce_need_ul_gaps_r13_present; + bool non_crit_ext_present; + rrc_conn_setup_complete_v1430_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v1330_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VisitedCellInfoList-r12 ::= SEQUENCE (SIZE (1..maxCellHistory-r12)) OF VisitedCellInfo-r12 +typedef dyn_array visited_cell_info_list_r12_l; + +// LogMeasInfo-r10 ::= SEQUENCE +struct log_meas_info_r10_s { + struct meas_result_serv_cell_r10_s_ { + // member variables + uint8_t rsrp_result_r10; + uint8_t rsrq_result_r10; + }; + struct meas_result_neigh_cells_r10_s_ { + // member variables + bool meas_result_list_eutra_r10_present; + bool meas_result_list_utra_r10_present; + bool meas_result_list_geran_r10_present; + bool meas_result_list_cdma2000_r10_present; + meas_result_list2_eutra_r9_l meas_result_list_eutra_r10; + meas_result_list2_utra_r9_l meas_result_list_utra_r10; + meas_result_list2_geran_r10_l meas_result_list_geran_r10; + meas_result_list2_cdma2000_r9_l meas_result_list_cdma2000_r10; + + // sequence methods + meas_result_neigh_cells_r10_s_(); + }; + + // member variables + bool ext; + bool location_info_r10_present; + bool meas_result_neigh_cells_r10_present; + location_info_r10_s location_info_r10; + uint16_t relative_time_stamp_r10; + cell_global_id_eutra_s serv_cell_id_r10; + meas_result_serv_cell_r10_s_ meas_result_serv_cell_r10; + meas_result_neigh_cells_r10_s_ meas_result_neigh_cells_r10; + // ... + // group 0 + bool meas_result_list_eutra_v1090_present; + copy_ptr meas_result_list_eutra_v1090; + // group 1 + bool meas_result_list_mbsfn_r12_present; + bool meas_result_serv_cell_v1250_present; + bool serv_cell_rsrq_type_r12_present; + bool meas_result_list_eutra_v1250_present; + copy_ptr meas_result_list_mbsfn_r12; + int8_t meas_result_serv_cell_v1250; + copy_ptr serv_cell_rsrq_type_r12; + copy_ptr meas_result_list_eutra_v1250; + // group 2 + bool in_dev_coex_detected_r13_present; + // group 3 + bool meas_result_serv_cell_v1360_present; + int8_t meas_result_serv_cell_v1360; + // group 4 + bool log_meas_result_list_bt_r15_present; + bool log_meas_result_list_wlan_r15_present; + copy_ptr log_meas_result_list_bt_r15; + copy_ptr log_meas_result_list_wlan_r15; + + // sequence methods + log_meas_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MRDC-AssistanceInfo-r15 ::= SEQUENCE +struct mrdc_assist_info_r15_s { + typedef dyn_array affected_carrier_freq_comb_info_list_mrdc_r15_l_; + + // member variables + bool ext; + affected_carrier_freq_comb_info_list_mrdc_r15_l_ affected_carrier_freq_comb_info_list_mrdc_r15; + // ... + + // sequence methods + mrdc_assist_info_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCellNR-r15 ::= SEQUENCE +struct meas_result_cell_nr_r15_s { + // member variables + bool ext; + bool meas_result_rs_idx_list_r15_present; + uint16_t pci_r15; + meas_result_nr_r15_s meas_result_cell_r15; + meas_result_ssb_idx_list_r15_l meas_result_rs_idx_list_r15; + // ... + // group 0 + bool cgi_info_r15_present; + copy_ptr cgi_info_r15; + + // sequence methods + meas_result_cell_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityHistoryReport-r12 ::= VisitedCellInfoList-r12 +typedef visited_cell_info_list_r12_l mob_history_report_r12_l; + +// RRCConnectionReconfigurationComplete-v1430-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v1430_ies_s { + // member variables + bool per_cc_gap_ind_list_r14_present; + bool num_freq_effective_r14_present; + bool num_freq_effective_reduced_r14_present; + bool non_crit_ext_present; + per_cc_gap_ind_list_r14_l per_cc_gap_ind_list_r14; + uint8_t num_freq_effective_r14; + uint8_t num_freq_effective_reduced_r14; + rrc_conn_recfg_complete_v1510_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-v1250-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_v1250_ies_s { + // member variables + bool log_meas_available_mbsfn_r12_present; + bool non_crit_ext_present; + rrc_conn_reest_complete_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_complete_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1320-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1320_ies_s { + // member variables + bool ce_mode_b_r13_present; + bool s_tmsi_r13_present; + bool attach_without_pdn_connect_r13_present; + bool up_cio_t_eps_optim_r13_present; + bool cp_cio_t_eps_optim_r13_present; + bool non_crit_ext_present; + s_tmsi_s s_tmsi_r13; + rrc_conn_setup_complete_v1330_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v1320_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TrafficPatternInfo-v1530 ::= SEQUENCE +struct traffic_pattern_info_v1530_s { + // member variables + bool traffic_dest_r15_present; + bool reliability_info_sl_r15_present; + fixed_bitstring<24> traffic_dest_r15; + uint8_t reliability_info_sl_r15; + + // sequence methods + traffic_pattern_info_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-v1530-IEs ::= SEQUENCE +struct ue_info_resp_v1530_ies_s { + // member variables + bool meas_result_list_idle_r15_present; + bool flight_path_info_report_r15_present; + bool non_crit_ext_present; + meas_result_list_idle_r15_l meas_result_list_idle_r15; + flight_path_info_report_r15_s flight_path_info_report_r15; + + // sequence methods + ue_info_resp_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreq-v1310 ::= SEQUENCE +struct affected_carrier_freq_v1310_s { + // member variables + bool carrier_freq_v1310_present; + uint8_t carrier_freq_v1310; + + // sequence methods + affected_carrier_freq_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqComb-r13 ::= SEQUENCE (SIZE (2..maxServCell-r13)) OF INTEGER +typedef bounded_array affected_carrier_freq_comb_r13_l; + +// ConnEstFailReport-r11 ::= SEQUENCE +struct conn_est_fail_report_r11_s { + struct meas_result_failed_cell_r11_s_ { + // member variables + bool rsrq_result_r11_present; + uint8_t rsrp_result_r11; + uint8_t rsrq_result_r11; + + // sequence methods + meas_result_failed_cell_r11_s_(); + }; + struct meas_result_neigh_cells_r11_s_ { + // member variables + bool meas_result_list_eutra_r11_present; + bool meas_result_list_utra_r11_present; + bool meas_result_list_geran_r11_present; + bool meas_results_cdma2000_r11_present; + meas_result_list2_eutra_r9_l meas_result_list_eutra_r11; + meas_result_list2_utra_r9_l meas_result_list_utra_r11; + meas_result_list_geran_l meas_result_list_geran_r11; + meas_result_list2_cdma2000_r9_l meas_results_cdma2000_r11; + + // sequence methods + meas_result_neigh_cells_r11_s_(); + }; + + // member variables + bool ext; + bool location_info_r11_present; + bool meas_result_neigh_cells_r11_present; + bool meas_result_list_eutra_v1130_present; + cell_global_id_eutra_s failed_cell_id_r11; + location_info_r10_s location_info_r11; + meas_result_failed_cell_r11_s_ meas_result_failed_cell_r11; + meas_result_neigh_cells_r11_s_ meas_result_neigh_cells_r11; + uint8_t nof_preambs_sent_r11; + bool contention_detected_r11; + bool max_tx_pwr_reached_r11; + uint32_t time_since_fail_r11; + meas_result_list2_eutra_v9e0_l meas_result_list_eutra_v1130; + // ... + // group 0 + bool meas_result_failed_cell_v1250_present; + bool failed_cell_rsrq_type_r12_present; + bool meas_result_list_eutra_v1250_present; + int8_t meas_result_failed_cell_v1250; + copy_ptr failed_cell_rsrq_type_r12; + copy_ptr meas_result_list_eutra_v1250; + // group 1 + bool meas_result_failed_cell_v1360_present; + int8_t meas_result_failed_cell_v1360; + // group 2 + bool log_meas_result_list_bt_r15_present; + bool log_meas_result_list_wlan_r15_present; + copy_ptr log_meas_result_list_bt_r15; + copy_ptr log_meas_result_list_wlan_r15; + + // sequence methods + conn_est_fail_report_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-CountInfo ::= SEQUENCE +struct drb_count_info_s { + // member variables + uint8_t drb_id; + uint32_t count_ul; + uint32_t count_dl; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InDeviceCoexIndication-v1530-IEs ::= SEQUENCE +struct in_dev_coex_ind_v1530_ies_s { + // member variables + bool mrdc_assist_info_r15_present; + bool non_crit_ext_present; + mrdc_assist_info_r15_s mrdc_assist_info_r15; + + // sequence methods + in_dev_coex_ind_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasInfoList-r10 ::= SEQUENCE (SIZE (1..maxLogMeasReport-r10)) OF LogMeasInfo-r10 +typedef dyn_array log_meas_info_list_r10_l; + +// MeasResultCellListNR-r15 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultCellNR-r15 +typedef dyn_array meas_result_cell_list_nr_r15_l; + +// RRCConnectionReconfigurationComplete-v1250-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v1250_ies_s { + // member variables + bool log_meas_available_mbsfn_r12_present; + bool non_crit_ext_present; + rrc_conn_recfg_complete_v1430_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-v1130-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_v1130_ies_s { + // member variables + bool conn_est_fail_info_available_r11_present; + bool non_crit_ext_present; + rrc_conn_reest_complete_v1250_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_complete_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1250-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1250_ies_s { + struct mob_state_r12_e_ { + enum options { normal, medium, high, spare }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mob_state_r12_e_() {} + mob_state_r12_e_(options v) : value(v) {} + mob_state_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool mob_state_r12_present; + bool mob_history_avail_r12_present; + bool log_meas_available_mbsfn_r12_present; + bool non_crit_ext_present; + mob_state_r12_e_ mob_state_r12; + rrc_conn_setup_complete_v1320_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-CommTxResourceReq-r14 ::= SEQUENCE +struct sl_v2x_comm_tx_res_req_r14_s { + // member variables + bool carrier_freq_comm_tx_r14_present; + bool v2x_type_tx_sync_r14_present; + bool v2x_dest_info_list_r14_present; + uint8_t carrier_freq_comm_tx_r14; + sl_type_tx_sync_r14_e v2x_type_tx_sync_r14; + sl_dest_info_list_r12_l v2x_dest_info_list_r14; + + // sequence methods + sl_v2x_comm_tx_res_req_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TrafficPatternInfoList-v1530 ::= SEQUENCE (SIZE (1..maxTrafficPattern-r14)) OF TrafficPatternInfo-v1530 +typedef dyn_array traffic_pattern_info_list_v1530_l; + +// UEInformationResponse-v1250-IEs ::= SEQUENCE +struct ue_info_resp_v1250_ies_s { + // member variables + bool mob_history_report_r12_present; + bool non_crit_ext_present; + mob_history_report_r12_l mob_history_report_r12; + ue_info_resp_v1530_ies_s non_crit_ext; + + // sequence methods + ue_info_resp_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqComb-r11 ::= SEQUENCE (SIZE (2..maxServCell-r10)) OF INTEGER +typedef bounded_array affected_carrier_freq_comb_r11_l; + +// AffectedCarrierFreqCombList-r13 ::= SEQUENCE (SIZE (1..maxCombIDC-r11)) OF AffectedCarrierFreqComb-r13 +typedef dyn_array affected_carrier_freq_comb_list_r13_l; + +// AffectedCarrierFreqList-v1310 ::= SEQUENCE (SIZE (1..maxFreqIDC-r11)) OF AffectedCarrierFreq-v1310 +typedef dyn_array affected_carrier_freq_list_v1310_l; + +// DRB-CountInfoListExt-r15 ::= SEQUENCE (SIZE (1..maxDRBExt-r15)) OF DRB-CountInfo +typedef dyn_array drb_count_info_list_ext_r15_l; + +// FailureReportSCG-v12d0 ::= SEQUENCE +struct fail_report_scg_v12d0_s { + // member variables + bool meas_result_neigh_cells_v12d0_present; + meas_result_list2_eutra_v9e0_l meas_result_neigh_cells_v12d0; + + // sequence methods + fail_report_scg_v12d0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IDC-SubframePattern-r11 ::= CHOICE +struct idc_sf_pattern_r11_c { + struct sf_pattern_tdd_r11_c_ { + struct types { + enum options { sf_cfg0_r11, sf_cfg1_minus5_r11, sf_cfg6_r11, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + sf_pattern_tdd_r11_c_() : type_(types::nulltype) {} + sf_pattern_tdd_r11_c_(const sf_pattern_tdd_r11_c_& other); + sf_pattern_tdd_r11_c_& operator=(const sf_pattern_tdd_r11_c_& other); + ~sf_pattern_tdd_r11_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<70>& sf_cfg0_r11() + { + assert_choice_type("subframeConfig0-r11", type_.to_string(), "subframePatternTDD-r11"); + return c.get >(); + } + fixed_bitstring<10>& sf_cfg1_minus5_r11() + { + assert_choice_type("subframeConfig1-5-r11", type_.to_string(), "subframePatternTDD-r11"); + return c.get >(); + } + fixed_bitstring<60>& sf_cfg6_r11() + { + assert_choice_type("subframeConfig6-r11", type_.to_string(), "subframePatternTDD-r11"); + return c.get >(); + } + const fixed_bitstring<70>& sf_cfg0_r11() const + { + assert_choice_type("subframeConfig0-r11", type_.to_string(), "subframePatternTDD-r11"); + return c.get >(); + } + const fixed_bitstring<10>& sf_cfg1_minus5_r11() const + { + assert_choice_type("subframeConfig1-5-r11", type_.to_string(), "subframePatternTDD-r11"); + return c.get >(); + } + const fixed_bitstring<60>& sf_cfg6_r11() const + { + assert_choice_type("subframeConfig6-r11", type_.to_string(), "subframePatternTDD-r11"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + struct types { + enum options { sf_pattern_fdd_r11, sf_pattern_tdd_r11, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + idc_sf_pattern_r11_c() : type_(types::nulltype) {} + idc_sf_pattern_r11_c(const idc_sf_pattern_r11_c& other); + idc_sf_pattern_r11_c& operator=(const idc_sf_pattern_r11_c& other); + ~idc_sf_pattern_r11_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<4>& sf_pattern_fdd_r11() + { + assert_choice_type("subframePatternFDD-r11", type_.to_string(), "IDC-SubframePattern-r11"); + return c.get >(); + } + sf_pattern_tdd_r11_c_& sf_pattern_tdd_r11() + { + assert_choice_type("subframePatternTDD-r11", type_.to_string(), "IDC-SubframePattern-r11"); + return c.get(); + } + const fixed_bitstring<4>& sf_pattern_fdd_r11() const + { + assert_choice_type("subframePatternFDD-r11", type_.to_string(), "IDC-SubframePattern-r11"); + return c.get >(); + } + const sf_pattern_tdd_r11_c_& sf_pattern_tdd_r11() const + { + assert_choice_type("subframePatternTDD-r11", type_.to_string(), "IDC-SubframePattern-r11"); + return c.get(); + } + +private: + types type_; + choice_buffer_t), sizeof(sf_pattern_tdd_r11_c_))> c; + + void destroy_(); +}; + +// InDeviceCoexIndication-v1360-IEs ::= SEQUENCE +struct in_dev_coex_ind_v1360_ies_s { + // member variables + bool hardware_sharing_problem_r13_present; + bool non_crit_ext_present; + in_dev_coex_ind_v1530_ies_s non_crit_ext; + + // sequence methods + in_dev_coex_ind_v1360_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasReport-r10 ::= SEQUENCE +struct log_meas_report_r10_s { + // member variables + bool ext; + bool log_meas_available_r10_present; + fixed_bitstring<48> absolute_time_stamp_r10; + trace_ref_r10_s trace_ref_r10; + fixed_octstring<2> trace_recording_session_ref_r10; + fixed_octstring<1> tce_id_r10; + log_meas_info_list_r10_l log_meas_info_list_r10; + // ... + // group 0 + bool log_meas_available_bt_r15_present; + bool log_meas_available_wlan_r15_present; + + // sequence methods + log_meas_report_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-ServiceInfo-r13 ::= SEQUENCE +struct mbms_service_info_r13_s { + // member variables + tmgi_r9_s tmgi_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCBR-r14 ::= SEQUENCE +struct meas_result_cbr_r14_s { + // member variables + bool cbr_pscch_r14_present; + uint8_t pool_id_r14; + uint8_t cbr_pssch_r14; + uint8_t cbr_pscch_r14; + + // sequence methods + meas_result_cbr_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCSI-RS-r12 ::= SEQUENCE +struct meas_result_csi_rs_r12_s { + // member variables + bool ext; + uint8_t meas_csi_rs_id_r12; + uint8_t csi_rsrp_result_r12; + // ... + + // sequence methods + meas_result_csi_rs_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCellSFTD-r15 ::= SEQUENCE +struct meas_result_cell_sftd_r15_s { + // member variables + bool rsrp_result_r15_present; + uint16_t pci_r15; + uint16_t sfn_offset_result_r15; + int16_t frame_boundary_offset_result_r15; + uint8_t rsrp_result_r15; + + // sequence methods + meas_result_cell_sftd_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultFreqFailNR-r15 ::= SEQUENCE +struct meas_result_freq_fail_nr_r15_s { + // member variables + bool ext; + bool meas_result_cell_list_r15_present; + uint32_t carrier_freq_r15; + meas_result_cell_list_nr_r15_l meas_result_cell_list_r15; + // ... + + // sequence methods + meas_result_freq_fail_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServFreq-r10 ::= SEQUENCE +struct meas_result_serv_freq_r10_s { + struct meas_result_scell_r10_s_ { + // member variables + uint8_t rsrp_result_scell_r10; + uint8_t rsrq_result_scell_r10; + }; + struct meas_result_best_neigh_cell_r10_s_ { + // member variables + uint16_t pci_r10; + uint8_t rsrp_result_ncell_r10; + uint8_t rsrq_result_ncell_r10; + }; + struct meas_result_scell_v1310_s_ { + // member variables + uint8_t rs_sinr_result_r13; + }; + struct meas_result_best_neigh_cell_v1310_s_ { + // member variables + uint8_t rs_sinr_result_r13; + }; + + // member variables + bool ext; + bool meas_result_scell_r10_present; + bool meas_result_best_neigh_cell_r10_present; + uint8_t serv_freq_id_r10; + meas_result_scell_r10_s_ meas_result_scell_r10; + meas_result_best_neigh_cell_r10_s_ meas_result_best_neigh_cell_r10; + // ... + // group 0 + bool meas_result_scell_v1250_present; + bool meas_result_best_neigh_cell_v1250_present; + int8_t meas_result_scell_v1250; + int8_t meas_result_best_neigh_cell_v1250; + // group 1 + bool meas_result_scell_v1310_present; + bool meas_result_best_neigh_cell_v1310_present; + copy_ptr meas_result_scell_v1310; + copy_ptr meas_result_best_neigh_cell_v1310; + + // sequence methods + meas_result_serv_freq_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServFreq-r13 ::= SEQUENCE +struct meas_result_serv_freq_r13_s { + struct meas_result_scell_r13_s_ { + // member variables + bool rs_sinr_result_r13_present; + uint8_t rsrp_result_scell_r13; + int8_t rsrq_result_scell_r13; + uint8_t rs_sinr_result_r13; + + // sequence methods + meas_result_scell_r13_s_(); + }; + struct meas_result_best_neigh_cell_r13_s_ { + // member variables + bool rs_sinr_result_r13_present; + uint16_t pci_r13; + uint8_t rsrp_result_ncell_r13; + int8_t rsrq_result_ncell_r13; + uint8_t rs_sinr_result_r13; + + // sequence methods + meas_result_best_neigh_cell_r13_s_(); + }; + struct meas_result_best_neigh_cell_v1360_s_ { + // member variables + int8_t rsrp_result_ncell_v1360; + }; + + // member variables + bool ext; + bool meas_result_scell_r13_present; + bool meas_result_best_neigh_cell_r13_present; + uint8_t serv_freq_id_r13; + meas_result_scell_r13_s_ meas_result_scell_r13; + meas_result_best_neigh_cell_r13_s_ meas_result_best_neigh_cell_r13; + // ... + // group 0 + bool meas_result_best_neigh_cell_v1360_present; + copy_ptr meas_result_best_neigh_cell_v1360; + + // sequence methods + meas_result_serv_freq_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServFreqNR-r15 ::= SEQUENCE +struct meas_result_serv_freq_nr_r15_s { + // member variables + bool ext; + bool meas_result_scell_r15_present; + bool meas_result_best_neigh_cell_r15_present; + uint32_t carrier_freq_r15; + meas_result_cell_nr_r15_s meas_result_scell_r15; + meas_result_cell_nr_r15_s meas_result_best_neigh_cell_r15; + // ... + + // sequence methods + meas_result_serv_freq_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultWLAN-r13 ::= SEQUENCE +struct meas_result_wlan_r13_s { + // member variables + bool ext; + bool carrier_info_wlan_r13_present; + bool band_wlan_r13_present; + bool available_admission_capacity_wlan_r13_present; + bool backhaul_dl_bw_wlan_r13_present; + bool backhaul_ul_bw_wlan_r13_present; + bool ch_utilization_wlan_r13_present; + bool station_count_wlan_r13_present; + bool connected_wlan_r13_present; + wlan_ids_r12_s wlan_ids_r13; + wlan_carrier_info_r13_s carrier_info_wlan_r13; + wlan_band_ind_r13_e band_wlan_r13; + uint8_t rssi_wlan_r13; + uint16_t available_admission_capacity_wlan_r13; + wlan_backhaul_rate_r12_e backhaul_dl_bw_wlan_r13; + wlan_backhaul_rate_r12_e backhaul_ul_bw_wlan_r13; + uint8_t ch_utilization_wlan_r13; + uint16_t station_count_wlan_r13; + // ... + + // sequence methods + meas_result_wlan_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OverheatingAssistance-r14 ::= SEQUENCE +struct overheat_assist_r14_s { + struct reduced_ue_category_s_ { + // member variables + uint8_t reduced_ue_category_dl; + uint8_t reduced_ue_category_ul; + }; + struct reduced_max_ccs_s_ { + // member variables + uint8_t reduced_ccs_dl; + uint8_t reduced_ccs_ul; + }; + + // member variables + bool reduced_ue_category_present; + bool reduced_max_ccs_present; + reduced_ue_category_s_ reduced_ue_category; + reduced_max_ccs_s_ reduced_max_ccs; + + // sequence methods + overheat_assist_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLF-Report-v9e0 ::= SEQUENCE +struct rlf_report_v9e0_s { + // member variables + meas_result_list2_eutra_v9e0_l meas_result_list_eutra_v9e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfigurationComplete-v1130-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v1130_ies_s { + // member variables + bool conn_est_fail_info_available_r11_present; + bool non_crit_ext_present; + rrc_conn_recfg_complete_v1250_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-v1020-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_v1020_ies_s { + // member variables + bool log_meas_available_r10_present; + bool non_crit_ext_present; + rrc_conn_reest_complete_v1130_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_complete_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1130-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1130_ies_s { + // member variables + bool conn_est_fail_info_available_r11_present; + bool non_crit_ext_present; + rrc_conn_setup_complete_v1250_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscSysInfoReport-r13 ::= SEQUENCE +struct sl_disc_sys_info_report_r13_s { + struct disc_cell_sel_info_r13_s_ { + // member variables + bool q_rx_lev_min_offset_r13_present; + int8_t q_rx_lev_min_r13; + uint8_t q_rx_lev_min_offset_r13; + + // sequence methods + disc_cell_sel_info_r13_s_(); + }; + struct cell_resel_info_r13_s_ { + struct q_hyst_r13_e_ { + enum options { db0, db1, db2, db3, db4, db5, db6, db8, db10, db12, db14, db16, db18, db20, db22, db24 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + q_hyst_r13_e_() {} + q_hyst_r13_e_(options v) : value(v) {} + q_hyst_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + q_hyst_r13_e_ q_hyst_r13; + int8_t q_rx_lev_min_r13; + uint8_t t_resel_eutra_r13; + }; + struct freq_info_r13_s_ { + struct ul_bw_r13_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_bw_r13_e_() {} + ul_bw_r13_e_(options v) : value(v) {} + ul_bw_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ul_carrier_freq_r13_present; + bool ul_bw_r13_present; + bool add_spec_emission_r13_present; + uint16_t ul_carrier_freq_r13; + ul_bw_r13_e_ ul_bw_r13; + uint8_t add_spec_emission_r13; + + // sequence methods + freq_info_r13_s_(); + }; + struct freq_info_v1370_s_ { + // member variables + uint16_t add_spec_emission_v1370; + }; + + // member variables + bool ext; + bool plmn_id_list_r13_present; + bool cell_id_minus13_present; + bool carrier_freq_info_minus13_present; + bool disc_rx_res_r13_present; + bool disc_tx_pool_common_r13_present; + bool disc_tx_pwr_info_r13_present; + bool disc_sync_cfg_r13_present; + bool disc_cell_sel_info_r13_present; + bool cell_resel_info_r13_present; + bool tdd_cfg_r13_present; + bool freq_info_r13_present; + bool p_max_r13_present; + bool ref_sig_pwr_r13_present; + plmn_id_list_l plmn_id_list_r13; + fixed_bitstring<28> cell_id_minus13; + uint32_t carrier_freq_info_minus13; + sl_disc_rx_pool_list_r12_l disc_rx_res_r13; + sl_disc_tx_pool_list_r12_l disc_tx_pool_common_r13; + sl_disc_tx_pwr_info_list_r12_l disc_tx_pwr_info_r13; + sl_sync_cfg_nfreq_r13_s disc_sync_cfg_r13; + disc_cell_sel_info_r13_s_ disc_cell_sel_info_r13; + cell_resel_info_r13_s_ cell_resel_info_r13; + tdd_cfg_s tdd_cfg_r13; + freq_info_r13_s_ freq_info_r13; + int8_t p_max_r13; + int8_t ref_sig_pwr_r13; + // ... + // group 0 + bool freq_info_v1370_present; + copy_ptr freq_info_v1370; + + // sequence methods + sl_disc_sys_info_report_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscTxResourceReq-r13 ::= SEQUENCE +struct sl_disc_tx_res_req_r13_s { + // member variables + bool carrier_freq_disc_tx_r13_present; + uint8_t carrier_freq_disc_tx_r13; + uint8_t disc_tx_res_req_r13; + + // sequence methods + sl_disc_tx_res_req_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-GapFreqInfo-r13 ::= SEQUENCE +struct sl_gap_freq_info_r13_s { + // member variables + bool carrier_freq_r13_present; + uint32_t carrier_freq_r13; + sl_gap_pattern_list_r13_l gap_pattern_list_r13; + + // sequence methods + sl_gap_freq_info_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-CommFreqList-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF INTEGER +typedef bounded_array sl_v2x_comm_freq_list_r14_l; + +// SL-V2X-CommTxFreqList-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF SL-V2X-CommTxResourceReq-r14 +typedef dyn_array sl_v2x_comm_tx_freq_list_r14_l; + +// SensingResult-r15 ::= SEQUENCE +struct sensing_result_r15_s { + // member variables + uint16_t res_idx_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SidelinkUEInformation-v1530-IEs ::= SEQUENCE +struct sidelink_ue_info_v1530_ies_s { + // member variables + bool reliability_info_list_sl_r15_present; + bool non_crit_ext_present; + sl_reliability_list_r15_l reliability_info_list_sl_r15; + + // sequence methods + sidelink_ue_info_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TrafficPatternInfo-r14 ::= SEQUENCE +struct traffic_pattern_info_r14_s { + struct traffic_periodicity_r14_e_ { + enum options { sf20, sf50, sf100, sf200, sf300, sf400, sf500, sf600, sf700, sf800, sf900, sf1000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 12, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + traffic_periodicity_r14_e_() {} + traffic_periodicity_r14_e_(options v) : value(v) {} + traffic_periodicity_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool prio_info_sl_r14_present; + bool lc_ch_id_ul_r14_present; + traffic_periodicity_r14_e_ traffic_periodicity_r14; + uint16_t timing_offset_r14; + uint8_t prio_info_sl_r14; + uint8_t lc_ch_id_ul_r14; + fixed_bitstring<6> msg_size_r14; + + // sequence methods + traffic_pattern_info_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-RadioPagingInfo-r12 ::= SEQUENCE +struct ue_radio_paging_info_r12_s { + struct wake_up_signal_min_gap_e_drx_r15_e_ { + enum options { ms40, ms240, ms1000, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + wake_up_signal_min_gap_e_drx_r15_e_() {} + wake_up_signal_min_gap_e_drx_r15_e_(options v) : value(v) {} + wake_up_signal_min_gap_e_drx_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct wake_up_signal_min_gap_e_drx_tdd_r15_e_ { + enum options { ms40, ms240, ms1000, ms2000 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + wake_up_signal_min_gap_e_drx_tdd_r15_e_() {} + wake_up_signal_min_gap_e_drx_tdd_r15_e_(options v) : value(v) {} + wake_up_signal_min_gap_e_drx_tdd_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool ue_category_v1250_present; + uint8_t ue_category_v1250; + // ... + // group 0 + bool ue_category_dl_v1310_present; + bool ce_mode_a_r13_present; + bool ce_mode_b_r13_present; + // group 1 + bool wake_up_signal_r15_present; + bool wake_up_signal_tdd_r15_present; + bool wake_up_signal_min_gap_e_drx_r15_present; + bool wake_up_signal_min_gap_e_drx_tdd_r15_present; + wake_up_signal_min_gap_e_drx_r15_e_ wake_up_signal_min_gap_e_drx_r15; + wake_up_signal_min_gap_e_drx_tdd_r15_e_ wake_up_signal_min_gap_e_drx_tdd_r15; + + // sequence methods + ue_radio_paging_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEAssistanceInformation-v1530-IEs ::= SEQUENCE +struct ueassist_info_v1530_ies_s { + struct sps_assist_info_v1530_s_ { + // member variables + traffic_pattern_info_list_v1530_l traffic_pattern_info_list_sl_v1530; + }; + + // member variables + bool sps_assist_info_v1530_present; + bool non_crit_ext_present; + sps_assist_info_v1530_s_ sps_assist_info_v1530; + + // sequence methods + ueassist_info_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-v1130-IEs ::= SEQUENCE +struct ue_info_resp_v1130_ies_s { + // member variables + bool conn_est_fail_report_r11_present; + bool non_crit_ext_present; + conn_est_fail_report_r11_s conn_est_fail_report_r11; + ue_info_resp_v1250_ies_s non_crit_ext; + + // sequence methods + ue_info_resp_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-PDCP-DelayResult-r13 ::= SEQUENCE +struct ul_pdcp_delay_result_r13_s { + struct qci_id_r13_e_ { + enum options { qci1, qci2, qci3, qci4, spare4, spare3, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + qci_id_r13_e_() {} + qci_id_r13_e_(options v) : value(v) {} + qci_id_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + qci_id_r13_e_ qci_id_r13; + uint8_t excess_delay_r13; + // ... + + // sequence methods + ul_pdcp_delay_result_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreq-r11 ::= SEQUENCE +struct affected_carrier_freq_r11_s { + struct interference_direction_r11_e_ { + enum options { eutra, other, both, spare }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + interference_direction_r11_e_() {} + interference_direction_r11_e_(options v) : value(v) {} + interference_direction_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + uint8_t carrier_freq_r11; + interference_direction_r11_e_ interference_direction_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqCombList-r11 ::= SEQUENCE (SIZE (1..maxCombIDC-r11)) OF AffectedCarrierFreqComb-r11 +typedef dyn_array affected_carrier_freq_comb_list_r11_l; + +// BW-Preference-r14 ::= SEQUENCE +struct bw_pref_r14_s { + struct dl_pref_r14_e_ { + enum options { mhz1dot4, mhz5, mhz20 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + dl_pref_r14_e_() {} + dl_pref_r14_e_(options v) : value(v) {} + dl_pref_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct ul_pref_r14_e_ { + enum options { mhz1dot4, mhz5 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ul_pref_r14_e_() {} + ul_pref_r14_e_(options v) : value(v) {} + ul_pref_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool dl_pref_r14_present; + bool ul_pref_r14_present; + dl_pref_r14_e_ dl_pref_r14; + ul_pref_r14_e_ ul_pref_r14; + + // sequence methods + bw_pref_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheckResponse-v1530-IEs ::= SEQUENCE +struct counter_check_resp_v1530_ies_s { + // member variables + bool drb_count_info_list_ext_r15_present; + bool non_crit_ext_present; + drb_count_info_list_ext_r15_l drb_count_info_list_ext_r15; + + // sequence methods + counter_check_resp_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CountingResponseInfo-r10 ::= SEQUENCE +struct count_resp_info_r10_s { + // member variables + bool ext; + uint8_t count_resp_service_r10; + // ... + + // sequence methods + count_resp_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DelayBudgetReport-r14 ::= CHOICE +struct delay_budget_report_r14_c { + struct type1_e_ { + 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 + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 17, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + type1_e_() {} + type1_e_(options v) : value(v) {} + type1_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; + }; + struct type2_e_ { + enum options { + ms_minus192, + ms_minus168, + ms_minus144, + ms_minus120, + ms_minus96, + ms_minus72, + ms_minus48, + ms_minus24, + ms0, + ms24, + ms48, + ms72, + ms96, + ms120, + ms144, + ms168, + ms192 + }; + typedef int16_t number_type; + + options value; + static const uint32_t nof_types = 17, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + type2_e_() {} + type2_e_(options v) : value(v) {} + type2_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + int16_t to_number() const; + }; + struct types { + enum options { type1, type2, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + delay_budget_report_r14_c() : type_(types::nulltype) {} + delay_budget_report_r14_c(const delay_budget_report_r14_c& other); + delay_budget_report_r14_c& operator=(const delay_budget_report_r14_c& other); + ~delay_budget_report_r14_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + type1_e_& type1() + { + assert_choice_type("type1", type_.to_string(), "DelayBudgetReport-r14"); + return c.get(); + } + type2_e_& type2() + { + assert_choice_type("type2", type_.to_string(), "DelayBudgetReport-r14"); + return c.get(); + } + const type1_e_& type1() const + { + assert_choice_type("type1", type_.to_string(), "DelayBudgetReport-r14"); + return c.get(); + } + const type2_e_& type2() const + { + assert_choice_type("type2", type_.to_string(), "DelayBudgetReport-r14"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// IDC-SubframePatternList-r11 ::= SEQUENCE (SIZE (1..maxSubframePatternIDC-r11)) OF IDC-SubframePattern-r11 +typedef dyn_array idc_sf_pattern_list_r11_l; + +// InDeviceCoexIndication-v1310-IEs ::= SEQUENCE +struct in_dev_coex_ind_v1310_ies_s { + // member variables + bool affected_carrier_freq_list_v1310_present; + bool affected_carrier_freq_comb_list_r13_present; + bool non_crit_ext_present; + affected_carrier_freq_list_v1310_l affected_carrier_freq_list_v1310; + affected_carrier_freq_comb_list_r13_l affected_carrier_freq_comb_list_r13; + in_dev_coex_ind_v1360_ies_s non_crit_ext; + + // sequence methods + in_dev_coex_ind_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-ServiceList-r13 ::= SEQUENCE (SIZE (0..maxMBMS-ServiceListPerUE-r13)) OF MBMS-ServiceInfo-r13 +typedef dyn_array mbms_service_list_r13_l; + +// MeasResultCSI-RS-List-r12 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultCSI-RS-r12 +typedef dyn_array meas_result_csi_rs_list_r12_l; + +// MeasResultCellListSFTD-r15 ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF MeasResultCellSFTD-r15 +typedef dyn_array meas_result_cell_list_sftd_r15_l; + +// MeasResultForECID-r9 ::= SEQUENCE +struct meas_result_for_ecid_r9_s { + // member variables + uint16_t ue_rx_tx_time_diff_result_r9; + fixed_bitstring<10> current_sfn_r9; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultForRSSI-r13 ::= SEQUENCE +struct meas_result_for_rssi_r13_s { + // member variables + bool ext; + uint8_t rssi_result_r13; + uint8_t ch_occupancy_r13; + // ... + + // sequence methods + meas_result_for_rssi_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultFreqListFailNR-r15 ::= SEQUENCE (SIZE (1..maxFreqNR-r15)) OF MeasResultFreqFailNR-r15 +typedef dyn_array meas_result_freq_list_fail_nr_r15_l; + +// MeasResultListCBR-r14 ::= SEQUENCE (SIZE (1..maxCBR-Report-r14)) OF MeasResultCBR-r14 +typedef dyn_array meas_result_list_cbr_r14_l; + +// MeasResultListWLAN-r13 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultWLAN-r13 +typedef dyn_array meas_result_list_wlan_r13_l; + +// MeasResultListWLAN-r14 ::= SEQUENCE (SIZE (1..maxWLAN-Id-Report-r14)) OF MeasResultWLAN-r13 +typedef dyn_array meas_result_list_wlan_r14_l; + +// MeasResultSSTD-r13 ::= SEQUENCE +struct meas_result_sstd_r13_s { + // member variables + uint16_t sfn_offset_result_r13; + int8_t frame_boundary_offset_result_r13; + uint8_t sf_boundary_offset_result_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultSensing-r15 ::= SEQUENCE +struct meas_result_sensing_r15_s { + typedef dyn_array sensing_result_r15_l_; + + // member variables + uint16_t sl_sf_ref_r15; + sensing_result_r15_l_ sensing_result_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServFreqList-r10 ::= SEQUENCE (SIZE (1..maxServCell-r10)) OF MeasResultServFreq-r10 +typedef dyn_array meas_result_serv_freq_list_r10_l; + +// MeasResultServFreqListExt-r13 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultServFreq-r13 +typedef dyn_array meas_result_serv_freq_list_ext_r13_l; + +// MeasResultServFreqListNR-r15 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultServFreqNR-r15 +typedef dyn_array meas_result_serv_freq_list_nr_r15_l; + +// RRCConnectionReconfigurationComplete-v1020-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v1020_ies_s { + // member variables + bool rlf_info_available_r10_present; + bool log_meas_available_r10_present; + bool non_crit_ext_present; + rrc_conn_recfg_complete_v1130_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-v8a0-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_reest_complete_v1020_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_complete_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v1020-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v1020_ies_s { + struct gummei_type_r10_e_ { + enum options { native, mapped }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + gummei_type_r10_e_() {} + gummei_type_r10_e_(options v) : value(v) {} + gummei_type_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct rn_sf_cfg_req_r10_e_ { + enum options { required, not_required }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rn_sf_cfg_req_r10_e_() {} + rn_sf_cfg_req_r10_e_(options v) : value(v) {} + rn_sf_cfg_req_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool gummei_type_r10_present; + bool rlf_info_available_r10_present; + bool log_meas_available_r10_present; + bool rn_sf_cfg_req_r10_present; + bool non_crit_ext_present; + gummei_type_r10_e_ gummei_type_r10; + rn_sf_cfg_req_r10_e_ rn_sf_cfg_req_r10; + rrc_conn_setup_complete_v1130_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSTD-InterFreqInfo-r10 ::= SEQUENCE +struct rstd_inter_freq_info_r10_s { + struct meas_prs_offset_r15_c_ { + struct types { + enum options { + rstd0_r15, + rstd1_r15, + rstd2_r15, + rstd3_r15, + rstd4_r15, + rstd5_r15, + rstd6_r15, + rstd7_r15, + rstd8_r15, + rstd9_r15, + rstd10_r15, + rstd11_r15, + rstd12_r15, + rstd13_r15, + rstd14_r15, + rstd15_r15, + rstd16_r15, + rstd17_r15, + rstd18_r15, + rstd19_r15, + rstd20_r15, + nulltype + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 21, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + meas_prs_offset_r15_c_() : type_(types::nulltype) {} + meas_prs_offset_r15_c_(const meas_prs_offset_r15_c_& other); + meas_prs_offset_r15_c_& operator=(const meas_prs_offset_r15_c_& other); + ~meas_prs_offset_r15_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& rstd0_r15() + { + assert_choice_type("rstd0-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint8_t& rstd1_r15() + { + assert_choice_type("rstd1-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd2_r15() + { + assert_choice_type("rstd2-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd3_r15() + { + assert_choice_type("rstd3-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd4_r15() + { + assert_choice_type("rstd4-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint8_t& rstd5_r15() + { + assert_choice_type("rstd5-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd6_r15() + { + assert_choice_type("rstd6-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd7_r15() + { + assert_choice_type("rstd7-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd8_r15() + { + assert_choice_type("rstd8-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd9_r15() + { + assert_choice_type("rstd9-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd10_r15() + { + assert_choice_type("rstd10-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd11_r15() + { + assert_choice_type("rstd11-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd12_r15() + { + assert_choice_type("rstd12-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd13_r15() + { + assert_choice_type("rstd13-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd14_r15() + { + assert_choice_type("rstd14-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd15_r15() + { + assert_choice_type("rstd15-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd16_r15() + { + assert_choice_type("rstd16-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd17_r15() + { + assert_choice_type("rstd17-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd18_r15() + { + assert_choice_type("rstd18-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd19_r15() + { + assert_choice_type("rstd19-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + uint16_t& rstd20_r15() + { + assert_choice_type("rstd20-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint8_t& rstd0_r15() const + { + assert_choice_type("rstd0-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint8_t& rstd1_r15() const + { + assert_choice_type("rstd1-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd2_r15() const + { + assert_choice_type("rstd2-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd3_r15() const + { + assert_choice_type("rstd3-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd4_r15() const + { + assert_choice_type("rstd4-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint8_t& rstd5_r15() const + { + assert_choice_type("rstd5-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd6_r15() const + { + assert_choice_type("rstd6-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd7_r15() const + { + assert_choice_type("rstd7-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd8_r15() const + { + assert_choice_type("rstd8-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd9_r15() const + { + assert_choice_type("rstd9-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd10_r15() const + { + assert_choice_type("rstd10-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd11_r15() const + { + assert_choice_type("rstd11-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd12_r15() const + { + assert_choice_type("rstd12-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd13_r15() const + { + assert_choice_type("rstd13-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd14_r15() const + { + assert_choice_type("rstd14-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd15_r15() const + { + assert_choice_type("rstd15-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd16_r15() const + { + assert_choice_type("rstd16-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd17_r15() const + { + assert_choice_type("rstd17-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd18_r15() const + { + assert_choice_type("rstd18-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd19_r15() const + { + assert_choice_type("rstd19-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + const uint16_t& rstd20_r15() const + { + assert_choice_type("rstd20-r15", type_.to_string(), "measPRS-Offset-r15"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool ext; + uint16_t carrier_freq_r10; + uint8_t meas_prs_offset_r10; + // ... + // group 0 + bool carrier_freq_v1090_present; + uint32_t carrier_freq_v1090; + // group 1 + bool meas_prs_offset_r15_present; + copy_ptr meas_prs_offset_r15; + + // sequence methods + rstd_inter_freq_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformation-v12d0-IEs ::= SEQUENCE +struct scg_fail_info_v12d0_ies_s { + // member variables + bool fail_report_scg_v12d0_present; + bool non_crit_ext_present; + fail_report_scg_v12d0_s fail_report_scg_v12d0; + + // sequence methods + scg_fail_info_v12d0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CommTxResourceReq-r12 ::= SEQUENCE +struct sl_comm_tx_res_req_r12_s { + // member variables + bool carrier_freq_r12_present; + uint32_t carrier_freq_r12; + sl_dest_info_list_r12_l dest_info_list_r12; + + // sequence methods + sl_comm_tx_res_req_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-DiscSysInfoReportFreqList-r13 ::= SEQUENCE (SIZE (1.. maxSL-DiscSysInfoReportFreq-r13)) OF +// SL-DiscSysInfoReport-r13 +typedef dyn_array sl_disc_sys_info_report_freq_list_r13_l; + +// SL-DiscTxResourceReqPerFreqList-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-DiscTxResourceReq-r13 +typedef dyn_array sl_disc_tx_res_req_per_freq_list_r13_l; + +// SL-GapRequest-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-GapFreqInfo-r13 +typedef dyn_array sl_gap_request_r13_l; + +// SidelinkUEInformation-v1430-IEs ::= SEQUENCE +struct sidelink_ue_info_v1430_ies_s { + // member variables + bool v2x_comm_rx_interested_freq_list_r14_present; + bool p2x_comm_tx_type_r14_present; + bool v2x_comm_tx_res_req_r14_present; + bool non_crit_ext_present; + sl_v2x_comm_freq_list_r14_l v2x_comm_rx_interested_freq_list_r14; + sl_v2x_comm_tx_freq_list_r14_l v2x_comm_tx_res_req_r14; + sidelink_ue_info_v1530_ies_s non_crit_ext; + + // sequence methods + sidelink_ue_info_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TrafficPatternInfoList-r14 ::= SEQUENCE (SIZE (1..maxTrafficPattern-r14)) OF TrafficPatternInfo-r14 +typedef dyn_array traffic_pattern_info_list_r14_l; + +// UE-CapabilityRAT-Container ::= SEQUENCE +struct ue_cap_rat_container_s { + // member variables + rat_type_e rat_type; + dyn_octstring ue_cap_rat_container; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEAssistanceInformation-v1450-IEs ::= SEQUENCE +struct ueassist_info_v1450_ies_s { + // member variables + bool overheat_assist_r14_present; + bool non_crit_ext_present; + overheat_assist_r14_s overheat_assist_r14; + ueassist_info_v1530_ies_s non_crit_ext; + + // sequence methods + ueassist_info_v1450_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityInformation-v1250-IEs ::= SEQUENCE +struct ue_cap_info_v1250_ies_s { + // member variables + bool ue_radio_paging_info_r12_present; + bool non_crit_ext_present; + ue_radio_paging_info_r12_s ue_radio_paging_info_r12; + + // sequence methods + ue_cap_info_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-v1020-IEs ::= SEQUENCE +struct ue_info_resp_v1020_ies_s { + // member variables + bool log_meas_report_r10_present; + bool non_crit_ext_present; + log_meas_report_r10_s log_meas_report_r10; + ue_info_resp_v1130_ies_s non_crit_ext; + + // sequence methods + ue_info_resp_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-v9e0-IEs ::= SEQUENCE +struct ue_info_resp_v9e0_ies_s { + // member variables + bool rlf_report_v9e0_present; + bool non_crit_ext_present; + rlf_report_v9e0_s rlf_report_v9e0; + + // sequence methods + ue_info_resp_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-PDCP-DelayResultList-r13 ::= SEQUENCE (SIZE (1..maxQCI-r13)) OF UL-PDCP-DelayResult-r13 +typedef dyn_array ul_pdcp_delay_result_list_r13_l; + +// WLAN-Status-v1430 ::= ENUMERATED +struct wlan_status_v1430_e { + enum options { suspended, resumed }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + wlan_status_v1430_e() {} + wlan_status_v1430_e(options v) : value(v) {} + wlan_status_v1430_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// AffectedCarrierFreqList-r11 ::= SEQUENCE (SIZE (1..maxFreqIDC-r11)) OF AffectedCarrierFreq-r11 +typedef dyn_array affected_carrier_freq_list_r11_l; + +// CSFBParametersRequestCDMA2000-v8a0-IEs ::= SEQUENCE +struct csfb_params_request_cdma2000_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + csfb_params_request_cdma2000_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqListMBMS-r11 ::= SEQUENCE (SIZE (1..maxFreqMBMS-r11)) OF INTEGER +typedef bounded_array carrier_freq_list_mbms_r11_l; + +// CounterCheckResponse-v8a0-IEs ::= SEQUENCE +struct counter_check_resp_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + counter_check_resp_v1530_ies_s non_crit_ext; + + // sequence methods + counter_check_resp_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CountingResponseList-r10 ::= SEQUENCE (SIZE (1..maxServiceCount)) OF CountingResponseInfo-r10 +typedef dyn_array count_resp_list_r10_l; + +// DRB-CountInfoList ::= SEQUENCE (SIZE (0..maxDRB)) OF DRB-CountInfo +typedef dyn_array drb_count_info_list_l; + +// FailureReportSCG-NR-r15 ::= SEQUENCE +struct fail_report_scg_nr_r15_s { + struct fail_type_r15_e_ { + enum options { + t310_expiry, + random_access_problem, + rlc_max_num_retx, + scg_change_fail, + scg_recfg_fail, + srb3_integrity_fail + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fail_type_r15_e_() {} + fail_type_r15_e_(options v) : value(v) {} + fail_type_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool meas_result_freq_list_nr_r15_present; + bool meas_result_scg_r15_present; + fail_type_r15_e_ fail_type_r15; + meas_result_freq_list_fail_nr_r15_l meas_result_freq_list_nr_r15; + dyn_octstring meas_result_scg_r15; + // ... + + // sequence methods + fail_report_scg_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FailureReportSCG-r12 ::= SEQUENCE +struct fail_report_scg_r12_s { + struct fail_type_r12_e_ { + enum options { t313_expiry, random_access_problem, rlc_max_num_retx, scg_change_fail }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fail_type_r12_e_() {} + fail_type_r12_e_(options v) : value(v) {} + fail_type_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool meas_result_serv_freq_list_r12_present; + bool meas_result_neigh_cells_r12_present; + fail_type_r12_e_ fail_type_r12; + meas_result_serv_freq_list_r10_l meas_result_serv_freq_list_r12; + meas_result_list2_eutra_r9_l meas_result_neigh_cells_r12; + // ... + // group 0 + bool fail_type_v1290_present; + // group 1 + bool meas_result_serv_freq_list_ext_r13_present; + copy_ptr meas_result_serv_freq_list_ext_r13; + + // sequence methods + fail_report_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InDeviceCoexIndication-v11d0-IEs ::= SEQUENCE +struct in_dev_coex_ind_v11d0_ies_s { + struct ul_ca_assist_info_r11_s_ { + // member variables + bool affected_carrier_freq_comb_list_r11_present; + affected_carrier_freq_comb_list_r11_l affected_carrier_freq_comb_list_r11; + victim_sys_type_r11_s victim_sys_type_r11; + + // sequence methods + ul_ca_assist_info_r11_s_(); + }; + + // member variables + bool ul_ca_assist_info_r11_present; + bool non_crit_ext_present; + ul_ca_assist_info_r11_s_ ul_ca_assist_info_r11; + in_dev_coex_ind_v1310_ies_s non_crit_ext; + + // sequence methods + in_dev_coex_ind_v11d0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMSInterestIndication-v1310-IEs ::= SEQUENCE +struct mbms_interest_ind_v1310_ies_s { + // member variables + bool mbms_services_r13_present; + bool non_crit_ext_present; + mbms_service_list_r13_l mbms_services_r13; + + // sequence methods + mbms_interest_ind_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResults ::= SEQUENCE +struct meas_results_s { + struct meas_result_pcell_s_ { + // member variables + uint8_t rsrp_result; + uint8_t rsrq_result; + }; + struct meas_result_neigh_cells_c_ { + struct types { + enum options { + meas_result_list_eutra, + meas_result_list_utra, + meas_result_list_geran, + meas_results_cdma2000, + // ... + meas_result_neigh_cell_list_nr_r15, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 1; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + meas_result_neigh_cells_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_result_list_eutra_l& meas_result_list_eutra() + { + assert_choice_type("measResultListEUTRA", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + meas_result_list_utra_l& meas_result_list_utra() + { + assert_choice_type("measResultListUTRA", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + meas_result_list_geran_l& meas_result_list_geran() + { + assert_choice_type("measResultListGERAN", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + meas_results_cdma2000_s& meas_results_cdma2000() + { + assert_choice_type("measResultsCDMA2000", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + meas_result_cell_list_nr_r15_l& meas_result_neigh_cell_list_nr_r15() + { + assert_choice_type("measResultNeighCellListNR-r15", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + const meas_result_list_eutra_l& meas_result_list_eutra() const + { + assert_choice_type("measResultListEUTRA", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + const meas_result_list_utra_l& meas_result_list_utra() const + { + assert_choice_type("measResultListUTRA", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + const meas_result_list_geran_l& meas_result_list_geran() const + { + assert_choice_type("measResultListGERAN", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + const meas_results_cdma2000_s& meas_results_cdma2000() const + { + assert_choice_type("measResultsCDMA2000", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + const meas_result_cell_list_nr_r15_l& meas_result_neigh_cell_list_nr_r15() const + { + assert_choice_type("measResultNeighCellListNR-r15", type_.to_string(), "measResultNeighCells"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + struct meas_result_pcell_v1310_s_ { + // member variables + uint8_t rs_sinr_result_r13; + }; + + // member variables + bool ext; + bool meas_result_neigh_cells_present; + uint8_t meas_id; + meas_result_pcell_s_ meas_result_pcell; + meas_result_neigh_cells_c_ meas_result_neigh_cells; + // ... + // group 0 + bool meas_result_for_ecid_r9_present; + copy_ptr meas_result_for_ecid_r9; + // group 1 + bool location_info_r10_present; + bool meas_result_serv_freq_list_r10_present; + copy_ptr location_info_r10; + copy_ptr meas_result_serv_freq_list_r10; + // group 2 + bool meas_id_v1250_present; + bool meas_result_pcell_v1250_present; + bool meas_result_csi_rs_list_r12_present; + uint8_t meas_id_v1250; + int8_t meas_result_pcell_v1250; + copy_ptr meas_result_csi_rs_list_r12; + // group 3 + bool meas_result_for_rssi_r13_present; + bool meas_result_serv_freq_list_ext_r13_present; + bool meas_result_sstd_r13_present; + bool meas_result_pcell_v1310_present; + bool ul_pdcp_delay_result_list_r13_present; + bool meas_result_list_wlan_r13_present; + copy_ptr meas_result_for_rssi_r13; + copy_ptr meas_result_serv_freq_list_ext_r13; + copy_ptr meas_result_sstd_r13; + copy_ptr meas_result_pcell_v1310; + copy_ptr ul_pdcp_delay_result_list_r13; + copy_ptr meas_result_list_wlan_r13; + // group 4 + bool meas_result_pcell_v1360_present; + int8_t meas_result_pcell_v1360; + // group 5 + bool meas_result_list_cbr_r14_present; + bool meas_result_list_wlan_r14_present; + copy_ptr meas_result_list_cbr_r14; + copy_ptr meas_result_list_wlan_r14; + // group 6 + bool meas_result_serv_freq_list_nr_r15_present; + bool meas_result_cell_list_sftd_r15_present; + copy_ptr meas_result_serv_freq_list_nr_r15; + copy_ptr meas_result_cell_list_sftd_r15; + // group 7 + bool log_meas_result_list_bt_r15_present; + bool log_meas_result_list_wlan_r15_present; + bool meas_result_sensing_r15_present; + bool height_ue_r15_present; + copy_ptr log_meas_result_list_bt_r15; + copy_ptr log_meas_result_list_wlan_r15; + copy_ptr meas_result_sensing_r15; + int16_t height_ue_r15; + + // sequence methods + meas_results_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasurementReport-v8a0-IEs ::= SEQUENCE +struct meas_report_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + meas_report_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ProximityIndication-v930-IEs ::= SEQUENCE +struct proximity_ind_v930_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + proximity_ind_v930_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLF-Report-r9 ::= SEQUENCE +struct rlf_report_r9_s { + struct meas_result_last_serv_cell_r9_s_ { + // member variables + bool rsrq_result_r9_present; + uint8_t rsrp_result_r9; + uint8_t rsrq_result_r9; + + // sequence methods + meas_result_last_serv_cell_r9_s_(); + }; + struct meas_result_neigh_cells_r9_s_ { + // member variables + bool meas_result_list_eutra_r9_present; + bool meas_result_list_utra_r9_present; + bool meas_result_list_geran_r9_present; + bool meas_results_cdma2000_r9_present; + meas_result_list2_eutra_r9_l meas_result_list_eutra_r9; + meas_result_list2_utra_r9_l meas_result_list_utra_r9; + meas_result_list_geran_l meas_result_list_geran_r9; + meas_result_list2_cdma2000_r9_l meas_results_cdma2000_r9; + + // sequence methods + meas_result_neigh_cells_r9_s_(); + }; + struct failed_pcell_id_r10_c_ { + struct pci_arfcn_r10_s_ { + // member variables + uint16_t pci_r10; + uint16_t carrier_freq_r10; + }; + struct types { + enum options { cell_global_id_r10, pci_arfcn_r10, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + failed_pcell_id_r10_c_() : type_(types::nulltype) {} + failed_pcell_id_r10_c_(const failed_pcell_id_r10_c_& other); + failed_pcell_id_r10_c_& operator=(const failed_pcell_id_r10_c_& other); + ~failed_pcell_id_r10_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + cell_global_id_eutra_s& cell_global_id_r10() + { + assert_choice_type("cellGlobalId-r10", type_.to_string(), "failedPCellId-r10"); + return c.get(); + } + pci_arfcn_r10_s_& pci_arfcn_r10() + { + assert_choice_type("pci-arfcn-r10", type_.to_string(), "failedPCellId-r10"); + return c.get(); + } + const cell_global_id_eutra_s& cell_global_id_r10() const + { + assert_choice_type("cellGlobalId-r10", type_.to_string(), "failedPCellId-r10"); + return c.get(); + } + const pci_arfcn_r10_s_& pci_arfcn_r10() const + { + assert_choice_type("pci-arfcn-r10", type_.to_string(), "failedPCellId-r10"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct conn_fail_type_r10_e_ { + enum options { rlf, hof }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + conn_fail_type_r10_e_() {} + conn_fail_type_r10_e_(options v) : value(v) {} + conn_fail_type_r10_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct failed_pcell_id_v1090_s_ { + // member variables + uint32_t carrier_freq_v1090; + }; + struct basic_fields_r11_s_ { + struct rlf_cause_r11_e_ { + enum options { t310_expiry, random_access_problem, rlc_max_num_retx, t312_expiry_r12 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rlf_cause_r11_e_() {} + rlf_cause_r11_e_(options v) : value(v) {} + rlf_cause_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + fixed_bitstring<16> c_rnti_r11; + rlf_cause_r11_e_ rlf_cause_r11; + uint32_t time_since_fail_r11; + }; + struct prev_utra_cell_id_r11_s_ { + struct pci_r11_c_ { + struct types { + enum options { fdd_r11, tdd_r11, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pci_r11_c_() : type_(types::nulltype) {} + pci_r11_c_(const pci_r11_c_& other); + pci_r11_c_& operator=(const pci_r11_c_& other); + ~pci_r11_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& fdd_r11() + { + assert_choice_type("fdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + uint8_t& tdd_r11() + { + assert_choice_type("tdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + const uint16_t& fdd_r11() const + { + assert_choice_type("fdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + const uint8_t& tdd_r11() const + { + assert_choice_type("tdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool cell_global_id_r11_present; + uint16_t carrier_freq_r11; + pci_r11_c_ pci_r11; + cell_global_id_utra_s cell_global_id_r11; + + // sequence methods + prev_utra_cell_id_r11_s_(); + }; + struct sel_utra_cell_id_r11_s_ { + struct pci_r11_c_ { + struct types { + enum options { fdd_r11, tdd_r11, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pci_r11_c_() : type_(types::nulltype) {} + pci_r11_c_(const pci_r11_c_& other); + pci_r11_c_& operator=(const pci_r11_c_& other); + ~pci_r11_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& fdd_r11() + { + assert_choice_type("fdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + uint8_t& tdd_r11() + { + assert_choice_type("tdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + const uint16_t& fdd_r11() const + { + assert_choice_type("fdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + const uint8_t& tdd_r11() const + { + assert_choice_type("tdd-r11", type_.to_string(), "physCellId-r11"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + uint16_t carrier_freq_r11; + pci_r11_c_ pci_r11; + }; + struct failed_pcell_id_v1250_s_ { + // member variables + fixed_bitstring<16> tac_failed_pcell_r12; + }; + + // member variables + bool ext; + bool meas_result_neigh_cells_r9_present; + meas_result_last_serv_cell_r9_s_ meas_result_last_serv_cell_r9; + meas_result_neigh_cells_r9_s_ meas_result_neigh_cells_r9; + // ... + // group 0 + bool location_info_r10_present; + bool failed_pcell_id_r10_present; + bool reest_cell_id_r10_present; + bool time_conn_fail_r10_present; + bool conn_fail_type_r10_present; + bool prev_pcell_id_r10_present; + copy_ptr location_info_r10; + copy_ptr failed_pcell_id_r10; + copy_ptr reest_cell_id_r10; + uint16_t time_conn_fail_r10; + conn_fail_type_r10_e_ conn_fail_type_r10; + copy_ptr prev_pcell_id_r10; + // group 1 + bool failed_pcell_id_v1090_present; + copy_ptr failed_pcell_id_v1090; + // group 2 + bool basic_fields_r11_present; + bool prev_utra_cell_id_r11_present; + bool sel_utra_cell_id_r11_present; + copy_ptr basic_fields_r11; + copy_ptr prev_utra_cell_id_r11; + copy_ptr sel_utra_cell_id_r11; + // group 3 + bool failed_pcell_id_v1250_present; + bool meas_result_last_serv_cell_v1250_present; + bool last_serv_cell_rsrq_type_r12_present; + bool meas_result_list_eutra_v1250_present; + copy_ptr failed_pcell_id_v1250; + int8_t meas_result_last_serv_cell_v1250; + copy_ptr last_serv_cell_rsrq_type_r12; + copy_ptr meas_result_list_eutra_v1250; + // group 4 + bool drb_established_with_qci_minus1_r13_present; + // group 5 + bool meas_result_last_serv_cell_v1360_present; + int8_t meas_result_last_serv_cell_v1360; + // group 6 + bool log_meas_result_list_bt_r15_present; + bool log_meas_result_list_wlan_r15_present; + copy_ptr log_meas_result_list_bt_r15; + copy_ptr log_meas_result_list_wlan_r15; + + // sequence methods + rlf_report_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfigurationComplete-v8a0-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_recfg_complete_v1020_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-v920-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_v920_ies_s { + // member variables + bool rlf_info_available_r9_present; + bool non_crit_ext_present; + rrc_conn_reest_complete_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_complete_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResumeComplete-v1530-IEs ::= SEQUENCE +struct rrc_conn_resume_complete_v1530_ies_s { + // member variables + bool log_meas_available_bt_r15_present; + bool log_meas_available_wlan_r15_present; + bool idle_meas_available_r15_present; + bool flight_path_info_available_r15_present; + bool non_crit_ext_present; + + // sequence methods + rrc_conn_resume_complete_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-v8a0-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + rrc_conn_setup_complete_v1020_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSTD-InterFreqInfoList-r10 ::= SEQUENCE (SIZE(1..maxRSTD-Freq-r10)) OF RSTD-InterFreqInfo-r10 +typedef dyn_array rstd_inter_freq_info_list_r10_l; + +// RegisteredMME ::= SEQUENCE +struct registered_mme_s { + // member variables + bool plmn_id_present; + plmn_id_s plmn_id; + fixed_bitstring<16> mmegi; + fixed_bitstring<8> mmec; + + // sequence methods + registered_mme_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformation-v1310-IEs ::= SEQUENCE +struct scg_fail_info_v1310_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + scg_fail_info_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeComplete-v8a0-IEs ::= SEQUENCE +struct security_mode_complete_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + security_mode_complete_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeFailure-v8a0-IEs ::= SEQUENCE +struct security_mode_fail_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + security_mode_fail_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SidelinkUEInformation-v1310-IEs ::= SEQUENCE +struct sidelink_ue_info_v1310_ies_s { + struct comm_tx_res_info_req_relay_r13_s_ { + struct ue_type_r13_e_ { + enum options { relay_ue, remote_ue }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_type_r13_e_() {} + ue_type_r13_e_(options v) : value(v) {} + ue_type_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool comm_tx_res_req_relay_r13_present; + bool comm_tx_res_req_relay_uc_r13_present; + sl_comm_tx_res_req_r12_s comm_tx_res_req_relay_r13; + sl_comm_tx_res_req_r12_s comm_tx_res_req_relay_uc_r13; + ue_type_r13_e_ ue_type_r13; + + // sequence methods + comm_tx_res_info_req_relay_r13_s_(); + }; + struct disc_tx_res_req_v1310_s_ { + // member variables + bool carrier_freq_disc_tx_r13_present; + bool disc_tx_res_req_add_freq_r13_present; + uint8_t carrier_freq_disc_tx_r13; + sl_disc_tx_res_req_per_freq_list_r13_l disc_tx_res_req_add_freq_r13; + + // sequence methods + disc_tx_res_req_v1310_s_(); + }; + + // member variables + bool comm_tx_res_req_uc_r13_present; + bool comm_tx_res_info_req_relay_r13_present; + bool disc_tx_res_req_v1310_present; + bool disc_tx_res_req_ps_r13_present; + bool disc_rx_gap_req_r13_present; + bool disc_tx_gap_req_r13_present; + bool disc_sys_info_report_freq_list_r13_present; + bool non_crit_ext_present; + sl_comm_tx_res_req_r12_s comm_tx_res_req_uc_r13; + comm_tx_res_info_req_relay_r13_s_ comm_tx_res_info_req_relay_r13; + disc_tx_res_req_v1310_s_ disc_tx_res_req_v1310; + sl_disc_tx_res_req_r13_s disc_tx_res_req_ps_r13; + sl_gap_request_r13_l disc_rx_gap_req_r13; + sl_gap_request_r13_l disc_tx_gap_req_r13; + sl_disc_sys_info_report_freq_list_r13_l disc_sys_info_report_freq_list_r13; + sidelink_ue_info_v1430_ies_s non_crit_ext; + + // sequence methods + sidelink_ue_info_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TDM-AssistanceInfo-r11 ::= CHOICE +struct tdm_assist_info_r11_c { + struct drx_assist_info_r11_s_ { + struct drx_cycle_len_r11_e_ { + enum options { sf40, sf64, sf80, sf128, sf160, sf256, spare2, spare1 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_cycle_len_r11_e_() {} + drx_cycle_len_r11_e_(options v) : value(v) {} + drx_cycle_len_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct drx_active_time_r11_e_ { + enum options { sf20, sf30, sf40, sf60, sf80, sf100, spare2, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drx_active_time_r11_e_() {} + drx_active_time_r11_e_(options v) : value(v) {} + drx_active_time_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool drx_offset_r11_present; + drx_cycle_len_r11_e_ drx_cycle_len_r11; + uint8_t drx_offset_r11; + drx_active_time_r11_e_ drx_active_time_r11; + + // sequence methods + drx_assist_info_r11_s_(); + }; + struct types { + enum options { drx_assist_info_r11, idc_sf_pattern_list_r11, /*...*/ nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + tdm_assist_info_r11_c() : type_(types::nulltype) {} + tdm_assist_info_r11_c(const tdm_assist_info_r11_c& other); + tdm_assist_info_r11_c& operator=(const tdm_assist_info_r11_c& other); + ~tdm_assist_info_r11_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + drx_assist_info_r11_s_& drx_assist_info_r11() + { + assert_choice_type("drx-AssistanceInfo-r11", type_.to_string(), "TDM-AssistanceInfo-r11"); + return c.get(); + } + idc_sf_pattern_list_r11_l& idc_sf_pattern_list_r11() + { + assert_choice_type("idc-SubframePatternList-r11", type_.to_string(), "TDM-AssistanceInfo-r11"); + return c.get(); + } + const drx_assist_info_r11_s_& drx_assist_info_r11() const + { + assert_choice_type("drx-AssistanceInfo-r11", type_.to_string(), "TDM-AssistanceInfo-r11"); + return c.get(); + } + const idc_sf_pattern_list_r11_l& idc_sf_pattern_list_r11() const + { + assert_choice_type("idc-SubframePatternList-r11", type_.to_string(), "TDM-AssistanceInfo-r11"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// UE-CapabilityRAT-ContainerList ::= SEQUENCE (SIZE (0..maxRAT-Capabilities)) OF UE-CapabilityRAT-Container +typedef dyn_array ue_cap_rat_container_list_l; + +// UEAssistanceInformation-v1430-IEs ::= SEQUENCE +struct ueassist_info_v1430_ies_s { + struct sps_assist_info_r14_s_ { + // member variables + bool traffic_pattern_info_list_sl_r14_present; + bool traffic_pattern_info_list_ul_r14_present; + traffic_pattern_info_list_r14_l traffic_pattern_info_list_sl_r14; + traffic_pattern_info_list_r14_l traffic_pattern_info_list_ul_r14; + + // sequence methods + sps_assist_info_r14_s_(); + }; + struct rlm_report_r14_s_ { + struct rlm_event_r14_e_ { + enum options { early_out_of_sync, early_in_sync }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rlm_event_r14_e_() {} + rlm_event_r14_e_(options v) : value(v) {} + rlm_event_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct excess_rep_mpdcch_r14_e_ { + enum options { excess_rep1, excess_rep2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + excess_rep_mpdcch_r14_e_() {} + excess_rep_mpdcch_r14_e_(options v) : value(v) {} + excess_rep_mpdcch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool excess_rep_mpdcch_r14_present; + rlm_event_r14_e_ rlm_event_r14; + excess_rep_mpdcch_r14_e_ excess_rep_mpdcch_r14; + + // sequence methods + rlm_report_r14_s_(); + }; + + // member variables + bool bw_pref_r14_present; + bool sps_assist_info_r14_present; + bool rlm_report_r14_present; + bool delay_budget_report_r14_present; + bool non_crit_ext_present; + bw_pref_r14_s bw_pref_r14; + sps_assist_info_r14_s_ sps_assist_info_r14; + rlm_report_r14_s_ rlm_report_r14; + delay_budget_report_r14_c delay_budget_report_r14; + ueassist_info_v1450_ies_s non_crit_ext; + + // sequence methods + ueassist_info_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityInformation-v8a0-IEs ::= SEQUENCE +struct ue_cap_info_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_cap_info_v1250_ies_s non_crit_ext; + + // sequence methods + ue_cap_info_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-v930-IEs ::= SEQUENCE +struct ue_info_resp_v930_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_info_resp_v1020_ies_s non_crit_ext; + + // sequence methods + ue_info_resp_v930_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULHandoverPreparationTransfer-v8a0-IEs ::= SEQUENCE +struct ul_ho_prep_transfer_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + ul_ho_prep_transfer_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransfer-v8a0-IEs ::= SEQUENCE +struct ul_info_transfer_v8a0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + ul_info_transfer_v8a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-Status-r13 ::= ENUMERATED +struct wlan_status_r13_e { + enum options { successful_association, fail_wlan_radio_link, fail_wlan_unavailable, fail_timeout }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + wlan_status_r13_e() {} + wlan_status_r13_e(options v) : value(v) {} + wlan_status_r13_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// WLANConnectionStatusReport-v1430-IEs ::= SEQUENCE +struct wlan_conn_status_report_v1430_ies_s { + // member variables + bool non_crit_ext_present; + wlan_status_v1430_e wlan_status_v1430; + + // sequence methods + wlan_conn_status_report_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSFBParametersRequestCDMA2000-r8-IEs ::= SEQUENCE +struct csfb_params_request_cdma2000_r8_ies_s { + // member variables + bool non_crit_ext_present; + csfb_params_request_cdma2000_v8a0_ies_s non_crit_ext; + + // sequence methods + csfb_params_request_cdma2000_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheckResponse-r8-IEs ::= SEQUENCE +struct counter_check_resp_r8_ies_s { + // member variables + bool non_crit_ext_present; + drb_count_info_list_l drb_count_info_list; + counter_check_resp_v8a0_ies_s non_crit_ext; + + // sequence methods + counter_check_resp_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FailedLogicalChannelInfo-r15 ::= SEQUENCE +struct failed_lc_ch_info_r15_s { + struct failed_lc_ch_id_r15_s_ { + struct cell_group_ind_r15_e_ { + enum options { mn, sn }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + cell_group_ind_r15_e_() {} + cell_group_ind_r15_e_(options v) : value(v) {} + cell_group_ind_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool lc_ch_id_r15_present; + bool lc_ch_id_ext_r15_present; + cell_group_ind_r15_e_ cell_group_ind_r15; + uint8_t lc_ch_id_r15; + uint8_t lc_ch_id_ext_r15; + + // sequence methods + failed_lc_ch_id_r15_s_(); + }; + struct fail_type_e_ { + enum options { dupl, spare3, spare2, spare1 }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + fail_type_e_() {} + fail_type_e_(options v) : value(v) {} + fail_type_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + failed_lc_ch_id_r15_s_ failed_lc_ch_id_r15; + fail_type_e_ fail_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InDeviceCoexIndication-r11-IEs ::= SEQUENCE +struct in_dev_coex_ind_r11_ies_s { + // member variables + bool affected_carrier_freq_list_r11_present; + bool tdm_assist_info_r11_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + affected_carrier_freq_list_r11_l affected_carrier_freq_list_r11; + tdm_assist_info_r11_c tdm_assist_info_r11; + dyn_octstring late_non_crit_ext; + in_dev_coex_ind_v11d0_ies_s non_crit_ext; + + // sequence methods + in_dev_coex_ind_r11_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqRSTDMeasurementIndication-r10-IEs ::= SEQUENCE +struct inter_freq_rstd_meas_ind_r10_ies_s { + struct rstd_inter_freq_ind_r10_c_ { + struct start_s_ { + // member variables + rstd_inter_freq_info_list_r10_l rstd_inter_freq_info_list_r10; + }; + struct types { + enum options { start, stop, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + rstd_inter_freq_ind_r10_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + start_s_& start() + { + assert_choice_type("start", type_.to_string(), "rstd-InterFreqIndication-r10"); + return c; + } + const start_s_& start() const + { + assert_choice_type("start", type_.to_string(), "rstd-InterFreqIndication-r10"); + return c; + } + + private: + types type_; + start_s_ c; + }; + + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + rstd_inter_freq_ind_r10_c_ rstd_inter_freq_ind_r10; + dyn_octstring late_non_crit_ext; + + // sequence methods + inter_freq_rstd_meas_ind_r10_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMSCountingResponse-r10-IEs ::= SEQUENCE +struct mbms_count_resp_r10_ies_s { + // member variables + bool mbsfn_area_idx_r10_present; + bool count_resp_list_r10_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + uint8_t mbsfn_area_idx_r10; + count_resp_list_r10_l count_resp_list_r10; + dyn_octstring late_non_crit_ext; + + // sequence methods + mbms_count_resp_r10_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMSInterestIndication-r11-IEs ::= SEQUENCE +struct mbms_interest_ind_r11_ies_s { + // member variables + bool mbms_freq_list_r11_present; + bool mbms_prio_r11_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + carrier_freq_list_mbms_r11_l mbms_freq_list_r11; + dyn_octstring late_non_crit_ext; + mbms_interest_ind_v1310_ies_s non_crit_ext; + + // sequence methods + mbms_interest_ind_r11_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasReportAppLayer-r15-IEs ::= SEQUENCE +struct meas_report_app_layer_r15_ies_s { + struct service_type_e_ { + enum options { qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1 }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + service_type_e_() {} + service_type_e_(options v) : value(v) {} + service_type_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool meas_report_app_layer_container_r15_present; + bool service_type_present; + bool non_crit_ext_present; + dyn_octstring meas_report_app_layer_container_r15; + service_type_e_ service_type; + + // sequence methods + meas_report_app_layer_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasurementReport-r8-IEs ::= SEQUENCE +struct meas_report_r8_ies_s { + // member variables + bool non_crit_ext_present; + meas_results_s meas_results; + meas_report_v8a0_ies_s non_crit_ext; + + // sequence methods + meas_report_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ProximityIndication-r9-IEs ::= SEQUENCE +struct proximity_ind_r9_ies_s { + struct type_r9_e_ { + enum options { entering, leaving }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + type_r9_e_() {} + type_r9_e_(options v) : value(v) {} + type_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct carrier_freq_r9_c_ { + struct types { + enum options { eutra_r9, utra_r9, /*...*/ eutra2_v9e0, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 1; + static const bool has_ext = true; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + carrier_freq_r9_c_() : type_(types::nulltype) {} + carrier_freq_r9_c_(const carrier_freq_r9_c_& other); + carrier_freq_r9_c_& operator=(const carrier_freq_r9_c_& other); + ~carrier_freq_r9_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& eutra_r9() + { + assert_choice_type("eutra-r9", type_.to_string(), "carrierFreq-r9"); + return c.get(); + } + uint16_t& utra_r9() + { + assert_choice_type("utra-r9", type_.to_string(), "carrierFreq-r9"); + return c.get(); + } + uint32_t& eutra2_v9e0() + { + assert_choice_type("eutra2-v9e0", type_.to_string(), "carrierFreq-r9"); + return c.get(); + } + const uint16_t& eutra_r9() const + { + assert_choice_type("eutra-r9", type_.to_string(), "carrierFreq-r9"); + return c.get(); + } + const uint16_t& utra_r9() const + { + assert_choice_type("utra-r9", type_.to_string(), "carrierFreq-r9"); + return c.get(); + } + const uint32_t& eutra2_v9e0() const + { + assert_choice_type("eutra2-v9e0", type_.to_string(), "carrierFreq-r9"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + + // member variables + bool non_crit_ext_present; + type_r9_e_ type_r9; + carrier_freq_r9_c_ carrier_freq_r9; + proximity_ind_v930_ies_s non_crit_ext; + + // sequence methods + proximity_ind_r9_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RNReconfigurationComplete-r10-IEs ::= SEQUENCE +struct rn_recfg_complete_r10_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + + // sequence methods + rn_recfg_complete_r10_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfigurationComplete-r8-IEs ::= SEQUENCE +struct rrc_conn_recfg_complete_r8_ies_s { + // member variables + bool non_crit_ext_present; + rrc_conn_recfg_complete_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_recfg_complete_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete-r8-IEs ::= SEQUENCE +struct rrc_conn_reest_complete_r8_ies_s { + // member variables + bool non_crit_ext_present; + rrc_conn_reest_complete_v920_ies_s non_crit_ext; + + // sequence methods + rrc_conn_reest_complete_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResumeComplete-r13-IEs ::= SEQUENCE +struct rrc_conn_resume_complete_r13_ies_s { + struct mob_state_r13_e_ { + enum options { normal, medium, high, spare }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mob_state_r13_e_() {} + mob_state_r13_e_(options v) : value(v) {} + mob_state_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool sel_plmn_id_r13_present; + bool ded_info_nas_r13_present; + bool rlf_info_available_r13_present; + bool log_meas_available_r13_present; + bool conn_est_fail_info_available_r13_present; + bool mob_state_r13_present; + bool mob_history_avail_r13_present; + bool log_meas_available_mbsfn_r13_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + uint8_t sel_plmn_id_r13; + dyn_octstring ded_info_nas_r13; + mob_state_r13_e_ mob_state_r13; + dyn_octstring late_non_crit_ext; + rrc_conn_resume_complete_v1530_ies_s non_crit_ext; + + // sequence methods + rrc_conn_resume_complete_r13_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete-r8-IEs ::= SEQUENCE +struct rrc_conn_setup_complete_r8_ies_s { + // member variables + bool registered_mme_present; + bool non_crit_ext_present; + uint8_t sel_plmn_id; + registered_mme_s registered_mme; + dyn_octstring ded_info_nas; + rrc_conn_setup_complete_v8a0_ies_s non_crit_ext; + + // sequence methods + rrc_conn_setup_complete_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformation-r12-IEs ::= SEQUENCE +struct scg_fail_info_r12_ies_s { + // member variables + bool fail_report_scg_r12_present; + bool non_crit_ext_present; + fail_report_scg_r12_s fail_report_scg_r12; + scg_fail_info_v1310_ies_s non_crit_ext; + + // sequence methods + scg_fail_info_r12_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformationNR-r15-IEs ::= SEQUENCE +struct scg_fail_info_nr_r15_ies_s { + // member variables + bool fail_report_scg_nr_r15_present; + bool non_crit_ext_present; + fail_report_scg_nr_r15_s fail_report_scg_nr_r15; + + // sequence methods + scg_fail_info_nr_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeComplete-r8-IEs ::= SEQUENCE +struct security_mode_complete_r8_ies_s { + // member variables + bool non_crit_ext_present; + security_mode_complete_v8a0_ies_s non_crit_ext; + + // sequence methods + security_mode_complete_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeFailure-r8-IEs ::= SEQUENCE +struct security_mode_fail_r8_ies_s { + // member variables + bool non_crit_ext_present; + security_mode_fail_v8a0_ies_s non_crit_ext; + + // sequence methods + security_mode_fail_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SidelinkUEInformation-r12-IEs ::= SEQUENCE +struct sidelink_ue_info_r12_ies_s { + // member variables + bool comm_rx_interested_freq_r12_present; + bool comm_tx_res_req_r12_present; + bool disc_rx_interest_r12_present; + bool disc_tx_res_req_r12_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + uint32_t comm_rx_interested_freq_r12; + sl_comm_tx_res_req_r12_s comm_tx_res_req_r12; + uint8_t disc_tx_res_req_r12; + dyn_octstring late_non_crit_ext; + sidelink_ue_info_v1310_ies_s non_crit_ext; + + // sequence methods + sidelink_ue_info_r12_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEAssistanceInformation-r11-IEs ::= SEQUENCE +struct ueassist_info_r11_ies_s { + struct pwr_pref_ind_r11_e_ { + enum options { normal, low_pwr_consumption }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + pwr_pref_ind_r11_e_() {} + pwr_pref_ind_r11_e_(options v) : value(v) {} + pwr_pref_ind_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool pwr_pref_ind_r11_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + pwr_pref_ind_r11_e_ pwr_pref_ind_r11; + dyn_octstring late_non_crit_ext; + ueassist_info_v1430_ies_s non_crit_ext; + + // sequence methods + ueassist_info_r11_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityInformation-r8-IEs ::= SEQUENCE +struct ue_cap_info_r8_ies_s { + // member variables + bool non_crit_ext_present; + ue_cap_rat_container_list_l ue_cap_rat_container_list; + ue_cap_info_v8a0_ies_s non_crit_ext; + + // sequence methods + ue_cap_info_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-r9-IEs ::= SEQUENCE +struct ue_info_resp_r9_ies_s { + struct rach_report_r9_s_ { + // member variables + uint8_t nof_preambs_sent_r9; + bool contention_detected_r9; + }; + + // member variables + bool rach_report_r9_present; + bool rlf_report_r9_present; + bool non_crit_ext_present; + rach_report_r9_s_ rach_report_r9; + rlf_report_r9_s rlf_report_r9; + ue_info_resp_v930_ies_s non_crit_ext; + + // sequence methods + ue_info_resp_r9_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULHandoverPreparationTransfer-r8-IEs ::= SEQUENCE +struct ul_ho_prep_transfer_r8_ies_s { + // member variables + bool meid_present; + bool non_crit_ext_present; + cdma2000_type_e cdma2000_type; + fixed_bitstring<56> meid; + dyn_octstring ded_info; + ul_ho_prep_transfer_v8a0_ies_s non_crit_ext; + + // sequence methods + ul_ho_prep_transfer_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransfer-r8-IEs ::= SEQUENCE +struct ul_info_transfer_r8_ies_s { + struct ded_info_type_c_ { + struct types { + enum options { ded_info_nas, ded_info_cdma2000_minus1_xrtt, ded_info_cdma2000_hrpd, nulltype }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + ded_info_type_c_() : type_(types::nulltype) {} + ded_info_type_c_(const ded_info_type_c_& other); + ded_info_type_c_& operator=(const ded_info_type_c_& other); + ~ded_info_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + dyn_octstring& ded_info_nas() + { + assert_choice_type("dedicatedInfoNAS", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + dyn_octstring& ded_info_cdma2000_minus1_xrtt() + { + assert_choice_type("dedicatedInfoCDMA2000-1XRTT", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + dyn_octstring& ded_info_cdma2000_hrpd() + { + assert_choice_type("dedicatedInfoCDMA2000-HRPD", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + const dyn_octstring& ded_info_nas() const + { + assert_choice_type("dedicatedInfoNAS", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + const dyn_octstring& ded_info_cdma2000_minus1_xrtt() const + { + assert_choice_type("dedicatedInfoCDMA2000-1XRTT", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + const dyn_octstring& ded_info_cdma2000_hrpd() const + { + assert_choice_type("dedicatedInfoCDMA2000-HRPD", type_.to_string(), "dedicatedInfoType"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool non_crit_ext_present; + ded_info_type_c_ ded_info_type; + ul_info_transfer_v8a0_ies_s non_crit_ext; + + // sequence methods + ul_info_transfer_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransferMRDC-r15-IEs ::= SEQUENCE +struct ul_info_transfer_mrdc_r15_ies_s { + // member variables + bool ul_dcch_msg_nr_r15_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring ul_dcch_msg_nr_r15; + dyn_octstring late_non_crit_ext; + + // sequence methods + ul_info_transfer_mrdc_r15_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLANConnectionStatusReport-r13-IEs ::= SEQUENCE +struct wlan_conn_status_report_r13_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + wlan_status_r13_e wlan_status_r13; + dyn_octstring late_non_crit_ext; + wlan_conn_status_report_v1430_ies_s non_crit_ext; + + // sequence methods + wlan_conn_status_report_r13_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSFBParametersRequestCDMA2000 ::= SEQUENCE +struct csfb_params_request_cdma2000_s { + struct crit_exts_c_ { + struct types { + enum options { csfb_params_request_cdma2000_r8, crit_exts_future, nulltype }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csfb_params_request_cdma2000_r8_ies_s& csfb_params_request_cdma2000_r8() + { + assert_choice_type("csfbParametersRequestCDMA2000-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const csfb_params_request_cdma2000_r8_ies_s& csfb_params_request_cdma2000_r8() const + { + assert_choice_type("csfbParametersRequestCDMA2000-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheckResponse ::= SEQUENCE +struct counter_check_resp_s { + struct crit_exts_c_ { + struct types { + enum options { counter_check_resp_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + counter_check_resp_r8_ies_s& counter_check_resp_r8() + { + assert_choice_type("counterCheckResponse-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const counter_check_resp_r8_ies_s& counter_check_resp_r8() const + { + assert_choice_type("counterCheckResponse-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FailureInformation-r15 ::= SEQUENCE +struct fail_info_r15_s { + // member variables + bool failed_lc_ch_info_r15_present; + failed_lc_ch_info_r15_s failed_lc_ch_info_r15; + + // sequence methods + fail_info_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InDeviceCoexIndication-r11 ::= SEQUENCE +struct in_dev_coex_ind_r11_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { in_dev_coex_ind_r11, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + in_dev_coex_ind_r11_ies_s& in_dev_coex_ind_r11() + { + assert_choice_type("inDeviceCoexIndication-r11", type_.to_string(), "c1"); + return c; + } + const in_dev_coex_ind_r11_ies_s& in_dev_coex_ind_r11() const + { + assert_choice_type("inDeviceCoexIndication-r11", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + in_dev_coex_ind_r11_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqRSTDMeasurementIndication-r10 ::= SEQUENCE +struct inter_freq_rstd_meas_ind_r10_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { inter_freq_rstd_meas_ind_r10, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + inter_freq_rstd_meas_ind_r10_ies_s& inter_freq_rstd_meas_ind_r10() + { + assert_choice_type("interFreqRSTDMeasurementIndication-r10", type_.to_string(), "c1"); + return c; + } + const inter_freq_rstd_meas_ind_r10_ies_s& inter_freq_rstd_meas_ind_r10() const + { + assert_choice_type("interFreqRSTDMeasurementIndication-r10", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + inter_freq_rstd_meas_ind_r10_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMSCountingResponse-r10 ::= SEQUENCE +struct mbms_count_resp_r10_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { count_resp_r10, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mbms_count_resp_r10_ies_s& count_resp_r10() + { + assert_choice_type("countingResponse-r10", type_.to_string(), "c1"); + return c; + } + const mbms_count_resp_r10_ies_s& count_resp_r10() const + { + assert_choice_type("countingResponse-r10", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + mbms_count_resp_r10_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMSInterestIndication-r11 ::= SEQUENCE +struct mbms_interest_ind_r11_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { interest_ind_r11, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + mbms_interest_ind_r11_ies_s& interest_ind_r11() + { + assert_choice_type("interestIndication-r11", type_.to_string(), "c1"); + return c; + } + const mbms_interest_ind_r11_ies_s& interest_ind_r11() const + { + assert_choice_type("interestIndication-r11", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + mbms_interest_ind_r11_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasReportAppLayer-r15 ::= SEQUENCE +struct meas_report_app_layer_r15_s { + struct crit_exts_c_ { + struct types { + enum options { meas_report_app_layer_r15, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_report_app_layer_r15_ies_s& meas_report_app_layer_r15() + { + assert_choice_type("measReportAppLayer-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const meas_report_app_layer_r15_ies_s& meas_report_app_layer_r15() const + { + assert_choice_type("measReportAppLayer-r15", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasurementReport ::= SEQUENCE +struct meas_report_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { meas_report_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_report_r8_ies_s& meas_report_r8() + { + assert_choice_type("measurementReport-r8", type_.to_string(), "c1"); + return c; + } + const meas_report_r8_ies_s& meas_report_r8() const + { + assert_choice_type("measurementReport-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + meas_report_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ProximityIndication-r9 ::= SEQUENCE +struct proximity_ind_r9_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { proximity_ind_r9, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + proximity_ind_r9_ies_s& proximity_ind_r9() + { + assert_choice_type("proximityIndication-r9", type_.to_string(), "c1"); + return c; + } + const proximity_ind_r9_ies_s& proximity_ind_r9() const + { + assert_choice_type("proximityIndication-r9", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + proximity_ind_r9_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RNReconfigurationComplete-r10 ::= SEQUENCE +struct rn_recfg_complete_r10_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rn_recfg_complete_r10, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rn_recfg_complete_r10_ies_s& rn_recfg_complete_r10() + { + assert_choice_type("rnReconfigurationComplete-r10", type_.to_string(), "c1"); + return c; + } + const rn_recfg_complete_r10_ies_s& rn_recfg_complete_r10() const + { + assert_choice_type("rnReconfigurationComplete-r10", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rn_recfg_complete_r10_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReconfigurationComplete ::= SEQUENCE +struct rrc_conn_recfg_complete_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_recfg_complete_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_recfg_complete_r8_ies_s& rrc_conn_recfg_complete_r8() + { + assert_choice_type("rrcConnectionReconfigurationComplete-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_recfg_complete_r8_ies_s& rrc_conn_recfg_complete_r8() const + { + assert_choice_type("rrcConnectionReconfigurationComplete-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionReestablishmentComplete ::= SEQUENCE +struct rrc_conn_reest_complete_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_reest_complete_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_reest_complete_r8_ies_s& rrc_conn_reest_complete_r8() + { + assert_choice_type("rrcConnectionReestablishmentComplete-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_reest_complete_r8_ies_s& rrc_conn_reest_complete_r8() const + { + assert_choice_type("rrcConnectionReestablishmentComplete-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionResumeComplete-r13 ::= SEQUENCE +struct rrc_conn_resume_complete_r13_s { + struct crit_exts_c_ { + struct types { + enum options { rrc_conn_resume_complete_r13, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_resume_complete_r13_ies_s& rrc_conn_resume_complete_r13() + { + assert_choice_type("rrcConnectionResumeComplete-r13", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const rrc_conn_resume_complete_r13_ies_s& rrc_conn_resume_complete_r13() const + { + assert_choice_type("rrcConnectionResumeComplete-r13", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCConnectionSetupComplete ::= SEQUENCE +struct rrc_conn_setup_complete_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { rrc_conn_setup_complete_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + rrc_conn_setup_complete_r8_ies_s& rrc_conn_setup_complete_r8() + { + assert_choice_type("rrcConnectionSetupComplete-r8", type_.to_string(), "c1"); + return c; + } + const rrc_conn_setup_complete_r8_ies_s& rrc_conn_setup_complete_r8() const + { + assert_choice_type("rrcConnectionSetupComplete-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + rrc_conn_setup_complete_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformation-r12 ::= SEQUENCE +struct scg_fail_info_r12_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { scg_fail_info_r12, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scg_fail_info_r12_ies_s& scg_fail_info_r12() + { + assert_choice_type("scgFailureInformation-r12", type_.to_string(), "c1"); + return c; + } + const scg_fail_info_r12_ies_s& scg_fail_info_r12() const + { + assert_choice_type("scgFailureInformation-r12", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + scg_fail_info_r12_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCGFailureInformationNR-r15 ::= SEQUENCE +struct scg_fail_info_nr_r15_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { scg_fail_info_nr_r15, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scg_fail_info_nr_r15_ies_s& scg_fail_info_nr_r15() + { + assert_choice_type("scgFailureInformationNR-r15", type_.to_string(), "c1"); + return c; + } + const scg_fail_info_nr_r15_ies_s& scg_fail_info_nr_r15() const + { + assert_choice_type("scgFailureInformationNR-r15", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + scg_fail_info_nr_r15_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeComplete ::= SEQUENCE +struct security_mode_complete_s { + struct crit_exts_c_ { + struct types { + enum options { security_mode_complete_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + security_mode_complete_r8_ies_s& security_mode_complete_r8() + { + assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const security_mode_complete_r8_ies_s& security_mode_complete_r8() const + { + assert_choice_type("securityModeComplete-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeFailure ::= SEQUENCE +struct security_mode_fail_s { + struct crit_exts_c_ { + struct types { + enum options { security_mode_fail_r8, crit_exts_future, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + security_mode_fail_r8_ies_s& security_mode_fail_r8() + { + assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const security_mode_fail_r8_ies_s& security_mode_fail_r8() const + { + assert_choice_type("securityModeFailure-r8", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SidelinkUEInformation-r12 ::= SEQUENCE +struct sidelink_ue_info_r12_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { sidelink_ue_info_r12, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + sidelink_ue_info_r12_ies_s& sidelink_ue_info_r12() + { + assert_choice_type("sidelinkUEInformation-r12", type_.to_string(), "c1"); + return c; + } + const sidelink_ue_info_r12_ies_s& sidelink_ue_info_r12() const + { + assert_choice_type("sidelinkUEInformation-r12", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + sidelink_ue_info_r12_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEAssistanceInformation-r11 ::= SEQUENCE +struct ueassist_info_r11_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_assist_info_r11, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ueassist_info_r11_ies_s& ue_assist_info_r11() + { + assert_choice_type("ueAssistanceInformation-r11", type_.to_string(), "c1"); + return c; + } + const ueassist_info_r11_ies_s& ue_assist_info_r11() const + { + assert_choice_type("ueAssistanceInformation-r11", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ueassist_info_r11_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityInformation ::= SEQUENCE +struct ue_cap_info_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_cap_info_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_cap_info_r8_ies_s& ue_cap_info_r8() + { + assert_choice_type("ueCapabilityInformation-r8", type_.to_string(), "c1"); + return c; + } + const ue_cap_info_r8_ies_s& ue_cap_info_r8() const + { + assert_choice_type("ueCapabilityInformation-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_cap_info_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-r9 ::= SEQUENCE +struct ue_info_resp_r9_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_info_resp_r9, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_info_resp_r9_ies_s& ue_info_resp_r9() + { + assert_choice_type("ueInformationResponse-r9", type_.to_string(), "c1"); + return c; + } + const ue_info_resp_r9_ies_s& ue_info_resp_r9() const + { + assert_choice_type("ueInformationResponse-r9", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_info_resp_r9_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rrc_transaction_id; + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULHandoverPreparationTransfer ::= SEQUENCE +struct ul_ho_prep_transfer_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ul_ho_prep_transfer_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ul_ho_prep_transfer_r8_ies_s& ul_ho_prep_transfer_r8() + { + assert_choice_type("ulHandoverPreparationTransfer-r8", type_.to_string(), "c1"); + return c; + } + const ul_ho_prep_transfer_r8_ies_s& ul_ho_prep_transfer_r8() const + { + assert_choice_type("ulHandoverPreparationTransfer-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ul_ho_prep_transfer_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransfer ::= SEQUENCE +struct ul_info_transfer_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ul_info_transfer_r8, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ul_info_transfer_r8_ies_s& ul_info_transfer_r8() + { + assert_choice_type("ulInformationTransfer-r8", type_.to_string(), "c1"); + return c; + } + const ul_info_transfer_r8_ies_s& ul_info_transfer_r8() const + { + assert_choice_type("ulInformationTransfer-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ul_info_transfer_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransferMRDC-r15 ::= SEQUENCE +struct ul_info_transfer_mrdc_r15_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ul_info_transfer_mrdc_r15, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ul_info_transfer_mrdc_r15_ies_s& ul_info_transfer_mrdc_r15() + { + assert_choice_type("ulInformationTransferMRDC-r15", type_.to_string(), "c1"); + return c; + } + const ul_info_transfer_mrdc_r15_ies_s& ul_info_transfer_mrdc_r15() const + { + assert_choice_type("ulInformationTransferMRDC-r15", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ul_info_transfer_mrdc_r15_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLANConnectionStatusReport-r13 ::= SEQUENCE +struct wlan_conn_status_report_r13_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { wlan_conn_status_report_r13, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + wlan_conn_status_report_r13_ies_s& wlan_conn_status_report_r13() + { + assert_choice_type("wlanConnectionStatusReport-r13", type_.to_string(), "c1"); + return c; + } + const wlan_conn_status_report_r13_ies_s& wlan_conn_status_report_r13() const + { + assert_choice_type("wlanConnectionStatusReport-r13", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + wlan_conn_status_report_r13_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-DCCH-MessageType ::= CHOICE +struct ul_dcch_msg_type_c { + struct c1_c_ { + struct types { + enum options { + csfb_params_request_cdma2000, + meas_report, + rrc_conn_recfg_complete, + rrc_conn_reest_complete, + rrc_conn_setup_complete, + security_mode_complete, + security_mode_fail, + ue_cap_info, + ul_ho_prep_transfer, + ul_info_transfer, + counter_check_resp, + ue_info_resp_r9, + proximity_ind_r9, + rn_recfg_complete_r10, + mbms_count_resp_r10, + inter_freq_rstd_meas_ind_r10, + nulltype + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + csfb_params_request_cdma2000_s& csfb_params_request_cdma2000() + { + assert_choice_type("csfbParametersRequestCDMA2000", type_.to_string(), "c1"); + return c.get(); + } + meas_report_s& meas_report() + { + assert_choice_type("measurementReport", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_recfg_complete_s& rrc_conn_recfg_complete() + { + assert_choice_type("rrcConnectionReconfigurationComplete", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_reest_complete_s& rrc_conn_reest_complete() + { + assert_choice_type("rrcConnectionReestablishmentComplete", type_.to_string(), "c1"); + return c.get(); + } + rrc_conn_setup_complete_s& rrc_conn_setup_complete() + { + assert_choice_type("rrcConnectionSetupComplete", type_.to_string(), "c1"); + return c.get(); + } + security_mode_complete_s& security_mode_complete() + { + assert_choice_type("securityModeComplete", type_.to_string(), "c1"); + return c.get(); + } + security_mode_fail_s& security_mode_fail() + { + assert_choice_type("securityModeFailure", type_.to_string(), "c1"); + return c.get(); + } + ue_cap_info_s& ue_cap_info() + { + assert_choice_type("ueCapabilityInformation", type_.to_string(), "c1"); + return c.get(); + } + ul_ho_prep_transfer_s& ul_ho_prep_transfer() + { + assert_choice_type("ulHandoverPreparationTransfer", type_.to_string(), "c1"); + return c.get(); + } + ul_info_transfer_s& ul_info_transfer() + { + assert_choice_type("ulInformationTransfer", type_.to_string(), "c1"); + return c.get(); + } + counter_check_resp_s& counter_check_resp() + { + assert_choice_type("counterCheckResponse", type_.to_string(), "c1"); + return c.get(); + } + ue_info_resp_r9_s& ue_info_resp_r9() + { + assert_choice_type("ueInformationResponse-r9", type_.to_string(), "c1"); + return c.get(); + } + proximity_ind_r9_s& proximity_ind_r9() + { + assert_choice_type("proximityIndication-r9", type_.to_string(), "c1"); + return c.get(); + } + rn_recfg_complete_r10_s& rn_recfg_complete_r10() + { + assert_choice_type("rnReconfigurationComplete-r10", type_.to_string(), "c1"); + return c.get(); + } + mbms_count_resp_r10_s& mbms_count_resp_r10() + { + assert_choice_type("mbmsCountingResponse-r10", type_.to_string(), "c1"); + return c.get(); + } + inter_freq_rstd_meas_ind_r10_s& inter_freq_rstd_meas_ind_r10() + { + assert_choice_type("interFreqRSTDMeasurementIndication-r10", type_.to_string(), "c1"); + return c.get(); + } + const csfb_params_request_cdma2000_s& csfb_params_request_cdma2000() const + { + assert_choice_type("csfbParametersRequestCDMA2000", type_.to_string(), "c1"); + return c.get(); + } + const meas_report_s& meas_report() const + { + assert_choice_type("measurementReport", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_recfg_complete_s& rrc_conn_recfg_complete() const + { + assert_choice_type("rrcConnectionReconfigurationComplete", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_reest_complete_s& rrc_conn_reest_complete() const + { + assert_choice_type("rrcConnectionReestablishmentComplete", type_.to_string(), "c1"); + return c.get(); + } + const rrc_conn_setup_complete_s& rrc_conn_setup_complete() const + { + assert_choice_type("rrcConnectionSetupComplete", type_.to_string(), "c1"); + return c.get(); + } + const security_mode_complete_s& security_mode_complete() const + { + assert_choice_type("securityModeComplete", type_.to_string(), "c1"); + return c.get(); + } + const security_mode_fail_s& security_mode_fail() const + { + assert_choice_type("securityModeFailure", type_.to_string(), "c1"); + return c.get(); + } + const ue_cap_info_s& ue_cap_info() const + { + assert_choice_type("ueCapabilityInformation", type_.to_string(), "c1"); + return c.get(); + } + const ul_ho_prep_transfer_s& ul_ho_prep_transfer() const + { + assert_choice_type("ulHandoverPreparationTransfer", type_.to_string(), "c1"); + return c.get(); + } + const ul_info_transfer_s& ul_info_transfer() const + { + assert_choice_type("ulInformationTransfer", type_.to_string(), "c1"); + return c.get(); + } + const counter_check_resp_s& counter_check_resp() const + { + assert_choice_type("counterCheckResponse", type_.to_string(), "c1"); + return c.get(); + } + const ue_info_resp_r9_s& ue_info_resp_r9() const + { + assert_choice_type("ueInformationResponse-r9", type_.to_string(), "c1"); + return c.get(); + } + const proximity_ind_r9_s& proximity_ind_r9() const + { + assert_choice_type("proximityIndication-r9", type_.to_string(), "c1"); + return c.get(); + } + const rn_recfg_complete_r10_s& rn_recfg_complete_r10() const + { + assert_choice_type("rnReconfigurationComplete-r10", type_.to_string(), "c1"); + return c.get(); + } + const mbms_count_resp_r10_s& mbms_count_resp_r10() const + { + assert_choice_type("mbmsCountingResponse-r10", type_.to_string(), "c1"); + return c.get(); + } + const inter_freq_rstd_meas_ind_r10_s& inter_freq_rstd_meas_ind_r10() const + { + assert_choice_type("interFreqRSTDMeasurementIndication-r10", type_.to_string(), "c1"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + struct msg_class_ext_c_ { + struct c2_c_ { + struct types { + enum options { + ue_assist_info_r11, + in_dev_coex_ind_r11, + mbms_interest_ind_r11, + scg_fail_info_r12, + sidelink_ue_info_r12, + wlan_conn_status_report_r13, + rrc_conn_resume_complete_r13, + ul_info_transfer_mrdc_r15, + scg_fail_info_nr_r15, + meas_report_app_layer_r15, + fail_info_r15, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + }; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c2_c_() : type_(types::nulltype) {} + 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; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ueassist_info_r11_s& ue_assist_info_r11() + { + assert_choice_type("ueAssistanceInformation-r11", type_.to_string(), "c2"); + return c.get(); + } + in_dev_coex_ind_r11_s& in_dev_coex_ind_r11() + { + assert_choice_type("inDeviceCoexIndication-r11", type_.to_string(), "c2"); + return c.get(); + } + mbms_interest_ind_r11_s& mbms_interest_ind_r11() + { + assert_choice_type("mbmsInterestIndication-r11", type_.to_string(), "c2"); + return c.get(); + } + scg_fail_info_r12_s& scg_fail_info_r12() + { + assert_choice_type("scgFailureInformation-r12", type_.to_string(), "c2"); + return c.get(); + } + sidelink_ue_info_r12_s& sidelink_ue_info_r12() + { + assert_choice_type("sidelinkUEInformation-r12", type_.to_string(), "c2"); + return c.get(); + } + wlan_conn_status_report_r13_s& wlan_conn_status_report_r13() + { + assert_choice_type("wlanConnectionStatusReport-r13", type_.to_string(), "c2"); + return c.get(); + } + rrc_conn_resume_complete_r13_s& rrc_conn_resume_complete_r13() + { + assert_choice_type("rrcConnectionResumeComplete-r13", type_.to_string(), "c2"); + return c.get(); + } + ul_info_transfer_mrdc_r15_s& ul_info_transfer_mrdc_r15() + { + assert_choice_type("ulInformationTransferMRDC-r15", type_.to_string(), "c2"); + return c.get(); + } + scg_fail_info_nr_r15_s& scg_fail_info_nr_r15() + { + assert_choice_type("scgFailureInformationNR-r15", type_.to_string(), "c2"); + return c.get(); + } + meas_report_app_layer_r15_s& meas_report_app_layer_r15() + { + assert_choice_type("measReportAppLayer-r15", type_.to_string(), "c2"); + return c.get(); + } + fail_info_r15_s& fail_info_r15() + { + assert_choice_type("failureInformation-r15", type_.to_string(), "c2"); + return c.get(); + } + const ueassist_info_r11_s& ue_assist_info_r11() const + { + assert_choice_type("ueAssistanceInformation-r11", type_.to_string(), "c2"); + return c.get(); + } + const in_dev_coex_ind_r11_s& in_dev_coex_ind_r11() const + { + assert_choice_type("inDeviceCoexIndication-r11", type_.to_string(), "c2"); + return c.get(); + } + const mbms_interest_ind_r11_s& mbms_interest_ind_r11() const + { + assert_choice_type("mbmsInterestIndication-r11", type_.to_string(), "c2"); + return c.get(); + } + const scg_fail_info_r12_s& scg_fail_info_r12() const + { + assert_choice_type("scgFailureInformation-r12", type_.to_string(), "c2"); + return c.get(); + } + const sidelink_ue_info_r12_s& sidelink_ue_info_r12() const + { + assert_choice_type("sidelinkUEInformation-r12", type_.to_string(), "c2"); + return c.get(); + } + const wlan_conn_status_report_r13_s& wlan_conn_status_report_r13() const + { + assert_choice_type("wlanConnectionStatusReport-r13", type_.to_string(), "c2"); + return c.get(); + } + const rrc_conn_resume_complete_r13_s& rrc_conn_resume_complete_r13() const + { + assert_choice_type("rrcConnectionResumeComplete-r13", type_.to_string(), "c2"); + return c.get(); + } + const ul_info_transfer_mrdc_r15_s& ul_info_transfer_mrdc_r15() const + { + assert_choice_type("ulInformationTransferMRDC-r15", type_.to_string(), "c2"); + return c.get(); + } + const scg_fail_info_nr_r15_s& scg_fail_info_nr_r15() const + { + assert_choice_type("scgFailureInformationNR-r15", type_.to_string(), "c2"); + return c.get(); + } + const meas_report_app_layer_r15_s& meas_report_app_layer_r15() const + { + assert_choice_type("measReportAppLayer-r15", type_.to_string(), "c2"); + return c.get(); + } + const fail_info_r15_s& fail_info_r15() const + { + assert_choice_type("failureInformation-r15", type_.to_string(), "c2"); + return c.get(); + } + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + struct types { + enum options { c2, msg_class_ext_future_r11, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + msg_class_ext_c_() : type_(types::nulltype) {} + msg_class_ext_c_(const msg_class_ext_c_& other); + msg_class_ext_c_& operator=(const msg_class_ext_c_& other); + ~msg_class_ext_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c2_c_& c2() + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + const c2_c_& c2() const + { + assert_choice_type("c2", type_.to_string(), "messageClassExtension"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types { + enum options { c1, msg_class_ext, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + ul_dcch_msg_type_c() : type_(types::nulltype) {} + ul_dcch_msg_type_c(const ul_dcch_msg_type_c& other); + ul_dcch_msg_type_c& operator=(const ul_dcch_msg_type_c& other); + ~ul_dcch_msg_type_c() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "UL-DCCH-MessageType"); + return c.get(); + } + msg_class_ext_c_& msg_class_ext() + { + assert_choice_type("messageClassExtension", type_.to_string(), "UL-DCCH-MessageType"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "UL-DCCH-MessageType"); + return c.get(); + } + const msg_class_ext_c_& msg_class_ext() const + { + assert_choice_type("messageClassExtension", type_.to_string(), "UL-DCCH-MessageType"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// UL-DCCH-Message ::= SEQUENCE +struct ul_dcch_msg_s { + // member variables + ul_dcch_msg_type_c msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqBandInfo ::= SEQUENCE +struct inter_freq_band_info_s { + // member variables + bool inter_freq_need_for_gaps; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterRAT-BandInfo ::= SEQUENCE +struct inter_rat_band_info_s { + // member variables + bool inter_rat_need_for_gaps; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqBandList ::= SEQUENCE (SIZE (1..maxBands)) OF InterFreqBandInfo +typedef dyn_array inter_freq_band_list_l; + +// InterRAT-BandList ::= SEQUENCE (SIZE (1..maxBands)) OF InterRAT-BandInfo +typedef dyn_array inter_rat_band_list_l; + +// BandInfoEUTRA ::= SEQUENCE +struct band_info_eutra_s { + // member variables + bool inter_rat_band_list_present; + inter_freq_band_list_l inter_freq_band_list; + inter_rat_band_list_l inter_rat_band_list; + + // sequence methods + band_info_eutra_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationListEUTRA-r10 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandInfoEUTRA +typedef dyn_array band_combination_list_eutra_r10_l; + +// MIMO-CapabilityDL-r10 ::= ENUMERATED +struct mimo_cap_dl_r10_e { + enum options { two_layers, four_layers, eight_layers }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mimo_cap_dl_r10_e() {} + mimo_cap_dl_r10_e(options v) : value(v) {} + mimo_cap_dl_r10_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// MIMO-CapabilityUL-r10 ::= ENUMERATED +struct mimo_cap_ul_r10_e { + enum options { two_layers, four_layers }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mimo_cap_ul_r10_e() {} + mimo_cap_ul_r10_e(options v) : value(v) {} + mimo_cap_ul_r10_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// CA-MIMO-ParametersDL-r10 ::= SEQUENCE +struct ca_mimo_params_dl_r10_s { + // member variables + bool supported_mimo_cap_dl_r10_present; + ca_bw_class_r10_e ca_bw_class_dl_r10; + mimo_cap_dl_r10_e supported_mimo_cap_dl_r10; + + // sequence methods + ca_mimo_params_dl_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-MIMO-ParametersUL-r10 ::= SEQUENCE +struct ca_mimo_params_ul_r10_s { + // member variables + bool supported_mimo_cap_ul_r10_present; + ca_bw_class_r10_e ca_bw_class_ul_r10; + mimo_cap_ul_r10_e supported_mimo_cap_ul_r10; + + // sequence methods + ca_mimo_params_ul_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParametersDL-r10 ::= SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF CA-MIMO-ParametersDL-r10 +typedef dyn_array band_params_dl_r10_l; + +// BandParametersUL-r10 ::= SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF CA-MIMO-ParametersUL-r10 +typedef dyn_array band_params_ul_r10_l; + +// BandParameters-r10 ::= SEQUENCE +struct band_params_r10_s { + // member variables + bool band_params_ul_r10_present; + bool band_params_dl_r10_present; + uint8_t band_eutra_r10; + band_params_ul_r10_l band_params_ul_r10; + band_params_dl_r10_l band_params_dl_r10; + + // sequence methods + band_params_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-r10 ::= SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-r10 +typedef dyn_array band_combination_params_r10_l; + +// BandParameters-r11 ::= SEQUENCE +struct band_params_r11_s { + struct supported_csi_proc_r11_e_ { + enum options { n1, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + supported_csi_proc_r11_e_() {} + supported_csi_proc_r11_e_(options v) : value(v) {} + supported_csi_proc_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool band_params_ul_r11_present; + bool band_params_dl_r11_present; + bool supported_csi_proc_r11_present; + uint16_t band_eutra_r11; + band_params_ul_r10_l band_params_ul_r11; + band_params_dl_r10_l band_params_dl_r11; + supported_csi_proc_r11_e_ supported_csi_proc_r11; + + // sequence methods + band_params_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-r11 ::= SEQUENCE +struct band_combination_params_r11_s { + typedef dyn_array band_param_list_r11_l_; + + // member variables + bool ext; + bool supported_bw_combination_set_r11_present; + bool multiple_timing_advance_r11_present; + bool simul_rx_tx_r11_present; + band_param_list_r11_l_ band_param_list_r11; + dyn_bitstring supported_bw_combination_set_r11; + band_info_eutra_s band_info_eutra_r11; + // ... + + // sequence methods + band_combination_params_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IntraBandContiguousCC-Info-r12 ::= SEQUENCE +struct intra_band_contiguous_cc_info_r12_s { + struct supported_csi_proc_r12_e_ { + enum options { n1, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + supported_csi_proc_r12_e_() {} + supported_csi_proc_r12_e_(options v) : value(v) {} + supported_csi_proc_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool four_layer_tm3_tm4_per_cc_r12_present; + bool supported_mimo_cap_dl_r12_present; + bool supported_csi_proc_r12_present; + mimo_cap_dl_r10_e supported_mimo_cap_dl_r12; + supported_csi_proc_r12_e_ supported_csi_proc_r12; + + // sequence methods + intra_band_contiguous_cc_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-MIMO-ParametersDL-r13 ::= SEQUENCE +struct ca_mimo_params_dl_r13_s { + typedef dyn_array intra_band_contiguous_cc_info_list_r13_l_; + + // member variables + bool supported_mimo_cap_dl_r13_present; + bool four_layer_tm3_tm4_r13_present; + ca_bw_class_r10_e ca_bw_class_dl_r13; + mimo_cap_dl_r10_e supported_mimo_cap_dl_r13; + intra_band_contiguous_cc_info_list_r13_l_ intra_band_contiguous_cc_info_list_r13; + + // sequence methods + ca_mimo_params_dl_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParametersDL-r13 ::= CA-MIMO-ParametersDL-r13 +typedef ca_mimo_params_dl_r13_s band_params_dl_r13_s; + +// BandParametersUL-r13 ::= CA-MIMO-ParametersUL-r10 +typedef ca_mimo_params_ul_r10_s band_params_ul_r13_s; + +// BandParameters-r13 ::= SEQUENCE +struct band_params_r13_s { + struct supported_csi_proc_r13_e_ { + enum options { n1, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + supported_csi_proc_r13_e_() {} + supported_csi_proc_r13_e_(options v) : value(v) {} + supported_csi_proc_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool band_params_ul_r13_present; + bool band_params_dl_r13_present; + bool supported_csi_proc_r13_present; + uint16_t band_eutra_r13; + band_params_ul_r13_s band_params_ul_r13; + band_params_dl_r13_s band_params_dl_r13; + supported_csi_proc_r13_e_ supported_csi_proc_r13; + + // sequence methods + band_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-r13 ::= SEQUENCE +struct band_combination_params_r13_s { + typedef dyn_array band_param_list_r13_l_; + struct dc_support_r13_s_ { + struct supported_cell_grouping_r13_c_ { + struct types { + enum options { three_entries_r13, four_entries_r13, five_entries_r13, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + supported_cell_grouping_r13_c_() : type_(types::nulltype) {} + supported_cell_grouping_r13_c_(const supported_cell_grouping_r13_c_& other); + supported_cell_grouping_r13_c_& operator=(const supported_cell_grouping_r13_c_& other); + ~supported_cell_grouping_r13_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<3>& three_entries_r13() + { + assert_choice_type("threeEntries-r13", type_.to_string(), "supportedCellGrouping-r13"); + return c.get >(); + } + fixed_bitstring<7>& four_entries_r13() + { + assert_choice_type("fourEntries-r13", type_.to_string(), "supportedCellGrouping-r13"); + return c.get >(); + } + fixed_bitstring<15>& five_entries_r13() + { + assert_choice_type("fiveEntries-r13", type_.to_string(), "supportedCellGrouping-r13"); + return c.get >(); + } + const fixed_bitstring<3>& three_entries_r13() const + { + assert_choice_type("threeEntries-r13", type_.to_string(), "supportedCellGrouping-r13"); + return c.get >(); + } + const fixed_bitstring<7>& four_entries_r13() const + { + assert_choice_type("fourEntries-r13", type_.to_string(), "supportedCellGrouping-r13"); + return c.get >(); + } + const fixed_bitstring<15>& five_entries_r13() const + { + assert_choice_type("fiveEntries-r13", type_.to_string(), "supportedCellGrouping-r13"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + bool async_r13_present; + bool supported_cell_grouping_r13_present; + supported_cell_grouping_r13_c_ supported_cell_grouping_r13; + + // sequence methods + dc_support_r13_s_(); + }; + + // member variables + bool different_fallback_supported_r13_present; + bool supported_bw_combination_set_r13_present; + bool multiple_timing_advance_r13_present; + bool simul_rx_tx_r13_present; + bool dc_support_r13_present; + bool supported_naics_minus2_crs_ap_r13_present; + bool comm_supported_bands_per_bc_r13_present; + band_param_list_r13_l_ band_param_list_r13; + dyn_bitstring supported_bw_combination_set_r13; + band_info_eutra_s band_info_eutra_r13; + dc_support_r13_s_ dc_support_r13; + dyn_bitstring supported_naics_minus2_crs_ap_r13; + dyn_bitstring comm_supported_bands_per_bc_r13; + + // sequence methods + band_combination_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1090 ::= SEQUENCE +struct band_params_v1090_s { + // member variables + bool ext; + bool band_eutra_v1090_present; + uint16_t band_eutra_v1090; + // ... + + // sequence methods + band_params_v1090_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1090 ::= SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-v1090 +typedef dyn_array band_combination_params_v1090_l; + +// CA-MIMO-ParametersDL-v10i0 ::= SEQUENCE +struct ca_mimo_params_dl_v10i0_s { + // member variables + bool four_layer_tm3_tm4_r10_present; + + // sequence methods + ca_mimo_params_dl_v10i0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v10i0 ::= SEQUENCE +struct band_params_v10i0_s { + typedef dyn_array band_params_dl_v10i0_l_; + + // member variables + band_params_dl_v10i0_l_ band_params_dl_v10i0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v10i0 ::= SEQUENCE +struct band_combination_params_v10i0_s { + typedef dyn_array band_param_list_v10i0_l_; + + // member variables + bool band_param_list_v10i0_present; + band_param_list_v10i0_l_ band_param_list_v10i0; + + // sequence methods + band_combination_params_v10i0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1130 ::= SEQUENCE +struct band_params_v1130_s { + struct supported_csi_proc_r11_e_ { + enum options { n1, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + supported_csi_proc_r11_e_() {} + supported_csi_proc_r11_e_(options v) : value(v) {} + supported_csi_proc_r11_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + supported_csi_proc_r11_e_ supported_csi_proc_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1130 ::= SEQUENCE +struct band_combination_params_v1130_s { + typedef dyn_array band_param_list_r11_l_; + + // member variables + bool ext; + bool multiple_timing_advance_r11_present; + bool simul_rx_tx_r11_present; + bool band_param_list_r11_present; + band_param_list_r11_l_ band_param_list_r11; + // ... + + // sequence methods + band_combination_params_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1250 ::= SEQUENCE +struct band_combination_params_v1250_s { + struct dc_support_r12_s_ { + struct supported_cell_grouping_r12_c_ { + struct types { + enum options { three_entries_r12, four_entries_r12, five_entries_r12, nulltype }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // choice methods + supported_cell_grouping_r12_c_() : type_(types::nulltype) {} + supported_cell_grouping_r12_c_(const supported_cell_grouping_r12_c_& other); + supported_cell_grouping_r12_c_& operator=(const supported_cell_grouping_r12_c_& other); + ~supported_cell_grouping_r12_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + fixed_bitstring<3>& three_entries_r12() + { + assert_choice_type("threeEntries-r12", type_.to_string(), "supportedCellGrouping-r12"); + return c.get >(); + } + fixed_bitstring<7>& four_entries_r12() + { + assert_choice_type("fourEntries-r12", type_.to_string(), "supportedCellGrouping-r12"); + return c.get >(); + } + fixed_bitstring<15>& five_entries_r12() + { + assert_choice_type("fiveEntries-r12", type_.to_string(), "supportedCellGrouping-r12"); + return c.get >(); + } + const fixed_bitstring<3>& three_entries_r12() const + { + assert_choice_type("threeEntries-r12", type_.to_string(), "supportedCellGrouping-r12"); + return c.get >(); + } + const fixed_bitstring<7>& four_entries_r12() const + { + assert_choice_type("fourEntries-r12", type_.to_string(), "supportedCellGrouping-r12"); + return c.get >(); + } + const fixed_bitstring<15>& five_entries_r12() const + { + assert_choice_type("fiveEntries-r12", type_.to_string(), "supportedCellGrouping-r12"); + return c.get >(); + } + + private: + types type_; + choice_buffer_t)> c; + + void destroy_(); + }; + + // member variables + bool async_r12_present; + bool supported_cell_grouping_r12_present; + supported_cell_grouping_r12_c_ supported_cell_grouping_r12; + + // sequence methods + dc_support_r12_s_(); + }; + + // member variables + bool ext; + bool dc_support_r12_present; + bool supported_naics_minus2_crs_ap_r12_present; + bool comm_supported_bands_per_bc_r12_present; + dc_support_r12_s_ dc_support_r12; + dyn_bitstring supported_naics_minus2_crs_ap_r12; + dyn_bitstring comm_supported_bands_per_bc_r12; + // ... + + // sequence methods + band_combination_params_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-MIMO-ParametersDL-v1270 ::= SEQUENCE +struct ca_mimo_params_dl_v1270_s { + typedef dyn_array intra_band_contiguous_cc_info_list_r12_l_; + + // member variables + intra_band_contiguous_cc_info_list_r12_l_ intra_band_contiguous_cc_info_list_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1270 ::= SEQUENCE +struct band_params_v1270_s { + typedef dyn_array band_params_dl_v1270_l_; + + // member variables + band_params_dl_v1270_l_ band_params_dl_v1270; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1270 ::= SEQUENCE +struct band_combination_params_v1270_s { + typedef dyn_array band_param_list_v1270_l_; + + // member variables + bool band_param_list_v1270_present; + band_param_list_v1270_l_ band_param_list_v1270; + + // sequence methods + band_combination_params_v1270_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-BeamformedCapabilities-r13 ::= SEQUENCE +struct mimo_beamformed_capabilities_r13_s { + // member variables + bool n_max_list_r13_present; + uint8_t k_max_r13; + dyn_bitstring n_max_list_r13; + + // sequence methods + mimo_beamformed_capabilities_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-BeamformedCapabilityList-r13 ::= SEQUENCE (SIZE (1..maxCSI-Proc-r11)) OF MIMO-BeamformedCapabilities-r13 +typedef dyn_array mimo_beamformed_cap_list_r13_l; + +// MIMO-NonPrecodedCapabilities-r13 ::= SEQUENCE +struct mimo_non_precoded_capabilities_r13_s { + // member variables + bool cfg1_r13_present; + bool cfg2_r13_present; + bool cfg3_r13_present; + bool cfg4_r13_present; + + // sequence methods + mimo_non_precoded_capabilities_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBCPerTM-r13 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_per_tm_r13_s { + // member variables + bool non_precoded_r13_present; + bool beamformed_r13_present; + bool dmrs_enhance_r13_present; + mimo_non_precoded_capabilities_r13_s non_precoded_r13; + mimo_beamformed_cap_list_r13_l beamformed_r13; + + // sequence methods + mimo_ca_params_per_bo_bc_per_tm_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBC-r13 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_r13_s { + // member variables + bool params_tm9_r13_present; + bool params_tm10_r13_present; + mimo_ca_params_per_bo_bc_per_tm_r13_s params_tm9_r13; + mimo_ca_params_per_bo_bc_per_tm_r13_s params_tm10_r13; + + // sequence methods + mimo_ca_params_per_bo_bc_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1320 ::= SEQUENCE +struct band_params_v1320_s { + // member variables + mimo_ca_params_per_bo_bc_r13_s band_params_dl_v1320; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1320 ::= SEQUENCE +struct band_combination_params_v1320_s { + typedef dyn_array band_param_list_v1320_l_; + + // member variables + bool band_param_list_v1320_present; + bool add_rx_tx_performance_req_r13_present; + band_param_list_v1320_l_ band_param_list_v1320; + + // sequence methods + band_combination_params_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1380 ::= SEQUENCE +struct band_params_v1380_s { + // member variables + bool tx_ant_switch_dl_r13_present; + bool tx_ant_switch_ul_r13_present; + uint8_t tx_ant_switch_dl_r13; + uint8_t tx_ant_switch_ul_r13; + + // sequence methods + band_params_v1380_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1380 ::= SEQUENCE +struct band_combination_params_v1380_s { + typedef dyn_array band_param_list_v1380_l_; + + // member variables + bool band_param_list_v1380_present; + band_param_list_v1380_l_ band_param_list_v1380; + + // sequence methods + band_combination_params_v1380_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBCPerTM-v1430 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_per_tm_v1430_s { + // member variables + bool csi_report_np_r14_present; + bool csi_report_advanced_r14_present; + + // sequence methods + mimo_ca_params_per_bo_bc_per_tm_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBC-v1430 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_v1430_s { + // member variables + bool params_tm9_v1430_present; + bool params_tm10_v1430_present; + mimo_ca_params_per_bo_bc_per_tm_v1430_s params_tm9_v1430; + mimo_ca_params_per_bo_bc_per_tm_v1430_s params_tm10_v1430; + + // sequence methods + mimo_ca_params_per_bo_bc_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RetuningTimeInfo-r14 ::= SEQUENCE +struct retuning_time_info_r14_s { + struct retuning_info_s_ { + struct rf_retuning_time_dl_r14_e_ { + enum options { n0, n0dot5, n1, n1dot5, n2, n2dot5, n3, n3dot5, n4, n4dot5, n5, n5dot5, n6, n6dot5, n7, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rf_retuning_time_dl_r14_e_() {} + rf_retuning_time_dl_r14_e_(options v) : value(v) {} + rf_retuning_time_dl_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + struct rf_retuning_time_ul_r14_e_ { + enum options { n0, n0dot5, n1, n1dot5, n2, n2dot5, n3, n3dot5, n4, n4dot5, n5, n5dot5, n6, n6dot5, n7, spare1 }; + typedef float number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rf_retuning_time_ul_r14_e_() {} + rf_retuning_time_ul_r14_e_(options v) : value(v) {} + rf_retuning_time_ul_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + float to_number() const; + std::string to_number_string() const; + }; + + // member variables + bool rf_retuning_time_dl_r14_present; + bool rf_retuning_time_ul_r14_present; + rf_retuning_time_dl_r14_e_ rf_retuning_time_dl_r14; + rf_retuning_time_ul_r14_e_ rf_retuning_time_ul_r14; + + // sequence methods + retuning_info_s_(); + }; + + // member variables + retuning_info_s_ retuning_info; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-256QAM-perCC-Info-r14 ::= SEQUENCE +struct ul_minus256_qam_per_cc_info_r14_s { + // member variables + bool ul_minus256_qam_per_cc_r14_present; + + // sequence methods + ul_minus256_qam_per_cc_info_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1430 ::= SEQUENCE +struct band_params_v1430_s { + typedef dyn_array ul_minus256_qam_per_cc_info_list_r14_l_; + typedef dyn_array retuning_time_info_band_list_r14_l_; + + // member variables + bool band_params_dl_v1430_present; + bool ul_minus256_qam_r14_present; + bool ul_minus256_qam_per_cc_info_list_r14_present; + bool retuning_time_info_band_list_r14_present; + mimo_ca_params_per_bo_bc_v1430_s band_params_dl_v1430; + ul_minus256_qam_per_cc_info_list_r14_l_ ul_minus256_qam_per_cc_info_list_r14; + retuning_time_info_band_list_r14_l_ retuning_time_info_band_list_r14; + + // sequence methods + band_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1430 ::= SEQUENCE +struct band_combination_params_v1430_s { + typedef dyn_array band_param_list_v1430_l_; + + // member variables + bool band_param_list_v1430_present; + bool v2x_supported_tx_band_comb_list_per_bc_r14_present; + bool v2x_supported_rx_band_comb_list_per_bc_r14_present; + band_param_list_v1430_l_ band_param_list_v1430; + dyn_bitstring v2x_supported_tx_band_comb_list_per_bc_r14; + dyn_bitstring v2x_supported_rx_band_comb_list_per_bc_r14; + + // sequence methods + band_combination_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MUST-Parameters-r14 ::= SEQUENCE +struct must_params_r14_s { + // member variables + bool must_tm234_up_to2_tx_r14_present; + bool must_tm89_up_to_one_interfering_layer_r14_present; + bool must_tm10_up_to_one_interfering_layer_r14_present; + bool must_tm89_up_to_three_interfering_layers_r14_present; + bool must_tm10_up_to_three_interfering_layers_r14_present; + + // sequence methods + must_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1450 ::= SEQUENCE +struct band_params_v1450_s { + // member variables + bool must_cap_per_band_r14_present; + must_params_r14_s must_cap_per_band_r14; + + // sequence methods + band_params_v1450_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1450 ::= SEQUENCE +struct band_combination_params_v1450_s { + typedef dyn_array band_param_list_v1450_l_; + + // member variables + bool band_param_list_v1450_present; + band_param_list_v1450_l_ band_param_list_v1450; + + // sequence methods + band_combination_params_v1450_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBCPerTM-v1470 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_per_tm_v1470_s { + struct csi_report_advanced_max_ports_r14_e_ { + enum options { n8, n12, n16, n20, n24, n28 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_report_advanced_max_ports_r14_e_() {} + csi_report_advanced_max_ports_r14_e_(options v) : value(v) {} + csi_report_advanced_max_ports_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_report_advanced_max_ports_r14_present; + csi_report_advanced_max_ports_r14_e_ csi_report_advanced_max_ports_r14; + + // sequence methods + mimo_ca_params_per_bo_bc_per_tm_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBC-v1470 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_v1470_s { + // member variables + mimo_ca_params_per_bo_bc_per_tm_v1470_s params_tm9_v1470; + mimo_ca_params_per_bo_bc_per_tm_v1470_s params_tm10_v1470; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1470 ::= SEQUENCE +struct band_params_v1470_s { + // member variables + bool band_params_dl_v1470_present; + mimo_ca_params_per_bo_bc_v1470_s band_params_dl_v1470; + + // sequence methods + band_params_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1470 ::= SEQUENCE +struct band_combination_params_v1470_s { + typedef dyn_array band_param_list_v1470_l_; + + // member variables + bool band_param_list_v1470_present; + bool srs_max_simul_ccs_r14_present; + band_param_list_v1470_l_ band_param_list_v1470; + uint8_t srs_max_simul_ccs_r14; + + // sequence methods + band_combination_params_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-UL-CCs-r15 ::= SEQUENCE +struct dl_ul_ccs_r15_s { + // member variables + bool max_num_dl_ccs_r15_present; + bool max_num_ul_ccs_r15_present; + uint8_t max_num_dl_ccs_r15; + uint8_t max_num_ul_ccs_r15; + + // sequence methods + dl_ul_ccs_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-MIMO-ParametersDL-r15 ::= SEQUENCE +struct ca_mimo_params_dl_r15_s { + typedef dyn_array intra_band_contiguous_cc_info_list_r15_l_; + + // member variables + bool supported_mimo_cap_dl_r15_present; + bool four_layer_tm3_tm4_r15_present; + bool intra_band_contiguous_cc_info_list_r15_present; + mimo_cap_dl_r10_e supported_mimo_cap_dl_r15; + intra_band_contiguous_cc_info_list_r15_l_ intra_band_contiguous_cc_info_list_r15; + + // sequence methods + ca_mimo_params_dl_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CA-MIMO-ParametersUL-r15 ::= SEQUENCE +struct ca_mimo_params_ul_r15_s { + // member variables + bool supported_mimo_cap_ul_r15_present; + mimo_cap_ul_r10_e supported_mimo_cap_ul_r15; + + // sequence methods + ca_mimo_params_ul_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// STTI-SupportedCombinations-r15 ::= SEQUENCE +struct stti_supported_combinations_r15_s { + typedef dyn_array combination_minus22_minus27_r15_l_; + typedef dyn_array combination_minus77_minus22_r15_l_; + typedef dyn_array combination_minus77_minus27_r15_l_; + + // member variables + bool combination_minus22_r15_present; + bool combination_minus77_r15_present; + bool combination_minus27_r15_present; + bool combination_minus22_minus27_r15_present; + bool combination_minus77_minus22_r15_present; + bool combination_minus77_minus27_r15_present; + dl_ul_ccs_r15_s combination_minus22_r15; + dl_ul_ccs_r15_s combination_minus77_r15; + dl_ul_ccs_r15_s combination_minus27_r15; + combination_minus22_minus27_r15_l_ combination_minus22_minus27_r15; + combination_minus77_minus22_r15_l_ combination_minus77_minus22_r15; + combination_minus77_minus27_r15_l_ combination_minus77_minus27_r15; + + // sequence methods + stti_supported_combinations_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// STTI-SPT-BandParameters-r15 ::= SEQUENCE +struct stti_spt_band_params_r15_s { + struct s_tti_supported_csi_proc_r15_e_ { + enum options { n1, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + s_tti_supported_csi_proc_r15_e_() {} + s_tti_supported_csi_proc_r15_e_(options v) : value(v) {} + s_tti_supported_csi_proc_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool dl_minus1024_qam_slot_r15_present; + bool dl_minus1024_qam_subslot_ta_minus1_r15_present; + bool dl_minus1024_qam_subslot_ta_minus2_r15_present; + bool simul_tx_different_tx_dur_r15_present; + bool s_tti_ca_mimo_params_dl_r15_present; + bool s_tti_fd_mimo_coexistence_present; + bool s_tti_mimo_ca_params_per_bo_bcs_r15_present; + bool s_tti_mimo_ca_params_per_bo_bcs_v1530_present; + bool s_tti_supported_combinations_r15_present; + bool s_tti_supported_csi_proc_r15_present; + bool ul_minus256_qam_slot_r15_present; + bool ul_minus256_qam_subslot_r15_present; + ca_mimo_params_dl_r15_s s_tti_ca_mimo_params_dl_r15; + ca_mimo_params_ul_r15_s s_tti_ca_mimo_params_ul_r15; + mimo_ca_params_per_bo_bc_r13_s s_tti_mimo_ca_params_per_bo_bcs_r15; + mimo_ca_params_per_bo_bc_v1430_s s_tti_mimo_ca_params_per_bo_bcs_v1530; + stti_supported_combinations_r15_s s_tti_supported_combinations_r15; + s_tti_supported_csi_proc_r15_e_ s_tti_supported_csi_proc_r15; + // ... + + // sequence methods + stti_spt_band_params_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParameters-v1530 ::= SEQUENCE +struct band_params_v1530_s { + // member variables + bool ue_tx_ant_sel_srs_minus1_t4_r_r15_present; + bool ue_tx_ant_sel_srs_minus2_t4_r_minus2_pairs_r15_present; + bool ue_tx_ant_sel_srs_minus2_t4_r_minus3_pairs_r15_present; + bool dl_minus1024_qam_r15_present; + bool qcl_type_c_operation_r15_present; + bool qcl_cri_based_csi_report_r15_present; + bool stti_spt_band_params_r15_present; + stti_spt_band_params_r15_s stti_spt_band_params_r15; + + // sequence methods + band_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPT-Parameters-r15 ::= SEQUENCE +struct spt_params_r15_s { + // member variables + bool frame_structure_type_spt_r15_present; + bool max_num_ccs_spt_r15_present; + fixed_bitstring<3> frame_structure_type_spt_r15; + uint8_t max_num_ccs_spt_r15; + + // sequence methods + spt_params_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1530 ::= SEQUENCE +struct band_combination_params_v1530_s { + typedef dyn_array band_param_list_v1530_l_; + + // member variables + bool band_param_list_v1530_present; + bool spt_params_r15_present; + band_param_list_v1530_l_ band_param_list_v1530; + spt_params_r15_s spt_params_r15; + + // sequence methods + band_combination_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParametersExt-r10 ::= SEQUENCE +struct band_combination_params_ext_r10_s { + // member variables + bool supported_bw_combination_set_r10_present; + dyn_bitstring supported_bw_combination_set_r10; + + // sequence methods + band_combination_params_ext_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandListEUTRA ::= SEQUENCE (SIZE (1..maxBands)) OF BandInfoEUTRA +typedef dyn_array band_list_eutra_l; + +// V2X-BandwidthClass-r14 ::= ENUMERATED +struct v2x_bw_class_r14_e { + enum options { a, b, c, d, e, f, /*...*/ c1_v1530 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 1; + static const bool has_ext = true; + + // enumerated methods + v2x_bw_class_r14_e() {} + v2x_bw_class_r14_e(options v) : value(v) {} + v2x_bw_class_r14_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// V2X-BandwidthClassSL-r14 ::= SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF V2X-BandwidthClass-r14 +typedef bounded_array v2x_bw_class_sl_r14_l; + +// BandParametersRxSL-r14 ::= SEQUENCE +struct band_params_rx_sl_r14_s { + // member variables + bool v2x_high_reception_r14_present; + v2x_bw_class_sl_r14_l v2x_bw_class_rx_sl_r14; + + // sequence methods + band_params_rx_sl_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandParametersTxSL-r14 ::= SEQUENCE +struct band_params_tx_sl_r14_s { + // member variables + bool v2x_e_nb_sched_r14_present; + bool v2x_high_pwr_r14_present; + v2x_bw_class_sl_r14_l v2x_bw_class_tx_sl_r14; + + // sequence methods + band_params_tx_sl_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeatureSetDL-PerCC-r15 ::= SEQUENCE +struct feature_set_dl_per_cc_r15_s { + struct supported_csi_proc_r15_e_ { + enum options { n1, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + supported_csi_proc_r15_e_() {} + supported_csi_proc_r15_e_(options v) : value(v) {} + supported_csi_proc_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool four_layer_tm3_tm4_r15_present; + bool supported_mimo_cap_dl_r15_present; + bool supported_csi_proc_r15_present; + mimo_cap_dl_r10_e supported_mimo_cap_dl_r15; + supported_csi_proc_r15_e_ supported_csi_proc_r15; + + // sequence methods + feature_set_dl_per_cc_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBCPerTM-r15 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_per_tm_r15_s { + // member variables + bool non_precoded_r13_present; + bool beamformed_r13_present; + bool dmrs_enhance_r13_present; + bool csi_report_np_r14_present; + bool csi_report_advanced_r14_present; + mimo_non_precoded_capabilities_r13_s non_precoded_r13; + mimo_beamformed_cap_list_r13_l beamformed_r13; + + // sequence methods + mimo_ca_params_per_bo_bc_per_tm_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-CA-ParametersPerBoBC-r15 ::= SEQUENCE +struct mimo_ca_params_per_bo_bc_r15_s { + // member variables + bool params_tm9_r15_present; + bool params_tm10_r15_present; + mimo_ca_params_per_bo_bc_per_tm_r15_s params_tm9_r15; + mimo_ca_params_per_bo_bc_per_tm_r15_s params_tm10_r15; + + // sequence methods + mimo_ca_params_per_bo_bc_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeatureSetDL-r15 ::= SEQUENCE +struct feature_set_dl_r15_s { + typedef bounded_array feature_set_per_cc_list_dl_r15_l_; + + // member variables + bool mimo_ca_params_per_bo_bc_r15_present; + mimo_ca_params_per_bo_bc_r15_s mimo_ca_params_per_bo_bc_r15; + feature_set_per_cc_list_dl_r15_l_ feature_set_per_cc_list_dl_r15; + + // sequence methods + feature_set_dl_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeatureSetUL-PerCC-r15 ::= SEQUENCE +struct feature_set_ul_per_cc_r15_s { + // member variables + bool supported_mimo_cap_ul_r15_present; + bool ul_minus256_qam_r15_present; + mimo_cap_ul_r10_e supported_mimo_cap_ul_r15; + + // sequence methods + feature_set_ul_per_cc_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeatureSetUL-r15 ::= SEQUENCE +struct feature_set_ul_r15_s { + typedef bounded_array feature_set_per_cc_list_ul_r15_l_; + + // member variables + feature_set_per_cc_list_ul_r15_l_ feature_set_per_cc_list_ul_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeatureSetsEUTRA-r15 ::= SEQUENCE +struct feature_sets_eutra_r15_s { + typedef dyn_array feature_sets_dl_r15_l_; + typedef dyn_array feature_sets_dl_per_cc_r15_l_; + typedef dyn_array feature_sets_ul_r15_l_; + typedef dyn_array feature_sets_ul_per_cc_r15_l_; + + // member variables + bool ext; + bool feature_sets_dl_r15_present; + bool feature_sets_dl_per_cc_r15_present; + bool feature_sets_ul_r15_present; + bool feature_sets_ul_per_cc_r15_present; + feature_sets_dl_r15_l_ feature_sets_dl_r15; + feature_sets_dl_per_cc_r15_l_ feature_sets_dl_per_cc_r15; + feature_sets_ul_r15_l_ feature_sets_ul_r15; + feature_sets_ul_per_cc_r15_l_ feature_sets_ul_per_cc_r15; + // ... + + // sequence methods + feature_sets_eutra_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqBandIndicatorListEUTRA-r12 ::= SEQUENCE (SIZE (1..maxBands)) OF INTEGER +typedef dyn_array freq_band_ind_list_eutra_r12_l; + +// SupportedBandList1XRTT ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandclassCDMA2000 +typedef bounded_array supported_band_list1_xrtt_l; + +// IRAT-ParametersCDMA2000-1XRTT ::= SEQUENCE +struct irat_params_cdma2000_minus1_xrtt_s { + struct tx_cfg1_xrtt_e_ { + enum options { single, dual }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_cfg1_xrtt_e_() {} + tx_cfg1_xrtt_e_(options v) : value(v) {} + tx_cfg1_xrtt_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct rx_cfg1_xrtt_e_ { + enum options { single, dual }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rx_cfg1_xrtt_e_() {} + rx_cfg1_xrtt_e_(options v) : value(v) {} + rx_cfg1_xrtt_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + supported_band_list1_xrtt_l supported_band_list1_xrtt; + tx_cfg1_xrtt_e_ tx_cfg1_xrtt; + rx_cfg1_xrtt_e_ rx_cfg1_xrtt; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandListHRPD ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandclassCDMA2000 +typedef bounded_array supported_band_list_hrpd_l; + +// IRAT-ParametersCDMA2000-HRPD ::= SEQUENCE +struct irat_params_cdma2000_hrpd_s { + struct tx_cfg_hrpd_e_ { + enum options { single, dual }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_cfg_hrpd_e_() {} + tx_cfg_hrpd_e_(options v) : value(v) {} + tx_cfg_hrpd_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + struct rx_cfg_hrpd_e_ { + enum options { single, dual }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rx_cfg_hrpd_e_() {} + rx_cfg_hrpd_e_(options v) : value(v) {} + rx_cfg_hrpd_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + supported_band_list_hrpd_l supported_band_list_hrpd; + tx_cfg_hrpd_e_ tx_cfg_hrpd; + rx_cfg_hrpd_e_ rx_cfg_hrpd; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandGERAN ::= ENUMERATED +struct supported_band_geran_e { + enum options { + gsm450, + gsm480, + gsm710, + gsm750, + gsm810, + gsm850, + gsm900_p, + gsm900_e, + gsm900_r, + gsm1800, + gsm1900, + spare5, + spare4, + spare3, + spare2, + spare1, + // ... + }; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + supported_band_geran_e() {} + supported_band_geran_e(options v) : value(v) {} + supported_band_geran_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SupportedBandListGERAN ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandGERAN +typedef dyn_array supported_band_list_geran_l; + +// IRAT-ParametersGERAN ::= SEQUENCE +struct irat_params_geran_s { + // member variables + supported_band_list_geran_l supported_band_list_geran; + bool inter_rat_ps_ho_to_geran; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandNR-r15 ::= SEQUENCE +struct supported_band_nr_r15_s { + // member variables + uint16_t band_nr_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandListNR-r15 ::= SEQUENCE (SIZE (1..maxBandsNR-r15)) OF SupportedBandNR-r15 +typedef dyn_array supported_band_list_nr_r15_l; + +// IRAT-ParametersNR-r15 ::= SEQUENCE +struct irat_params_nr_r15_s { + // member variables + bool en_dc_r15_present; + bool event_b2_r15_present; + bool supported_band_list_nr_r15_present; + supported_band_list_nr_r15_l supported_band_list_nr_r15; + + // sequence methods + irat_params_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandUTRA-FDD ::= ENUMERATED +struct supported_band_utra_fdd_e { + enum options { + band_i, + band_ii, + band_iii, + band_iv, + band_v, + band_vi, + band_vii, + band_viii, + band_ix, + band_x, + band_xi, + band_xii, + band_xiii, + band_xiv, + band_xv, + band_xvi, + // ... + band_xvii_minus8a0, + band_xviii_minus8a0, + band_xix_minus8a0, + band_xx_minus8a0, + band_xxi_minus8a0, + band_xxii_minus8a0, + band_xxiii_minus8a0, + band_xxiv_minus8a0, + band_xxv_minus8a0, + band_xxvi_minus8a0, + band_xxvii_minus8a0, + band_xxviii_minus8a0, + band_xxix_minus8a0, + band_xxx_minus8a0, + band_xxxi_minus8a0, + band_xxxii_minus8a0 + }; + + options value; + static const uint32_t nof_types = 32, nof_exts = 16; + static const bool has_ext = true; + + // enumerated methods + supported_band_utra_fdd_e() {} + supported_band_utra_fdd_e(options v) : value(v) {} + supported_band_utra_fdd_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SupportedBandListUTRA-FDD ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-FDD +typedef dyn_array supported_band_list_utra_fdd_l; + +// IRAT-ParametersUTRA-FDD ::= SEQUENCE +struct irat_params_utra_fdd_s { + // member variables + supported_band_list_utra_fdd_l supported_band_list_utra_fdd; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandUTRA-TDD128 ::= ENUMERATED +struct supported_band_utra_tdd128_e { + enum options { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, /*...*/ }; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + supported_band_utra_tdd128_e() {} + supported_band_utra_tdd128_e(options v) : value(v) {} + supported_band_utra_tdd128_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SupportedBandListUTRA-TDD128 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-TDD128 +typedef dyn_array supported_band_list_utra_tdd128_l; + +// IRAT-ParametersUTRA-TDD128 ::= SEQUENCE +struct irat_params_utra_tdd128_s { + // member variables + supported_band_list_utra_tdd128_l supported_band_list_utra_tdd128; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandUTRA-TDD384 ::= ENUMERATED +struct supported_band_utra_tdd384_e { + enum options { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, /*...*/ }; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + supported_band_utra_tdd384_e() {} + supported_band_utra_tdd384_e(options v) : value(v) {} + supported_band_utra_tdd384_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SupportedBandListUTRA-TDD384 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-TDD384 +typedef dyn_array supported_band_list_utra_tdd384_l; + +// IRAT-ParametersUTRA-TDD384 ::= SEQUENCE +struct irat_params_utra_tdd384_s { + // member variables + supported_band_list_utra_tdd384_l supported_band_list_utra_tdd384; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandUTRA-TDD768 ::= ENUMERATED +struct supported_band_utra_tdd768_e { + enum options { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, /*...*/ }; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + supported_band_utra_tdd768_e() {} + supported_band_utra_tdd768_e(options v) : value(v) {} + supported_band_utra_tdd768_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; +}; + +// SupportedBandListUTRA-TDD768 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-TDD768 +typedef dyn_array supported_band_list_utra_tdd768_l; + +// IRAT-ParametersUTRA-TDD768 ::= SEQUENCE +struct irat_params_utra_tdd768_s { + // member variables + supported_band_list_utra_tdd768_l supported_band_list_utra_tdd768; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersWLAN-r13 ::= SEQUENCE +struct irat_params_wlan_r13_s { + typedef bounded_array supported_band_list_wlan_r13_l_; + + // member variables + bool supported_band_list_wlan_r13_present; + supported_band_list_wlan_r13_l_ supported_band_list_wlan_r13; + + // sequence methods + irat_params_wlan_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ProcessingTimelineSet-r15 ::= ENUMERATED +struct processing_timeline_set_r15_e { + enum options { set1, set2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + processing_timeline_set_r15_e() {} + processing_timeline_set_r15_e(options v) : value(v) {} + processing_timeline_set_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// SkipSubframeProcessing-r15 ::= SEQUENCE +struct skip_sf_processing_r15_s { + // member variables + bool skip_processing_dl_slot_r15_present; + bool skip_processing_dl_sub_slot_r15_present; + bool skip_processing_ul_slot_r15_present; + bool skip_processing_ul_sub_slot_r15_present; + uint8_t skip_processing_dl_slot_r15; + uint8_t skip_processing_dl_sub_slot_r15; + uint8_t skip_processing_ul_slot_r15; + uint8_t skip_processing_ul_sub_slot_r15; + + // sequence methods + skip_sf_processing_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-Parameters-v1530 ::= SEQUENCE +struct mac_params_v1530_s { + typedef bounded_array min_proc_timeline_subslot_r15_l_; + + // member variables + bool min_proc_timeline_subslot_r15_present; + bool skip_sf_processing_r15_present; + bool early_data_up_r15_present; + bool dormant_scell_state_r15_present; + bool direct_scell_activation_r15_present; + bool direct_scell_hibernation_r15_present; + bool extended_lcid_dupl_r15_present; + bool sps_serving_cell_r15_present; + min_proc_timeline_subslot_r15_l_ min_proc_timeline_subslot_r15; + skip_sf_processing_r15_s skip_sf_processing_r15; + + // sequence methods + mac_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-BeamformedCapabilities-r13 ::= SEQUENCE +struct mimo_ue_beamformed_capabilities_r13_s { + // member variables + bool alt_codebook_r13_present; + mimo_beamformed_cap_list_r13_l mimo_beamformed_capabilities_r13; + + // sequence methods + mimo_ue_beamformed_capabilities_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-ParametersPerTM-r13 ::= SEQUENCE +struct mimo_ue_params_per_tm_r13_s { + // member variables + bool non_precoded_r13_present; + bool beamformed_r13_present; + bool ch_meas_restrict_r13_present; + bool dmrs_enhance_r13_present; + bool csi_rs_enhance_tdd_r13_present; + mimo_non_precoded_capabilities_r13_s non_precoded_r13; + mimo_ue_beamformed_capabilities_r13_s beamformed_r13; + + // sequence methods + mimo_ue_params_per_tm_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-Parameters-r13 ::= SEQUENCE +struct mimo_ue_params_r13_s { + // member variables + bool params_tm9_r13_present; + bool params_tm10_r13_present; + bool srs_enhance_tdd_r13_present; + bool srs_enhance_r13_present; + bool interference_meas_restrict_r13_present; + mimo_ue_params_per_tm_r13_s params_tm9_r13; + mimo_ue_params_per_tm_r13_s params_tm10_r13; + + // sequence methods + mimo_ue_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-ParametersPerTM-v1430 ::= SEQUENCE +struct mimo_ue_params_per_tm_v1430_s { + struct nzp_csi_rs_aperiodic_info_r14_s_ { + struct n_max_res_r14_e_ { + enum options { ffs1, ffs2, ffs3, ffs4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n_max_res_r14_e_() {} + n_max_res_r14_e_(options v) : value(v) {} + n_max_res_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + uint8_t n_max_proc_r14; + n_max_res_r14_e_ n_max_res_r14; + }; + struct nzp_csi_rs_periodic_info_r14_s_ { + struct n_max_res_r14_e_ { + enum options { ffs1, ffs2, ffs3, ffs4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + n_max_res_r14_e_() {} + n_max_res_r14_e_(options v) : value(v) {} + n_max_res_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + n_max_res_r14_e_ n_max_res_r14; + }; + + // member variables + bool nzp_csi_rs_aperiodic_info_r14_present; + bool nzp_csi_rs_periodic_info_r14_present; + bool zp_csi_rs_aperiodic_info_r14_present; + bool ul_dmrs_enhance_r14_present; + bool density_reduction_np_r14_present; + bool density_reduction_bf_r14_present; + bool hybrid_csi_r14_present; + bool semi_ol_r14_present; + bool csi_report_np_r14_present; + bool csi_report_advanced_r14_present; + nzp_csi_rs_aperiodic_info_r14_s_ nzp_csi_rs_aperiodic_info_r14; + nzp_csi_rs_periodic_info_r14_s_ nzp_csi_rs_periodic_info_r14; + + // sequence methods + mimo_ue_params_per_tm_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-Parameters-v1430 ::= SEQUENCE +struct mimo_ue_params_v1430_s { + // member variables + bool params_tm9_v1430_present; + bool params_tm10_v1430_present; + mimo_ue_params_per_tm_v1430_s params_tm9_v1430; + mimo_ue_params_per_tm_v1430_s params_tm10_v1430; + + // sequence methods + mimo_ue_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-ParametersPerTM-v1470 ::= SEQUENCE +struct mimo_ue_params_per_tm_v1470_s { + struct csi_report_advanced_max_ports_r14_e_ { + enum options { n8, n12, n16, n20, n24, n28 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + csi_report_advanced_max_ports_r14_e_() {} + csi_report_advanced_max_ports_r14_e_(options v) : value(v) {} + csi_report_advanced_max_ports_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool csi_report_advanced_max_ports_r14_present; + csi_report_advanced_max_ports_r14_e_ csi_report_advanced_max_ports_r14; + + // sequence methods + mimo_ue_params_per_tm_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIMO-UE-Parameters-v1470 ::= SEQUENCE +struct mimo_ue_params_v1470_s { + // member variables + mimo_ue_params_per_tm_v1470_s params_tm9_v1470; + mimo_ue_params_per_tm_v1470_s params_tm10_v1470; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters ::= SEQUENCE +struct meas_params_s { + // member variables + band_list_eutra_l band_list_eutra; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1020 ::= SEQUENCE +struct meas_params_v1020_s { + // member variables + band_combination_list_eutra_r10_l band_combination_list_eutra_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NAICS-Capability-Entry-r12 ::= SEQUENCE +struct naics_cap_entry_r12_s { + struct nof_aggregated_prb_r12_e_ { + enum options { n50, n75, n100, n125, n150, n175, n200, n225, n250, n275, n300, n350, n400, n450, n500, spare }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + nof_aggregated_prb_r12_e_() {} + nof_aggregated_prb_r12_e_(options v) : value(v) {} + nof_aggregated_prb_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + uint8_t nof_naics_capable_cc_r12; + nof_aggregated_prb_r12_e_ nof_aggregated_prb_r12; + // ... + + // sequence methods + naics_cap_entry_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NAICS-Capability-List-r12 ::= SEQUENCE (SIZE (1..maxNAICS-Entries-r12)) OF NAICS-Capability-Entry-r12 +typedef dyn_array naics_cap_list_r12_l; + +// NonContiguousUL-RA-WithinCC-r10 ::= SEQUENCE +struct non_contiguous_ul_ra_within_cc_r10_s { + // member variables + bool non_contiguous_ul_ra_within_cc_info_r10_present; + + // sequence methods + non_contiguous_ul_ra_within_cc_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NonContiguousUL-RA-WithinCC-List-r10 ::= SEQUENCE (SIZE (1..maxBands)) OF NonContiguousUL-RA-WithinCC-r10 +typedef dyn_array non_contiguous_ul_ra_within_cc_list_r10_l; + +// ROHC-ProfileSupportList-r15 ::= SEQUENCE +struct rohc_profile_support_list_r15_s { + // member variables + bool profile0x0001_r15; + bool profile0x0002_r15; + bool profile0x0003_r15; + bool profile0x0004_r15; + bool profile0x0006_r15; + bool profile0x0101_r15; + bool profile0x0102_r15; + bool profile0x0103_r15; + bool profile0x0104_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-Parameters ::= SEQUENCE +struct pdcp_params_s { + struct max_num_rohc_context_sessions_e_ { + enum options { + cs2, + cs4, + cs8, + cs12, + cs16, + cs24, + cs32, + cs48, + cs64, + cs128, + cs256, + cs512, + cs1024, + cs16384, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_rohc_context_sessions_e_() {} + max_num_rohc_context_sessions_e_(options v) : value(v) {} + max_num_rohc_context_sessions_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool ext; + bool max_num_rohc_context_sessions_present; + rohc_profile_support_list_r15_s supported_rohc_profiles; + max_num_rohc_context_sessions_e_ max_num_rohc_context_sessions; + // ... + + // sequence methods + pdcp_params_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedOperatorDic-r15 ::= SEQUENCE +struct supported_operator_dic_r15_s { + // member variables + uint8_t version_of_dictionary_r15; + plmn_id_s associated_plmn_id_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedUDC-r15 ::= SEQUENCE +struct supported_udc_r15_s { + // member variables + bool supported_standard_dic_r15_present; + bool supported_operator_dic_r15_present; + supported_operator_dic_r15_s supported_operator_dic_r15; + + // sequence methods + supported_udc_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-Parameters-v1530 ::= SEQUENCE +struct pdcp_params_v1530_s { + // member variables + bool supported_udc_r15_present; + bool pdcp_dupl_r15_present; + supported_udc_r15_s supported_udc_r15; + + // sequence methods + pdcp_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-ParametersNR-r15 ::= SEQUENCE +struct pdcp_params_nr_r15_s { + struct rohc_context_max_sessions_r15_e_ { + enum options { + cs2, + cs4, + cs8, + cs12, + cs16, + cs24, + cs32, + cs48, + cs64, + cs128, + cs256, + cs512, + cs1024, + cs16384, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + rohc_context_max_sessions_r15_e_() {} + rohc_context_max_sessions_r15_e_(options v) : value(v) {} + rohc_context_max_sessions_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct rohc_profiles_ul_only_r15_s_ { + // member variables + bool profile0x0006_r15; + }; + + // member variables + bool rohc_context_max_sessions_r15_present; + bool rohc_context_continue_r15_present; + bool out_of_order_delivery_r15_present; + bool sn_size_lo_r15_present; + bool ims_voice_over_nr_pdcp_mcg_bearer_r15_present; + bool ims_voice_over_nr_pdcp_scg_bearer_r15_present; + rohc_profile_support_list_r15_s rohc_profiles_r15; + rohc_context_max_sessions_r15_e_ rohc_context_max_sessions_r15; + rohc_profiles_ul_only_r15_s_ rohc_profiles_ul_only_r15; + + // sequence methods + pdcp_params_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1020 ::= SEQUENCE +struct phy_layer_params_v1020_s { + // member variables + bool two_ant_ports_for_pucch_r10_present; + bool tm9_with_minus8_tx_fdd_r10_present; + bool pmi_disabling_r10_present; + bool cross_carrier_sched_r10_present; + bool simul_pucch_pusch_r10_present; + bool multi_cluster_pusch_within_cc_r10_present; + bool non_contiguous_ul_ra_within_cc_list_r10_present; + non_contiguous_ul_ra_within_cc_list_r10_l non_contiguous_ul_ra_within_cc_list_r10; + + // sequence methods + phy_layer_params_v1020_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1250 ::= SEQUENCE +struct phy_layer_params_v1250_s { + // member variables + bool e_harq_pattern_fdd_r12_present; + bool enhanced_minus4_tx_codebook_r12_present; + bool tdd_fdd_ca_pcell_duplex_r12_present; + bool phy_tdd_re_cfg_tdd_pcell_r12_present; + bool phy_tdd_re_cfg_fdd_pcell_r12_present; + bool pusch_feedback_mode_r12_present; + bool pusch_srs_pwr_ctrl_sf_set_r12_present; + bool csi_sf_set_r12_present; + bool no_res_restrict_for_tti_bundling_r12_present; + bool discovery_signals_in_deact_scell_r12_present; + bool naics_cap_list_r12_present; + fixed_bitstring<2> tdd_fdd_ca_pcell_duplex_r12; + naics_cap_list_r12_l naics_cap_list_r12; + + // sequence methods + phy_layer_params_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1320 ::= SEQUENCE +struct phy_layer_params_v1320_s { + // member variables + bool mimo_ue_params_r13_present; + mimo_ue_params_r13_s mimo_ue_params_r13; + + // sequence methods + phy_layer_params_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1330 ::= SEQUENCE +struct phy_layer_params_v1330_s { + // member variables + bool cch_interf_mitigation_ref_rec_type_a_r13_present; + bool cch_interf_mitigation_ref_rec_type_b_r13_present; + bool cch_interf_mitigation_max_num_ccs_r13_present; + bool crs_interf_mitigation_tm1to_tm9_r13_present; + uint8_t cch_interf_mitigation_max_num_ccs_r13; + uint8_t crs_interf_mitigation_tm1to_tm9_r13; + + // sequence methods + phy_layer_params_v1330_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeMBMS-Unicast-Parameters-r14 ::= SEQUENCE +struct fe_mbms_unicast_params_r14_s { + // member variables + bool unicast_fembms_mixed_scell_r14_present; + bool empty_unicast_region_r14_present; + + // sequence methods + fe_mbms_unicast_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1430 ::= SEQUENCE +struct phy_layer_params_v1430_s { + struct ce_pdsch_pusch_max_bw_r14_e_ { + enum options { bw5, bw20 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ce_pdsch_pusch_max_bw_r14_e_() {} + ce_pdsch_pusch_max_bw_r14_e_(options v) : value(v) {} + ce_pdsch_pusch_max_bw_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct ce_retuning_symbols_r14_e_ { + enum options { n0, n1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ce_retuning_symbols_r14_e_() {} + ce_retuning_symbols_r14_e_(options v) : value(v) {} + ce_retuning_symbols_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ce_pusch_nb_max_tbs_r14_present; + bool ce_pdsch_pusch_max_bw_r14_present; + bool ce_harq_ack_bundling_r14_present; + bool ce_pdsch_ten_processes_r14_present; + bool ce_retuning_symbols_r14_present; + bool ce_pdsch_pusch_enhancement_r14_present; + bool ce_sched_enhancement_r14_present; + bool ce_srs_enhancement_r14_present; + bool ce_pucch_enhancement_r14_present; + bool ce_closed_loop_tx_ant_sel_r14_present; + bool tdd_special_sf_r14_present; + bool tdd_tti_bundling_r14_present; + bool dmrs_less_up_pts_r14_present; + bool mimo_ue_params_v1430_present; + bool alternative_tbs_idx_r14_present; + bool fe_mbms_unicast_params_r14_present; + ce_pdsch_pusch_max_bw_r14_e_ ce_pdsch_pusch_max_bw_r14; + ce_retuning_symbols_r14_e_ ce_retuning_symbols_r14; + mimo_ue_params_v1430_s mimo_ue_params_v1430; + fe_mbms_unicast_params_r14_s fe_mbms_unicast_params_r14; + + // sequence methods + phy_layer_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1470 ::= SEQUENCE +struct phy_layer_params_v1470_s { + // member variables + bool mimo_ue_params_v1470_present; + bool srs_up_pts_minus6sym_r14_present; + mimo_ue_params_v1470_s mimo_ue_params_v1470; + + // sequence methods + phy_layer_params_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1530 ::= SEQUENCE +struct phy_layer_params_v1530_s { + struct stti_spt_capabilities_r15_s_ { + struct max_layers_slot_or_subslot_pusch_r15_e_ { + enum options { one_layer, two_layers, four_layers }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_layers_slot_or_subslot_pusch_r15_e_() {} + max_layers_slot_or_subslot_pusch_r15_e_(options v) : value(v) {} + max_layers_slot_or_subslot_pusch_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct sps_stti_r15_e_ { + enum options { slot, subslot, slot_and_subslot }; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sps_stti_r15_e_() {} + sps_stti_r15_e_(options v) : value(v) {} + sps_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool aperiodic_csi_report_stti_r15_present; + bool dmrs_based_spdcch_mbsfn_r15_present; + bool dmrs_based_spdcch_non_mbsfn_r15_present; + bool dmrs_position_pattern_r15_present; + bool dmrs_sharing_subslot_pdsch_r15_present; + bool dmrs_repeat_subslot_pdsch_r15_present; + bool epdcch_spt_different_cells_r15_present; + bool epdcch_stti_different_cells_r15_present; + bool max_layers_slot_or_subslot_pusch_r15_present; + bool max_num_updated_csi_proc_spt_r15_present; + bool max_num_updated_csi_proc_stti_comb77_r15_present; + bool max_num_updated_csi_proc_stti_comb27_r15_present; + bool max_num_updated_csi_proc_stti_comb22_set1_r15_present; + bool max_num_updated_csi_proc_stti_comb22_set2_r15_present; + bool mimo_ue_params_stti_r15_present; + bool mimo_ue_params_stti_v1530_present; + bool nof_blind_decodes_uss_r15_present; + bool pdsch_slot_subslot_pdsch_decoding_r15_present; + bool pwr_uci_slot_pusch_present; + bool pwr_uci_subslot_pusch_present; + bool slot_pdsch_tx_div_tm9and10_present; + bool subslot_pdsch_tx_div_tm9and10_present; + bool spdcch_different_rs_types_r15_present; + bool srs_dci7_triggering_fs2_r15_present; + bool sps_cyclic_shift_r15_present; + bool spdcch_reuse_r15_present; + bool sps_stti_r15_present; + bool tm8_slot_pdsch_r15_present; + bool tm9_slot_subslot_r15_present; + bool tm9_slot_subslot_mbsfn_r15_present; + bool tm10_slot_subslot_r15_present; + bool tm10_slot_subslot_mbsfn_r15_present; + bool tx_div_spucch_r15_present; + bool ul_async_harq_sharing_diff_tti_lens_r15_present; + max_layers_slot_or_subslot_pusch_r15_e_ max_layers_slot_or_subslot_pusch_r15; + uint8_t max_num_updated_csi_proc_spt_r15; + uint8_t max_num_updated_csi_proc_stti_comb77_r15; + uint8_t max_num_updated_csi_proc_stti_comb27_r15; + uint8_t max_num_updated_csi_proc_stti_comb22_set1_r15; + uint8_t max_num_updated_csi_proc_stti_comb22_set2_r15; + mimo_ue_params_r13_s mimo_ue_params_stti_r15; + mimo_ue_params_v1430_s mimo_ue_params_stti_v1530; + uint8_t nof_blind_decodes_uss_r15; + sps_stti_r15_e_ sps_stti_r15; + + // sequence methods + stti_spt_capabilities_r15_s_(); + }; + struct ce_capabilities_r15_s_ { + // member variables + bool ce_crs_intf_mitig_r15_present; + bool ce_cqi_alternative_table_r15_present; + bool ce_pdsch_flex_start_prb_ce_mode_a_r15_present; + bool ce_pdsch_flex_start_prb_ce_mode_b_r15_present; + bool ce_pdsch_minus64_qam_r15_present; + bool ce_pusch_flex_start_prb_ce_mode_a_r15_present; + bool ce_pusch_flex_start_prb_ce_mode_b_r15_present; + bool ce_pusch_sub_prb_alloc_r15_present; + bool ce_ul_harq_ack_feedback_r15_present; + + // sequence methods + ce_capabilities_r15_s_(); + }; + struct urllc_capabilities_r15_s_ { + // member variables + bool pdsch_rep_sf_r15_present; + bool pdsch_rep_slot_r15_present; + bool pdsch_rep_subslot_r15_present; + bool pusch_sps_multi_cfg_sf_r15_present; + bool pusch_sps_max_cfg_sf_r15_present; + bool pusch_sps_multi_cfg_slot_r15_present; + bool pusch_sps_max_cfg_slot_r15_present; + bool pusch_sps_multi_cfg_subslot_r15_present; + bool pusch_sps_max_cfg_subslot_r15_present; + bool pusch_sps_slot_rep_pcell_r15_present; + bool pusch_sps_slot_rep_ps_cell_r15_present; + bool pusch_sps_slot_rep_scell_r15_present; + bool pusch_sps_sf_rep_pcell_r15_present; + bool pusch_sps_sf_rep_ps_cell_r15_present; + bool pusch_sps_sf_rep_scell_r15_present; + bool pusch_sps_subslot_rep_pcell_r15_present; + bool pusch_sps_subslot_rep_ps_cell_r15_present; + bool pusch_sps_subslot_rep_scell_r15_present; + bool semi_static_cfi_r15_present; + bool semi_static_cfi_pattern_r15_present; + uint8_t pusch_sps_multi_cfg_sf_r15; + uint8_t pusch_sps_max_cfg_sf_r15; + uint8_t pusch_sps_multi_cfg_slot_r15; + uint8_t pusch_sps_max_cfg_slot_r15; + uint8_t pusch_sps_multi_cfg_subslot_r15; + uint8_t pusch_sps_max_cfg_subslot_r15; + + // sequence methods + urllc_capabilities_r15_s_(); + }; + + // member variables + bool stti_spt_capabilities_r15_present; + bool ce_capabilities_r15_present; + bool short_cqi_for_scell_activation_r15_present; + bool mimo_cbsr_advanced_csi_r15_present; + bool crs_intf_mitig_r15_present; + bool ul_pwr_ctrl_enhance_r15_present; + bool urllc_capabilities_r15_present; + bool alt_mcs_table_r15_present; + stti_spt_capabilities_r15_s_ stti_spt_capabilities_r15; + ce_capabilities_r15_s_ ce_capabilities_r15; + urllc_capabilities_r15_s_ urllc_capabilities_r15; + + // sequence methods + phy_layer_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandEUTRA ::= SEQUENCE +struct supported_band_eutra_s { + // member variables + uint8_t band_eutra; + bool half_duplex; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandListEUTRA ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA +typedef dyn_array supported_band_list_eutra_l; + +// RF-Parameters ::= SEQUENCE +struct rf_params_s { + // member variables + supported_band_list_eutra_l supported_band_list_eutra; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-r10 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-r10 +typedef dyn_array supported_band_combination_r10_l; + +// RF-Parameters-v1020 ::= SEQUENCE +struct rf_params_v1020_s { + // member variables + supported_band_combination_r10_l supported_band_combination_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombinationExt-r10 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParametersExt-r10 +typedef dyn_array supported_band_combination_ext_r10_l; + +// RF-Parameters-v1060 ::= SEQUENCE +struct rf_params_v1060_s { + // member variables + supported_band_combination_ext_r10_l supported_band_combination_ext_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1090 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1090 +typedef dyn_array supported_band_combination_v1090_l; + +// RF-Parameters-v1090 ::= SEQUENCE +struct rf_params_v1090_s { + // member variables + bool supported_band_combination_v1090_present; + supported_band_combination_v1090_l supported_band_combination_v1090; + + // sequence methods + rf_params_v1090_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v10i0 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v10i0 +typedef dyn_array supported_band_combination_v10i0_l; + +// RF-Parameters-v10i0 ::= SEQUENCE +struct rf_params_v10i0_s { + // member variables + bool supported_band_combination_v10i0_present; + supported_band_combination_v10i0_l supported_band_combination_v10i0; + + // sequence methods + rf_params_v10i0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1130 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1130 +typedef dyn_array supported_band_combination_v1130_l; + +// RF-Parameters-v1130 ::= SEQUENCE +struct rf_params_v1130_s { + // member variables + bool supported_band_combination_v1130_present; + supported_band_combination_v1130_l supported_band_combination_v1130; + + // sequence methods + rf_params_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombinationAdd-r11 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-r11 +typedef dyn_array supported_band_combination_add_r11_l; + +// RF-Parameters-v1180 ::= SEQUENCE +struct rf_params_v1180_s { + typedef dyn_array requested_bands_r11_l_; + + // member variables + bool freq_band_retrieval_r11_present; + bool requested_bands_r11_present; + bool supported_band_combination_add_r11_present; + requested_bands_r11_l_ requested_bands_r11; + supported_band_combination_add_r11_l supported_band_combination_add_r11; + + // sequence methods + rf_params_v1180_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombinationAdd-v11d0 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v10i0 +typedef dyn_array supported_band_combination_add_v11d0_l; + +// RF-Parameters-v11d0 ::= SEQUENCE +struct rf_params_v11d0_s { + // member variables + bool supported_band_combination_add_v11d0_present; + supported_band_combination_add_v11d0_l supported_band_combination_add_v11d0; + + // sequence methods + rf_params_v11d0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandEUTRA-v1250 ::= SEQUENCE +struct supported_band_eutra_v1250_s { + // member variables + bool dl_minus256_qam_r12_present; + bool ul_minus64_qam_r12_present; + + // sequence methods + supported_band_eutra_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1250 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1250 +typedef dyn_array supported_band_combination_v1250_l; + +// SupportedBandCombinationAdd-v1250 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1250 +typedef dyn_array supported_band_combination_add_v1250_l; + +// SupportedBandListEUTRA-v1250 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v1250 +typedef dyn_array supported_band_list_eutra_v1250_l; + +// RF-Parameters-v1250 ::= SEQUENCE +struct rf_params_v1250_s { + // member variables + bool supported_band_list_eutra_v1250_present; + bool supported_band_combination_v1250_present; + bool supported_band_combination_add_v1250_present; + bool freq_band_prio_adjustment_r12_present; + supported_band_list_eutra_v1250_l supported_band_list_eutra_v1250; + supported_band_combination_v1250_l supported_band_combination_v1250; + supported_band_combination_add_v1250_l supported_band_combination_add_v1250; + + // sequence methods + rf_params_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1270 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1270 +typedef dyn_array supported_band_combination_v1270_l; + +// SupportedBandCombinationAdd-v1270 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1270 +typedef dyn_array supported_band_combination_add_v1270_l; + +// RF-Parameters-v1270 ::= SEQUENCE +struct rf_params_v1270_s { + // member variables + bool supported_band_combination_v1270_present; + bool supported_band_combination_add_v1270_present; + supported_band_combination_v1270_l supported_band_combination_v1270; + supported_band_combination_add_v1270_l supported_band_combination_add_v1270; + + // sequence methods + rf_params_v1270_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandEUTRA-v1310 ::= SEQUENCE +struct supported_band_eutra_v1310_s { + // member variables + bool ue_pwr_class_minus5_r13_present; + + // sequence methods + supported_band_eutra_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombinationReduced-r13 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-r13 +typedef dyn_array supported_band_combination_reduced_r13_l; + +// SupportedBandListEUTRA-v1310 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v1310 +typedef dyn_array supported_band_list_eutra_v1310_l; + +// RF-Parameters-v1310 ::= SEQUENCE +struct rf_params_v1310_s { + struct e_nb_requested_params_r13_s_ { + // member variables + bool reduced_int_non_cont_comb_requested_r13_present; + bool requested_ccs_dl_r13_present; + bool requested_ccs_ul_r13_present; + bool skip_fallback_comb_requested_r13_present; + uint8_t requested_ccs_dl_r13; + uint8_t requested_ccs_ul_r13; + + // sequence methods + e_nb_requested_params_r13_s_(); + }; + + // member variables + bool e_nb_requested_params_r13_present; + bool maximum_ccs_retrieval_r13_present; + bool skip_fallback_combinations_r13_present; + bool reduced_int_non_cont_comb_r13_present; + bool supported_band_list_eutra_v1310_present; + bool supported_band_combination_reduced_r13_present; + e_nb_requested_params_r13_s_ e_nb_requested_params_r13; + supported_band_list_eutra_v1310_l supported_band_list_eutra_v1310; + supported_band_combination_reduced_r13_l supported_band_combination_reduced_r13; + + // sequence methods + rf_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandEUTRA-v1320 ::= SEQUENCE +struct supported_band_eutra_v1320_s { + struct ue_pwr_class_n_r13_e_ { + enum options { class1, class2, class4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_pwr_class_n_r13_e_() {} + ue_pwr_class_n_r13_e_(options v) : value(v) {} + ue_pwr_class_n_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool intra_freq_ce_need_for_gaps_r13_present; + bool ue_pwr_class_n_r13_present; + ue_pwr_class_n_r13_e_ ue_pwr_class_n_r13; + + // sequence methods + supported_band_eutra_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1320 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1320 +typedef dyn_array supported_band_combination_v1320_l; + +// SupportedBandCombinationAdd-v1320 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1320 +typedef dyn_array supported_band_combination_add_v1320_l; + +// SupportedBandCombinationReduced-v1320 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1320 +typedef dyn_array supported_band_combination_reduced_v1320_l; + +// SupportedBandListEUTRA-v1320 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v1320 +typedef dyn_array supported_band_list_eutra_v1320_l; + +// RF-Parameters-v1320 ::= SEQUENCE +struct rf_params_v1320_s { + // member variables + bool supported_band_list_eutra_v1320_present; + bool supported_band_combination_v1320_present; + bool supported_band_combination_add_v1320_present; + bool supported_band_combination_reduced_v1320_present; + supported_band_list_eutra_v1320_l supported_band_list_eutra_v1320; + supported_band_combination_v1320_l supported_band_combination_v1320; + supported_band_combination_add_v1320_l supported_band_combination_add_v1320; + supported_band_combination_reduced_v1320_l supported_band_combination_reduced_v1320; + + // sequence methods + rf_params_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1380 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1380 +typedef dyn_array supported_band_combination_v1380_l; + +// SupportedBandCombinationAdd-v1380 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1380 +typedef dyn_array supported_band_combination_add_v1380_l; + +// SupportedBandCombinationReduced-v1380 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1380 +typedef dyn_array supported_band_combination_reduced_v1380_l; + +// RF-Parameters-v1380 ::= SEQUENCE +struct rf_params_v1380_s { + // member variables + bool supported_band_combination_v1380_present; + bool supported_band_combination_add_v1380_present; + bool supported_band_combination_reduced_v1380_present; + supported_band_combination_v1380_l supported_band_combination_v1380; + supported_band_combination_add_v1380_l supported_band_combination_add_v1380; + supported_band_combination_reduced_v1380_l supported_band_combination_reduced_v1380; + + // sequence methods + rf_params_v1380_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationParameters-v1390 ::= SEQUENCE +struct band_combination_params_v1390_s { + // member variables + bool ue_ca_pwr_class_n_r13_present; + + // sequence methods + band_combination_params_v1390_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1390 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1390 +typedef dyn_array supported_band_combination_v1390_l; + +// SupportedBandCombinationAdd-v1390 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1390 +typedef dyn_array supported_band_combination_add_v1390_l; + +// SupportedBandCombinationReduced-v1390 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1390 +typedef dyn_array supported_band_combination_reduced_v1390_l; + +// RF-Parameters-v1390 ::= SEQUENCE +struct rf_params_v1390_s { + // member variables + bool supported_band_combination_v1390_present; + bool supported_band_combination_add_v1390_present; + bool supported_band_combination_reduced_v1390_present; + supported_band_combination_v1390_l supported_band_combination_v1390; + supported_band_combination_add_v1390_l supported_band_combination_add_v1390; + supported_band_combination_reduced_v1390_l supported_band_combination_reduced_v1390; + + // sequence methods + rf_params_v1390_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1430 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1430 +typedef dyn_array supported_band_combination_v1430_l; + +// SupportedBandCombinationAdd-v1430 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1430 +typedef dyn_array supported_band_combination_add_v1430_l; + +// SupportedBandCombinationReduced-v1430 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1430 +typedef dyn_array supported_band_combination_reduced_v1430_l; + +// RF-Parameters-v1430 ::= SEQUENCE +struct rf_params_v1430_s { + struct e_nb_requested_params_v1430_s_ { + // member variables + band_combination_list_r14_l requested_diff_fallback_comb_list_r14; + }; + + // member variables + bool supported_band_combination_v1430_present; + bool supported_band_combination_add_v1430_present; + bool supported_band_combination_reduced_v1430_present; + bool e_nb_requested_params_v1430_present; + bool diff_fallback_comb_report_r14_present; + supported_band_combination_v1430_l supported_band_combination_v1430; + supported_band_combination_add_v1430_l supported_band_combination_add_v1430; + supported_band_combination_reduced_v1430_l supported_band_combination_reduced_v1430; + e_nb_requested_params_v1430_s_ e_nb_requested_params_v1430; + + // sequence methods + rf_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1450 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1450 +typedef dyn_array supported_band_combination_v1450_l; + +// SupportedBandCombinationAdd-v1450 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1450 +typedef dyn_array supported_band_combination_add_v1450_l; + +// SupportedBandCombinationReduced-v1450 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1450 +typedef dyn_array supported_band_combination_reduced_v1450_l; + +// RF-Parameters-v1450 ::= SEQUENCE +struct rf_params_v1450_s { + // member variables + bool supported_band_combination_v1450_present; + bool supported_band_combination_add_v1450_present; + bool supported_band_combination_reduced_v1450_present; + supported_band_combination_v1450_l supported_band_combination_v1450; + supported_band_combination_add_v1450_l supported_band_combination_add_v1450; + supported_band_combination_reduced_v1450_l supported_band_combination_reduced_v1450; + + // sequence methods + rf_params_v1450_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1470 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1470 +typedef dyn_array supported_band_combination_v1470_l; + +// SupportedBandCombinationAdd-v1470 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1470 +typedef dyn_array supported_band_combination_add_v1470_l; + +// SupportedBandCombinationReduced-v1470 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1470 +typedef dyn_array supported_band_combination_reduced_v1470_l; + +// RF-Parameters-v1470 ::= SEQUENCE +struct rf_params_v1470_s { + // member variables + bool supported_band_combination_v1470_present; + bool supported_band_combination_add_v1470_present; + bool supported_band_combination_reduced_v1470_present; + supported_band_combination_v1470_l supported_band_combination_v1470; + supported_band_combination_add_v1470_l supported_band_combination_add_v1470; + supported_band_combination_reduced_v1470_l supported_band_combination_reduced_v1470; + + // sequence methods + rf_params_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandCombination-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1530 +typedef dyn_array supported_band_combination_v1530_l; + +// SupportedBandCombinationAdd-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1530 +typedef dyn_array supported_band_combination_add_v1530_l; + +// SupportedBandCombinationReduced-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1530 +typedef dyn_array supported_band_combination_reduced_v1530_l; + +// RF-Parameters-v1530 ::= SEQUENCE +struct rf_params_v1530_s { + // member variables + bool s_tti_spt_supported_r15_present; + bool supported_band_combination_v1530_present; + bool supported_band_combination_add_v1530_present; + bool supported_band_combination_reduced_v1530_present; + bool pwr_class_minus14dbm_r15_present; + supported_band_combination_v1530_l supported_band_combination_v1530; + supported_band_combination_add_v1530_l supported_band_combination_add_v1530; + supported_band_combination_reduced_v1530_l supported_band_combination_reduced_v1530; + + // sequence methods + rf_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandEUTRA-v9e0 ::= SEQUENCE +struct supported_band_eutra_v9e0_s { + // member variables + bool band_eutra_v9e0_present; + uint16_t band_eutra_v9e0; + + // sequence methods + supported_band_eutra_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandListEUTRA-v9e0 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v9e0 +typedef dyn_array supported_band_list_eutra_v9e0_l; + +// RF-Parameters-v9e0 ::= SEQUENCE +struct rf_params_v9e0_s { + // member variables + bool supported_band_list_eutra_v9e0_present; + supported_band_list_eutra_v9e0_l supported_band_list_eutra_v9e0; + + // sequence methods + rf_params_v9e0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandInfo-r12 ::= SEQUENCE +struct supported_band_info_r12_s { + // member variables + bool support_r12_present; + + // sequence methods + supported_band_info_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SupportedBandInfoList-r12 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandInfo-r12 +typedef dyn_array supported_band_info_list_r12_l; + +// SL-Parameters-r12 ::= SEQUENCE +struct sl_params_r12_s { + struct disc_supported_proc_r12_e_ { + enum options { n50, n400 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + disc_supported_proc_r12_e_() {} + disc_supported_proc_r12_e_(options v) : value(v) {} + disc_supported_proc_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool comm_simul_tx_r12_present; + bool comm_supported_bands_r12_present; + bool disc_supported_bands_r12_present; + bool disc_sched_res_alloc_r12_present; + bool disc_ue_sel_res_alloc_r12_present; + bool disc_slss_r12_present; + bool disc_supported_proc_r12_present; + freq_band_ind_list_eutra_r12_l comm_supported_bands_r12; + supported_band_info_list_r12_l disc_supported_bands_r12; + disc_supported_proc_r12_e_ disc_supported_proc_r12; + + // sequence methods + sl_params_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// V2X-BandParameters-r14 ::= SEQUENCE +struct v2x_band_params_r14_s { + // member variables + bool band_params_tx_sl_r14_present; + bool band_params_rx_sl_r14_present; + uint16_t v2x_freq_band_eutra_r14; + band_params_tx_sl_r14_s band_params_tx_sl_r14; + band_params_rx_sl_r14_s band_params_rx_sl_r14; + + // sequence methods + v2x_band_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// V2X-BandCombinationParameters-r14 ::= SEQUENCE (SIZE (1.. maxSimultaneousBands-r10)) OF V2X-BandParameters-r14 +typedef dyn_array v2x_band_combination_params_r14_l; + +// V2X-SupportedBandCombination-r14 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF V2X-BandCombinationParameters-r14 +typedef dyn_array v2x_supported_band_combination_r14_l; + +// SL-Parameters-v1430 ::= SEQUENCE +struct sl_params_v1430_s { + // member variables + bool zone_based_pool_sel_r14_present; + bool ue_autonomous_with_full_sensing_r14_present; + bool ue_autonomous_with_partial_sensing_r14_present; + bool sl_congestion_ctrl_r14_present; + bool v2x_tx_with_short_resv_interv_r14_present; + bool v2x_num_tx_rx_timing_r14_present; + bool v2x_non_adjacent_pscch_pssch_r14_present; + bool slss_tx_rx_r14_present; + bool v2x_supported_band_combination_list_r14_present; + uint8_t v2x_num_tx_rx_timing_r14; + v2x_supported_band_combination_r14_l v2x_supported_band_combination_list_r14; + + // sequence methods + sl_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// V2X-BandParameters-v1530 ::= SEQUENCE +struct v2x_band_params_v1530_s { + // member variables + bool v2x_enhanced_high_reception_r15_present; + + // sequence methods + v2x_band_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// V2X-BandCombinationParameters-v1530 ::= SEQUENCE (SIZE (1.. maxSimultaneousBands-r10)) OF V2X-BandParameters-v1530 +typedef dyn_array v2x_band_combination_params_v1530_l; + +// UE-CategorySL-r15 ::= SEQUENCE +struct ue_category_sl_r15_s { + // member variables + uint8_t ue_category_sl_c_tx_r15; + uint8_t ue_category_sl_c_rx_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// V2X-SupportedBandCombination-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF V2X-BandCombinationParameters-v1530 +typedef dyn_array v2x_supported_band_combination_v1530_l; + +// SL-Parameters-v1530 ::= SEQUENCE +struct sl_params_v1530_s { + struct slss_supported_tx_freq_r15_e_ { + enum options { single, multiple }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + slss_supported_tx_freq_r15_e_() {} + slss_supported_tx_freq_r15_e_(options v) : value(v) {} + slss_supported_tx_freq_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool slss_supported_tx_freq_r15_present; + bool sl_minus64_qam_tx_r15_present; + bool sl_tx_diversity_r15_present; + bool ue_category_sl_r15_present; + bool v2x_supported_band_combination_list_v1530_present; + slss_supported_tx_freq_r15_e_ slss_supported_tx_freq_r15; + ue_category_sl_r15_s ue_category_sl_r15; + v2x_supported_band_combination_v1530_l v2x_supported_band_combination_list_v1530; + + // sequence methods + sl_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// N1SPUCCH-AN-PersistentList-r15 ::= SEQUENCE (SIZE (1..4)) OF INTEGER +typedef bounded_array n1_spucch_an_persistent_list_r15_l; + +// SPS-ConfigDL-STTI-r15 ::= CHOICE +struct sps_cfg_dl_stti_r15_c { + struct setup_s_ { + struct semi_persist_sched_interv_dl_stti_r15_e_ { + enum options { + s_tti1, + s_tti2, + s_tti3, + s_tti4, + s_tti6, + s_tti8, + s_tti12, + s_tti16, + s_tti20, + s_tti40, + s_tti60, + s_tti80, + s_tti120, + s_tti240, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + semi_persist_sched_interv_dl_stti_r15_e_() {} + semi_persist_sched_interv_dl_stti_r15_e_(options v) : value(v) {} + semi_persist_sched_interv_dl_stti_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct two_ant_port_activ_r15_c_ { + struct setup_s_ { + // member variables + n1_spucch_an_persistent_list_r15_l n1_spucch_an_persistent_list_p1_r15; + }; + typedef setup_e types; + + // choice methods + two_ant_port_activ_r15_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivated-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "twoAntennaPortActivated-r15"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool ext; + bool two_ant_port_activ_r15_present; + bool tpc_pdcch_cfg_pucch_sps_r15_present; + semi_persist_sched_interv_dl_stti_r15_e_ semi_persist_sched_interv_dl_stti_r15; + uint8_t nof_conf_sps_processes_stti_r15; + two_ant_port_activ_r15_c_ two_ant_port_activ_r15; + uint8_t s_tti_start_time_dl_r15; + tpc_pdcch_cfg_c tpc_pdcch_cfg_pucch_sps_r15; + // ... + + // sequence methods + setup_s_(); + }; + typedef setup_e types; + + // choice methods + sps_cfg_dl_stti_r15_c() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigDL-STTI-r15"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "SPS-ConfigDL-STTI-r15"); + return c; + } + +private: + types type_; + setup_s_ c; +}; + +// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE +struct neigh_cell_si_acquisition_params_v1530_s { + // member variables + bool report_cgi_nr_en_dc_r15_present; + bool report_cgi_nr_no_en_dc_r15_present; + + // sequence methods + neigh_cell_si_acquisition_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LAA-Parameters-v1530 ::= SEQUENCE +struct laa_params_v1530_s { + // member variables + bool aul_r15_present; + bool laa_pusch_mode1_r15_present; + bool laa_pusch_mode2_r15_present; + bool laa_pusch_mode3_r15_present; + + // sequence methods + laa_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1530 ::= SEQUENCE +struct meas_params_v1530_s { + // member variables + bool qoe_meas_report_r15_present; + bool qoe_mtsi_meas_report_r15_present; + bool ca_idle_mode_meass_r15_present; + bool ca_idle_mode_validity_area_r15_present; + bool height_meas_r15_present; + bool multiple_cells_meas_ext_r15_present; + + // sequence methods + meas_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-v1530 ::= SEQUENCE +struct other_params_v1530_s { + // member variables + bool assist_info_bit_for_lc_r15_present; + bool time_ref_provision_r15_present; + bool flight_path_plan_r15_present; + + // sequence methods + other_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Parameters-v1530 ::= SEQUENCE +struct rlc_params_v1530_s { + // member variables + bool flex_um_am_combinations_r15_present; + bool rlc_am_ooo_delivery_r15_present; + bool rlc_um_ooo_delivery_r15_present; + + // sequence methods + rlc_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-BasedNetwPerfMeasParameters-v1530 ::= SEQUENCE +struct ue_based_netw_perf_meas_params_v1530_s { + // member variables + bool logged_meas_bt_r15_present; + bool logged_meas_wlan_r15_present; + bool imm_meas_bt_r15_present; + bool imm_meas_wlan_r15_present; + + // sequence methods + ue_based_netw_perf_meas_params_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1530 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1530_s { + // member variables + bool neigh_cell_si_acquisition_params_v1530_present; + bool reduced_cp_latency_r15_present; + neigh_cell_si_acquisition_params_v1530_s neigh_cell_si_acquisition_params_v1530; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1520 ::= SEQUENCE +struct meas_params_v1520_s { + // member variables + bool meas_gap_patterns_v1520_present; + fixed_bitstring<8> meas_gap_patterns_v1520; + + // sequence methods + meas_params_v1520_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1530-IEs ::= SEQUENCE +struct ue_eutra_cap_v1530_ies_s { + // member variables + bool meas_params_v1530_present; + bool other_params_v1530_present; + bool neigh_cell_si_acquisition_params_v1530_present; + bool mac_params_v1530_present; + bool phy_layer_params_v1530_present; + bool rf_params_v1530_present; + bool pdcp_params_v1530_present; + bool ue_category_dl_v1530_present; + bool ue_based_netw_perf_meas_params_v1530_present; + bool rlc_params_v1530_present; + bool sl_params_v1530_present; + bool extended_nof_drbs_r15_present; + bool reduced_cp_latency_r15_present; + bool laa_params_v1530_present; + bool ue_category_ul_v1530_present; + bool fdd_add_ue_eutra_capabilities_v1530_present; + bool tdd_add_ue_eutra_capabilities_v1530_present; + bool non_crit_ext_present; + meas_params_v1530_s meas_params_v1530; + other_params_v1530_s other_params_v1530; + neigh_cell_si_acquisition_params_v1530_s neigh_cell_si_acquisition_params_v1530; + mac_params_v1530_s mac_params_v1530; + phy_layer_params_v1530_s phy_layer_params_v1530; + rf_params_v1530_s rf_params_v1530; + pdcp_params_v1530_s pdcp_params_v1530; + uint8_t ue_category_dl_v1530; + ue_based_netw_perf_meas_params_v1530_s ue_based_netw_perf_meas_params_v1530; + rlc_params_v1530_s rlc_params_v1530; + sl_params_v1530_s sl_params_v1530; + laa_params_v1530_s laa_params_v1530; + uint8_t ue_category_ul_v1530; + ue_eutra_cap_add_xdd_mode_v1530_s fdd_add_ue_eutra_capabilities_v1530; + ue_eutra_cap_add_xdd_mode_v1530_s tdd_add_ue_eutra_capabilities_v1530; + + // sequence methods + ue_eutra_cap_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1520-IEs ::= SEQUENCE +struct ue_eutra_cap_v1520_ies_s { + // member variables + bool non_crit_ext_present; + meas_params_v1520_s meas_params_v1520; + ue_eutra_cap_v1530_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1520_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1510 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1510_s { + // member variables + bool pdcp_params_nr_r15_present; + pdcp_params_nr_r15_s pdcp_params_nr_r15; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1510_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-v1460 ::= SEQUENCE +struct other_params_v1460_s { + // member variables + bool non_csg_si_report_r14_present; + + // sequence methods + other_params_v1460_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1510-IEs ::= SEQUENCE +struct ue_eutra_cap_v1510_ies_s { + // member variables + bool irat_params_nr_r15_present; + bool feature_sets_eutra_r15_present; + bool pdcp_params_nr_r15_present; + bool fdd_add_ue_eutra_capabilities_v1510_present; + bool tdd_add_ue_eutra_capabilities_v1510_present; + bool non_crit_ext_present; + irat_params_nr_r15_s irat_params_nr_r15; + feature_sets_eutra_r15_s feature_sets_eutra_r15; + pdcp_params_nr_r15_s pdcp_params_nr_r15; + ue_eutra_cap_add_xdd_mode_v1510_s fdd_add_ue_eutra_capabilities_v1510; + ue_eutra_cap_add_xdd_mode_v1510_s tdd_add_ue_eutra_capabilities_v1510; + ue_eutra_cap_v1520_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1510_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OtherParameters-v1450 ::= SEQUENCE +struct other_params_v1450_s { + // member variables + bool overheat_ind_r14_present; + + // sequence methods + other_params_v1450_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1450 ::= SEQUENCE +struct phy_layer_params_v1450_s { + // member variables + bool ce_srs_enhancement_without_comb4_r14_present; + bool crs_less_dw_pts_r14_present; + + // sequence methods + phy_layer_params_v1450_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1460-IEs ::= SEQUENCE +struct ue_eutra_cap_v1460_ies_s { + // member variables + bool ue_category_dl_v1460_present; + bool non_crit_ext_present; + uint8_t ue_category_dl_v1460; + other_params_v1460_s other_params_v1460; + ue_eutra_cap_v1510_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1460_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWA-Parameters-v1440 ::= SEQUENCE +struct lwa_params_v1440_s { + // member variables + bool lwa_rlc_um_r14_present; + + // sequence methods + lwa_params_v1440_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-Parameters-v1440 ::= SEQUENCE +struct mac_params_v1440_s { + // member variables + bool rai_support_r14_present; + + // sequence methods + mac_params_v1440_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MMTEL-Parameters-r14 ::= SEQUENCE +struct mmtel_params_r14_s { + // member variables + bool delay_budget_report_r14_present; + bool pusch_enhance_r14_present; + bool recommended_bit_rate_r14_present; + bool recommended_bit_rate_query_r14_present; + + // sequence methods + mmtel_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1450-IEs ::= SEQUENCE +struct ue_eutra_cap_v1450_ies_s { + // member variables + bool phy_layer_params_v1450_present; + bool rf_params_v1450_present; + bool ue_category_dl_v1450_present; + bool non_crit_ext_present; + phy_layer_params_v1450_s phy_layer_params_v1450; + rf_params_v1450_s rf_params_v1450; + other_params_v1450_s other_params_v1450; + uint8_t ue_category_dl_v1450; + ue_eutra_cap_v1460_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1450_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CE-Parameters-v1430 ::= SEQUENCE +struct ce_params_v1430_s { + // member variables + bool ce_switch_without_ho_r14_present; + + // sequence methods + ce_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HighSpeedEnhParameters-r14 ::= SEQUENCE +struct high_speed_enh_params_r14_s { + // member variables + bool meas_enhance_r14_present; + bool demod_enhance_r14_present; + bool prach_enhance_r14_present; + + // sequence methods + high_speed_enh_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LAA-Parameters-v1430 ::= SEQUENCE +struct laa_params_v1430_s { + struct two_step_sched_timing_info_r14_e_ { + enum options { n_plus1, n_plus2, n_plus3 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 3, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + two_step_sched_timing_info_r14_e_() {} + two_step_sched_timing_info_r14_e_(options v) : value(v) {} + two_step_sched_timing_info_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool cross_carrier_sched_laa_ul_r14_present; + bool ul_laa_r14_present; + bool two_step_sched_timing_info_r14_present; + bool uss_blind_decoding_adjustment_r14_present; + bool uss_blind_decoding_reduction_r14_present; + bool out_of_seq_grant_handling_r14_present; + two_step_sched_timing_info_r14_e_ two_step_sched_timing_info_r14; + + // sequence methods + laa_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWA-Parameters-v1430 ::= SEQUENCE +struct lwa_params_v1430_s { + // member variables + bool lwa_ho_without_wt_change_r14_present; + bool lwa_ul_r14_present; + bool wlan_periodic_meas_r14_present; + bool wlan_report_any_wlan_r14_present; + bool wlan_supported_data_rate_r14_present; + uint16_t wlan_supported_data_rate_r14; + + // sequence methods + lwa_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWIP-Parameters-v1430 ::= SEQUENCE +struct lwip_params_v1430_s { + // member variables + bool lwip_aggregation_dl_r14_present; + bool lwip_aggregation_ul_r14_present; + + // sequence methods + lwip_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-Parameters-v1430 ::= SEQUENCE +struct mac_params_v1430_s { + // member variables + bool short_sps_interv_fdd_r14_present; + bool short_sps_interv_tdd_r14_present; + bool skip_ul_dynamic_r14_present; + bool skip_ul_sps_r14_present; + bool multiple_ul_sps_r14_present; + bool data_inact_mon_r14_present; + + // sequence methods + mac_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-Parameters-v1430 ::= SEQUENCE +struct mbms_params_v1430_s { + // member variables + bool fembms_ded_cell_r14_present; + bool fembms_mixed_cell_r14_present; + bool subcarrier_spacing_mbms_khz7dot5_r14_present; + bool subcarrier_spacing_mbms_khz1dot25_r14_present; + + // sequence methods + mbms_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1430 ::= SEQUENCE +struct meas_params_v1430_s { + // member variables + bool ce_meass_r14_present; + bool ncsg_r14_present; + bool short_meas_gap_r14_present; + bool per_serving_cell_meas_gap_r14_present; + bool non_uniform_gap_r14_present; + + // sequence methods + meas_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityParameters-r14 ::= SEQUENCE +struct mob_params_r14_s { + // member variables + bool make_before_break_r14_present; + bool rach_less_r14_present; + + // sequence methods + mob_params_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-v1430 ::= SEQUENCE +struct other_params_v1430_s { + // member variables + bool bw_pref_ind_r14_present; + bool rlm_report_support_r14_present; + + // sequence methods + other_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-Parameters-v1430 ::= SEQUENCE +struct pdcp_params_v1430_s { + struct supported_ul_only_rohc_profiles_r14_s_ { + // member variables + bool profile0x0006_r14; + }; + struct max_num_rohc_context_sessions_r14_e_ { + enum options { + cs2, + cs4, + cs8, + cs12, + cs16, + cs24, + cs32, + cs48, + cs64, + cs128, + cs256, + cs512, + cs1024, + cs16384, + spare2, + spare1 + }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + max_num_rohc_context_sessions_r14_e_() {} + max_num_rohc_context_sessions_r14_e_(options v) : value(v) {} + max_num_rohc_context_sessions_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool max_num_rohc_context_sessions_r14_present; + supported_ul_only_rohc_profiles_r14_s_ supported_ul_only_rohc_profiles_r14; + max_num_rohc_context_sessions_r14_e_ max_num_rohc_context_sessions_r14; + + // sequence methods + pdcp_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Parameters-v1430 ::= SEQUENCE +struct rlc_params_v1430_s { + // member variables + bool extended_poll_byte_r14_present; + + // sequence methods + rlc_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-BasedNetwPerfMeasParameters-v1430 ::= SEQUENCE +struct ue_based_netw_perf_meas_params_v1430_s { + // member variables + bool location_report_r14_present; + + // sequence methods + ue_based_netw_perf_meas_params_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1440-IEs ::= SEQUENCE +struct ue_eutra_cap_v1440_ies_s { + // member variables + bool non_crit_ext_present; + lwa_params_v1440_s lwa_params_v1440; + mac_params_v1440_s mac_params_v1440; + ue_eutra_cap_v1450_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1440_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1430 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1430_s { + // member variables + bool phy_layer_params_v1430_present; + bool mmtel_params_r14_present; + phy_layer_params_v1430_s phy_layer_params_v1430; + mmtel_params_r14_s mmtel_params_r14; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-Parameters-v1470 ::= SEQUENCE +struct mbms_params_v1470_s { + struct mbms_max_bw_r14_c_ { + struct types { + enum options { implicit_value, explicit_value, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + mbms_max_bw_r14_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint8_t& explicit_value() + { + assert_choice_type("explicitValue", type_.to_string(), "mbms-MaxBW-r14"); + return c; + } + const uint8_t& explicit_value() const + { + assert_choice_type("explicitValue", type_.to_string(), "mbms-MaxBW-r14"); + return c; + } + + private: + types type_; + uint8_t c; + }; + struct mbms_scaling_factor1dot25_r14_e_ { + enum options { n3, n6, n9, n12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mbms_scaling_factor1dot25_r14_e_() {} + mbms_scaling_factor1dot25_r14_e_(options v) : value(v) {} + mbms_scaling_factor1dot25_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct mbms_scaling_factor7dot5_r14_e_ { + enum options { n1, n2, n3, n4 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + mbms_scaling_factor7dot5_r14_e_() {} + mbms_scaling_factor7dot5_r14_e_(options v) : value(v) {} + mbms_scaling_factor7dot5_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool mbms_scaling_factor1dot25_r14_present; + bool mbms_scaling_factor7dot5_r14_present; + mbms_max_bw_r14_c_ mbms_max_bw_r14; + mbms_scaling_factor1dot25_r14_e_ mbms_scaling_factor1dot25_r14; + mbms_scaling_factor7dot5_r14_e_ mbms_scaling_factor7dot5_r14; + + // sequence methods + mbms_params_v1470_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-v1360 ::= SEQUENCE +struct other_params_v1360_s { + // member variables + bool in_dev_coex_ind_hardware_sharing_ind_r13_present; + + // sequence methods + other_params_v1360_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1430-IEs ::= SEQUENCE +struct ue_eutra_cap_v1430_ies_s { + struct ue_category_ul_v1430_e_ { + enum options { n16, n17, n18, n19, n20, m2 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_category_ul_v1430_e_() {} + ue_category_ul_v1430_e_(options v) : value(v) {} + ue_category_ul_v1430_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ue_category_dl_v1430_present; + bool ue_category_ul_v1430_present; + bool ue_category_ul_v1430b_present; + bool mac_params_v1430_present; + bool meas_params_v1430_present; + bool pdcp_params_v1430_present; + bool rf_params_v1430_present; + bool laa_params_v1430_present; + bool lwa_params_v1430_present; + bool lwip_params_v1430_present; + bool mmtel_params_r14_present; + bool mob_params_r14_present; + bool fdd_add_ue_eutra_capabilities_v1430_present; + bool tdd_add_ue_eutra_capabilities_v1430_present; + bool mbms_params_v1430_present; + bool sl_params_v1430_present; + bool ue_based_netw_perf_meas_params_v1430_present; + bool high_speed_enh_params_r14_present; + bool non_crit_ext_present; + phy_layer_params_v1430_s phy_layer_params_v1430; + ue_category_ul_v1430_e_ ue_category_ul_v1430; + mac_params_v1430_s mac_params_v1430; + meas_params_v1430_s meas_params_v1430; + pdcp_params_v1430_s pdcp_params_v1430; + rlc_params_v1430_s rlc_params_v1430; + rf_params_v1430_s rf_params_v1430; + laa_params_v1430_s laa_params_v1430; + lwa_params_v1430_s lwa_params_v1430; + lwip_params_v1430_s lwip_params_v1430; + other_params_v1430_s other_params_v1430; + mmtel_params_r14_s mmtel_params_r14; + mob_params_r14_s mob_params_r14; + ce_params_v1430_s ce_params_v1430; + ue_eutra_cap_add_xdd_mode_v1430_s fdd_add_ue_eutra_capabilities_v1430; + ue_eutra_cap_add_xdd_mode_v1430_s tdd_add_ue_eutra_capabilities_v1430; + mbms_params_v1430_s mbms_params_v1430; + sl_params_v1430_s sl_params_v1430; + ue_based_netw_perf_meas_params_v1430_s ue_based_netw_perf_meas_params_v1430; + high_speed_enh_params_r14_s high_speed_enh_params_r14; + ue_eutra_cap_v1440_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CE-Parameters-v1350 ::= SEQUENCE +struct ce_params_v1350_s { + // member variables + bool unicast_freq_hop_r13_present; + + // sequence methods + ce_params_v1350_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1360-IEs ::= SEQUENCE +struct ue_eutra_cap_v1360_ies_s { + // member variables + bool other_params_v1360_present; + bool non_crit_ext_present; + other_params_v1360_s other_params_v1360; + ue_eutra_cap_v1430_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1360_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1470-IEs ::= SEQUENCE +struct ue_eutra_cap_v1470_ies_s { + // member variables + bool mbms_params_v1470_present; + bool phy_layer_params_v1470_present; + bool rf_params_v1470_present; + bool non_crit_ext_present; + mbms_params_v1470_s mbms_params_v1470; + phy_layer_params_v1470_s phy_layer_params_v1470; + rf_params_v1470_s rf_params_v1470; + + // sequence methods + ue_eutra_cap_v1470_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CE-Parameters-v1380 ::= SEQUENCE +struct ce_params_v1380_s { + // member variables + bool tm6_ce_mode_a_r13_present; + + // sequence methods + ce_params_v1380_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1350-IEs ::= SEQUENCE +struct ue_eutra_cap_v1350_ies_s { + // member variables + bool ue_category_dl_v1350_present; + bool ue_category_ul_v1350_present; + bool non_crit_ext_present; + ce_params_v1350_s ce_params_v1350; + ue_eutra_cap_v1360_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1350_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v13x0-IEs ::= SEQUENCE +struct ue_eutra_cap_v13x0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_eutra_cap_v1470_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v13x0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CE-Parameters-v1370 ::= SEQUENCE +struct ce_params_v1370_s { + // member variables + bool tm9_ce_mode_a_r13_present; + bool tm9_ce_mode_b_r13_present; + + // sequence methods + ce_params_v1370_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCPTM-Parameters-r13 ::= SEQUENCE +struct scptm_params_r13_s { + // member variables + bool scptm_parallel_reception_r13_present; + bool scptm_scell_r13_present; + bool scptm_non_serving_cell_r13_present; + bool scptm_async_dc_r13_present; + + // sequence methods + scptm_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1340-IEs ::= SEQUENCE +struct ue_eutra_cap_v1340_ies_s { + // member variables + bool ue_category_ul_v1340_present; + bool non_crit_ext_present; + uint8_t ue_category_ul_v1340; + ue_eutra_cap_v1350_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1340_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1390-IEs ::= SEQUENCE +struct ue_eutra_cap_v1390_ies_s { + // member variables + bool rf_params_v1390_present; + bool non_crit_ext_present; + rf_params_v1390_s rf_params_v1390; + ue_eutra_cap_v13x0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1390_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1380 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1380_s { + // member variables + ce_params_v1380_s ce_params_v1380; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CE-Parameters-v1320 ::= SEQUENCE +struct ce_params_v1320_s { + // member variables + bool intra_freq_a3_ce_mode_a_r13_present; + bool intra_freq_a3_ce_mode_b_r13_present; + bool intra_freq_ho_ce_mode_a_r13_present; + bool intra_freq_ho_ce_mode_b_r13_present; + + // sequence methods + ce_params_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1310 ::= SEQUENCE +struct phy_layer_params_v1310_s { + struct supported_blind_decoding_r13_s_ { + // member variables + bool max_num_decoding_r13_present; + bool pdcch_candidate_reductions_r13_present; + bool skip_monitoring_dci_format0_minus1_a_r13_present; + uint8_t max_num_decoding_r13; + + // sequence methods + supported_blind_decoding_r13_s_(); + }; + + // member variables + bool aperiodic_csi_report_r13_present; + bool codebook_harq_ack_r13_present; + bool cross_carrier_sched_b5_c_r13_present; + bool fdd_harq_timing_tdd_r13_present; + bool max_num_updated_csi_proc_r13_present; + bool pucch_format4_r13_present; + bool pucch_format5_r13_present; + bool pucch_scell_r13_present; + bool spatial_bundling_harq_ack_r13_present; + bool supported_blind_decoding_r13_present; + bool uci_pusch_ext_r13_present; + bool crs_interf_mitigation_tm10_r13_present; + bool pdsch_collision_handling_r13_present; + fixed_bitstring<2> aperiodic_csi_report_r13; + fixed_bitstring<2> codebook_harq_ack_r13; + uint8_t max_num_updated_csi_proc_r13; + supported_blind_decoding_r13_s_ supported_blind_decoding_r13; + + // sequence methods + phy_layer_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1330-IEs ::= SEQUENCE +struct ue_eutra_cap_v1330_ies_s { + // member variables + bool ue_category_dl_v1330_present; + bool phy_layer_params_v1330_present; + bool ue_ce_need_ul_gaps_r13_present; + bool non_crit_ext_present; + uint8_t ue_category_dl_v1330; + phy_layer_params_v1330_s phy_layer_params_v1330; + ue_eutra_cap_v1340_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1330_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1380-IEs ::= SEQUENCE +struct ue_eutra_cap_v1380_ies_s { + // member variables + bool rf_params_v1380_present; + bool non_crit_ext_present; + rf_params_v1380_s rf_params_v1380; + ce_params_v1380_s ce_params_v1380; + ue_eutra_cap_add_xdd_mode_v1380_s fdd_add_ue_eutra_capabilities_v1380; + ue_eutra_cap_add_xdd_mode_v1380_s tdd_add_ue_eutra_capabilities_v1380; + ue_eutra_cap_v1390_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1380_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1320 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1320_s { + // member variables + bool phy_layer_params_v1320_present; + bool scptm_params_r13_present; + phy_layer_params_v1320_s phy_layer_params_v1320; + scptm_params_r13_s scptm_params_r13; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1370 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1370_s { + // member variables + bool ce_params_v1370_present; + ce_params_v1370_s ce_params_v1370; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1370_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CE-Parameters-r13 ::= SEQUENCE +struct ce_params_r13_s { + // member variables + bool ce_mode_a_r13_present; + bool ce_mode_b_r13_present; + + // sequence methods + ce_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DC-Parameters-v1310 ::= SEQUENCE +struct dc_params_v1310_s { + // member variables + bool pdcp_transfer_split_ul_r13_present; + bool ue_sstd_meas_r13_present; + + // sequence methods + dc_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LAA-Parameters-r13 ::= SEQUENCE +struct laa_params_r13_s { + // member variables + bool cross_carrier_sched_laa_dl_r13_present; + bool csi_rs_drs_rrm_meass_laa_r13_present; + bool dl_laa_r13_present; + bool ending_dw_pts_r13_present; + bool second_slot_start_position_r13_present; + bool tm9_laa_r13_present; + bool tm10_laa_r13_present; + + // sequence methods + laa_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWA-Parameters-r13 ::= SEQUENCE +struct lwa_params_r13_s { + // member variables + bool lwa_r13_present; + bool lwa_split_bearer_r13_present; + bool wlan_mac_address_r13_present; + bool lwa_buffer_size_r13_present; + fixed_octstring<6> wlan_mac_address_r13; + + // sequence methods + lwa_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LWIP-Parameters-r13 ::= SEQUENCE +struct lwip_params_r13_s { + // member variables + bool lwip_r13_present; + + // sequence methods + lwip_params_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-Parameters-v1310 ::= SEQUENCE +struct mac_params_v1310_s { + // member variables + bool extended_mac_len_field_r13_present; + bool extended_long_drx_r13_present; + + // sequence methods + mac_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1310 ::= SEQUENCE +struct meas_params_v1310_s { + // member variables + bool rs_sinr_meas_r13_present; + bool white_cell_list_r13_present; + bool extended_max_obj_id_r13_present; + bool ul_pdcp_delay_r13_present; + bool extended_freq_priorities_r13_present; + bool multi_band_info_report_r13_present; + bool rssi_and_ch_occupancy_report_r13_present; + + // sequence methods + meas_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-Parameters-v1310 ::= SEQUENCE +struct pdcp_params_v1310_s { + // member variables + bool pdcp_sn_ext_minus18bits_r13_present; + + // sequence methods + pdcp_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Parameters-v1310 ::= SEQUENCE +struct rlc_params_v1310_s { + // member variables + bool extended_rlc_sn_so_field_r13_present; + + // sequence methods + rlc_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-Parameters-v1310 ::= SEQUENCE +struct sl_params_v1310_s { + // member variables + bool disc_sys_info_report_r13_present; + bool comm_multiple_tx_r13_present; + bool disc_inter_freq_tx_r13_present; + bool disc_periodic_slss_r13_present; + + // sequence methods + sl_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1320-IEs ::= SEQUENCE +struct ue_eutra_cap_v1320_ies_s { + // member variables + bool ce_params_v1320_present; + bool phy_layer_params_v1320_present; + bool rf_params_v1320_present; + bool fdd_add_ue_eutra_capabilities_v1320_present; + bool tdd_add_ue_eutra_capabilities_v1320_present; + bool non_crit_ext_present; + ce_params_v1320_s ce_params_v1320; + phy_layer_params_v1320_s phy_layer_params_v1320; + rf_params_v1320_s rf_params_v1320; + ue_eutra_cap_add_xdd_mode_v1320_s fdd_add_ue_eutra_capabilities_v1320; + ue_eutra_cap_add_xdd_mode_v1320_s tdd_add_ue_eutra_capabilities_v1320; + ue_eutra_cap_v1330_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1320_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1370-IEs ::= SEQUENCE +struct ue_eutra_cap_v1370_ies_s { + // member variables + bool ce_params_v1370_present; + bool fdd_add_ue_eutra_capabilities_v1370_present; + bool tdd_add_ue_eutra_capabilities_v1370_present; + bool non_crit_ext_present; + ce_params_v1370_s ce_params_v1370; + ue_eutra_cap_add_xdd_mode_v1370_s fdd_add_ue_eutra_capabilities_v1370; + ue_eutra_cap_add_xdd_mode_v1370_s tdd_add_ue_eutra_capabilities_v1370; + ue_eutra_cap_v1380_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1370_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1310 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1310_s { + // member variables + bool phy_layer_params_v1310_present; + phy_layer_params_v1310_s phy_layer_params_v1310; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-IW-Parameters-v1310 ::= SEQUENCE +struct wlan_iw_params_v1310_s { + // member variables + bool rclwi_r13_present; + + // sequence methods + wlan_iw_params_v1310_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1280 ::= SEQUENCE +struct phy_layer_params_v1280_s { + // member variables + bool alternative_tbs_indices_r12_present; + + // sequence methods + phy_layer_params_v1280_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RF-Parameters-v12b0 ::= SEQUENCE +struct rf_params_v12b0_s { + // member variables + bool max_layers_mimo_ind_r12_present; + + // sequence methods + rf_params_v12b0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v12x0-IEs ::= SEQUENCE +struct ue_eutra_cap_v12x0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_eutra_cap_v1370_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v12x0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1310-IEs ::= SEQUENCE +struct ue_eutra_cap_v1310_ies_s { + struct ue_category_dl_v1310_e_ { + enum options { n17, m1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_category_dl_v1310_e_() {} + ue_category_dl_v1310_e_(options v) : value(v) {} + ue_category_dl_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct ue_category_ul_v1310_e_ { + enum options { n14, m1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_category_ul_v1310_e_() {} + ue_category_ul_v1310_e_(options v) : value(v) {} + ue_category_ul_v1310_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ue_category_dl_v1310_present; + bool ue_category_ul_v1310_present; + bool mac_params_v1310_present; + bool phy_layer_params_v1310_present; + bool rf_params_v1310_present; + bool meas_params_v1310_present; + bool dc_params_v1310_present; + bool sl_params_v1310_present; + bool scptm_params_r13_present; + bool ce_params_r13_present; + bool laa_params_r13_present; + bool lwa_params_r13_present; + bool fdd_add_ue_eutra_capabilities_v1310_present; + bool tdd_add_ue_eutra_capabilities_v1310_present; + bool non_crit_ext_present; + ue_category_dl_v1310_e_ ue_category_dl_v1310; + ue_category_ul_v1310_e_ ue_category_ul_v1310; + pdcp_params_v1310_s pdcp_params_v1310; + rlc_params_v1310_s rlc_params_v1310; + mac_params_v1310_s mac_params_v1310; + phy_layer_params_v1310_s phy_layer_params_v1310; + rf_params_v1310_s rf_params_v1310; + meas_params_v1310_s meas_params_v1310; + dc_params_v1310_s dc_params_v1310; + sl_params_v1310_s sl_params_v1310; + scptm_params_r13_s scptm_params_r13; + ce_params_r13_s ce_params_r13; + irat_params_wlan_r13_s inter_rat_params_wlan_r13; + laa_params_r13_s laa_params_r13; + lwa_params_r13_s lwa_params_r13; + wlan_iw_params_v1310_s wlan_iw_params_v1310; + lwip_params_r13_s lwip_params_r13; + ue_eutra_cap_add_xdd_mode_v1310_s fdd_add_ue_eutra_capabilities_v1310; + ue_eutra_cap_add_xdd_mode_v1310_s tdd_add_ue_eutra_capabilities_v1310; + ue_eutra_cap_v1320_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1280-IEs ::= SEQUENCE +struct ue_eutra_cap_v1280_ies_s { + // member variables + bool phy_layer_params_v1280_present; + bool non_crit_ext_present; + phy_layer_params_v1280_s phy_layer_params_v1280; + ue_eutra_cap_v1310_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1280_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v12b0-IEs ::= SEQUENCE +struct ue_eutra_cap_v12b0_ies_s { + // member variables + bool rf_params_v12b0_present; + bool non_crit_ext_present; + rf_params_v12b0_s rf_params_v12b0; + ue_eutra_cap_v12x0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v12b0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1250 ::= SEQUENCE +struct meas_params_v1250_s { + // member variables + bool timer_t312_r12_present; + bool alternative_time_to_trigger_r12_present; + bool inc_mon_eutra_r12_present; + bool inc_mon_utra_r12_present; + bool extended_max_meas_id_r12_present; + bool extended_rsrq_lower_range_r12_present; + bool rsrq_on_all_symbols_r12_present; + bool crs_discovery_signals_meas_r12_present; + bool csi_rs_discovery_signals_meas_r12_present; + + // sequence methods + meas_params_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-v11d0 ::= SEQUENCE +struct other_params_v11d0_s { + // member variables + bool in_dev_coex_ind_ul_ca_r11_present; + + // sequence methods + other_params_v11d0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RF-Parameters-v10j0 ::= SEQUENCE +struct rf_params_v10j0_s { + // member variables + bool multi_ns_pmax_r10_present; + + // sequence methods + rf_params_v10j0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v11x0-IEs ::= SEQUENCE +struct ue_eutra_cap_v11x0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_eutra_cap_v12b0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v11x0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1270-IEs ::= SEQUENCE +struct ue_eutra_cap_v1270_ies_s { + // member variables + bool rf_params_v1270_present; + bool non_crit_ext_present; + rf_params_v1270_s rf_params_v1270; + ue_eutra_cap_v1280_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1270_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DC-Parameters-r12 ::= SEQUENCE +struct dc_params_r12_s { + // member variables + bool drb_type_split_r12_present; + bool drb_type_scg_r12_present; + + // sequence methods + dc_params_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MAC-Parameters-r12 ::= SEQUENCE +struct mac_params_r12_s { + // member variables + bool lc_ch_sr_prohibit_timer_r12_present; + bool long_drx_cmd_r12_present; + + // sequence methods + mac_params_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-Parameters-v1250 ::= SEQUENCE +struct mbms_params_v1250_s { + // member variables + bool mbms_async_dc_r12_present; + + // sequence methods + mbms_params_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLC-Parameters-r12 ::= SEQUENCE +struct rlc_params_r12_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-BasedNetwPerfMeasParameters-v1250 ::= SEQUENCE +struct ue_based_netw_perf_meas_params_v1250_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v10j0-IEs ::= SEQUENCE +struct ue_eutra_cap_v10j0_ies_s { + // member variables + bool rf_params_v10j0_present; + bool non_crit_ext_present; + rf_params_v10j0_s rf_params_v10j0; + + // sequence methods + ue_eutra_cap_v10j0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v11d0-IEs ::= SEQUENCE +struct ue_eutra_cap_v11d0_ies_s { + // member variables + bool rf_params_v11d0_present; + bool other_params_v11d0_present; + bool non_crit_ext_present; + rf_params_v11d0_s rf_params_v11d0; + other_params_v11d0_s other_params_v11d0; + ue_eutra_cap_v11x0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v11d0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1260-IEs ::= SEQUENCE +struct ue_eutra_cap_v1260_ies_s { + // member variables + bool ue_category_dl_v1260_present; + bool non_crit_ext_present; + uint8_t ue_category_dl_v1260; + ue_eutra_cap_v1270_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1260_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1250 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1250_s { + // member variables + bool phy_layer_params_v1250_present; + bool meas_params_v1250_present; + phy_layer_params_v1250_s phy_layer_params_v1250; + meas_params_v1250_s meas_params_v1250; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-IW-Parameters-r12 ::= SEQUENCE +struct wlan_iw_params_r12_s { + // member variables + bool wlan_iw_ran_rules_r12_present; + bool wlan_iw_andsf_policies_r12_present; + + // sequence methods + wlan_iw_params_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBMS-Parameters-r11 ::= SEQUENCE +struct mbms_params_r11_s { + // member variables + bool mbms_scell_r11_present; + bool mbms_non_serving_cell_r11_present; + + // sequence methods + mbms_params_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v11a0 ::= SEQUENCE +struct meas_params_v11a0_s { + // member variables + bool benefits_from_interruption_r11_present; + + // sequence methods + meas_params_v11a0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RF-Parameters-v10f0 ::= SEQUENCE +struct rf_params_v10f0_s { + // member variables + bool modified_mpr_behavior_r10_present; + fixed_bitstring<32> modified_mpr_behavior_r10; + + // sequence methods + rf_params_v10f0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v10i0-IEs ::= SEQUENCE +struct ue_eutra_cap_v10i0_ies_s { + // member variables + bool rf_params_v10i0_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + rf_params_v10i0_s rf_params_v10i0; + dyn_octstring late_non_crit_ext; + ue_eutra_cap_v11d0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v10i0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1250-IEs ::= SEQUENCE +struct ue_eutra_cap_v1250_ies_s { + // member variables + bool phy_layer_params_v1250_present; + bool rf_params_v1250_present; + bool rlc_params_r12_present; + bool ue_based_netw_perf_meas_params_v1250_present; + bool ue_category_dl_r12_present; + bool ue_category_ul_r12_present; + bool wlan_iw_params_r12_present; + bool meas_params_v1250_present; + bool dc_params_r12_present; + bool mbms_params_v1250_present; + bool mac_params_r12_present; + bool fdd_add_ue_eutra_capabilities_v1250_present; + bool tdd_add_ue_eutra_capabilities_v1250_present; + bool sl_params_r12_present; + bool non_crit_ext_present; + phy_layer_params_v1250_s phy_layer_params_v1250; + rf_params_v1250_s rf_params_v1250; + rlc_params_r12_s rlc_params_r12; + ue_based_netw_perf_meas_params_v1250_s ue_based_netw_perf_meas_params_v1250; + uint8_t ue_category_dl_r12; + uint8_t ue_category_ul_r12; + wlan_iw_params_r12_s wlan_iw_params_r12; + meas_params_v1250_s meas_params_v1250; + dc_params_r12_s dc_params_r12; + mbms_params_v1250_s mbms_params_v1250; + mac_params_r12_s mac_params_r12; + ue_eutra_cap_add_xdd_mode_v1250_s fdd_add_ue_eutra_capabilities_v1250; + ue_eutra_cap_add_xdd_mode_v1250_s tdd_add_ue_eutra_capabilities_v1250; + sl_params_r12_s sl_params_r12; + ue_eutra_cap_v1260_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OTDOA-PositioningCapabilities-r10 ::= SEQUENCE +struct otdoa_positioning_capabilities_r10_s { + // member variables + bool inter_freq_rstd_meas_r10_present; + + // sequence methods + otdoa_positioning_capabilities_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v10f0-IEs ::= SEQUENCE +struct ue_eutra_cap_v10f0_ies_s { + // member variables + bool rf_params_v10f0_present; + bool non_crit_ext_present; + rf_params_v10f0_s rf_params_v10f0; + ue_eutra_cap_v10i0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v10f0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v11a0-IEs ::= SEQUENCE +struct ue_eutra_cap_v11a0_ies_s { + // member variables + bool ue_category_v11a0_present; + bool meas_params_v11a0_present; + bool non_crit_ext_present; + uint8_t ue_category_v11a0; + meas_params_v11a0_s meas_params_v11a0; + ue_eutra_cap_v1250_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v11a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1180 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1180_s { + // member variables + mbms_params_r11_s mbms_params_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersUTRA-v9h0 ::= SEQUENCE +struct irat_params_utra_v9h0_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasParameters-v1130 ::= SEQUENCE +struct meas_params_v1130_s { + // member variables + bool rsrq_meas_wideband_r11_present; + + // sequence methods + meas_params_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Other-Parameters-r11 ::= SEQUENCE +struct other_params_r11_s { + // member variables + bool in_dev_coex_ind_r11_present; + bool pwr_pref_ind_r11_present; + bool ue_rx_tx_time_diff_meass_r11_present; + + // sequence methods + other_params_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1130 ::= SEQUENCE +struct phy_layer_params_v1130_s { + // member variables + bool crs_interf_handl_r11_present; + bool e_pdcch_r11_present; + bool multi_ack_csi_report_r11_present; + bool ss_cch_interf_handl_r11_present; + bool tdd_special_sf_r11_present; + bool tx_div_pucch1b_ch_select_r11_present; + bool ul_co_mp_r11_present; + + // sequence methods + phy_layer_params_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v1170 ::= SEQUENCE +struct phy_layer_params_v1170_s { + // member variables + bool inter_band_tdd_ca_with_different_cfg_r11_present; + fixed_bitstring<2> inter_band_tdd_ca_with_different_cfg_r11; + + // sequence methods + phy_layer_params_v1170_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v10c0-IEs ::= SEQUENCE +struct ue_eutra_cap_v10c0_ies_s { + // member variables + bool otdoa_positioning_capabilities_r10_present; + bool non_crit_ext_present; + otdoa_positioning_capabilities_r10_s otdoa_positioning_capabilities_r10; + ue_eutra_cap_v10f0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v10c0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1180-IEs ::= SEQUENCE +struct ue_eutra_cap_v1180_ies_s { + // member variables + bool rf_params_v1180_present; + bool mbms_params_r11_present; + bool fdd_add_ue_eutra_capabilities_v1180_present; + bool tdd_add_ue_eutra_capabilities_v1180_present; + bool non_crit_ext_present; + rf_params_v1180_s rf_params_v1180; + mbms_params_r11_s mbms_params_r11; + ue_eutra_cap_add_xdd_mode_v1180_s fdd_add_ue_eutra_capabilities_v1180; + ue_eutra_cap_add_xdd_mode_v1180_s tdd_add_ue_eutra_capabilities_v1180; + ue_eutra_cap_v11a0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1180_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersCDMA2000-v1130 ::= SEQUENCE +struct irat_params_cdma2000_v1130_s { + // member variables + bool cdma2000_nw_sharing_r11_present; + + // sequence methods + irat_params_cdma2000_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-Parameters-v1130 ::= SEQUENCE +struct pdcp_params_v1130_s { + // member variables + bool pdcp_sn_ext_r11_present; + bool support_rohc_context_continue_r11_present; + + // sequence methods + pdcp_params_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1170-IEs ::= SEQUENCE +struct ue_eutra_cap_v1170_ies_s { + // member variables + bool phy_layer_params_v1170_present; + bool ue_category_v1170_present; + bool non_crit_ext_present; + phy_layer_params_v1170_s phy_layer_params_v1170; + uint8_t ue_category_v1170; + ue_eutra_cap_v1180_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1170_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v9h0-IEs ::= SEQUENCE +struct ue_eutra_cap_v9h0_ies_s { + // member variables + bool inter_rat_params_utra_v9h0_present; + bool late_non_crit_ext_present; + bool non_crit_ext_present; + irat_params_utra_v9h0_s inter_rat_params_utra_v9h0; + dyn_octstring late_non_crit_ext; + ue_eutra_cap_v10c0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v9h0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1130 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1130_s { + // member variables + bool ext; + bool phy_layer_params_v1130_present; + bool meas_params_v1130_present; + bool other_params_r11_present; + phy_layer_params_v1130_s phy_layer_params_v1130; + meas_params_v1130_s meas_params_v1130; + other_params_r11_s other_params_r11; + // ... + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersCDMA2000-1XRTT-v1020 ::= SEQUENCE +struct irat_params_cdma2000_minus1_xrtt_v1020_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersUTRA-TDD-v1020 ::= SEQUENCE +struct irat_params_utra_tdd_v1020_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v9d0 ::= SEQUENCE +struct phy_layer_params_v9d0_s { + // member variables + bool tm5_fdd_r9_present; + bool tm5_tdd_r9_present; + + // sequence methods + phy_layer_params_v9d0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1130-IEs ::= SEQUENCE +struct ue_eutra_cap_v1130_ies_s { + // member variables + bool phy_layer_params_v1130_present; + bool fdd_add_ue_eutra_capabilities_v1130_present; + bool tdd_add_ue_eutra_capabilities_v1130_present; + bool non_crit_ext_present; + pdcp_params_v1130_s pdcp_params_v1130; + phy_layer_params_v1130_s phy_layer_params_v1130; + rf_params_v1130_s rf_params_v1130; + meas_params_v1130_s meas_params_v1130; + irat_params_cdma2000_v1130_s inter_rat_params_cdma2000_v1130; + other_params_r11_s other_params_r11; + ue_eutra_cap_add_xdd_mode_v1130_s fdd_add_ue_eutra_capabilities_v1130; + ue_eutra_cap_add_xdd_mode_v1130_s tdd_add_ue_eutra_capabilities_v1130; + ue_eutra_cap_v1170_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v9e0-IEs ::= SEQUENCE +struct ue_eutra_cap_v9e0_ies_s { + // member variables + bool rf_params_v9e0_present; + bool non_crit_ext_present; + rf_params_v9e0_s rf_params_v9e0; + ue_eutra_cap_v9h0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersCDMA2000-1XRTT-v920 ::= SEQUENCE +struct irat_params_cdma2000_minus1_xrtt_v920_s { + // member variables + bool e_csfb_conc_ps_mob1_xrtt_r9_present; + + // sequence methods + irat_params_cdma2000_minus1_xrtt_v920_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersUTRA-v920 ::= SEQUENCE +struct irat_params_utra_v920_s { + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersUTRA-v9c0 ::= SEQUENCE +struct irat_params_utra_v9c0_s { + // member variables + bool voice_over_ps_hs_utra_fdd_r9_present; + bool voice_over_ps_hs_utra_tdd128_r9_present; + bool srvcc_from_utra_fdd_to_utra_fdd_r9_present; + bool srvcc_from_utra_fdd_to_geran_r9_present; + bool srvcc_from_utra_tdd128_to_utra_tdd128_r9_present; + bool srvcc_from_utra_tdd128_to_geran_r9_present; + + // sequence methods + irat_params_utra_v9c0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighCellSI-AcquisitionParameters-r9 ::= SEQUENCE +struct neigh_cell_si_acquisition_params_r9_s { + // member variables + bool intra_freq_si_acquisition_for_ho_r9_present; + bool inter_freq_si_acquisition_for_ho_r9_present; + bool utran_si_acquisition_for_ho_r9_present; + + // sequence methods + neigh_cell_si_acquisition_params_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters ::= SEQUENCE +struct phy_layer_params_s { + // member variables + bool ue_tx_ant_sel_supported; + bool ue_specific_ref_sigs_supported; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1090-IEs ::= SEQUENCE +struct ue_eutra_cap_v1090_ies_s { + // member variables + bool rf_params_v1090_present; + bool non_crit_ext_present; + rf_params_v1090_s rf_params_v1090; + ue_eutra_cap_v1130_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1090_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v9d0-IEs ::= SEQUENCE +struct ue_eutra_cap_v9d0_ies_s { + // member variables + bool phy_layer_params_v9d0_present; + bool non_crit_ext_present; + phy_layer_params_v9d0_s phy_layer_params_v9d0; + ue_eutra_cap_v9e0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v9d0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-v1060 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_v1060_s { + // member variables + bool ext; + bool phy_layer_params_v1060_present; + bool feature_group_ind_rel10_v1060_present; + bool inter_rat_params_cdma2000_v1060_present; + bool inter_rat_params_utra_tdd_v1060_present; + phy_layer_params_v1020_s phy_layer_params_v1060; + fixed_bitstring<32> feature_group_ind_rel10_v1060; + irat_params_cdma2000_minus1_xrtt_v1020_s inter_rat_params_cdma2000_v1060; + irat_params_utra_tdd_v1020_s inter_rat_params_utra_tdd_v1060; + // ... + // group 0 + bool otdoa_positioning_capabilities_r10_present; + copy_ptr otdoa_positioning_capabilities_r10; + + // sequence methods + ue_eutra_cap_add_xdd_mode_v1060_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-BasedNetwPerfMeasParameters-r10 ::= SEQUENCE +struct ue_based_netw_perf_meas_params_r10_s { + // member variables + bool logged_meass_idle_r10_present; + bool standalone_gnss_location_r10_present; + + // sequence methods + ue_based_netw_perf_meas_params_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1060-IEs ::= SEQUENCE +struct ue_eutra_cap_v1060_ies_s { + // member variables + bool fdd_add_ue_eutra_capabilities_v1060_present; + bool tdd_add_ue_eutra_capabilities_v1060_present; + bool rf_params_v1060_present; + bool non_crit_ext_present; + ue_eutra_cap_add_xdd_mode_v1060_s fdd_add_ue_eutra_capabilities_v1060; + ue_eutra_cap_add_xdd_mode_v1060_s tdd_add_ue_eutra_capabilities_v1060; + rf_params_v1060_s rf_params_v1060; + ue_eutra_cap_v1090_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1060_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v9c0-IEs ::= SEQUENCE +struct ue_eutra_cap_v9c0_ies_s { + // member variables + bool inter_rat_params_utra_v9c0_present; + bool non_crit_ext_present; + irat_params_utra_v9c0_s inter_rat_params_utra_v9c0; + ue_eutra_cap_v9d0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v9c0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-CapabilityAddXDD-Mode-r9 ::= SEQUENCE +struct ue_eutra_cap_add_xdd_mode_r9_s { + // member variables + bool ext; + bool phy_layer_params_r9_present; + bool feature_group_inds_r9_present; + bool feature_group_ind_rel9_add_r9_present; + bool inter_rat_params_geran_r9_present; + bool inter_rat_params_utra_r9_present; + bool inter_rat_params_cdma2000_r9_present; + bool neigh_cell_si_acquisition_params_r9_present; + phy_layer_params_s phy_layer_params_r9; + fixed_bitstring<32> feature_group_inds_r9; + fixed_bitstring<32> feature_group_ind_rel9_add_r9; + irat_params_geran_s inter_rat_params_geran_r9; + irat_params_utra_v920_s inter_rat_params_utra_r9; + irat_params_cdma2000_minus1_xrtt_v920_s inter_rat_params_cdma2000_r9; + neigh_cell_si_acquisition_params_r9_s neigh_cell_si_acquisition_params_r9; + // ... + + // sequence methods + ue_eutra_cap_add_xdd_mode_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v1020-IEs ::= SEQUENCE +struct ue_eutra_cap_v1020_ies_s { + // member variables + bool ue_category_v1020_present; + bool phy_layer_params_v1020_present; + bool rf_params_v1020_present; + bool meas_params_v1020_present; + bool feature_group_ind_rel10_r10_present; + bool inter_rat_params_cdma2000_v1020_present; + bool ue_based_netw_perf_meas_params_r10_present; + bool inter_rat_params_utra_tdd_v1020_present; + bool non_crit_ext_present; + uint8_t ue_category_v1020; + phy_layer_params_v1020_s phy_layer_params_v1020; + rf_params_v1020_s rf_params_v1020; + meas_params_v1020_s meas_params_v1020; + fixed_bitstring<32> feature_group_ind_rel10_r10; + irat_params_cdma2000_minus1_xrtt_v1020_s inter_rat_params_cdma2000_v1020; + ue_based_netw_perf_meas_params_r10_s ue_based_netw_perf_meas_params_r10; + irat_params_utra_tdd_v1020_s inter_rat_params_utra_tdd_v1020; + ue_eutra_cap_v1060_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v1020_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v9a0-IEs ::= SEQUENCE +struct ue_eutra_cap_v9a0_ies_s { + // member variables + bool feature_group_ind_rel9_add_r9_present; + bool fdd_add_ue_eutra_capabilities_r9_present; + bool tdd_add_ue_eutra_capabilities_r9_present; + bool non_crit_ext_present; + fixed_bitstring<32> feature_group_ind_rel9_add_r9; + ue_eutra_cap_add_xdd_mode_r9_s fdd_add_ue_eutra_capabilities_r9; + ue_eutra_cap_add_xdd_mode_r9_s tdd_add_ue_eutra_capabilities_r9; + ue_eutra_cap_v9c0_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v9a0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSG-ProximityIndicationParameters-r9 ::= SEQUENCE +struct csg_proximity_ind_params_r9_s { + // member variables + bool intra_freq_proximity_ind_r9_present; + bool inter_freq_proximity_ind_r9_present; + bool utran_proximity_ind_r9_present; + + // sequence methods + csg_proximity_ind_params_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IRAT-ParametersGERAN-v920 ::= SEQUENCE +struct irat_params_geran_v920_s { + // member variables + bool dtm_r9_present; + bool e_redirection_geran_r9_present; + + // sequence methods + irat_params_geran_v920_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PhyLayerParameters-v920 ::= SEQUENCE +struct phy_layer_params_v920_s { + // member variables + bool enhanced_dual_layer_fdd_r9_present; + bool enhanced_dual_layer_tdd_r9_present; + + // sequence methods + phy_layer_params_v920_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SON-Parameters-r9 ::= SEQUENCE +struct son_params_r9_s { + // member variables + bool rach_report_r9_present; + + // sequence methods + son_params_r9_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability-v940-IEs ::= SEQUENCE +struct ue_eutra_cap_v940_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ue_eutra_cap_v1020_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v940_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AccessStratumRelease ::= ENUMERATED +struct access_stratum_release_e { + enum options { rel8, rel9, rel10, rel11, rel12, rel13, rel14, rel15, /*...*/ }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + access_stratum_release_e() {} + access_stratum_release_e(options v) : value(v) {} + access_stratum_release_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// UE-EUTRA-Capability-v920-IEs ::= SEQUENCE +struct ue_eutra_cap_v920_ies_s { + // member variables + bool inter_rat_params_utra_v920_present; + bool inter_rat_params_cdma2000_v920_present; + bool dev_type_r9_present; + bool non_crit_ext_present; + phy_layer_params_v920_s phy_layer_params_v920; + irat_params_geran_v920_s inter_rat_params_geran_v920; + irat_params_utra_v920_s inter_rat_params_utra_v920; + irat_params_cdma2000_minus1_xrtt_v920_s inter_rat_params_cdma2000_v920; + csg_proximity_ind_params_r9_s csg_proximity_ind_params_r9; + neigh_cell_si_acquisition_params_r9_s neigh_cell_si_acquisition_params_r9; + son_params_r9_s son_params_r9; + ue_eutra_cap_v940_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-EUTRA-Capability ::= SEQUENCE +struct ue_eutra_cap_s { + struct inter_rat_params_s_ { + // member variables + bool utra_fdd_present; + bool utra_tdd128_present; + bool utra_tdd384_present; + bool utra_tdd768_present; + bool geran_present; + bool cdma2000_hrpd_present; + bool cdma2000_minus1x_rtt_present; + irat_params_utra_fdd_s utra_fdd; + irat_params_utra_tdd128_s utra_tdd128; + irat_params_utra_tdd384_s utra_tdd384; + irat_params_utra_tdd768_s utra_tdd768; + irat_params_geran_s geran; + irat_params_cdma2000_hrpd_s cdma2000_hrpd; + irat_params_cdma2000_minus1_xrtt_s cdma2000_minus1x_rtt; + + // sequence methods + inter_rat_params_s_(); + }; + + // member variables + bool feature_group_inds_present; + bool non_crit_ext_present; + access_stratum_release_e access_stratum_release; + uint8_t ue_category; + pdcp_params_s pdcp_params; + phy_layer_params_s phy_layer_params; + rf_params_s rf_params; + meas_params_s meas_params; + fixed_bitstring<32> feature_group_inds; + inter_rat_params_s_ inter_rat_params; + ue_eutra_cap_v920_ies_s non_crit_ext; + + // sequence methods + ue_eutra_cap_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-Config-r12-IEs ::= SEQUENCE +struct scg_cfg_r12_ies_s { + // member variables + bool scg_radio_cfg_r12_present; + bool non_crit_ext_present; + scg_cfg_part_scg_r12_s scg_radio_cfg_r12; + + // sequence methods + scg_cfg_r12_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-ConfigNR-r15 ::= SEQUENCE +struct as_cfg_nr_r15_s { + // member variables + bool source_rb_cfg_nr_r15_present; + bool source_rb_cfg_sn_nr_r15_present; + bool source_other_cfg_sn_nr_r15_present; + dyn_octstring source_rb_cfg_nr_r15; + dyn_octstring source_rb_cfg_sn_nr_r15; + dyn_octstring source_other_cfg_sn_nr_r15; + + // sequence methods + as_cfg_nr_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-Config-r12 ::= SEQUENCE +struct scg_cfg_r12_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { scg_cfg_r12, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scg_cfg_r12_ies_s& scg_cfg_r12() + { + assert_choice_type("scg-Config-r12", type_.to_string(), "c1"); + return c; + } + const scg_cfg_r12_ies_s& scg_cfg_r12() const + { + assert_choice_type("scg-Config-r12", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + scg_cfg_r12_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config ::= SEQUENCE +struct as_cfg_s { + // member variables + bool ext; + meas_cfg_s source_meas_cfg; + rr_cfg_ded_s source_rr_cfg; + security_algorithm_cfg_s source_security_algorithm_cfg; + fixed_bitstring<16> source_ue_id; + mib_s source_mib; + sib_type1_s source_sib_type1; + sib_type2_s source_sib_type2; + ant_info_common_s ant_info_common; + uint16_t source_dl_carrier_freq; + // ... + // group 0 + bool source_sib_type1_ext_present; + dyn_octstring source_sib_type1_ext; + copy_ptr source_other_cfg_r9; + // group 1 + bool source_scell_cfg_list_r10_present; + copy_ptr source_scell_cfg_list_r10; + // group 2 + bool source_cfg_scg_r12_present; + copy_ptr source_cfg_scg_r12; + // group 3 + bool as_cfg_nr_r15_present; + copy_ptr as_cfg_nr_r15; + + // sequence methods + as_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config-v10j0 ::= SEQUENCE +struct as_cfg_v10j0_s { + // member variables + bool ant_info_ded_pcell_v10i0_present; + ant_info_ded_v10i0_s ant_info_ded_pcell_v10i0; + + // sequence methods + as_cfg_v10j0_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config-v1250 ::= SEQUENCE +struct as_cfg_v1250_s { + // member variables + bool source_wlan_offload_cfg_r12_present; + bool source_sl_comm_cfg_r12_present; + bool source_sl_disc_cfg_r12_present; + wlan_offload_cfg_r12_s source_wlan_offload_cfg_r12; + sl_comm_cfg_r12_s source_sl_comm_cfg_r12; + sl_disc_cfg_r12_s source_sl_disc_cfg_r12; + + // sequence methods + as_cfg_v1250_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config-v1320 ::= SEQUENCE +struct as_cfg_v1320_s { + // member variables + bool source_scell_cfg_list_r13_present; + bool source_rclwi_cfg_r13_present; + scell_to_add_mod_list_ext_r13_l source_scell_cfg_list_r13; + rclwi_cfg_r13_c source_rclwi_cfg_r13; + + // sequence methods + as_cfg_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config-v1430 ::= SEQUENCE +struct as_cfg_v1430_s { + // member variables + bool source_sl_v2x_comm_cfg_r14_present; + bool source_lwa_cfg_r14_present; + bool source_wlan_meas_result_r14_present; + sl_v2x_cfg_ded_r14_s source_sl_v2x_comm_cfg_r14; + lwa_cfg_r13_s source_lwa_cfg_r14; + meas_result_list_wlan_r13_l source_wlan_meas_result_r14; + + // sequence methods + as_cfg_v1430_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Config-v9e0 ::= SEQUENCE +struct as_cfg_v9e0_s { + // member variables + uint32_t source_dl_carrier_freq_v9e0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AdditionalReestabInfo ::= SEQUENCE +struct add_reestab_info_s { + // member variables + fixed_bitstring<28> cell_id; + fixed_bitstring<256> key_e_node_b_star; + fixed_bitstring<16> short_mac_i; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AdditionalReestabInfoList ::= SEQUENCE (SIZE (1..maxReestabInfo)) OF AdditionalReestabInfo +typedef dyn_array add_reestab_info_list_l; + +// ReestablishmentInfo ::= SEQUENCE +struct reest_info_s { + // member variables + bool ext; + bool add_reestab_info_list_present; + uint16_t source_pci; + fixed_bitstring<16> target_cell_short_mac_i; + add_reestab_info_list_l add_reestab_info_list; + // ... + + // sequence methods + reest_info_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Context ::= SEQUENCE +struct as_context_s { + // member variables + bool reest_info_present; + reest_info_s reest_info; + + // sequence methods + as_context_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Context-v1130 ::= SEQUENCE +struct as_context_v1130_s { + // member variables + bool ext; + bool idc_ind_r11_present; + bool mbms_interest_ind_r11_present; + bool pwr_pref_ind_r11_present; + dyn_octstring idc_ind_r11; + dyn_octstring mbms_interest_ind_r11; + dyn_octstring pwr_pref_ind_r11; + // ... + // group 0 + bool sidelink_ue_info_r12_present; + dyn_octstring sidelink_ue_info_r12; + // group 1 + bool source_context_en_dc_r15_present; + dyn_octstring source_context_en_dc_r15; + + // sequence methods + as_context_v1130_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AS-Context-v1320 ::= SEQUENCE +struct as_context_v1320_s { + // member variables + bool wlan_conn_status_report_r13_present; + dyn_octstring wlan_conn_status_report_r13; + + // sequence methods + as_context_v1320_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-RS-TriggeredList-r12 ::= SEQUENCE (SIZE (1..maxCSI-RS-Meas-r12)) OF INTEGER +typedef dyn_array csi_rs_triggered_list_r12_l; + +// CandidateCellInfo-r10 ::= SEQUENCE +struct candidate_cell_info_r10_s { + // member variables + bool ext; + bool rsrp_result_r10_present; + bool rsrq_result_r10_present; + uint16_t pci_r10; + uint16_t dl_carrier_freq_r10; + uint8_t rsrp_result_r10; + uint8_t rsrq_result_r10; + // ... + // group 0 + bool dl_carrier_freq_v1090_present; + uint32_t dl_carrier_freq_v1090; + // group 1 + bool rsrq_result_v1250_present; + int8_t rsrq_result_v1250; + // group 2 + bool rs_sinr_result_r13_present; + uint8_t rs_sinr_result_r13; + + // sequence methods + candidate_cell_info_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CandidateCellInfoList-r10 ::= SEQUENCE (SIZE (1..maxFreq)) OF CandidateCellInfo-r10 +typedef dyn_array candidate_cell_info_list_r10_l; + +// Cell-ToAddMod-r12 ::= SEQUENCE +struct cell_to_add_mod_r12_s { + struct cell_identif_r12_s_ { + // member variables + uint16_t pci_r12; + uint32_t dl_carrier_freq_r12; + }; + struct meas_result_cell_to_add_r12_s_ { + // member variables + uint8_t rsrp_result_r12; + uint8_t rsrq_result_r12; + }; + struct meas_result_cell_to_add_v1310_s_ { + // member variables + uint8_t rs_sinr_result_r13; + }; + + // member variables + bool ext; + bool cell_identif_r12_present; + bool meas_result_cell_to_add_r12_present; + uint8_t s_cell_idx_r12; + cell_identif_r12_s_ cell_identif_r12; + meas_result_cell_to_add_r12_s_ meas_result_cell_to_add_r12; + // ... + // group 0 + bool s_cell_idx_r13_present; + bool meas_result_cell_to_add_v1310_present; + uint8_t s_cell_idx_r13; + copy_ptr meas_result_cell_to_add_v1310; + + // sequence methods + cell_to_add_mod_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-IndexList-r15 ::= SEQUENCE (SIZE (1..maxRS-Index-r15)) OF INTEGER +typedef dyn_array ssb_idx_list_r15_l; + +struct cells_triggered_list_item_c_ { + struct pci_utra_c_ { + struct types { + enum options { fdd, tdd, nulltype }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + pci_utra_c_() : type_(types::nulltype) {} + pci_utra_c_(const pci_utra_c_& other); + pci_utra_c_& operator=(const pci_utra_c_& other); + ~pci_utra_c_() { destroy_(); } + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& fdd() + { + assert_choice_type("fdd", type_.to_string(), "physCellIdUTRA"); + return c.get(); + } + uint8_t& tdd() + { + assert_choice_type("tdd", type_.to_string(), "physCellIdUTRA"); + return c.get(); + } + const uint16_t& fdd() const + { + assert_choice_type("fdd", type_.to_string(), "physCellIdUTRA"); + return c.get(); + } + const uint8_t& tdd() const + { + assert_choice_type("tdd", type_.to_string(), "physCellIdUTRA"); + return c.get(); + } + + private: + types type_; + choice_buffer_t<8> c; + + void destroy_(); + }; + struct pci_geran_s_ { + // member variables + carrier_freq_geran_s carrier_freq; + pci_geran_s pci; + }; + struct pci_nr_r15_s_ { + // member variables + bool rs_idx_list_r15_present; + uint32_t carrier_freq; + uint16_t pci; + ssb_idx_list_r15_l rs_idx_list_r15; + + // sequence methods + pci_nr_r15_s_(); + }; + struct types { + enum options { pci_eutra, pci_utra, pci_geran, pci_cdma2000, wlan_ids_r13, pci_nr_r15, nulltype }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // choice methods + cells_triggered_list_item_c_() : type_(types::nulltype) {} + cells_triggered_list_item_c_(const cells_triggered_list_item_c_& other); + cells_triggered_list_item_c_& operator=(const cells_triggered_list_item_c_& other); + ~cells_triggered_list_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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + uint16_t& pci_eutra() + { + assert_choice_type("physCellIdEUTRA", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + pci_utra_c_& pci_utra() + { + assert_choice_type("physCellIdUTRA", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + pci_geran_s_& pci_geran() + { + assert_choice_type("physCellIdGERAN", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + uint16_t& pci_cdma2000() + { + assert_choice_type("physCellIdCDMA2000", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + wlan_ids_r12_s& wlan_ids_r13() + { + assert_choice_type("wlan-Identifiers-r13", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + pci_nr_r15_s_& pci_nr_r15() + { + assert_choice_type("physCellIdNR-r15", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + const uint16_t& pci_eutra() const + { + assert_choice_type("physCellIdEUTRA", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + const pci_utra_c_& pci_utra() const + { + assert_choice_type("physCellIdUTRA", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + const pci_geran_s_& pci_geran() const + { + assert_choice_type("physCellIdGERAN", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + const uint16_t& pci_cdma2000() const + { + assert_choice_type("physCellIdCDMA2000", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + const wlan_ids_r12_s& wlan_ids_r13() const + { + assert_choice_type("wlan-Identifiers-r13", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + const pci_nr_r15_s_& pci_nr_r15() const + { + assert_choice_type("physCellIdNR-r15", type_.to_string(), "CellsTriggeredList-item"); + return c.get(); + } + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// CellsTriggeredList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsTriggeredList-item +typedef dyn_array cells_triggered_list_l; + +// DRB-InfoSCG-r12 ::= SEQUENCE +struct drb_info_scg_r12_s { + struct drb_type_r12_e_ { + enum options { split, scg }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + drb_type_r12_e_() {} + drb_type_r12_e_(options v) : value(v) {} + drb_type_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool eps_bearer_id_r12_present; + bool drb_type_r12_present; + uint8_t eps_bearer_id_r12; + uint8_t drb_id_r12; + drb_type_r12_e_ drb_type_r12; + // ... + + // sequence methods + drb_info_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-InfoListSCG-r12 ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-InfoSCG-r12 +typedef dyn_array drb_info_list_scg_r12_l; + +// DRB-InfoListSCG-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-InfoSCG-r12 +typedef dyn_array drb_info_list_scg_r15_l; + +// HandoverCommand-r8-IEs ::= SEQUENCE +struct ho_cmd_r8_ies_s { + // member variables + bool non_crit_ext_present; + dyn_octstring ho_cmd_msg; + + // sequence methods + ho_cmd_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverCommand ::= SEQUENCE +struct ho_cmd_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ho_cmd_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ho_cmd_r8_ies_s& ho_cmd_r8() + { + assert_choice_type("handoverCommand-r8", type_.to_string(), "c1"); + return c; + } + const ho_cmd_r8_ies_s& ho_cmd_r8() const + { + assert_choice_type("handoverCommand-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ho_cmd_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v1430-IEs ::= SEQUENCE +struct ho_prep_info_v1430_ies_s { + // member variables + bool as_cfg_v1430_present; + bool make_before_break_req_r14_present; + bool non_crit_ext_present; + as_cfg_v1430_s as_cfg_v1430; + + // sequence methods + ho_prep_info_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v1320-IEs ::= SEQUENCE +struct ho_prep_info_v1320_ies_s { + // member variables + bool as_cfg_v1320_present; + bool as_context_v1320_present; + bool non_crit_ext_present; + as_cfg_v1320_s as_cfg_v1320; + as_context_v1320_s as_context_v1320; + ho_prep_info_v1430_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v1320_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v1250-IEs ::= SEQUENCE +struct ho_prep_info_v1250_ies_s { + // member variables + bool ue_supported_earfcn_r12_present; + bool as_cfg_v1250_present; + bool non_crit_ext_present; + uint32_t ue_supported_earfcn_r12; + as_cfg_v1250_s as_cfg_v1250; + ho_prep_info_v1320_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v1250_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE +struct ho_prep_info_v10j0_ies_s { + // member variables + bool as_cfg_v10j0_present; + bool non_crit_ext_present; + as_cfg_v10j0_s as_cfg_v10j0; + + // sequence methods + ho_prep_info_v10j0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v1130-IEs ::= SEQUENCE +struct ho_prep_info_v1130_ies_s { + // member variables + bool as_context_v1130_present; + bool non_crit_ext_present; + as_context_v1130_s as_context_v1130; + ho_prep_info_v1250_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v1130_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v9e0-IEs ::= SEQUENCE +struct ho_prep_info_v9e0_ies_s { + // member variables + bool as_cfg_v9e0_present; + bool non_crit_ext_present; + as_cfg_v9e0_s as_cfg_v9e0; + ho_prep_info_v1130_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v9e0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE +struct ho_prep_info_v9j0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ho_prep_info_v10j0_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v9j0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE +struct ho_prep_info_v9d0_ies_s { + // member variables + bool late_non_crit_ext_present; + bool non_crit_ext_present; + dyn_octstring late_non_crit_ext; + ho_prep_info_v9e0_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v9d0_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v920-IEs ::= SEQUENCE +struct ho_prep_info_v920_ies_s { + struct ue_cfg_release_r9_e_ { + enum options { rel9, rel10, rel11, rel12, v10j0, v11e0, v1280, rel13, /*...*/ rel14, rel15 }; + + options value; + static const uint32_t nof_types = 10, nof_exts = 2; + static const bool has_ext = true; + + // enumerated methods + ue_cfg_release_r9_e_() {} + ue_cfg_release_r9_e_(options v) : value(v) {} + ue_cfg_release_r9_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ue_cfg_release_r9_present; + bool non_crit_ext_present; + ue_cfg_release_r9_e_ ue_cfg_release_r9; + ho_prep_info_v9d0_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_v920_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRM-Config ::= SEQUENCE +struct rrm_cfg_s { + struct ue_inactive_time_e_ { + enum options { + s1, + s2, + s3, + s5, + s7, + s10, + s15, + s20, + s25, + s30, + s40, + s50, + min1, + min1s20c, + min1s40, + min2, + min2s30, + min3, + min3s30, + min4, + min5, + min6, + min7, + min8, + min9, + min10, + min12, + min14, + min17, + min20, + min24, + min28, + min33, + min38, + min44, + min50, + hr1, + hr1min30, + hr2, + hr2min30, + hr3, + hr3min30, + hr4, + hr5, + hr6, + hr8, + hr10, + hr13, + hr16, + hr20, + day1, + day1hr12, + day2, + day2hr12, + day3, + day4, + day5, + day7, + day10, + day14, + day19, + day24, + day30, + day_more_than30 + }; + + options value; + static const uint32_t nof_types = 64, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + ue_inactive_time_e_() {} + ue_inactive_time_e_(options v) : value(v) {} + ue_inactive_time_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool ue_inactive_time_present; + ue_inactive_time_e_ ue_inactive_time; + // ... + // group 0 + bool candidate_cell_info_list_r10_present; + copy_ptr candidate_cell_info_list_r10; + // group 1 + bool candidate_cell_info_list_nr_r15_present; + copy_ptr candidate_cell_info_list_nr_r15; + + // sequence methods + rrm_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-r8-IEs ::= SEQUENCE +struct ho_prep_info_r8_ies_s { + // member variables + bool as_cfg_present; + bool rrm_cfg_present; + bool as_context_present; + bool non_crit_ext_present; + ue_cap_rat_container_list_l ue_radio_access_cap_info; + as_cfg_s as_cfg; + rrm_cfg_s rrm_cfg; + as_context_s as_context; + ho_prep_info_v920_ies_s non_crit_ext; + + // sequence methods + ho_prep_info_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation ::= SEQUENCE +struct ho_prep_info_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ho_prep_info_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ho_prep_info_r8_ies_s& ho_prep_info_r8() + { + assert_choice_type("handoverPreparationInformation-r8", type_.to_string(), "c1"); + return c; + } + const ho_prep_info_r8_ies_s& ho_prep_info_r8() const + { + assert_choice_type("handoverPreparationInformation-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ho_prep_info_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HandoverPreparationInformation-v1530-IEs ::= SEQUENCE +struct ho_prep_info_v1530_ies_s { + // member variables + bool ran_notif_area_info_r15_present; + bool non_crit_ext_present; + ran_notif_area_info_r15_c ran_notif_area_info_r15; + + // sequence methods + ho_prep_info_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasInfoList2-r10 ::= SEQUENCE (SIZE (1..maxLogMeas-r10)) OF LogMeasInfo-r10 +typedef dyn_array log_meas_info_list2_r10_l; + +// TDD-ConfigSL-r12 ::= SEQUENCE +struct tdd_cfg_sl_r12_s { + struct sf_assign_sl_r12_e_ { + enum options { none, sa0, sa1, sa2, sa3, sa4, sa5, sa6 }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sf_assign_sl_r12_e_() {} + sf_assign_sl_r12_e_(options v) : value(v) {} + sf_assign_sl_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + sf_assign_sl_r12_e_ sf_assign_sl_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MasterInformationBlock-SL ::= SEQUENCE +struct mib_sl_s { + struct sl_bw_r12_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_bw_r12_e_() {} + sl_bw_r12_e_(options v) : value(v) {} + sl_bw_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + sl_bw_r12_e_ sl_bw_r12; + tdd_cfg_sl_r12_s tdd_cfg_sl_r12; + fixed_bitstring<10> direct_frame_num_r12; + uint8_t direct_sf_num_r12; + bool in_coverage_r12; + fixed_bitstring<19> reserved_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MasterInformationBlock-SL-V2X-r14 ::= SEQUENCE +struct mib_sl_v2x_r14_s { + struct sl_bw_r14_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_bw_r14_e_() {} + sl_bw_r14_e_(options v) : value(v) {} + sl_bw_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + sl_bw_r14_e_ sl_bw_r14; + tdd_cfg_sl_r12_s tdd_cfg_sl_r14; + fixed_bitstring<10> direct_frame_num_r14; + uint8_t direct_sf_num_r14; + bool in_coverage_r14; + fixed_bitstring<27> reserved_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultRSSI-SCG-r13 ::= SEQUENCE +struct meas_result_rssi_scg_r13_s { + // member variables + uint8_t serv_cell_id_r13; + meas_result_for_rssi_r13_s meas_result_for_rssi_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultListRSSI-SCG-r13 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultRSSI-SCG-r13 +typedef dyn_array meas_result_list_rssi_scg_r13_l; + +// MeasResultServCellSCG-r12 ::= SEQUENCE +struct meas_result_serv_cell_scg_r12_s { + struct meas_result_scell_r12_s_ { + // member variables + uint8_t rsrp_result_scell_r12; + uint8_t rsrq_result_scell_r12; + }; + struct meas_result_scell_v1310_s_ { + // member variables + uint8_t rs_sinr_result_scell_r13; + }; + + // member variables + bool ext; + uint8_t serv_cell_id_r12; + meas_result_scell_r12_s_ meas_result_scell_r12; + // ... + // group 0 + bool serv_cell_id_r13_present; + bool meas_result_scell_v1310_present; + uint8_t serv_cell_id_r13; + copy_ptr meas_result_scell_v1310; + + // sequence methods + meas_result_serv_cell_scg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServCellListSCG-Ext-r13 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultServCellSCG-r12 +typedef dyn_array meas_result_serv_cell_list_scg_ext_r13_l; + +// MeasResultServCellListSCG-r12 ::= SEQUENCE (SIZE (1..maxServCell-r10)) OF MeasResultServCellSCG-r12 +typedef dyn_array meas_result_serv_cell_list_scg_r12_l; + +// SBCCH-SL-BCH-MessageType ::= MasterInformationBlock-SL +typedef mib_sl_s sbcch_sl_bch_msg_type_s; + +// SBCCH-SL-BCH-Message ::= SEQUENCE +struct sbcch_sl_bch_msg_s { + // member variables + sbcch_sl_bch_msg_type_s msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SBCCH-SL-BCH-MessageType-V2X-r14 ::= MasterInformationBlock-SL-V2X-r14 +typedef mib_sl_v2x_r14_s sbcch_sl_bch_msg_type_v2x_r14_s; + +// SBCCH-SL-BCH-Message-V2X-r14 ::= SEQUENCE +struct sbcch_sl_bch_msg_v2x_r14_s { + // member variables + sbcch_sl_bch_msg_type_v2x_r14_s msg; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigInfo-v1530-IEs ::= SEQUENCE +struct scg_cfg_info_v1530_ies_s { + // member variables + bool drb_to_add_mod_list_scg_r15_present; + bool drb_to_release_list_scg_r15_present; + bool non_crit_ext_present; + drb_info_list_scg_r15_l drb_to_add_mod_list_scg_r15; + drb_to_release_list_r15_l drb_to_release_list_scg_r15; + + // sequence methods + scg_cfg_info_v1530_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigInfo-v1430-IEs ::= SEQUENCE +struct scg_cfg_info_v1430_ies_s { + // member variables + bool make_before_break_scg_req_r14_present; + bool meas_gap_cfg_per_cc_list_present; + bool non_crit_ext_present; + meas_gap_cfg_per_cc_list_r14_c meas_gap_cfg_per_cc_list; + scg_cfg_info_v1530_ies_s non_crit_ext; + + // sequence methods + scg_cfg_info_v1430_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigInfo-v1330-IEs ::= SEQUENCE +struct scg_cfg_info_v1330_ies_s { + // member variables + bool meas_result_list_rssi_scg_r13_present; + bool non_crit_ext_present; + meas_result_list_rssi_scg_r13_l meas_result_list_rssi_scg_r13; + scg_cfg_info_v1430_ies_s non_crit_ext; + + // sequence methods + scg_cfg_info_v1330_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModListSCG-Ext-r13 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF Cell-ToAddMod-r12 +typedef dyn_array scell_to_add_mod_list_scg_ext_r13_l; + +// SCG-ConfigInfo-v1310-IEs ::= SEQUENCE +struct scg_cfg_info_v1310_ies_s { + // member variables + bool meas_result_sstd_r13_present; + bool s_cell_to_add_mod_list_mcg_ext_r13_present; + bool meas_result_serv_cell_list_scg_ext_r13_present; + bool s_cell_to_add_mod_list_scg_ext_r13_present; + bool s_cell_to_release_list_scg_ext_r13_present; + bool non_crit_ext_present; + meas_result_sstd_r13_s meas_result_sstd_r13; + scell_to_add_mod_list_ext_r13_l s_cell_to_add_mod_list_mcg_ext_r13; + meas_result_serv_cell_list_scg_ext_r13_l meas_result_serv_cell_list_scg_ext_r13; + scell_to_add_mod_list_scg_ext_r13_l s_cell_to_add_mod_list_scg_ext_r13; + scell_to_release_list_ext_r13_l s_cell_to_release_list_scg_ext_r13; + scg_cfg_info_v1330_ies_s non_crit_ext; + + // sequence methods + scg_cfg_info_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigRestrictInfo-r12 ::= SEQUENCE +struct scg_cfg_restrict_info_r12_s { + // member variables + uint8_t max_sch_tb_bits_dl_r12; + uint8_t max_sch_tb_bits_ul_r12; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCellToAddModListSCG-r12 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF Cell-ToAddMod-r12 +typedef dyn_array scell_to_add_mod_list_scg_r12_l; + +// SCG-ConfigInfo-r12-IEs ::= SEQUENCE +struct scg_cfg_info_r12_ies_s { + // member variables + bool rr_cfg_ded_mcg_r12_present; + bool s_cell_to_add_mod_list_mcg_r12_present; + bool meas_gap_cfg_r12_present; + bool pwr_coordination_info_r12_present; + bool scg_radio_cfg_r12_present; + bool eutra_cap_info_r12_present; + bool scg_cfg_restrict_info_r12_present; + bool mbms_interest_ind_r12_present; + bool meas_result_serv_cell_list_scg_r12_present; + bool drb_to_add_mod_list_scg_r12_present; + bool drb_to_release_list_scg_r12_present; + bool s_cell_to_add_mod_list_scg_r12_present; + bool s_cell_to_release_list_scg_r12_present; + bool p_max_r12_present; + bool non_crit_ext_present; + rr_cfg_ded_s rr_cfg_ded_mcg_r12; + scell_to_add_mod_list_r10_l s_cell_to_add_mod_list_mcg_r12; + meas_gap_cfg_c meas_gap_cfg_r12; + pwr_coordination_info_r12_s pwr_coordination_info_r12; + scg_cfg_part_scg_r12_s scg_radio_cfg_r12; + dyn_octstring eutra_cap_info_r12; + scg_cfg_restrict_info_r12_s scg_cfg_restrict_info_r12; + dyn_octstring mbms_interest_ind_r12; + meas_result_serv_cell_list_scg_r12_l meas_result_serv_cell_list_scg_r12; + drb_info_list_scg_r12_l drb_to_add_mod_list_scg_r12; + drb_to_release_list_l drb_to_release_list_scg_r12; + scell_to_add_mod_list_scg_r12_l s_cell_to_add_mod_list_scg_r12; + scell_to_release_list_r10_l s_cell_to_release_list_scg_r12; + int8_t p_max_r12; + scg_cfg_info_v1310_ies_s non_crit_ext; + + // sequence methods + scg_cfg_info_r12_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-ConfigInfo-r12 ::= SEQUENCE +struct scg_cfg_info_r12_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { scg_cfg_info_r12, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + scg_cfg_info_r12_ies_s& scg_cfg_info_r12() + { + assert_choice_type("scg-ConfigInfo-r12", type_.to_string(), "c1"); + return c; + } + const scg_cfg_info_r12_ies_s& scg_cfg_info_r12() const + { + assert_choice_type("scg-ConfigInfo-r12", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + scg_cfg_info_r12_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PPPP-TxPreconfigIndex-r14 ::= SEQUENCE +struct sl_pppp_tx_precfg_idx_r14_s { + typedef bounded_array tx_cfg_idx_list_r14_l_; + + // member variables + uint8_t prio_thres_r14; + uint8_t default_tx_cfg_idx_r14; + uint8_t cbr_cfg_idx_r14; + tx_cfg_idx_list_r14_l_ tx_cfg_idx_list_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CBR-PPPP-TxPreconfigList-r14 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxPreconfigIndex-r14 +typedef dyn_array sl_cbr_pppp_tx_precfg_list_r14_l; + +// SL-PPPP-TxPreconfigIndex-v1530 ::= SEQUENCE +struct sl_pppp_tx_precfg_idx_v1530_s { + typedef dyn_array mcs_pssch_range_r15_l_; + + // member variables + bool mcs_pssch_range_r15_present; + mcs_pssch_range_r15_l_ mcs_pssch_range_r15; + + // sequence methods + sl_pppp_tx_precfg_idx_v1530_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-CBR-PPPP-TxPreconfigList-v1530 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxPreconfigIndex-v1530 +typedef dyn_array sl_cbr_pppp_tx_precfg_list_v1530_l; + +// SL-CBR-PreconfigTxConfigList-r14 ::= SEQUENCE +struct sl_cbr_precfg_tx_cfg_list_r14_s { + typedef dyn_array cbr_range_common_cfg_list_r14_l_; + typedef dyn_array sl_cbr_pssch_tx_cfg_list_r14_l_; + + // member variables + cbr_range_common_cfg_list_r14_l_ cbr_range_common_cfg_list_r14; + sl_cbr_pssch_tx_cfg_list_r14_l_ sl_cbr_pssch_tx_cfg_list_r14; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigCommPool-r12 ::= SEQUENCE +struct sl_precfg_comm_pool_r12_s { + // member variables + bool ext; + sl_cp_len_r12_e sc_cp_len_r12; + sl_period_comm_r12_e sc_period_r12; + sl_tf_res_cfg_r12_s sc_tf_res_cfg_r12; + int8_t sc_tx_params_r12; + sl_cp_len_r12_e data_cp_len_r12; + sl_tf_res_cfg_r12_s data_tf_res_cfg_r12; + sl_hop_cfg_comm_r12_s data_hop_cfg_r12; + int8_t data_tx_params_r12; + dyn_bitstring trpt_subset_r12; + // ... + // group 0 + bool prio_list_r13_present; + copy_ptr prio_list_r13; + + // sequence methods + sl_precfg_comm_pool_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigCommPoolList4-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-PreconfigCommPool-r12 +typedef dyn_array sl_precfg_comm_pool_list4_r12_l; + +// SL-PreconfigCommRxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-CommRxPoolPreconf-v1310)) OF SL-PreconfigCommPool-r12 +typedef dyn_array sl_precfg_comm_rx_pool_list_r13_l; + +// SL-PreconfigCommTxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-CommTxPoolPreconf-v1310)) OF SL-PreconfigCommPool-r12 +typedef dyn_array sl_precfg_comm_tx_pool_list_r13_l; + +// SL-PreconfigDiscPool-r13 ::= SEQUENCE +struct sl_precfg_disc_pool_r13_s { + struct disc_period_r13_e_ { + enum options { rf4, rf6, rf7, rf8, rf12, rf14, rf16, rf24, rf28, rf32, rf64, rf128, rf256, rf512, rf1024, spare }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 16, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + disc_period_r13_e_() {} + disc_period_r13_e_(options v) : value(v) {} + disc_period_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + struct tx_params_r13_s_ { + struct tx_probability_r13_e_ { + enum options { p25, p50, p75, p100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 4, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + tx_probability_r13_e_() {} + tx_probability_r13_e_(options v) : value(v) {} + tx_probability_r13_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + int8_t tx_params_general_r13; + tx_probability_r13_e_ tx_probability_r13; + }; + + // member variables + bool ext; + bool tx_params_r13_present; + sl_cp_len_r12_e cp_len_r13; + disc_period_r13_e_ disc_period_r13; + uint8_t num_retx_r13; + uint8_t num_repeat_r13; + sl_tf_res_cfg_r12_s tf_res_cfg_r13; + tx_params_r13_s_ tx_params_r13; + // ... + + // sequence methods + sl_precfg_disc_pool_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigDiscRxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-DiscRxPoolPreconf-r13)) OF SL-PreconfigDiscPool-r13 +typedef dyn_array sl_precfg_disc_rx_pool_list_r13_l; + +// SL-PreconfigDiscTxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-DiscTxPoolPreconf-r13)) OF SL-PreconfigDiscPool-r13 +typedef dyn_array sl_precfg_disc_tx_pool_list_r13_l; + +// SL-PreconfigGeneral-r12 ::= SEQUENCE +struct sl_precfg_general_r12_s { + struct rohc_profiles_r12_s_ { + // member variables + bool profile0x0001_r12; + bool profile0x0002_r12; + bool profile0x0004_r12; + bool profile0x0006_r12; + bool profile0x0101_r12; + bool profile0x0102_r12; + bool profile0x0104_r12; + }; + struct sl_bw_r12_e_ { + enum options { n6, n15, n25, n50, n75, n100 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sl_bw_r12_e_() {} + sl_bw_r12_e_(options v) : value(v) {} + sl_bw_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + rohc_profiles_r12_s_ rohc_profiles_r12; + uint32_t carrier_freq_r12; + int8_t max_tx_pwr_r12; + uint8_t add_spec_emission_r12; + sl_bw_r12_e_ sl_bw_r12; + tdd_cfg_sl_r12_s tdd_cfg_sl_r12; + fixed_bitstring<19> reserved_r12; + // ... + // group 0 + bool add_spec_emission_v1440_present; + uint16_t add_spec_emission_v1440; + + // sequence methods + sl_precfg_general_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigRelay-r13 ::= SEQUENCE +struct sl_precfg_relay_r13_s { + // member variables + resel_info_relay_r13_s resel_info_oo_c_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigSync-r12 ::= SEQUENCE +struct sl_precfg_sync_r12_s { + struct sync_ref_min_hyst_r12_e_ { + enum options { db0, db3, db6, db9, db12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sync_ref_min_hyst_r12_e_() {} + sync_ref_min_hyst_r12_e_(options v) : value(v) {} + sync_ref_min_hyst_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct sync_ref_diff_hyst_r12_e_ { + enum options { db0, db3, db6, db9, db12, dbinf }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sync_ref_diff_hyst_r12_e_() {} + sync_ref_diff_hyst_r12_e_(options v) : value(v) {} + sync_ref_diff_hyst_r12_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + sl_cp_len_r12_e sync_cp_len_r12; + uint8_t sync_offset_ind1_r12; + uint8_t sync_offset_ind2_r12; + int8_t sync_tx_params_r12; + uint8_t sync_tx_thresh_oo_c_r12; + filt_coef_e filt_coef_r12; + sync_ref_min_hyst_r12_e_ sync_ref_min_hyst_r12; + sync_ref_diff_hyst_r12_e_ sync_ref_diff_hyst_r12; + // ... + // group 0 + bool sync_tx_periodic_r13_present; + + // sequence methods + sl_precfg_sync_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-PreconfigCommPool-r14 ::= SEQUENCE +struct sl_v2x_precfg_comm_pool_r14_s { + struct size_subch_r14_e_ { + enum options { + n4, + n5, + n6, + n8, + n9, + n10, + n12, + n15, + n16, + n18, + n20, + n25, + n30, + n48, + n50, + n72, + n75, + n96, + n100, + spare13, + spare12, + spare11, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1 + }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 32, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + size_subch_r14_e_() {} + size_subch_r14_e_(options v) : value(v) {} + size_subch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct num_subch_r14_e_ { + enum options { n1, n3, n5, n8, n10, n15, n20, spare1 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + num_subch_r14_e_() {} + num_subch_r14_e_(options v) : value(v) {} + num_subch_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + bool sl_offset_ind_r14_present; + bool start_rb_pscch_pool_r14_present; + bool zone_id_r14_present; + bool thresh_s_rssi_cbr_r14_present; + bool cbr_pssch_tx_cfg_list_r14_present; + bool res_sel_cfg_p2_x_r14_present; + bool sync_allowed_r14_present; + bool restrict_res_reserv_period_r14_present; + sl_offset_ind_r12_c sl_offset_ind_r14; + sf_bitmap_sl_r14_c sl_sf_r14; + bool adjacency_pscch_pssch_r14; + size_subch_r14_e_ size_subch_r14; + num_subch_r14_e_ num_subch_r14; + uint8_t start_rb_subch_r14; + uint8_t start_rb_pscch_pool_r14; + int8_t data_tx_params_r14; + uint8_t zone_id_r14; + uint8_t thresh_s_rssi_cbr_r14; + sl_cbr_pppp_tx_precfg_list_r14_l cbr_pssch_tx_cfg_list_r14; + sl_p2_x_res_sel_cfg_r14_s res_sel_cfg_p2_x_r14; + sl_sync_allowed_r14_s sync_allowed_r14; + sl_restrict_res_reserv_period_list_r14_l restrict_res_reserv_period_r14; + // ... + // group 0 + bool sl_min_t2_value_list_r15_present; + bool cbr_pssch_tx_cfg_list_v1530_present; + copy_ptr sl_min_t2_value_list_r15; + copy_ptr cbr_pssch_tx_cfg_list_v1530; + + // sequence methods + sl_v2x_precfg_comm_pool_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigV2X-RxPoolList-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-RxPoolPreconf-r14)) OF SL-V2X-PreconfigCommPool-r14 +typedef dyn_array sl_precfg_v2x_rx_pool_list_r14_l; + +// SL-V2X-SyncOffsetIndicators-r14 ::= SEQUENCE +struct sl_v2x_sync_offset_inds_r14_s { + // member variables + bool sync_offset_ind3_r14_present; + uint8_t sync_offset_ind1_r14; + uint8_t sync_offset_ind2_r14; + uint8_t sync_offset_ind3_r14; + + // sequence methods + sl_v2x_sync_offset_inds_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigV2X-Sync-r14 ::= SEQUENCE +struct sl_precfg_v2x_sync_r14_s { + struct sync_ref_min_hyst_r14_e_ { + enum options { db0, db3, db6, db9, db12 }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 5, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sync_ref_min_hyst_r14_e_() {} + sync_ref_min_hyst_r14_e_(options v) : value(v) {} + sync_ref_min_hyst_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + struct sync_ref_diff_hyst_r14_e_ { + enum options { db0, db3, db6, db9, db12, dbinf }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 6, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sync_ref_diff_hyst_r14_e_() {} + sync_ref_diff_hyst_r14_e_(options v) : value(v) {} + sync_ref_diff_hyst_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; + }; + + // member variables + bool ext; + sl_v2x_sync_offset_inds_r14_s sync_offset_inds_r14; + int8_t sync_tx_params_r14; + uint8_t sync_tx_thresh_oo_c_r14; + filt_coef_e filt_coef_r14; + sync_ref_min_hyst_r14_e_ sync_ref_min_hyst_r14; + sync_ref_diff_hyst_r14_e_ sync_ref_diff_hyst_r14; + // ... + // group 0 + bool slss_tx_disabled_r15_present; + + // sequence methods + sl_precfg_v2x_sync_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PreconfigV2X-TxPoolList-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-TxPoolPreconf-r14)) OF SL-V2X-PreconfigCommPool-r14 +typedef dyn_array sl_precfg_v2x_tx_pool_list_r14_l; + +// SL-Preconfiguration-r12 ::= SEQUENCE +struct sl_precfg_r12_s { + struct precfg_comm_v1310_s_ { + // member variables + bool comm_tx_pool_list_r13_present; + sl_precfg_comm_rx_pool_list_r13_l comm_rx_pool_list_r13; + sl_precfg_comm_tx_pool_list_r13_l comm_tx_pool_list_r13; + + // sequence methods + precfg_comm_v1310_s_(); + }; + struct precfg_disc_r13_s_ { + // member variables + bool disc_tx_pool_list_r13_present; + sl_precfg_disc_rx_pool_list_r13_l disc_rx_pool_list_r13; + sl_precfg_disc_tx_pool_list_r13_l disc_tx_pool_list_r13; + + // sequence methods + precfg_disc_r13_s_(); + }; + + // member variables + bool ext; + sl_precfg_general_r12_s precfg_general_r12; + sl_precfg_sync_r12_s precfg_sync_r12; + sl_precfg_comm_pool_list4_r12_l precfg_comm_r12; + // ... + // group 0 + bool precfg_comm_v1310_present; + bool precfg_disc_r13_present; + bool precfg_relay_r13_present; + copy_ptr precfg_comm_v1310; + copy_ptr precfg_disc_r13; + copy_ptr precfg_relay_r13; + + // sequence methods + sl_precfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-PreconfigFreqInfo-r14 ::= SEQUENCE +struct sl_v2x_precfg_freq_info_r14_s { + struct sync_prio_r14_e_ { + enum options { gnss, enb }; + + options value; + static const uint32_t nof_types = 2, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + sync_prio_r14_e_() {} + sync_prio_r14_e_(options v) : value(v) {} + sync_prio_r14_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // member variables + bool ext; + bool v2x_comm_precfg_sync_r14_present; + bool v2x_res_sel_cfg_r14_present; + bool zone_cfg_r14_present; + bool thres_sl_tx_prioritization_r14_present; + bool offset_dfn_r14_present; + sl_precfg_general_r12_s v2x_comm_precfg_general_r14; + sl_precfg_v2x_sync_r14_s v2x_comm_precfg_sync_r14; + sl_precfg_v2x_rx_pool_list_r14_l v2x_comm_rx_pool_list_r14; + sl_precfg_v2x_tx_pool_list_r14_l v2x_comm_tx_pool_list_r14; + sl_precfg_v2x_tx_pool_list_r14_l p2x_comm_tx_pool_list_r14; + sl_comm_tx_pool_sensing_cfg_r14_s v2x_res_sel_cfg_r14; + sl_zone_cfg_r14_s zone_cfg_r14; + sync_prio_r14_e_ sync_prio_r14; + uint8_t thres_sl_tx_prioritization_r14; + uint16_t offset_dfn_r14; + // ... + // group 0 + bool v2x_freq_sel_cfg_list_r15_present; + copy_ptr v2x_freq_sel_cfg_list_r15; + + // sequence methods + sl_v2x_precfg_freq_info_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-V2X-PreconfigFreqList-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF SL-V2X-PreconfigFreqInfo-r14 +typedef dyn_array sl_v2x_precfg_freq_list_r14_l; + +// SL-V2X-TxProfile-r15 ::= ENUMERATED +struct sl_v2x_tx_profile_r15_e { + enum options { rel14, rel15, spare6, spare5, spare4, spare3, spare2, spare1, /*...*/ }; + typedef uint8_t number_type; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = true; + + // enumerated methods + sl_v2x_tx_profile_r15_e() {} + sl_v2x_tx_profile_r15_e(options v) : value(v) {} + sl_v2x_tx_profile_r15_e& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint8_t to_number() const; +}; + +// SL-V2X-TxProfileList-r15 ::= SEQUENCE (SIZE (1..256)) OF SL-V2X-TxProfile-r15 +typedef dyn_array sl_v2x_tx_profile_list_r15_l; + +// SL-V2X-Preconfiguration-r14 ::= SEQUENCE +struct sl_v2x_precfg_r14_s { + // member variables + bool ext; + bool anchor_carrier_freq_list_r14_present; + bool cbr_precfg_list_r14_present; + sl_v2x_precfg_freq_list_r14_l v2x_precfg_freq_list_r14; + sl_anchor_carrier_freq_list_v2x_r14_l anchor_carrier_freq_list_r14; + sl_cbr_precfg_tx_cfg_list_r14_s cbr_precfg_list_r14; + // ... + // group 0 + bool v2x_packet_dupl_cfg_r15_present; + bool sync_freq_list_r15_present; + bool slss_tx_multi_freq_r15_present; + bool v2x_tx_profile_list_r15_present; + copy_ptr v2x_packet_dupl_cfg_r15; + copy_ptr sync_freq_list_r15; + copy_ptr v2x_tx_profile_list_r15; + + // sequence methods + sl_v2x_precfg_r14_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEPagingCoverageInformation-r13-IEs ::= SEQUENCE +struct ue_paging_coverage_info_r13_ies_s { + // member variables + bool mpdcch_num_repeat_r13_present; + bool non_crit_ext_present; + uint16_t mpdcch_num_repeat_r13; + + // sequence methods + ue_paging_coverage_info_r13_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEPagingCoverageInformation ::= SEQUENCE +struct ue_paging_coverage_info_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_paging_coverage_info_r13, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_paging_coverage_info_r13_ies_s& ue_paging_coverage_info_r13() + { + assert_choice_type("uePagingCoverageInformation-r13", type_.to_string(), "c1"); + return c; + } + const ue_paging_coverage_info_r13_ies_s& ue_paging_coverage_info_r13() const + { + assert_choice_type("uePagingCoverageInformation-r13", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_paging_coverage_info_r13_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UERadioAccessCapabilityInformation-r8-IEs ::= SEQUENCE +struct ue_radio_access_cap_info_r8_ies_s { + // member variables + bool non_crit_ext_present; + dyn_octstring ue_radio_access_cap_info; + + // sequence methods + ue_radio_access_cap_info_r8_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UERadioAccessCapabilityInformation ::= SEQUENCE +struct ue_radio_access_cap_info_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_radio_access_cap_info_r8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_radio_access_cap_info_r8_ies_s& ue_radio_access_cap_info_r8() + { + assert_choice_type("ueRadioAccessCapabilityInformation-r8", type_.to_string(), "c1"); + return c; + } + const ue_radio_access_cap_info_r8_ies_s& ue_radio_access_cap_info_r8() const + { + assert_choice_type("ueRadioAccessCapabilityInformation-r8", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_radio_access_cap_info_r8_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UERadioPagingInformation-v1310-IEs ::= SEQUENCE +struct ue_radio_paging_info_v1310_ies_s { + typedef dyn_array supported_band_list_eutra_for_paging_r13_l_; + + // member variables + bool supported_band_list_eutra_for_paging_r13_present; + bool non_crit_ext_present; + supported_band_list_eutra_for_paging_r13_l_ supported_band_list_eutra_for_paging_r13; + + // sequence methods + ue_radio_paging_info_v1310_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UERadioPagingInformation-r12-IEs ::= SEQUENCE +struct ue_radio_paging_info_r12_ies_s { + // member variables + bool non_crit_ext_present; + dyn_octstring ue_radio_paging_info_r12; + ue_radio_paging_info_v1310_ies_s non_crit_ext; + + // sequence methods + ue_radio_paging_info_r12_ies_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UERadioPagingInformation ::= SEQUENCE +struct ue_radio_paging_info_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types { + enum options { ue_radio_paging_info_r12, spare7, spare6, spare5, spare4, spare3, spare2, spare1, nulltype }; + + options value; + static const uint32_t nof_types = 8, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + types() {} + types(options v) : value(v) {} + types& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + }; + + // choice methods + c1_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + ue_radio_paging_info_r12_ies_s& ue_radio_paging_info_r12() + { + assert_choice_type("ueRadioPagingInformation-r12", type_.to_string(), "c1"); + return c; + } + const ue_radio_paging_info_r12_ies_s& ue_radio_paging_info_r12() const + { + assert_choice_type("ueRadioPagingInformation-r12", type_.to_string(), "c1"); + return c; + } + + private: + types type_; + ue_radio_paging_info_r12_ies_s c; + }; + typedef c1_or_crit_ext_e types; + + // choice methods + crit_exts_c_() : type_(types::nulltype) {} + 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(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + c1_c_& c1() + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + const c1_c_& c1() const + { + assert_choice_type("c1", type_.to_string(), "criticalExtensions"); + return c.get(); + } + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + crit_exts_c_ crit_exts; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarConnEstFailReport-r11 ::= SEQUENCE +struct var_conn_est_fail_report_r11_s { + // member variables + conn_est_fail_report_r11_s conn_est_fail_report_r11; + plmn_id_s plmn_id_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarLogMeasConfig-r10 ::= SEQUENCE +struct var_log_meas_cfg_r10_s { + // member variables + bool area_cfg_r10_present; + area_cfg_r10_c area_cfg_r10; + logging_dur_r10_e logging_dur_r10; + logging_interv_r10_e logging_interv_r10; + + // sequence methods + var_log_meas_cfg_r10_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarLogMeasConfig-r11 ::= SEQUENCE +struct var_log_meas_cfg_r11_s { + // member variables + bool area_cfg_r10_present; + bool area_cfg_v1130_present; + area_cfg_r10_c area_cfg_r10; + area_cfg_v1130_s area_cfg_v1130; + logging_dur_r10_e logging_dur_r10; + logging_interv_r10_e logging_interv_r10; + + // sequence methods + var_log_meas_cfg_r11_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarLogMeasConfig-r12 ::= SEQUENCE +struct var_log_meas_cfg_r12_s { + // member variables + bool area_cfg_r10_present; + bool area_cfg_v1130_present; + bool target_mbsfn_area_list_r12_present; + area_cfg_r10_c area_cfg_r10; + area_cfg_v1130_s area_cfg_v1130; + logging_dur_r10_e logging_dur_r10; + logging_interv_r10_e logging_interv_r10; + target_mbsfn_area_list_r12_l target_mbsfn_area_list_r12; + + // sequence methods + var_log_meas_cfg_r12_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarLogMeasConfig-r15 ::= SEQUENCE +struct var_log_meas_cfg_r15_s { + // member variables + bool area_cfg_r10_present; + bool area_cfg_v1130_present; + bool target_mbsfn_area_list_r12_present; + bool bt_name_list_r15_present; + bool wlan_name_list_r15_present; + area_cfg_r10_c area_cfg_r10; + area_cfg_v1130_s area_cfg_v1130; + logging_dur_r10_e logging_dur_r10; + logging_interv_r10_e logging_interv_r10; + target_mbsfn_area_list_r12_l target_mbsfn_area_list_r12; + bt_name_list_r15_l bt_name_list_r15; + wlan_name_list_r15_l wlan_name_list_r15; + + // sequence methods + var_log_meas_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarLogMeasReport-r10 ::= SEQUENCE +struct var_log_meas_report_r10_s { + // member variables + trace_ref_r10_s trace_ref_r10; + fixed_octstring<2> trace_recording_session_ref_r10; + fixed_octstring<1> tce_id_r10; + plmn_id_s plmn_id_r10; + fixed_bitstring<48> absolute_time_info_r10; + log_meas_info_list2_r10_l log_meas_info_list_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarLogMeasReport-r11 ::= SEQUENCE +struct var_log_meas_report_r11_s { + // member variables + trace_ref_r10_s trace_ref_r10; + fixed_octstring<2> trace_recording_session_ref_r10; + fixed_octstring<1> tce_id_r10; + plmn_id_list3_r11_l plmn_id_list_r11; + fixed_bitstring<48> absolute_time_info_r10; + log_meas_info_list2_r10_l log_meas_info_list_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarMeasConfig ::= SEQUENCE +struct var_meas_cfg_s { + struct speed_state_pars_c_ { + struct setup_s_ { + // member variables + mob_state_params_s mob_state_params; + speed_state_scale_factors_s time_to_trigger_sf; + }; + typedef setup_e types; + + // choice methods + speed_state_pars_c_() : type_(types::nulltype) {} + void set(types::options e = types::nulltype); + types type() const { return type_; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; + // getters + setup_s_& setup() + { + assert_choice_type("setup", type_.to_string(), "speedStatePars"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type("setup", type_.to_string(), "speedStatePars"); + return c; + } + + private: + types type_; + setup_s_ c; + }; + + // member variables + bool meas_id_list_present; + bool meas_id_list_ext_r12_present; + bool meas_id_list_v1310_present; + bool meas_id_list_ext_v1310_present; + bool meas_obj_list_present; + bool meas_obj_list_ext_r13_present; + bool meas_obj_list_v9i0_present; + bool report_cfg_list_present; + bool quant_cfg_present; + bool meas_scale_factor_r12_present; + bool s_measure_present; + bool speed_state_pars_present; + bool allow_interruptions_r11_present; + meas_id_to_add_mod_list_l meas_id_list; + meas_id_to_add_mod_list_ext_r12_l meas_id_list_ext_r12; + meas_id_to_add_mod_list_v1310_l meas_id_list_v1310; + meas_id_to_add_mod_list_ext_v1310_l meas_id_list_ext_v1310; + meas_obj_to_add_mod_list_l meas_obj_list; + meas_obj_to_add_mod_list_ext_r13_l meas_obj_list_ext_r13; + meas_obj_to_add_mod_list_v9e0_l meas_obj_list_v9i0; + report_cfg_to_add_mod_list_l report_cfg_list; + quant_cfg_s quant_cfg; + meas_scale_factor_r12_e meas_scale_factor_r12; + int16_t s_measure; + speed_state_pars_c_ speed_state_pars; + bool allow_interruptions_r11; + + // sequence methods + var_meas_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarMeasIdleConfig-r15 ::= SEQUENCE +struct var_meas_idle_cfg_r15_s { + struct meas_idle_dur_r15_e_ { + enum options { sec10, sec30, sec60, sec120, sec180, sec240, sec300 }; + typedef uint16_t number_type; + + options value; + static const uint32_t nof_types = 7, nof_exts = 0; + static const bool has_ext = false; + + // enumerated methods + meas_idle_dur_r15_e_() {} + meas_idle_dur_r15_e_(options v) : value(v) {} + meas_idle_dur_r15_e_& operator=(options v) + { + value = v; + return *this; + } + operator options() const { return value; } + std::string to_string() const; + uint16_t to_number() const; + }; + + // member variables + bool meas_idle_carrier_list_eutra_r15_present; + eutra_carrier_list_r15_l meas_idle_carrier_list_eutra_r15; + meas_idle_dur_r15_e_ meas_idle_dur_r15; + + // sequence methods + var_meas_idle_cfg_r15_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarMeasIdleReport-r15 ::= SEQUENCE +struct var_meas_idle_report_r15_s { + // member variables + meas_result_list_idle_r15_l meas_report_idle_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarMeasReport ::= SEQUENCE +struct var_meas_report_s { + // member variables + bool meas_id_v1250_present; + bool cells_triggered_list_present; + bool csi_rs_triggered_list_r12_present; + bool pools_triggered_list_r14_present; + uint8_t meas_id; + uint8_t meas_id_v1250; + cells_triggered_list_l cells_triggered_list; + csi_rs_triggered_list_r12_l csi_rs_triggered_list_r12; + tx_res_pool_meas_list_r14_l pools_triggered_list_r14; + int64_t nof_reports_sent; + + // sequence methods + var_meas_report_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarMeasReportList ::= SEQUENCE (SIZE (1..maxMeasId)) OF VarMeasReport +typedef dyn_array var_meas_report_list_l; + +// VarMeasReportList-r12 ::= SEQUENCE (SIZE (1..maxMeasId-r12)) OF VarMeasReport +typedef dyn_array var_meas_report_list_r12_l; + +// VarMobilityHistoryReport-r12 ::= VisitedCellInfoList-r12 +typedef visited_cell_info_list_r12_l var_mob_history_report_r12_l; + +// VarRLF-Report-r10 ::= SEQUENCE +struct var_rlf_report_r10_s { + // member variables + rlf_report_r9_s rlf_report_r10; + plmn_id_s plmn_id_r10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarRLF-Report-r11 ::= SEQUENCE +struct var_rlf_report_r11_s { + // member variables + rlf_report_r9_s rlf_report_r10; + plmn_id_list3_r11_l plmn_id_list_r11; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarShortINACTIVE-MAC-Input-r15 ::= SEQUENCE +struct var_short_inactive_mac_input_r15_s { + // member variables + fixed_bitstring<28> cell_id_r15; + uint16_t pci_r15; + fixed_bitstring<16> c_rnti_r15; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarShortMAC-Input ::= SEQUENCE +struct var_short_mac_input_s { + // member variables + fixed_bitstring<28> cell_id; + uint16_t pci; + fixed_bitstring<16> c_rnti; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarShortMAC-Input-NB-r13 ::= VarShortMAC-Input +typedef var_short_mac_input_s var_short_mac_input_nb_r13_s; + +// VarShortResumeMAC-Input-r13 ::= SEQUENCE +struct var_short_resume_mac_input_r13_s { + // member variables + fixed_bitstring<28> cell_id_r13; + uint16_t pci_r13; + fixed_bitstring<16> c_rnti_r13; + fixed_bitstring<1> resume_discriminator_r13; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarShortResumeMAC-Input-NB-r13 ::= VarShortResumeMAC-Input-r13 +typedef var_short_resume_mac_input_r13_s var_short_resume_mac_input_nb_r13_s; + +// VarWLAN-MobilityConfig ::= SEQUENCE +struct var_wlan_mob_cfg_s { + // member variables + bool wlan_mob_set_r13_present; + bool success_report_requested_present; + bool wlan_suspend_cfg_r14_present; + wlan_id_list_r13_l wlan_mob_set_r13; + wlan_suspend_cfg_r14_s wlan_suspend_cfg_r14; + + // sequence methods + var_wlan_mob_cfg_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VarWLAN-Status-r13 ::= SEQUENCE +struct var_wlan_status_r13_s { + // member variables + bool status_r14_present; + wlan_status_r13_e status_r13; + wlan_status_v1430_e status_r14; + + // sequence methods + var_wlan_status_r13_s(); + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(bit_ref& bref); + void to_json(json_writer& j) const; +}; + +} // namespace rrc +} // namespace asn1 + +#endif // SRSASN1_RRC_H diff --git a/lib/include/srslte/common/bcd_helpers.h b/lib/include/srslte/common/bcd_helpers.h index abd596860..7adf585cc 100644 --- a/lib/include/srslte/common/bcd_helpers.h +++ b/lib/include/srslte/common/bcd_helpers.h @@ -28,9 +28,9 @@ #define SRSLTE_BCD_HELPERS_H #include +#include #include #include -#include namespace srslte { @@ -41,7 +41,7 @@ namespace srslte { *****************************************************************************/ inline bool string_to_mcc(std::string str, uint16_t *mcc) { - uint32_t len = str.size(); + uint32_t len = (uint32_t)str.size(); if(len != 3) { return false; } @@ -67,6 +67,43 @@ inline bool mcc_to_string(uint16_t mcc, std::string *str) return true; } +/****************************************************************************** + * Convert between array of bytes and BCD-coded MCC. + * Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xF. + * MCC 001 results in 0xF001 + *****************************************************************************/ + +inline bool bytes_to_mcc(uint8_t* bytes, uint16_t* mcc) +{ + *mcc = 0xF000; + *mcc |= (((uint16_t)bytes[0]) << 8u); + *mcc |= (((uint16_t)bytes[1]) << 4u); + *mcc |= (uint16_t)bytes[2]; + return true; +} + +inline bool mcc_to_bytes(uint16_t mcc, uint8_t* bytes) +{ + if ((mcc & 0xF000) != 0xF000) { + return false; + } + bytes[0] = (uint8_t)((mcc & 0xF00) >> 8); + bytes[1] = (uint8_t)((mcc & 0x0F0) >> 4); + bytes[2] = (uint8_t)(mcc & 0x00F); + return true; +} + +inline std::string mcc_bytes_to_string(asn1::rrc::mcc_l mcc_bytes) +{ + std::string mcc_str; + uint16_t mcc; + bytes_to_mcc(&mcc_bytes[0], &mcc); + if (!mcc_to_string(mcc, &mcc_str)) { + mcc_str = "000"; + } + return mcc_str; +} + /****************************************************************************** * Convert between string and BCD-coded MNC. * Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xF. @@ -113,13 +150,101 @@ inline bool mnc_to_string(uint16_t mnc, std::string *str) *str += (mnc & 0x000F) + '0'; return true; } -inline std::string plmn_id_to_string(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) { + +/****************************************************************************** + * Convert between array of bytes and BCD-coded MNC. + * Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xF. + * MNC 001 results in 0xF001 + * MNC 01 results in 0xFF01 + *****************************************************************************/ +inline bool bytes_to_mnc(uint8_t* bytes, uint16_t* mnc, uint8_t len) +{ + if (len != 3 && len != 2) { + *mnc = 0; + return false; + } + if (len == 3) { + *mnc = 0xF000; + *mnc |= ((uint16_t)bytes[0]) << 8u; + *mnc |= ((uint16_t)bytes[1]) << 4u; + *mnc |= ((uint16_t)bytes[2]) << 0u; + } + if (len == 2) { + *mnc = 0xFF00; + *mnc |= ((uint16_t)bytes[0]) << 4u; + *mnc |= ((uint16_t)bytes[1]) << 0u; + } + return true; +} + +inline bool mnc_to_bytes(uint16_t mnc, uint8_t* bytes, uint8_t* len) +{ + if ((mnc & 0xF000) != 0xF000) { + *len = 0; + return false; + } + uint8_t count = 0; + if ((mnc & 0xFF00) != 0xFF00) { + bytes[count++] = (mnc & 0xF00) >> 8u; + } + bytes[count++] = (mnc & 0x00F0) >> 4u; + bytes[count++] = (mnc & 0x000F); + *len = count; + return true; +} + +template +bool mnc_to_bytes(uint16_t mnc, Vec& vec) +{ + uint8_t len; + uint8_t v[3]; + bool ret = mnc_to_bytes(mnc, &v[0], &len); + vec.resize(len); + memcpy(&vec[0], &v[0], len); + return ret; +} + +inline std::string mnc_bytes_to_string(asn1::rrc::mnc_l mnc_bytes) +{ + std::string mnc_str; + uint16_t mnc; + bytes_to_mnc(&mnc_bytes[0], &mnc, mnc_bytes.size()); + if (!mnc_to_string(mnc, &mnc_str)) { + mnc_str = "000"; + } + return mnc_str; +} + +inline std::string plmn_id_to_string(asn1::rrc::plmn_id_s plmn_id) +{ std::string mcc_str, mnc_str; - mnc_to_string(plmn_id.mnc, &mnc_str); - mcc_to_string(plmn_id.mcc, &mcc_str); + uint16_t mnc, mcc; + bytes_to_mnc(&plmn_id.mnc[0], &mnc, plmn_id.mnc.size()); + bytes_to_mcc(&plmn_id.mcc[0], &mcc); + mnc_to_string(mnc, &mnc_str); + mcc_to_string(mcc, &mcc_str); return mcc_str + mnc_str; } +inline bool string_to_plmn_id(asn1::rrc::plmn_id_s& plmn, std::string mccmnc_str) +{ + if (mccmnc_str.size() < 5 or mccmnc_str.size() > 6) { + return false; + } + uint16_t mnc, mcc; + if (not string_to_mcc(std::string(mccmnc_str.begin(), mccmnc_str.begin() + 3), &mcc)) { + return false; + } + if (not string_to_mnc(std::string(mccmnc_str.begin() + 3, mccmnc_str.end()), &mnc)) { + return false; + } + plmn.mcc_present = true; + if (not mcc_to_bytes(mcc, &plmn.mcc[0])) { + return false; + } + return mnc_to_bytes(mnc, plmn.mnc); +} + /****************************************************************************** * Convert PLMN to BCD-coded MCC and MNC. * Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xF. diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index fa497c352..944410de2 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -205,15 +205,15 @@ public: if (!pool->deallocate(b)) { if (log) { #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED - log->error("Deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name); + log->error("Deallocating PDU: Addr=0x%p, name=%s not found in pool\n", b, b->debug_name); #else - log->error("Deallocating PDU: Addr=0x%lx\n", (uint64_t) b); + log->error("Deallocating PDU: Addr=0x%p\n", b); #endif } else { #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED - printf("Error deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name); + printf("Error deallocating PDU: Addr=0x%p, name=%s not found in pool\n", b, b->debug_name); #else - printf("Error deallocating PDU: Addr=0x%lx\n", (uint64_t) b); + printf("Error deallocating PDU: Addr=0x%p\n", b); #endif } } diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index e44f115ef..be6b4a56e 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -191,8 +191,7 @@ public: #endif } -private: - + private: #ifdef ENABLE_TIMESTAMP struct timeval timestamp[3]; bool timestamp_is_set; diff --git a/lib/include/srslte/common/interfaces_common.h b/lib/include/srslte/common/interfaces_common.h index bc458af74..5759c6bc8 100644 --- a/lib/include/srslte/common/interfaces_common.h +++ b/lib/include/srslte/common/interfaces_common.h @@ -29,7 +29,6 @@ #include "srslte/common/timers.h" #include "srslte/common/security.h" -#include "srslte/asn1/liblte_rrc.h" #include diff --git a/lib/include/srslte/common/mac_pcap.h b/lib/include/srslte/common/mac_pcap.h index 35c953228..0e94a3ad4 100644 --- a/lib/include/srslte/common/mac_pcap.h +++ b/lib/include/srslte/common/mac_pcap.h @@ -34,7 +34,7 @@ namespace srslte { class mac_pcap { -public: +public: mac_pcap() {enable_write=false; ue_id=0; pcap_file = NULL; }; void enable(bool en); void open(const char *filename, uint32_t ue_id = 0); @@ -45,16 +45,18 @@ public: void write_ul_crnti(uint8_t *pdu, uint32_t pdu_len_bytes, uint16_t crnti, uint32_t reTX, uint32_t tti); void write_dl_crnti(uint8_t *pdu, uint32_t pdu_len_bytes, uint16_t crnti, bool crc_ok, uint32_t tti); void write_dl_ranti(uint8_t *pdu, uint32_t pdu_len_bytes, uint16_t ranti, bool crc_ok, uint32_t tti); - - // SI and BCH only for DL + + // SI and BCH only for DL void write_dl_sirnti(uint8_t *pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_bch(uint8_t *pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_pch(uint8_t *pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_mch(uint8_t *pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); - + + void write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len); + private: - bool enable_write; - FILE *pcap_file; + bool enable_write; + FILE* pcap_file; uint32_t ue_id; void pack_and_write(uint8_t* pdu, uint32_t pdu_len_bytes, uint32_t reTX, bool crc_ok, uint32_t tti, uint16_t crnti_, uint8_t direction, uint8_t rnti_type); diff --git a/lib/include/srslte/interfaces/enb_interfaces.h b/lib/include/srslte/interfaces/enb_interfaces.h index 91a64cde1..52b673abd 100644 --- a/lib/include/srslte/interfaces/enb_interfaces.h +++ b/lib/include/srslte/interfaces/enb_interfaces.h @@ -26,13 +26,13 @@ #include "srslte/srslte.h" +#include "srslte/asn1/liblte_s1ap.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/common.h" -#include "srslte/common/security.h" #include "srslte/common/interfaces_common.h" +#include "srslte/common/security.h" #include "srslte/interfaces/sched_interface.h" #include "srslte/upper/rlc_interface.h" -#include "srslte/asn1/liblte_rrc.h" -#include "srslte/asn1/liblte_s1ap.h" #include @@ -96,23 +96,21 @@ public: class phy_interface_rrc { public: - - typedef struct { - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT mbsfn_subfr_cnfg; - LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT mbsfn_notification_cnfg; - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT mbsfn_area_info; - LIBLTE_RRC_MCCH_MSG_STRUCT mcch; - } phy_cfg_mbsfn_t; - + struct phy_cfg_mbsfn_t { + asn1::rrc::mbsfn_sf_cfg_s mbsfn_subfr_cnfg; + asn1::rrc::mbms_notif_cfg_r9_s mbsfn_notification_cnfg; + asn1::rrc::mbsfn_area_info_r9_s mbsfn_area_info; + asn1::rrc::mcch_msg_s mcch; + }; + typedef struct { phy_cfg_mbsfn_t mbsfn; - } phy_rrc_cfg_t; - - - virtual void configure_mbsfn(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, LIBLTE_RRC_MCCH_MSG_STRUCT mcch) = 0; + } phy_rrc_cfg_t; + + virtual void configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, + asn1::rrc::mcch_msg_s mcch) = 0; virtual void set_conf_dedicated_ack(uint16_t rnti, bool rrc_completed) = 0; - virtual void set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) = 0; - + virtual void set_config_dedicated(uint16_t rnti, asn1::rrc::phys_cfg_ded_s* dedicated) = 0; }; class mac_interface_rrc @@ -128,10 +126,11 @@ public: /* Manages UE bearers and associated configuration */ virtual int bearer_ue_cfg(uint16_t rnti, uint32_t lc_id, sched_interface::ue_bearer_cfg_t *cfg) = 0; - virtual int bearer_ue_rem(uint16_t rnti, uint32_t lc_id) = 0; - virtual int set_dl_ant_info(uint16_t rnti, LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *dl_ant_info) = 0; + virtual int bearer_ue_rem(uint16_t rnti, uint32_t lc_id) = 0; + virtual int set_dl_ant_info(uint16_t rnti, asn1::rrc::phys_cfg_ded_s::ant_info_c_* dl_ant_info) = 0; virtual void phy_config_enabled(uint16_t rnti, bool enabled) = 0; - virtual void write_mcch(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, LIBLTE_RRC_MCCH_MSG_STRUCT *mcch) = 0; + virtual void write_mcch(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, + asn1::rrc::mcch_msg_s* mcch) = 0; }; class mac_interface_rlc @@ -281,7 +280,6 @@ public: virtual void ue_ctxt_setup_complete(uint16_t rnti, LIBLTE_S1AP_MESSAGE_INITIALCONTEXTSETUPRESPONSE_STRUCT *res) = 0; virtual void ue_erab_setup_complete(uint16_t rnti, LIBLTE_S1AP_MESSAGE_E_RABSETUPRESPONSE_STRUCT *res) = 0; virtual bool is_mme_connected() = 0; - // virtual void ue_capabilities(uint16_t rnti, LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *caps) = 0; }; } diff --git a/lib/include/srslte/interfaces/ue_interfaces.h b/lib/include/srslte/interfaces/ue_interfaces.h index eaa0fdb2f..41939fff8 100644 --- a/lib/include/srslte/interfaces/ue_interfaces.h +++ b/lib/include/srslte/interfaces/ue_interfaces.h @@ -35,10 +35,10 @@ #include -#include "srslte/asn1/liblte_rrc.h" #include "srslte/asn1/liblte_mme.h" -#include "srslte/common/interfaces_common.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/common.h" +#include "srslte/common/interfaces_common.h" #include "srslte/common/security.h" #include "srslte/upper/rlc_interface.h" @@ -63,7 +63,7 @@ public: virtual std::string get_imei_str() = 0; virtual bool get_imsi_vec(uint8_t* imsi_, uint32_t n) = 0; virtual bool get_imei_vec(uint8_t* imei_, uint32_t n) = 0; - virtual bool get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id) = 0; + virtual bool get_home_plmn_id(asn1::rrc::plmn_id_s* home_plmn_id) = 0; virtual auth_result_t generate_authentication_response(uint8_t *rand, uint8_t *autn_enb, uint16_t mcc, @@ -135,7 +135,7 @@ public: BARRING_ALL } barring_t; virtual void set_barring(barring_t barring) = 0; - virtual void paging(LIBLTE_RRC_S_TMSI_STRUCT *ue_identiy) = 0; + virtual void paging(asn1::rrc::s_tmsi_s* ue_identiy) = 0; virtual bool is_attached() = 0; virtual void write_pdu(uint32_t lcid, srslte::byte_buffer_t *pdu) = 0; virtual uint32_t get_k_enb_count() = 0; @@ -188,8 +188,8 @@ class rrc_interface_nas { public: typedef struct { - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id; - uint16_t tac; + asn1::rrc::plmn_id_s plmn_id; + uint16_t tac; } found_plmn_t; const static int MAX_FOUND_PLMNS = 16; @@ -199,10 +199,9 @@ public: virtual uint16_t get_mnc() = 0; virtual void enable_capabilities() = 0; virtual int plmn_search(found_plmn_t found_plmns[MAX_FOUND_PLMNS]) = 0; - virtual void plmn_select(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) = 0; - virtual bool connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause, - srslte::byte_buffer_t *dedicatedInfoNAS) = 0; - virtual void set_ue_idenity(LIBLTE_RRC_S_TMSI_STRUCT s_tmsi) = 0; + virtual void plmn_select(asn1::rrc::plmn_id_s plmn_id) = 0; + virtual bool connection_request(asn1::rrc::establishment_cause_e cause, srslte::byte_buffer_t* dedicatedInfoNAS) = 0; + virtual void set_ue_idenity(asn1::rrc::s_tmsi_s s_tmsi) = 0; virtual bool is_connected() = 0; virtual std::string get_rb_name(uint32_t lcid) = 0; }; @@ -284,6 +283,7 @@ public: virtual void del_bearer(uint32_t lcid) = 0; virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0; virtual bool has_bearer(uint32_t lcid) = 0; + virtual bool has_data(const uint32_t lcid) = 0; }; // RLC interface for PDCP @@ -469,11 +469,11 @@ class mac_interface_rrc : public mac_interface_rrc_common public: typedef struct { - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT main; - LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT rach; - LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT sr; - ul_harq_params_t ul_harq_params; - uint32_t prach_config_index; + asn1::rrc::mac_main_cfg_s main; + asn1::rrc::rach_cfg_common_s rach; + asn1::rrc::sched_request_cfg_c sr; + ul_harq_params_t ul_harq_params; + uint32_t prach_config_index; } mac_cfg_t; virtual void clear_rntis() = 0; @@ -493,9 +493,9 @@ public: virtual uint32_t get_current_tti() = 0; virtual void set_config(mac_cfg_t *mac_cfg) = 0; - virtual void set_config_main(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *main_cfg) = 0; - virtual void set_config_rach(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT *rach_cfg, uint32_t prach_config_index) = 0; - virtual void set_config_sr(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT *sr_cfg) = 0; + virtual void set_config_main(asn1::rrc::mac_main_cfg_s* main_cfg) = 0; + virtual void set_config_rach(asn1::rrc::rach_cfg_common_s* rach_cfg, uint32_t prach_config_index) = 0; + virtual void set_config_sr(asn1::rrc::sched_request_cfg_c* sr_cfg) = 0; virtual void get_config(mac_cfg_t *mac_cfg) = 0; virtual void get_rntis(ue_rnti_t *rntis) = 0; @@ -607,32 +607,30 @@ public: class phy_interface_rrc { public: + struct phy_cfg_common_t { + asn1::rrc::prach_cfg_sib_s prach_cnfg; + asn1::rrc::pdsch_cfg_common_s pdsch_cnfg; + asn1::rrc::pusch_cfg_common_s pusch_cnfg; + asn1::rrc::phich_cfg_s phich_cnfg; + asn1::rrc::pucch_cfg_common_s pucch_cnfg; + asn1::rrc::srs_ul_cfg_common_c srs_ul_cnfg; + asn1::rrc::ul_pwr_ctrl_common_s ul_pwr_ctrl; + asn1::rrc::tdd_cfg_s tdd_cnfg; + asn1::rrc::srs_ant_port_e ant_info; + }; + + struct phy_cfg_mbsfn_t { + asn1::rrc::mbsfn_sf_cfg_s mbsfn_subfr_cnfg; + asn1::rrc::mbms_notif_cfg_r9_s mbsfn_notification_cnfg; + asn1::rrc::mbsfn_area_info_r9_s mbsfn_area_info; + asn1::rrc::mcch_msg_s mcch; + }; typedef struct { - LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT prach_cnfg; - LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT pdsch_cnfg; - LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT pusch_cnfg; - LIBLTE_RRC_PHICH_CONFIG_STRUCT phich_cnfg; - LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT pucch_cnfg; - LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT srs_ul_cnfg; - LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT ul_pwr_ctrl; - LIBLTE_RRC_TDD_CONFIG_STRUCT tdd_cnfg; - LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM ant_info; - } phy_cfg_common_t; - - typedef struct { - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT mbsfn_subfr_cnfg; - LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT mbsfn_notification_cnfg; - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT mbsfn_area_info; - LIBLTE_RRC_MCCH_MSG_STRUCT mcch; - } phy_cfg_mbsfn_t; - - - typedef struct { - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT dedicated; - phy_cfg_common_t common; - phy_cfg_mbsfn_t mbsfn; - bool enable_64qam; + asn1::rrc::phys_cfg_ded_s dedicated; + phy_cfg_common_t common; + phy_cfg_mbsfn_t mbsfn; + bool enable_64qam; } phy_cfg_t; virtual void get_current_cell(srslte_cell_t *cell, uint32_t *current_earfcn = NULL) = 0; @@ -640,14 +638,14 @@ public: virtual uint32_t get_current_pci() = 0; virtual void get_config(phy_cfg_t *phy_cfg) = 0; - virtual void set_config(phy_cfg_t *phy_cfg) = 0; - virtual void set_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *dedicated) = 0; - virtual void set_config_common(phy_cfg_common_t *common) = 0; - virtual void set_config_tdd(LIBLTE_RRC_TDD_CONFIG_STRUCT *tdd) = 0; + virtual void set_config(phy_cfg_t *phy_cfg) = 0; + virtual void set_config_dedicated(asn1::rrc::phys_cfg_ded_s* dedicated) = 0; + virtual void set_config_common(phy_cfg_common_t *common) = 0; + virtual void set_config_tdd(asn1::rrc::tdd_cfg_s* tdd) = 0; virtual void set_config_64qam_en(bool enable) = 0; - virtual void set_config_mbsfn_sib2(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2) = 0; - virtual void set_config_mbsfn_sib13(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13) = 0; - virtual void set_config_mbsfn_mcch(LIBLTE_RRC_MCCH_MSG_STRUCT *mcch) = 0; + virtual void set_config_mbsfn_sib2(asn1::rrc::sib_type2_s* sib2) = 0; + virtual void set_config_mbsfn_sib13(asn1::rrc::sib_type13_r9_s* sib13) = 0; + virtual void set_config_mbsfn_mcch(asn1::rrc::mcch_msg_s* mcch) = 0; /* Measurements interface */ virtual void meas_reset() = 0; diff --git a/lib/include/srslte/phy/phch/ra.h b/lib/include/srslte/phy/phch/ra.h index 085f62b40..38c709f2f 100644 --- a/lib/include/srslte/phy/phch/ra.h +++ b/lib/include/srslte/phy/phch/ra.h @@ -242,13 +242,19 @@ SRSLTE_API int srslte_ra_ul_dci_to_grant_prb_allocation(srslte_ra_ul_dci_t *dci, SRSLTE_API int srslte_ra_dl_dci_to_grant_prb_allocation(srslte_ra_dl_dci_t *dci, srslte_ra_dl_grant_t *grant, - uint32_t nof_prb); + uint32_t nof_prb); -SRSLTE_API int srslte_ra_tbs_idx_from_mcs(uint32_t mcs); +SRSLTE_API int srslte_ra_dl_tbs_idx_from_mcs(uint32_t mcs); -SRSLTE_API srslte_mod_t srslte_ra_mod_from_mcs(uint32_t mcs); +SRSLTE_API int srslte_ra_ul_tbs_idx_from_mcs(uint32_t mcs); -SRSLTE_API int srslte_ra_mcs_from_tbs_idx(uint32_t tbs_idx); +SRSLTE_API srslte_mod_t srslte_ra_dl_mod_from_mcs(uint32_t mcs); + +SRSLTE_API srslte_mod_t srslte_ra_ul_mod_from_mcs(uint32_t mcs); + +SRSLTE_API int srslte_ra_dl_mcs_from_tbs_idx(uint32_t tbs_idx); + +SRSLTE_API int srslte_ra_ul_mcs_from_tbs_idx(uint32_t tbs_idx); SRSLTE_API int srslte_ra_tbs_from_idx(uint32_t tbs_idx, uint32_t n_prb); diff --git a/lib/include/srslte/upper/rlc_interface.h b/lib/include/srslte/upper/rlc_interface.h index 50d5404ff..6a0869b52 100644 --- a/lib/include/srslte/upper/rlc_interface.h +++ b/lib/include/srslte/upper/rlc_interface.h @@ -28,7 +28,7 @@ #define SRSLTE_RLC_INTERFACE_H // for custom constructors -#include +#include "srslte/asn1/rrc_asn1.h" namespace srslte { @@ -42,14 +42,13 @@ static const char rlc_mode_text[RLC_MODE_N_ITEMS][20] = {"Transparent Mode", "Unacknowledged Mode", "Acknowledged Mode"}; -typedef enum{ +typedef enum { RLC_UMD_SN_SIZE_5_BITS = 0, RLC_UMD_SN_SIZE_10_BITS, RLC_UMD_SN_SIZE_N_ITEMS, -}rlc_umd_sn_size_t; +} rlc_umd_sn_size_t; static const char rlc_umd_sn_size_text[RLC_UMD_SN_SIZE_N_ITEMS][20] = {"5 bits", "10 bits"}; -static const uint16_t rlc_umd_sn_size_num[RLC_UMD_SN_SIZE_N_ITEMS] = {5, 10}; - +static const uint16_t rlc_umd_sn_size_num[RLC_UMD_SN_SIZE_N_ITEMS] = {5, 10}; typedef struct { /**************************************************************************** @@ -58,34 +57,32 @@ typedef struct { ***************************************************************************/ // TX configs - int32_t t_poll_retx; // Poll retx timeout (ms) - int32_t poll_pdu; // Insert poll bit after this many PDUs - int32_t poll_byte; // Insert poll bit after this much data (KB) - uint32_t max_retx_thresh; // Max number of retx + int32_t t_poll_retx; // Poll retx timeout (ms) + int32_t poll_pdu; // Insert poll bit after this many PDUs + int32_t poll_byte; // Insert poll bit after this much data (KB) + uint32_t max_retx_thresh; // Max number of retx // RX configs - int32_t t_reordering; // Timer used by rx to detect PDU loss (ms) - int32_t t_status_prohibit; // Timer used by rx to prohibit tx of status PDU (ms) + int32_t t_reordering; // Timer used by rx to detect PDU loss (ms) + int32_t t_status_prohibit; // Timer used by rx to prohibit tx of status PDU (ms) } srslte_rlc_am_config_t; - typedef struct { /**************************************************************************** - * Configurable parameters - * Ref: 3GPP TS 36.322 v10.0.0 Section 7 - ***************************************************************************/ + * Configurable parameters + * Ref: 3GPP TS 36.322 v10.0.0 Section 7 + ***************************************************************************/ int32_t t_reordering; // Timer used by rx to detect PDU loss (ms) rlc_umd_sn_size_t tx_sn_field_length; // Number of bits used for tx (UL) sequence number rlc_umd_sn_size_t rx_sn_field_length; // Number of bits used for rx (DL) sequence number - uint32_t rx_window_size; - uint32_t rx_mod; // Rx counter modulus - uint32_t tx_mod; // Tx counter modulus - bool is_mrb; // Whether this is a multicast bearer + uint32_t rx_window_size; + uint32_t rx_mod; // Rx counter modulus + uint32_t tx_mod; // Tx counter modulus + bool is_mrb; // Whether this is a multicast bearer } srslte_rlc_um_config_t; - class srslte_rlc_config_t { public: @@ -96,30 +93,40 @@ public: // Default ctor srslte_rlc_config_t(): rlc_mode(RLC_MODE_TM), am(), um() {}; - // Constructor based on liblte's RLC config - srslte_rlc_config_t(LIBLTE_RRC_RLC_CONFIG_STRUCT *cnfg) : rlc_mode(RLC_MODE_AM), am(), um() + // Constructor based on rrc_asn1's RLC config + srslte_rlc_config_t(asn1::rrc::rlc_cfg_c* cnfg) : rlc_mode(RLC_MODE_AM), am(), um() { // update RLC mode to internal mode struct - rlc_mode = (cnfg->rlc_mode == LIBLTE_RRC_RLC_MODE_AM) ? RLC_MODE_AM : RLC_MODE_UM; + rlc_mode = (cnfg->type() == asn1::rrc::rlc_cfg_c::types::am) ? RLC_MODE_AM : RLC_MODE_UM; switch(rlc_mode) { case RLC_MODE_AM: - am.t_poll_retx = liblte_rrc_t_poll_retransmit_num[cnfg->ul_am_rlc.t_poll_retx]; - am.poll_pdu = liblte_rrc_poll_pdu_num[cnfg->ul_am_rlc.poll_pdu]; - am.poll_byte = liblte_rrc_poll_byte_num[cnfg->ul_am_rlc.poll_byte]*1000; // KB - am.max_retx_thresh = liblte_rrc_max_retx_threshold_num[cnfg->ul_am_rlc.max_retx_thresh]; - am.t_reordering = liblte_rrc_t_reordering_num[cnfg->dl_am_rlc.t_reordering]; - am.t_status_prohibit = liblte_rrc_t_status_prohibit_num[cnfg->dl_am_rlc.t_status_prohibit]; + am.t_poll_retx = cnfg->am().ul_am_rlc.t_poll_retx.to_number(); + am.poll_pdu = cnfg->am().ul_am_rlc.poll_pdu.to_number(); + am.poll_byte = cnfg->am().ul_am_rlc.poll_byte.to_number() * 1000; // KB + am.max_retx_thresh = cnfg->am().ul_am_rlc.max_retx_thres.to_number(); + am.t_reordering = cnfg->am().dl_am_rlc.t_reordering.to_number(); + am.t_status_prohibit = cnfg->am().dl_am_rlc.t_status_prohibit.to_number(); break; case RLC_MODE_UM: - um.t_reordering = liblte_rrc_t_reordering_num[cnfg->dl_um_bi_rlc.t_reordering]; - um.rx_sn_field_length = (rlc_umd_sn_size_t)cnfg->dl_um_bi_rlc.sn_field_len; + um.t_reordering = cnfg->um_bi_dir().dl_um_rlc.t_reordering.to_number(); + um.rx_sn_field_length = (rlc_umd_sn_size_t)cnfg->um_bi_dir().dl_um_rlc.sn_field_len.value; um.rx_window_size = (RLC_UMD_SN_SIZE_5_BITS == um.rx_sn_field_length) ? 16 : 512; um.rx_mod = (RLC_UMD_SN_SIZE_5_BITS == um.rx_sn_field_length) ? 32 : 1024; - um.tx_sn_field_length = (rlc_umd_sn_size_t)cnfg->ul_um_bi_rlc.sn_field_len; + um.tx_sn_field_length = (rlc_umd_sn_size_t)cnfg->um_bi_dir().ul_um_rlc.sn_field_len.value; um.tx_mod = (RLC_UMD_SN_SIZE_5_BITS == um.tx_sn_field_length) ? 32 : 1024; break; + // case asn1::rrc::rlc_cfg_c::types::um_uni_dir_ul: + // um.tx_sn_field_length = (rlc_umd_sn_size_t)cnfg->um_uni_dir_ul().ul_um_rlc.sn_field_len.value; + // um.tx_mod = (RLC_UMD_SN_SIZE_5_BITS == um.tx_sn_field_length) ? 32 : 1024; + // break; + // case asn1::rrc::rlc_cfg_c::types::um_uni_dir_dl: + // um.t_reordering = cnfg->um_uni_dir_dl().dl_um_rlc.t_reordering.to_number(); + // um.rx_sn_field_length = (rlc_umd_sn_size_t)cnfg->um_uni_dir_dl().dl_um_rlc.sn_field_len.value; + // um.rx_window_size = (RLC_UMD_SN_SIZE_5_BITS == um.rx_sn_field_length) ? 16 : 512; + // um.rx_mod = (RLC_UMD_SN_SIZE_5_BITS == um.rx_sn_field_length) ? 32 : 1024; + // break; default: // Handle default case break; diff --git a/lib/src/asn1/CMakeLists.txt b/lib/src/asn1/CMakeLists.txt index b46739c40..e825fb414 100644 --- a/lib/src/asn1/CMakeLists.txt +++ b/lib/src/asn1/CMakeLists.txt @@ -21,10 +21,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-unused-but-set-variable -Wno-unused-variable -Wno-return-type -Wno-sign-compare -Wno-reorder -Wno-parantheses") add_library(srslte_asn1 STATIC liblte_common.cc - liblte_rrc.cc liblte_mme.cc liblte_s1ap.cc liblte_m2ap.cc gtpc.cc ) install(TARGETS srslte_asn1 DESTINATION ${LIBRARY_DIR}) + +add_library(rrc_asn1 STATIC + rrc_asn1.cc + rrc_asn1_enum.cc + asn1_utils.cc + ) +install(TARGETS rrc_asn1 DESTINATION ${LIBRARY_DIR}) diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc new file mode 100644 index 000000000..a7f407cb2 --- /dev/null +++ b/lib/src/asn1/asn1_utils.cc @@ -0,0 +1,1132 @@ +/* +Copyright 2013-2017 Software Radio Systems Limited + +This file is part of srsLTE + +srsLTE is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +srsLTE is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +A copy of the GNU Affero General Public License can be found in +the LICENSE file in the top-level directory of this distribution +and at http://www.gnu.org/licenses/. +*/ + +#include "srslte/asn1/asn1_utils.h" +#include +#include + +namespace asn1 { + +/************************ + logging +************************/ + +void vlog_print(log_handler_t handler, void* ctx, srsasn_logger_level_t log_level, const char* format, va_list args) +{ + if (handler) { + char* args_msg = NULL; + if (vasprintf(&args_msg, format, args) > 0) { + handler(log_level, ctx, args_msg); + } + if (args_msg) { + free(args_msg); + } + } else { + vprintf(format, args); + } +} + +static log_handler_t log_handler; +static void* callback_ctx = NULL; + +void srsasn_log_register_handler(void* ctx, log_handler_t handler) +{ + log_handler = handler; + callback_ctx = ctx; +} + +void srsasn_log_print(srsasn_logger_level_t log_level, const char* format, ...) +{ + va_list args; + va_start(args, format); + vlog_print(log_handler, callback_ctx, log_level, format, args); + va_end(args); +} + +/************************ + error handling +************************/ + +void log_error_code(SRSASN_CODE code, const char* filename, int line) +{ + switch (code) { + case SRSASN_ERROR_ENCODE_FAIL: + srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] Encoding failure.\n", filename, line); + break; + case SRSASN_ERROR_DECODE_FAIL: + srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] Decoding failure.\n", filename, line); + break; + default: + srsasn_log_print(LOG_LEVEL_WARN, "[%s][%d] SRSASN_CODE=%d not recognized.\n", filename, line, (uint32_t)code); + } +} + +/********************* + bit_ref +*********************/ + +bit_ref::bit_ref() : ptr(NULL), offset(0), start_ptr(NULL), max_ptr(NULL) {} + +bit_ref::bit_ref(uint8_t* start_ptr_, uint32_t max_size_) : + ptr(start_ptr_), + offset(0), + start_ptr(start_ptr_), + max_ptr(max_size_ + start_ptr_) +{ +} + +int bit_ref::distance(const bit_ref& other) const +{ + return ((int)offset - (int)other.offset) + 8 * ((int)(ptr - other.ptr)); +} +int bit_ref::distance(uint8_t* ref_ptr) const +{ + return (int)offset + 8 * ((int)(ptr - ref_ptr)); +} +int bit_ref::distance() const +{ + return (int)offset + 8 * ((int)(ptr - start_ptr)); +} +int bit_ref::distance_bytes(uint8_t* ref_ptr) const +{ + return ((int)(ptr - ref_ptr)) + ((offset) ? 1 : 0); +} +int bit_ref::distance_bytes() const +{ + return ((int)(ptr - start_ptr)) + ((offset) ? 1 : 0); +} + +SRSASN_CODE bit_ref::pack(uint32_t val, uint32_t n_bits) +{ + uint32_t mask; + while (n_bits > 0) { + if (ptr >= max_ptr) { + srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + return SRSASN_ERROR_ENCODE_FAIL; + } + mask = ((1u << n_bits) - 1u); + val = val & mask; + uint8_t keepmask = ((uint8_t)-1) - (uint8_t)((1 << (8 - offset)) - 1); + if ((uint32_t)(8 - offset) > n_bits) { + keepmask += (1u << (8u - offset - n_bits)) - 1; + uint8_t bit = (uint8_t)(val << (8u - offset - n_bits)); + *ptr = ((*ptr) & keepmask) + bit; + offset += n_bits; + n_bits = 0; + } else { + uint8_t bit = (uint8_t)(val >> (n_bits - 8u + offset)); + *ptr = (*ptr & keepmask) + bit; + n_bits -= (8 - offset); + offset = 0; + ptr++; + } + } + return SRSASN_SUCCESS; +} + +ValOrError unpack_bits(uint8_t*& ptr, uint8_t& offset, uint8_t* max_ptr, uint32_t n_bits) +{ + uint32_t val = 0; + while (n_bits > 0) { + if (ptr >= max_ptr) { + srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + return ValOrError(val, SRSASN_ERROR_DECODE_FAIL); + } + if ((uint32_t)(8 - offset) > n_bits) { + uint8_t mask = (uint8_t)(1u << (8u - offset)) - (uint8_t)(1u << (8u - offset - n_bits)); + val += ((uint32_t)((*ptr) & mask)) >> ((uint8_t)8 - offset - n_bits); + offset += n_bits; + n_bits = 0; + } else { + uint8_t mask = (uint8_t)((1u << (8u - offset)) - 1); + val += ((uint32_t)((*ptr) & mask)) << (n_bits - 8 + offset); + n_bits -= 8 - offset; + offset = 0; + ptr++; + } + } + return ValOrError(val, SRSASN_SUCCESS); +} + +SRSASN_CODE bit_ref::align_bytes() +{ + if (offset == 0) + return SRSASN_SUCCESS; + if (ptr >= max_ptr) { + srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + return SRSASN_ERROR_DECODE_FAIL; + } + offset = 0; + ptr++; + return SRSASN_SUCCESS; +} + +SRSASN_CODE bit_ref::align_bytes_zero() +{ + if (offset == 0) + return SRSASN_SUCCESS; + if (ptr >= max_ptr) { + srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + return SRSASN_ERROR_ENCODE_FAIL; + } + uint8_t mask = (uint8_t)(256u - (1u << (8u - offset))); + *ptr &= mask; + offset = 0; + ptr++; + return SRSASN_SUCCESS; +} + +void bit_ref::set(uint8_t* start_ptr_, uint32_t max_size_) +{ + ptr = start_ptr_; + offset = 0; + start_ptr = start_ptr_; + max_ptr = max_size_ + start_ptr_; +} + +/********************* + ext packing +*********************/ + +SRSASN_CODE pack_unsupported_ext_flag(bit_ref& bref, bool ext) +{ + HANDLE_CODE(bref.pack(ext, 1)); + if (ext) { + srsasn_log_print(LOG_LEVEL_ERROR, "asn1 error: ASN extensions not currently supported\n"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE unpack_unsupported_ext_flag(bool& ext, bit_ref& bref) +{ + SRSASN_CODE ret = bref.unpack(ext, 1); + if (ext) { + srsasn_log_print(LOG_LEVEL_ERROR, "asn1 error: ASN extensions not currently supported\n"); + return SRSASN_ERROR_DECODE_FAIL; + } + return ret; +} + +/************************ + enum packing +************************/ + +// Pack without extension +SRSASN_CODE pack_enum(bit_ref& bref, uint32_t enum_val, uint32_t nbits) +{ + return bref.pack(enum_val, nbits); +} + +// Pack with extension +SRSASN_CODE pack_enum(bit_ref& bref, uint32_t enum_val, uint32_t nbits, uint32_t nof_noext) +{ + bool ext = enum_val >= nof_noext; + HANDLE_CODE(bref.pack((bool)ext, 1)); + SRSASN_CODE ret; + if (not ext) { + ret = bref.pack(enum_val, nbits); + } else { + ret = pack_norm_small_integer(bref, enum_val - nof_noext); + } + return ret; +} + +SRSASN_CODE pack_enum(bit_ref& bref, uint32_t e, uint32_t nof_types, uint32_t nof_exts, bool has_ext) +{ + if (e >= nof_types) { + srsasn_log_print(LOG_LEVEL_ERROR, "The provided enum is not within the range of possible values (%d>=%d)\n", e, + nof_types); + return SRSASN_ERROR_ENCODE_FAIL; + } + SRSASN_CODE ret; + if (has_ext) { + uint32_t nof_bits = (uint32_t)ceilf(log2f(nof_types - nof_exts)); + ret = pack_enum(bref, e, nof_bits, nof_types - nof_exts); + } else { + uint32_t nof_bits = (uint32_t)ceilf(log2f(nof_types)); + ret = pack_enum(bref, e, nof_bits); + } + return ret; +} + +ValOrError unpack_enum(uint32_t nof_types, uint32_t nof_exts, bool has_ext, bit_ref& bref) +{ + ValOrError ret; + if (has_ext) { + uint32_t nof_bits = (uint32_t)ceilf(log2f(nof_types - nof_exts)); + bool ext; + ret.code = bref.unpack(ext, 1); + if (ret.code != SRSASN_SUCCESS) { + return ret; + } + if (not ext) { + ret.code = bref.unpack(ret.val, nof_bits); + } else { + ret.code = unpack_norm_small_integer(ret.val, bref); + ret.val += nof_types - nof_exts; + } + } else { + uint32_t nof_bits = (uint32_t)ceilf(log2f(nof_types)); + ret.code = bref.unpack(ret.val, nof_bits); + } + if (ret.val >= nof_types) { + srsasn_log_print(LOG_LEVEL_ERROR, "The provided enum is not within the range of possible values (%d>=%d)\n", + ret.val, nof_types); + ret.code = SRSASN_ERROR_DECODE_FAIL; + } + return ret; +} + +/************************ + pack int +************************/ + +/** + * Encoder function for a constrained whole unaligned number + * @tparam IntType type of integer (e.g. uint8_t, uint32_t, etc.) + * @param bref bit_ref where to encode integer + * @param n integer current value + * @param lb + * @param ub + * @return success or failure + */ +template +SRSASN_CODE pack_unalign_integer(bit_ref& bref, IntType n, IntType lb, IntType ub) +{ + if (ub < lb or n < lb or n > ub) { + srsasn_log_print(LOG_LEVEL_ERROR, "The condition lb <= n <= ub (%d <= %d <= %d) was not met\n", lb, n, ub); + return SRSASN_ERROR_ENCODE_FAIL; + } + uint64_t ra = ub - lb + 1; // NOTE: Can overflow if IntType is kept + if (ra != 1) { + uint32_t n_bits = (uint32_t)ceilf(log2f((float)ra)); + IntType toencode = n - lb; + bref.pack(toencode, n_bits); + } + return SRSASN_SUCCESS; +} +/** + * Encoder function for a constrained whole unaligned number + * @tparam IntType type of integer (e.g. uint8_t, uint32_t, etc.) + * @param bref bit_ref where to encode integer + * @param n integer current value + * @param lb + * @param ub + * @return success or failure + */ +template +SRSASN_CODE unpack_unalign_integer(IntType& n, bit_ref& bref, IntType lb, IntType ub) +{ + if (ub < lb) { + srsasn_log_print(LOG_LEVEL_ERROR, "The condition lb <= ub (%d <= %d) was not met\n", lb, ub); + return SRSASN_ERROR_DECODE_FAIL; + } + uint64_t ra = ub - lb + 1; // NOTE: Can overflow if IntType is kept. + if (ra == 1) { + n = lb; + return SRSASN_SUCCESS; + } + uint32_t n_bits = (uint32_t)ceilf(log2f(ra)); + SRSASN_CODE ret = bref.unpack(n, n_bits); + n += lb; + if (n < lb or n > ub) { + srsasn_log_print(LOG_LEVEL_ERROR, "The condition lb <= n <= ub (%d <= %d <= %d) was not met\n", lb, n, ub); + return SRSASN_ERROR_DECODE_FAIL; + } + return ret; +} +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, int8_t n, int8_t lb, int8_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, int16_t n, int16_t lb, int16_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, int32_t n, int32_t lb, int32_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, int64_t n, int64_t lb, int64_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, uint8_t n, uint8_t lb, uint8_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, uint16_t n, uint16_t lb, uint16_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, uint32_t n, uint32_t lb, uint32_t ub); +template SRSASN_CODE pack_unalign_integer(bit_ref& bref, uint64_t n, uint64_t lb, uint64_t ub); +template SRSASN_CODE unpack_unalign_integer(int8_t& n, bit_ref& bref, int8_t lb, int8_t ub); +template SRSASN_CODE unpack_unalign_integer(int16_t& n, bit_ref& bref, int16_t lb, int16_t ub); +template SRSASN_CODE unpack_unalign_integer(int32_t& n, bit_ref& bref, int32_t lb, int32_t ub); +template SRSASN_CODE unpack_unalign_integer(int64_t& n, bit_ref& bref, int64_t lb, int64_t ub); +template SRSASN_CODE unpack_unalign_integer(uint8_t& n, bit_ref& bref, uint8_t lb, uint8_t ub); +template SRSASN_CODE unpack_unalign_integer(uint16_t& n, bit_ref& bref, uint16_t lb, uint16_t ub); +template SRSASN_CODE unpack_unalign_integer(uint32_t& n, bit_ref& bref, uint32_t lb, uint32_t ub); +template SRSASN_CODE unpack_unalign_integer(uint64_t& n, bit_ref& bref, uint64_t lb, uint64_t ub); + +template +UnalignedIntegerPacker::UnalignedIntegerPacker(IntType lb_, IntType ub_) : lb(lb_), ub(ub_) +{ +} +template +SRSASN_CODE UnalignedIntegerPacker::pack(bit_ref& bref, IntType n) +{ + return pack_unalign_integer(bref, n, lb, ub); +} +template +SRSASN_CODE UnalignedIntegerPacker::unpack(IntType& n, bit_ref& bref) +{ + return unpack_unalign_integer(n, bref, lb, ub); +} +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; +template struct UnalignedIntegerPacker; + +/** + * Encoder of a constrained whole aligned number + * @tparam IntType type of integer (e.g. uint8_t, uint32_t, etc.) + * @param bref bit_ref where to encode integer + * @param n value of integer to pack + * @param lb + * @param ub + * @return + */ +template +SRSASN_CODE pack_align_integer(bit_ref& bref, IntType n, IntType lb, IntType ub) +{ + // FIXME: Bound checker. + IntType ra = ub - lb + 1; + if (ra == 1) { + return SRSASN_SUCCESS; + } + uint32_t n_bits = (uint32_t)ceilf(log2f(ra)); // bit-field size + IntType toencode = n - lb; + SRSASN_CODE ret; + if (ra < 256) { + ret = bref.pack(toencode, n_bits); + } else if (ra <= 65536) { + uint32_t n_octets = (n_bits + 7) / 8; + HANDLE_CODE(bref.align_bytes_zero()); + HANDLE_CODE(bref.pack(0, n_octets * 8 - n_bits)); + HANDLE_CODE(bref.pack(toencode, n_bits)); + ret = bref.align_bytes_zero(); + } else { + // TODO: Check if this is correct + uint32_t n_bits_len = (uint32_t)ceilf(log2f((n_bits + 7) / 8)); + n_bits = (uint32_t)floorf(log2f(toencode) + 1); + uint32_t n_octets = (uint32_t)((n_bits + 7) / 8); + HANDLE_CODE(bref.pack(n_octets - 1, n_bits_len)); + HANDLE_CODE(bref.align_bytes_zero()); + HANDLE_CODE(bref.pack(0, (n_octets * 8) - n_bits)); + ret = bref.pack(toencode, n_bits); + } + return ret; +} +template SRSASN_CODE pack_align_integer(bit_ref& bref, uint8_t n, uint8_t lb, uint8_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, uint16_t n, uint16_t lb, uint16_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, uint32_t n, uint32_t lb, uint32_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, uint64_t n, uint64_t lb, uint64_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, int8_t n, int8_t lb, int8_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, int16_t n, int16_t lb, int16_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, int32_t n, int32_t lb, int32_t ub); +template SRSASN_CODE pack_align_integer(bit_ref& bref, int64_t n, int64_t lb, int64_t ub); + +template +SRSASN_CODE unpack_align_integer(IntType& n, bit_ref& bref, IntType lb, IntType ub) +{ + uint32_t ra = ub - lb + 1; + if (ra == 1) { + n = lb; + return SRSASN_SUCCESS; + } + SRSASN_CODE ret = SRSASN_SUCCESS; + uint32_t n_bits = (uint32_t)ceil(log2(ra)); + if (ra < 256) { + ret = bref.unpack(n, n_bits); + } else if (ra < 65536) { + uint32_t n_octets = (n_bits + 7) / 8; + HANDLE_CODE(bref.align_bytes()); + HANDLE_CODE(bref.unpack(n, n_octets * 8)); + HANDLE_CODE(bref.align_bytes()); + } else { + uint32_t n_bits_len = (uint32_t)ceilf(log2f((n_bits + 7) / 8)); + uint32_t n_octets; + HANDLE_CODE(bref.unpack(n_octets, n_bits_len)); + n_octets += 1; + HANDLE_CODE(bref.align_bytes()); + HANDLE_CODE(bref.unpack(n, n_octets * 8)); + n += lb; + } + n += lb; + return ret; +} +template SRSASN_CODE unpack_align_integer(uint8_t& intval, bit_ref& bref, uint8_t lb, uint8_t ub); +template SRSASN_CODE unpack_align_integer(uint16_t& intval, bit_ref& bref, uint16_t lb, uint16_t ub); +template SRSASN_CODE unpack_align_integer(uint32_t& intval, bit_ref& bref, uint32_t lb, uint32_t ub); +template SRSASN_CODE unpack_align_integer(uint64_t& intval, bit_ref& bref, uint64_t lb, uint64_t ub); +template SRSASN_CODE unpack_align_integer(int8_t& intval, bit_ref& bref, int8_t lb, int8_t ub); +template SRSASN_CODE unpack_align_integer(int16_t& intval, bit_ref& bref, int16_t lb, int16_t ub); +template SRSASN_CODE unpack_align_integer(int32_t& intval, bit_ref& bref, int32_t lb, int32_t ub); +template SRSASN_CODE unpack_align_integer(int64_t& intval, bit_ref& bref, int64_t lb, int64_t ub); + +template +AlignedIntegerPacker::AlignedIntegerPacker(IntType lb_, IntType ub_) : lb(lb_), ub(ub_) +{ +} +template +SRSASN_CODE AlignedIntegerPacker::pack(bit_ref& bref, IntType n) +{ + return pack_align_integer(bref, n, lb, ub); +} +template +SRSASN_CODE AlignedIntegerPacker::unpack(IntType& n, bit_ref& bref) +{ + return unpack_align_integer(n, bref, lb, ub); +} +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; +template struct AlignedIntegerPacker; + +template +SRSASN_CODE pack_norm_small_integer(bit_ref& bref, UintType n) +{ + if (n <= 63) { + HANDLE_CODE(bref.pack(0, 1)); + HANDLE_CODE(bref.pack(n, 6)); + } else { + HANDLE_CODE(bref.pack(1, 1)); + srsasn_log_print(LOG_LEVEL_ERROR, "Long small integers not supported\n"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +template +SRSASN_CODE unpack_norm_small_integer(UintType& n, bit_ref& bref) +{ + bool ext; + SRSASN_CODE ret = bref.unpack(ext, 1); + HANDLE_CODE(ret); + if (not ext) { + ret = bref.unpack(n, 6); + } else { + srsasn_log_print(LOG_LEVEL_ERROR, "Long small integers not supported\n"); + return SRSASN_ERROR_DECODE_FAIL; + } + return ret; +} +template SRSASN_CODE pack_norm_small_integer(bit_ref& bref, uint8_t n); +template SRSASN_CODE pack_norm_small_integer(bit_ref& bref, uint16_t n); +template SRSASN_CODE pack_norm_small_integer(bit_ref& bref, uint32_t n); +template SRSASN_CODE pack_norm_small_integer(bit_ref& bref, uint64_t n); +template SRSASN_CODE unpack_norm_small_integer(uint8_t& n, bit_ref& bref); +template SRSASN_CODE unpack_norm_small_integer(uint16_t& n, bit_ref& bref); +template SRSASN_CODE unpack_norm_small_integer(uint32_t& n, bit_ref& bref); +template SRSASN_CODE unpack_norm_small_integer(uint64_t& n, bit_ref& bref); + +/********************* + varlength_packing +*********************/ + +template +SRSASN_CODE pack_length(bit_ref& bref, IntType n, IntType lb, IntType ub) +{ + // TODO: FIXME if range higher than 64K + return pack_unalign_integer(bref, n, lb, ub); +} +template SRSASN_CODE pack_length(bit_ref& bref, uint8_t n, uint8_t lb, uint8_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, uint16_t n, uint16_t lb, uint16_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, uint32_t n, uint32_t lb, uint32_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, uint64_t n, uint64_t lb, uint64_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, int8_t n, int8_t lb, int8_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, int16_t n, int16_t lb, int16_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, int32_t n, int32_t lb, int32_t ub); +template SRSASN_CODE pack_length(bit_ref& bref, int64_t n, int64_t lb, int64_t ub); +template +SRSASN_CODE unpack_length(IntType& n, bit_ref& bref, IntType lb, IntType ub) +{ + // TODO: FIXME if range higher than 64K + return unpack_unalign_integer(n, bref, lb, ub); +} + +template SRSASN_CODE unpack_length(uint8_t& n, bit_ref& bref, uint8_t lb, uint8_t ub); +template SRSASN_CODE unpack_length(uint16_t& n, bit_ref& bref, uint16_t lb, uint16_t ub); +template SRSASN_CODE unpack_length(uint32_t& n, bit_ref& bref, uint32_t lb, uint32_t ub); +template SRSASN_CODE unpack_length(uint64_t& n, bit_ref& bref, uint64_t lb, uint64_t ub); +template SRSASN_CODE unpack_length(int8_t& n, bit_ref& bref, int8_t lb, int8_t ub); +template SRSASN_CODE unpack_length(int16_t& n, bit_ref& bref, int16_t lb, int16_t ub); +template SRSASN_CODE unpack_length(int32_t& n, bit_ref& bref, int32_t lb, int32_t ub); +template SRSASN_CODE unpack_length(int64_t& n, bit_ref& bref, int64_t lb, int64_t ub); + +SRSASN_CODE pack_length(bit_ref& bref, uint32_t val) +{ + if (val < 128) { + HANDLE_CODE(bref.pack(0, 1)); + HANDLE_CODE(bref.pack(val, 7)); + } else if (val < ASN_16K) { + HANDLE_CODE(bref.pack(1, 1)); + HANDLE_CODE(bref.pack(0, 1)); + HANDLE_CODE(bref.pack(val, 14)); + } else { + srsasn_log_print(LOG_LEVEL_ERROR, "Not handling sizes longer than 16383 octets\n"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE unpack_length(uint32_t& val, bit_ref& bref) +{ + bool ext; + SRSASN_CODE ret = bref.unpack(ext, 1); + HANDLE_CODE(ret); + if (not ext) { + ret = bref.unpack(val, 7); + } else { + ret = bref.unpack(ext, 1); + HANDLE_CODE(ret); + if (not ext) { + ret = bref.unpack(val, 14); + } else { + srsasn_log_print(LOG_LEVEL_ERROR, "Not handling octet strings longer than 16383 octets\n"); + val = 0; + return SRSASN_ERROR_DECODE_FAIL; + } + } + return ret; +} + +/************************ + common octstring +************************/ + +uint64_t octstring_to_number(const uint8_t* ptr, uint32_t nbytes) +{ + if (nbytes > 8) { + srsasn_log_print(LOG_LEVEL_ERROR, "octstring of size=%d does not fit in an uint64_t\n", nbytes); + return 0; + } + uint64_t val = 0; + for (uint32_t i = 0; i < nbytes; ++i) { + val += ptr[i] << (i * 8); + } + return val; +} + +void number_to_octstring(uint8_t* ptr, uint64_t number, uint32_t nbytes) +{ + if (nbytes > 8) { + srsasn_log_print(LOG_LEVEL_ERROR, "octstring of size=%d does not fit in an uint64_t\n", nbytes); + return; + } + for (uint32_t i = 0; i < nbytes; ++i) { + ptr[i] = (number >> (i * 8)) & 0xFF; + } +} + +void to_hex(char* cstr, uint8_t val) +{ + sprintf(cstr, "%02x", val); +} + +// helper functions +std::string octstring_to_string(const uint8_t* ptr, uint32_t N) +{ + std::string s; + s.resize(N * 2); + char cstr[3]; + for (uint32_t i = 0; i < N; i++) { + to_hex(cstr, ptr[i]); + s.replace(i * 2, 2, cstr); + } + return s; +} + +void string_to_octstring(uint8_t* ptr, const std::string& str) +{ + if (str.size() % 2 != 0) { + srsasn_log_print(LOG_LEVEL_WARN, "The provided hex string size=%d is not a multiple of 2\n.", str.size()); + } + char cstr[] = "\0\0\0"; + for (uint32_t i = 0; i < str.size(); i += 2) { + memcpy(&cstr[0], &str[i], 2); + ptr[i / 2] = strtoul(cstr, NULL, 16); + } +} + +/************************ + dyn_octstring +************************/ + +SRSASN_CODE dyn_octstring::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_length(bref, size())); + for (uint32_t i = 0; i < size(); ++i) { + HANDLE_CODE(bref.pack(octets_[i], 8)); + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE dyn_octstring::unpack(bit_ref& bref) +{ + uint32_t len; + HANDLE_CODE(unpack_length(len, bref)); + resize(len); + for (uint32_t i = 0; i < size(); ++i) { + HANDLE_CODE(bref.unpack(octets_[i], 8)); + } + return SRSASN_SUCCESS; +} + +std::string dyn_octstring::to_string() const +{ + return octstring_to_string(&octets_[0], size()); +} + +dyn_octstring& dyn_octstring::from_string(const std::string& hexstr) +{ + resize(hexstr.size() / 2); + string_to_octstring(&octets_[0], hexstr); + return *this; +} + +/********************* + bitstring +*********************/ + +SRSASN_CODE pack_common_bitstring(bit_ref& bref, const uint8_t* buf, uint32_t nbits) +{ + uint32_t n_octs = (uint32_t)ceilf(nbits / 8.0f); + uint32_t offset = ((nbits - 1) % 8) + 1; + HANDLE_CODE(bref.pack(buf[n_octs - 1], offset)); + for (uint32_t i = 1; i < n_octs; ++i) { + HANDLE_CODE(bref.pack(buf[n_octs - 1 - i], 8)); + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE unpack_common_bitstring(uint8_t* buf, bit_ref& bref, uint32_t nbits) +{ + uint32_t n_octs = (uint32_t)ceilf(nbits / 8.0f); + uint32_t offset = ((nbits - 1) % 8) + 1; + HANDLE_CODE(bref.unpack(buf[n_octs - 1], offset)); + for (uint32_t i = 1; i < n_octs; ++i) { + HANDLE_CODE(bref.unpack(buf[n_octs - 1 - i], 8)); + } + return SRSASN_SUCCESS; +} + +uint64_t bitstring_to_number(const uint8_t* ptr, uint32_t nbits) +{ + if (nbits > 64) { + srsasn_log_print(LOG_LEVEL_ERROR, "bitstring of size=%d does not fit in an uint64_t\n", nbits); + return 0; + } + uint64_t val = 0; + uint32_t nof_bytes = (uint32_t)ceilf(nbits / 8.0f); + for (uint32_t i = 0; i < nof_bytes; ++i) { + val += ptr[i] << (i * 8); + } + return val; +} +void number_to_bitstring(uint8_t* ptr, uint64_t number, uint32_t nbits) +{ + if (nbits > 64) { + srsasn_log_print(LOG_LEVEL_ERROR, "bitstring of size=%d does not fit in an uint64_t\n", nbits); + return; + } + uint32_t nof_bytes = (uint32_t)ceilf(nbits / 8.0f); + for (uint32_t i = 0; i < nof_bytes; ++i) { + ptr[i] = (number >> (i * 8)) & 0xFF; + } + uint32_t offset = nbits % 8; // clean up any extra set bit + if (offset > 0) { + ptr[nof_bytes - 1] &= (uint8_t)((1 << offset) - 1); + } +} + +std::string bitstring_to_string(const uint8_t* ptr, uint32_t nbits) +{ + std::string str(nbits, '\0'); + for (uint32_t i = 0; i < nbits; ++i) { + str[i] = bitstring_get(ptr, nbits - 1 - i) ? '1' : '0'; + } + return str; +} + +/********************* + fixed_bitstring +*********************/ + +SRSASN_CODE pack_fixed_bitstring(bit_ref& bref, const uint8_t* buf, uint32_t nbits) +{ + // if(nbits > 16) { // X.691 Section 15 + // bref.align_bytes_zero(); + // } + return pack_common_bitstring(bref, buf, nbits); + // if(nbits > 16) { // X.691 Section 15 + // bref.align_bytes_zero(); + // } +} + +SRSASN_CODE pack_fixed_bitstring(bit_ref& bref, const uint8_t* buf, uint32_t nbits, bool ext) +{ + HANDLE_CODE(pack_unsupported_ext_flag(bref, ext)); + HANDLE_CODE(pack_fixed_bitstring(bref, buf, nbits)); + return SRSASN_SUCCESS; +} + +SRSASN_CODE unpack_fixed_bitstring(uint8_t* buf, bit_ref& bref, uint32_t nbits) +{ + // if(nbits > 16) { // X.691 Section 15 + // bref.align_bytes_zero(); + // } + return unpack_common_bitstring(buf, bref, nbits); + // if(nbits > 16) { // X.691 Section 15 + // bref.align_bytes_zero(); + // } +} + +SRSASN_CODE unpack_fixed_bitstring(uint8_t* buf, bool& ext, bit_ref& bref, uint32_t nbits) +{ + HANDLE_CODE(unpack_unsupported_ext_flag(ext, bref)); + HANDLE_CODE(unpack_fixed_bitstring(buf, bref, nbits)); + return SRSASN_SUCCESS; +} + +/********************* + dyn_bitstring +*********************/ + +dyn_bitstring::dyn_bitstring(uint32_t n_bits_) : n_bits(n_bits_) +{ + uint32_t n_bytes = nof_octets(); + octets_.resize(n_bytes); + memset(&octets_[0], 0, n_bytes); +} + +dyn_bitstring::dyn_bitstring(const char* s) +{ + n_bits = (uint32_t)strlen(s); + uint32_t n_bytes = nof_octets(); + octets_.resize(n_bytes); + memset(&octets_[0], 0, n_bytes); + for (uint32_t i = 0; i < n_bits; ++i) + this->set(i, s[n_bits - i - 1] == '1'); +} + +bool dyn_bitstring::operator==(const char* other_str) const +{ + return strlen(other_str) == length() and (*this) == dyn_bitstring(other_str); +} + +void dyn_bitstring::resize(uint32_t new_size) +{ + n_bits = new_size; + octets_.resize(nof_octets()); + memset(&octets_[0], 0, nof_octets()); +} + +SRSASN_CODE dyn_bitstring::pack(bit_ref& bref, uint32_t lb, uint32_t ub) const +{ + uint32_t len = length(); + if (len < lb) { + srsasn_log_print(LOG_LEVEL_ERROR, "dynamic bitstring length=%d is lower than set lower bound=%d\n", len, lb); + return SRSASN_ERROR_ENCODE_FAIL; + } + if (ub > 0) { + if (ub < len) { + srsasn_log_print(LOG_LEVEL_ERROR, "asn1 error: dynamic bitstring length=%d is higher than set upper bound=%d\n", + len, ub); + return SRSASN_ERROR_ENCODE_FAIL; + } + uint32_t len_bits = ceilf(log2(ub - lb)); + HANDLE_CODE(bref.pack(len - lb, len_bits)); + HANDLE_CODE(bref.align_bytes_zero()); + } else { + HANDLE_CODE(pack_length(bref, len)); + } + HANDLE_CODE(pack_common_bitstring(bref, &octets_[0], len)); + // bref.align_bytes_zero(); + return SRSASN_SUCCESS; +} + +SRSASN_CODE dyn_bitstring::pack(bit_ref& bref, bool ext, uint32_t lb, uint32_t ub) const +{ + HANDLE_CODE(pack_unsupported_ext_flag(bref, ext)); + HANDLE_CODE(pack(bref, lb, ub)); + return SRSASN_SUCCESS; +} + +SRSASN_CODE dyn_bitstring::unpack(bit_ref& bref, uint32_t lb, uint32_t ub) +{ + uint32_t len; + if (ub > 0) { + uint32_t len_bits = ceilf(log2f(ub - lb)); + HANDLE_CODE(bref.unpack(len, len_bits)); + len += lb; + resize(len); + HANDLE_CODE(bref.align_bytes_zero()); + } else { + HANDLE_CODE(unpack_length(len, bref)); + resize(len); + } + HANDLE_CODE(unpack_common_bitstring(&octets_[0], bref, len)); + // bref.align_bytes_zero(); + return SRSASN_SUCCESS; +} + +SRSASN_CODE dyn_bitstring::unpack(bit_ref& bref, bool& ext, uint32_t lb, uint32_t ub) +{ + HANDLE_CODE(unpack_unsupported_ext_flag(ext, bref)); + HANDLE_CODE(unpack(bref, lb, ub)); + return SRSASN_SUCCESS; +} + +/********************* + choice utils +*********************/ +void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) +{ + srsasn_log_print(LOG_LEVEL_ERROR, "The access choide id is invalid (%d!=%d)\n", val, choice_id); +} +void log_invalid_choice_id(uint32_t val, const char* choice_type) +{ + srsasn_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%d for choice type %s\n", val, choice_type); +} + +/********************* + ext group +*********************/ + +ext_groups_header::ext_groups_header(uint32_t max_nof_groups, uint32_t nof_nogroups_) : nof_nogroups(nof_nogroups_) +{ + if (max_nof_groups > 20) { + srsasn_log_print(LOG_LEVEL_ERROR, "increase the size of ext group packer/unpacker\n"); + } + groups.resize(max_nof_groups); + for (uint32_t i = 0; i < groups.size(); ++i) { + groups[i] = false; + } + nof_groups = groups.size() + 1; // unset +} + +bool& ext_groups_header::operator[](uint32_t idx) +{ + return groups[idx]; +} + +SRSASN_CODE ext_groups_header::pack_nof_groups(bit_ref& bref) const +{ + nof_groups = 0; + for (uint32_t i = 0; i < groups.size(); ++i) { + if (groups[i]) { + nof_groups = i + 1; + } + } + if (nof_groups > groups.size()) { + srsasn_log_print(LOG_LEVEL_ERROR, "Exceeded maximum number of groups (%d>%d)\n", nof_groups, groups.size()); + return SRSASN_ERROR_ENCODE_FAIL; + } + HANDLE_CODE(pack_norm_small_integer(bref, nof_groups + nof_nogroups - 1)); + return SRSASN_SUCCESS; +} + +SRSASN_CODE ext_groups_header::pack_group_flags(bit_ref& bref) const +{ + // NOTE: nof_groups is cached + for (uint32_t i = 0; i < nof_groups; ++i) { + HANDLE_CODE(bref.pack(groups[i], 1)); + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE ext_groups_header::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_nof_groups(bref)); + return pack_group_flags(bref); +} + +SRSASN_CODE ext_groups_header::unpack_nof_groups(bit_ref& bref) +{ + HANDLE_CODE(unpack_norm_small_integer(nof_groups, bref)); + nof_groups += 1 - nof_nogroups; + if (nof_groups > groups.size()) { + srsasn_log_print(LOG_LEVEL_ERROR, "Exceeded maximum number of groups (%d>%d)\n", nof_groups, groups.size()); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE ext_groups_header::unpack_group_flags(bit_ref& bref) +{ + for (uint32_t i = 0; i < nof_groups; ++i) { + HANDLE_CODE(bref.unpack(groups[i], 1)); + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE ext_groups_header::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_nof_groups(bref)); + return unpack_group_flags(bref); +} + +/********************* + Open Field +*********************/ + +varlength_field_pack_guard::varlength_field_pack_guard(bit_ref& bref) +{ + brefstart = bref; + bref = bit_ref(&buffer[0], sizeof(buffer)); + bref_tracker = &bref; +} + +varlength_field_pack_guard::~varlength_field_pack_guard() +{ + // fill the spare bits + const bit_ref bref0 = bit_ref(&buffer[0], sizeof(buffer)); + uint32_t leftover = 7 - ((bref_tracker->distance(bref0) - (uint32_t)1) % (uint32_t)8); + bref_tracker->pack(0, leftover); + + // check how many bytes were written in total + uint32_t nof_bytes = bref_tracker->distance(bref0) / (uint32_t)8; + if (nof_bytes > sizeof(buffer)) { + srsasn_log_print(LOG_LEVEL_ERROR, "The packed variable sized field is too long for the reserved buffer (%d > %d)\n", + nof_bytes, sizeof(buffer)); + } + + // go back in time to pack length + pack_length(brefstart, nof_bytes); + + // pack encoded bytes + for (uint32_t i = 0; i < nof_bytes; ++i) { + brefstart.pack(buffer[i], 8); + } + *bref_tracker = brefstart; +} + +varlength_field_unpack_guard::varlength_field_unpack_guard(bit_ref& bref) +{ + unpack_length(len, bref); + bref0 = bref; + bref_tracker = &bref; +} + +varlength_field_unpack_guard::~varlength_field_unpack_guard() +{ + uint32_t pad; + bref_tracker->unpack(pad, len * 8 - bref_tracker->distance(bref0)); +} + +/******************* + JsonWriter +*******************/ + +json_writer::json_writer() : ident(""), sep(NONE) {} + +void json_writer::write_fieldname(const std::string& fieldname) +{ + if (sep == COMMA) { + ss << ",\n" << ident; + } else if (sep == NEWLINE) { + ss << "\n" << ident; + } + if (fieldname.size() > 0) { + ss << "\"" << fieldname << "\": "; + } + sep = NONE; +} + +void json_writer::write_str(const std::string& fieldname, const std::string& value) +{ + write_fieldname(fieldname); + ss << "\"" << value << "\""; + sep = COMMA; +} +void json_writer::write_str(const std::string& value) +{ + write_str("", value); +} + +void json_writer::write_int(const std::string& fieldname, int64_t value) +{ + write_fieldname(fieldname); + ss << value; + sep = COMMA; +} +void json_writer::write_int(int64_t value) +{ + write_int("", value); +} + +void json_writer::write_bool(const std::string& fieldname, bool value) +{ + write_fieldname(fieldname); + ss << (value ? "true" : "false"); + sep = COMMA; +} +void json_writer::write_bool(bool value) +{ + write_bool("", value); +} + +void json_writer::write_null(const std::string& fieldname) +{ + write_fieldname(fieldname); + ss << "null"; + sep = COMMA; +} +void json_writer::write_null() +{ + write_null(""); +} + +void json_writer::start_obj(const std::string& fieldname) +{ + write_fieldname(fieldname); + ss << "{"; + ident += " "; + sep = NEWLINE; +} +void json_writer::end_obj() +{ + ident.erase(ident.size() - 2, 2); + ss << "\n" << ident << "}"; + sep = COMMA; +} +void json_writer::start_array(const std::string& fieldname) +{ + write_fieldname(fieldname); + ss << "["; + ident += " "; + sep = NEWLINE; +} +void json_writer::end_array() +{ + ident.erase(ident.size() - 2, 2); + ss << "\n" << ident << "]"; + sep = COMMA; +} + +std::string json_writer::to_string() const +{ + return ss.str(); +} + +} // namespace asn1 diff --git a/lib/src/asn1/liblte_rrc.cc b/lib/src/asn1/liblte_rrc.cc deleted file mode 100644 index 488a23e51..000000000 --- a/lib/src/asn1/liblte_rrc.cc +++ /dev/null @@ -1,14399 +0,0 @@ -/******************************************************************************* - - Copyright 2012-2014 Ben Wojtowicz - Copyright 2014 Andrew Murphy (SIB13 unpack) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -******************************************************************************* - - File: liblte_rrc.cc - - Description: Contains all the implementations for the LTE Radio Resource - Control Layer library. - - Revision History - ---------- ------------- -------------------------------------------- - 03/24/2012 Ben Wojtowicz Created file. - 04/25/2012 Ben Wojtowicz Added SIB1 parameters, IEs, and messages - 06/02/2012 Ben Wojtowicz Added message and IE packing - 06/09/2012 Ben Wojtowicz Added the number of bits used to SIB1 pack - 08/19/2012 Ben Wojtowicz Added functionality to support SIB2, SIB3, - SIB4, and SIB8 packing and unpacking - 10/06/2012 Ben Wojtowicz Added more decoding/encoding. - 11/10/2012 Ben Wojtowicz Filled in the N_bits for SI messages - 03/03/2013 Ben Wojtowicz Added carrier_freqs_geran, SIB5, SIB6, SIB7 - and paging packing and unpacking. - 07/21/2013 Ben Wojtowicz Fixed several bugs and moved to the common - message struct. - 09/16/2013 Ben Wojtowicz Added error checking on sizes passed to - memcpy. - 03/26/2014 Ben Wojtowicz Added support for RRC Connection Request, - RRC Connection Reestablishment Request, - and UL CCCH Messages. - 05/04/2014 Ben Wojtowicz Added support for DL CCCH Messages. - 06/15/2014 Ben Wojtowicz Added support for UL DCCH Messages. - 08/03/2014 Ben Wojtowicz Added more decoding/encoding and using the - common value_2_bits and bits_2_value - functions. - 09/19/2014 Andrew Murphy Added SIB13 unpack. - 11/01/2014 Ben Wojtowicz Added more decoding/encoding. - 11/09/2014 Ben Wojtowicz Added SIB13 pack. - 11/29/2014 Ben Wojtowicz Fixed a bug in RRC connection reestablishment - UE identity. - -*******************************************************************************/ - -/******************************************************************************* - INCLUDES -*******************************************************************************/ - -#include "srslte/asn1/liblte_rrc.h" - -#include -#include -#include - -/******************************************************************************* - DEFINES -*******************************************************************************/ - - -/******************************************************************************* - TYPEDEFS -*******************************************************************************/ - - -/******************************************************************************* - GLOBAL VARIABLES -*******************************************************************************/ - -LIBLTE_BIT_MSG_STRUCT global_msg; - -/******************************************************************************* - HELPERS -*******************************************************************************/ - -/********************************************************************* - Functions for external logging -*********************************************************************/ -static log_handler_t log_handler; -static void *callback_ctx = NULL; - -void liblte_rrc_log_register_handler(void *ctx, log_handler_t handler) { - log_handler = handler; - callback_ctx = ctx; -} - -static void liblte_rrc_log_print(const char *format, ...) { - va_list args; - va_start(args, format); - if (log_handler) { - char *args_msg = NULL; - if(vasprintf(&args_msg, format, args) > 0) { - log_handler(callback_ctx, args_msg); - } - if (args_msg) { - free(args_msg); - } - } else { - vprintf(format, args); - } - va_end(args); -} - -/********************************************************************* - Description: Simply consume non-critical extensions for rel > r8 -*********************************************************************/ -void liblte_rrc_consume_noncrit_extension(bool ext, const char *func_name, uint8 **ie_ptr) -{ - uint32 i=0; - uint32 elem_flags=0; - uint32 elem_len=0; - - if (ext) { - uint8 n_elems = liblte_bits_2_value(ie_ptr, 7) + 1; - for(i=0; i> 1; - } - if (func_name) { - liblte_rrc_log_print("Detected an extension in RRC function: %s\n", func_name); - } - } -} - -void liblte_rrc_warning_not_handled(bool opt, const char *func_name) -{ - if (opt) { - liblte_rrc_log_print("Unhandled feature in RRC function: %s\n\n", func_name?func_name:"Unknown"); - } -} - -/******************************************************************************* - INFORMATION ELEMENT FUNCTIONS -*******************************************************************************/ - -/********************************************************************* - IE Name: MBSFN Notification Config - - Description: Specifies the MBMS notification related configuration - parameters, that are applicable for all MBSFN areas - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_notification_config_ie(LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT *mbsfn_notification_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(mbsfn_notification_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(mbsfn_notification_cnfg->repetition_coeff, ie_ptr, 1); - liblte_value_2_bits(mbsfn_notification_cnfg->offset, ie_ptr, 4); - liblte_value_2_bits(mbsfn_notification_cnfg->sf_index - 1, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_notification_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT *mbsfn_notification_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - mbsfn_notification_cnfg != NULL) - { - mbsfn_notification_cnfg->repetition_coeff = (LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_ENUM)liblte_bits_2_value(ie_ptr, 1); - mbsfn_notification_cnfg->offset = liblte_bits_2_value(ie_ptr, 4); - mbsfn_notification_cnfg->sf_index = liblte_bits_2_value(ie_ptr, 3) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: MBSFN Area Info List - - Description: Contains the information required to acquire the MBMS - control information associated with one or more MBSFN - areas - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_area_info_ie(LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *mbsfn_area_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(mbsfn_area_info != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(mbsfn_area_info->mbsfn_area_id_r9, ie_ptr, 8); - liblte_value_2_bits(mbsfn_area_info->non_mbsfn_region_length, ie_ptr, 1); - liblte_value_2_bits(mbsfn_area_info->notification_indicator_r9, ie_ptr, 3); - liblte_value_2_bits(mbsfn_area_info->mcch_repetition_period_r9, ie_ptr, 2); - liblte_value_2_bits(mbsfn_area_info->mcch_offset_r9, ie_ptr, 4); - liblte_value_2_bits(mbsfn_area_info->mcch_modification_period_r9, ie_ptr, 1); - liblte_value_2_bits(mbsfn_area_info->sf_alloc_info_r9, ie_ptr, 6); - liblte_value_2_bits(mbsfn_area_info->signalling_mcs_r9, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_area_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *mbsfn_area_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext; - - if(ie_ptr != NULL && - mbsfn_area_info != NULL) - { - // Extension indicator - ext = liblte_bits_2_value(ie_ptr, 1); - - mbsfn_area_info->mbsfn_area_id_r9 = liblte_bits_2_value(ie_ptr, 8); - mbsfn_area_info->non_mbsfn_region_length = (LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - mbsfn_area_info->notification_indicator_r9 = liblte_bits_2_value(ie_ptr, 3); - mbsfn_area_info->mcch_repetition_period_r9 = (LIBLTE_RRC_MCCH_REPETITION_PERIOD_ENUM)liblte_bits_2_value(ie_ptr, 2); - mbsfn_area_info->mcch_offset_r9 = liblte_bits_2_value(ie_ptr, 4); - mbsfn_area_info->mcch_modification_period_r9 = (LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_ENUM)liblte_bits_2_value(ie_ptr, 1); - mbsfn_area_info->sf_alloc_info_r9 = liblte_bits_2_value(ie_ptr, 6); - mbsfn_area_info->signalling_mcs_r9 = (LIBLTE_RRC_MCCH_SIGNALLING_MCS_ENUM)liblte_bits_2_value(ie_ptr, 2); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: MBSFN Subframe Config - - Description: Defines subframes that are reserved for MBSFN in - downlink - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_subframe_config_ie(LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *mbsfn_subfr_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(mbsfn_subfr_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(mbsfn_subfr_cnfg->radio_fr_alloc_period, ie_ptr, 3); - liblte_value_2_bits(mbsfn_subfr_cnfg->radio_fr_alloc_offset, ie_ptr, 3); - liblte_value_2_bits(mbsfn_subfr_cnfg->subfr_alloc_num_frames, ie_ptr, 1); - if(LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE == mbsfn_subfr_cnfg->subfr_alloc_num_frames) - { - liblte_value_2_bits(mbsfn_subfr_cnfg->subfr_alloc, ie_ptr, 6); - }else{ - liblte_value_2_bits(mbsfn_subfr_cnfg->subfr_alloc, ie_ptr, 24); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_subframe_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *mbsfn_subfr_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - mbsfn_subfr_cnfg != NULL) - { - mbsfn_subfr_cnfg->radio_fr_alloc_period = (LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_ENUM)liblte_bits_2_value(ie_ptr, 3); - mbsfn_subfr_cnfg->radio_fr_alloc_offset = liblte_bits_2_value(ie_ptr, 3); - mbsfn_subfr_cnfg->subfr_alloc_num_frames = (LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE == mbsfn_subfr_cnfg->subfr_alloc_num_frames) - { - mbsfn_subfr_cnfg->subfr_alloc = liblte_bits_2_value(ie_ptr, 6); - }else{ - mbsfn_subfr_cnfg->subfr_alloc = liblte_bits_2_value(ie_ptr, 24); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: TMGI - - Description: Temporary Mobile Group Identity (PLMN + MBMS service ID) - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_tmgi_r9_ie(LIBLTE_RRC_TMGI_R9_STRUCT *tmgi, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(tmgi != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(tmgi->plmn_id_explicit?1:0, ie_ptr, 1); - if(tmgi->plmn_id_explicit){ - liblte_rrc_pack_plmn_identity_ie(&tmgi->plmn_id_r9, ie_ptr); - }else{ - liblte_value_2_bits(tmgi->plmn_index_r9-1, ie_ptr, 3); - } - liblte_value_2_bits(tmgi->serviceid_r9, ie_ptr, 24); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tmgi_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_TMGI_R9_STRUCT *tmgi) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - tmgi != NULL) - { - tmgi->plmn_id_explicit = liblte_bits_2_value(ie_ptr, 1); - if(tmgi->plmn_id_explicit){ - liblte_rrc_unpack_plmn_identity_ie(ie_ptr, &tmgi->plmn_id_r9); - }else{ - tmgi->plmn_index_r9 = liblte_bits_2_value(ie_ptr, 3) + 1; - } - tmgi->serviceid_r9 = liblte_bits_2_value(ie_ptr, 24); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: MBMS Session Info - - Description: Information about an individual MBMS session - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbms_session_info_r9_ie(LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT *mbms_session_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(mbms_session_info != NULL && - ie_ptr != NULL) - { - // ext - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(mbms_session_info->sessionid_r9_present?1:0, ie_ptr, 1); - liblte_rrc_pack_tmgi_r9_ie(&mbms_session_info->tmgi_r9, ie_ptr); - if(mbms_session_info->sessionid_r9_present){ - liblte_value_2_bits(mbms_session_info->sessionid_r9, ie_ptr, 8); - } - liblte_value_2_bits(mbms_session_info->logicalchannelid_r9, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbms_session_info_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT *mbms_session_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - mbms_session_info != NULL) - { - // ext - bool ext = liblte_bits_2_value(ie_ptr, 1); - - mbms_session_info->sessionid_r9_present = liblte_bits_2_value(ie_ptr, 1); - liblte_rrc_unpack_tmgi_r9_ie(ie_ptr, &mbms_session_info->tmgi_r9); - if(mbms_session_info->sessionid_r9_present){ - mbms_session_info->sessionid_r9 = liblte_bits_2_value(ie_ptr, 8); - } - mbms_session_info->logicalchannelid_r9 = liblte_bits_2_value(ie_ptr, 5); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PMCH Config - - Description: Contains configuration parameters of the sessions - carried by a PMCH - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pmch_config_r9_ie(LIBLTE_RRC_PMCH_CONFIG_R9_STRUCT *pmch_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pmch_cnfg != NULL && - ie_ptr != NULL) - { - // ext - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(pmch_cnfg->sf_alloc_end_r9, ie_ptr, 11); - liblte_value_2_bits(pmch_cnfg->datamcs_r9, ie_ptr, 5); - liblte_value_2_bits(pmch_cnfg->mch_schedulingperiod_r9, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pmch_config_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_PMCH_CONFIG_R9_STRUCT *pmch_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pmch_cnfg != NULL) - { - // ext - bool ext = liblte_bits_2_value(ie_ptr, 1); - - pmch_cnfg->sf_alloc_end_r9 = liblte_bits_2_value(ie_ptr, 11); - pmch_cnfg->datamcs_r9 = liblte_bits_2_value(ie_ptr, 5); - pmch_cnfg->mch_schedulingperiod_r9 = (LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_ENUM)liblte_bits_2_value(ie_ptr, 3); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - - -/********************************************************************* - IE Name: PMCH Info - - Description: Specifies configuration of PMCH of an MBSFN area - - Document Reference: 36.331 v10.0.0 Section 6.3.7 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pmch_info_r9_ie(LIBLTE_RRC_PMCH_INFO_R9_STRUCT *pmch_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(pmch_info != NULL && - ie_ptr != NULL) - { - // ext - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_rrc_pack_pmch_config_r9_ie(&pmch_info->pmch_config_r9, ie_ptr); - liblte_value_2_bits(pmch_info->mbms_sessioninfolist_r9_size, ie_ptr, 5); - for(i=0; imbms_sessioninfolist_r9_size; i++){ - liblte_rrc_pack_mbms_session_info_r9_ie(&pmch_info->mbms_sessioninfolist_r9[i], ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pmch_info_r9_ie(uint8 **ie_ptr, - LIBLTE_RRC_PMCH_INFO_R9_STRUCT *pmch_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - pmch_info != NULL) - { - // ext - bool ext = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_pmch_config_r9_ie(ie_ptr, &pmch_info->pmch_config_r9); - pmch_info->mbms_sessioninfolist_r9_size = liblte_bits_2_value(ie_ptr, 5); - for(i=0; imbms_sessioninfolist_r9_size; i++){ - liblte_rrc_unpack_mbms_session_info_r9_ie(ie_ptr, &pmch_info->mbms_sessioninfolist_r9[i]); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: C-RNTI - - Description: Identifies a UE having a RRC connection within a cell - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_c_rnti_ie(uint16 rnti, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(rnti, ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_c_rnti_ie(uint8 **ie_ptr, - uint16 *rnti) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rnti != NULL) - { - *rnti = liblte_bits_2_value(ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Dedicated Info CDMA2000 - - Description: Transfers UE specific CDMA2000 information between - the network and the UE - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_dedicated_info_cdma2000_ie(LIBLTE_BYTE_MSG_STRUCT *ded_info_cdma2000, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ded_info_cdma2000 != NULL && - ie_ptr != NULL) - { - if(ded_info_cdma2000->N_bytes < 128) - { - liblte_value_2_bits(0, ie_ptr, 1); - liblte_value_2_bits(ded_info_cdma2000->N_bytes, ie_ptr, 7); - }else if(ded_info_cdma2000->N_bytes < 16383){ - liblte_value_2_bits(1, ie_ptr, 1); - liblte_value_2_bits(0, ie_ptr, 1); - liblte_value_2_bits(ded_info_cdma2000->N_bytes, ie_ptr, 14); - }else{ - // FIXME: Unlikely to have more than 16K of octets - } - - for(i=0; iN_bytes; i++) - { - liblte_value_2_bits(ded_info_cdma2000->msg[i], ie_ptr, 8); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dedicated_info_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_BYTE_MSG_STRUCT *ded_info_cdma2000) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - ded_info_cdma2000 != NULL) - { - if(0 == liblte_bits_2_value(ie_ptr, 1)) - { - ded_info_cdma2000->N_bytes = liblte_bits_2_value(ie_ptr, 7); - }else{ - if(0 == liblte_bits_2_value(ie_ptr, 1)) - { - ded_info_cdma2000->N_bytes = liblte_bits_2_value(ie_ptr, 14); - }else{ - // FIXME: Unlikely to have more than 16K of octets - ded_info_cdma2000->N_bytes = 0; - } - } - - for(i=0; iN_bytes; i++) - { - ded_info_cdma2000->msg[i] = liblte_bits_2_value(ie_ptr, 8); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Dedicated Info NAS - - Description: Transfers UE specific NAS layer information between - the network and the UE - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_dedicated_info_nas_ie(LIBLTE_BYTE_MSG_STRUCT *ded_info_nas, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ded_info_nas != NULL && - ie_ptr != NULL) - { - if(ded_info_nas->N_bytes < 128) - { - liblte_value_2_bits(0, ie_ptr, 1); - liblte_value_2_bits(ded_info_nas->N_bytes, ie_ptr, 7); - }else if(ded_info_nas->N_bytes < 16383){ - liblte_value_2_bits(1, ie_ptr, 1); - liblte_value_2_bits(0, ie_ptr, 1); - liblte_value_2_bits(ded_info_nas->N_bytes, ie_ptr, 14); - }else{ - // FIXME: Unlikely to have more than 16K of octets - } - - for(i=0; iN_bytes; i++) - { - liblte_value_2_bits(ded_info_nas->msg[i], ie_ptr, 8); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dedicated_info_nas_ie(uint8 **ie_ptr, - LIBLTE_BYTE_MSG_STRUCT *ded_info_nas) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - ded_info_nas != NULL) - { - if(0 == liblte_bits_2_value(ie_ptr, 1)) - { - ded_info_nas->N_bytes = liblte_bits_2_value(ie_ptr, 7); - }else{ - if(0 == liblte_bits_2_value(ie_ptr, 1)) - { - ded_info_nas->N_bytes = liblte_bits_2_value(ie_ptr, 14); - }else{ - // FIXME: Unlikely to have more than 16K of octets - ded_info_nas->N_bytes = 0; - } - } - - for(i=0; iN_bytes; i++) - { - ded_info_nas->msg[i] = liblte_bits_2_value(ie_ptr, 8); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Filter Coefficient - - Description: Specifies the measurement filtering coefficient - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_filter_coefficient_ie(LIBLTE_RRC_FILTER_COEFFICIENT_ENUM filter_coeff, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(filter_coeff, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_filter_coefficient_ie(uint8 **ie_ptr, - LIBLTE_RRC_FILTER_COEFFICIENT_ENUM *filter_coeff) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - filter_coeff != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - *filter_coeff = (LIBLTE_RRC_FILTER_COEFFICIENT_ENUM)liblte_bits_2_value(ie_ptr, 4); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: MMEC - - Description: Identifies an MME within the scope of an MME group - within a PLMN - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mmec_ie(uint8 mmec, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(mmec, ie_ptr, 8); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mmec_ie(uint8 **ie_ptr, - uint8 *mmec) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - mmec != NULL) - { - *mmec = liblte_bits_2_value(ie_ptr, 8); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Neigh Cell Config - - Description: Provides the information related to MBSFN and TDD - UL/DL configuration of neighbor cells - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_neigh_cell_config_ie(uint8 neigh_cell_config, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(neigh_cell_config, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_neigh_cell_config_ie(uint8 **ie_ptr, - uint8 *neigh_cell_config) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - neigh_cell_config != NULL) - { - *neigh_cell_config = liblte_bits_2_value(ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Other Config - - Description: Contains configuration related to other configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_other_config_ie(LIBLTE_RRC_OTHER_CONFIG_R9_STRUCT *other_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(other_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicator - liblte_value_2_bits(other_cnfg->report_proximity_cnfg_present, ie_ptr, 1); - - if(true == other_cnfg->report_proximity_cnfg_present) - { - // Optional indicators - liblte_value_2_bits(other_cnfg->report_proximity_cnfg.report_proximity_ind_eutra_present, ie_ptr, 1); - liblte_value_2_bits(other_cnfg->report_proximity_cnfg.report_proximity_ind_utra_present, ie_ptr, 1); - - if(true == other_cnfg->report_proximity_cnfg.report_proximity_ind_eutra_present) - { - liblte_value_2_bits(other_cnfg->report_proximity_cnfg.report_proximity_ind_eutra, ie_ptr, 1); - } - - if(true == other_cnfg->report_proximity_cnfg.report_proximity_ind_utra_present) - { - liblte_value_2_bits(other_cnfg->report_proximity_cnfg.report_proximity_ind_utra, ie_ptr, 1); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_other_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_OTHER_CONFIG_R9_STRUCT *other_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - other_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicator - other_cnfg->report_proximity_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == other_cnfg->report_proximity_cnfg_present) - { - // Optional indicators - other_cnfg->report_proximity_cnfg.report_proximity_ind_eutra_present = liblte_bits_2_value(ie_ptr, 1); - other_cnfg->report_proximity_cnfg.report_proximity_ind_utra_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == other_cnfg->report_proximity_cnfg.report_proximity_ind_eutra_present) - { - other_cnfg->report_proximity_cnfg.report_proximity_ind_eutra = (LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_EUTRA_R9_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - if(true == other_cnfg->report_proximity_cnfg.report_proximity_ind_utra_present) - { - other_cnfg->report_proximity_cnfg.report_proximity_ind_utra = (LIBLTE_RRC_REPORT_PROXIMITY_INDICATION_UTRA_R9_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RAND CDMA2000 (1xRTT) - - Description: Contains a random value, generated by the eNB, to be - passed to the CDMA2000 upper layers - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rand_cdma2000_1xrtt_ie(uint32 rand, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(rand, ie_ptr, 32); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rand_cdma2000_1xrtt_ie(uint8 **ie_ptr, - uint32 *rand) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rand != NULL) - { - *rand = liblte_bits_2_value(ie_ptr, 32); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RAT Type - - Description: Indicates the radio access technology (RAT), - including E-UTRA, of the requested/transferred UE - capabilities - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rat_type_ie(LIBLTE_RRC_RAT_TYPE_ENUM rat_type, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(rat_type, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rat_type_ie(uint8 **ie_ptr, - LIBLTE_RRC_RAT_TYPE_ENUM *rat_type) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rat_type != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - *rat_type = (LIBLTE_RRC_RAT_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 3); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RRC Transaction Identifier - - Description: Identifies an RRC procedure along with the message - type - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_transaction_identifier_ie(uint8 rrc_transaction_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(rrc_transaction_id, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_transaction_identifier_ie(uint8 **ie_ptr, - uint8 *rrc_transaction_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rrc_transaction_id != NULL) - { - *rrc_transaction_id = liblte_bits_2_value(ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: S-TMSI - - Description: Contains an S-Temporary Mobile Subscriber Identity, - a temporary UE identity provided by the EPC which - uniquely identifies the UE within the tracking area - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_s_tmsi_ie(LIBLTE_RRC_S_TMSI_STRUCT *s_tmsi, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(s_tmsi != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_mmec_ie(s_tmsi->mmec, ie_ptr); - liblte_value_2_bits(s_tmsi->m_tmsi, ie_ptr, 32); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_s_tmsi_ie(uint8 **ie_ptr, - LIBLTE_RRC_S_TMSI_STRUCT *s_tmsi) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - s_tmsi != NULL) - { - liblte_rrc_unpack_mmec_ie(ie_ptr, &s_tmsi->mmec); - s_tmsi->m_tmsi = liblte_bits_2_value(ie_ptr, 32); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: UE Capability RAT Container List - - Description: Contains list of containers, one for each RAT for - which UE capabilities are transferred - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: UE EUTRA Capability - - Description: Conveys the E-UTRA UE Radio Access Capability - Parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdcp_params_ie(LIBLTE_RRC_PDCP_PARAMS_STRUCT *pdcp_params, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(pdcp_params != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Max ROHC CTXTS default? - liblte_value_2_bits(pdcp_params->max_rohc_ctxts_present, ie_ptr, 1); - - // Supported ROHC Profiles - for(i=0; i<9; i++) - { - liblte_value_2_bits(pdcp_params->supported_rohc_profiles[i], ie_ptr, 1); - } - - if(pdcp_params->max_rohc_ctxts_present) - { - liblte_value_2_bits(pdcp_params->max_rohc_ctxts, ie_ptr, 4); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdcp_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDCP_PARAMS_STRUCT *pdcp_params) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - pdcp_params != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Max ROHC CTXTS default? - pdcp_params->max_rohc_ctxts_present = liblte_bits_2_value(ie_ptr, 1); - - // Supported ROHC Profiles - for(i=0; i<9; i++) - { - pdcp_params->supported_rohc_profiles[i] = liblte_bits_2_value(ie_ptr, 1); - } - - if(pdcp_params->max_rohc_ctxts_present) - { - pdcp_params->max_rohc_ctxts = (LIBLTE_RRC_MAX_ROHC_CTXTS_ENUM)liblte_bits_2_value(ie_ptr, 4); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_phy_layer_params_ie(LIBLTE_RRC_PHY_LAYER_PARAMS_STRUCT *params, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(params != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(params->tx_antenna_selection_supported, ie_ptr, 1); - liblte_value_2_bits(params->specific_ref_sigs_supported, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phy_layer_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHY_LAYER_PARAMS_STRUCT *params) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - params != NULL) - { - params->tx_antenna_selection_supported = liblte_bits_2_value(ie_ptr, 1); - params->specific_ref_sigs_supported = liblte_bits_2_value(ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_rf_params_ie(LIBLTE_RRC_RF_PARAMS_STRUCT *params, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(params != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(params->N_supported_band_eutras-1, ie_ptr, 6); - for(i=0; iN_supported_band_eutras; i++) - { - liblte_value_2_bits(params->supported_band_eutra[i].band_eutra-1, ie_ptr, 6); - liblte_value_2_bits(params->supported_band_eutra[i].half_duplex, ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rf_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_RF_PARAMS_STRUCT *params) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - params != NULL) - { - params->N_supported_band_eutras = liblte_bits_2_value(ie_ptr, 6) + 1; - for(i=0; iN_supported_band_eutras; i++) - { - params->supported_band_eutra[i].band_eutra = liblte_bits_2_value(ie_ptr, 6) + 1; - params->supported_band_eutra[i].half_duplex = liblte_bits_2_value(ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_band_info_eutra_ie(LIBLTE_RRC_BAND_INFO_EUTRA_STRUCT *info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(info != NULL && - ie_ptr != NULL) - { - // Option indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(info->N_inter_freq_need_for_gaps-1, ie_ptr, 6); - for(i=0; iN_inter_freq_need_for_gaps; i++) - { - liblte_value_2_bits(info->inter_freq_need_for_gaps[i], ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_unpack_band_info_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_BAND_INFO_EUTRA_STRUCT *info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - info != NULL) - { - // Option indicator - liblte_bits_2_value(ie_ptr, 1); - - info->N_inter_freq_need_for_gaps = liblte_bits_2_value(ie_ptr, 6) + 1; - for(i=0; iN_inter_freq_need_for_gaps; i++) - { - info->inter_freq_need_for_gaps[i] = liblte_bits_2_value(ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_params_ie(LIBLTE_RRC_MEAS_PARAMS_STRUCT *params, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(params != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(params->N_band_list_eutra-1, ie_ptr, 6); - for(i=0; iN_band_list_eutra; i++) - { - liblte_rrc_pack_band_info_eutra_ie(¶ms->band_list_eutra[i], ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_PARAMS_STRUCT *params) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - params != NULL) - { - params->N_band_list_eutra = liblte_bits_2_value(ie_ptr, 6) + 1; - for(i=0; iN_band_list_eutra; i++) - { - liblte_rrc_unpack_band_info_eutra_ie(ie_ptr, ¶ms->band_list_eutra[i]); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_inter_rat_params_ie(LIBLTE_RRC_INTER_RAT_PARAMS_STRUCT *params, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(params != NULL && - ie_ptr != NULL) - { - // WARNING: Hardcoding all options to not present - liblte_value_2_bits(0, ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_inter_rat_params_ie(uint8 **ie_ptr, - LIBLTE_RRC_INTER_RAT_PARAMS_STRUCT *params) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - params != NULL) - { - // WARNING: Hardcoding all options to not present - params->utra_fdd_present = false; - params->utra_tdd128_present = false; - params->utra_tdd384_present = false; - params->utra_tdd768_present = false; - params->geran_present = false; - params->cdma2000_hrpd_present = false; - params->cdma2000_1xrtt_present = false; - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_eutra_capability_ie(LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *ue_eutra_capability, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(ue_eutra_capability != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Option indicator - featureGroupIndicators - liblte_value_2_bits(ue_eutra_capability->feature_group_indicator_present, &msg_ptr, 1); - - // Option indicator - nonCriticalExtension - liblte_value_2_bits(0, &msg_ptr, 1); - - // Option indicator - access stratum release enum - liblte_value_2_bits(0, &msg_ptr, 1); - liblte_value_2_bits(ue_eutra_capability->access_stratum_release, &msg_ptr, 3); - - liblte_value_2_bits(ue_eutra_capability->ue_category - 1, &msg_ptr, 3); - liblte_rrc_pack_pdcp_params_ie(&ue_eutra_capability->pdcp_params, &msg_ptr); - liblte_rrc_pack_phy_layer_params_ie(&ue_eutra_capability->phy_params, &msg_ptr); - liblte_rrc_pack_rf_params_ie(&ue_eutra_capability->rf_params, &msg_ptr); - liblte_rrc_pack_meas_params_ie(&ue_eutra_capability->meas_params, &msg_ptr); - if(ue_eutra_capability->feature_group_indicator_present) - liblte_value_2_bits(ue_eutra_capability->feature_group_indicator, &msg_ptr, 32); - liblte_rrc_pack_inter_rat_params_ie(&ue_eutra_capability->inter_rat_params, &msg_ptr); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_eutra_capability_ie(uint8 **ie_ptr, - LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *ue_eutra_capability) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ue_eutra_capability != NULL && - ie_ptr != NULL) - { - // Option indicator - featureGroupIndicators - ue_eutra_capability->feature_group_indicator_present = liblte_bits_2_value(ie_ptr, 1); - - // Option indicator - nonCriticalExtension - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Option indicator - access stratum release enum - liblte_bits_2_value(ie_ptr, 1); - ue_eutra_capability->access_stratum_release = liblte_bits_2_value(ie_ptr, 3); - - ue_eutra_capability->ue_category = liblte_bits_2_value(ie_ptr, 3) + 1; - liblte_rrc_unpack_pdcp_params_ie(ie_ptr, &ue_eutra_capability->pdcp_params); - liblte_rrc_unpack_phy_layer_params_ie(ie_ptr, &ue_eutra_capability->phy_params); - liblte_rrc_unpack_rf_params_ie(ie_ptr, &ue_eutra_capability->rf_params); - liblte_rrc_unpack_meas_params_ie(ie_ptr, &ue_eutra_capability->meas_params); - if(ue_eutra_capability->feature_group_indicator_present) - ue_eutra_capability->feature_group_indicator = liblte_bits_2_value(ie_ptr, 32); - liblte_rrc_unpack_inter_rat_params_ie(ie_ptr, &ue_eutra_capability->inter_rat_params); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - - - -/********************************************************************* - IE Name: UE Timers and Constants - - Description: Contains timers and constants used by the UE in - either RRC_CONNECTED or RRC_IDLE - - Document Reference: 36.331 v10.0.0 Section 6.3.6 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_timers_and_constants_ie(LIBLTE_RRC_UE_TIMERS_AND_CONSTANTS_STRUCT *ue_timers_and_constants, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ue_timers_and_constants != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(ue_timers_and_constants->t300, ie_ptr, 3); - liblte_value_2_bits(ue_timers_and_constants->t301, ie_ptr, 3); - liblte_value_2_bits(ue_timers_and_constants->t310, ie_ptr, 3); - liblte_value_2_bits(ue_timers_and_constants->n310, ie_ptr, 3); - liblte_value_2_bits(ue_timers_and_constants->t311, ie_ptr, 3); - liblte_value_2_bits(ue_timers_and_constants->n311, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_timers_and_constants_ie(uint8 **ie_ptr, - LIBLTE_RRC_UE_TIMERS_AND_CONSTANTS_STRUCT *ue_timers_and_constants) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - ue_timers_and_constants != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - ue_timers_and_constants->t300 = (LIBLTE_RRC_T300_ENUM)liblte_bits_2_value(ie_ptr, 3); - ue_timers_and_constants->t301 = (LIBLTE_RRC_T301_ENUM)liblte_bits_2_value(ie_ptr, 3); - ue_timers_and_constants->t310 = (LIBLTE_RRC_T310_ENUM)liblte_bits_2_value(ie_ptr, 3); - ue_timers_and_constants->n310 = (LIBLTE_RRC_N310_ENUM)liblte_bits_2_value(ie_ptr, 3); - ue_timers_and_constants->t311 = (LIBLTE_RRC_T311_ENUM)liblte_bits_2_value(ie_ptr, 3); - ue_timers_and_constants->n311 = (LIBLTE_RRC_N311_ENUM)liblte_bits_2_value(ie_ptr, 3); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Allowed Meas Bandwidth - - Description: Indicates the maximum allowed measurement bandwidth - on a carrier frequency as defined by the parameter - Transmission Bandwidth Configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_allowed_meas_bandwidth_ie(LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM allowed_meas_bw, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(allowed_meas_bw, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_allowed_meas_bandwidth_ie(uint8 **ie_ptr, - LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM *allowed_meas_bw) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - allowed_meas_bw != NULL) - { - *allowed_meas_bw = (LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Hysteresis - - Description: Used within the entry and leave condition of an - event triggered reporting condition - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_hysteresis_ie(uint8 hysteresis, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - // FIXME: Convert from actual value - liblte_value_2_bits(hysteresis, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_hysteresis_ie(uint8 **ie_ptr, - uint8 *hysteresis) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - hysteresis != NULL) - { - // FIXME: Convert to actual value - *hysteresis = liblte_bits_2_value(ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Location Info - - Description: Transfers location information available at the UE to - correlate measurements and UE position information - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: Meas Config - - Description: Specifies measurements to be performed by the UE, - and covers intra-frequency, inter-frequency and - inter-RAT mobility as well as configuration of - measurement gaps - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_config_ie(LIBLTE_RRC_MEAS_CONFIG_STRUCT *meas_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(meas_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - if(meas_cnfg->N_meas_obj_to_remove) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(meas_cnfg->meas_obj_to_add_mod_list_present, ie_ptr, 1); - if(meas_cnfg->N_rep_cnfg_to_remove) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(meas_cnfg->rep_cnfg_to_add_mod_list_present, ie_ptr, 1); - if(meas_cnfg->N_meas_id_to_remove) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(meas_cnfg->meas_id_to_add_mod_list_present, ie_ptr, 1); - liblte_value_2_bits(meas_cnfg->quantity_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(meas_cnfg->meas_gap_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(meas_cnfg->s_meas_present, ie_ptr, 1); - liblte_value_2_bits(meas_cnfg->pre_reg_info_hrpd_present, ie_ptr, 1); - liblte_value_2_bits(meas_cnfg->speed_state_params_present, ie_ptr, 1); - - // Meas Object To Remove List - if(0 != meas_cnfg->N_meas_obj_to_remove) - { - liblte_value_2_bits(meas_cnfg->N_meas_obj_to_remove - 1, ie_ptr, 5); - } - for(i=0; iN_meas_obj_to_remove; i++) - { - liblte_rrc_pack_meas_object_id_ie(meas_cnfg->meas_obj_to_remove_list[i], ie_ptr); - } - - // Meas Object To Add Mod List - if(meas_cnfg->meas_obj_to_add_mod_list_present) - { - liblte_rrc_pack_meas_object_to_add_mod_list_ie(&meas_cnfg->meas_obj_to_add_mod_list, ie_ptr); - } - - // Report Config To Remove List - if(0 != meas_cnfg->N_rep_cnfg_to_remove) - { - liblte_value_2_bits(meas_cnfg->N_rep_cnfg_to_remove - 1, ie_ptr, 5); - } - for(i=0; iN_rep_cnfg_to_remove; i++) - { - liblte_rrc_pack_report_config_id_ie(meas_cnfg->rep_cnfg_to_remove_list[i], ie_ptr); - } - - // Report Config To Add Mod List - if(meas_cnfg->rep_cnfg_to_add_mod_list_present) - { - liblte_rrc_pack_report_config_to_add_mod_list_ie(&meas_cnfg->rep_cnfg_to_add_mod_list, ie_ptr); - } - - // Meas ID To Remove List - if(0 != meas_cnfg->N_meas_id_to_remove) - { - liblte_value_2_bits(meas_cnfg->N_meas_id_to_remove - 1, ie_ptr, 5); - } - for(i=0; iN_meas_id_to_remove; i++) - { - liblte_rrc_pack_meas_id_ie(meas_cnfg->meas_id_to_remove_list[i], ie_ptr); - } - - // Meas ID To Add Mod List - if(meas_cnfg->meas_id_to_add_mod_list_present) - { - liblte_rrc_pack_meas_id_to_add_mod_list_ie(&meas_cnfg->meas_id_to_add_mod_list, ie_ptr); - } - - // Quantity Config - if(meas_cnfg->quantity_cnfg_present) - { - liblte_rrc_pack_quantity_config_ie(&meas_cnfg->quantity_cnfg, ie_ptr); - } - - // Meas Gap Config - if(meas_cnfg->meas_gap_cnfg_present) - { - liblte_rrc_pack_meas_gap_config_ie(&meas_cnfg->meas_gap_cnfg, ie_ptr); - } - - // S Measure - if(meas_cnfg->s_meas_present) - { - liblte_rrc_pack_rsrp_range_ie(meas_cnfg->s_meas, ie_ptr); - } - - // Pre Registration Info HRPD - if(meas_cnfg->pre_reg_info_hrpd_present) - { - liblte_rrc_pack_pre_registration_info_hrpd_ie(&meas_cnfg->pre_reg_info_hrpd, ie_ptr); - } - - // Speed State Pars - if(meas_cnfg->speed_state_params_present) - { - // Release choice - liblte_value_2_bits(1, ie_ptr, 1); - - // Mobility State Parameters - liblte_rrc_pack_mobility_state_parameters_ie(&meas_cnfg->speed_state_params.mob_state_params, ie_ptr); - - // Time To Trigger SF - liblte_rrc_pack_speed_state_scale_factors_ie(&meas_cnfg->speed_state_params.time_to_trig_sf, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_CONFIG_STRUCT *meas_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool meas_obj_to_remove_present; - bool rep_cnfg_to_remove_present; - bool meas_id_to_remove_present; - - if(ie_ptr != NULL && - meas_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - meas_obj_to_remove_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->meas_obj_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - rep_cnfg_to_remove_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->rep_cnfg_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - meas_id_to_remove_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->meas_id_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->quantity_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->meas_gap_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->s_meas_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->pre_reg_info_hrpd_present = liblte_bits_2_value(ie_ptr, 1); - meas_cnfg->speed_state_params_present = liblte_bits_2_value(ie_ptr, 1); - - // Meas Object To Remove List - if(meas_obj_to_remove_present) - { - meas_cnfg->N_meas_obj_to_remove = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; iN_meas_obj_to_remove; i++) - { - liblte_rrc_unpack_meas_object_id_ie(ie_ptr, &meas_cnfg->meas_obj_to_remove_list[i]); - } - }else{ - meas_cnfg->N_meas_obj_to_remove = 0; - } - - // Meas Object To Add Mod List - if(meas_cnfg->meas_obj_to_add_mod_list_present) - { - liblte_rrc_unpack_meas_object_to_add_mod_list_ie(ie_ptr, &meas_cnfg->meas_obj_to_add_mod_list); - } - - // Report Config To Remove List - if(rep_cnfg_to_remove_present) - { - meas_cnfg->N_rep_cnfg_to_remove = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; iN_rep_cnfg_to_remove; i++) - { - liblte_rrc_unpack_report_config_id_ie(ie_ptr, &meas_cnfg->rep_cnfg_to_remove_list[i]); - } - }else{ - meas_cnfg->N_rep_cnfg_to_remove = 0; - } - - // Report Config To Add Mod List - if(meas_cnfg->rep_cnfg_to_add_mod_list_present) - { - liblte_rrc_unpack_report_config_to_add_mod_list_ie(ie_ptr, &meas_cnfg->rep_cnfg_to_add_mod_list); - } - - // Meas ID To Remove List - if(meas_id_to_remove_present) - { - meas_cnfg->N_meas_id_to_remove = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; iN_meas_id_to_remove; i++) - { - liblte_rrc_unpack_meas_id_ie(ie_ptr, &meas_cnfg->meas_id_to_remove_list[i]); - } - }else{ - meas_cnfg->N_meas_id_to_remove = 0; - } - - // Meas ID To Add Mod List - if(meas_cnfg->meas_id_to_add_mod_list_present) - { - liblte_rrc_unpack_meas_id_to_add_mod_list_ie(ie_ptr, &meas_cnfg->meas_id_to_add_mod_list); - } - - // Quantity Config - if(meas_cnfg->quantity_cnfg_present) - { - liblte_rrc_unpack_quantity_config_ie(ie_ptr, &meas_cnfg->quantity_cnfg); - } - - // Meas Gap Config - if(meas_cnfg->meas_gap_cnfg_present) - { - liblte_rrc_unpack_meas_gap_config_ie(ie_ptr, &meas_cnfg->meas_gap_cnfg); - } - - // S Measure - if(meas_cnfg->s_meas_present) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &meas_cnfg->s_meas); - } - - // Pre Registration Info HRPD - if(meas_cnfg->pre_reg_info_hrpd_present) - { - liblte_rrc_unpack_pre_registration_info_hrpd_ie(ie_ptr, &meas_cnfg->pre_reg_info_hrpd); - } - - // Speed State Pars - if(meas_cnfg->speed_state_params_present) - { - // Release choice - meas_cnfg->speed_state_params_present = liblte_bits_2_value(ie_ptr, 1); - - if(meas_cnfg->speed_state_params_present) - { - // Mobility State Parameters - liblte_rrc_unpack_mobility_state_parameters_ie(ie_ptr, &meas_cnfg->speed_state_params.mob_state_params); - - // Time To Trigger SF - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &meas_cnfg->speed_state_params.time_to_trig_sf); - } - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Gap Config - - Description: Specifies the measurement gap configuration and - controls setup/release of measurement gaps - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_gap_config_ie(LIBLTE_RRC_MEAS_GAP_CONFIG_STRUCT *meas_gap_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(meas_gap_cnfg != NULL && - ie_ptr != NULL) - { - // Release choice - liblte_value_2_bits(meas_gap_cnfg->setup_present, ie_ptr, 1); - - if(meas_gap_cnfg->setup_present) - { - // Gap Offset Type - liblte_value_2_bits(meas_gap_cnfg->gap_offset_type, ie_ptr, 1); - - // Gap Offset - if(LIBLTE_RRC_GAP_OFFSET_TYPE_GP0 == meas_gap_cnfg->gap_offset_type) - { - liblte_value_2_bits(meas_gap_cnfg->gap_offset, ie_ptr, 6); - }else{ - liblte_value_2_bits(meas_gap_cnfg->gap_offset, ie_ptr, 7); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_gap_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_GAP_CONFIG_STRUCT *meas_gap_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - meas_gap_cnfg != NULL) - { - // Release choice - meas_gap_cnfg->setup_present = liblte_bits_2_value(ie_ptr, 1); - - if(meas_gap_cnfg->setup_present) - { - // Gap Offset Type - meas_gap_cnfg->gap_offset_type = (LIBLTE_RRC_GAP_OFFSET_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - - // Gap Offset - if(LIBLTE_RRC_GAP_OFFSET_TYPE_GP0 == meas_gap_cnfg->gap_offset_type) - { - meas_gap_cnfg->gap_offset = liblte_bits_2_value(ie_ptr, 6); - }else{ - meas_gap_cnfg->gap_offset = liblte_bits_2_value(ie_ptr, 7); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas ID - - Description: Identifies a measurement configuration, i.e. linking - of a measurement object and a reporting configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_id_ie(uint8 meas_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(meas_id - 1, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_id_ie(uint8 **ie_ptr, - uint8 *meas_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - meas_id != NULL) - { - *meas_id = liblte_bits_2_value(ie_ptr, 5) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Id To Add Mod List - - Description: Concerns a list of measurement identities to add or - modify, with for each entry the meas ID, the - associated meas object ID and the associated report - config ID - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_id_to_add_mod_list_ie(LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT *list, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(list != NULL && - ie_ptr != NULL) - { - // List Size - liblte_value_2_bits(list->N_meas_id - 1, ie_ptr, 5); - - for(i=0; iN_meas_id; i++) - { - // Meas ID - liblte_rrc_pack_meas_id_ie(list->meas_id_list[i].meas_id, ie_ptr); - - // Meas Object ID - liblte_rrc_pack_meas_object_id_ie(list->meas_id_list[i].meas_obj_id, ie_ptr); - - // Report Config ID - liblte_rrc_pack_report_config_id_ie(list->meas_id_list[i].rep_cnfg_id, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_id_to_add_mod_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_LIST_STRUCT *list) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - list != NULL) - { - // List Size - list->N_meas_id = liblte_bits_2_value(ie_ptr, 5) + 1; - - for(i=0; iN_meas_id; i++) - { - // Meas ID - liblte_rrc_unpack_meas_id_ie(ie_ptr, &list->meas_id_list[i].meas_id); - - // Meas Object ID - liblte_rrc_unpack_meas_object_id_ie(ie_ptr, &list->meas_id_list[i].meas_obj_id); - - // Report Config ID - liblte_rrc_unpack_report_config_id_ie(ie_ptr, &list->meas_id_list[i].rep_cnfg_id); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Object CDMA2000 - - Description: Specifies information applicable for inter-RAT - CDMA2000 neighboring cells - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_cdma2000_ie(LIBLTE_RRC_MEAS_OBJECT_CDMA2000_STRUCT *meas_obj_cdma2000, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(meas_obj_cdma2000 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(meas_obj_cdma2000->search_win_size_present, ie_ptr, 1); - liblte_value_2_bits(meas_obj_cdma2000->cells_to_remove_list_present, ie_ptr, 1); - if(0 != meas_obj_cdma2000->N_cells_to_add_mod) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(meas_obj_cdma2000->cell_for_which_to_rep_cgi_present, ie_ptr, 1); - - // CDMA2000 Type - liblte_rrc_pack_cdma2000_type_ie(meas_obj_cdma2000->cdma2000_type, ie_ptr); - - // Carrier Freq - liblte_rrc_pack_carrier_freq_cdma2000_ie(&meas_obj_cdma2000->carrier_freq, ie_ptr); - - // Search Window Size - if(meas_obj_cdma2000->search_win_size_present) - { - liblte_value_2_bits(meas_obj_cdma2000->search_win_size, ie_ptr, 4); - } - - // Offset Freq - liblte_rrc_pack_q_offset_range_inter_rat_ie(meas_obj_cdma2000->offset_freq, ie_ptr); - - // Cells To Remove List - if(meas_obj_cdma2000->cells_to_remove_list_present) - { - liblte_rrc_pack_cell_index_list_ie(&meas_obj_cdma2000->cells_to_remove_list, ie_ptr); - } - - // Cells To Add Mod List - if(0 != meas_obj_cdma2000->N_cells_to_add_mod) - { - liblte_value_2_bits(meas_obj_cdma2000->N_cells_to_add_mod - 1, ie_ptr, 5); - } - for(i=0; iN_cells_to_add_mod; i++) - { - // Cell Index - liblte_value_2_bits(meas_obj_cdma2000->cells_to_add_mod_list[i].cell_idx - 1, ie_ptr, 5); - - // Phys Cell ID - liblte_rrc_pack_phys_cell_id_cdma2000_ie(meas_obj_cdma2000->cells_to_add_mod_list[i].pci, ie_ptr); - } - - // Cell For Which To Report CGI - if(meas_obj_cdma2000->cell_for_which_to_rep_cgi_present) - { - liblte_rrc_pack_phys_cell_id_cdma2000_ie(meas_obj_cdma2000->cell_for_which_to_rep_cgi_present, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_CDMA2000_STRUCT *meas_obj_cdma2000) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool cells_to_add_mod_present; - - if(ie_ptr != NULL && - meas_obj_cdma2000 != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - meas_obj_cdma2000->search_win_size_present = liblte_bits_2_value(ie_ptr, 1); - meas_obj_cdma2000->cells_to_remove_list_present = liblte_bits_2_value(ie_ptr, 1); - cells_to_add_mod_present = liblte_bits_2_value(ie_ptr, 1); - meas_obj_cdma2000->cell_for_which_to_rep_cgi_present = liblte_bits_2_value(ie_ptr, 1); - - // CDMA2000 Type - liblte_rrc_unpack_cdma2000_type_ie(ie_ptr, &meas_obj_cdma2000->cdma2000_type); - - // Carrier Freq - liblte_rrc_unpack_carrier_freq_cdma2000_ie(ie_ptr, &meas_obj_cdma2000->carrier_freq); - - // Search Window Size - if(meas_obj_cdma2000->search_win_size_present) - { - meas_obj_cdma2000->search_win_size = liblte_bits_2_value(ie_ptr, 4); - } - - // Offset Freq - liblte_rrc_unpack_q_offset_range_inter_rat_ie(ie_ptr, &meas_obj_cdma2000->offset_freq); - - // Cells To Remove List - if(meas_obj_cdma2000->cells_to_remove_list_present) - { - liblte_rrc_unpack_cell_index_list_ie(ie_ptr, &meas_obj_cdma2000->cells_to_remove_list); - } - - // Cells To Add Mod List - if(cells_to_add_mod_present) - { - meas_obj_cdma2000->N_cells_to_add_mod = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; iN_cells_to_add_mod; i++) - { - // Cell Index - meas_obj_cdma2000->cells_to_add_mod_list[i].cell_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - - // Phys Cell ID - liblte_rrc_unpack_phys_cell_id_cdma2000_ie(ie_ptr, &meas_obj_cdma2000->cells_to_add_mod_list[i].pci); - } - }else{ - meas_obj_cdma2000->N_cells_to_add_mod = 0; - } - - // Cell For Which To Report CGI - if(meas_obj_cdma2000->cell_for_which_to_rep_cgi_present) - { - liblte_rrc_unpack_phys_cell_id_cdma2000_ie(ie_ptr, &meas_obj_cdma2000->cell_for_which_to_rep_cgi); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Object EUTRA - - Description: Specifies information applicable for intra-frequency - or inter-frequency E-UTRA cells - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_eutra_ie(LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT *meas_obj_eutra, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(meas_obj_eutra != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(meas_obj_eutra->offset_freq_not_default, ie_ptr, 1); - liblte_value_2_bits(meas_obj_eutra->cells_to_remove_list_present, ie_ptr, 1); - if(0 != meas_obj_eutra->N_cells_to_add_mod) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(meas_obj_eutra->black_cells_to_remove_list_present, ie_ptr, 1); - if(0 != meas_obj_eutra->N_black_cells_to_add_mod) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(meas_obj_eutra->cell_for_which_to_rep_cgi_present, ie_ptr, 1); - - // Carrier Freq - liblte_rrc_pack_arfcn_value_eutra_ie(meas_obj_eutra->carrier_freq, ie_ptr); - - // Allowed Meas Bandwidth - liblte_rrc_pack_allowed_meas_bandwidth_ie(meas_obj_eutra->allowed_meas_bw, ie_ptr); - - // Presence Antenna Port 1 - liblte_rrc_pack_presence_antenna_port_1_ie(meas_obj_eutra->presence_ant_port_1, ie_ptr); - - // Neigh Cell Config - liblte_rrc_pack_neigh_cell_config_ie(meas_obj_eutra->neigh_cell_cnfg, ie_ptr); - - // Offset Freq - if(meas_obj_eutra->offset_freq_not_default) - { - liblte_rrc_pack_q_offset_range_ie(meas_obj_eutra->offset_freq, ie_ptr); - } - - // Cells To Remove List - if(meas_obj_eutra->cells_to_remove_list_present) - { - liblte_rrc_pack_cell_index_list_ie(&meas_obj_eutra->cells_to_remove_list, ie_ptr); - } - - // Cells To Add Mod List - if(0 != meas_obj_eutra->N_cells_to_add_mod) - { - liblte_value_2_bits(meas_obj_eutra->N_cells_to_add_mod - 1, ie_ptr, 5); - } - for(i=0; iN_cells_to_add_mod; i++) - { - // Cell Index - liblte_value_2_bits(meas_obj_eutra->cells_to_add_mod_list[i].cell_idx - 1, ie_ptr, 5); - - // Phys Cell ID - liblte_rrc_pack_phys_cell_id_ie(meas_obj_eutra->cells_to_add_mod_list[i].pci, ie_ptr); - - // Cell Individual Offset - liblte_rrc_pack_q_offset_range_ie(meas_obj_eutra->cells_to_add_mod_list[i].cell_offset, ie_ptr); - } - - // Black Cells To Remove List - if(meas_obj_eutra->black_cells_to_remove_list_present) - { - liblte_rrc_pack_cell_index_list_ie(&meas_obj_eutra->black_cells_to_remove_list, ie_ptr); - } - - // Black Cells To Add Mod List - if(0 != meas_obj_eutra->N_black_cells_to_add_mod) - { - liblte_value_2_bits(meas_obj_eutra->N_black_cells_to_add_mod - 1, ie_ptr, 5); - } - for(i=0; iN_black_cells_to_add_mod; i++) - { - // Cell Index - liblte_value_2_bits(meas_obj_eutra->black_cells_to_add_mod_list[i].cell_idx - 1, ie_ptr, 5); - - // Phys Cell ID Range - liblte_rrc_pack_phys_cell_id_range_ie(&meas_obj_eutra->black_cells_to_add_mod_list[i].pci_range, ie_ptr); - } - - // Cell For Which To Report CGI - if(meas_obj_eutra->cell_for_which_to_rep_cgi_present) - { - liblte_rrc_pack_phys_cell_id_ie(meas_obj_eutra->cell_for_which_to_rep_cgi, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT *meas_obj_eutra) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool cells_to_add_mod_list_present; - bool black_cells_to_add_mod_list_present; - - if(ie_ptr != NULL && - meas_obj_eutra != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - meas_obj_eutra->offset_freq_not_default = liblte_bits_2_value(ie_ptr, 1); - meas_obj_eutra->cells_to_remove_list_present = liblte_bits_2_value(ie_ptr, 1); - cells_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - meas_obj_eutra->black_cells_to_remove_list_present = liblte_bits_2_value(ie_ptr, 1); - black_cells_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - meas_obj_eutra->cell_for_which_to_rep_cgi_present = liblte_bits_2_value(ie_ptr, 1); - - // Carrier Freq - liblte_rrc_unpack_arfcn_value_eutra_ie(ie_ptr, &meas_obj_eutra->carrier_freq); - - // Allowed Meas Bandwidth - liblte_rrc_unpack_allowed_meas_bandwidth_ie(ie_ptr, &meas_obj_eutra->allowed_meas_bw); - - // Presence Antenna Port 1 - liblte_rrc_unpack_presence_antenna_port_1_ie(ie_ptr, &meas_obj_eutra->presence_ant_port_1); - - // Neigh Cell Config - liblte_rrc_unpack_neigh_cell_config_ie(ie_ptr, &meas_obj_eutra->neigh_cell_cnfg); - - // Offset Freq - if(meas_obj_eutra->offset_freq_not_default) - { - liblte_rrc_unpack_q_offset_range_ie(ie_ptr, &meas_obj_eutra->offset_freq); - } - - // Cells To Remove List - if(meas_obj_eutra->cells_to_remove_list_present) - { - liblte_rrc_unpack_cell_index_list_ie(ie_ptr, &meas_obj_eutra->cells_to_remove_list); - } - - // Cells To Add Mod List - if(cells_to_add_mod_list_present) - { - meas_obj_eutra->N_cells_to_add_mod = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; iN_cells_to_add_mod; i++) - { - // Cell Index - meas_obj_eutra->cells_to_add_mod_list[i].cell_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - - // Phys Cell ID - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &meas_obj_eutra->cells_to_add_mod_list[i].pci); - - // Cell Individual Offset - liblte_rrc_unpack_q_offset_range_ie(ie_ptr, &meas_obj_eutra->cells_to_add_mod_list[i].cell_offset); - } - }else{ - meas_obj_eutra->N_cells_to_add_mod = 0; - } - - // Black Cells To Remove List - if(meas_obj_eutra->black_cells_to_remove_list_present) - { - liblte_rrc_unpack_cell_index_list_ie(ie_ptr, &meas_obj_eutra->black_cells_to_remove_list); - } - - // Black Cells To Add Mod List - if(black_cells_to_add_mod_list_present) - { - meas_obj_eutra->N_black_cells_to_add_mod = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; iN_black_cells_to_add_mod; i++) - { - // Cell Index - meas_obj_eutra->black_cells_to_add_mod_list[i].cell_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - - // Phys Cell ID Range - liblte_rrc_unpack_phys_cell_id_range_ie(ie_ptr, &meas_obj_eutra->black_cells_to_add_mod_list[i].pci_range); - } - }else{ - meas_obj_eutra->N_black_cells_to_add_mod = 0; - } - - // Cell For Which To Report CGI - if(meas_obj_eutra->cell_for_which_to_rep_cgi_present) - { - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &meas_obj_eutra->cell_for_which_to_rep_cgi); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Object GERAN - - Description: Specifies information applicable for inter-RAT - GERAN neighboring frequencies - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_geran_ie(LIBLTE_RRC_MEAS_OBJECT_GERAN_STRUCT *meas_obj_geran, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(meas_obj_geran != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicator - liblte_value_2_bits(meas_obj_geran->cell_for_which_to_rep_cgi_present, ie_ptr, 1); - - // Carrier Freqs - liblte_rrc_pack_carrier_freqs_geran_ie(&meas_obj_geran->carrier_freqs, ie_ptr); - - // Offset Freq - liblte_rrc_pack_q_offset_range_inter_rat_ie(meas_obj_geran->offset_freq, ie_ptr); - - // NCC Permitted - liblte_value_2_bits(meas_obj_geran->ncc_permitted, ie_ptr, 8); - - // Cell For Which To Report CGI - if(meas_obj_geran->cell_for_which_to_rep_cgi_present) - { - liblte_rrc_pack_phys_cell_id_geran_ie(&meas_obj_geran->cell_for_which_to_rep_cgi, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_GERAN_STRUCT *meas_obj_geran) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - meas_obj_geran != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Optional indicator - meas_obj_geran->cell_for_which_to_rep_cgi_present = liblte_bits_2_value(ie_ptr, 1); - - // Carrier Freqs - liblte_rrc_unpack_carrier_freqs_geran_ie(ie_ptr, &meas_obj_geran->carrier_freqs); - - // Offset Freq - liblte_rrc_unpack_q_offset_range_inter_rat_ie(ie_ptr, &meas_obj_geran->offset_freq); - - // NCC Permitted - meas_obj_geran->ncc_permitted = liblte_bits_2_value(ie_ptr, 8); - - // Cell For Which To Report CGI - if(meas_obj_geran->cell_for_which_to_rep_cgi_present) - { - liblte_rrc_unpack_phys_cell_id_geran_ie(ie_ptr, &meas_obj_geran->cell_for_which_to_rep_cgi); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Object ID - - Description: Identifies a measurement object configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_id_ie(uint8 meas_object_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(meas_object_id - 1, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_id_ie(uint8 **ie_ptr, - uint8 *meas_object_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - meas_object_id != NULL) - { - *meas_object_id = liblte_bits_2_value(ie_ptr, 5) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Object To Add Mod List - - Description: Concerns a list of measurement objects to add or - modify - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_to_add_mod_list_ie(LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT *list, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(list != NULL && - ie_ptr != NULL) - { - // List Size - liblte_value_2_bits(list->N_meas_obj - 1, ie_ptr, 5); - - for(i=0; iN_meas_obj; i++) - { - // Meas Object ID - liblte_rrc_pack_meas_object_id_ie(list->meas_obj_list[i].meas_obj_id, ie_ptr); - - // Meas Object Choice Extension - liblte_value_2_bits(0, ie_ptr, 1); // Choice from before extension marker - - // Meas Object Choice - liblte_value_2_bits(list->meas_obj_list[i].meas_obj_type, ie_ptr, 2); - - // Meas Object - if(LIBLTE_RRC_MEAS_OBJECT_TYPE_EUTRA == list->meas_obj_list[i].meas_obj_type) - { - liblte_rrc_pack_meas_object_eutra_ie(&list->meas_obj_list[i].meas_obj_eutra, ie_ptr); - }else if(LIBLTE_RRC_MEAS_OBJECT_TYPE_UTRA == list->meas_obj_list[i].meas_obj_type){ - liblte_rrc_pack_meas_object_utra_ie(&list->meas_obj_list[i].meas_obj_utra, ie_ptr); - }else if(LIBLTE_RRC_MEAS_OBJECT_TYPE_GERAN == list->meas_obj_list[i].meas_obj_type){ - liblte_rrc_pack_meas_object_geran_ie(&list->meas_obj_list[i].meas_obj_geran, ie_ptr); - }else{ - liblte_rrc_pack_meas_object_cdma2000_ie(&list->meas_obj_list[i].meas_obj_cdma2000, ie_ptr); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_to_add_mod_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_TO_ADD_MOD_LIST_STRUCT *list) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - list != NULL) - { - // List Size - list->N_meas_obj = liblte_bits_2_value(ie_ptr, 5) + 1; - - for(i=0; iN_meas_obj; i++) - { - // Meas Object ID - liblte_rrc_unpack_meas_object_id_ie(ie_ptr, &list->meas_obj_list[i].meas_obj_id); - - // Meas Object Choice Extension - liblte_bits_2_value(ie_ptr, 1); - - // Meas Object Choice - list->meas_obj_list[i].meas_obj_type = (LIBLTE_RRC_MEAS_OBJECT_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 2); - - // Meas Object - if(LIBLTE_RRC_MEAS_OBJECT_TYPE_EUTRA == list->meas_obj_list[i].meas_obj_type) - { - liblte_rrc_unpack_meas_object_eutra_ie(ie_ptr, &list->meas_obj_list[i].meas_obj_eutra); - }else if(LIBLTE_RRC_MEAS_OBJECT_TYPE_UTRA == list->meas_obj_list[i].meas_obj_type){ - liblte_rrc_unpack_meas_object_utra_ie(ie_ptr, &list->meas_obj_list[i].meas_obj_utra); - }else if(LIBLTE_RRC_MEAS_OBJECT_TYPE_GERAN == list->meas_obj_list[i].meas_obj_type){ - liblte_rrc_unpack_meas_object_geran_ie(ie_ptr, &list->meas_obj_list[i].meas_obj_geran); - }else{ - liblte_rrc_unpack_meas_object_cdma2000_ie(ie_ptr, &list->meas_obj_list[i].meas_obj_cdma2000); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Object UTRA - - Description: Specifies information applicable for inter-RAT UTRA - neighboring cells - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_utra_ie(LIBLTE_RRC_MEAS_OBJECT_UTRA_STRUCT *meas_obj_utra, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(meas_obj_utra != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(meas_obj_utra->cells_to_remove_list_present, ie_ptr, 1); - liblte_value_2_bits(meas_obj_utra->cells_to_add_mod_list_present, ie_ptr, 1); - liblte_value_2_bits(meas_obj_utra->cells_for_which_to_rep_cgi_present, ie_ptr, 1); - - // Carrier Freq - liblte_rrc_pack_arfcn_value_utra_ie(meas_obj_utra->carrier_freq, ie_ptr); - - // Offset Freq - liblte_rrc_pack_q_offset_range_inter_rat_ie(meas_obj_utra->offset_freq, ie_ptr); - - // Cells To Remove List - if(meas_obj_utra->cells_to_remove_list_present) - { - liblte_rrc_pack_cell_index_list_ie(&meas_obj_utra->cells_to_remove_list, ie_ptr); - } - - // Cells To Add Mod List - if(meas_obj_utra->cells_to_add_mod_list_present) - { - // UTRA System Type - liblte_value_2_bits(meas_obj_utra->cells_to_add_mod_list.type, ie_ptr, 1); - - liblte_value_2_bits(meas_obj_utra->cells_to_add_mod_list.N_cells - 1, ie_ptr, 5); - for(i=0; icells_to_add_mod_list.N_cells; i++) - { - if(LIBLTE_RRC_UTRA_SYSTEM_TYPE_FDD == meas_obj_utra->cells_to_add_mod_list.type) - { - // Cell Index - liblte_value_2_bits(meas_obj_utra->cells_to_add_mod_list.cells_fdd[i].cell_idx - 1, ie_ptr, 5); - - // Phys Cell ID - liblte_rrc_pack_phys_cell_id_utra_fdd_ie(meas_obj_utra->cells_to_add_mod_list.cells_fdd[i].pci, ie_ptr); - }else{ - // Cell Index - liblte_value_2_bits(meas_obj_utra->cells_to_add_mod_list.cells_tdd[i].cell_idx - 1, ie_ptr, 5); - - // Phys Cell ID - liblte_rrc_pack_phys_cell_id_utra_tdd_ie(meas_obj_utra->cells_to_add_mod_list.cells_tdd[i].pci, ie_ptr); - } - } - } - - // Cells For Which To Report CGI - if(meas_obj_utra->cells_for_which_to_rep_cgi_present) - { - // UTRA System Type - liblte_value_2_bits(meas_obj_utra->cells_for_which_to_rep_cgi.type, ie_ptr, 1); - - if(LIBLTE_RRC_UTRA_SYSTEM_TYPE_FDD == meas_obj_utra->cells_for_which_to_rep_cgi.type) - { - // Phys Cell ID - liblte_rrc_pack_phys_cell_id_utra_fdd_ie(meas_obj_utra->cells_for_which_to_rep_cgi.pci_fdd, ie_ptr); - }else{ - // Phys Cell ID - liblte_rrc_pack_phys_cell_id_utra_tdd_ie(meas_obj_utra->cells_for_which_to_rep_cgi.pci_tdd, ie_ptr); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_object_utra_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_OBJECT_UTRA_STRUCT *meas_obj_utra) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - meas_obj_utra != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - meas_obj_utra->cells_to_remove_list_present = liblte_bits_2_value(ie_ptr, 1); - meas_obj_utra->cells_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - meas_obj_utra->cells_for_which_to_rep_cgi_present = liblte_bits_2_value(ie_ptr, 1); - - // Carrier Freq - liblte_rrc_unpack_arfcn_value_utra_ie(ie_ptr, &meas_obj_utra->carrier_freq); - - // Offset Freq - liblte_rrc_unpack_q_offset_range_inter_rat_ie(ie_ptr, &meas_obj_utra->offset_freq); - - // Cells To Remove List - if(meas_obj_utra->cells_to_remove_list_present) - { - liblte_rrc_unpack_cell_index_list_ie(ie_ptr, &meas_obj_utra->cells_to_remove_list); - } - - // Cells To Add Mod List - if(meas_obj_utra->cells_to_add_mod_list_present) - { - // UTRA System Type - meas_obj_utra->cells_to_add_mod_list.type = (LIBLTE_RRC_UTRA_SYSTEM_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - - meas_obj_utra->cells_to_add_mod_list.N_cells = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; icells_to_add_mod_list.N_cells; i++) - { - if(LIBLTE_RRC_UTRA_SYSTEM_TYPE_FDD == meas_obj_utra->cells_to_add_mod_list.type) - { - // Cell Index - meas_obj_utra->cells_to_add_mod_list.cells_fdd[i].cell_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - - // Phys Cell ID - liblte_rrc_unpack_phys_cell_id_utra_fdd_ie(ie_ptr, &meas_obj_utra->cells_to_add_mod_list.cells_fdd[i].pci); - }else{ - // Cell Index - meas_obj_utra->cells_to_add_mod_list.cells_tdd[i].cell_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - - // Phys Cell ID - liblte_rrc_unpack_phys_cell_id_utra_tdd_ie(ie_ptr, &meas_obj_utra->cells_to_add_mod_list.cells_tdd[i].pci); - } - } - } - - // Cells For Which To Report CGI - if(meas_obj_utra->cells_for_which_to_rep_cgi_present) - { - // UTRA System Type - meas_obj_utra->cells_for_which_to_rep_cgi.type = (LIBLTE_RRC_UTRA_SYSTEM_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - - if(LIBLTE_RRC_UTRA_SYSTEM_TYPE_FDD == meas_obj_utra->cells_for_which_to_rep_cgi.type) - { - // Phys Cell ID - liblte_rrc_unpack_phys_cell_id_utra_fdd_ie(ie_ptr, &meas_obj_utra->cells_for_which_to_rep_cgi.pci_fdd); - }else{ - // Phys Cell ID - liblte_rrc_unpack_phys_cell_id_utra_tdd_ie(ie_ptr, &meas_obj_utra->cells_for_which_to_rep_cgi.pci_tdd); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Meas Results - - Description: Covers measured results for intra-frequency, - inter-frequency and inter-RAT mobility - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: Quantity Config - - Description: Specifies the measurement quantities and layer 3 - filtering coefficients for E-UTRA and inter-RAT - measurements - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_quantity_config_ie(LIBLTE_RRC_QUANTITY_CONFIG_STRUCT *qc, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(qc != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(qc->qc_eutra_present, ie_ptr, 1); - liblte_value_2_bits(qc->qc_utra_present, ie_ptr, 1); - liblte_value_2_bits(qc->qc_geran_present, ie_ptr, 1); - liblte_value_2_bits(qc->qc_cdma2000_present, ie_ptr, 1); - - // Quality Config EUTRA - if(qc->qc_eutra_present) - { - liblte_rrc_pack_filter_coefficient_ie(qc->qc_eutra.fc_rsrp, ie_ptr); - liblte_rrc_pack_filter_coefficient_ie(qc->qc_eutra.fc_rsrq, ie_ptr); - } - - // Quality Config UTRA - if(qc->qc_utra_present) - { - liblte_value_2_bits(qc->qc_utra.mq_fdd, ie_ptr, 1); - liblte_value_2_bits(qc->qc_utra.mq_tdd, ie_ptr, 1); - liblte_rrc_pack_filter_coefficient_ie(qc->qc_utra.fc, ie_ptr); - } - - // Quality Config GERAN - if(qc->qc_geran_present) - { - liblte_value_2_bits(qc->qc_geran.mq, ie_ptr, 1); - liblte_rrc_pack_filter_coefficient_ie(qc->qc_geran.fc, ie_ptr); - } - - // Quality Config CDMA2000 - if(qc->qc_cdma2000_present) - { - liblte_value_2_bits(qc->qc_cdma2000.mq, ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_quantity_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_QUANTITY_CONFIG_STRUCT *qc) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - qc != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - qc->qc_eutra_present = liblte_bits_2_value(ie_ptr, 1); - qc->qc_utra_present = liblte_bits_2_value(ie_ptr, 1); - qc->qc_geran_present = liblte_bits_2_value(ie_ptr, 1); - qc->qc_cdma2000_present = liblte_bits_2_value(ie_ptr, 1); - - // Quantity Config EUTRA - if(qc->qc_eutra_present) - { - qc->qc_eutra.fc_rsrp_not_default = liblte_bits_2_value(ie_ptr, 1); - qc->qc_eutra.fc_rsrq_not_default = liblte_bits_2_value(ie_ptr, 1); - if(qc->qc_eutra.fc_rsrp_not_default) { - liblte_rrc_unpack_filter_coefficient_ie(ie_ptr, &qc->qc_eutra.fc_rsrp); - } - if(qc->qc_eutra.fc_rsrq_not_default) { - liblte_rrc_unpack_filter_coefficient_ie(ie_ptr, &qc->qc_eutra.fc_rsrq); - } - } - - // Quantity Config UTRA - if(qc->qc_utra_present) - { - qc->qc_utra.fc_not_default = liblte_bits_2_value(ie_ptr, 1); - qc->qc_utra.mq_fdd = (LIBLTE_RRC_MEAS_QUANTITY_UTRA_FDD_ENUM)liblte_bits_2_value(ie_ptr, 1); - qc->qc_utra.mq_tdd = LIBLTE_RRC_MEAS_QUANTITY_UTRA_TDD_PCCPCH_RSCP; - if(qc->qc_utra.fc_not_default) { - liblte_rrc_unpack_filter_coefficient_ie(ie_ptr, &qc->qc_utra.fc); - } - } - - // Quantity Config GERAN - if(qc->qc_geran_present) - { - qc->qc_geran.fc_not_default = liblte_bits_2_value(ie_ptr, 1); - qc->qc_geran.mq = LIBLTE_RRC_MEAS_QUANTITY_GERAN_RSSI; - if(qc->qc_geran.fc_not_default) { - liblte_rrc_unpack_filter_coefficient_ie(ie_ptr, &qc->qc_geran.fc); - } - } - - // Quality Config CDMA2000 - if(qc->qc_cdma2000_present) - { - qc->qc_cdma2000.mq = (LIBLTE_RRC_MEAS_QUANTITY_CDMA2000_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Report Config EUTRA - - Description: Specifies criteria for triggering of an E-UTRA - measurement reporting event - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_eutra_ie(LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT *rep_cnfg_eutra, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rep_cnfg_eutra != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Trigger Type - liblte_value_2_bits(rep_cnfg_eutra->trigger_type, ie_ptr, 1); - if(LIBLTE_RRC_TRIGGER_TYPE_EUTRA_EVENT == rep_cnfg_eutra->trigger_type) - { - // Event ID choice extension indicator - liblte_value_2_bits(0, ie_ptr, 1); // Choice with extension - unlikely to be >63 choices - - // Event ID - liblte_value_2_bits(rep_cnfg_eutra->event.event_id, ie_ptr, 3); - if(LIBLTE_RRC_EVENT_ID_EUTRA_A1 == rep_cnfg_eutra->event.event_id) - { - // Threshold Type - liblte_value_2_bits(rep_cnfg_eutra->event.event_a1.eutra.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a1.eutra.type) - { - liblte_rrc_pack_rsrp_range_ie(rep_cnfg_eutra->event.event_a1.eutra.range, ie_ptr); - }else{ - liblte_rrc_pack_rsrq_range_ie(rep_cnfg_eutra->event.event_a1.eutra.range, ie_ptr); - } - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A2 == rep_cnfg_eutra->event.event_id){ - // Threshold Type - liblte_value_2_bits(rep_cnfg_eutra->event.event_a2.eutra.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a2.eutra.type) - { - liblte_rrc_pack_rsrp_range_ie(rep_cnfg_eutra->event.event_a2.eutra.range, ie_ptr); - }else{ - liblte_rrc_pack_rsrq_range_ie(rep_cnfg_eutra->event.event_a2.eutra.range, ie_ptr); - } - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A3 == rep_cnfg_eutra->event.event_id){ - // Offset - liblte_value_2_bits(rep_cnfg_eutra->event.event_a3.offset + 30, ie_ptr, 6); - - // Report On Leave - liblte_value_2_bits(rep_cnfg_eutra->event.event_a3.report_on_leave, ie_ptr, 1); - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A4 == rep_cnfg_eutra->event.event_id){ - // Threshold Type - liblte_value_2_bits(rep_cnfg_eutra->event.event_a4.eutra.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a4.eutra.type) - { - liblte_rrc_pack_rsrp_range_ie(rep_cnfg_eutra->event.event_a4.eutra.range, ie_ptr); - }else{ - liblte_rrc_pack_rsrq_range_ie(rep_cnfg_eutra->event.event_a4.eutra.range, ie_ptr); - } - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A5 == rep_cnfg_eutra->event.event_id){ - // Threshold1 Type - liblte_value_2_bits(rep_cnfg_eutra->event.event_a5.eutra1.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a5.eutra1.type) - { - liblte_rrc_pack_rsrp_range_ie(rep_cnfg_eutra->event.event_a5.eutra1.range, ie_ptr); - }else{ - liblte_rrc_pack_rsrq_range_ie(rep_cnfg_eutra->event.event_a5.eutra1.range, ie_ptr); - } - - // Threshold2 Type - liblte_value_2_bits(rep_cnfg_eutra->event.event_a5.eutra2.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a5.eutra2.type) - { - liblte_rrc_pack_rsrp_range_ie(rep_cnfg_eutra->event.event_a5.eutra2.range, ie_ptr); - }else{ - liblte_rrc_pack_rsrq_range_ie(rep_cnfg_eutra->event.event_a5.eutra2.range, ie_ptr); - } - }else{ - // Offset - liblte_value_2_bits(rep_cnfg_eutra->event.event_a6.offset + 30, ie_ptr, 6); - - // Report On Leave - liblte_value_2_bits(rep_cnfg_eutra->event.event_a6.report_on_leave, ie_ptr, 1); - } - - // Hysteresis - liblte_rrc_pack_hysteresis_ie(rep_cnfg_eutra->event.hysteresis, ie_ptr); - - // Time To Trigger - liblte_rrc_pack_time_to_trigger_ie(rep_cnfg_eutra->event.time_to_trigger, ie_ptr); - }else{ - // Purpose - liblte_value_2_bits(rep_cnfg_eutra->periodical.purpose, ie_ptr, 1); - } - - // Trigger Quantity - liblte_value_2_bits(rep_cnfg_eutra->trigger_quantity, ie_ptr, 1); - - // Report Quantity - liblte_value_2_bits(rep_cnfg_eutra->report_quantity, ie_ptr, 1); - - // Max Report Cells - liblte_value_2_bits(rep_cnfg_eutra->max_report_cells - 1, ie_ptr, 3); - - // Report Interval - liblte_rrc_pack_report_interval_ie(rep_cnfg_eutra->report_interval, ie_ptr); - - // Report Amount - liblte_value_2_bits(rep_cnfg_eutra->report_amount, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT *rep_cnfg_eutra) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rep_cnfg_eutra != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Trigger Type - rep_cnfg_eutra->trigger_type = (LIBLTE_RRC_TRIGGER_TYPE_EUTRA_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_TRIGGER_TYPE_EUTRA_EVENT == rep_cnfg_eutra->trigger_type) - { - // Event ID choice extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Event ID - rep_cnfg_eutra->event.event_id = (LIBLTE_RRC_EVENT_ID_EUTRA_ENUM)liblte_bits_2_value(ie_ptr, 3); - - if(LIBLTE_RRC_EVENT_ID_EUTRA_A1 == rep_cnfg_eutra->event.event_id) - { - // Threshold Type - rep_cnfg_eutra->event.event_a1.eutra.type = (LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a1.eutra.type) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a1.eutra.range); - }else{ - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a1.eutra.range); - } - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A2 == rep_cnfg_eutra->event.event_id){ - // Threshold Type - rep_cnfg_eutra->event.event_a2.eutra.type = (LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a2.eutra.type) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a2.eutra.range); - }else{ - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a2.eutra.range); - } - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A3 == rep_cnfg_eutra->event.event_id){ - // Offset - rep_cnfg_eutra->event.event_a3.offset = liblte_bits_2_value(ie_ptr, 6) - 30; - - // Report On Leave - rep_cnfg_eutra->event.event_a3.report_on_leave = liblte_bits_2_value(ie_ptr, 1); - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A4 == rep_cnfg_eutra->event.event_id){ - // Threshold Type - rep_cnfg_eutra->event.event_a4.eutra.type = (LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a4.eutra.type) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a4.eutra.range); - }else{ - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a4.eutra.range); - } - }else if(LIBLTE_RRC_EVENT_ID_EUTRA_A5 == rep_cnfg_eutra->event.event_id){ - // Threshold1 Type - rep_cnfg_eutra->event.event_a5.eutra1.type = (LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a5.eutra1.type) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a5.eutra1.range); - }else{ - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a5.eutra1.range); - } - - // Threshold2 Type - rep_cnfg_eutra->event.event_a5.eutra2.type = (LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_eutra->event.event_a5.eutra2.type) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a5.eutra2.range); - }else{ - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &rep_cnfg_eutra->event.event_a5.eutra2.range); - } - }else{ - // Offset - rep_cnfg_eutra->event.event_a6.offset = liblte_bits_2_value(ie_ptr, 6) - 30; - - // Report On Leave - rep_cnfg_eutra->event.event_a6.report_on_leave = liblte_bits_2_value(ie_ptr, 1); - } - - // Hysteresis - liblte_rrc_unpack_hysteresis_ie(ie_ptr, &rep_cnfg_eutra->event.hysteresis); - - // Time To Trigger - liblte_rrc_unpack_time_to_trigger_ie(ie_ptr, &rep_cnfg_eutra->event.time_to_trigger); - }else{ - // Purpose - rep_cnfg_eutra->periodical.purpose = (LIBLTE_RRC_PURPOSE_EUTRA_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - // Trigger Quantity - rep_cnfg_eutra->trigger_quantity = (LIBLTE_RRC_TRIGGER_QUANTITY_ENUM)liblte_bits_2_value(ie_ptr, 1); - - // Report Quantity - rep_cnfg_eutra->report_quantity = (LIBLTE_RRC_REPORT_QUANTITY_ENUM)liblte_bits_2_value(ie_ptr, 1); - - // Max Report Cells - rep_cnfg_eutra->max_report_cells = liblte_bits_2_value(ie_ptr, 3) + 1; - - // Report Interval - liblte_rrc_unpack_report_interval_ie(ie_ptr, &rep_cnfg_eutra->report_interval); - - // Report Amount - rep_cnfg_eutra->report_amount = (LIBLTE_RRC_REPORT_AMOUNT_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Report Config ID - - Description: Identifies a measurement reporting configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_id_ie(uint8 report_cnfg_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(report_cnfg_id - 1, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_id_ie(uint8 **ie_ptr, - uint8 *report_cnfg_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - report_cnfg_id != NULL) - { - *report_cnfg_id = liblte_bits_2_value(ie_ptr, 5) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Report Config Inter RAT - - Description: Specifies criteria for triggering of an inter-RAT - measurement reporting event - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_inter_rat_ie(LIBLTE_RRC_REPORT_CONFIG_INTER_RAT_STRUCT *rep_cnfg_inter_rat, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rep_cnfg_inter_rat != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Trigger Type - liblte_value_2_bits(rep_cnfg_inter_rat->trigger_type, ie_ptr, 1); - if(LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_EVENT == rep_cnfg_inter_rat->trigger_type) - { - // Event ID - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_id, ie_ptr, 1); - if(LIBLTE_RRC_EVENT_ID_INTER_RAT_B1 == rep_cnfg_inter_rat->event.event_id) - { - // Threshold Type - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b1.type, ie_ptr, 2); - if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_UTRA == rep_cnfg_inter_rat->event.event_b1.type) - { - // Type - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b1.utra.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_UTRA_TYPE_RSCP == rep_cnfg_inter_rat->event.event_b1.utra.type) - { - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b1.utra.value + 5, ie_ptr, 7); - }else{ - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b1.utra.value, ie_ptr, 6); - } - }else if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_GERAN == rep_cnfg_inter_rat->event.event_b1.type){ - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b1.geran, ie_ptr, 6); - }else{ - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b1.cdma2000, ie_ptr, 6); - } - }else{ - // Threshold1 Type - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.eutra.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_inter_rat->event.event_b2.eutra.type) - { - liblte_rrc_pack_rsrp_range_ie(rep_cnfg_inter_rat->event.event_b2.eutra.range, ie_ptr); - }else{ - liblte_rrc_pack_rsrq_range_ie(rep_cnfg_inter_rat->event.event_b2.eutra.range, ie_ptr); - } - - // Threshold2 Type - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.type2, ie_ptr, 2); - if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_UTRA == rep_cnfg_inter_rat->event.event_b2.type2) - { - // Type - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.utra.type, ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_UTRA_TYPE_RSCP == rep_cnfg_inter_rat->event.event_b2.utra.type) - { - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.utra.value + 5, ie_ptr, 7); - }else{ - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.utra.value, ie_ptr, 6); - } - }else if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_GERAN == rep_cnfg_inter_rat->event.event_b2.type2){ - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.geran, ie_ptr, 6); - }else{ - liblte_value_2_bits(rep_cnfg_inter_rat->event.event_b2.cdma2000, ie_ptr, 6); - } - } - - // Hysteresis - liblte_rrc_pack_hysteresis_ie(rep_cnfg_inter_rat->event.hysteresis, ie_ptr); - - // Time To Trigger - liblte_rrc_pack_time_to_trigger_ie(rep_cnfg_inter_rat->event.time_to_trigger, ie_ptr); - }else{ - // Purpose - liblte_value_2_bits(rep_cnfg_inter_rat->periodical.purpose, ie_ptr, 2); - } - - // Max Report Cells - liblte_value_2_bits(rep_cnfg_inter_rat->max_report_cells - 1, ie_ptr, 3); - - // Report Interval - liblte_rrc_pack_report_interval_ie(rep_cnfg_inter_rat->report_interval, ie_ptr); - - // Report Amount - liblte_value_2_bits(rep_cnfg_inter_rat->report_amount, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_inter_rat_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_CONFIG_INTER_RAT_STRUCT *rep_cnfg_inter_rat) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rep_cnfg_inter_rat != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Trigger Type - rep_cnfg_inter_rat->trigger_type = (LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_TRIGGER_TYPE_INTER_RAT_EVENT == rep_cnfg_inter_rat->trigger_type) - { - // Event ID - rep_cnfg_inter_rat->event.event_id = (LIBLTE_RRC_EVENT_ID_INTER_RAT_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_EVENT_ID_INTER_RAT_B1 == rep_cnfg_inter_rat->event.event_id) - { - // Threshold Type - rep_cnfg_inter_rat->event.event_b1.type = (LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 2); - if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_UTRA == rep_cnfg_inter_rat->event.event_b1.type) - { - // Type - rep_cnfg_inter_rat->event.event_b1.utra.type = (LIBLTE_RRC_THRESHOLD_UTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_UTRA_TYPE_RSCP == rep_cnfg_inter_rat->event.event_b1.utra.type) - { - rep_cnfg_inter_rat->event.event_b1.utra.value = liblte_bits_2_value(ie_ptr, 7) - 5; - }else{ - rep_cnfg_inter_rat->event.event_b1.utra.value = liblte_bits_2_value(ie_ptr, 6); - } - }else if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_GERAN == rep_cnfg_inter_rat->event.event_b1.type){ - rep_cnfg_inter_rat->event.event_b1.geran = liblte_bits_2_value(ie_ptr, 6); - }else{ - rep_cnfg_inter_rat->event.event_b1.cdma2000 = liblte_bits_2_value(ie_ptr, 6); - } - }else{ - // Threshold1 Type - rep_cnfg_inter_rat->event.event_b2.eutra.type = (LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_EUTRA_TYPE_RSRP == rep_cnfg_inter_rat->event.event_b2.eutra.type) - { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &rep_cnfg_inter_rat->event.event_b2.eutra.range); - }else{ - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &rep_cnfg_inter_rat->event.event_b2.eutra.range); - } - - // Threshold2 Type - rep_cnfg_inter_rat->event.event_b2.type2 = (LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 2); - if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_UTRA == rep_cnfg_inter_rat->event.event_b2.type2) - { - // Type - rep_cnfg_inter_rat->event.event_b2.utra.type = (LIBLTE_RRC_THRESHOLD_UTRA_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_THRESHOLD_UTRA_TYPE_RSCP == rep_cnfg_inter_rat->event.event_b2.utra.type) - { - rep_cnfg_inter_rat->event.event_b2.utra.value = liblte_bits_2_value(ie_ptr, 7) - 5; - }else{ - rep_cnfg_inter_rat->event.event_b2.utra.value = liblte_bits_2_value(ie_ptr, 6); - } - }else if(LIBLTE_RRC_THRESHOLD_INTER_RAT_TYPE_GERAN == rep_cnfg_inter_rat->event.event_b2.type2){ - rep_cnfg_inter_rat->event.event_b2.geran = liblte_bits_2_value(ie_ptr, 6); - }else{ - rep_cnfg_inter_rat->event.event_b2.cdma2000 = liblte_bits_2_value(ie_ptr, 6); - } - } - - // Hysteresis - liblte_rrc_unpack_hysteresis_ie(ie_ptr, &rep_cnfg_inter_rat->event.hysteresis); - - // Time To Trigger - liblte_rrc_unpack_time_to_trigger_ie(ie_ptr, &rep_cnfg_inter_rat->event.time_to_trigger); - }else{ - // Purpose - rep_cnfg_inter_rat->periodical.purpose = (LIBLTE_RRC_PURPOSE_INTER_RAT_ENUM)liblte_bits_2_value(ie_ptr, 2); - } - - // Max Report Cells - rep_cnfg_inter_rat->max_report_cells = liblte_bits_2_value(ie_ptr, 3) + 1; - - // Report Interval - liblte_rrc_unpack_report_interval_ie(ie_ptr, &rep_cnfg_inter_rat->report_interval); - - // Report Amount - rep_cnfg_inter_rat->report_amount = (LIBLTE_RRC_REPORT_AMOUNT_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Report Config To Add Mod List - - Description: Concerns a list of reporting configurations to add - or modify - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_config_to_add_mod_list_ie(LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT *list, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(list != NULL && - ie_ptr != NULL) - { - // List Size - liblte_value_2_bits(list->N_rep_cnfg - 1, ie_ptr, 5); - - for(i=0; iN_rep_cnfg; i++) - { - // Report Config ID - liblte_rrc_pack_report_config_id_ie(list->rep_cnfg_list[i].rep_cnfg_id, ie_ptr); - - // Report Config Choice - liblte_value_2_bits(list->rep_cnfg_list[i].rep_cnfg_type, ie_ptr, 1); - - if(LIBLTE_RRC_REPORT_CONFIG_TYPE_EUTRA == list->rep_cnfg_list[i].rep_cnfg_type) - { - liblte_rrc_pack_report_config_eutra_ie(&list->rep_cnfg_list[i].rep_cnfg_eutra, ie_ptr); - }else{ - liblte_rrc_pack_report_config_inter_rat_ie(&list->rep_cnfg_list[i].rep_cnfg_inter_rat, ie_ptr); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_config_to_add_mod_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_CONFIG_TO_ADD_MOD_LIST_STRUCT *list) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - list != NULL) - { - // List Size - list->N_rep_cnfg = liblte_bits_2_value(ie_ptr, 5) + 1; - - for(i=0; iN_rep_cnfg; i++) - { - // Report Config ID - liblte_rrc_unpack_report_config_id_ie(ie_ptr, &list->rep_cnfg_list[i].rep_cnfg_id); - - // Report Config Choice - list->rep_cnfg_list[i].rep_cnfg_type = (LIBLTE_RRC_REPORT_CONFIG_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - - if(LIBLTE_RRC_REPORT_CONFIG_TYPE_EUTRA == list->rep_cnfg_list[i].rep_cnfg_type) - { - liblte_rrc_unpack_report_config_eutra_ie(ie_ptr, &list->rep_cnfg_list[i].rep_cnfg_eutra); - }else{ - liblte_rrc_unpack_report_config_inter_rat_ie(ie_ptr, &list->rep_cnfg_list[i].rep_cnfg_inter_rat); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Report Interval - - Description: Indicates the interval between periodic reports - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_report_interval_ie(LIBLTE_RRC_REPORT_INTERVAL_ENUM report_int, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(report_int, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_report_interval_ie(uint8 **ie_ptr, - LIBLTE_RRC_REPORT_INTERVAL_ENUM *report_int) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - report_int != NULL) - { - *report_int = (LIBLTE_RRC_REPORT_INTERVAL_ENUM)liblte_bits_2_value(ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RSRP Range - - Description: Specifies the value range used in RSRP measurements - and thresholds - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rsrp_range_ie(uint8 rsrp_range, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(rsrp_range, ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rsrp_range_ie(uint8 **ie_ptr, - uint8 *rsrp_range) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rsrp_range != NULL) - { - *rsrp_range = liblte_bits_2_value(ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RSRQ Range - - Description: Specifies the value range used in RSRQ measurements - and thresholds - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rsrq_range_ie(uint8 rsrq_range, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(rsrq_range, ie_ptr, 6); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rsrq_range_ie(uint8 **ie_ptr, - uint8 *rsrq_range) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rsrq_range != NULL) - { - *rsrq_range = liblte_bits_2_value(ie_ptr, 6); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Time To Trigger - - Description: Specifies the value range used for the time to - trigger parameter, which concerns the time during - which specific criteria for the event needs to be - met in order to trigger a measurement report - - Document Reference: 36.331 v10.0.0 Section 6.3.5 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_time_to_trigger_ie(LIBLTE_RRC_TIME_TO_TRIGGER_ENUM time_to_trigger, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(time_to_trigger, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_time_to_trigger_ie(uint8 **ie_ptr, - LIBLTE_RRC_TIME_TO_TRIGGER_ENUM *time_to_trigger) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - time_to_trigger != NULL) - { - *time_to_trigger = (LIBLTE_RRC_TIME_TO_TRIGGER_ENUM)liblte_bits_2_value(ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Additional Spectrum Emission - - Description: FIXME - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_additional_spectrum_emission_ie(uint8 add_spect_em, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(add_spect_em - 1, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_additional_spectrum_emission_ie(uint8 **ie_ptr, - uint8 *add_spect_em) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - add_spect_em != NULL) - { - *add_spect_em = liblte_bits_2_value(ie_ptr, 5) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: ARFCN value CDMA2000 - - Description: Indicates the CDMA2000 carrier frequency within - a CDMA2000 band - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_cdma2000_ie(uint16 arfcn, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(arfcn, ie_ptr, 11); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_cdma2000_ie(uint8 **ie_ptr, - uint16 *arfcn) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - arfcn != NULL) - { - *arfcn = liblte_bits_2_value(ie_ptr, 11); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: ARFCN value EUTRA - - Description: Indicates the ARFCN applicable for a downlink, - uplink, or bi-directional (TDD) E-UTRA carrier - frequency - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_eutra_ie(uint16 arfcn, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(arfcn, ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_eutra_ie(uint8 **ie_ptr, - uint16 *arfcn) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - arfcn != NULL) - { - *arfcn = liblte_bits_2_value(ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: ARFCN value GERAN - - Description: Specifies the ARFCN value applicable for a GERAN - BCCH carrier frequency - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_geran_ie(uint16 arfcn, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(arfcn, ie_ptr, 10); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_geran_ie(uint8 **ie_ptr, - uint16 *arfcn) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - arfcn != NULL) - { - *arfcn = liblte_bits_2_value(ie_ptr, 10); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: ARFCN value UTRA - - Description: Indicates the ARFCN applicable for a downlink (Nd, - FDD) or bi-directional (Nt, TDD) UTRA carrier - frequency - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_arfcn_value_utra_ie(uint16 arfcn, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(arfcn, ie_ptr, 14); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_arfcn_value_utra_ie(uint8 **ie_ptr, - uint16 *arfcn) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - arfcn != NULL) - { - *arfcn = liblte_bits_2_value(ie_ptr, 14); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Band Class CDMA2000 - - Description: Defines the CDMA2000 band in which the CDMA2000 - carrier frequency can be found - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_band_class_cdma2000_ie(LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM bc_cdma2000, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(bc_cdma2000, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_band_class_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM *bc_cdma2000) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - bc_cdma2000 != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - *bc_cdma2000 = (LIBLTE_RRC_BAND_CLASS_CDMA2000_ENUM)liblte_bits_2_value(ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Band Indicator GERAN - - Description: Indicates how to interpret an associated GERAN - carrier ARFCN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_band_indicator_geran_ie(LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM bi_geran, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(bi_geran, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_band_indicator_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM *bi_geran) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - bi_geran != NULL) - { - *bi_geran = (LIBLTE_RRC_BAND_INDICATOR_GERAN_ENUM)liblte_bits_2_value(ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Carrier Freq CDMA2000 - - Description: Provides the CDMA2000 carrier information - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_carrier_freq_cdma2000_ie(LIBLTE_RRC_CARRIER_FREQ_CDMA2000_STRUCT *carrier_freq, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(carrier_freq != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_band_class_cdma2000_ie(carrier_freq->bandclass, ie_ptr); - liblte_rrc_pack_arfcn_value_cdma2000_ie(carrier_freq->arfcn, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_carrier_freq_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_CARRIER_FREQ_CDMA2000_STRUCT *carrier_freq) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - carrier_freq != NULL) - { - liblte_rrc_unpack_band_class_cdma2000_ie(ie_ptr, &carrier_freq->bandclass); - liblte_rrc_unpack_arfcn_value_cdma2000_ie(ie_ptr, &carrier_freq->arfcn); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Carrier Freq GERAN - - Description: Provides an unambiguous carrier frequency description - of a GERAN cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_carrier_freq_geran_ie(LIBLTE_RRC_CARRIER_FREQ_GERAN_STRUCT *carrier_freq, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(carrier_freq != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_arfcn_value_geran_ie(carrier_freq->arfcn, ie_ptr); - liblte_rrc_pack_band_indicator_geran_ie(carrier_freq->band_indicator, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_carrier_freq_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_CARRIER_FREQ_GERAN_STRUCT *carrier_freq) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - carrier_freq != NULL) - { - liblte_rrc_unpack_arfcn_value_geran_ie(ie_ptr, &carrier_freq->arfcn); - liblte_rrc_unpack_band_indicator_geran_ie(ie_ptr, &carrier_freq->band_indicator); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Carrier Freqs GERAN - - Description: Provides one or more GERAN ARFCN values, which - represent a list of GERAN BCCH carrier frequencies - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_carrier_freqs_geran_ie(LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT *carrier_freqs, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(carrier_freqs != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_arfcn_value_geran_ie(carrier_freqs->starting_arfcn, ie_ptr); - liblte_rrc_pack_band_indicator_geran_ie(carrier_freqs->band_indicator, ie_ptr); - liblte_value_2_bits(carrier_freqs->following_arfcns, ie_ptr, 2); - if(LIBLTE_RRC_FOLLOWING_ARFCNS_EXPLICIT_LIST == carrier_freqs->following_arfcns) - { - liblte_value_2_bits(carrier_freqs->explicit_list_of_arfcns_size, ie_ptr, 5); - for(i=0; iexplicit_list_of_arfcns_size; i++) - { - liblte_rrc_pack_arfcn_value_geran_ie(carrier_freqs->explicit_list_of_arfcns[i], ie_ptr); - } - }else if(LIBLTE_RRC_FOLLOWING_ARFCNS_EQUALLY_SPACED == carrier_freqs->following_arfcns){ - liblte_value_2_bits(carrier_freqs->equally_spaced_arfcns.arfcn_spacing - 1, ie_ptr, 3); - liblte_value_2_bits(carrier_freqs->equally_spaced_arfcns.number_of_arfcns, ie_ptr, 5); - }else{ // LIBLTE_RRC_FOLLOWING_ARFCNS_VARIABLE_BIT_MAP == carrier_freqs->following_arfcns - liblte_value_2_bits(carrier_freqs->variable_bit_map_of_arfcns, ie_ptr, 16); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_carrier_freqs_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_CARRIER_FREQS_GERAN_STRUCT *carrier_freqs) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - carrier_freqs != NULL) - { - liblte_rrc_unpack_arfcn_value_geran_ie(ie_ptr, &carrier_freqs->starting_arfcn); - liblte_rrc_unpack_band_indicator_geran_ie(ie_ptr, &carrier_freqs->band_indicator); - carrier_freqs->following_arfcns = (LIBLTE_RRC_FOLLOWING_ARFCNS_ENUM)liblte_bits_2_value(ie_ptr, 2); - if(LIBLTE_RRC_FOLLOWING_ARFCNS_EXPLICIT_LIST == carrier_freqs->following_arfcns) - { - carrier_freqs->explicit_list_of_arfcns_size = liblte_bits_2_value(ie_ptr, 5); - for(i=0; iexplicit_list_of_arfcns_size; i++) - { - liblte_rrc_unpack_arfcn_value_geran_ie(ie_ptr, &carrier_freqs->explicit_list_of_arfcns[i]); - } - }else if(LIBLTE_RRC_FOLLOWING_ARFCNS_EQUALLY_SPACED == carrier_freqs->following_arfcns){ - carrier_freqs->equally_spaced_arfcns.arfcn_spacing = liblte_bits_2_value(ie_ptr, 3) + 1; - carrier_freqs->equally_spaced_arfcns.number_of_arfcns = liblte_bits_2_value(ie_ptr, 5); - }else{ // LIBLTE_RRC_FOLLOWING_ARFCNS_VARIABLE_BIT_MAP == carrier_freqs->following_arfcns - carrier_freqs->variable_bit_map_of_arfcns = liblte_bits_2_value(ie_ptr, 16); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: CDMA2000 Type - - Description: Describes the type of CDMA2000 network - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cdma2000_type_ie(LIBLTE_RRC_CDMA2000_TYPE_ENUM cdma2000_type, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(cdma2000_type, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cdma2000_type_ie(uint8 **ie_ptr, - LIBLTE_RRC_CDMA2000_TYPE_ENUM *cdma2000_type) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cdma2000_type != NULL) - { - *cdma2000_type = (LIBLTE_RRC_CDMA2000_TYPE_ENUM)liblte_bits_2_value(ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Identity - - Description: Unambiguously identifies a cell within a PLMN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_identity_ie(uint32 cell_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(cell_id, ie_ptr, 28); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_identity_ie(uint8 **ie_ptr, - uint32 *cell_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cell_id != NULL) - { - *cell_id = liblte_bits_2_value(ie_ptr, 28); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Index List - - Description: Concerns a list of cell indecies, which may be used - for different purposes - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_index_list_ie(LIBLTE_RRC_CELL_INDEX_LIST_STRUCT *cell_idx_list, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(cell_idx_list != NULL && - ie_ptr != NULL) - { - // List Size - liblte_value_2_bits(cell_idx_list->N_cell_idx - 1, ie_ptr, 5); - - for(i=0; iN_cell_idx; i++) - { - // Cell Index - liblte_value_2_bits(cell_idx_list->cell_idx[i] - 1, ie_ptr, 5); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_index_list_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_INDEX_LIST_STRUCT *cell_idx_list) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - cell_idx_list != NULL) - { - // List Size - cell_idx_list->N_cell_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - - for(i=0; iN_cell_idx; i++) - { - // Cell Index - cell_idx_list->cell_idx[i] = liblte_bits_2_value(ie_ptr, 5) + 1; - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Reselection Priority - - Description: Contains the absolute priority of the concerned - carrier frequency/set of frequencies (GERAN)/ - bandclass (CDMA2000), as used by the cell - reselection procedure - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_reselection_priority_ie(uint8 cell_resel_prio, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(cell_resel_prio, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_reselection_priority_ie(uint8 **ie_ptr, - uint8 *cell_resel_prio) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cell_resel_prio != NULL) - { - *cell_resel_prio = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: CSFB Registration Param 1xRTT - - Description: Indicates whether or not the UE shall perform a - CDMA2000 1xRTT pre-registration if the UE does not - have a valid/current pre-registration - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_registration_param_1xrtt_ie(LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_STRUCT *csfb_reg_param, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(csfb_reg_param != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(csfb_reg_param->sid, ie_ptr, 15); - liblte_value_2_bits(csfb_reg_param->nid, ie_ptr, 16); - liblte_value_2_bits(csfb_reg_param->multiple_sid, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->multiple_nid, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->home_reg, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->foreign_sid_reg, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->foreign_nid_reg, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->param_reg, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->power_up_reg, ie_ptr, 1); - liblte_value_2_bits(csfb_reg_param->reg_period, ie_ptr, 7); - liblte_value_2_bits(csfb_reg_param->reg_zone, ie_ptr, 12); - liblte_value_2_bits(csfb_reg_param->total_zone, ie_ptr, 3); - liblte_value_2_bits(csfb_reg_param->zone_timer, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_registration_param_1xrtt_ie(uint8 **ie_ptr, - LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_STRUCT *csfb_reg_param) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - csfb_reg_param != NULL) - { - csfb_reg_param->sid = liblte_bits_2_value(ie_ptr, 15); - csfb_reg_param->nid = liblte_bits_2_value(ie_ptr, 16); - csfb_reg_param->multiple_sid = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->multiple_nid = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->home_reg = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->foreign_sid_reg = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->foreign_nid_reg = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->param_reg = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->power_up_reg = liblte_bits_2_value(ie_ptr, 1); - csfb_reg_param->reg_period = liblte_bits_2_value(ie_ptr, 7); - csfb_reg_param->reg_zone = liblte_bits_2_value(ie_ptr, 12); - csfb_reg_param->total_zone = liblte_bits_2_value(ie_ptr, 3); - csfb_reg_param->zone_timer = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_registration_param_1xrtt_v920_ie(LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_V920_STRUCT *csfb_reg_param, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(csfb_reg_param != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(csfb_reg_param->power_down_reg, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_registration_param_1xrtt_v920_ie(uint8 **ie_ptr, - LIBLTE_RRC_CSFB_REGISTRATION_PARAM_1XRTT_V920_STRUCT *csfb_reg_param) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - csfb_reg_param != NULL) - { - csfb_reg_param->power_down_reg = (LIBLTE_RRC_POWER_DOWN_REG_R9_ENUM)liblte_bits_2_value(ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Global ID EUTRA - - Description: Specifies the Evolved Cell Global Identifier (ECGI), - the globally unique identity of a cell in E-UTRA - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_eutra_ie(LIBLTE_RRC_CELL_GLOBAL_ID_EUTRA_STRUCT *cell_global_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(cell_global_id != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_plmn_identity_ie(&cell_global_id->plmn_id, ie_ptr); - liblte_rrc_pack_cell_identity_ie(cell_global_id->cell_id, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_EUTRA_STRUCT *cell_global_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cell_global_id != NULL) - { - liblte_rrc_unpack_plmn_identity_ie(ie_ptr, &cell_global_id->plmn_id); - liblte_rrc_unpack_cell_identity_ie(ie_ptr, &cell_global_id->cell_id); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Global ID UTRA - - Description: Specifies the global UTRAN Cell Identifier, the - globally unique identity of a cell in UTRA - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_utra_ie(LIBLTE_RRC_CELL_GLOBAL_ID_UTRA_STRUCT *cell_global_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(cell_global_id != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_plmn_identity_ie(&cell_global_id->plmn_id, ie_ptr); - liblte_value_2_bits(cell_global_id->cell_id, ie_ptr, 28); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_utra_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_UTRA_STRUCT *cell_global_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cell_global_id != NULL) - { - liblte_rrc_unpack_plmn_identity_ie(ie_ptr, &cell_global_id->plmn_id); - cell_global_id->cell_id = liblte_bits_2_value(ie_ptr, 28); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Global ID GERAN - - Description: Specifies the Cell Global Identity (CGI), the - globally unique identity of a cell in GERAN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_geran_ie(LIBLTE_RRC_CELL_GLOBAL_ID_GERAN_STRUCT *cell_global_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(cell_global_id != NULL && - ie_ptr != NULL) - { - liblte_rrc_pack_plmn_identity_ie(&cell_global_id->plmn_id, ie_ptr); - liblte_value_2_bits(cell_global_id->lac, ie_ptr, 16); - liblte_value_2_bits(cell_global_id->cell_id, ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_GERAN_STRUCT *cell_global_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cell_global_id != NULL) - { - liblte_rrc_unpack_plmn_identity_ie(ie_ptr, &cell_global_id->plmn_id); - cell_global_id->lac = liblte_bits_2_value(ie_ptr, 16); - cell_global_id->cell_id = liblte_bits_2_value(ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cell Global ID CDMA2000 - - Description: Specifies the Cell Global Identity (CGI), the - globally unique identity of a cell in CDMA2000 - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cell_global_id_cdma2000_ie(LIBLTE_RRC_CELL_GLOBAL_ID_CDMA2000_STRUCT *cell_global_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(cell_global_id != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits((uint32)(cell_global_id->onexrtt >> 15), ie_ptr, 32); - liblte_value_2_bits((uint32)(cell_global_id->onexrtt & 0x7FFFULL), ie_ptr, 15); - liblte_value_2_bits(cell_global_id->hrpd[0], ie_ptr, 32); - liblte_value_2_bits(cell_global_id->hrpd[1], ie_ptr, 32); - liblte_value_2_bits(cell_global_id->hrpd[2], ie_ptr, 32); - liblte_value_2_bits(cell_global_id->hrpd[3], ie_ptr, 32); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cell_global_id_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_CELL_GLOBAL_ID_CDMA2000_STRUCT *cell_global_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cell_global_id != NULL) - { - cell_global_id->onexrtt = (uint64)liblte_bits_2_value(ie_ptr, 32) << 15; - cell_global_id->onexrtt |= (uint64)liblte_bits_2_value(ie_ptr, 15); - cell_global_id->hrpd[0] = liblte_bits_2_value(ie_ptr, 32); - cell_global_id->hrpd[1] = liblte_bits_2_value(ie_ptr, 32); - cell_global_id->hrpd[2] = liblte_bits_2_value(ie_ptr, 32); - cell_global_id->hrpd[3] = liblte_bits_2_value(ie_ptr, 32); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: CSG Identity - - Description: Identifies a Closed Subscriber Group - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_csg_identity_ie(uint32 csg_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(csg_id, ie_ptr, 27); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csg_identity_ie(uint8 **ie_ptr, - uint32 *csg_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - csg_id != NULL) - { - *csg_id = liblte_bits_2_value(ie_ptr, 27); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Mobility Control Info - - Description: Includes parameters relevant for network controlled - mobility to/within E-UTRA - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mobility_control_info_ie(LIBLTE_RRC_MOBILITY_CONTROL_INFO_STRUCT *mob_ctrl_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(mob_ctrl_info != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(mob_ctrl_info->carrier_freq_eutra_present, ie_ptr, 1); - liblte_value_2_bits(mob_ctrl_info->carrier_bw_eutra_present, ie_ptr, 1); - liblte_value_2_bits(mob_ctrl_info->add_spect_em_present, ie_ptr, 1); - liblte_value_2_bits(mob_ctrl_info->rach_cnfg_ded_present, ie_ptr, 1); - - // Target Phys Cell ID - liblte_rrc_pack_phys_cell_id_ie(mob_ctrl_info->target_pci, ie_ptr); - - // Carrier Freq - if(mob_ctrl_info->carrier_freq_eutra_present) - { - // Optional indicator - liblte_value_2_bits(mob_ctrl_info->carrier_freq_eutra.ul_carrier_freq_present, ie_ptr, 1); - - // DL Carrier Freq - liblte_rrc_pack_arfcn_value_eutra_ie(mob_ctrl_info->carrier_freq_eutra.dl_carrier_freq, ie_ptr); - - // UL Carrier Freq - if(mob_ctrl_info->carrier_freq_eutra.ul_carrier_freq_present) - { - liblte_rrc_pack_arfcn_value_eutra_ie(mob_ctrl_info->carrier_freq_eutra.ul_carrier_freq, ie_ptr); - } - } - - // Carrier Bandwidth - if(mob_ctrl_info->carrier_bw_eutra_present) - { - // Optional indicator - liblte_value_2_bits(mob_ctrl_info->carrier_bw_eutra.ul_bw_present, ie_ptr, 1); - - // DL Bandwidth - liblte_value_2_bits(mob_ctrl_info->carrier_bw_eutra.dl_bw, ie_ptr, 4); - - // UL Bandwidth - if(mob_ctrl_info->carrier_bw_eutra.ul_bw_present) - { - liblte_value_2_bits(mob_ctrl_info->carrier_bw_eutra.ul_bw, ie_ptr, 4); - } - } - - // Additional Spectrum Emission - if(mob_ctrl_info->add_spect_em_present) - { - liblte_rrc_pack_additional_spectrum_emission_ie(mob_ctrl_info->add_spect_em, ie_ptr); - } - - // T304 - liblte_value_2_bits(mob_ctrl_info->t304, ie_ptr, 3); - - // New UE Identity - liblte_rrc_pack_c_rnti_ie(mob_ctrl_info->new_ue_id, ie_ptr); - - // Radio Resource Config Common - liblte_rrc_pack_rr_config_common_ie(&mob_ctrl_info->rr_cnfg_common, ie_ptr); - - // RACH Config Dedicated - if(mob_ctrl_info->rach_cnfg_ded_present) - { - liblte_rrc_pack_rach_config_dedicated_ie(&mob_ctrl_info->rach_cnfg_ded, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mobility_control_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_MOBILITY_CONTROL_INFO_STRUCT *mob_ctrl_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - mob_ctrl_info != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - mob_ctrl_info->carrier_freq_eutra_present = liblte_bits_2_value(ie_ptr, 1); - mob_ctrl_info->carrier_bw_eutra_present = liblte_bits_2_value(ie_ptr, 1); - mob_ctrl_info->add_spect_em_present = liblte_bits_2_value(ie_ptr, 1); - mob_ctrl_info->rach_cnfg_ded_present = liblte_bits_2_value(ie_ptr, 1); - - // Target Phys Cell ID - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &mob_ctrl_info->target_pci); - - // Carrier Freq - if(mob_ctrl_info->carrier_freq_eutra_present) - { - // Optional indicator - mob_ctrl_info->carrier_freq_eutra.ul_carrier_freq_present = liblte_bits_2_value(ie_ptr, 1); - - // DL Carrier Freq - liblte_rrc_unpack_arfcn_value_eutra_ie(ie_ptr, &mob_ctrl_info->carrier_freq_eutra.dl_carrier_freq); - - // UL Carrier Freq - if(mob_ctrl_info->carrier_freq_eutra.ul_carrier_freq_present) - { - liblte_rrc_unpack_arfcn_value_eutra_ie(ie_ptr, &mob_ctrl_info->carrier_freq_eutra.ul_carrier_freq); - } - } - - // Carrier Bandwidth - if(mob_ctrl_info->carrier_bw_eutra_present) - { - // Optional indicator - mob_ctrl_info->carrier_bw_eutra.ul_bw_present = liblte_bits_2_value(ie_ptr, 1); - - // DL Bandwidth - mob_ctrl_info->carrier_bw_eutra.dl_bw = (LIBLTE_RRC_BANDWIDTH_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // UL Bandwidth - if(mob_ctrl_info->carrier_bw_eutra.ul_bw_present) - { - mob_ctrl_info->carrier_bw_eutra.ul_bw = (LIBLTE_RRC_BANDWIDTH_ENUM)liblte_bits_2_value(ie_ptr, 4); - } - } - - // Additional Spectrum Emission - if(mob_ctrl_info->add_spect_em_present) - { - liblte_rrc_unpack_additional_spectrum_emission_ie(ie_ptr, &mob_ctrl_info->add_spect_em); - } - - // T304 - mob_ctrl_info->t304 = (LIBLTE_RRC_T304_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // New UE Identity - liblte_rrc_unpack_c_rnti_ie(ie_ptr, &mob_ctrl_info->new_ue_id); - - // Radio Resource Config Common - liblte_rrc_unpack_rr_config_common_ie(ie_ptr, &mob_ctrl_info->rr_cnfg_common); - - // RACH Config Dedicated - if(mob_ctrl_info->rach_cnfg_ded_present) - { - liblte_rrc_unpack_rach_config_dedicated_ie(ie_ptr, &mob_ctrl_info->rach_cnfg_ded); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Mobility Parameters CDMA2000 (1xRTT) - - Description: Contains the parameters provided to the UE for - handover and (enhanced) CSFB to 1xRTT support - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: Mobility State Parameters - - Description: Contains parameters to determine UE mobility state - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mobility_state_parameters_ie(LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT *mobility_state_params, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(mobility_state_params != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(mobility_state_params->t_eval, ie_ptr, 3); - liblte_value_2_bits(mobility_state_params->t_hyst_normal, ie_ptr, 3); - liblte_value_2_bits(mobility_state_params->n_cell_change_medium - 1, ie_ptr, 4); - liblte_value_2_bits(mobility_state_params->n_cell_change_high - 1, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mobility_state_parameters_ie(uint8 **ie_ptr, - LIBLTE_RRC_MOBILITY_STATE_PARAMETERS_STRUCT *mobility_state_params) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - mobility_state_params != NULL) - { - mobility_state_params->t_eval = (LIBLTE_RRC_T_EVALUATION_ENUM)liblte_bits_2_value(ie_ptr, 3); - mobility_state_params->t_hyst_normal = (LIBLTE_RRC_T_HYST_NORMAL_ENUM)liblte_bits_2_value(ie_ptr, 3); - mobility_state_params->n_cell_change_medium = liblte_bits_2_value(ie_ptr, 4) + 1; - mobility_state_params->n_cell_change_high = liblte_bits_2_value(ie_ptr, 4) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Phys Cell ID - - Description: Indicates the physical layer identity of the cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_ie(uint16 phys_cell_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(phys_cell_id, ie_ptr, 9); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_ie(uint8 **ie_ptr, - uint16 *phys_cell_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - phys_cell_id != NULL) - { - *phys_cell_id = liblte_bits_2_value(ie_ptr, 9); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Phys Cell ID Range - - Description: Encodes either a single or a range of physical cell - identities - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_range_ie(LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT *phys_cell_id_range, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool opt; - - if(phys_cell_id_range != NULL && - ie_ptr != NULL) - { - opt = (LIBLTE_RRC_PHYS_CELL_ID_RANGE_N1 != phys_cell_id_range->range); - - liblte_value_2_bits(opt, ie_ptr, 1); - - liblte_rrc_pack_phys_cell_id_ie(phys_cell_id_range->start, ie_ptr); - - if(opt) - { - liblte_value_2_bits(phys_cell_id_range->range, ie_ptr, 4); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_range_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHYS_CELL_ID_RANGE_STRUCT *phys_cell_id_range) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool opt; - - if(ie_ptr != NULL && - phys_cell_id_range != NULL) - { - opt = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &phys_cell_id_range->start); - - if(true == opt) - { - phys_cell_id_range->range = (LIBLTE_RRC_PHYS_CELL_ID_RANGE_ENUM)liblte_bits_2_value(ie_ptr, 4); - }else{ - phys_cell_id_range->range = LIBLTE_RRC_PHYS_CELL_ID_RANGE_N1; - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Phys Cell ID Range UTRA FDD List - - Description: Encodes one or more of Phys Cell ID Range UTRA FDD - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: Phys Cell ID CDMA2000 - - Description: Identifies the PN offset that represents the - "Physical cell identity" in CDMA2000 - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_cdma2000_ie(uint16 phys_cell_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(phys_cell_id, ie_ptr, 9); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_cdma2000_ie(uint8 **ie_ptr, - uint16 *phys_cell_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - phys_cell_id != NULL) - { - *phys_cell_id = liblte_bits_2_value(ie_ptr, 9); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Phys Cell ID GERAN - - Description: Contains the Base Station Identity Code (BSIC) - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_geran_ie(LIBLTE_RRC_PHYS_CELL_ID_GERAN_STRUCT *phys_cell_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(phys_cell_id != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(phys_cell_id->ncc, ie_ptr, 3); - liblte_value_2_bits(phys_cell_id->bcc, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_geran_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHYS_CELL_ID_GERAN_STRUCT *phys_cell_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - phys_cell_id != NULL) - { - phys_cell_id->ncc = liblte_bits_2_value(ie_ptr, 3); - phys_cell_id->bcc = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Phys Cell ID UTRA FDD - - Description: Indicates the physical layer identity of the cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_utra_fdd_ie(uint16 phys_cell_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(phys_cell_id, ie_ptr, 9); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_utra_fdd_ie(uint8 **ie_ptr, - uint16 *phys_cell_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - phys_cell_id != NULL) - { - *phys_cell_id = liblte_bits_2_value(ie_ptr, 9); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Phys Cell ID UTRA TDD - - Description: Indicates the physical layer identity of the cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phys_cell_id_utra_tdd_ie(uint8 phys_cell_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(phys_cell_id, ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phys_cell_id_utra_tdd_ie(uint8 **ie_ptr, - uint8 *phys_cell_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - phys_cell_id != NULL) - { - *phys_cell_id = liblte_bits_2_value(ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PLMN Identity - - Description: Identifies a Public Land Mobile Network - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_plmn_identity_ie(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *plmn_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 mcc_opt = true; - uint8 mnc_size; - - if(plmn_id != NULL && - ie_ptr != NULL) - { - if(0xFFFF == plmn_id->mcc) { - mcc_opt = false; - } - liblte_value_2_bits(mcc_opt, ie_ptr, 1); - - if(true == mcc_opt) - { - liblte_value_2_bits((plmn_id->mcc>>8)&0x0F, ie_ptr, 4); - liblte_value_2_bits((plmn_id->mcc>>4)&0x0F, ie_ptr, 4); - liblte_value_2_bits((plmn_id->mcc)&0x0F, ie_ptr, 4); - } - - if((plmn_id->mnc & 0xFF00) == 0xFF00) - { - mnc_size = 2; - liblte_value_2_bits((mnc_size)-2, ie_ptr, 1); - liblte_value_2_bits((plmn_id->mnc>>4)&0x0F, ie_ptr, 4); - liblte_value_2_bits((plmn_id->mnc)&0x0F, ie_ptr, 4); - }else{ - mnc_size = 3; - liblte_value_2_bits((mnc_size)-2, ie_ptr, 1); - liblte_value_2_bits((plmn_id->mnc>>8)&0x0F, ie_ptr, 4); - liblte_value_2_bits((plmn_id->mnc>>4)&0x0F, ie_ptr, 4); - liblte_value_2_bits((plmn_id->mnc)&0x0F, ie_ptr, 4); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_plmn_identity_ie(uint8 **ie_ptr, - LIBLTE_RRC_PLMN_IDENTITY_STRUCT *plmn_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 mcc_opt; - uint8 mnc_size; - - if(ie_ptr != NULL && - plmn_id != NULL) - { - mcc_opt = liblte_bits_2_value(ie_ptr, 1); - - if(true == mcc_opt) - { - plmn_id->mcc = 0xF000; - plmn_id->mcc |= (liblte_bits_2_value(ie_ptr, 4) << 8); - plmn_id->mcc |= (liblte_bits_2_value(ie_ptr, 4) << 4); - plmn_id->mcc |= liblte_bits_2_value(ie_ptr, 4); - - }else{ - plmn_id->mcc = LIBLTE_RRC_MCC_NOT_PRESENT; - } - - mnc_size = (liblte_bits_2_value(ie_ptr, 1) + 2); - if(2 == mnc_size) - { - plmn_id->mnc = 0xFF00; - plmn_id->mnc |= (liblte_bits_2_value(ie_ptr, 4) << 4); - plmn_id->mnc |= liblte_bits_2_value(ie_ptr, 4); - }else{ - plmn_id->mnc = 0xF000; - plmn_id->mnc |= (liblte_bits_2_value(ie_ptr, 4) << 8); - plmn_id->mnc |= (liblte_bits_2_value(ie_ptr, 4) << 4); - plmn_id->mnc |= liblte_bits_2_value(ie_ptr, 4); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Pre Registration Info HRPD - - Description: FIXME - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pre_registration_info_hrpd_ie(LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT *pre_reg_info_hrpd, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(pre_reg_info_hrpd != NULL && - ie_ptr != NULL) - { - // Optional indicators - liblte_value_2_bits(pre_reg_info_hrpd->pre_reg_zone_id_present, ie_ptr, 1); - if(0 != pre_reg_info_hrpd->secondary_pre_reg_zone_id_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - - liblte_value_2_bits(pre_reg_info_hrpd->pre_reg_allowed, ie_ptr, 1); - - if(true == pre_reg_info_hrpd->pre_reg_zone_id_present) - { - liblte_value_2_bits(pre_reg_info_hrpd->pre_reg_zone_id, ie_ptr, 8); - } - - if(0 != pre_reg_info_hrpd->secondary_pre_reg_zone_id_list_size) - { - liblte_value_2_bits(pre_reg_info_hrpd->secondary_pre_reg_zone_id_list_size - 1, ie_ptr, 1); - for(i=0; isecondary_pre_reg_zone_id_list_size; i++) - { - liblte_value_2_bits(pre_reg_info_hrpd->secondary_pre_reg_zone_id_list[i], ie_ptr, 8); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pre_registration_info_hrpd_ie(uint8 **ie_ptr, - LIBLTE_RRC_PRE_REGISTRATION_INFO_HRPD_STRUCT *pre_reg_info_hrpd) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool secondary_pre_reg_zone_id_opt; - - if(ie_ptr != NULL && - pre_reg_info_hrpd != NULL) - { - // Optional indicators - pre_reg_info_hrpd->pre_reg_zone_id_present = liblte_bits_2_value(ie_ptr, 1); - secondary_pre_reg_zone_id_opt = liblte_bits_2_value(ie_ptr, 1); - - pre_reg_info_hrpd->pre_reg_allowed = liblte_bits_2_value(ie_ptr, 1); - - if(true == pre_reg_info_hrpd->pre_reg_zone_id_present) - { - pre_reg_info_hrpd->pre_reg_zone_id = liblte_bits_2_value(ie_ptr, 8); - } - - if(true == secondary_pre_reg_zone_id_opt) - { - pre_reg_info_hrpd->secondary_pre_reg_zone_id_list_size = liblte_bits_2_value(ie_ptr, 1) + 1; - for(i=0; isecondary_pre_reg_zone_id_list_size; i++) - { - pre_reg_info_hrpd->secondary_pre_reg_zone_id_list[i] = liblte_bits_2_value(ie_ptr, 8); - } - }else{ - pre_reg_info_hrpd->secondary_pre_reg_zone_id_list_size = 0; - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Q Qual Min - - Description: Indicates for cell selection/re-selection the - required minimum received RSRQ level in the (E-UTRA) - cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_qual_min_ie(int8 q_qual_min, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(q_qual_min + 34, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_qual_min_ie(uint8 **ie_ptr, - int8 *q_qual_min) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - q_qual_min != NULL) - { - *q_qual_min = (int8)liblte_bits_2_value(ie_ptr, 5) - 34; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Q Rx Lev Min - - Description: Indicates the required minimum received RSRP level in - the (E-UTRA) cell for cell selection/re-selection - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_rx_lev_min_ie(int16 q_rx_lev_min, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits((q_rx_lev_min / 2) + 70, ie_ptr, 6); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_rx_lev_min_ie(uint8 **ie_ptr, - int16 *q_rx_lev_min) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - q_rx_lev_min != NULL) - { - *q_rx_lev_min = ((int16)liblte_bits_2_value(ie_ptr, 6) - 70) * 2; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Q Offset Range - - Description: Indicates a cell or frequency specific offset to be - applied when evaluating candidates for cell - reselection or when evaluating triggering conditions - for measurement reporting - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_offset_range_ie(LIBLTE_RRC_Q_OFFSET_RANGE_ENUM q_offset_range, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(q_offset_range, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_offset_range_ie(uint8 **ie_ptr, - LIBLTE_RRC_Q_OFFSET_RANGE_ENUM *q_offset_range) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - q_offset_range != NULL) - { - *q_offset_range = (LIBLTE_RRC_Q_OFFSET_RANGE_ENUM)liblte_bits_2_value(ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Q Offset Range Inter RAT - - Description: Indicates a frequency specific offset to be applied - when evaluating triggering conditions for - measurement reporting - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_q_offset_range_inter_rat_ie(int8 q_offset_range_inter_rat, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(q_offset_range_inter_rat + 15, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_q_offset_range_inter_rat_ie(uint8 **ie_ptr, - int8 *q_offset_range_inter_rat) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - q_offset_range_inter_rat != NULL) - { - *q_offset_range_inter_rat = (int8)(liblte_bits_2_value(ie_ptr, 5)) - 15; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Reselection Threshold - - Description: Indicates an RX level threshold for cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_reselection_threshold_ie(uint8 resel_thresh, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(resel_thresh / 2, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_reselection_threshold_ie(uint8 **ie_ptr, - uint8 *resel_thresh) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - resel_thresh != NULL) - { - *resel_thresh = liblte_bits_2_value(ie_ptr, 5) * 2; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Reselection Threshold Q - - Description: Indicates a quality level threshold for cell - reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_reselection_threshold_q_ie(uint8 resel_thresh_q, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(resel_thresh_q, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_reselection_threshold_q_ie(uint8 **ie_ptr, - uint8 *resel_thresh_q) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - resel_thresh_q != NULL) - { - *resel_thresh_q = liblte_bits_2_value(ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: S Cell Index - - Description: Contains a short identity, used to identify an - SCell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_s_cell_index_ie(uint8 s_cell_idx, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(s_cell_idx - 1, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_s_cell_index_ie(uint8 **ie_ptr, - uint8 *s_cell_idx) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - s_cell_idx != NULL) - { - *s_cell_idx = liblte_bits_2_value(ie_ptr, 3) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Serv Cell Index - - Description: Contains a short identity, used to identify a - serving cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_serv_cell_index_ie(uint8 serv_cell_idx, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(serv_cell_idx, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_serv_cell_index_ie(uint8 **ie_ptr, - uint8 *serv_cell_idx) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - serv_cell_idx != NULL) - { - *serv_cell_idx = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Speed State Scale Factors - - Description: Contains factors, to be applied when the UE is in - medium or high speed state, used for scaling a - mobility control related parameter - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_speed_state_scale_factors_ie(LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT *speed_state_scale_factors, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(speed_state_scale_factors != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(speed_state_scale_factors->sf_medium, ie_ptr, 2); - liblte_value_2_bits(speed_state_scale_factors->sf_high, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_speed_state_scale_factors_ie(uint8 **ie_ptr, - LIBLTE_RRC_SPEED_STATE_SCALE_FACTORS_STRUCT *speed_state_scale_factors) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - speed_state_scale_factors != NULL) - { - speed_state_scale_factors->sf_medium = (LIBLTE_RRC_SSSF_MEDIUM_ENUM)liblte_bits_2_value(ie_ptr, 2); - speed_state_scale_factors->sf_high = (LIBLTE_RRC_SSSF_HIGH_ENUM)liblte_bits_2_value(ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Info List GERAN - - Description: Contains system information of a GERAN cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: System Time Info CDMA2000 - - Description: Informs the UE about the absolute time in the current - cell - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_system_time_info_cdma2000_ie(LIBLTE_RRC_SYSTEM_TIME_INFO_CDMA2000_STRUCT *sys_time_info_cdma2000, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(sys_time_info_cdma2000 != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(sys_time_info_cdma2000->cdma_eutra_sync, ie_ptr, 1); - liblte_value_2_bits(sys_time_info_cdma2000->system_time_async, ie_ptr, 1); - if(true == sys_time_info_cdma2000->system_time_async) - { - liblte_value_2_bits((uint32)(sys_time_info_cdma2000->system_time >> 17), ie_ptr, 32); - liblte_value_2_bits((uint32)(sys_time_info_cdma2000->system_time & 0x1FFFF), ie_ptr, 17); - }else{ - liblte_value_2_bits((uint32)(sys_time_info_cdma2000->system_time >> 7), ie_ptr, 32); - liblte_value_2_bits((uint32)(sys_time_info_cdma2000->system_time & 0x7F), ie_ptr, 7); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_system_time_info_cdma2000_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYSTEM_TIME_INFO_CDMA2000_STRUCT *sys_time_info_cdma2000) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - sys_time_info_cdma2000 != NULL) - { - sys_time_info_cdma2000->cdma_eutra_sync = liblte_bits_2_value(ie_ptr, 1); - sys_time_info_cdma2000->system_time_async = liblte_bits_2_value(ie_ptr, 1); - if(true == sys_time_info_cdma2000->system_time_async) - { - sys_time_info_cdma2000->system_time = (uint64)liblte_bits_2_value(ie_ptr, 32) << 17; - sys_time_info_cdma2000->system_time |= (uint64)liblte_bits_2_value(ie_ptr, 17); - }else{ - sys_time_info_cdma2000->system_time = (uint64)liblte_bits_2_value(ie_ptr, 32) << 7; - sys_time_info_cdma2000->system_time |= (uint64)liblte_bits_2_value(ie_ptr, 7); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Tracking Area Code - - Description: Identifies a tracking area within the scope of a - PLMN - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_tracking_area_code_ie(uint16 tac, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(tac, ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tracking_area_code_ie(uint8 **ie_ptr, - uint16 *tac) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - tac != NULL) - { - *tac = liblte_bits_2_value(ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: T Reselection - - Description: Contains the timer T_reselection_rat for E-UTRA, - UTRA, GERAN, or CDMA2000 - - Document Reference: 36.331 v10.0.0 Section 6.3.4 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_t_reselection_ie(uint8 t_resel, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(t_resel, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_t_reselection_ie(uint8 **ie_ptr, - uint8 *t_resel) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - t_resel != NULL) - { - *t_resel = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Next Hop Chaining Count - - Description: Updates the Kenb key and corresponds to parameter - NCC - - Document Reference: 36.331 v10.0.0 Section 6.3.3 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_next_hop_chaining_count_ie(uint8 next_hop_chaining_count, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(next_hop_chaining_count, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_next_hop_chaining_count_ie(uint8 **ie_ptr, - uint8 *next_hop_chaining_count) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - next_hop_chaining_count != NULL) - { - *next_hop_chaining_count = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Security Algorithm Config - - Description: Configures AS integrity protection algorithm (SRBs) - and AS ciphering algorithm (SRBs and DRBs) - - Document Reference: 36.331 v10.0.0 Section 6.3.3 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_algorithm_config_ie(LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT *sec_alg_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(sec_alg_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(sec_alg_cnfg->cipher_alg, ie_ptr, 3); - - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(sec_alg_cnfg->int_alg, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_algorithm_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_SECURITY_ALGORITHM_CONFIG_STRUCT *sec_alg_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - sec_alg_cnfg != NULL) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - sec_alg_cnfg->cipher_alg = (LIBLTE_RRC_CIPHERING_ALGORITHM_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - sec_alg_cnfg->int_alg = (LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Short MAC I - - Description: Identifies and verifies the UE at RRC connection - re-establishment - - Document Reference: 36.331 v10.0.0 Section 6.3.3 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_short_mac_i_ie(uint16 short_mac_i, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(short_mac_i, ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_short_mac_i_ie(uint8 **ie_ptr, - uint16 *short_mac_i) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - short_mac_i != NULL) - { - *short_mac_i = liblte_bits_2_value(ie_ptr, 16); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Antenna Info - - Description: Specifies the common and the UE specific antenna - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_antenna_info_common_ie(LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM antenna_ports_cnt, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(antenna_ports_cnt, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_antenna_info_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM *antenna_ports_cnt) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - antenna_ports_cnt != NULL) - { - *antenna_ports_cnt = (LIBLTE_RRC_ANTENNA_PORTS_COUNT_ENUM)liblte_bits_2_value(ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_antenna_info_dedicated_ie(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *antenna_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(antenna_info != NULL && - ie_ptr != NULL) - { - // Optional indicator - liblte_value_2_bits(antenna_info->codebook_subset_restriction_present, ie_ptr, 1); - - // Transmission Mode - liblte_value_2_bits(antenna_info->tx_mode, ie_ptr, 3); - - // Codebook Subset Restriction - if(antenna_info->codebook_subset_restriction_present) - { - liblte_value_2_bits(antenna_info->codebook_subset_restriction_choice, ie_ptr, 3); - switch(antenna_info->codebook_subset_restriction_choice) - { - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM3: - liblte_value_2_bits(antenna_info->codebook_subset_restriction, ie_ptr, 2); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM3: - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM5: - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM6: - liblte_value_2_bits(antenna_info->codebook_subset_restriction, ie_ptr, 4); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM4: - liblte_value_2_bits(antenna_info->codebook_subset_restriction, ie_ptr, 6); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM4: - liblte_value_2_bits(antenna_info->codebook_subset_restriction >> 32, ie_ptr, 32); - liblte_value_2_bits(antenna_info->codebook_subset_restriction, ie_ptr, 32); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM5: - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM6: - liblte_value_2_bits(antenna_info->codebook_subset_restriction, ie_ptr, 16); - break; - } - } - - // UE Transmit Antenna Selection - liblte_value_2_bits(antenna_info->ue_tx_antenna_selection_setup_present, ie_ptr, 1); - if(antenna_info->ue_tx_antenna_selection_setup_present) - { - liblte_value_2_bits(antenna_info->ue_tx_antenna_selection_setup, ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_antenna_info_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *antenna_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - antenna_info != NULL) - { - // Optional indicator - antenna_info->codebook_subset_restriction_present = liblte_bits_2_value(ie_ptr, 1); - - // Transmission Mode - antenna_info->tx_mode = (LIBLTE_RRC_TRANSMISSION_MODE_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // Codebook Subset Restriction - if(antenna_info->codebook_subset_restriction_present) - { - antenna_info->codebook_subset_restriction_choice = (LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_CHOICE_ENUM)liblte_bits_2_value(ie_ptr, 3); - switch(antenna_info->codebook_subset_restriction_choice) - { - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM3: - antenna_info->codebook_subset_restriction = liblte_bits_2_value(ie_ptr, 2); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM3: - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM5: - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM6: - antenna_info->codebook_subset_restriction = liblte_bits_2_value(ie_ptr, 4); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM4: - antenna_info->codebook_subset_restriction = liblte_bits_2_value(ie_ptr, 6); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM4: - antenna_info->codebook_subset_restriction = (uint64)(liblte_bits_2_value(ie_ptr, 32)) << 32; - antenna_info->codebook_subset_restriction |= liblte_bits_2_value(ie_ptr, 32); - break; - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM5: - case LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N4_TM6: - antenna_info->codebook_subset_restriction = liblte_bits_2_value(ie_ptr, 16); - break; - } - } - - // UE Transmit Antenna Selection - antenna_info->ue_tx_antenna_selection_setup_present = liblte_bits_2_value(ie_ptr, 1); - if(antenna_info->ue_tx_antenna_selection_setup_present) - { - antenna_info->ue_tx_antenna_selection_setup = (LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: CQI Report Config - - Description: Specifies the CQI reporting configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cqi_report_config_ie(LIBLTE_RRC_CQI_REPORT_CONFIG_STRUCT *cqi_report_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(cqi_report_cnfg != NULL && - ie_ptr != NULL) - { - // Optional indicators - liblte_value_2_bits(cqi_report_cnfg->report_mode_aperiodic_present, ie_ptr, 1); - liblte_value_2_bits(cqi_report_cnfg->report_periodic_present, ie_ptr, 1); - - // CQI Report Mode Aperiodic - if(cqi_report_cnfg->report_mode_aperiodic_present) - { - liblte_value_2_bits(cqi_report_cnfg->report_mode_aperiodic, ie_ptr, 3); - } - - // Nom PDSCH RS EPRE Offset - liblte_value_2_bits(cqi_report_cnfg->nom_pdsch_rs_epre_offset + 1, ie_ptr, 3); - - // CQI Report Periodic - if(cqi_report_cnfg->report_periodic_present) - { - liblte_value_2_bits(cqi_report_cnfg->report_periodic_setup_present, ie_ptr, 1); - if(cqi_report_cnfg->report_periodic_setup_present) - { - // Optional indicator - liblte_value_2_bits(cqi_report_cnfg->report_periodic.ri_cnfg_idx_present, ie_ptr, 1); - - // CQI PUCCH Resource Index - liblte_value_2_bits(cqi_report_cnfg->report_periodic.pucch_resource_idx, ie_ptr, 11); - - // CQI PMI Config Index - liblte_value_2_bits(cqi_report_cnfg->report_periodic.pmi_cnfg_idx, ie_ptr, 10); - - // CQI Format Indicator Periodic - liblte_value_2_bits(cqi_report_cnfg->report_periodic.format_ind_periodic, ie_ptr, 1); - if(LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_SUBBAND_CQI == cqi_report_cnfg->report_periodic.format_ind_periodic) - { - liblte_value_2_bits(cqi_report_cnfg->report_periodic.format_ind_periodic_subband_k - 1, ie_ptr, 2); - } - - // RI Config Index - if(cqi_report_cnfg->report_periodic.ri_cnfg_idx_present) - { - liblte_value_2_bits(cqi_report_cnfg->report_periodic.ri_cnfg_idx, ie_ptr, 10); - } - - // Simultaneous Ack/Nack and CQI - liblte_value_2_bits(cqi_report_cnfg->report_periodic.simult_ack_nack_and_cqi, ie_ptr, 1); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cqi_report_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_CQI_REPORT_CONFIG_STRUCT *cqi_report_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cqi_report_cnfg != NULL) - { - // Optional indicators - cqi_report_cnfg->report_mode_aperiodic_present = liblte_bits_2_value(ie_ptr, 1); - cqi_report_cnfg->report_periodic_present = liblte_bits_2_value(ie_ptr, 1); - - // CQI Report Mode Aperiodic - if(cqi_report_cnfg->report_mode_aperiodic_present) - { - cqi_report_cnfg->report_mode_aperiodic = (LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_ENUM)liblte_bits_2_value(ie_ptr, 3); - } - - // Nom PDSCH RS EPRE Offset - cqi_report_cnfg->nom_pdsch_rs_epre_offset = liblte_bits_2_value(ie_ptr, 3) - 1; - - // CQI Report Periodic - if(cqi_report_cnfg->report_periodic_present) - { - cqi_report_cnfg->report_periodic_setup_present = liblte_bits_2_value(ie_ptr, 1); - if(cqi_report_cnfg->report_periodic_setup_present) - { - // Optional indicator - cqi_report_cnfg->report_periodic.ri_cnfg_idx_present = liblte_bits_2_value(ie_ptr, 1); - - // CQI PUCCH Resource Index - cqi_report_cnfg->report_periodic.pucch_resource_idx = liblte_bits_2_value(ie_ptr, 11); - - // CQI PMI Config Index - cqi_report_cnfg->report_periodic.pmi_cnfg_idx = liblte_bits_2_value(ie_ptr, 10); - - // CQI Format Indicator Periodic - cqi_report_cnfg->report_periodic.format_ind_periodic = (LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_SUBBAND_CQI == cqi_report_cnfg->report_periodic.format_ind_periodic) - { - cqi_report_cnfg->report_periodic.format_ind_periodic_subband_k = liblte_bits_2_value(ie_ptr, 2) + 1; - } - - // RI Config Index - if(cqi_report_cnfg->report_periodic.ri_cnfg_idx_present) - { - cqi_report_cnfg->report_periodic.ri_cnfg_idx = liblte_bits_2_value(ie_ptr, 10); - } - - // Simultaneous Ack/Nack and CQI - cqi_report_cnfg->report_periodic.simult_ack_nack_and_cqi = liblte_bits_2_value(ie_ptr, 1); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Cross Carrier Scheduling Config - - Description: Specifies the configuration when the cross carrier - scheduling is used in a cell - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: CSI RS Config - - Description: Specifies the CSI (Channel State Information) - reference signal configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: DRB Identity - - Description: Identifies a DRB used by a UE - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_drb_identity_ie(uint8 drb_id, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(drb_id - 1, ie_ptr, 5); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_drb_identity_ie(uint8 **ie_ptr, - uint8 *drb_id) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - drb_id != NULL) - { - *drb_id = liblte_bits_2_value(ie_ptr, 5) + 1; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Logical Channel Config - - Description: Configures the logical channel parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_logical_channel_config_ie(LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT *log_chan_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(log_chan_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); // FIXME: Handle extension - - // Optional indicator - liblte_value_2_bits(log_chan_cnfg->ul_specific_params_present, ie_ptr, 1); - - if(true == log_chan_cnfg->ul_specific_params_present) - { - // Optional indicator - liblte_value_2_bits(log_chan_cnfg->ul_specific_params.log_chan_group_present, ie_ptr, 1); - - liblte_value_2_bits(log_chan_cnfg->ul_specific_params.priority - 1, ie_ptr, 4); - liblte_value_2_bits(log_chan_cnfg->ul_specific_params.prioritized_bit_rate, ie_ptr, 4); - liblte_value_2_bits(log_chan_cnfg->ul_specific_params.bucket_size_duration, ie_ptr, 3); - - if(true == log_chan_cnfg->ul_specific_params.log_chan_group_present) - { - liblte_value_2_bits(log_chan_cnfg->ul_specific_params.log_chan_group, ie_ptr, 2); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_logical_channel_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_LOGICAL_CHANNEL_CONFIG_STRUCT *log_chan_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext; - - if(ie_ptr != NULL && - log_chan_cnfg != NULL) - { - // Extension indicator - ext = liblte_bits_2_value(ie_ptr, 1); // FIXME: Handle extension - - // Optional indicator - log_chan_cnfg->ul_specific_params_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == log_chan_cnfg->ul_specific_params_present) - { - // Optional indicator - log_chan_cnfg->ul_specific_params.log_chan_group_present = liblte_bits_2_value(ie_ptr, 1); - - log_chan_cnfg->ul_specific_params.priority = liblte_bits_2_value(ie_ptr, 4) + 1; - log_chan_cnfg->ul_specific_params.prioritized_bit_rate = (LIBLTE_RRC_PRIORITIZED_BIT_RATE_ENUM)liblte_bits_2_value(ie_ptr, 4); - log_chan_cnfg->ul_specific_params.bucket_size_duration = (LIBLTE_RRC_BUCKET_SIZE_DURATION_ENUM)liblte_bits_2_value(ie_ptr, 3); - - if(true == log_chan_cnfg->ul_specific_params.log_chan_group_present) - { - log_chan_cnfg->ul_specific_params.log_chan_group = liblte_bits_2_value(ie_ptr, 2); - } - } - - // Consume non-critical extensions - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: MAC Main Config - - Description: Specifies the MAC main configuration for signalling - and data radio bearers - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mac_main_config_ie(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_main_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext = false; - - if(mac_main_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(ext, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(mac_main_cnfg->drx_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(mac_main_cnfg->phr_cnfg_present, ie_ptr, 1); - - // ULSCH Config - if(mac_main_cnfg->ulsch_cnfg_present) - { - // Optional indicators - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg.max_harq_tx_present, ie_ptr, 1); - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg.periodic_bsr_timer_present, ie_ptr, 1); - - // Max HARQ TX - if(mac_main_cnfg->ulsch_cnfg.max_harq_tx_present) - { - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg.max_harq_tx, ie_ptr, 4); - } - - // Periodic BSR Timer - if(mac_main_cnfg->ulsch_cnfg.periodic_bsr_timer_present) - { - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg.periodic_bsr_timer, ie_ptr, 4); - } - - // Re-TX BSR Timer - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg.retx_bsr_timer, ie_ptr, 3); - - // TTI Bundling - liblte_value_2_bits(mac_main_cnfg->ulsch_cnfg.tti_bundling, ie_ptr, 1); - } - - // DRX Config - if(mac_main_cnfg->drx_cnfg_present) - { - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.setup_present, ie_ptr, 1); - if(mac_main_cnfg->drx_cnfg.setup_present) - { - // Optional indicators - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.short_drx_present, ie_ptr, 1); - - // On Duration Timer - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.on_duration_timer, ie_ptr, 4); - - // DRX Inactivity Timer - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.drx_inactivity_timer, ie_ptr, 5); - - // DRX Retransmission Timer - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.drx_retx_timer, ie_ptr, 3); - - // Long DRX Cycle Start Offset - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset_choice, ie_ptr, 4); - switch(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset_choice) - { - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF10: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 4); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF20: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF32: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 5); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF40: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF64: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 6); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF80: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF128: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 7); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF160: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF256: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 8); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF320: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF512: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 9); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF640: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF1024: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 10); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF1280: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF2048: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 11); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF2560: - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset, ie_ptr, 12); - break; - } - - // Short DRX - if(mac_main_cnfg->drx_cnfg.short_drx_present) - { - // Short DRX Cycle - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.short_drx_cycle, ie_ptr, 4); - - // DRX Short Cycle Timer - liblte_value_2_bits(mac_main_cnfg->drx_cnfg.short_drx_cycle_timer - 1, ie_ptr, 4); - } - } - } - - // Time Alignment Timer Dedicated - liblte_rrc_pack_time_alignment_timer_ie(mac_main_cnfg->time_alignment_timer, ie_ptr); - - // PHR Config - if(mac_main_cnfg->phr_cnfg_present) - { - liblte_value_2_bits(mac_main_cnfg->phr_cnfg.setup_present, ie_ptr, 1); - if(mac_main_cnfg->phr_cnfg.setup_present) - { - // Periodic PHR Timer - liblte_value_2_bits(mac_main_cnfg->phr_cnfg.periodic_phr_timer, ie_ptr, 3); - - // Prohibit PHR Timer - liblte_value_2_bits(mac_main_cnfg->phr_cnfg.prohibit_phr_timer, ie_ptr, 3); - - // DL Pathloss Change - liblte_value_2_bits(mac_main_cnfg->phr_cnfg.dl_pathloss_change, ie_ptr, 2); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mac_main_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_main_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext; - - if(ie_ptr != NULL && - mac_main_cnfg != NULL) - { - // Extension indicator - ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - mac_main_cnfg->ulsch_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - mac_main_cnfg->drx_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - mac_main_cnfg->phr_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // ULSCH Config - if(mac_main_cnfg->ulsch_cnfg_present) - { - // Optional indicators - mac_main_cnfg->ulsch_cnfg.max_harq_tx_present = liblte_bits_2_value(ie_ptr, 1); - mac_main_cnfg->ulsch_cnfg.periodic_bsr_timer_present = liblte_bits_2_value(ie_ptr, 1); - - // Max HARQ TX - if(mac_main_cnfg->ulsch_cnfg.max_harq_tx_present) - { - mac_main_cnfg->ulsch_cnfg.max_harq_tx = (LIBLTE_RRC_MAX_HARQ_TX_ENUM)liblte_bits_2_value(ie_ptr, 4); - } - - // Periodic BSR Timer - if(mac_main_cnfg->ulsch_cnfg.periodic_bsr_timer_present) - { - mac_main_cnfg->ulsch_cnfg.periodic_bsr_timer = (LIBLTE_RRC_PERIODIC_BSR_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 4); - } - - // Re-TX BSR Timer - mac_main_cnfg->ulsch_cnfg.retx_bsr_timer = (LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // TTI Bundling - mac_main_cnfg->ulsch_cnfg.tti_bundling = liblte_bits_2_value(ie_ptr, 1); - } - - // DRX Config - if(mac_main_cnfg->drx_cnfg_present) - { - mac_main_cnfg->drx_cnfg.setup_present = liblte_bits_2_value(ie_ptr, 1); - if(mac_main_cnfg->drx_cnfg.setup_present) - { - // Optional indicators - mac_main_cnfg->drx_cnfg.short_drx_present = liblte_bits_2_value(ie_ptr, 1); - - // On Duration Timer - mac_main_cnfg->drx_cnfg.on_duration_timer = (LIBLTE_RRC_ON_DURATION_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // DRX Inactivity Timer - mac_main_cnfg->drx_cnfg.drx_inactivity_timer = (LIBLTE_RRC_DRX_INACTIVITY_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 5); - - // DRX Retransmission Timer - mac_main_cnfg->drx_cnfg.drx_retx_timer = (LIBLTE_RRC_DRX_RETRANSMISSION_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // Long DRX Cycle Short Offset - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset_choice = (LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_CHOICE_ENUM)liblte_bits_2_value(ie_ptr, 4); - switch(mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset_choice) - { - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF10: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 4); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF20: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF32: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 5); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF40: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF64: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 6); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF80: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF128: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 7); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF160: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF256: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 8); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF320: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF512: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 9); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF640: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF1024: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 10); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF1280: - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF2048: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 11); - break; - case LIBLTE_RRC_LONG_DRX_CYCLE_START_OFFSET_SF2560: - mac_main_cnfg->drx_cnfg.long_drx_cycle_start_offset = liblte_bits_2_value(ie_ptr, 12); - break; - } - - // Short DRX - if(mac_main_cnfg->drx_cnfg.short_drx_present) - { - // Short DRX Cycle - mac_main_cnfg->drx_cnfg.short_drx_cycle = (LIBLTE_RRC_SHORT_DRX_CYCLE_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // DRX Short Cycle Timer - mac_main_cnfg->drx_cnfg.short_drx_cycle_timer = liblte_bits_2_value(ie_ptr, 4) + 1; - } - } - } - - // Time Alignment Timer Dedicated - liblte_rrc_unpack_time_alignment_timer_ie(ie_ptr, &mac_main_cnfg->time_alignment_timer); - - // PHR Config - if(mac_main_cnfg->phr_cnfg_present) - { - mac_main_cnfg->phr_cnfg.setup_present = liblte_bits_2_value(ie_ptr, 1); - if(mac_main_cnfg->phr_cnfg.setup_present) - { - // Periodic PHR Timer - mac_main_cnfg->phr_cnfg.periodic_phr_timer = (LIBLTE_RRC_PERIODIC_PHR_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // Prohibit PHR Timer - mac_main_cnfg->phr_cnfg.prohibit_phr_timer = (LIBLTE_RRC_PROHIBIT_PHR_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // DL Pathloss Change - mac_main_cnfg->phr_cnfg.dl_pathloss_change = (LIBLTE_RRC_DL_PATHLOSS_CHANGE_ENUM)liblte_bits_2_value(ie_ptr, 2); - } - } - - // Consume non-critical extensions - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PDCP Config - - Description: Sets the configurable PDCP parameters for data - radio bearers - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdcp_config_ie(LIBLTE_RRC_PDCP_CONFIG_STRUCT *pdcp_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pdcp_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(pdcp_cnfg->discard_timer_present, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->rlc_am_status_report_required_present, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->rlc_um_pdcp_sn_size_present, ie_ptr, 1); - - // Discard Timer - if(pdcp_cnfg->discard_timer_present) - { - liblte_value_2_bits(pdcp_cnfg->discard_timer, ie_ptr, 3); - } - - // RLC AM - if(pdcp_cnfg->rlc_am_status_report_required_present) - { - liblte_value_2_bits(pdcp_cnfg->rlc_am_status_report_required, ie_ptr, 1); - } - - // RLC UM - if(pdcp_cnfg->rlc_um_pdcp_sn_size_present) - { - liblte_value_2_bits(pdcp_cnfg->rlc_um_pdcp_sn_size, ie_ptr, 1); - } - - // Header Compression - liblte_value_2_bits(pdcp_cnfg->hdr_compression_rohc, ie_ptr, 1); - if(pdcp_cnfg->hdr_compression_rohc) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Max CID - liblte_value_2_bits(pdcp_cnfg->hdr_compression_max_cid - 1, ie_ptr, 14); - - // Profiles - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0001, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0002, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0003, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0004, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0006, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0101, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0102, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0103, ie_ptr, 1); - liblte_value_2_bits(pdcp_cnfg->hdr_compression_profile_0104, ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdcp_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDCP_CONFIG_STRUCT *pdcp_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pdcp_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - pdcp_cnfg->discard_timer_present = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->rlc_am_status_report_required_present = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->rlc_um_pdcp_sn_size_present = liblte_bits_2_value(ie_ptr, 1); - - // Discard Timer - if(pdcp_cnfg->discard_timer_present) - { - pdcp_cnfg->discard_timer = (LIBLTE_RRC_DISCARD_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - } - - // RLC AM - if(pdcp_cnfg->rlc_am_status_report_required_present) - { - pdcp_cnfg->rlc_am_status_report_required = liblte_bits_2_value(ie_ptr, 1); - } - - // RLC UM - if(pdcp_cnfg->rlc_um_pdcp_sn_size_present) - { - pdcp_cnfg->rlc_um_pdcp_sn_size = (LIBLTE_RRC_PDCP_SN_SIZE_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - // Header Compression - pdcp_cnfg->hdr_compression_rohc = liblte_bits_2_value(ie_ptr, 1); - if(pdcp_cnfg->hdr_compression_rohc) - { - // Extension indicator - bool ext2 = liblte_bits_2_value(ie_ptr, 1); - - // Max CID - pdcp_cnfg->hdr_compression_max_cid = liblte_bits_2_value(ie_ptr, 14) + 1; - - // Profiles - pdcp_cnfg->hdr_compression_profile_0001 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0002 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0003 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0004 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0006 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0101 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0102 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0103 = liblte_bits_2_value(ie_ptr, 1); - pdcp_cnfg->hdr_compression_profile_0104 = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext2, __func__, ie_ptr); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PDSCH Config - - Description: Specifies the common and the UE specific PDSCH - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdsch_config_common_ie(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT *pdsch_config, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pdsch_config != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(pdsch_config->rs_power + 60, ie_ptr, 7); - liblte_value_2_bits(pdsch_config->p_b, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdsch_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT *pdsch_config) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pdsch_config != NULL) - { - pdsch_config->rs_power = liblte_bits_2_value(ie_ptr, 7) - 60; - pdsch_config->p_b = liblte_bits_2_value(ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_pdsch_config_dedicated_ie(LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM p_a, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(p_a, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pdsch_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM *p_a) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(p_a != NULL && - ie_ptr != NULL) - { - *p_a = (LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PHICH Config - - Description: Specifies the PHICH configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_phich_config_ie(LIBLTE_RRC_PHICH_CONFIG_STRUCT *phich_config, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(phich_config != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(phich_config->dur, ie_ptr, 1); - liblte_value_2_bits(phich_config->res, ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_phich_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHICH_CONFIG_STRUCT *phich_config) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - phich_config != NULL) - { - phich_config->dur = (LIBLTE_RRC_PHICH_DURATION_ENUM)liblte_bits_2_value(ie_ptr, 1); - phich_config->res = (LIBLTE_RRC_PHICH_RESOURCE_ENUM)liblte_bits_2_value(ie_ptr, 2); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Physical Config Dedicated - - Description: Specifies the UE specific physical channel - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_physical_config_dedicated_ie(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cnfg_ded, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext = false; - - if(phy_cnfg_ded != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(ext, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(phy_cnfg_ded->pdsch_cnfg_ded_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->pucch_cnfg_ded_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->pusch_cnfg_ded_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->ul_pwr_ctrl_ded_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->tpc_pdcch_cnfg_pucch_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->tpc_pdcch_cnfg_pusch_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->cqi_report_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->srs_ul_cnfg_ded_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->antenna_info_present, ie_ptr, 1); - liblte_value_2_bits(phy_cnfg_ded->sched_request_cnfg_present, ie_ptr, 1); - - // PDSCH Config - if(phy_cnfg_ded->pdsch_cnfg_ded_present) - { - liblte_rrc_pack_pdsch_config_dedicated_ie(phy_cnfg_ded->pdsch_cnfg_ded, ie_ptr); - } - - // PUCCH Config - if(phy_cnfg_ded->pucch_cnfg_ded_present) - { - liblte_rrc_pack_pucch_config_dedicated_ie(&phy_cnfg_ded->pucch_cnfg_ded, ie_ptr); - } - - // PUSCH Config - if(phy_cnfg_ded->pusch_cnfg_ded_present) - { - liblte_rrc_pack_pusch_config_dedicated_ie(&phy_cnfg_ded->pusch_cnfg_ded, ie_ptr); - } - - // Uplink Power Control - if(phy_cnfg_ded->ul_pwr_ctrl_ded_present) - { - liblte_rrc_pack_ul_power_control_dedicated_ie(&phy_cnfg_ded->ul_pwr_ctrl_ded, ie_ptr); - } - - // TPC PDCCH Config PUCCH - if(phy_cnfg_ded->tpc_pdcch_cnfg_pucch_present) - { - liblte_rrc_pack_tpc_pdcch_config_ie(&phy_cnfg_ded->tpc_pdcch_cnfg_pucch, ie_ptr); - } - - // TPC PDCCH Config PUSCH - if(phy_cnfg_ded->tpc_pdcch_cnfg_pusch_present) - { - liblte_rrc_pack_tpc_pdcch_config_ie(&phy_cnfg_ded->tpc_pdcch_cnfg_pusch, ie_ptr); - } - - // CQI Report Config - if(phy_cnfg_ded->cqi_report_cnfg_present) - { - liblte_rrc_pack_cqi_report_config_ie(&phy_cnfg_ded->cqi_report_cnfg, ie_ptr); - } - - // SRS UL Config - if(phy_cnfg_ded->srs_ul_cnfg_ded_present) - { - liblte_rrc_pack_srs_ul_config_dedicated_ie(&phy_cnfg_ded->srs_ul_cnfg_ded, ie_ptr); - } - - // Antenna Info - if(phy_cnfg_ded->antenna_info_present) - { - liblte_value_2_bits(phy_cnfg_ded->antenna_info_default_value, ie_ptr, 1); - if(!phy_cnfg_ded->antenna_info_default_value) - { - liblte_rrc_pack_antenna_info_dedicated_ie(&phy_cnfg_ded->antenna_info_explicit_value, ie_ptr); - } - } - - // Scheduling Request Config - if(phy_cnfg_ded->sched_request_cnfg_present) - { - liblte_rrc_pack_scheduling_request_config_ie(&phy_cnfg_ded->sched_request_cnfg, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_physical_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cnfg_ded) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext; - - if(ie_ptr != NULL && - phy_cnfg_ded != NULL) - { - // Extension indicator - ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - phy_cnfg_ded->pdsch_cnfg_ded_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->pucch_cnfg_ded_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->pusch_cnfg_ded_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->ul_pwr_ctrl_ded_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->tpc_pdcch_cnfg_pucch_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->tpc_pdcch_cnfg_pusch_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->cqi_report_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->srs_ul_cnfg_ded_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->antenna_info_present = liblte_bits_2_value(ie_ptr, 1); - phy_cnfg_ded->sched_request_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // PDSCH Config - if(phy_cnfg_ded->pdsch_cnfg_ded_present) - { - liblte_rrc_unpack_pdsch_config_dedicated_ie(ie_ptr, &phy_cnfg_ded->pdsch_cnfg_ded); - } - - // PUCCH Config - if(phy_cnfg_ded->pucch_cnfg_ded_present) - { - liblte_rrc_unpack_pucch_config_dedicated_ie(ie_ptr, &phy_cnfg_ded->pucch_cnfg_ded); - } - - // PUSCH Config - if(phy_cnfg_ded->pusch_cnfg_ded_present) - { - liblte_rrc_unpack_pusch_config_dedicated_ie(ie_ptr, &phy_cnfg_ded->pusch_cnfg_ded); - } - - // Uplink Power Control - if(phy_cnfg_ded->ul_pwr_ctrl_ded_present) - { - liblte_rrc_unpack_ul_power_control_dedicated_ie(ie_ptr, &phy_cnfg_ded->ul_pwr_ctrl_ded); - } - - // TPC PDCCH Config PUCCH - if(phy_cnfg_ded->tpc_pdcch_cnfg_pucch_present) - { - liblte_rrc_unpack_tpc_pdcch_config_ie(ie_ptr, &phy_cnfg_ded->tpc_pdcch_cnfg_pucch); - } - - // TPC PDCCH Config PUSCH - if(phy_cnfg_ded->tpc_pdcch_cnfg_pusch_present) - { - liblte_rrc_unpack_tpc_pdcch_config_ie(ie_ptr, &phy_cnfg_ded->tpc_pdcch_cnfg_pusch); - } - - // CQI Report Config - if(phy_cnfg_ded->cqi_report_cnfg_present) - { - liblte_rrc_unpack_cqi_report_config_ie(ie_ptr, &phy_cnfg_ded->cqi_report_cnfg); - } - - // SRS UL Config - if(phy_cnfg_ded->srs_ul_cnfg_ded_present) - { - liblte_rrc_unpack_srs_ul_config_dedicated_ie(ie_ptr, &phy_cnfg_ded->srs_ul_cnfg_ded); - } - - // Antenna Info - if(phy_cnfg_ded->antenna_info_present) - { - phy_cnfg_ded->antenna_info_default_value = liblte_bits_2_value(ie_ptr, 1); - if(!phy_cnfg_ded->antenna_info_default_value) - { - liblte_rrc_unpack_antenna_info_dedicated_ie(ie_ptr, &phy_cnfg_ded->antenna_info_explicit_value); - } - } - - // Scheduling Request Config - if(phy_cnfg_ded->sched_request_cnfg_present) - { - liblte_rrc_unpack_scheduling_request_config_ie(ie_ptr, &phy_cnfg_ded->sched_request_cnfg); - } - - // Consume non-critical extensions - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: P Max - - Description: Limits the UE's uplink transmission power on a - carrier frequency and is used to calculate the - parameter P Compensation - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_p_max_ie(int8 p_max, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(p_max + 30, ie_ptr, 6); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_p_max_ie(uint8 **ie_ptr, - int8 *p_max) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - p_max != NULL) - { - *p_max = (int8)liblte_bits_2_value(ie_ptr, 6) - 30; - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PRACH Config - - Description: Specifies the PRACH configuration in the system - information and in the mobility control information - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_prach_config_sib_ie(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *prach_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(prach_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(prach_cnfg->root_sequence_index, ie_ptr, 10); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.prach_config_index, ie_ptr, 6); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.high_speed_flag, ie_ptr, 1); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.zero_correlation_zone_config, ie_ptr, 4); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.prach_freq_offset, ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_prach_config_sib_ie(uint8 **ie_ptr, - LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *prach_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - prach_cnfg != NULL) - { - prach_cnfg->root_sequence_index = liblte_bits_2_value(ie_ptr, 10); - prach_cnfg->prach_cnfg_info.prach_config_index = liblte_bits_2_value(ie_ptr, 6); - prach_cnfg->prach_cnfg_info.high_speed_flag = liblte_bits_2_value(ie_ptr, 1); - prach_cnfg->prach_cnfg_info.zero_correlation_zone_config = liblte_bits_2_value(ie_ptr, 4); - prach_cnfg->prach_cnfg_info.prach_freq_offset = liblte_bits_2_value(ie_ptr, 7); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_prach_config_ie(LIBLTE_RRC_PRACH_CONFIG_STRUCT *prach_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(prach_cnfg != NULL && - ie_ptr != NULL) - { - // Optional indicator - liblte_value_2_bits(prach_cnfg->prach_cnfg_info_present, ie_ptr, 1); - - liblte_value_2_bits(prach_cnfg->root_sequence_index, ie_ptr, 10); - - if(true == prach_cnfg->prach_cnfg_info_present) - { - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.prach_config_index, ie_ptr, 6); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.high_speed_flag, ie_ptr, 1); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.zero_correlation_zone_config, ie_ptr, 4); - liblte_value_2_bits(prach_cnfg->prach_cnfg_info.prach_freq_offset, ie_ptr, 7); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_prach_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_PRACH_CONFIG_STRUCT *prach_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - prach_cnfg != NULL) - { - // Optional indicator - prach_cnfg->prach_cnfg_info_present = liblte_bits_2_value(ie_ptr, 1); - - prach_cnfg->root_sequence_index = liblte_bits_2_value(ie_ptr, 10); - - if(true == prach_cnfg->prach_cnfg_info_present) - { - prach_cnfg->prach_cnfg_info.prach_config_index = liblte_bits_2_value(ie_ptr, 6); - prach_cnfg->prach_cnfg_info.high_speed_flag = liblte_bits_2_value(ie_ptr, 1); - prach_cnfg->prach_cnfg_info.zero_correlation_zone_config = liblte_bits_2_value(ie_ptr, 4); - prach_cnfg->prach_cnfg_info.prach_freq_offset = liblte_bits_2_value(ie_ptr, 7); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_prach_config_scell_r10_ie(uint8 prach_cnfg_idx, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(prach_cnfg_idx, ie_ptr, 6); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_prach_config_scell_r10_ie(uint8 **ie_ptr, - uint8 *prach_cnfg_idx) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - prach_cnfg_idx != NULL) - { - *prach_cnfg_idx = liblte_bits_2_value(ie_ptr, 6); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Presence Antenna Port 1 - - Description: Indicates whether all the neighboring cells use - antenna port 1 - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_presence_antenna_port_1_ie(bool presence_ant_port_1, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(presence_ant_port_1, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_presence_antenna_port_1_ie(uint8 **ie_ptr, - bool *presence_ant_port_1) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - presence_ant_port_1 != NULL) - { - *presence_ant_port_1 = liblte_bits_2_value(ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PUCCH Config - - Description: Specifies the common and the UE specific PUCCH - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pucch_config_common_ie(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT *pucch_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pucch_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(pucch_cnfg->delta_pucch_shift, ie_ptr, 2); - liblte_value_2_bits(pucch_cnfg->n_rb_cqi, ie_ptr, 7); - liblte_value_2_bits(pucch_cnfg->n_cs_an, ie_ptr, 3); - liblte_value_2_bits(pucch_cnfg->n1_pucch_an, ie_ptr, 11); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pucch_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT *pucch_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pucch_cnfg != NULL) - { - pucch_cnfg->delta_pucch_shift = (LIBLTE_RRC_DELTA_PUCCH_SHIFT_ENUM)liblte_bits_2_value(ie_ptr, 2); - pucch_cnfg->n_rb_cqi = liblte_bits_2_value(ie_ptr, 7); - pucch_cnfg->n_cs_an = liblte_bits_2_value(ie_ptr, 3); - pucch_cnfg->n1_pucch_an = liblte_bits_2_value(ie_ptr, 11); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_pucch_config_dedicated_ie(LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT *pucch_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pucch_cnfg != NULL && - ie_ptr != NULL) - { - // Optional indicator - liblte_value_2_bits(pucch_cnfg->tdd_ack_nack_feedback_mode_present, ie_ptr, 1); - - // Ack/Nack Repetition - liblte_value_2_bits(pucch_cnfg->ack_nack_repetition_setup_present, ie_ptr, 1); - if(pucch_cnfg->ack_nack_repetition_setup_present) - { - // Repetition Factor - liblte_value_2_bits(pucch_cnfg->ack_nack_repetition_factor, ie_ptr, 2); - - // N1 PUCCH AN Repetition - liblte_value_2_bits(pucch_cnfg->ack_nack_repetition_n1_pucch_an, ie_ptr, 11); - } - - // TDD Ack/Nack Feedback Mode - if(pucch_cnfg->tdd_ack_nack_feedback_mode_present) - { - liblte_value_2_bits(pucch_cnfg->tdd_ack_nack_feedback_mode, ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pucch_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT *pucch_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pucch_cnfg != NULL) - { - // Optional indicator - pucch_cnfg->tdd_ack_nack_feedback_mode_present = liblte_bits_2_value(ie_ptr, 1); - - // Ack/Nack Repetition - pucch_cnfg->ack_nack_repetition_setup_present = liblte_bits_2_value(ie_ptr, 1); - if(pucch_cnfg->ack_nack_repetition_setup_present) - { - // Repetition Factor - pucch_cnfg->ack_nack_repetition_factor = (LIBLTE_RRC_ACK_NACK_REPETITION_FACTOR_ENUM)liblte_bits_2_value(ie_ptr, 2); - - // N1 PUCCH AN Repetition - pucch_cnfg->ack_nack_repetition_n1_pucch_an = liblte_bits_2_value(ie_ptr, 11); - } - - // TDD Ack/Nack Feedback Mode - if(pucch_cnfg->tdd_ack_nack_feedback_mode_present) - { - pucch_cnfg->tdd_ack_nack_feedback_mode = (LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: PUSCH Config - - Description: Specifies the common and the UE specific PUSCH - configuration and the reference signal configuration - for PUSCH and PUCCH - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pusch_config_common_ie(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT *pusch_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pusch_cnfg != NULL && - ie_ptr != NULL) - { - // PUSCH Config Basic - liblte_value_2_bits(pusch_cnfg->n_sb - 1, ie_ptr, 2); - liblte_value_2_bits(pusch_cnfg->hopping_mode, ie_ptr, 1); - liblte_value_2_bits(pusch_cnfg->pusch_hopping_offset, ie_ptr, 7); - liblte_value_2_bits(pusch_cnfg->enable_64_qam, ie_ptr, 1); - - // UL Reference Signals PUSCH - liblte_value_2_bits(pusch_cnfg->ul_rs.group_hopping_enabled, ie_ptr, 1); - liblte_value_2_bits(pusch_cnfg->ul_rs.group_assignment_pusch, ie_ptr, 5); - liblte_value_2_bits(pusch_cnfg->ul_rs.sequence_hopping_enabled, ie_ptr, 1); - liblte_value_2_bits(pusch_cnfg->ul_rs.cyclic_shift, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pusch_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT *pusch_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pusch_cnfg != NULL) - { - // PUSCH Config Basic - pusch_cnfg->n_sb = liblte_bits_2_value(ie_ptr, 2) + 1; - pusch_cnfg->hopping_mode = (LIBLTE_RRC_HOPPING_MODE_ENUM)liblte_bits_2_value(ie_ptr, 1); - pusch_cnfg->pusch_hopping_offset = liblte_bits_2_value(ie_ptr, 7); - pusch_cnfg->enable_64_qam = liblte_bits_2_value(ie_ptr, 1); - - // UL Reference Signals PUSCH - pusch_cnfg->ul_rs.group_hopping_enabled = liblte_bits_2_value(ie_ptr, 1); - pusch_cnfg->ul_rs.group_assignment_pusch = liblte_bits_2_value(ie_ptr, 5); - pusch_cnfg->ul_rs.sequence_hopping_enabled = liblte_bits_2_value(ie_ptr, 1); - pusch_cnfg->ul_rs.cyclic_shift = liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_pusch_config_dedicated_ie(LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT *pusch_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(pusch_cnfg != NULL && - ie_ptr != NULL) - { - // Beta Offset ACK Index - liblte_value_2_bits(pusch_cnfg->beta_offset_ack_idx, ie_ptr, 4); - - // Beta Offset RI Index - liblte_value_2_bits(pusch_cnfg->beta_offset_ri_idx, ie_ptr, 4); - - // Beta Offset CQI Index - liblte_value_2_bits(pusch_cnfg->beta_offset_cqi_idx, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pusch_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT *pusch_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - pusch_cnfg != NULL) - { - // Beta Offset ACK Index - pusch_cnfg->beta_offset_ack_idx = liblte_bits_2_value(ie_ptr, 4); - - // Beta Offset RI Index - pusch_cnfg->beta_offset_ri_idx = liblte_bits_2_value(ie_ptr, 4); - - // Beta Offset CQI Index - pusch_cnfg->beta_offset_cqi_idx = liblte_bits_2_value(ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RACH Config Common - - Description: Specifies the generic random access parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rach_config_common_ie(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT *rach_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rach_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Preamble Info - liblte_value_2_bits(rach_cnfg->preambles_group_a_cnfg.present, ie_ptr, 1); - liblte_value_2_bits(rach_cnfg->num_ra_preambles, ie_ptr, 4); - if(true == rach_cnfg->preambles_group_a_cnfg.present) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(rach_cnfg->preambles_group_a_cnfg.size_of_ra, ie_ptr, 4); - liblte_value_2_bits(rach_cnfg->preambles_group_a_cnfg.msg_size, ie_ptr, 2); - liblte_value_2_bits(rach_cnfg->preambles_group_a_cnfg.msg_pwr_offset_group_b, ie_ptr, 3); - } - - // Power Ramping Parameters - liblte_value_2_bits(rach_cnfg->pwr_ramping_step, ie_ptr, 2); - liblte_value_2_bits(rach_cnfg->preamble_init_rx_target_pwr, ie_ptr, 4); - - // RA Supervision Info - liblte_value_2_bits(rach_cnfg->preamble_trans_max, ie_ptr, 4); - liblte_value_2_bits(rach_cnfg->ra_resp_win_size, ie_ptr, 3); - liblte_value_2_bits(rach_cnfg->mac_con_res_timer, ie_ptr, 3); - - liblte_value_2_bits(rach_cnfg->max_harq_msg3_tx - 1, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rach_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT *rach_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rach_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Preamble Info - rach_cnfg->preambles_group_a_cnfg.present = liblte_bits_2_value(ie_ptr, 1); - rach_cnfg->num_ra_preambles = (LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_ENUM)liblte_bits_2_value(ie_ptr, 4); - if(true == rach_cnfg->preambles_group_a_cnfg.present) - { - // Extension indicator - bool ext2 = liblte_bits_2_value(ie_ptr, 1); - - rach_cnfg->preambles_group_a_cnfg.size_of_ra = (LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_ENUM)liblte_bits_2_value(ie_ptr, 4); - rach_cnfg->preambles_group_a_cnfg.msg_size = (LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_ENUM)liblte_bits_2_value(ie_ptr, 2); - rach_cnfg->preambles_group_a_cnfg.msg_pwr_offset_group_b = (LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_ENUM)liblte_bits_2_value(ie_ptr, 3); - - liblte_rrc_consume_noncrit_extension(ext2, __func__, ie_ptr); - - }else{ - rach_cnfg->preambles_group_a_cnfg.size_of_ra = (LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_ENUM)rach_cnfg->num_ra_preambles; - } - - // Power Ramping Parameters - rach_cnfg->pwr_ramping_step = (LIBLTE_RRC_POWER_RAMPING_STEP_ENUM)liblte_bits_2_value(ie_ptr, 2); - rach_cnfg->preamble_init_rx_target_pwr = (LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // RA Supervision Info - rach_cnfg->preamble_trans_max = (LIBLTE_RRC_PREAMBLE_TRANS_MAX_ENUM)liblte_bits_2_value(ie_ptr, 4); - rach_cnfg->ra_resp_win_size = (LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_ENUM)liblte_bits_2_value(ie_ptr, 3); - rach_cnfg->mac_con_res_timer = (LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - - rach_cnfg->max_harq_msg3_tx = liblte_bits_2_value(ie_ptr, 3) + 1; - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RACH Config Dedicated - - Description: Specifies the dedicated random access parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rach_config_dedicated_ie(LIBLTE_RRC_RACH_CONFIG_DEDICATED_STRUCT *rach_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rach_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(rach_cnfg->preamble_index, ie_ptr, 6); - liblte_value_2_bits(rach_cnfg->prach_mask_index, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rach_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_RACH_CONFIG_DEDICATED_STRUCT *rach_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rach_cnfg != NULL) - { - rach_cnfg->preamble_index = liblte_bits_2_value(ie_ptr, 6); - rach_cnfg->prach_mask_index = liblte_bits_2_value(ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Radio Resource Config Common - - Description: Specifies the common radio resource configurations - in the system information and in the mobility control - information, including random access parameters - and static physical layer parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rr_config_common_sib_ie(LIBLTE_RRC_RR_CONFIG_COMMON_SIB_STRUCT *rr_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rr_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_rrc_pack_rach_config_common_ie(&rr_cnfg->rach_cnfg, ie_ptr); - - // BCCH Config - liblte_value_2_bits(rr_cnfg->bcch_cnfg.modification_period_coeff, ie_ptr, 2); - - // PCCH Config - liblte_value_2_bits(rr_cnfg->pcch_cnfg.default_paging_cycle, ie_ptr, 2); - liblte_value_2_bits(rr_cnfg->pcch_cnfg.nB, ie_ptr, 3); - - liblte_rrc_pack_prach_config_sib_ie(&rr_cnfg->prach_cnfg, ie_ptr); - liblte_rrc_pack_pdsch_config_common_ie(&rr_cnfg->pdsch_cnfg, ie_ptr); - liblte_rrc_pack_pusch_config_common_ie(&rr_cnfg->pusch_cnfg, ie_ptr); - liblte_rrc_pack_pucch_config_common_ie(&rr_cnfg->pucch_cnfg, ie_ptr); - liblte_rrc_pack_srs_ul_config_common_ie(&rr_cnfg->srs_ul_cnfg, ie_ptr); - liblte_rrc_pack_ul_power_control_common_ie(&rr_cnfg->ul_pwr_ctrl, ie_ptr); - - // UL CP Length - liblte_value_2_bits(rr_cnfg->ul_cp_length, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rr_config_common_sib_ie(uint8 **ie_ptr, - LIBLTE_RRC_RR_CONFIG_COMMON_SIB_STRUCT *rr_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rr_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_rach_config_common_ie(ie_ptr, &rr_cnfg->rach_cnfg); - - // BCCH Config - rr_cnfg->bcch_cnfg.modification_period_coeff = (LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_ENUM)liblte_bits_2_value(ie_ptr, 2); - - // PCCH Config - rr_cnfg->pcch_cnfg.default_paging_cycle = (LIBLTE_RRC_DEFAULT_PAGING_CYCLE_ENUM)liblte_bits_2_value(ie_ptr, 2); - rr_cnfg->pcch_cnfg.nB = (LIBLTE_RRC_NB_ENUM)liblte_bits_2_value(ie_ptr, 3); - - liblte_rrc_unpack_prach_config_sib_ie(ie_ptr, &rr_cnfg->prach_cnfg); - liblte_rrc_unpack_pdsch_config_common_ie(ie_ptr, &rr_cnfg->pdsch_cnfg); - liblte_rrc_unpack_pusch_config_common_ie(ie_ptr, &rr_cnfg->pusch_cnfg); - liblte_rrc_unpack_pucch_config_common_ie(ie_ptr, &rr_cnfg->pucch_cnfg); - liblte_rrc_unpack_srs_ul_config_common_ie(ie_ptr, &rr_cnfg->srs_ul_cnfg); - liblte_rrc_unpack_ul_power_control_common_ie(ie_ptr, &rr_cnfg->ul_pwr_ctrl); - - // UL CP Length - rr_cnfg->ul_cp_length = (LIBLTE_RRC_UL_CP_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_rr_config_common_ie(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *rr_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rr_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(rr_cnfg->rach_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->pdsch_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->phich_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->pucch_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->srs_ul_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->ul_pwr_ctrl_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->ant_info_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->p_max_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->tdd_cnfg_present, ie_ptr, 1); - - // RACH Config Common - if(rr_cnfg->rach_cnfg_present) - { - liblte_rrc_pack_rach_config_common_ie(&rr_cnfg->rach_cnfg, ie_ptr); - } - - // PRACH Config - liblte_rrc_pack_prach_config_ie(&rr_cnfg->prach_cnfg, ie_ptr); - - // PDSCH Config Common - if(rr_cnfg->pdsch_cnfg_present) - { - liblte_rrc_pack_pdsch_config_common_ie(&rr_cnfg->pdsch_cnfg, ie_ptr); - } - - // PUSCH Config Common - liblte_rrc_pack_pusch_config_common_ie(&rr_cnfg->pusch_cnfg, ie_ptr); - - // PHICH Config - if(rr_cnfg->phich_cnfg_present) - { - liblte_rrc_pack_phich_config_ie(&rr_cnfg->phich_cnfg, ie_ptr); - } - - // PUCCH Config Common - if(rr_cnfg->pucch_cnfg_present) - { - liblte_rrc_pack_pucch_config_common_ie(&rr_cnfg->pucch_cnfg, ie_ptr); - } - - // Sounding RS UL Config Common - if(rr_cnfg->srs_ul_cnfg_present) - { - liblte_rrc_pack_srs_ul_config_common_ie(&rr_cnfg->srs_ul_cnfg, ie_ptr); - } - - // Antenna Info Common - if(rr_cnfg->ant_info_present) - { - liblte_rrc_pack_antenna_info_common_ie(rr_cnfg->ant_info, ie_ptr); - } - - // P Max - if(rr_cnfg->p_max_present) - { - liblte_rrc_pack_p_max_ie(rr_cnfg->p_max, ie_ptr); - } - - // TDD Config - if(rr_cnfg->tdd_cnfg_present) - { - liblte_rrc_pack_tdd_config_ie(&rr_cnfg->tdd_cnfg, ie_ptr); - } - - // UL CP Length - liblte_value_2_bits(rr_cnfg->ul_cp_length, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rr_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *rr_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rr_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - rr_cnfg->rach_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->pdsch_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->phich_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->pucch_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->srs_ul_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->ul_pwr_ctrl_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->ant_info_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->p_max_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->tdd_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // RACH Config Common - if(rr_cnfg->rach_cnfg_present) - { - liblte_rrc_unpack_rach_config_common_ie(ie_ptr, &rr_cnfg->rach_cnfg); - } - - // PRACH Config - liblte_rrc_unpack_prach_config_ie(ie_ptr, &rr_cnfg->prach_cnfg); - - // PDSCH Config Common - if(rr_cnfg->pdsch_cnfg_present) - { - liblte_rrc_unpack_pdsch_config_common_ie(ie_ptr, &rr_cnfg->pdsch_cnfg); - } - - // PUSCH Config Common - liblte_rrc_unpack_pusch_config_common_ie(ie_ptr, &rr_cnfg->pusch_cnfg); - - // PHICH Config - if(rr_cnfg->phich_cnfg_present) - { - liblte_rrc_unpack_phich_config_ie(ie_ptr, &rr_cnfg->phich_cnfg); - } - - // PUCCH Config Common - if(rr_cnfg->pucch_cnfg_present) - { - liblte_rrc_unpack_pucch_config_common_ie(ie_ptr, &rr_cnfg->pucch_cnfg); - } - - // Sounding RS UL Config Common - if(rr_cnfg->srs_ul_cnfg_present) - { - liblte_rrc_unpack_srs_ul_config_common_ie(ie_ptr, &rr_cnfg->srs_ul_cnfg); - } - - // Antenna Info Common - if(rr_cnfg->ant_info_present) - { - liblte_rrc_unpack_antenna_info_common_ie(ie_ptr, &rr_cnfg->ant_info); - } - - // P Max - if(rr_cnfg->p_max_present) - { - liblte_rrc_unpack_p_max_ie(ie_ptr, &rr_cnfg->p_max); - } - - // TDD Config - if(rr_cnfg->tdd_cnfg_present) - { - liblte_rrc_unpack_tdd_config_ie(ie_ptr, &rr_cnfg->tdd_cnfg); - } - - // UL CP Length - rr_cnfg->ul_cp_length = (LIBLTE_RRC_UL_CP_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Radio Resource Config Dedicated - - Description: Sets up/Modifies/Releases RBs, modifies the MAC - main configuration, modifies the SPS configuration - and modifies dedicated physical configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rr_config_dedicated_ie(LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT *rr_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(rr_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(rr_cnfg->rlf_timers_and_constants_present, ie_ptr, 1); - - // Optional indicators - if(rr_cnfg->srb_to_add_mod_list_size != 0) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - if(rr_cnfg->drb_to_add_mod_list_size != 0) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - if(rr_cnfg->drb_to_release_list_size != 0) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(rr_cnfg->mac_main_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->sps_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->phy_cnfg_ded_present, ie_ptr, 1); - - // SRB To Add Mod List - if(rr_cnfg->srb_to_add_mod_list_size != 0) - { - liblte_value_2_bits(rr_cnfg->srb_to_add_mod_list_size - 1, ie_ptr, 1); - } - for(i=0; isrb_to_add_mod_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(rr_cnfg->srb_to_add_mod_list[i].rlc_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->srb_to_add_mod_list[i].lc_cnfg_present, ie_ptr, 1); - - // SRB Identity - liblte_value_2_bits(rr_cnfg->srb_to_add_mod_list[i].srb_id - 1, ie_ptr, 1); - - // RLC Config - if(rr_cnfg->srb_to_add_mod_list[i].rlc_cnfg_present) - { - // Choice - liblte_value_2_bits(rr_cnfg->srb_to_add_mod_list[i].rlc_default_cnfg_present, ie_ptr, 1); - - // Explicit Config - if(!rr_cnfg->srb_to_add_mod_list[i].rlc_default_cnfg_present) - { - liblte_rrc_pack_rlc_config_ie(&rr_cnfg->srb_to_add_mod_list[i].rlc_explicit_cnfg, ie_ptr); - } - } - - // Logical Channel Config - if(rr_cnfg->srb_to_add_mod_list[i].lc_cnfg_present) - { - // Choice - liblte_value_2_bits(rr_cnfg->srb_to_add_mod_list[i].lc_default_cnfg_present, ie_ptr, 1); - - // Explicit Config - if(!rr_cnfg->srb_to_add_mod_list[i].lc_default_cnfg_present) - { - liblte_rrc_pack_logical_channel_config_ie(&rr_cnfg->srb_to_add_mod_list[i].lc_explicit_cnfg, ie_ptr); - } - } - } - - // DRB To Add Mod List - if(rr_cnfg->drb_to_add_mod_list_size != 0) - { - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list_size - 1, ie_ptr, 4); - } - for(i=0; idrb_to_add_mod_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].eps_bearer_id_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].pdcp_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].rlc_cnfg_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].lc_id_present, ie_ptr, 1); - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].lc_cnfg_present, ie_ptr, 1); - - // EPS Bearer Identity - if(rr_cnfg->drb_to_add_mod_list[i].eps_bearer_id_present) - { - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].eps_bearer_id, ie_ptr, 4); - } - - // DRB Identity - liblte_rrc_pack_drb_identity_ie(rr_cnfg->drb_to_add_mod_list[i].drb_id, ie_ptr); - - // PDCP Config - if(rr_cnfg->drb_to_add_mod_list[i].pdcp_cnfg_present) - { - liblte_rrc_pack_pdcp_config_ie(&rr_cnfg->drb_to_add_mod_list[i].pdcp_cnfg, ie_ptr); - } - - // RLC Config - if(rr_cnfg->drb_to_add_mod_list[i].rlc_cnfg_present) - { - liblte_rrc_pack_rlc_config_ie(&rr_cnfg->drb_to_add_mod_list[i].rlc_cnfg, ie_ptr); - } - - // Logical Channel Identity - if(rr_cnfg->drb_to_add_mod_list[i].lc_id_present) - { - liblte_value_2_bits(rr_cnfg->drb_to_add_mod_list[i].lc_id - 3, ie_ptr, 3); - } - - // Logical Channel Configuration - if(rr_cnfg->drb_to_add_mod_list[i].lc_cnfg_present) - { - liblte_rrc_pack_logical_channel_config_ie(&rr_cnfg->drb_to_add_mod_list[i].lc_cnfg, ie_ptr); - } - } - - // DRB To Release List - if(rr_cnfg->drb_to_release_list_size != 0) - { - liblte_value_2_bits(rr_cnfg->drb_to_release_list_size - 1, ie_ptr, 4); - } - for(i=0; idrb_to_release_list_size; i++) - { - liblte_rrc_pack_drb_identity_ie(rr_cnfg->drb_to_release_list[i], ie_ptr); - } - - // MAC Main Config - if(rr_cnfg->mac_main_cnfg_present) - { - liblte_value_2_bits(rr_cnfg->mac_main_cnfg.default_value, ie_ptr, 1); - if(!rr_cnfg->mac_main_cnfg.default_value) - { - liblte_rrc_pack_mac_main_config_ie(&rr_cnfg->mac_main_cnfg.explicit_value, ie_ptr); - } - } - - // SPS Config - if(rr_cnfg->sps_cnfg_present) - { - liblte_rrc_pack_sps_config_ie(&rr_cnfg->sps_cnfg, ie_ptr); - } - - // Physical Config Dedicated - if(rr_cnfg->phy_cnfg_ded_present) - { - liblte_rrc_pack_physical_config_dedicated_ie(&rr_cnfg->phy_cnfg_ded, ie_ptr); - } - - // Extension - // Optional indicators - liblte_value_2_bits(rr_cnfg->rlf_timers_and_constants_present, ie_ptr, 1); - - // RLF Timers and Constants - if(rr_cnfg->rlf_timers_and_constants_present) - { - liblte_rrc_pack_rlf_timers_and_constants_ie(&rr_cnfg->rlf_timers_and_constants, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rr_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT *rr_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool ext; - bool srb_ext; - bool drb_ext; - bool srb_to_add_mod_list_present; - bool drb_to_add_mod_list_present; - bool drb_to_release_list_present; - - if(ie_ptr != NULL && - rr_cnfg != NULL) - { - // Extension indicator - ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - srb_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - drb_to_add_mod_list_present = liblte_bits_2_value(ie_ptr, 1); - drb_to_release_list_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->mac_main_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->sps_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->phy_cnfg_ded_present = liblte_bits_2_value(ie_ptr, 1); - - // SRB To Add Mod List - if(srb_to_add_mod_list_present) - { - rr_cnfg->srb_to_add_mod_list_size = liblte_bits_2_value(ie_ptr, 1) + 1; - for(i=0; isrb_to_add_mod_list_size; i++) - { - // Extension indicator - srb_ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - rr_cnfg->srb_to_add_mod_list[i].rlc_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->srb_to_add_mod_list[i].lc_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // SRB Identity - rr_cnfg->srb_to_add_mod_list[i].srb_id = liblte_bits_2_value(ie_ptr, 1) + 1; - - // RLC Config - if(rr_cnfg->srb_to_add_mod_list[i].rlc_cnfg_present) - { - // Choice - rr_cnfg->srb_to_add_mod_list[i].rlc_default_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // Explicit Config - if(!rr_cnfg->srb_to_add_mod_list[i].rlc_default_cnfg_present) - { - liblte_rrc_unpack_rlc_config_ie(ie_ptr, &rr_cnfg->srb_to_add_mod_list[i].rlc_explicit_cnfg); - } - } - - // Logical Channel Config - if(rr_cnfg->srb_to_add_mod_list[i].lc_cnfg_present) - { - // Choice - rr_cnfg->srb_to_add_mod_list[i].lc_default_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // Explicit Config - if(!rr_cnfg->srb_to_add_mod_list[i].lc_default_cnfg_present) - { - liblte_rrc_unpack_logical_channel_config_ie(ie_ptr, &rr_cnfg->srb_to_add_mod_list[i].lc_explicit_cnfg); - } - } - - // Consume non-critical extensions - liblte_rrc_consume_noncrit_extension(srb_ext, __func__, ie_ptr); - } - } - - // DRB To Add Mod List - if(drb_to_add_mod_list_present) - { - rr_cnfg->drb_to_add_mod_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; idrb_to_add_mod_list_size; i++) - { - // Extension indicator - drb_ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - rr_cnfg->drb_to_add_mod_list[i].eps_bearer_id_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->drb_to_add_mod_list[i].pdcp_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->drb_to_add_mod_list[i].rlc_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->drb_to_add_mod_list[i].lc_id_present = liblte_bits_2_value(ie_ptr, 1); - rr_cnfg->drb_to_add_mod_list[i].lc_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // EPS Bearer Identity - if(rr_cnfg->drb_to_add_mod_list[i].eps_bearer_id_present) - { - rr_cnfg->drb_to_add_mod_list[i].eps_bearer_id = liblte_bits_2_value(ie_ptr, 4); - } - - // DRB Identity - liblte_rrc_unpack_drb_identity_ie(ie_ptr, &rr_cnfg->drb_to_add_mod_list[i].drb_id); - - // PDCP Config - if(rr_cnfg->drb_to_add_mod_list[i].pdcp_cnfg_present) - { - liblte_rrc_unpack_pdcp_config_ie(ie_ptr, &rr_cnfg->drb_to_add_mod_list[i].pdcp_cnfg); - } - - // RLC Config - if(rr_cnfg->drb_to_add_mod_list[i].rlc_cnfg_present) - { - liblte_rrc_unpack_rlc_config_ie(ie_ptr, &rr_cnfg->drb_to_add_mod_list[i].rlc_cnfg); - } - - // Logical Channel Identity - if(rr_cnfg->drb_to_add_mod_list[i].lc_id_present) - { - rr_cnfg->drb_to_add_mod_list[i].lc_id = liblte_bits_2_value(ie_ptr, 3) + 3; - } - - // Logical Channel Configuration - if(rr_cnfg->drb_to_add_mod_list[i].lc_cnfg_present) - { - liblte_rrc_unpack_logical_channel_config_ie(ie_ptr, &rr_cnfg->drb_to_add_mod_list[i].lc_cnfg); - } - - // Consume non-critical extensions - liblte_rrc_consume_noncrit_extension(drb_ext, __func__, ie_ptr); - } - } - - // DRB To Release List - if(drb_to_release_list_present) - { - rr_cnfg->drb_to_release_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; idrb_to_release_list_size; i++) - { - liblte_rrc_unpack_drb_identity_ie(ie_ptr, &rr_cnfg->drb_to_release_list[i]); - } - } - - // MAC Main Config - if(rr_cnfg->mac_main_cnfg_present) - { - rr_cnfg->mac_main_cnfg.default_value = liblte_bits_2_value(ie_ptr, 1); - if(!rr_cnfg->mac_main_cnfg.default_value) - { - liblte_rrc_unpack_mac_main_config_ie(ie_ptr, &rr_cnfg->mac_main_cnfg.explicit_value); - } - } - - // SPS Config - if(rr_cnfg->sps_cnfg_present) - { - liblte_rrc_unpack_sps_config_ie(ie_ptr, &rr_cnfg->sps_cnfg); - } - - // Physical Config Dedicated - if(rr_cnfg->phy_cnfg_ded_present) - { - liblte_rrc_unpack_physical_config_dedicated_ie(ie_ptr, &rr_cnfg->phy_cnfg_ded); - } - - // Extension (FIXME: only handling r9 extensions) -#if 0 - if(ext) - { - // Optional indicators - rr_cnfg->rlf_timers_and_constants_present = liblte_bits_2_value(ie_ptr, 1); - - // RLF Timers and Constants - if(rr_cnfg->rlf_timers_and_constants_present) - { - liblte_rrc_unpack_rlf_timers_and_constants_ie(ie_ptr, &rr_cnfg->rlf_timers_and_constants); - } - } -#endif - // Modified by ismael, just skip extensions - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RLC Config - - Description: Specifies the RLC configuration of SRBs and DRBs - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rlc_config_ie(LIBLTE_RRC_RLC_CONFIG_STRUCT *rlc_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rlc_cnfg != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Mode Choice - liblte_value_2_bits(rlc_cnfg->rlc_mode, ie_ptr, 2); - - if(LIBLTE_RRC_RLC_MODE_AM == rlc_cnfg->rlc_mode) - { - // UL AM RLC - { - // T Poll Retransmit - liblte_value_2_bits(rlc_cnfg->ul_am_rlc.t_poll_retx, ie_ptr, 6); - - // Poll PDU - liblte_value_2_bits(rlc_cnfg->ul_am_rlc.poll_pdu, ie_ptr, 3); - - // Poll Byte - liblte_value_2_bits(rlc_cnfg->ul_am_rlc.poll_byte, ie_ptr, 4); - - // Max Retransmission Threshold - liblte_value_2_bits(rlc_cnfg->ul_am_rlc.max_retx_thresh, ie_ptr, 3); - } - - // DL AM RLC - { - // T Reordering - liblte_value_2_bits(rlc_cnfg->dl_am_rlc.t_reordering, ie_ptr, 5); - - // T Status Prohibit - liblte_value_2_bits(rlc_cnfg->dl_am_rlc.t_status_prohibit, ie_ptr, 6); - } - }else if(LIBLTE_RRC_RLC_MODE_UM_BI == rlc_cnfg->rlc_mode){ - // UL UM RLC - { - // SN Field Length - liblte_value_2_bits(rlc_cnfg->ul_um_bi_rlc.sn_field_len, ie_ptr, 1); - } - - // DL UM RLC - { - // SN Field Length - liblte_value_2_bits(rlc_cnfg->dl_um_bi_rlc.sn_field_len, ie_ptr, 1); - - // T Reordering - liblte_value_2_bits(rlc_cnfg->dl_um_bi_rlc.t_reordering, ie_ptr, 5); - } - }else if(LIBLTE_RRC_RLC_MODE_UM_UNI_UL == rlc_cnfg->rlc_mode){ - // SN Field Length - liblte_value_2_bits(rlc_cnfg->ul_um_uni_rlc.sn_field_len, ie_ptr, 1); - }else{ // LIBLTE_RRC_RLC_MODE_UM_UNI_DL == rlc_cnfg->rlc_mode - // SN Field Length - liblte_value_2_bits(rlc_cnfg->dl_um_uni_rlc.sn_field_len, ie_ptr, 1); - - // T Reordering - liblte_value_2_bits(rlc_cnfg->dl_um_uni_rlc.t_reordering, ie_ptr, 5); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rlc_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_RLC_CONFIG_STRUCT *rlc_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rlc_cnfg != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Mode Choice - rlc_cnfg->rlc_mode = (LIBLTE_RRC_RLC_MODE_ENUM)liblte_bits_2_value(ie_ptr, 2); - - if(LIBLTE_RRC_RLC_MODE_AM == rlc_cnfg->rlc_mode) - { - // UL AM RLC - { - // T Poll Retransmit - rlc_cnfg->ul_am_rlc.t_poll_retx = (LIBLTE_RRC_T_POLL_RETRANSMIT_ENUM)liblte_bits_2_value(ie_ptr, 6); - - // Poll PDU - rlc_cnfg->ul_am_rlc.poll_pdu = (LIBLTE_RRC_POLL_PDU_ENUM)liblte_bits_2_value(ie_ptr, 3); - - // Poll Byte - rlc_cnfg->ul_am_rlc.poll_byte = (LIBLTE_RRC_POLL_BYTE_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // Max Retransmission Threshold - rlc_cnfg->ul_am_rlc.max_retx_thresh = (LIBLTE_RRC_MAX_RETX_THRESHOLD_ENUM)liblte_bits_2_value(ie_ptr, 3); - } - - // DL AM RLC - { - // T Reordering - rlc_cnfg->dl_am_rlc.t_reordering = (LIBLTE_RRC_T_REORDERING_ENUM)liblte_bits_2_value(ie_ptr, 5); - - // T Status Prohibit - rlc_cnfg->dl_am_rlc.t_status_prohibit = (LIBLTE_RRC_T_STATUS_PROHIBIT_ENUM)liblte_bits_2_value(ie_ptr, 6); - } - }else if(LIBLTE_RRC_RLC_MODE_UM_BI == rlc_cnfg->rlc_mode){ - // UL UM RLC - { - // SN Field Length - rlc_cnfg->ul_um_bi_rlc.sn_field_len = (LIBLTE_RRC_SN_FIELD_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - // DL UM RLC - { - // SN Field Length - rlc_cnfg->dl_um_bi_rlc.sn_field_len = (LIBLTE_RRC_SN_FIELD_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - - // T Reordering - rlc_cnfg->dl_um_bi_rlc.t_reordering = (LIBLTE_RRC_T_REORDERING_ENUM)liblte_bits_2_value(ie_ptr, 5); - } - }else if(LIBLTE_RRC_RLC_MODE_UM_UNI_UL == rlc_cnfg->rlc_mode){ - // SN Field Length - rlc_cnfg->ul_um_uni_rlc.sn_field_len = (LIBLTE_RRC_SN_FIELD_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - }else{ // LIBLTE_RRC_RLC_MODE_UM_UNI_DL == rlc_cnfg->rlc_mode - // SN Field Length - rlc_cnfg->dl_um_uni_rlc.sn_field_len = (LIBLTE_RRC_SN_FIELD_LENGTH_ENUM)liblte_bits_2_value(ie_ptr, 1); - - // T Reordering - rlc_cnfg->dl_um_uni_rlc.t_reordering = (LIBLTE_RRC_T_REORDERING_ENUM)liblte_bits_2_value(ie_ptr, 5); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RLF Timers and Constants - - Description: Contains UE specific timers and constants applicable - for UEs in RRC_CONNECTED - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rlf_timers_and_constants_ie(LIBLTE_RRC_RLF_TIMERS_AND_CONSTANTS_STRUCT *rlf_timers_and_constants, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(rlf_timers_and_constants != NULL && - ie_ptr != NULL) - { - // Release choice - liblte_value_2_bits(1, ie_ptr, 1); - - // Extension - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(rlf_timers_and_constants->t301, ie_ptr, 3); - liblte_value_2_bits(rlf_timers_and_constants->t310, ie_ptr, 3); - liblte_value_2_bits(rlf_timers_and_constants->n310, ie_ptr, 3); - liblte_value_2_bits(rlf_timers_and_constants->t311, ie_ptr, 3); - liblte_value_2_bits(rlf_timers_and_constants->n311, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rlf_timers_and_constants_ie(uint8 **ie_ptr, - LIBLTE_RRC_RLF_TIMERS_AND_CONSTANTS_STRUCT *rlf_timers_and_constants) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - rlf_timers_and_constants != NULL) - { - // Release choice - liblte_bits_2_value(ie_ptr, 1); - - // Extension - liblte_bits_2_value(ie_ptr, 1); - - rlf_timers_and_constants->t301 = (LIBLTE_RRC_T301_ENUM)liblte_bits_2_value(ie_ptr, 3); - rlf_timers_and_constants->t310 = (LIBLTE_RRC_T310_ENUM)liblte_bits_2_value(ie_ptr, 3); - rlf_timers_and_constants->n310 = (LIBLTE_RRC_N310_ENUM)liblte_bits_2_value(ie_ptr, 3); - rlf_timers_and_constants->t311 = (LIBLTE_RRC_T311_ENUM)liblte_bits_2_value(ie_ptr, 3); - rlf_timers_and_constants->n311 = (LIBLTE_RRC_N311_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: RN Subframe Config - - Description: Specifies the subframe configuration for an RN - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: Scheduling Request Config - - Description: Specifies the scheduling request related parameters - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_scheduling_request_config_ie(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT *sched_request_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(sched_request_cnfg != NULL && - ie_ptr != NULL) - { - // Setup - liblte_value_2_bits(sched_request_cnfg->setup_present, ie_ptr, 1); - if(sched_request_cnfg->setup_present) - { - // SR PUCCH Resource Index - liblte_value_2_bits(sched_request_cnfg->sr_pucch_resource_idx, ie_ptr, 11); - - // SR Config Index - liblte_value_2_bits(sched_request_cnfg->sr_cnfg_idx, ie_ptr, 8); - - // DRS Trans Max - liblte_value_2_bits(sched_request_cnfg->dsr_trans_max, ie_ptr, 3); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_scheduling_request_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT *sched_request_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - sched_request_cnfg != NULL) - { - // Setup - sched_request_cnfg->setup_present = liblte_bits_2_value(ie_ptr, 1); - if(sched_request_cnfg->setup_present) - { - // SR PUCCH Resource Index - sched_request_cnfg->sr_pucch_resource_idx = liblte_bits_2_value(ie_ptr, 11); - - // SR Config Index - sched_request_cnfg->sr_cnfg_idx = liblte_bits_2_value(ie_ptr, 8); - - // DRS Trans Max - sched_request_cnfg->dsr_trans_max = (LIBLTE_RRC_DSR_TRANS_MAX_ENUM)liblte_bits_2_value(ie_ptr, 3); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Sounding RS UL Config - - Description: Specifies the uplink Sounding RS configuration for - periodic and aperiodic sounding - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_srs_ul_config_common_ie(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT *srs_ul_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(srs_ul_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(srs_ul_cnfg->present, ie_ptr, 1); - - if(true == srs_ul_cnfg->present) - { - liblte_value_2_bits(srs_ul_cnfg->max_up_pts_present, ie_ptr, 1); - - liblte_value_2_bits(srs_ul_cnfg->bw_cnfg, ie_ptr, 3); - liblte_value_2_bits(srs_ul_cnfg->subfr_cnfg, ie_ptr, 4); - liblte_value_2_bits(srs_ul_cnfg->ack_nack_simul_tx, ie_ptr, 1); - - if(true == srs_ul_cnfg->max_up_pts_present) - { - liblte_value_2_bits(srs_ul_cnfg->max_up_pts, ie_ptr, 1); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_srs_ul_config_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT *srs_ul_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - srs_ul_cnfg != NULL) - { - srs_ul_cnfg->present = liblte_bits_2_value(ie_ptr, 1); - - if(true == srs_ul_cnfg->present) - { - srs_ul_cnfg->max_up_pts_present = liblte_bits_2_value(ie_ptr, 1); - - srs_ul_cnfg->bw_cnfg = (LIBLTE_RRC_SRS_BW_CONFIG_ENUM)liblte_bits_2_value(ie_ptr, 3); - srs_ul_cnfg->subfr_cnfg = (LIBLTE_RRC_SRS_SUBFR_CONFIG_ENUM)liblte_bits_2_value(ie_ptr, 4); - srs_ul_cnfg->ack_nack_simul_tx = liblte_bits_2_value(ie_ptr, 1); - - if(true == srs_ul_cnfg->max_up_pts_present) - { - srs_ul_cnfg->max_up_pts = liblte_bits_2_value(ie_ptr, 1); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_srs_ul_config_dedicated_ie(LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT *srs_ul_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(srs_ul_cnfg != NULL && - ie_ptr != NULL) - { - // Setup - liblte_value_2_bits(srs_ul_cnfg->setup_present, ie_ptr, 1); - if(srs_ul_cnfg->setup_present) - { - // SRS Bandwidth - liblte_value_2_bits(srs_ul_cnfg->srs_bandwidth, ie_ptr, 2); - - // SRS Hopping Bandwidth - liblte_value_2_bits(srs_ul_cnfg->srs_hopping_bandwidth, ie_ptr, 2); - - // Frequency Domain Position - liblte_value_2_bits(srs_ul_cnfg->freq_domain_pos, ie_ptr, 5); - - // Duration - liblte_value_2_bits(srs_ul_cnfg->duration, ie_ptr, 1); - - // SRS Config Index - liblte_value_2_bits(srs_ul_cnfg->srs_cnfg_idx, ie_ptr, 10); - - // Transmission Comb - liblte_value_2_bits(srs_ul_cnfg->tx_comb, ie_ptr, 1); - - // Cyclic Shift - liblte_value_2_bits(srs_ul_cnfg->cyclic_shift, ie_ptr, 3); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_srs_ul_config_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT *srs_ul_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - srs_ul_cnfg != NULL) - { - // Setup - srs_ul_cnfg->setup_present = liblte_bits_2_value(ie_ptr, 1); - if(srs_ul_cnfg->setup_present) - { - // SRS Bandwidth - srs_ul_cnfg->srs_bandwidth = (LIBLTE_RRC_SRS_BANDWIDTH_ENUM)liblte_bits_2_value(ie_ptr, 2); - - // SRS Hopping Bandwidth - srs_ul_cnfg->srs_hopping_bandwidth = (LIBLTE_RRC_SRS_HOPPING_BANDWIDTH_ENUM)liblte_bits_2_value(ie_ptr, 2); - - // Frequency Domain Position - srs_ul_cnfg->freq_domain_pos = liblte_bits_2_value(ie_ptr, 5); - - // Duration - srs_ul_cnfg->duration = liblte_bits_2_value(ie_ptr, 1); - - // SRS Config Index - srs_ul_cnfg->srs_cnfg_idx = liblte_bits_2_value(ie_ptr, 10); - - // Transmission Comb - srs_ul_cnfg->tx_comb = liblte_bits_2_value(ie_ptr, 1); - - // Cyclic Shift - srs_ul_cnfg->cyclic_shift = (LIBLTE_RRC_CYCLIC_SHIFT_ENUM)liblte_bits_2_value(ie_ptr, 3); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: SPS Config - - Description: Specifies the semi-persistent scheduling - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sps_config_ie(LIBLTE_RRC_SPS_CONFIG_STRUCT *sps_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(sps_cnfg != NULL && - ie_ptr != NULL) - { - // Optional indicators - liblte_value_2_bits(sps_cnfg->sps_c_rnti_present, ie_ptr, 1); - liblte_value_2_bits(sps_cnfg->sps_cnfg_dl_present, ie_ptr, 1); - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul_present, ie_ptr, 1); - - // SPS C-RNTI - if(sps_cnfg->sps_c_rnti_present) - { - liblte_rrc_pack_c_rnti_ie(sps_cnfg->sps_c_rnti, ie_ptr); - } - - // SPS Config DL - if(sps_cnfg->sps_cnfg_dl_present) - { - liblte_value_2_bits(sps_cnfg->sps_cnfg_dl.setup_present, ie_ptr, 1); - if(sps_cnfg->sps_cnfg_dl.setup_present) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // SPS Interval DL - liblte_value_2_bits(sps_cnfg->sps_cnfg_dl.sps_interval_dl, ie_ptr, 4); - - // Number of Configured SPS Processes - liblte_value_2_bits(sps_cnfg->sps_cnfg_dl.N_sps_processes - 1, ie_ptr, 3); - - // N1 PUCCH AN Persistent List - liblte_value_2_bits(sps_cnfg->sps_cnfg_dl.n1_pucch_an_persistent_list_size - 1, ie_ptr, 2); - for(i=0; isps_cnfg_dl.n1_pucch_an_persistent_list_size; i++) - { - liblte_value_2_bits(sps_cnfg->sps_cnfg_dl.n1_pucch_an_persistent_list[i], ie_ptr, 11); - } - } - } - - // SPS Config UL - if(sps_cnfg->sps_cnfg_ul_present) - { - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.setup_present, ie_ptr, 1); - if(sps_cnfg->sps_cnfg_ul.setup_present) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.p0_persistent_present, ie_ptr, 1); - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.two_intervals_cnfg_present, ie_ptr, 1); - - // SPS Interval UL - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.sps_interval_ul, ie_ptr, 4); - - // Implicit Release After - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.implicit_release_after, ie_ptr, 2); - - // P0 Persistent - if(sps_cnfg->sps_cnfg_ul.p0_persistent_present) - { - // P0 Nominal PUSCH Persistent - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.p0_nominal_pusch + 126, ie_ptr, 8); - - // P0 UE PUSCH Persistent - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.p0_ue_pusch + 8, ie_ptr, 4); - } - - // Two Intervals Config - if(sps_cnfg->sps_cnfg_ul.two_intervals_cnfg_present) - { - liblte_value_2_bits(sps_cnfg->sps_cnfg_ul.two_intervals_cnfg, ie_ptr, 1); - } - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sps_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_SPS_CONFIG_STRUCT *sps_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(ie_ptr != NULL && - sps_cnfg != NULL) - { - // Optional indicators - sps_cnfg->sps_c_rnti_present = liblte_bits_2_value(ie_ptr, 1); - sps_cnfg->sps_cnfg_dl_present = liblte_bits_2_value(ie_ptr, 1); - sps_cnfg->sps_cnfg_ul_present = liblte_bits_2_value(ie_ptr, 1); - - // SPS C-RNTI - if(sps_cnfg->sps_c_rnti_present) - { - liblte_rrc_unpack_c_rnti_ie(ie_ptr, &sps_cnfg->sps_c_rnti); - } - - // SPS Config DL - if(sps_cnfg->sps_cnfg_dl_present) - { - sps_cnfg->sps_cnfg_dl.setup_present = liblte_bits_2_value(ie_ptr, 1); - if(sps_cnfg->sps_cnfg_dl.setup_present) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // SPS Interval DL - sps_cnfg->sps_cnfg_dl.sps_interval_dl = (LIBLTE_RRC_SPS_INTERVAL_DL_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // Number of Configured SPS Processes - sps_cnfg->sps_cnfg_dl.N_sps_processes = liblte_bits_2_value(ie_ptr, 3) + 1; - - // N1 PUCCH AN Persistent List - sps_cnfg->sps_cnfg_dl.n1_pucch_an_persistent_list_size = liblte_bits_2_value(ie_ptr, 2) + 1; - for(i=0; isps_cnfg_dl.n1_pucch_an_persistent_list_size; i++) - { - sps_cnfg->sps_cnfg_dl.n1_pucch_an_persistent_list[i] = liblte_bits_2_value(ie_ptr, 11); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - } - } - - // SPS Config UL - if(sps_cnfg->sps_cnfg_ul_present) - { - sps_cnfg->sps_cnfg_ul.setup_present = liblte_bits_2_value(ie_ptr, 1); - if(sps_cnfg->sps_cnfg_ul.setup_present) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - sps_cnfg->sps_cnfg_ul.p0_persistent_present = liblte_bits_2_value(ie_ptr, 1); - sps_cnfg->sps_cnfg_ul.two_intervals_cnfg_present = liblte_bits_2_value(ie_ptr, 1); - - // SPS Interval UL - sps_cnfg->sps_cnfg_ul.sps_interval_ul = (LIBLTE_RRC_SPS_INTERVAL_UL_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // Implicit Release After - sps_cnfg->sps_cnfg_ul.implicit_release_after = (LIBLTE_RRC_IMPLICIT_RELEASE_AFTER_ENUM)liblte_bits_2_value(ie_ptr, 2); - - // P0 Persistent - if(sps_cnfg->sps_cnfg_ul.p0_persistent_present) - { - // P0 Nominal PUSCH Persistent - sps_cnfg->sps_cnfg_ul.p0_nominal_pusch = liblte_bits_2_value(ie_ptr, 8) - 126; - - // P0 UE PUSCH Persistent - sps_cnfg->sps_cnfg_ul.p0_ue_pusch = liblte_bits_2_value(ie_ptr, 4) - 8; - } - - // Two Intervals Config - if(sps_cnfg->sps_cnfg_ul.two_intervals_cnfg_present) - { - sps_cnfg->sps_cnfg_ul.two_intervals_cnfg = (LIBLTE_RRC_TWO_INTERVALS_CONFIG_ENUM)liblte_bits_2_value(ie_ptr, 1); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: TDD Config - - Description: Specifies the TDD specific physical channel - configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_tdd_config_ie(LIBLTE_RRC_TDD_CONFIG_STRUCT *tdd_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(tdd_cnfg != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(tdd_cnfg->sf_assignment, ie_ptr, 3); - liblte_value_2_bits(tdd_cnfg->special_sf_patterns, ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tdd_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_TDD_CONFIG_STRUCT *tdd_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - tdd_cnfg != NULL) - { - tdd_cnfg->sf_assignment = (LIBLTE_RRC_SUBFRAME_ASSIGNMENT_ENUM)liblte_bits_2_value(ie_ptr, 3); - tdd_cnfg->special_sf_patterns = (LIBLTE_RRC_SPECIAL_SUBFRAME_PATTERNS_ENUM)liblte_bits_2_value(ie_ptr, 4); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Time Alignment Timer - - Description: Controls how long the UE is considered uplink time - aligned - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_time_alignment_timer_ie(LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM time_alignment_timer, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL) - { - liblte_value_2_bits(time_alignment_timer, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_time_alignment_timer_ie(uint8 **ie_ptr, - LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM *time_alignment_timer) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - time_alignment_timer != NULL) - { - *time_alignment_timer = (LIBLTE_RRC_TIME_ALIGNMENT_TIMER_ENUM)liblte_bits_2_value(ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: TPC PDCCH Config - - Description: Specifies the RNTIs and indecies for PUCCH and PUSCH - power control - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_tpc_pdcch_config_ie(LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT *tpc_pdcch_cnfg, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(tpc_pdcch_cnfg != NULL && - ie_ptr != NULL) - { - // Setup - liblte_value_2_bits(tpc_pdcch_cnfg->setup_present, ie_ptr, 1); - if(tpc_pdcch_cnfg->setup_present) - { - // TPC RNTI - liblte_value_2_bits(tpc_pdcch_cnfg->tpc_rnti, ie_ptr, 16); - - // TPC Index - liblte_value_2_bits(tpc_pdcch_cnfg->tpc_idx_choice, ie_ptr, 1); - if(LIBLTE_RRC_TPC_INDEX_FORMAT_3 == tpc_pdcch_cnfg->tpc_idx_choice) - { - liblte_value_2_bits(tpc_pdcch_cnfg->tpc_idx - 1, ie_ptr, 4); - }else{ - liblte_value_2_bits(tpc_pdcch_cnfg->tpc_idx - 1, ie_ptr, 5); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_tpc_pdcch_config_ie(uint8 **ie_ptr, - LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT *tpc_pdcch_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - tpc_pdcch_cnfg != NULL) - { - // Setup - tpc_pdcch_cnfg->setup_present = liblte_bits_2_value(ie_ptr, 1); - if(tpc_pdcch_cnfg->setup_present) - { - // TPC RNTI - tpc_pdcch_cnfg->tpc_rnti = liblte_bits_2_value(ie_ptr, 16); - - // TPC Index - tpc_pdcch_cnfg->tpc_idx_choice = (LIBLTE_RRC_TPC_INDEX_ENUM)liblte_bits_2_value(ie_ptr, 1); - if(LIBLTE_RRC_TPC_INDEX_FORMAT_3 == tpc_pdcch_cnfg->tpc_idx_choice) - { - tpc_pdcch_cnfg->tpc_idx = liblte_bits_2_value(ie_ptr, 4) + 1; - }else{ - tpc_pdcch_cnfg->tpc_idx = liblte_bits_2_value(ie_ptr, 5) + 1; - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: UL Antenna Info - - Description: Specifies the UL antenna configuration - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_antenna_info_ie(LIBLTE_RRC_UL_ANTENNA_INFO_STRUCT *ul_ant_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ul_ant_info != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(ul_ant_info->ul_tx_mode, ie_ptr, 3); - liblte_value_2_bits(ul_ant_info->four_ant_port_activated, ie_ptr, 1); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_antenna_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_UL_ANTENNA_INFO_STRUCT *ul_ant_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - ul_ant_info != NULL) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - ul_ant_info->ul_tx_mode = (LIBLTE_RRC_UL_TRANSMISSION_MODE_R10_ENUM)liblte_bits_2_value(ie_ptr, 3); - ul_ant_info->four_ant_port_activated = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: Uplink Power Control - - Description: Specifies the parameters for uplink power control in - the system information and in the dedicated - signalling - - Document Reference: 36.331 v10.0.0 Section 6.3.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_power_control_common_ie(LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT *ul_pwr_ctrl, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ul_pwr_ctrl != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(ul_pwr_ctrl->p0_nominal_pusch + 126, ie_ptr, 8); - liblte_value_2_bits(ul_pwr_ctrl->alpha, ie_ptr, 3); - liblte_value_2_bits(ul_pwr_ctrl->p0_nominal_pucch + 127, ie_ptr, 5); - - // Delta F List - liblte_value_2_bits(ul_pwr_ctrl->delta_flist_pucch.format_1, ie_ptr, 2); - liblte_value_2_bits(ul_pwr_ctrl->delta_flist_pucch.format_1b, ie_ptr, 2); - liblte_value_2_bits(ul_pwr_ctrl->delta_flist_pucch.format_2, ie_ptr, 2); - liblte_value_2_bits(ul_pwr_ctrl->delta_flist_pucch.format_2a, ie_ptr, 2); - liblte_value_2_bits(ul_pwr_ctrl->delta_flist_pucch.format_2b, ie_ptr, 2); - - liblte_value_2_bits((ul_pwr_ctrl->delta_preamble_msg3 / 2) + 1, ie_ptr, 3); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_power_control_common_ie(uint8 **ie_ptr, - LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT *ul_pwr_ctrl) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - ul_pwr_ctrl != NULL) - { - ul_pwr_ctrl->p0_nominal_pusch = liblte_bits_2_value(ie_ptr, 8) - 126; - ul_pwr_ctrl->alpha = (LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_ENUM)liblte_bits_2_value(ie_ptr, 3); - ul_pwr_ctrl->p0_nominal_pucch = liblte_bits_2_value(ie_ptr, 5) - 127; - - // Delta F List - ul_pwr_ctrl->delta_flist_pucch.format_1 = (LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_ENUM)liblte_bits_2_value(ie_ptr, 2); - ul_pwr_ctrl->delta_flist_pucch.format_1b = (LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_ENUM)liblte_bits_2_value(ie_ptr, 2); - ul_pwr_ctrl->delta_flist_pucch.format_2 = (LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_ENUM)liblte_bits_2_value(ie_ptr, 2); - ul_pwr_ctrl->delta_flist_pucch.format_2a = (LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_ENUM)liblte_bits_2_value(ie_ptr, 2); - ul_pwr_ctrl->delta_flist_pucch.format_2b = (LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_ENUM)liblte_bits_2_value(ie_ptr, 2); - - ul_pwr_ctrl->delta_preamble_msg3 = (liblte_bits_2_value(ie_ptr, 3) - 1) * 2; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_power_control_dedicated_ie(LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT *ul_pwr_ctrl, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ul_pwr_ctrl != NULL && - ie_ptr != NULL) - { - // Filter Coefficient default? - liblte_value_2_bits(ul_pwr_ctrl->filter_coeff_present, ie_ptr, 1); - - // P0 UE PUSCH - liblte_value_2_bits(ul_pwr_ctrl->p0_ue_pusch + 8, ie_ptr, 4); - - // Delta MCS Enabled - liblte_value_2_bits(ul_pwr_ctrl->delta_mcs_en, ie_ptr, 1); - - // Accumulation Enabled - liblte_value_2_bits(ul_pwr_ctrl->accumulation_en, ie_ptr, 1); - - // P0 UE PUCCH - liblte_value_2_bits(ul_pwr_ctrl->p0_ue_pucch + 8, ie_ptr, 4); - - // P SRS Offset - liblte_value_2_bits(ul_pwr_ctrl->p_srs_offset, ie_ptr, 4); - - // Filter Coefficient - if(ul_pwr_ctrl->filter_coeff_present) - { - liblte_rrc_pack_filter_coefficient_ie(ul_pwr_ctrl->filter_coeff, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_power_control_dedicated_ie(uint8 **ie_ptr, - LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT *ul_pwr_ctrl) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - ul_pwr_ctrl != NULL) - { - // Filter Coefficient default? - ul_pwr_ctrl->filter_coeff_present = liblte_bits_2_value(ie_ptr, 1); - - // P0 UE PUSCH - ul_pwr_ctrl->p0_ue_pusch = liblte_bits_2_value(ie_ptr, 4) - 8; - - // Delta MCS Enabled - ul_pwr_ctrl->delta_mcs_en = (LIBLTE_RRC_DELTA_MCS_ENABLED_ENUM)liblte_bits_2_value(ie_ptr, 1); - - // Accumulation Enabled - ul_pwr_ctrl->accumulation_en = liblte_bits_2_value(ie_ptr, 1); - - // P0 UE PUCCH - ul_pwr_ctrl->p0_ue_pucch = liblte_bits_2_value(ie_ptr, 4) - 8; - - // P SRS Offset - ul_pwr_ctrl->p_srs_offset = liblte_bits_2_value(ie_ptr, 4); - - // Filter Coefficient - if(ul_pwr_ctrl->filter_coeff_present) - { - liblte_rrc_unpack_filter_coefficient_ie(ie_ptr, &ul_pwr_ctrl->filter_coeff); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 2 - - Description: Contains radio resource configuration that is common - for all UEs - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_2_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool mbsfn_subfr_cnfg_list_opt; - - if(sib2 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(sib2->ac_barring_info_present, ie_ptr, 1); - if(0 != sib2->mbsfn_subfr_cnfg_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - mbsfn_subfr_cnfg_list_opt = true; - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - mbsfn_subfr_cnfg_list_opt = false; - } - - // AC Barring - if(true == sib2->ac_barring_info_present) - { - liblte_value_2_bits(sib2->ac_barring_for_mo_signalling.enabled, ie_ptr, 1); - liblte_value_2_bits(sib2->ac_barring_for_mo_data.enabled, ie_ptr, 1); - - // AC Barring for emergency - liblte_value_2_bits(sib2->ac_barring_for_emergency, ie_ptr, 1); - - // AC Barring for MO signalling - if(true == sib2->ac_barring_for_mo_signalling.enabled) - { - liblte_value_2_bits(sib2->ac_barring_for_mo_signalling.factor, ie_ptr, 4); - liblte_value_2_bits(sib2->ac_barring_for_mo_signalling.time, ie_ptr, 3); - liblte_value_2_bits(sib2->ac_barring_for_mo_signalling.for_special_ac, ie_ptr, 5); - } - - // AC Barring for MO data - if(true == sib2->ac_barring_for_mo_data.enabled) - { - liblte_value_2_bits(sib2->ac_barring_for_mo_data.factor, ie_ptr, 4); - liblte_value_2_bits(sib2->ac_barring_for_mo_data.time, ie_ptr, 3); - liblte_value_2_bits(sib2->ac_barring_for_mo_data.for_special_ac, ie_ptr, 5); - } - } - - // Radio Resource Config Common - liblte_rrc_pack_rr_config_common_sib_ie(&sib2->rr_config_common_sib, ie_ptr); - - // UE Timers and Constants - liblte_rrc_pack_ue_timers_and_constants_ie(&sib2->ue_timers_and_constants, ie_ptr); - - // Frequency information - { - // Optional indicators - liblte_value_2_bits(sib2->arfcn_value_eutra.present, ie_ptr, 1); - liblte_value_2_bits(sib2->ul_bw.present, ie_ptr, 1); - - // UL Carrier Frequency - if(true == sib2->arfcn_value_eutra.present) - { - liblte_rrc_pack_arfcn_value_eutra_ie(sib2->arfcn_value_eutra.value, ie_ptr); - } - - // UL Bandwidth - if(true == sib2->ul_bw.present) - { - liblte_value_2_bits(sib2->ul_bw.bw, ie_ptr, 3); - } - - // Additional Spectrum Emission - liblte_rrc_pack_additional_spectrum_emission_ie(sib2->additional_spectrum_emission, - ie_ptr); - } - - // MBSFN Subframe Config List - if(true == mbsfn_subfr_cnfg_list_opt) - { - liblte_value_2_bits(sib2->mbsfn_subfr_cnfg_list_size - 1, ie_ptr, 3); - for(i=0; imbsfn_subfr_cnfg_list_size; i++) - { - liblte_rrc_pack_mbsfn_subframe_config_ie(&sib2->mbsfn_subfr_cnfg_list[i], ie_ptr); - } - } - - // Time Alignment Timer Common - liblte_rrc_pack_time_alignment_timer_ie(sib2->time_alignment_timer, ie_ptr); - - // FIXME: Not handling extensions - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_2_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - uint8 ext_ind; - bool mbsfn_subfr_cnfg_list_opt; - - if(ie_ptr != NULL && - sib2 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - sib2->ac_barring_info_present = liblte_bits_2_value(ie_ptr, 1); - mbsfn_subfr_cnfg_list_opt = liblte_bits_2_value(ie_ptr, 1); - - // AC Barring - if(true == sib2->ac_barring_info_present) - { - // Optional indicators - sib2->ac_barring_for_mo_signalling.enabled = liblte_bits_2_value(ie_ptr, 1); - sib2->ac_barring_for_mo_data.enabled = liblte_bits_2_value(ie_ptr, 1); - - // AC Barring for emergency - sib2->ac_barring_for_emergency = liblte_bits_2_value(ie_ptr, 1); - - // AC Barring for MO signalling - if(true == sib2->ac_barring_for_mo_signalling.enabled) - { - sib2->ac_barring_for_mo_signalling.factor = (LIBLTE_RRC_AC_BARRING_FACTOR_ENUM)liblte_bits_2_value(ie_ptr, 4); - sib2->ac_barring_for_mo_signalling.time = (LIBLTE_RRC_AC_BARRING_TIME_ENUM)liblte_bits_2_value(ie_ptr, 3); - sib2->ac_barring_for_mo_signalling.for_special_ac = liblte_bits_2_value(ie_ptr, 5); - } - - // AC Barring for MO data - if(true == sib2->ac_barring_for_mo_data.enabled) - { - sib2->ac_barring_for_mo_data.factor = (LIBLTE_RRC_AC_BARRING_FACTOR_ENUM)liblte_bits_2_value(ie_ptr, 4); - sib2->ac_barring_for_mo_data.time = (LIBLTE_RRC_AC_BARRING_TIME_ENUM)liblte_bits_2_value(ie_ptr, 3); - sib2->ac_barring_for_mo_data.for_special_ac = liblte_bits_2_value(ie_ptr, 5); - } - }else{ - sib2->ac_barring_for_emergency = false; - sib2->ac_barring_for_mo_signalling.enabled = false; - sib2->ac_barring_for_mo_data.enabled = false; - } - - // Radio Resource Config Common - liblte_rrc_unpack_rr_config_common_sib_ie(ie_ptr, &sib2->rr_config_common_sib); - - // UE Timers and Constants - liblte_rrc_unpack_ue_timers_and_constants_ie(ie_ptr, &sib2->ue_timers_and_constants); - - // Frequency information - { - // Optional indicators - sib2->arfcn_value_eutra.present = liblte_bits_2_value(ie_ptr, 1); - sib2->ul_bw.present = liblte_bits_2_value(ie_ptr, 1); - - // UL Carrier Frequency - if(true == sib2->arfcn_value_eutra.present) - { - liblte_rrc_unpack_arfcn_value_eutra_ie(ie_ptr, &sib2->arfcn_value_eutra.value); - } - - // UL Bandwidth - if(true == sib2->ul_bw.present) - { - sib2->ul_bw.bw = (LIBLTE_RRC_UL_BW_ENUM)liblte_bits_2_value(ie_ptr, 3); - } - - // Additional Spectrum Emission - liblte_rrc_unpack_additional_spectrum_emission_ie(ie_ptr, - &sib2->additional_spectrum_emission); - } - - // MBSFN Subframe Config List - if(true == mbsfn_subfr_cnfg_list_opt) - { - sib2->mbsfn_subfr_cnfg_list_size = liblte_bits_2_value(ie_ptr, 3) + 1; - for(i=0; imbsfn_subfr_cnfg_list_size; i++) - { - liblte_rrc_unpack_mbsfn_subframe_config_ie(ie_ptr, &sib2->mbsfn_subfr_cnfg_list[i]); - } - }else{ - sib2->mbsfn_subfr_cnfg_list_size = 0; - } - - // Time Alignment Timer Common - liblte_rrc_unpack_time_alignment_timer_ie(ie_ptr, &sib2->time_alignment_timer); - - // Extensions - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 3 - - Description: Contains cell reselection information common for - intra-frequency, inter-frequency, and/or inter-RAT - cell re-selection as well as intra-frequency cell - re-selection information other than neighboring - cell related - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_3_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(sib3 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Cell reselection info common - { - // Optional indicator - liblte_value_2_bits(sib3->speed_state_resel_params.present, ie_ptr, 1); - - liblte_value_2_bits(sib3->q_hyst, ie_ptr, 4); - - // Speed state reselection parameters - if(true == sib3->speed_state_resel_params.present) - { - liblte_rrc_pack_mobility_state_parameters_ie(&sib3->speed_state_resel_params.mobility_state_params, ie_ptr); - - liblte_value_2_bits(sib3->speed_state_resel_params.q_hyst_sf.medium, ie_ptr, 2); - liblte_value_2_bits(sib3->speed_state_resel_params.q_hyst_sf.high, ie_ptr, 2); - } - } - - // Cell reselection serving frequency information - { - // Optional indicators - liblte_value_2_bits(sib3->s_non_intra_search_present, ie_ptr, 1); - - if(true == sib3->s_non_intra_search_present) - { - liblte_rrc_pack_reselection_threshold_ie(sib3->s_non_intra_search, ie_ptr); - } - - liblte_rrc_pack_reselection_threshold_ie(sib3->thresh_serving_low, ie_ptr); - - liblte_rrc_pack_cell_reselection_priority_ie(sib3->cell_resel_prio, ie_ptr); - } - - // Intra frequency cell reselection information - { - // Optional indicators - liblte_value_2_bits(sib3->p_max_present, ie_ptr, 1); - liblte_value_2_bits(sib3->s_intra_search_present, ie_ptr, 1); - liblte_value_2_bits(sib3->allowed_meas_bw_present, ie_ptr, 1); - liblte_value_2_bits(sib3->t_resel_eutra_sf_present, ie_ptr, 1); - - liblte_rrc_pack_q_rx_lev_min_ie(sib3->q_rx_lev_min, ie_ptr); - - if(true == sib3->p_max_present) - { - liblte_rrc_pack_p_max_ie(sib3->p_max, ie_ptr); - } - - if(true == sib3->s_intra_search_present) - { - liblte_rrc_pack_reselection_threshold_ie(sib3->s_intra_search, ie_ptr); - } - - if(true == sib3->allowed_meas_bw_present) - { - liblte_rrc_pack_allowed_meas_bandwidth_ie(sib3->allowed_meas_bw, ie_ptr); - } - - liblte_rrc_pack_presence_antenna_port_1_ie(sib3->presence_ant_port_1, ie_ptr); - - liblte_rrc_pack_neigh_cell_config_ie(sib3->neigh_cell_cnfg, ie_ptr); - - liblte_rrc_pack_t_reselection_ie(sib3->t_resel_eutra, ie_ptr); - - if(true == sib3->t_resel_eutra_sf_present) - { - liblte_rrc_pack_speed_state_scale_factors_ie(&sib3->t_resel_eutra_sf, ie_ptr); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_3_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext_ind; - - if(ie_ptr != NULL && - sib3 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Cell reselection info common - { - // Optional indicator - sib3->speed_state_resel_params.present = liblte_bits_2_value(ie_ptr, 1); - - sib3->q_hyst = (LIBLTE_RRC_Q_HYST_ENUM)liblte_bits_2_value(ie_ptr, 4); - - // Speed state reselection parameters - if(true == sib3->speed_state_resel_params.present) - { - liblte_rrc_unpack_mobility_state_parameters_ie(ie_ptr, &sib3->speed_state_resel_params.mobility_state_params); - - sib3->speed_state_resel_params.q_hyst_sf.medium = (LIBLTE_RRC_SF_MEDIUM_ENUM)liblte_bits_2_value(ie_ptr, 2); - sib3->speed_state_resel_params.q_hyst_sf.high = (LIBLTE_RRC_SF_HIGH_ENUM)liblte_bits_2_value(ie_ptr, 2); - } - } - - // Cell reselection serving frequency information - { - // Optional indicators - sib3->s_non_intra_search_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == sib3->s_non_intra_search_present) - { - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib3->s_non_intra_search); - } - - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib3->thresh_serving_low); - - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib3->cell_resel_prio); - } - - // Intra frequency cell reselection information - { - // Optional indicators - sib3->p_max_present = liblte_bits_2_value(ie_ptr, 1); - sib3->s_intra_search_present = liblte_bits_2_value(ie_ptr, 1); - sib3->allowed_meas_bw_present = liblte_bits_2_value(ie_ptr, 1); - sib3->t_resel_eutra_sf_present = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_q_rx_lev_min_ie(ie_ptr, &sib3->q_rx_lev_min); - - if(true == sib3->p_max_present) - { - liblte_rrc_unpack_p_max_ie(ie_ptr, &sib3->p_max); - } - - if(true == sib3->s_intra_search_present) - { - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib3->s_intra_search); - } - - if(true == sib3->allowed_meas_bw_present) - { - liblte_rrc_unpack_allowed_meas_bandwidth_ie(ie_ptr, &sib3->allowed_meas_bw); - } - - liblte_rrc_unpack_presence_antenna_port_1_ie(ie_ptr, &sib3->presence_ant_port_1); - - liblte_rrc_unpack_neigh_cell_config_ie(ie_ptr, &sib3->neigh_cell_cnfg); - - liblte_rrc_unpack_t_reselection_ie(ie_ptr, &sib3->t_resel_eutra); - - if(true == sib3->t_resel_eutra_sf_present) - { - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &sib3->t_resel_eutra_sf); - } - } - - // Extensions - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 4 - - Description: Contains the neighboring cell related information - relevant only for intra-frequency cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_4_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *sib4, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(sib4 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - if(0 != sib4->intra_freq_neigh_cell_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - if(0 != sib4->intra_freq_black_cell_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(sib4->csg_phys_cell_id_range_present, ie_ptr, 1); - - if(0 != sib4->intra_freq_neigh_cell_list_size) - { - liblte_value_2_bits(sib4->intra_freq_neigh_cell_list_size - 1, ie_ptr, 4); - for(i=0; iintra_freq_neigh_cell_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_rrc_pack_phys_cell_id_ie(sib4->intra_freq_neigh_cell_list[i].phys_cell_id, ie_ptr); - liblte_rrc_pack_q_offset_range_ie(sib4->intra_freq_neigh_cell_list[i].q_offset_range, ie_ptr); - } - } - - if(0 != sib4->intra_freq_black_cell_list_size) - { - liblte_value_2_bits(sib4->intra_freq_black_cell_list_size - 1, ie_ptr, 4); - for(i=0; iintra_freq_black_cell_list_size; i++) - { - liblte_rrc_pack_phys_cell_id_range_ie(&sib4->intra_freq_black_cell_list[i], ie_ptr); - } - } - - if(true == sib4->csg_phys_cell_id_range_present) - { - liblte_rrc_pack_phys_cell_id_range_ie(&sib4->csg_phys_cell_id_range, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_4_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *sib4) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool ext_ind; - bool intra_freq_neigh_cell_list_opt; - bool intra_freq_black_cell_list_opt; - - if(ie_ptr != NULL && - sib4 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - intra_freq_neigh_cell_list_opt = liblte_bits_2_value(ie_ptr, 1); - intra_freq_black_cell_list_opt = liblte_bits_2_value(ie_ptr, 1); - sib4->csg_phys_cell_id_range_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == intra_freq_neigh_cell_list_opt) - { - sib4->intra_freq_neigh_cell_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; iintra_freq_neigh_cell_list_size; i++) - { - // Extension indicator - liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &sib4->intra_freq_neigh_cell_list[i].phys_cell_id); - liblte_rrc_unpack_q_offset_range_ie(ie_ptr, &sib4->intra_freq_neigh_cell_list[i].q_offset_range); - } - }else{ - sib4->intra_freq_neigh_cell_list_size = 0; - } - - if(true == intra_freq_black_cell_list_opt) - { - sib4->intra_freq_black_cell_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; iintra_freq_black_cell_list_size; i++) - { - liblte_rrc_unpack_phys_cell_id_range_ie(ie_ptr, &sib4->intra_freq_black_cell_list[i]); - } - }else{ - sib4->intra_freq_black_cell_list_size = 0; - } - - if(true == sib4->csg_phys_cell_id_range_present) - { - liblte_rrc_unpack_phys_cell_id_range_ie(ie_ptr, &sib4->csg_phys_cell_id_range); - } - - // Extension - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 5 - - Description: Contains information relevant only for - inter-frequency cell reselection, i.e. information - about other E-UTRA frequencies and inter-frequency - neighboring cells relevant for cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_5_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT *sib5, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - uint32 j; - - if(sib5 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(sib5->inter_freq_carrier_freq_list_size - 1, ie_ptr, 3); - for(i=0; iinter_freq_carrier_freq_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(sib5->inter_freq_carrier_freq_list[i].p_max_present, ie_ptr, 1); - liblte_value_2_bits(sib5->inter_freq_carrier_freq_list[i].t_resel_eutra_sf_present, ie_ptr, 1); - liblte_value_2_bits(sib5->inter_freq_carrier_freq_list[i].cell_resel_prio_present, ie_ptr, 1); - if(0 != sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - if(0 != sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - - liblte_rrc_pack_arfcn_value_eutra_ie(sib5->inter_freq_carrier_freq_list[i].dl_carrier_freq, ie_ptr); - liblte_rrc_pack_q_rx_lev_min_ie(sib5->inter_freq_carrier_freq_list[i].q_rx_lev_min, ie_ptr); - if(true == sib5->inter_freq_carrier_freq_list[i].p_max_present) - { - liblte_rrc_pack_p_max_ie(sib5->inter_freq_carrier_freq_list[i].p_max, ie_ptr); - } - liblte_rrc_pack_t_reselection_ie(sib5->inter_freq_carrier_freq_list[i].t_resel_eutra, ie_ptr); - if(true == sib5->inter_freq_carrier_freq_list[i].t_resel_eutra_sf_present) - { - liblte_rrc_pack_speed_state_scale_factors_ie(&sib5->inter_freq_carrier_freq_list[i].t_resel_eutra_sf, ie_ptr); - } - liblte_rrc_pack_reselection_threshold_ie(sib5->inter_freq_carrier_freq_list[i].threshx_high, ie_ptr); - liblte_rrc_pack_reselection_threshold_ie(sib5->inter_freq_carrier_freq_list[i].threshx_low, ie_ptr); - liblte_rrc_pack_allowed_meas_bandwidth_ie(sib5->inter_freq_carrier_freq_list[i].allowed_meas_bw, ie_ptr); - liblte_rrc_pack_presence_antenna_port_1_ie(sib5->inter_freq_carrier_freq_list[i].presence_ant_port_1, ie_ptr); - if(true == sib5->inter_freq_carrier_freq_list[i].cell_resel_prio_present) - { - liblte_rrc_pack_cell_reselection_priority_ie(sib5->inter_freq_carrier_freq_list[i].cell_resel_prio, ie_ptr); - } - liblte_rrc_pack_neigh_cell_config_ie(sib5->inter_freq_carrier_freq_list[i].neigh_cell_cnfg, ie_ptr); - liblte_rrc_pack_q_offset_range_ie(sib5->inter_freq_carrier_freq_list[i].q_offset_freq, ie_ptr); - if(0 != sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size) - { - liblte_value_2_bits(sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size - 1, ie_ptr, 4); - for(j=0; jinter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size; j++) - { - liblte_rrc_pack_phys_cell_id_ie(sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list[j].phys_cell_id, ie_ptr); - liblte_rrc_pack_q_offset_range_ie(sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list[j].q_offset_cell, ie_ptr); - } - } - if(0 != sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size) - { - liblte_value_2_bits(sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size - 1, ie_ptr, 4); - for(j=0; jinter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size; j++) - { - liblte_rrc_pack_phys_cell_id_range_ie(&sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list[j], ie_ptr); - } - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_5_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT *sib5) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - uint32 j; - bool ext_ind; - bool inter_freq_carrier_freq_list_ext_ind; - bool q_offset_freq_opt; - bool inter_freq_neigh_cell_list_opt; - bool inter_freq_black_cell_list_opt; - - if(ie_ptr != NULL && - sib5 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - sib5->inter_freq_carrier_freq_list_size = liblte_bits_2_value(ie_ptr, 3) + 1; - for(i=0; iinter_freq_carrier_freq_list_size; i++) - { - // Extension indicator - inter_freq_carrier_freq_list_ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - sib5->inter_freq_carrier_freq_list[i].p_max_present = liblte_bits_2_value(ie_ptr, 1); - sib5->inter_freq_carrier_freq_list[i].t_resel_eutra_sf_present = liblte_bits_2_value(ie_ptr, 1); - sib5->inter_freq_carrier_freq_list[i].cell_resel_prio_present = liblte_bits_2_value(ie_ptr, 1); - q_offset_freq_opt = liblte_bits_2_value(ie_ptr, 1); - inter_freq_neigh_cell_list_opt = liblte_bits_2_value(ie_ptr, 1); - inter_freq_black_cell_list_opt = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_arfcn_value_eutra_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].dl_carrier_freq); - liblte_rrc_unpack_q_rx_lev_min_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].q_rx_lev_min); - if(true == sib5->inter_freq_carrier_freq_list[i].p_max_present) - { - liblte_rrc_unpack_p_max_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].p_max); - } - liblte_rrc_unpack_t_reselection_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].t_resel_eutra); - if(true == sib5->inter_freq_carrier_freq_list[i].t_resel_eutra_sf_present) - { - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].t_resel_eutra_sf); - } - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].threshx_high); - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].threshx_low); - liblte_rrc_unpack_allowed_meas_bandwidth_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].allowed_meas_bw); - liblte_rrc_unpack_presence_antenna_port_1_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].presence_ant_port_1); - if(true == sib5->inter_freq_carrier_freq_list[i].cell_resel_prio_present) - { - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].cell_resel_prio); - } - liblte_rrc_unpack_neigh_cell_config_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].neigh_cell_cnfg); - if(true == q_offset_freq_opt) - { - liblte_rrc_unpack_q_offset_range_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].q_offset_freq); - }else{ - sib5->inter_freq_carrier_freq_list[i].q_offset_freq = LIBLTE_RRC_Q_OFFSET_RANGE_DB_0; - } - if(true == inter_freq_neigh_cell_list_opt) - { - sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(j=0; jinter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size; j++) - { - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list[j].phys_cell_id); - liblte_rrc_unpack_q_offset_range_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list[j].q_offset_cell); - } - }else{ - sib5->inter_freq_carrier_freq_list[i].inter_freq_neigh_cell_list_size = 0; - } - if(true == inter_freq_black_cell_list_opt) - { - sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(j=0; jinter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size; j++) - { - liblte_rrc_unpack_phys_cell_id_range_ie(ie_ptr, &sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list[j]); - } - }else{ - sib5->inter_freq_carrier_freq_list[i].inter_freq_black_cell_list_size = 0; - } - } - - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 6 - - Description: Contains information relevant only for inter-RAT - cell reselection, i.e. information about UTRA - frequencies and UTRA neighboring cells relevant for - cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_6_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT *sib6, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(sib6 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - if(0 != sib6->carrier_freq_list_utra_fdd_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - if(0 != sib6->carrier_freq_list_utra_tdd_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - liblte_value_2_bits(sib6->t_resel_utra_sf_present, ie_ptr, 1); - - if(0 != sib6->carrier_freq_list_utra_fdd_size) - { - liblte_value_2_bits(sib6->carrier_freq_list_utra_fdd_size - 1, ie_ptr, 4); - for(i=0; icarrier_freq_list_utra_fdd_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicator - liblte_value_2_bits(sib6->carrier_freq_list_utra_fdd[i].cell_resel_prio_present, ie_ptr, 1); - - liblte_rrc_pack_arfcn_value_utra_ie(sib6->carrier_freq_list_utra_fdd[i].carrier_freq, ie_ptr); - if(true == sib6->carrier_freq_list_utra_fdd[i].cell_resel_prio_present) - { - liblte_rrc_pack_cell_reselection_priority_ie(sib6->carrier_freq_list_utra_fdd[i].cell_resel_prio, ie_ptr); - } - liblte_rrc_pack_reselection_threshold_ie(sib6->carrier_freq_list_utra_fdd[i].threshx_high, ie_ptr); - liblte_rrc_pack_reselection_threshold_ie(sib6->carrier_freq_list_utra_fdd[i].threshx_low, ie_ptr); - liblte_value_2_bits(((sib6->carrier_freq_list_utra_fdd[i].q_rx_lev_min - 1) / 2) + 60, ie_ptr, 6); - liblte_value_2_bits(sib6->carrier_freq_list_utra_fdd[i].p_max_utra + 50, ie_ptr, 7); - liblte_value_2_bits(sib6->carrier_freq_list_utra_fdd[i].q_qual_min + 24, ie_ptr, 5); - } - } - if(0 != sib6->carrier_freq_list_utra_tdd_size) - { - liblte_value_2_bits(sib6->carrier_freq_list_utra_tdd_size - 1, ie_ptr, 4); - for(i=0; icarrier_freq_list_utra_tdd_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicator - liblte_value_2_bits(sib6->carrier_freq_list_utra_tdd[i].cell_resel_prio_present, ie_ptr, 1); - - liblte_rrc_pack_arfcn_value_utra_ie(sib6->carrier_freq_list_utra_tdd[i].carrier_freq, ie_ptr); - if(true == sib6->carrier_freq_list_utra_tdd[i].cell_resel_prio_present) - { - liblte_rrc_pack_cell_reselection_priority_ie(sib6->carrier_freq_list_utra_tdd[i].cell_resel_prio, ie_ptr); - } - liblte_rrc_pack_reselection_threshold_ie(sib6->carrier_freq_list_utra_tdd[i].threshx_high, ie_ptr); - liblte_rrc_pack_reselection_threshold_ie(sib6->carrier_freq_list_utra_tdd[i].threshx_low, ie_ptr); - liblte_value_2_bits(((sib6->carrier_freq_list_utra_tdd[i].q_rx_lev_min - 1) / 2) + 60, ie_ptr, 6); - liblte_value_2_bits(sib6->carrier_freq_list_utra_tdd[i].p_max_utra + 50, ie_ptr, 7); - } - } - liblte_rrc_pack_t_reselection_ie(sib6->t_resel_utra, ie_ptr); - if(true == sib6->t_resel_utra_sf_present) - { - liblte_rrc_pack_speed_state_scale_factors_ie(&sib6->t_resel_utra_sf, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_6_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT *sib6) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool ext_ind; - bool carrier_freq_list_utra_fdd_opt; - bool carrier_freq_list_utra_fdd_ext_ind; - bool carrier_freq_list_utra_tdd_opt; - bool carrier_freq_list_utra_tdd_ext_ind; - - if(ie_ptr != NULL && - sib6 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - carrier_freq_list_utra_fdd_opt = liblte_bits_2_value(ie_ptr, 1); - carrier_freq_list_utra_tdd_opt = liblte_bits_2_value(ie_ptr, 1); - sib6->t_resel_utra_sf_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == carrier_freq_list_utra_fdd_opt) - { - sib6->carrier_freq_list_utra_fdd_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; icarrier_freq_list_utra_fdd_size; i++) - { - // Extension indicator - carrier_freq_list_utra_fdd_ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicator - sib6->carrier_freq_list_utra_fdd[i].cell_resel_prio_present = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_arfcn_value_utra_ie(ie_ptr, &sib6->carrier_freq_list_utra_fdd[i].carrier_freq); - if(true == sib6->carrier_freq_list_utra_fdd[i].cell_resel_prio_present) - { - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib6->carrier_freq_list_utra_fdd[i].cell_resel_prio); - } - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib6->carrier_freq_list_utra_fdd[i].threshx_high); - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib6->carrier_freq_list_utra_fdd[i].threshx_low); - sib6->carrier_freq_list_utra_fdd[i].q_rx_lev_min = (int8)((liblte_bits_2_value(ie_ptr, 6) - 60) * 2) + 1; - sib6->carrier_freq_list_utra_fdd[i].p_max_utra = (int8)liblte_bits_2_value(ie_ptr, 7) - 50; - sib6->carrier_freq_list_utra_fdd[i].q_qual_min = (int8)liblte_bits_2_value(ie_ptr, 5) - 24; - } - }else{ - sib6->carrier_freq_list_utra_fdd_size = 0; - } - if(true == carrier_freq_list_utra_tdd_opt) - { - sib6->carrier_freq_list_utra_tdd_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; icarrier_freq_list_utra_tdd_size; i++) - { - // Extension indicator - carrier_freq_list_utra_tdd_ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicator - sib6->carrier_freq_list_utra_tdd[i].cell_resel_prio_present = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_arfcn_value_utra_ie(ie_ptr, &sib6->carrier_freq_list_utra_tdd[i].carrier_freq); - if(true == sib6->carrier_freq_list_utra_tdd[i].cell_resel_prio_present) - { - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib6->carrier_freq_list_utra_tdd[i].cell_resel_prio); - } - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib6->carrier_freq_list_utra_tdd[i].threshx_high); - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib6->carrier_freq_list_utra_tdd[i].threshx_low); - sib6->carrier_freq_list_utra_tdd[i].q_rx_lev_min = (int8)((liblte_bits_2_value(ie_ptr, 6) * 2) + 1) - 60; - sib6->carrier_freq_list_utra_tdd[i].p_max_utra = (int8)liblte_bits_2_value(ie_ptr, 7) - 50; - } - }else{ - sib6->carrier_freq_list_utra_tdd_size = 0; - } - liblte_rrc_unpack_t_reselection_ie(ie_ptr, &sib6->t_resel_utra); - if(true == sib6->t_resel_utra_sf_present) - { - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &sib6->t_resel_utra_sf); - } - - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 7 - - Description: Contains information relevant only for inter-RAT - cell reselection, i.e. information about GERAN - frequencies relevant for cell reselection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_7_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT *sib7, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(sib7 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(sib7->t_resel_geran_sf_present, ie_ptr, 1); - if(0 != sib7->carrier_freqs_info_list_size) - { - liblte_value_2_bits(1, ie_ptr, 1); - }else{ - liblte_value_2_bits(0, ie_ptr, 1); - } - - liblte_rrc_pack_t_reselection_ie(sib7->t_resel_geran, ie_ptr); - if(true == sib7->t_resel_geran_sf_present) - { - liblte_rrc_pack_speed_state_scale_factors_ie(&sib7->t_resel_geran_sf, ie_ptr); - } - if(0 != sib7->carrier_freqs_info_list_size) - { - liblte_value_2_bits(sib7->carrier_freqs_info_list_size - 1, ie_ptr, 4); - for(i=0; icarrier_freqs_info_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_rrc_pack_carrier_freqs_geran_ie(&sib7->carrier_freqs_info_list[i].carrier_freqs, ie_ptr); - - // Common Info - { - // Optional indicators - liblte_value_2_bits(sib7->carrier_freqs_info_list[i].cell_resel_prio_present, ie_ptr, 1); - liblte_value_2_bits(sib7->carrier_freqs_info_list[i].p_max_geran_present, ie_ptr, 1); - - if(true == sib7->carrier_freqs_info_list[i].cell_resel_prio_present) - { - liblte_rrc_pack_cell_reselection_priority_ie(sib7->carrier_freqs_info_list[i].cell_resel_prio, ie_ptr); - } - liblte_value_2_bits(sib7->carrier_freqs_info_list[i].ncc_permitted, ie_ptr, 8); - liblte_value_2_bits((sib7->carrier_freqs_info_list[i].q_rx_lev_min + 115) / 2, ie_ptr, 6); - if(true == sib7->carrier_freqs_info_list[i].p_max_geran_present) - { - liblte_value_2_bits(sib7->carrier_freqs_info_list[i].p_max_geran, ie_ptr, 6); - } - liblte_rrc_pack_reselection_threshold_ie(sib7->carrier_freqs_info_list[i].threshx_high, ie_ptr); - liblte_rrc_pack_reselection_threshold_ie(sib7->carrier_freqs_info_list[i].threshx_low, ie_ptr); - } - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_7_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT *sib7) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool ext_ind; - bool carrier_freqs_info_list_opt; - bool carrier_freqs_info_list_ext_ind; - - if(ie_ptr != NULL && - sib7 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - sib7->t_resel_geran_sf_present = liblte_bits_2_value(ie_ptr, 1); - carrier_freqs_info_list_opt = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_t_reselection_ie(ie_ptr, &sib7->t_resel_geran); - if(true == sib7->t_resel_geran_sf_present) - { - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &sib7->t_resel_geran_sf); - } - if(true == carrier_freqs_info_list_opt) - { - sib7->carrier_freqs_info_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; icarrier_freqs_info_list_size; i++) - { - // Extension indicator - carrier_freqs_info_list_ext_ind = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_carrier_freqs_geran_ie(ie_ptr, &sib7->carrier_freqs_info_list[i].carrier_freqs); - - // Common Info - { - // Optional indicators - sib7->carrier_freqs_info_list[i].cell_resel_prio_present = liblte_bits_2_value(ie_ptr, 1); - sib7->carrier_freqs_info_list[i].p_max_geran_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == sib7->carrier_freqs_info_list[i].cell_resel_prio_present) - { - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib7->carrier_freqs_info_list[i].cell_resel_prio); - } - sib7->carrier_freqs_info_list[i].ncc_permitted = liblte_bits_2_value(ie_ptr, 8); - sib7->carrier_freqs_info_list[i].q_rx_lev_min = (liblte_bits_2_value(ie_ptr, 6) * 2) - 115; - if(true == sib7->carrier_freqs_info_list[i].p_max_geran_present) - { - sib7->carrier_freqs_info_list[i].p_max_geran = liblte_bits_2_value(ie_ptr, 6); - } - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib7->carrier_freqs_info_list[i].threshx_high); - liblte_rrc_unpack_reselection_threshold_ie(ie_ptr, &sib7->carrier_freqs_info_list[i].threshx_low); - } - } - }else{ - sib7->carrier_freqs_info_list_size = 0; - } - - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 8 - - Description: Contains information relevant only for inter-RAT - cell re-selection i.e. information about CDMA2000 - frequencies and CDMA2000 neighboring cells relevant - for cell re-selection - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_8_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT *sib8, - uint8 **ie_ptr) -{ - LIBLTE_RRC_NEIGH_CELL_CDMA2000_STRUCT *neigh_cell_list; - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - uint32 j; - uint32 k; - - if(sib8 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(sib8->sys_time_info_present, ie_ptr, 1); - liblte_value_2_bits(sib8->search_win_size_present, ie_ptr, 1); - liblte_value_2_bits(sib8->params_hrpd_present, ie_ptr, 1); - liblte_value_2_bits(sib8->params_1xrtt_present, ie_ptr, 1); - - if(true == sib8->sys_time_info_present) - { - liblte_rrc_pack_system_time_info_cdma2000_ie(&sib8->sys_time_info_cdma2000, ie_ptr); - } - - if(true == sib8->search_win_size_present) - { - liblte_value_2_bits(sib8->search_win_size, ie_ptr, 4); - } - - if(true == sib8->params_hrpd_present) - { - // Optional indicator - liblte_value_2_bits(sib8->cell_resel_params_hrpd_present, ie_ptr, 1); - - liblte_rrc_pack_pre_registration_info_hrpd_ie(&sib8->pre_reg_info_hrpd, ie_ptr); - - if(true == sib8->cell_resel_params_hrpd_present) - { - // Optional indicator - liblte_value_2_bits(sib8->cell_resel_params_hrpd.t_resel_cdma2000_sf_present, ie_ptr, 1); - - liblte_value_2_bits(sib8->cell_resel_params_hrpd.band_class_list_size - 1, ie_ptr, 5); - for(i=0; icell_resel_params_hrpd.band_class_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicator - liblte_value_2_bits(sib8->cell_resel_params_hrpd.band_class_list[i].cell_resel_prio_present, ie_ptr, 1); - - liblte_rrc_pack_band_class_cdma2000_ie(sib8->cell_resel_params_hrpd.band_class_list[i].band_class, ie_ptr); - if(true == sib8->cell_resel_params_hrpd.band_class_list[i].cell_resel_prio_present) - { - liblte_rrc_pack_cell_reselection_priority_ie(sib8->cell_resel_params_hrpd.band_class_list[i].cell_resel_prio, ie_ptr); - } - liblte_value_2_bits(sib8->cell_resel_params_hrpd.band_class_list[i].thresh_x_high, ie_ptr, 6); - liblte_value_2_bits(sib8->cell_resel_params_hrpd.band_class_list[i].thresh_x_low, ie_ptr, 6); - } - - liblte_value_2_bits(sib8->cell_resel_params_hrpd.neigh_cell_list_size - 1, ie_ptr, 4); - for(i=0; icell_resel_params_hrpd.neigh_cell_list_size; i++) - { - neigh_cell_list = &sib8->cell_resel_params_hrpd.neigh_cell_list[i]; - liblte_rrc_pack_band_class_cdma2000_ie(neigh_cell_list->band_class, ie_ptr); - liblte_value_2_bits(neigh_cell_list->neigh_cells_per_freq_list_size - 1, ie_ptr, 4); - for(j=0; jneigh_cells_per_freq_list_size; j++) - { - liblte_rrc_pack_arfcn_value_cdma2000_ie(neigh_cell_list->neigh_cells_per_freq_list[j].arfcn, ie_ptr); - liblte_value_2_bits(neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list_size - 1, ie_ptr, 4); - for(k=0; kneigh_cells_per_freq_list[j].phys_cell_id_list_size; k++) - { - liblte_rrc_pack_phys_cell_id_cdma2000_ie(neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list[k], ie_ptr); - } - } - } - liblte_rrc_pack_t_reselection_ie(sib8->cell_resel_params_hrpd.t_resel_cdma2000, ie_ptr); - - if(true == sib8->cell_resel_params_hrpd.t_resel_cdma2000_sf_present) - { - liblte_rrc_pack_speed_state_scale_factors_ie(&sib8->cell_resel_params_hrpd.t_resel_cdma2000_sf, ie_ptr); - } - } - } - - if(true == sib8->params_1xrtt_present) - { - // Optional indicators - liblte_value_2_bits(sib8->csfb_reg_param_1xrtt_present, ie_ptr, 1); - liblte_value_2_bits(sib8->long_code_state_1xrtt_present, ie_ptr, 1); - liblte_value_2_bits(sib8->cell_resel_params_1xrtt_present, ie_ptr, 1); - - if(true == sib8->csfb_reg_param_1xrtt_present) - { - liblte_rrc_pack_csfb_registration_param_1xrtt_ie(&sib8->csfb_reg_param_1xrtt, ie_ptr); - } - - if(true == sib8->long_code_state_1xrtt_present) - { - liblte_value_2_bits((uint32)(sib8->long_code_state_1xrtt >> 10), ie_ptr, 32); - liblte_value_2_bits((uint32)(sib8->long_code_state_1xrtt & 0x3FF), ie_ptr, 10); - } - - if(true == sib8->cell_resel_params_1xrtt_present) - { - // Optional indicator - liblte_value_2_bits(sib8->cell_resel_params_1xrtt.t_resel_cdma2000_sf_present, ie_ptr, 1); - - liblte_value_2_bits(sib8->cell_resel_params_1xrtt.band_class_list_size - 1, ie_ptr, 5); - for(i=0; icell_resel_params_1xrtt.band_class_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicator - liblte_value_2_bits(sib8->cell_resel_params_1xrtt.band_class_list[i].cell_resel_prio_present, ie_ptr, 1); - - liblte_rrc_pack_band_class_cdma2000_ie(sib8->cell_resel_params_1xrtt.band_class_list[i].band_class, ie_ptr); - if(true == sib8->cell_resel_params_1xrtt.band_class_list[i].cell_resel_prio_present) - { - liblte_rrc_pack_cell_reselection_priority_ie(sib8->cell_resel_params_1xrtt.band_class_list[i].cell_resel_prio, ie_ptr); - } - liblte_value_2_bits(sib8->cell_resel_params_1xrtt.band_class_list[i].thresh_x_high, ie_ptr, 6); - liblte_value_2_bits(sib8->cell_resel_params_1xrtt.band_class_list[i].thresh_x_low, ie_ptr, 6); - } - - liblte_value_2_bits(sib8->cell_resel_params_1xrtt.neigh_cell_list_size - 1, ie_ptr, 4); - for(i=0; icell_resel_params_1xrtt.neigh_cell_list_size; i++) - { - neigh_cell_list = &sib8->cell_resel_params_1xrtt.neigh_cell_list[i]; - liblte_rrc_pack_band_class_cdma2000_ie(neigh_cell_list->band_class, ie_ptr); - liblte_value_2_bits(neigh_cell_list->neigh_cells_per_freq_list_size - 1, ie_ptr, 4); - for(j=0; jneigh_cells_per_freq_list_size; j++) - { - liblte_rrc_pack_arfcn_value_cdma2000_ie(neigh_cell_list->neigh_cells_per_freq_list[j].arfcn, ie_ptr); - liblte_value_2_bits(neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list_size - 1, ie_ptr, 4); - for(k=0; kneigh_cells_per_freq_list[j].phys_cell_id_list_size; k++) - { - liblte_rrc_pack_phys_cell_id_cdma2000_ie(neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list[k], ie_ptr); - } - } - } - liblte_rrc_pack_t_reselection_ie(sib8->cell_resel_params_1xrtt.t_resel_cdma2000, ie_ptr); - - if(true == sib8->cell_resel_params_1xrtt.t_resel_cdma2000_sf_present) - { - liblte_rrc_pack_speed_state_scale_factors_ie(&sib8->cell_resel_params_1xrtt.t_resel_cdma2000_sf, ie_ptr); - } - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_8_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT *sib8) -{ - LIBLTE_RRC_NEIGH_CELL_CDMA2000_STRUCT *neigh_cell_list; - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - uint32 j; - uint32 k; - bool ext_ind; - - if(ie_ptr != NULL && - sib8 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - sib8->sys_time_info_present = liblte_bits_2_value(ie_ptr, 1); - sib8->search_win_size_present = liblte_bits_2_value(ie_ptr, 1); - sib8->params_hrpd_present = liblte_bits_2_value(ie_ptr, 1); - sib8->params_1xrtt_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == sib8->sys_time_info_present) - { - liblte_rrc_unpack_system_time_info_cdma2000_ie(ie_ptr, &sib8->sys_time_info_cdma2000); - } - - if(true == sib8->search_win_size_present) - { - sib8->search_win_size = liblte_bits_2_value(ie_ptr, 4); - } - - if(true == sib8->params_hrpd_present) - { - // Optional indicator - sib8->cell_resel_params_hrpd_present = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_pre_registration_info_hrpd_ie(ie_ptr, &sib8->pre_reg_info_hrpd); - - if(true == sib8->cell_resel_params_hrpd_present) - { - // Optional indicator - sib8->cell_resel_params_hrpd.t_resel_cdma2000_sf_present = liblte_bits_2_value(ie_ptr, 1); - - sib8->cell_resel_params_hrpd.band_class_list_size = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; icell_resel_params_hrpd.band_class_list_size; i++) - { - // Extension indicator - bool ext = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicator - sib8->cell_resel_params_hrpd.band_class_list[i].cell_resel_prio_present = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_band_class_cdma2000_ie(ie_ptr, &sib8->cell_resel_params_hrpd.band_class_list[i].band_class); - if(true == sib8->cell_resel_params_hrpd.band_class_list[i].cell_resel_prio_present) - { - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib8->cell_resel_params_hrpd.band_class_list[i].cell_resel_prio); - } - sib8->cell_resel_params_hrpd.band_class_list[i].thresh_x_high = liblte_bits_2_value(ie_ptr, 6); - sib8->cell_resel_params_hrpd.band_class_list[i].thresh_x_low = liblte_bits_2_value(ie_ptr, 6); - - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - } - - sib8->cell_resel_params_hrpd.neigh_cell_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; icell_resel_params_hrpd.neigh_cell_list_size; i++) - { - neigh_cell_list = &sib8->cell_resel_params_hrpd.neigh_cell_list[i]; - liblte_rrc_unpack_band_class_cdma2000_ie(ie_ptr, &neigh_cell_list->band_class); - neigh_cell_list->neigh_cells_per_freq_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(j=0; jneigh_cells_per_freq_list_size; j++) - { - liblte_rrc_unpack_arfcn_value_cdma2000_ie(ie_ptr, &neigh_cell_list->neigh_cells_per_freq_list[j].arfcn); - neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(k=0; kneigh_cells_per_freq_list[j].phys_cell_id_list_size; k++) - { - liblte_rrc_unpack_phys_cell_id_cdma2000_ie(ie_ptr, &neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list[k]); - } - } - } - liblte_rrc_unpack_t_reselection_ie(ie_ptr, &sib8->cell_resel_params_hrpd.t_resel_cdma2000); - - if(true == sib8->cell_resel_params_hrpd.t_resel_cdma2000_sf_present) - { - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &sib8->cell_resel_params_hrpd.t_resel_cdma2000_sf); - } - } - }else{ - sib8->cell_resel_params_hrpd_present = false; - } - - if(true == sib8->params_1xrtt_present) - { - // Optional indicators - sib8->csfb_reg_param_1xrtt_present = liblte_bits_2_value(ie_ptr, 1); - sib8->long_code_state_1xrtt_present = liblte_bits_2_value(ie_ptr, 1); - sib8->cell_resel_params_1xrtt_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == sib8->csfb_reg_param_1xrtt_present) - { - liblte_rrc_unpack_csfb_registration_param_1xrtt_ie(ie_ptr, &sib8->csfb_reg_param_1xrtt); - } - - if(true == sib8->long_code_state_1xrtt_present) - { - sib8->long_code_state_1xrtt = (uint64)liblte_bits_2_value(ie_ptr, 32) << 10; - sib8->long_code_state_1xrtt |= (uint64)liblte_bits_2_value(ie_ptr, 10); - } - - if(true == sib8->cell_resel_params_1xrtt_present) - { - // Optional indicator - sib8->cell_resel_params_1xrtt.t_resel_cdma2000_sf_present = liblte_bits_2_value(ie_ptr, 1); - - sib8->cell_resel_params_1xrtt.band_class_list_size = liblte_bits_2_value(ie_ptr, 5) + 1; - for(i=0; icell_resel_params_1xrtt.band_class_list_size; i++) - { - // Extension indicator - bool ext2 = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicator - sib8->cell_resel_params_1xrtt.band_class_list[i].cell_resel_prio_present = liblte_bits_2_value(ie_ptr, 1); - - liblte_rrc_unpack_band_class_cdma2000_ie(ie_ptr, &sib8->cell_resel_params_1xrtt.band_class_list[i].band_class); - if(true == sib8->cell_resel_params_1xrtt.band_class_list[i].cell_resel_prio_present) - { - liblte_rrc_unpack_cell_reselection_priority_ie(ie_ptr, &sib8->cell_resel_params_1xrtt.band_class_list[i].cell_resel_prio); - } - sib8->cell_resel_params_1xrtt.band_class_list[i].thresh_x_high = liblte_bits_2_value(ie_ptr, 6); - sib8->cell_resel_params_1xrtt.band_class_list[i].thresh_x_low = liblte_bits_2_value(ie_ptr, 6); - - liblte_rrc_consume_noncrit_extension(ext2, __func__, ie_ptr); - } - - sib8->cell_resel_params_1xrtt.neigh_cell_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(i=0; icell_resel_params_1xrtt.neigh_cell_list_size; i++) - { - neigh_cell_list = &sib8->cell_resel_params_1xrtt.neigh_cell_list[i]; - liblte_rrc_unpack_band_class_cdma2000_ie(ie_ptr, &neigh_cell_list->band_class); - neigh_cell_list->neigh_cells_per_freq_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(j=0; jneigh_cells_per_freq_list_size; j++) - { - liblte_rrc_unpack_arfcn_value_cdma2000_ie(ie_ptr, &neigh_cell_list->neigh_cells_per_freq_list[j].arfcn); - neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list_size = liblte_bits_2_value(ie_ptr, 4) + 1; - for(k=0; kneigh_cells_per_freq_list[j].phys_cell_id_list_size; k++) - { - liblte_rrc_unpack_phys_cell_id_cdma2000_ie(ie_ptr, &neigh_cell_list->neigh_cells_per_freq_list[j].phys_cell_id_list[k]); - } - } - } - liblte_rrc_unpack_t_reselection_ie(ie_ptr, &sib8->cell_resel_params_1xrtt.t_resel_cdma2000); - - if(true == sib8->cell_resel_params_1xrtt.t_resel_cdma2000_sf_present) - { - liblte_rrc_unpack_speed_state_scale_factors_ie(ie_ptr, &sib8->cell_resel_params_1xrtt.t_resel_cdma2000_sf); - } - } - }else{ - sib8->csfb_reg_param_1xrtt_present = false; - sib8->long_code_state_1xrtt_present = false; - sib8->cell_resel_params_1xrtt_present = false; - } - - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 9 - - Description: Contains a home eNB name (HNB name) - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_9_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *sib9, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(sib9 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(sib9->hnb_name_present, ie_ptr, 1); - - if(true == sib9->hnb_name_present) { - // Dynamic octet string - hnb_name - liblte_value_2_bits(sib9->hnb_name_size - 1, ie_ptr, 6); - - // Octets - for(i=0;ihnb_name_size;i++) { - liblte_value_2_bits(sib9->hnb_name[i], ie_ptr, 8); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_9_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *sib9) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - bool ext_ind; - uint32 i; - - if(ie_ptr != NULL && - sib9 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - sib9->hnb_name_present = liblte_bits_2_value(ie_ptr, 1); - - if(true == sib9->hnb_name_present) { - // Dynamic octet string - hnb_name - // Length - sib9->hnb_name_size = liblte_bits_2_value(ie_ptr, 6) + 1; - - // Octets - for(i=0;ihnb_name_size;i++) { - sib9->hnb_name[i] = liblte_bits_2_value(ie_ptr, 8); - } - } - - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - IE Name: System Information Block Type 10 - - Description: Contains an ETWS primary notification - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: System Information Block Type 11 - - Description: Contains an ETWS secondary notification - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: System Information Block Type 12 - - Description: Contains a CMAS notification - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -// FIXME - -/********************************************************************* - IE Name: System Information Block Type 13 - - Description: Contains the information required to acquire the - MBMS control information associated with one or more - MBSFN areas - - Document Reference: 36.331 v10.0.0 Section 6.3.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_13_ie(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - - if(sib13 != NULL && - ie_ptr != NULL) - { - // Extension indicator - liblte_value_2_bits(0, ie_ptr, 1); - - // Optional indicators - liblte_value_2_bits(0, ie_ptr, 1); - - liblte_value_2_bits(sib13->mbsfn_area_info_list_r9_size - 1, ie_ptr, 3); - for(i=0; imbsfn_area_info_list_r9_size; i++) - { - liblte_rrc_pack_mbsfn_area_info_ie(&sib13->mbsfn_area_info_list_r9[i], ie_ptr); - } - liblte_rrc_pack_mbsfn_notification_config_ie(&sib13->mbsfn_notification_config, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_13_ie(uint8 **ie_ptr, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint32 i; - bool ext_ind; - bool non_crit_ext_present; - - if(ie_ptr != NULL && - sib13 != NULL) - { - // Extension indicator - ext_ind = liblte_bits_2_value(ie_ptr, 1); - - // Optional indicators - non_crit_ext_present = liblte_bits_2_value(ie_ptr, 1); - - sib13->mbsfn_area_info_list_r9_size = liblte_bits_2_value(ie_ptr, 3) + 1; - for(i=0; imbsfn_area_info_list_r9_size; i++) - { - liblte_rrc_unpack_mbsfn_area_info_ie(ie_ptr, &sib13->mbsfn_area_info_list_r9[i]); - } - liblte_rrc_unpack_mbsfn_notification_config_ie(ie_ptr, &sib13->mbsfn_notification_config); - - liblte_rrc_consume_noncrit_extension(ext_ind, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/******************************************************************************* - MESSAGE FUNCTIONS -*******************************************************************************/ - -/********************************************************************* - Message Name: UL Information Transfer - - Description: Used for the uplink transfer dedicated NAS - information - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_information_transfer_msg(LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *ul_info_transfer, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(ul_info_transfer != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Dedicated info type choice - liblte_value_2_bits(ul_info_transfer->dedicated_info_type, &msg_ptr, 2); - - if(LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_NAS == ul_info_transfer->dedicated_info_type) - { - liblte_rrc_pack_dedicated_info_nas_ie(&ul_info_transfer->dedicated_info, - &msg_ptr); - }else{ - liblte_rrc_pack_dedicated_info_cdma2000_ie(&ul_info_transfer->dedicated_info, - &msg_ptr); - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_information_transfer_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *ul_info_transfer) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - ul_info_transfer != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Dedicated info type choice - ul_info_transfer->dedicated_info_type = (LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 2); - - if(LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_NAS == ul_info_transfer->dedicated_info_type) - { - liblte_rrc_unpack_dedicated_info_nas_ie(&msg_ptr, - &ul_info_transfer->dedicated_info); - }else{ - liblte_rrc_unpack_dedicated_info_cdma2000_ie(&msg_ptr, - &ul_info_transfer->dedicated_info); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: UL Handover Preparation Transfer (CDMA2000) - - Description: Used for the uplink transfer of handover related - CDMA2000 information when requested by the higher - layers - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: UE Information Response - - Description: Used by the UE to transfer the information requested - by the E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: UE Information Request - - Description: Used by E-UTRAN to retrieve information from the UE - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_information_request_msg(LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT *ue_info_req, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(ue_info_req != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(ue_info_req->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // RACH report required - liblte_value_2_bits(ue_info_req->rach_report_req, &msg_ptr, 1); - - // RLF report required - liblte_value_2_bits(ue_info_req->rlf_report_req, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_information_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT *ue_info_req) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - ue_info_req != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &ue_info_req->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // RACH report required - ue_info_req->rach_report_req = liblte_bits_2_value(&msg_ptr, 1); - - // RLF report required - ue_info_req->rlf_report_req = liblte_bits_2_value(&msg_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: UE Capability Information - - Description: Used to transfer UE radio access capabilities - requested by the E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_capability_information_msg(LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *ue_capability_info, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - - if(ue_capability_info != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(ue_capability_info->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 3); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - liblte_value_2_bits(ue_capability_info->N_ue_caps, &msg_ptr, 4); - for(i=0; iN_ue_caps; i++) - { - // RAT-Type - liblte_value_2_bits(0, &msg_ptr, 1); //Optional indicator - liblte_value_2_bits(ue_capability_info->ue_capability_rat[i].rat_type, &msg_ptr, 3); - - // Octet string - LIBLTE_BIT_MSG_STRUCT tmp; - liblte_rrc_pack_ue_eutra_capability_ie(&ue_capability_info->ue_capability_rat[i].eutra_capability, &tmp); - - uint32 pad = 8 - tmp.N_bits%8; - uint32 n_bytes = (tmp.N_bits+pad) / 8; - if(n_bytes < 128) - { - liblte_value_2_bits(0, &msg_ptr, 1); - liblte_value_2_bits(n_bytes, &msg_ptr, 7); - }else if(n_bytes < 16383){ - liblte_value_2_bits(1, &msg_ptr, 1); - liblte_value_2_bits(0, &msg_ptr, 1); - liblte_value_2_bits(n_bytes, &msg_ptr, 14); - }else{ - // FIXME: Unlikely to have more than 16K of octets - } - - for(i=0; iN_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_capability_information_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *ue_capability_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - - if(msg != NULL && - ue_capability_info != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &ue_capability_info->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 3); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - ue_capability_info->N_ue_caps = liblte_bits_2_value(&msg_ptr, 4); - for(i=0; iN_ue_caps; i++) - { - liblte_bits_2_value(&msg_ptr, 1); //Optional indicator - ue_capability_info->ue_capability_rat[i].rat_type = (LIBLTE_RRC_RAT_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 3); - - //Octet string - uint32 n_bytes = 0; - if(0 == liblte_bits_2_value(&msg_ptr, 1)) - { - n_bytes = liblte_bits_2_value(&msg_ptr, 7); - }else{ - if(0 == liblte_bits_2_value(&msg_ptr, 1)) - { - n_bytes = liblte_bits_2_value(&msg_ptr, 14); - }else{ - // FIXME: Unlikely to have more than 16K of octets - n_bytes = 0; - } - } - - liblte_rrc_unpack_ue_eutra_capability_ie(&msg_ptr, &ue_capability_info->ue_capability_rat[i].eutra_capability); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - - -/********************************************************************* - Message Name: UE Capability Enquiry - - Description: Used to request the transfer of UE radio access - capabilities for E-UTRA as well as for other RATs - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ue_capability_enquiry_msg(LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT *ue_cap_enquiry, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - - if(ue_cap_enquiry != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(ue_cap_enquiry->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // UE-CapabilityRequest - liblte_value_2_bits(ue_cap_enquiry->N_ue_cap_reqs - 1, &msg_ptr, 3); - for(i=0; iue_capability_request[i], &msg_ptr); - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ue_capability_enquiry_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT *ue_cap_enquiry) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - - if(msg != NULL && - ue_cap_enquiry != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &ue_cap_enquiry->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - ue_cap_enquiry->N_ue_cap_reqs = liblte_bits_2_value(&msg_ptr, 3) + 1; - for(i=0; iN_ue_cap_reqs; i++) - { - liblte_rrc_unpack_rat_type_ie(&msg_ptr, &ue_cap_enquiry->ue_capability_request[i]); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - - -/********************************************************************* - Message Name: System Information Block Type 1 - - Description: Contains information relevant when evaluating if a - UE is allowed to access a cell and defines the - scheduling of other system information - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_block_type_1_msg(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - uint32 j; - uint8 non_crit_ext_opt = false; - uint8 csg_id_opt = false; - uint8 q_rx_lev_min_offset_opt = false; - uint8 extension = false; - - if(sib1 != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Optional indicators - liblte_value_2_bits(sib1->p_max_present, &msg_ptr, 1); - liblte_value_2_bits(sib1->tdd, &msg_ptr, 1); - liblte_value_2_bits(non_crit_ext_opt, &msg_ptr, 1); - - // Cell Access Related Info - liblte_value_2_bits(csg_id_opt, &msg_ptr, 1); - liblte_value_2_bits(sib1->N_plmn_ids - 1, &msg_ptr, 3); - for(i=0; iN_plmn_ids; i++) - { - liblte_rrc_pack_plmn_identity_ie(&sib1->plmn_id[i].id, &msg_ptr); - liblte_value_2_bits(sib1->plmn_id[i].resv_for_oper, &msg_ptr, 1); - } - liblte_rrc_pack_tracking_area_code_ie(sib1->tracking_area_code, &msg_ptr); - liblte_rrc_pack_cell_identity_ie(sib1->cell_id, &msg_ptr); - liblte_value_2_bits(sib1->cell_barred, &msg_ptr, 1); - liblte_value_2_bits(sib1->intra_freq_reselection, &msg_ptr, 1); - liblte_value_2_bits(sib1->csg_indication, &msg_ptr, 1); - if(true == csg_id_opt) - { - liblte_rrc_pack_csg_identity_ie(sib1->csg_id, &msg_ptr); - } - - // Cell Selection Info - liblte_value_2_bits(q_rx_lev_min_offset_opt, &msg_ptr, 1); - liblte_rrc_pack_q_rx_lev_min_ie(sib1->q_rx_lev_min, &msg_ptr); - if(true == q_rx_lev_min_offset_opt) - { - liblte_value_2_bits((sib1->q_rx_lev_min_offset / 2) - 1, &msg_ptr, 3); - } - - // P Max - if(true == sib1->p_max_present) - { - liblte_rrc_pack_p_max_ie(sib1->p_max, &msg_ptr); - } - - // Freq Band Indicator - liblte_value_2_bits(sib1->freq_band_indicator - 1, &msg_ptr, 6); - - // Scheduling Info List - liblte_value_2_bits(sib1->N_sched_info - 1, &msg_ptr, 5); - for(i=0; iN_sched_info; i++) - { - liblte_value_2_bits(sib1->sched_info[i].si_periodicity, &msg_ptr, 3); - liblte_value_2_bits(sib1->sched_info[i].N_sib_mapping_info, &msg_ptr, 5); - for(j=0; jsched_info[i].N_sib_mapping_info; j++) - { - liblte_value_2_bits(extension, &msg_ptr, 1); - liblte_value_2_bits(sib1->sched_info[i].sib_mapping_info[j].sib_type, &msg_ptr, 4); - } - } - - // TDD Config - if(true == sib1->tdd) - { - liblte_rrc_pack_tdd_config_ie(&sib1->tdd_cnfg, &msg_ptr); - } - - // SI Window Length - liblte_value_2_bits(sib1->si_window_length, &msg_ptr, 3); - - // System Info Value Tag - liblte_value_2_bits(sib1->system_info_value_tag, &msg_ptr, 5); - - // Non Critical Extension - // FIXME - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_block_type_1_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1, - uint32 *N_bits_used) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - uint32 j; - bool tdd_config_opt; - bool non_crit_ext_opt; - bool csg_id_opt; - bool q_rx_lev_min_offset_opt; - bool extension; - - if(msg != NULL && - sib1 != NULL && - N_bits_used != NULL) - { - msg_ptr = msg->msg; - - // Optional indicators - sib1->p_max_present = liblte_bits_2_value(&msg_ptr, 1); - tdd_config_opt = liblte_bits_2_value(&msg_ptr, 1); - non_crit_ext_opt = liblte_bits_2_value(&msg_ptr, 1); - - // Cell Access Related Info - csg_id_opt = liblte_bits_2_value(&msg_ptr, 1); - sib1->N_plmn_ids = liblte_bits_2_value(&msg_ptr, 3) + 1; - for(i=0; iN_plmn_ids; i++) - { - liblte_rrc_unpack_plmn_identity_ie(&msg_ptr, &sib1->plmn_id[i].id); - if(LIBLTE_RRC_MCC_NOT_PRESENT == sib1->plmn_id[i].id.mcc && - 0 != i) - { - sib1->plmn_id[i].id.mcc = sib1->plmn_id[i-1].id.mcc; - } - sib1->plmn_id[i].resv_for_oper = (LIBLTE_RRC_RESV_FOR_OPER_ENUM)liblte_bits_2_value(&msg_ptr, 1); - } - liblte_rrc_unpack_tracking_area_code_ie(&msg_ptr, &sib1->tracking_area_code); - liblte_rrc_unpack_cell_identity_ie(&msg_ptr, &sib1->cell_id); - sib1->cell_barred = (LIBLTE_RRC_CELL_BARRED_ENUM)liblte_bits_2_value(&msg_ptr, 1); - sib1->intra_freq_reselection = (LIBLTE_RRC_INTRA_FREQ_RESELECTION_ENUM)liblte_bits_2_value(&msg_ptr, 1); - sib1->csg_indication = liblte_bits_2_value(&msg_ptr, 1); - if(true == csg_id_opt) - { - liblte_rrc_unpack_csg_identity_ie(&msg_ptr, &sib1->csg_id); - }else{ - sib1->csg_id = LIBLTE_RRC_CSG_IDENTITY_NOT_PRESENT; - } - - // Cell Selection Info - q_rx_lev_min_offset_opt = liblte_bits_2_value(&msg_ptr, 1); - liblte_rrc_unpack_q_rx_lev_min_ie(&msg_ptr, &sib1->q_rx_lev_min); - if(true == q_rx_lev_min_offset_opt) - { - sib1->q_rx_lev_min_offset = (liblte_bits_2_value(&msg_ptr, 3) + 1) * 2; - }else{ - sib1->q_rx_lev_min_offset = 0; - } - - // P Max - if(true == sib1->p_max_present) - { - liblte_rrc_unpack_p_max_ie(&msg_ptr, &sib1->p_max); - } - - // Freq Band Indicator - sib1->freq_band_indicator = liblte_bits_2_value(&msg_ptr, 6) + 1; - - // Scheduling Info List - sib1->N_sched_info = liblte_bits_2_value(&msg_ptr, 5) + 1; - for(i=0; iN_sched_info; i++) - { - sib1->sched_info[i].si_periodicity = (LIBLTE_RRC_SI_PERIODICITY_ENUM)liblte_bits_2_value(&msg_ptr, 3); - sib1->sched_info[i].N_sib_mapping_info = liblte_bits_2_value(&msg_ptr, 5); - for(j=0; jsched_info[i].N_sib_mapping_info; j++) - { - extension = liblte_bits_2_value(&msg_ptr, 1); - sib1->sched_info[i].sib_mapping_info[j].sib_type = (LIBLTE_RRC_SIB_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 4); - } - } - - // TDD Config - if(true == tdd_config_opt) - { - sib1->tdd = true; - liblte_rrc_unpack_tdd_config_ie(&msg_ptr, &sib1->tdd_cnfg); - }else{ - sib1->tdd = false; - } - - // SI Window Length - sib1->si_window_length = (LIBLTE_RRC_SI_WINDOW_LENGTH_ENUM)liblte_bits_2_value(&msg_ptr, 3); - - // System Info Value Tag - sib1->system_info_value_tag = liblte_bits_2_value(&msg_ptr, 5); - - // Non Critical Extension - liblte_rrc_consume_noncrit_extension(non_crit_ext_opt, __func__, &msg_ptr); - - // N_bits_used - *N_bits_used = msg_ptr - (msg->msg); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: System Information - - Description: Conveys one or more System Information Blocks - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_msg(LIBLTE_RRC_SYS_INFO_MSG_STRUCT *sibs, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 *length_ptr; - uint32 length; - uint32 pad_bits; - uint32 i; - - if(sibs != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Critical extensions choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Number of SIBs present - liblte_value_2_bits(sibs->N_sibs - 1, &msg_ptr, 5); - - for(i=0; iN_sibs; i++) - { - if(sibs->sibs[i].sib_type < LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_12) - { - // Extension indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - liblte_value_2_bits(sibs->sibs[i].sib_type, &msg_ptr, 4); - switch(sibs->sibs[i].sib_type) - { - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2: - err = liblte_rrc_pack_sys_info_block_type_2_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3: - err = liblte_rrc_pack_sys_info_block_type_3_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4: - err = liblte_rrc_pack_sys_info_block_type_4_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8: - err = liblte_rrc_pack_sys_info_block_type_8_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9: - err = liblte_rrc_pack_sys_info_block_type_9_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5: - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6: - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7: - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_10: - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_11: - default: - printf("ERROR: Not handling sib type %u\n", sibs->sibs[i].sib_type); - err = LIBLTE_ERROR_INVALID_INPUTS; - break; - } - }else{ - // Extension indicator - liblte_value_2_bits(1, &msg_ptr, 1); - - liblte_value_2_bits(sibs->sibs[i].sib_type - 10, &msg_ptr, 7); - length_ptr = msg_ptr; - liblte_value_2_bits(0, &msg_ptr, 8); - switch(sibs->sibs[i].sib_type) - { - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13: - err = liblte_rrc_pack_sys_info_block_type_13_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_12: - default: - printf("ERROR: Not handling extended sib type %s\n", liblte_rrc_sys_info_block_type_text[sibs->sibs[i].sib_type]); - err = LIBLTE_ERROR_INVALID_INPUTS; - break; - } - length = ((msg_ptr - length_ptr) / 8) - 1; - pad_bits = (msg_ptr - length_ptr) % 8; - if(0 != pad_bits) - { - length++; - } - if(length < 128) - { - liblte_value_2_bits(0, &length_ptr, 1); - liblte_value_2_bits(length, &length_ptr, 7); - }else{ - msg_ptr = length_ptr; - liblte_value_2_bits(0, &msg_ptr, 2); - liblte_value_2_bits(length, &msg_ptr, 14); - switch(sibs->sibs[i].sib_type) - { - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13: - err = liblte_rrc_pack_sys_info_block_type_13_ie((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *)&sibs->sibs[i].sib, - &msg_ptr); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_12: - default: - printf("ERROR: Not handling extended sib type %s\n", liblte_rrc_sys_info_block_type_text[sibs->sibs[i].sib_type]); - err = LIBLTE_ERROR_INVALID_INPUTS; - break; - } - } - liblte_value_2_bits(0, &msg_ptr, pad_bits); - } - - if(LIBLTE_SUCCESS != err) - { - break; - } - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_sys_info_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SYS_INFO_MSG_STRUCT *sibs) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 *head_ptr; - uint32 i; - uint32 length_determinant_octets; - uint8 non_crit_ext_opt; - - if(msg != NULL && - sibs != NULL) - { - msg_ptr = msg->msg; - - // Critical extensions choice - if(0 == liblte_bits_2_value(&msg_ptr, 1)) - { - // Optional indicator - non_crit_ext_opt = liblte_bits_2_value(&msg_ptr, 1); - - // Number of SIBs present - sibs->N_sibs = liblte_bits_2_value(&msg_ptr, 5) + 1; - - for(i=0; iN_sibs; i++) - { - // Extension indicator - if(0 == liblte_bits_2_value(&msg_ptr, 1)) - { - sibs->sibs[i].sib_type = (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 4); - switch(sibs->sibs[i].sib_type) - { - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2: - err = liblte_rrc_unpack_sys_info_block_type_2_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3: - err = liblte_rrc_unpack_sys_info_block_type_3_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4: - err = liblte_rrc_unpack_sys_info_block_type_4_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5: - err = liblte_rrc_unpack_sys_info_block_type_5_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_5_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6: - err = liblte_rrc_unpack_sys_info_block_type_6_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_6_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7: - err = liblte_rrc_unpack_sys_info_block_type_7_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_7_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8: - err = liblte_rrc_unpack_sys_info_block_type_8_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_8_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9: - err = liblte_rrc_unpack_sys_info_block_type_9_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_10: - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_11: - default: - printf("ERROR: Not handling sib type %u\n", sibs->sibs[i].sib_type); - err = LIBLTE_ERROR_INVALID_INPUTS; - break; - } - }else{ - sibs->sibs[i].sib_type = (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_ENUM)(liblte_bits_2_value(&msg_ptr, 7) + 10); - length_determinant_octets = 0; - if(0 == liblte_bits_2_value(&msg_ptr, 1)) - { - length_determinant_octets = liblte_bits_2_value(&msg_ptr, 7); - }else{ - if(0 == liblte_bits_2_value(&msg_ptr, 1)) - { - length_determinant_octets = liblte_bits_2_value(&msg_ptr, 14); - }else{ - printf("ERROR: Not handling fragmented length determinants\n"); - } - } - head_ptr = msg_ptr; - switch(sibs->sibs[i].sib_type) - { - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13: - err = liblte_rrc_unpack_sys_info_block_type_13_ie(&msg_ptr, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *)&sibs->sibs[i].sib); - break; - case LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_12: - default: - printf("ERROR: Not handling extended sib type %s\n", liblte_rrc_sys_info_block_type_text[sibs->sibs[i].sib_type]); - err = LIBLTE_ERROR_INVALID_INPUTS; - break; - } - liblte_bits_2_value(&msg_ptr, (msg_ptr - head_ptr) % 8); - } - - if(LIBLTE_SUCCESS != err) - { - break; - } - } - - liblte_rrc_consume_noncrit_extension(non_crit_ext_opt, __func__, &msg_ptr); - - }else{ - printf("ERROR: Not handling critical extensions in system information message\n"); - } - } - - return(err); -} - -/********************************************************************* - Message Name: Security Mode Failure - - Description: Used to indicate an unsuccessful completion of a - security mode command - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_mode_failure_msg(LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *security_mode_failure, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(security_mode_failure != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(security_mode_failure->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_mode_failure_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *security_mode_failure) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - security_mode_failure != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &security_mode_failure->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: Security Mode Complete - - Description: Used to confirm the successful completion of a - security mode command - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_mode_complete_msg(LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *security_mode_complete, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(security_mode_complete != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(security_mode_complete->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_mode_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *security_mode_complete) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - security_mode_complete != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &security_mode_complete->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: Security Mode Command - - Description: Used to command the activation of AS security - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_security_mode_command_msg(LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT *security_mode_cmd, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(security_mode_cmd != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(security_mode_cmd->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Extension indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Security Algorithms Config - liblte_rrc_pack_security_algorithm_config_ie(&security_mode_cmd->sec_algs, - &msg_ptr); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_security_mode_command_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT *security_mode_cmd) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - security_mode_cmd != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &security_mode_cmd->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Extension indicator - bool ext2 = liblte_bits_2_value(&msg_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext2, __func__, &msg_ptr); - - // Security Algorithms Config - liblte_rrc_unpack_security_algorithm_config_ie(&msg_ptr, - &security_mode_cmd->sec_algs); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Setup Complete - - Description: Used to confirm the successful completion of an RRC - connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_setup_complete_msg(LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *con_setup_complete, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_setup_complete != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_setup_complete->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicators - liblte_value_2_bits(con_setup_complete->registered_mme_present, &msg_ptr, 1); - liblte_value_2_bits(0, &msg_ptr, 1); - - // Selected PLMN identity - liblte_value_2_bits(con_setup_complete->selected_plmn_id - 1, &msg_ptr, 3); - - // Registered MME - if(con_setup_complete->registered_mme_present) - { - // Optional indicator - liblte_value_2_bits(con_setup_complete->registered_mme.plmn_id_present, &msg_ptr, 1); - - // PLMN identity - if(con_setup_complete->registered_mme.plmn_id_present) - { - liblte_rrc_pack_plmn_identity_ie(&con_setup_complete->registered_mme.plmn_id, &msg_ptr); - } - - // MMEGI - liblte_value_2_bits(con_setup_complete->registered_mme.mmegi, &msg_ptr, 16); - - // MMEC - liblte_rrc_pack_mmec_ie(con_setup_complete->registered_mme.mmec, &msg_ptr); - } - - // Dedicated info NAS - liblte_rrc_pack_dedicated_info_nas_ie(&con_setup_complete->dedicated_info_nas, - &msg_ptr); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_setup_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *con_setup_complete) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_setup_complete != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &con_setup_complete->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicators - con_setup_complete->registered_mme_present = liblte_bits_2_value(&msg_ptr, 1); - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Selected PLMN identity - con_setup_complete->selected_plmn_id = liblte_bits_2_value(&msg_ptr, 3) + 1; - - // Registered MME - if(con_setup_complete->registered_mme_present) - { - // Optional indicator - con_setup_complete->registered_mme.plmn_id_present = liblte_bits_2_value(&msg_ptr, 1); - - // PLMN identity - if(con_setup_complete->registered_mme.plmn_id_present) - { - liblte_rrc_unpack_plmn_identity_ie(&msg_ptr, &con_setup_complete->registered_mme.plmn_id); - } - - // MMEGI - con_setup_complete->registered_mme.mmegi = liblte_bits_2_value(&msg_ptr, 16); - - // MMEC - liblte_rrc_unpack_mmec_ie(&msg_ptr, &con_setup_complete->registered_mme.mmec); - } - - // Dedicated info NAS - liblte_rrc_unpack_dedicated_info_nas_ie(&msg_ptr, - &con_setup_complete->dedicated_info_nas); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Setup - - Description: Used to establish SRB1 - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_setup_msg(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *con_setup, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_setup != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_setup->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 3); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Radio Resource Config Dedicated - liblte_rrc_pack_rr_config_dedicated_ie(&con_setup->rr_cnfg, &msg_ptr); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_setup_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_SETUP_STRUCT *con_setup) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_setup != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &con_setup->rrc_transaction_id); - - // Critical extension indicator - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 3); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Radio Resource Config Dedicated - liblte_rrc_unpack_rr_config_dedicated_ie(&msg_ptr, &con_setup->rr_cnfg); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Request - - Description: Used to request the establishment of an RRC - connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_request_msg(LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *con_req, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(con_req != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(ext, &msg_ptr, 1); - - // UE Identity Type - liblte_value_2_bits(con_req->ue_id_type, &msg_ptr, 1); - - // UE Identity - if(LIBLTE_RRC_CON_REQ_UE_ID_TYPE_S_TMSI == con_req->ue_id_type) - { - liblte_rrc_pack_s_tmsi_ie((LIBLTE_RRC_S_TMSI_STRUCT *)&con_req->ue_id, - &msg_ptr); - }else{ // LIBLTE_RRC_CON_REQ_UE_ID_TYPE_RANDOM_VALUE == con_req->ue_id_type - liblte_value_2_bits((uint32)(con_req->ue_id.random >> 32), &msg_ptr, 8); - liblte_value_2_bits((uint32)(con_req->ue_id.random), &msg_ptr, 32); - } - - // Establishment Cause - liblte_value_2_bits(con_req->cause, &msg_ptr, 3); - - // Spare - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *con_req) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_req != NULL) - { - msg_ptr = msg->msg; - - // Extension Choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // UE Identity Type - con_req->ue_id_type = (LIBLTE_RRC_CON_REQ_UE_ID_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 1); - - // UE Identity - if(LIBLTE_RRC_CON_REQ_UE_ID_TYPE_S_TMSI == con_req->ue_id_type) - { - liblte_rrc_unpack_s_tmsi_ie(&msg_ptr, - (LIBLTE_RRC_S_TMSI_STRUCT *)&con_req->ue_id); - }else{ // LIBLTE_RRC_CON_REQ_UE_ID_TYPE_RANDOM_VALUE == con_req->ue_id_type - con_req->ue_id.random = (uint64)liblte_bits_2_value(&msg_ptr, 8) << 32; - con_req->ue_id.random |= liblte_bits_2_value(&msg_ptr, 32); - } - - // Establishment Cause - con_req->cause = (LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM)liblte_bits_2_value(&msg_ptr, 3); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Release - - Description: Used to command the release of an RRC connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_release_msg(LIBLTE_RRC_CONNECTION_RELEASE_STRUCT *con_release, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_release != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_release->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicators - liblte_value_2_bits(0, &msg_ptr, 1); - liblte_value_2_bits(0, &msg_ptr, 1); - liblte_value_2_bits(0, &msg_ptr, 1); - - // Release cause - liblte_value_2_bits(con_release->release_cause, &msg_ptr, 2); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_release_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_RELEASE_STRUCT *con_release) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_release != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &con_release->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicators - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Release cause - con_release->release_cause = (LIBLTE_RRC_RELEASE_CAUSE_ENUM)liblte_bits_2_value(&msg_ptr, 2); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reject - - Description: Used to reject the RRC connection establishment - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reject_msg(LIBLTE_RRC_CONNECTION_REJECT_STRUCT *con_rej, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_rej != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Wait Time - liblte_value_2_bits(con_rej->wait_time - 1, &msg_ptr, 4); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reject_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REJECT_STRUCT *con_rej) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_rej != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Wait Time - con_rej->wait_time = liblte_bits_2_value(&msg_ptr, 4) + 1; - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reestablishment Request - - Description: Used to request the reestablishment of an RRC - connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_request_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *con_reest_req, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(con_reest_req != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(ext, &msg_ptr, 1); - - if(!ext) - { - // UE Identity - liblte_rrc_pack_c_rnti_ie((uint16)con_reest_req->ue_id.c_rnti, &msg_ptr); - liblte_rrc_pack_phys_cell_id_ie((uint16)con_reest_req->ue_id.phys_cell_id, &msg_ptr); - liblte_rrc_pack_short_mac_i_ie((uint16)con_reest_req->ue_id.short_mac_i, &msg_ptr); - - // Reestablishment Cause - liblte_value_2_bits(con_reest_req->cause, &msg_ptr, 2); - - // Spare - liblte_value_2_bits(0, &msg_ptr, 2); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_request_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *con_reest_req) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_reest_req != NULL) - { - msg_ptr = msg->msg; - - // Extension Choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // UE Identity - liblte_rrc_unpack_c_rnti_ie(&msg_ptr, &con_reest_req->ue_id.c_rnti); - liblte_rrc_unpack_phys_cell_id_ie(&msg_ptr, &con_reest_req->ue_id.phys_cell_id); - liblte_rrc_unpack_short_mac_i_ie(&msg_ptr, &con_reest_req->ue_id.short_mac_i); - - // Reestablishment Cause - con_reest_req->cause = (LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM)liblte_bits_2_value(&msg_ptr, 2); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reestablishment Reject - - Description: Used to indicate the rejection of an RRC connection - reestablishment request - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_reject_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT *con_reest_rej, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_reest_rej != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_reject_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT *con_reest_rej) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_reest_rej != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reestablishment Complete - - Description: Used to confirm the successful completion of an RRC - connection reestablishment - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_complete_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT *con_reest_complete, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_reest_complete != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_reest_complete->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT *con_reest_complete) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_reest_complete != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &con_reest_complete->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reestablishment - - Description: Used to resolve contention and to re-establish SRB1 - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reestablishment_msg(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *con_reest, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_reest != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_reest->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 3); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Radio Resource Config Dedicated - liblte_rrc_pack_rr_config_dedicated_ie(&con_reest->rr_cnfg, &msg_ptr); - - // Next Hop Chaining Count - liblte_rrc_pack_next_hop_chaining_count_ie(con_reest->next_hop_chaining_count, &msg_ptr); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reestablishment_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *con_reest) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_reest != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &con_reest->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 3); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Radio Resource Config Dedicated - liblte_rrc_unpack_rr_config_dedicated_ie(&msg_ptr, &con_reest->rr_cnfg); - - // Next Hop Chaining Count - liblte_rrc_unpack_next_hop_chaining_count_ie(&msg_ptr, &con_reest->next_hop_chaining_count); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reconfiguration Complete - - Description: Used to confirm the successful completion of an RRC - connection reconfiguration - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reconfiguration_complete_msg(LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *con_reconfig_complete, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(con_reconfig_complete != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_reconfig_complete->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reconfiguration_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *con_reconfig_complete) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - con_reconfig_complete != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &con_reconfig_complete->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RRC Connection Reconfiguration - - Description: Modifies an RRC connection - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rrc_connection_reconfiguration_msg(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *con_reconfig, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - - if(con_reconfig != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(con_reconfig->rrc_transaction_id, &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 3); - - // Optional indicators - liblte_value_2_bits(con_reconfig->meas_cnfg_present, &msg_ptr, 1); - liblte_value_2_bits(con_reconfig->mob_ctrl_info_present, &msg_ptr, 1); - if(0 == con_reconfig->N_ded_info_nas) - { - liblte_value_2_bits(0, &msg_ptr, 1); - }else{ - liblte_value_2_bits(1, &msg_ptr, 1); - } - liblte_value_2_bits(con_reconfig->rr_cnfg_ded_present, &msg_ptr, 1); - liblte_value_2_bits(con_reconfig->sec_cnfg_ho_present, &msg_ptr, 1); - liblte_value_2_bits(0, &msg_ptr, 1); - - // Meas Config - if(con_reconfig->meas_cnfg_present) - { - liblte_rrc_pack_meas_config_ie(&con_reconfig->meas_cnfg, &msg_ptr); - } - - // Mobility Control Info - if(con_reconfig->mob_ctrl_info_present) - { - liblte_rrc_pack_mobility_control_info_ie(&con_reconfig->mob_ctrl_info, &msg_ptr); - } - - // Dedicated Info NAS List - if(0 != con_reconfig->N_ded_info_nas) - { - liblte_value_2_bits(con_reconfig->N_ded_info_nas - 1, &msg_ptr, 4); - } - for(i=0; iN_ded_info_nas; i++) - { - liblte_rrc_pack_dedicated_info_nas_ie(&con_reconfig->ded_info_nas_list[i], &msg_ptr); - } - - // Radio Resource Config Dedicated - if(con_reconfig->rr_cnfg_ded_present) - { - liblte_rrc_pack_rr_config_dedicated_ie(&con_reconfig->rr_cnfg_ded, &msg_ptr); - } - - // Security Config HO - if(con_reconfig->sec_cnfg_ho_present) - { - // Extension indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Handover Type - liblte_value_2_bits(con_reconfig->sec_cnfg_ho.ho_type, &msg_ptr, 1); - - if(LIBLTE_RRC_HANDOVER_TYPE_INTRA_LTE == con_reconfig->sec_cnfg_ho.ho_type) - { - // Optional indicator - liblte_value_2_bits(con_reconfig->sec_cnfg_ho.intra_lte.sec_alg_cnfg_present, &msg_ptr, 1); - - // Security Algorithm Config - if(con_reconfig->sec_cnfg_ho.intra_lte.sec_alg_cnfg_present) - { - liblte_rrc_pack_security_algorithm_config_ie(&con_reconfig->sec_cnfg_ho.intra_lte.sec_alg_cnfg, &msg_ptr); - } - - // Key Change Indicator - liblte_value_2_bits(con_reconfig->sec_cnfg_ho.intra_lte.key_change_ind, &msg_ptr, 1); - - // Next Hop Chaining Count - liblte_rrc_pack_next_hop_chaining_count_ie(con_reconfig->sec_cnfg_ho.intra_lte.next_hop_chaining_count, &msg_ptr); - }else{ - // Security Algorithm Config - liblte_rrc_pack_security_algorithm_config_ie(&con_reconfig->sec_cnfg_ho.inter_rat.sec_alg_cnfg, &msg_ptr); - - // NAS Security Params To EUTRA - for(i=0; i<6; i++) - { - liblte_value_2_bits(con_reconfig->sec_cnfg_ho.inter_rat.nas_sec_param_to_eutra[i], &msg_ptr, 8); - } - } - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rrc_connection_reconfiguration_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *con_reconfig) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - bool ded_info_nas_list_present; - - if(msg != NULL && - con_reconfig != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, &con_reconfig->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 3); - - // Optional indicators - con_reconfig->meas_cnfg_present = liblte_bits_2_value(&msg_ptr, 1); - con_reconfig->mob_ctrl_info_present = liblte_bits_2_value(&msg_ptr, 1); - ded_info_nas_list_present = liblte_bits_2_value(&msg_ptr, 1); - con_reconfig->rr_cnfg_ded_present = liblte_bits_2_value(&msg_ptr, 1); - con_reconfig->sec_cnfg_ho_present = liblte_bits_2_value(&msg_ptr, 1); - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Meas Config - if(con_reconfig->meas_cnfg_present) - { - liblte_rrc_unpack_meas_config_ie(&msg_ptr, &con_reconfig->meas_cnfg); - } - - // Mobility Control Info - if(con_reconfig->mob_ctrl_info_present) - { - liblte_rrc_unpack_mobility_control_info_ie(&msg_ptr, &con_reconfig->mob_ctrl_info); - } - - // Dedicated Info NAS List - if(ded_info_nas_list_present) - { - con_reconfig->N_ded_info_nas = liblte_bits_2_value(&msg_ptr, 4) + 1; - for(i=0; iN_ded_info_nas; i++) - { - liblte_rrc_unpack_dedicated_info_nas_ie(&msg_ptr, &con_reconfig->ded_info_nas_list[i]); - } - }else{ - con_reconfig->N_ded_info_nas = 0; - } - - // Radio Resource Config Dedicated - if(con_reconfig->rr_cnfg_ded_present) - { - liblte_rrc_unpack_rr_config_dedicated_ie(&msg_ptr, &con_reconfig->rr_cnfg_ded); - } - - // Security Config HO - if(con_reconfig->sec_cnfg_ho_present) - { - // Extension indicator - bool ext2 = liblte_bits_2_value(&msg_ptr, 1); - - // Handover Type - con_reconfig->sec_cnfg_ho.ho_type = (LIBLTE_RRC_HANDOVER_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 1); - - if(LIBLTE_RRC_HANDOVER_TYPE_INTRA_LTE == con_reconfig->sec_cnfg_ho.ho_type) - { - // Optional indicator - con_reconfig->sec_cnfg_ho.intra_lte.sec_alg_cnfg_present = liblte_bits_2_value(&msg_ptr, 1); - - // Security Algorithm Config - if(con_reconfig->sec_cnfg_ho.intra_lte.sec_alg_cnfg_present) - { - liblte_rrc_unpack_security_algorithm_config_ie(&msg_ptr, &con_reconfig->sec_cnfg_ho.intra_lte.sec_alg_cnfg); - } - - // Key Change Indicator - con_reconfig->sec_cnfg_ho.intra_lte.key_change_ind = liblte_bits_2_value(&msg_ptr, 1); - - // Next Hop Chaining Count - liblte_rrc_unpack_next_hop_chaining_count_ie(&msg_ptr, &con_reconfig->sec_cnfg_ho.intra_lte.next_hop_chaining_count); - }else{ - // Security Algorithm Config - liblte_rrc_unpack_security_algorithm_config_ie(&msg_ptr, &con_reconfig->sec_cnfg_ho.inter_rat.sec_alg_cnfg); - - // NAS Security Params To EUTRA - for(i=0; i<6; i++) - { - con_reconfig->sec_cnfg_ho.inter_rat.nas_sec_param_to_eutra[i] = liblte_bits_2_value(&msg_ptr, 8); - } - } - - liblte_rrc_consume_noncrit_extension(ext2, __func__, &msg_ptr); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RN Reconfiguration Complete - - Description: Used to confirm the successful completion of an RN - reconfiguration - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_rn_reconfiguration_complete_msg(LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT *rn_reconfig_complete, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(rn_reconfig_complete != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(rn_reconfig_complete->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicators - liblte_value_2_bits(0, &msg_ptr, 1); - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_rn_reconfiguration_complete_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT *rn_reconfig_complete) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - rn_reconfig_complete != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &rn_reconfig_complete->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicators - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: RN Reconfiguration - - Description: Modifies the RRC connection between the RN and the - E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: Proximity Indication - - Description: Used to indicate that the UE is entering or leaving - the proximity of one or more cells whose CSG IDs are - in the UEs CSG whitelist - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_proximity_indication_msg(LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT *proximity_ind, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(proximity_ind != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Proximity indication type - liblte_value_2_bits(proximity_ind->type, &msg_ptr, 1); - - // Carrier frequency type extension indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Carrier frequency choice - liblte_value_2_bits(proximity_ind->carrier_freq_type, &msg_ptr, 1); - - // Carrier frequency - if(LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_EUTRA == proximity_ind->carrier_freq_type) - { - liblte_rrc_pack_arfcn_value_eutra_ie(proximity_ind->carrier_freq, - &msg_ptr); - }else{ - liblte_rrc_pack_arfcn_value_utra_ie(proximity_ind->carrier_freq, - &msg_ptr); - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_proximity_indication_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT *proximity_ind) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - proximity_ind != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Proximity indication type - proximity_ind->type = (LIBLTE_RRC_PROXIMITY_INDICATION_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 1); - - // Carrier frequency type extension indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Carrier frequency type - proximity_ind->carrier_freq_type = (LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 1); - - // Carrier frequency - if(LIBLTE_RRC_PROXIMITY_INDICATION_CARRIER_FREQ_TYPE_EUTRA == proximity_ind->carrier_freq) - { - liblte_rrc_unpack_arfcn_value_eutra_ie(&msg_ptr, - &proximity_ind->carrier_freq); - }else{ - liblte_rrc_unpack_arfcn_value_utra_ie(&msg_ptr, - &proximity_ind->carrier_freq); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: Paging - - Description: Used for the notification of one or more UEs - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_paging_msg(LIBLTE_RRC_PAGING_STRUCT *page, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - uint32 j; - - if(page != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Optional indicators - if(page->paging_record_list_size != 0) - { - liblte_value_2_bits(1, &msg_ptr, 1); - }else{ - liblte_value_2_bits(0, &msg_ptr, 1); - } - liblte_value_2_bits(page->system_info_modification_present, &msg_ptr, 1); - liblte_value_2_bits(page->etws_indication_present, &msg_ptr, 1); - liblte_value_2_bits(page->non_crit_ext_present, &msg_ptr, 1); - - if(page->paging_record_list_size != 0) - { - liblte_value_2_bits(page->paging_record_list_size - 1, &msg_ptr, 4); - for(i=0; ipaging_record_list_size; i++) - { - // Extension indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Paging UE identity - { - // Extension indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - liblte_value_2_bits(page->paging_record_list[i].ue_identity.ue_identity_type, &msg_ptr, 1); - if(LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_S_TMSI == page->paging_record_list[i].ue_identity.ue_identity_type) - { - liblte_rrc_pack_s_tmsi_ie(&page->paging_record_list[i].ue_identity.s_tmsi, - &msg_ptr); - }else{ - liblte_value_2_bits(page->paging_record_list[i].ue_identity.imsi_size - 6, &msg_ptr, 4); - for(j=0; jpaging_record_list[i].ue_identity.imsi_size; j++) - { - liblte_value_2_bits(page->paging_record_list[i].ue_identity.imsi[j], &msg_ptr, 4); - } - } - } - - liblte_value_2_bits(page->paging_record_list[i].cn_domain, &msg_ptr, 1); - } - } - - if(page->system_info_modification_present) - { - liblte_value_2_bits(page->system_info_modification, &msg_ptr, 1); - } - - if(page->etws_indication_present) - { - liblte_value_2_bits(page->etws_indication, &msg_ptr, 1); - } - - if(page->non_crit_ext_present) - { - // Optional indicators - liblte_value_2_bits(page->non_crit_ext.late_non_crit_ext_present, &msg_ptr, 1); - liblte_value_2_bits(page->non_crit_ext.non_crit_ext_present, &msg_ptr, 1); - - if(page->non_crit_ext.late_non_crit_ext_present) - { - // FIXME - } - - if(page->non_crit_ext.non_crit_ext_present) - { - // Optional indicators - liblte_value_2_bits(page->non_crit_ext.non_crit_ext.cmas_ind_present, &msg_ptr, 1); - liblte_value_2_bits(page->non_crit_ext.non_crit_ext.non_crit_ext_present, &msg_ptr, 1); - - if(page->non_crit_ext.non_crit_ext.cmas_ind_present) - { - liblte_value_2_bits(page->non_crit_ext.non_crit_ext.cmas_ind_r9, &msg_ptr, 1); - } - - if(page->non_crit_ext.non_crit_ext.non_crit_ext_present) - { - // FIXME - } - } - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_paging_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_PAGING_STRUCT *page) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - uint32 j; - uint8 paging_record_list_present; - - if(msg != NULL && - page != NULL) - { - msg_ptr = msg->msg; - - // Optional indicators - paging_record_list_present = liblte_bits_2_value(&msg_ptr, 1); - page->system_info_modification_present = liblte_bits_2_value(&msg_ptr, 1); - page->etws_indication_present = liblte_bits_2_value(&msg_ptr, 1); - page->non_crit_ext_present = liblte_bits_2_value(&msg_ptr, 1); - - if(paging_record_list_present) - { - page->paging_record_list_size = liblte_bits_2_value(&msg_ptr, 4) + 1; - for(i=0; ipaging_record_list_size; i++) - { - // Extension indicator - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Paging UE identity - { - // Extension indicator - bool ext2 = liblte_bits_2_value(&msg_ptr, 1); - - page->paging_record_list[i].ue_identity.ue_identity_type = (LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 1); - if(LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_S_TMSI == page->paging_record_list[i].ue_identity.ue_identity_type) - { - liblte_rrc_unpack_s_tmsi_ie(&msg_ptr, - &page->paging_record_list[i].ue_identity.s_tmsi); - }else{ - page->paging_record_list[i].ue_identity.imsi_size = liblte_bits_2_value(&msg_ptr, 4) + 6; - for(j=0; jpaging_record_list[i].ue_identity.imsi_size; j++) - { - page->paging_record_list[i].ue_identity.imsi[j] = liblte_bits_2_value(&msg_ptr, 4); - } - } - - liblte_rrc_consume_noncrit_extension(ext2, __func__, &msg_ptr); - } - - page->paging_record_list[i].cn_domain = (LIBLTE_RRC_CN_DOMAIN_ENUM)liblte_bits_2_value(&msg_ptr, 1); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - } - } - - if(page->system_info_modification_present) - { - page->system_info_modification = (LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_ENUM)liblte_bits_2_value(&msg_ptr, 1); - } - - if(page->etws_indication_present) - { - page->etws_indication = (LIBLTE_RRC_ETWS_INDICATION_ENUM)liblte_bits_2_value(&msg_ptr, 1); - } - - if(page->non_crit_ext_present) - { - // Optional indicators - page->non_crit_ext.late_non_crit_ext_present = liblte_bits_2_value(&msg_ptr, 1); - page->non_crit_ext.non_crit_ext_present = liblte_bits_2_value(&msg_ptr, 1); - - if(page->non_crit_ext.late_non_crit_ext_present) - { - // FIXME - printf("Warning late non-crit-extension not handled in paging message\n"); - } - - if(page->non_crit_ext.non_crit_ext_present) - { - // Optional indicators - page->non_crit_ext.non_crit_ext.cmas_ind_present = liblte_bits_2_value(&msg_ptr, 1); - page->non_crit_ext.non_crit_ext.non_crit_ext_present = liblte_bits_2_value(&msg_ptr, 1); - - if(page->non_crit_ext.non_crit_ext.cmas_ind_present) - { - page->non_crit_ext.non_crit_ext.cmas_ind_r9 = (LIBLTE_RRC_CMAS_INDICATION_R9_ENUM)liblte_bits_2_value(&msg_ptr, 1); - } - - if(page->non_crit_ext.non_crit_ext.non_crit_ext_present) - { - // FIXME - printf("Warning non-crit-extension not handled in paging message\n"); - } - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: Mobility From EUTRA Command - - Description: Used to command handover or a cell change from E-UTRA - to another RAT, or enhanced CS fallback to CDMA2000 - 1xRTT - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: Measurement Report - - Description: Used for the indication of measurement results - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_cgi_info_ie(LIBLTE_RRC_CGI_INFO_STRUCT *cgi_info, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(cgi_info != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(cgi_info->have_plmn_identity_list, ie_ptr, 1); - liblte_rrc_pack_cell_global_id_eutra_ie(&cgi_info->cell_global_id, ie_ptr); - liblte_rrc_pack_tracking_area_code_ie(cgi_info->tracking_area_code, ie_ptr); - if(cgi_info->have_plmn_identity_list) { - liblte_value_2_bits(cgi_info->n_plmn_identity_list-1, ie_ptr, 3); - for(uint32 i=0; in_plmn_identity_list; i++) { - liblte_rrc_pack_plmn_identity_ie(&cgi_info->plmn_identity_list[i], ie_ptr); - } - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_cgi_info_ie(uint8 **ie_ptr, - LIBLTE_RRC_CGI_INFO_STRUCT *cgi_info) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - cgi_info != NULL) - { - cgi_info->have_plmn_identity_list = (bool)liblte_bits_2_value(ie_ptr, 1); - liblte_rrc_unpack_cell_global_id_eutra_ie(ie_ptr, &cgi_info->cell_global_id); - liblte_rrc_unpack_tracking_area_code_ie(ie_ptr, &cgi_info->tracking_area_code); - if(cgi_info->have_plmn_identity_list) { - cgi_info->n_plmn_identity_list = liblte_bits_2_value(ie_ptr, 3) + 1; - for(uint32 i=0; in_plmn_identity_list; i++) { - liblte_rrc_unpack_plmn_identity_ie(ie_ptr, &cgi_info->plmn_identity_list[i]); - } - } - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_result_ie(LIBLTE_RRC_MEAS_RESULT_STRUCT *meas_result, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(meas_result != NULL && - ie_ptr != NULL) - { - //ext - liblte_value_2_bits(0, ie_ptr, 1); - - //options - liblte_value_2_bits(meas_result->have_rsrp, ie_ptr, 1); - liblte_value_2_bits(meas_result->have_rsrq, ie_ptr, 1); - - if(meas_result->have_rsrp) { - liblte_rrc_pack_rsrp_range_ie(meas_result->rsrp_result, ie_ptr); - } - if(meas_result->have_rsrq) { - liblte_rrc_pack_rsrq_range_ie(meas_result->rsrq_result, ie_ptr); - } - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_result_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_RESULT_STRUCT *meas_result) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - meas_result != NULL) - { - //ext - bool ext = liblte_bits_2_value(ie_ptr, 1); - - //options - meas_result->have_rsrp = liblte_bits_2_value(ie_ptr, 1); - meas_result->have_rsrq = liblte_bits_2_value(ie_ptr, 1); - - if(meas_result->have_rsrp) { - liblte_rrc_unpack_rsrp_range_ie(ie_ptr, &meas_result->rsrp_result); - } - if(meas_result->have_rsrq) { - liblte_rrc_unpack_rsrq_range_ie(ie_ptr, &meas_result->rsrq_result); - } - - //skip extensions - liblte_rrc_consume_noncrit_extension(ext, __func__, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_result_eutra_ie(LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT *meas_result_eutra, - uint8 **ie_ptr) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(meas_result_eutra != NULL && - ie_ptr != NULL) - { - liblte_value_2_bits(meas_result_eutra->have_cgi_info, ie_ptr, 1); - liblte_rrc_pack_phys_cell_id_ie(meas_result_eutra->phys_cell_id, ie_ptr); - if(meas_result_eutra->have_cgi_info) { - liblte_rrc_pack_cgi_info_ie(&meas_result_eutra->cgi_info, ie_ptr); - } - liblte_rrc_pack_meas_result_ie(&meas_result_eutra->meas_result, ie_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_meas_result_eutra_ie(uint8 **ie_ptr, - LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT *meas_result_eutra) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - - if(ie_ptr != NULL && - meas_result_eutra != NULL) - { - meas_result_eutra->have_cgi_info = liblte_bits_2_value(ie_ptr, 1); - liblte_rrc_unpack_phys_cell_id_ie(ie_ptr, &meas_result_eutra->phys_cell_id); - if(meas_result_eutra->have_cgi_info) { - liblte_rrc_unpack_cgi_info_ie(ie_ptr, &meas_result_eutra->cgi_info); - } - liblte_rrc_unpack_meas_result_ie(ie_ptr, &meas_result_eutra->meas_result); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -LIBLTE_ERROR_ENUM liblte_rrc_pack_measurement_report_msg(LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *meas_report, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(meas_report != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - //MeasurementReport - liblte_value_2_bits(0, &msg_ptr, 1); //critical extensions - liblte_value_2_bits(0, &msg_ptr, 3); //c1 - - //MeasurementReport-r8-IEs - liblte_value_2_bits(0, &msg_ptr, 1); //non-critical extensions - - //MeasResults - liblte_value_2_bits(0, &msg_ptr, 1); //ext - liblte_value_2_bits(meas_report->have_meas_result_neigh_cells, &msg_ptr, 1); - liblte_rrc_pack_meas_id_ie(meas_report->meas_id, &msg_ptr); - liblte_rrc_pack_rsrp_range_ie(meas_report->pcell_rsrp_result, &msg_ptr); - liblte_rrc_pack_rsrq_range_ie(meas_report->pcell_rsrq_result, &msg_ptr); - if(meas_report->have_meas_result_neigh_cells) { - liblte_value_2_bits(0, &msg_ptr, 1); //choice from before extension marker - liblte_value_2_bits(meas_report->meas_result_neigh_cells_choice, &msg_ptr, 2); - if(meas_report->meas_result_neigh_cells_choice != LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA) { - printf("NOT HANDLING %s\n", liblte_rrc_meas_reult_neigh_cells_text[meas_report->meas_result_neigh_cells_choice]); - } else { - //MeasResultListEUTRA - liblte_value_2_bits(meas_report->meas_result_neigh_cells.eutra.n_result-1, &msg_ptr, 3); - for(uint32 i=0; imeas_result_neigh_cells.eutra.n_result; i++) { - liblte_rrc_pack_meas_result_eutra_ie(&meas_report->meas_result_neigh_cells.eutra.result_eutra_list[i], &msg_ptr); - } - } - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_measurement_report_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *meas_report) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - meas_report != NULL) - { - msg_ptr = msg->msg; - - //MeasurementReport - bool crit_ext = liblte_bits_2_value(&msg_ptr, 1); //critical extensions - liblte_bits_2_value(&msg_ptr, 3); //c1 - - //MeasurementReport-r8-IEs - bool non_crit_ext = liblte_bits_2_value(&msg_ptr, 1); //non-critical extensions - - //MeasResults - bool ext = liblte_bits_2_value(&msg_ptr, 1); - meas_report->have_meas_result_neigh_cells = liblte_bits_2_value(&msg_ptr, 1); - liblte_rrc_unpack_meas_id_ie(&msg_ptr, &meas_report->meas_id); - liblte_rrc_unpack_rsrp_range_ie(&msg_ptr, &meas_report->pcell_rsrp_result); - liblte_rrc_unpack_rsrq_range_ie(&msg_ptr, &meas_report->pcell_rsrq_result); - if(meas_report->have_meas_result_neigh_cells) { - liblte_bits_2_value(&msg_ptr, 1); //choice from before extension marker - meas_report->meas_result_neigh_cells_choice = (LIBLTE_RRC_MEAS_RESULT_NEIGH_CELLS_ENUM) liblte_bits_2_value(&msg_ptr, 2); - if(meas_report->meas_result_neigh_cells_choice != LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA) { - printf("NOT HANDLING %s\n", liblte_rrc_meas_reult_neigh_cells_text[meas_report->meas_result_neigh_cells_choice]); - } else { - //MeasResultListEUTRA - meas_report->meas_result_neigh_cells.eutra.n_result = liblte_bits_2_value(&msg_ptr, 3) + 1; - for(uint32 i=0; imeas_result_neigh_cells.eutra.n_result; i++) { - liblte_rrc_unpack_meas_result_eutra_ie(&msg_ptr, &meas_report->meas_result_neigh_cells.eutra.result_eutra_list[i]); - } - } - } - - //skip extensions - liblte_rrc_consume_noncrit_extension(crit_ext, __func__, &msg_ptr); - liblte_rrc_consume_noncrit_extension(non_crit_ext, __func__, &msg_ptr); - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: MBSFN Area Configuration - - Description: Contains the MBMS control information applicable for - an MBSFN area - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mbsfn_area_configuration_r9_msg(LIBLTE_RRC_MBSFN_AREA_CONFIGURATION_R9_STRUCT *mbsfn_area_cnfg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - - if(mbsfn_area_cnfg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Non-critical extension - liblte_value_2_bits(0, &msg_ptr, 1); - - // commonsf_allocpatternlist_r9 - liblte_value_2_bits(mbsfn_area_cnfg->commonsf_allocpatternlist_r9_size-1, &msg_ptr, 3); - for(i=0; icommonsf_allocpatternlist_r9_size; i++){ - liblte_rrc_pack_mbsfn_subframe_config_ie(&mbsfn_area_cnfg->commonsf_allocpatternlist_r9[i], &msg_ptr); - } - - // commonsf_allocperiod_r9 - liblte_value_2_bits(mbsfn_area_cnfg->commonsf_allocperiod_r9, &msg_ptr, 3); - - // pmch_infolist_r9 - liblte_value_2_bits(mbsfn_area_cnfg->pmch_infolist_r9_size, &msg_ptr, 4); - for(i=0; ipmch_infolist_r9_size; i++){ - liblte_rrc_pack_pmch_info_r9_ie(&mbsfn_area_cnfg->pmch_infolist_r9[i], &msg_ptr); - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mbsfn_area_configuration_r9_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MBSFN_AREA_CONFIGURATION_R9_STRUCT *mbsfn_area_cnfg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 i; - bool ext; - - if(msg != NULL && - mbsfn_area_cnfg != NULL) - { - msg_ptr = msg->msg; - - // Non-critical extension - ext = liblte_bits_2_value(&msg_ptr, 1); - liblte_rrc_warning_not_handled(ext, __func__); - - // commonsf_allocpatternlist_r9 - mbsfn_area_cnfg->commonsf_allocpatternlist_r9_size = liblte_bits_2_value(&msg_ptr, 3) + 1; - for(i=0; icommonsf_allocpatternlist_r9_size; i++){ - liblte_rrc_unpack_mbsfn_subframe_config_ie(&msg_ptr, &mbsfn_area_cnfg->commonsf_allocpatternlist_r9[i]); - } - - // commonsf_allocperiod_r9 - mbsfn_area_cnfg->commonsf_allocperiod_r9 = (LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_ENUM)liblte_bits_2_value(&msg_ptr, 3); - - // pmch_infolist_r9 - mbsfn_area_cnfg->pmch_infolist_r9_size = liblte_bits_2_value(&msg_ptr, 4); - for(i=0; ipmch_infolist_r9_size; i++){ - liblte_rrc_unpack_pmch_info_r9_ie(&msg_ptr, &mbsfn_area_cnfg->pmch_infolist_r9[i]); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - - -/********************************************************************* - Message Name: Master Information Block - - Description: Includes the system information transmitted on BCH - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// Inlined with BCCH BCH Message - -/********************************************************************* - Message Name: Logged Measurements Configuration - - Description: Used by E-UTRAN to configure the UE to perform - logging of measurement results while in RRC_IDLE - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: Handover From EUTRA Preparation Request (CDMA2000) - - Description: Used to trigger the handover preparation procedure - with a CDMA2000 RAT - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: DL Information Transfer - - Description: Used for the downlink transfer of dedicated NAS - information - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_dl_information_transfer_msg(LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT *dl_info_transfer, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(dl_info_transfer != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_pack_rrc_transaction_identifier_ie(dl_info_transfer->rrc_transaction_id, - &msg_ptr); - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // C1 choice - liblte_value_2_bits(0, &msg_ptr, 2); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Dedicated info type choice - liblte_value_2_bits(dl_info_transfer->dedicated_info_type, &msg_ptr, 2); - - if(LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_NAS == dl_info_transfer->dedicated_info_type) - { - liblte_rrc_pack_dedicated_info_nas_ie(&dl_info_transfer->dedicated_info, - &msg_ptr); - }else{ - liblte_rrc_pack_dedicated_info_cdma2000_ie(&dl_info_transfer->dedicated_info, - &msg_ptr); - } - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dl_information_transfer_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT *dl_info_transfer) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - dl_info_transfer != NULL) - { - msg_ptr = msg->msg; - - // RRC Transaction ID - liblte_rrc_unpack_rrc_transaction_identifier_ie(&msg_ptr, - &dl_info_transfer->rrc_transaction_id); - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // C1 choice - liblte_bits_2_value(&msg_ptr, 2); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - // Dedicated info type choice - dl_info_transfer->dedicated_info_type = (LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 2); - - if(LIBLTE_RRC_DL_INFORMATION_TRANSFER_TYPE_NAS == dl_info_transfer->dedicated_info_type) - { - liblte_rrc_unpack_dedicated_info_nas_ie(&msg_ptr, - &dl_info_transfer->dedicated_info); - }else{ - liblte_rrc_unpack_dedicated_info_cdma2000_ie(&msg_ptr, - &dl_info_transfer->dedicated_info); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: CSFB Parameters Response CDMA2000 - - Description: Used to provide the CDMA2000 1xRTT parameters to the - UE so the UE can register with the CDMA2000 1xRTT - network to support CSFB to CDMA2000 1xRTT - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: CSFB Parameters Request CDMA2000 - - Description: Used by the UE to obtain the CDMA2000 1xRTT - parameters from the network - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_csfb_parameters_request_cdma2000_msg(LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT *csfb_params_req_cdma2000, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(csfb_params_req_cdma2000 != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - liblte_value_2_bits(0, &msg_ptr, 1); - - // Optional indicator - liblte_value_2_bits(0, &msg_ptr, 1); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_csfb_parameters_request_cdma2000_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT *csfb_params_req_cdma2000) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - csfb_params_req_cdma2000 != NULL) - { - msg_ptr = msg->msg; - - // Extension choice - bool ext = liblte_bits_2_value(&msg_ptr, 1); - - // Optional indicator - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: Counter Check Response - - Description: Used by the UE to respond to a Counter Check message - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: Counter Check - - Description: Used by the E-UTRAN to indicate the current COUNT MSB - values associated to each DRB and to request the UE - to compare these to its COUNT MSB values and to - report the comparison results to E-UTRAN - - Document Reference: 36.331 v10.0.0 Section 6.2.2 -*********************************************************************/ -// FIXME - -/********************************************************************* - Message Name: BCCH BCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE via BCH on the BCCH - logical channel - - Document Reference: 36.331 v10.0.0 Sections 6.2.1 and 6.2.2 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_bcch_bch_msg(LIBLTE_RRC_MIB_STRUCT *mib, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(mib != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // DL Bandwidth - liblte_value_2_bits(mib->dl_bw, &msg_ptr, 3); - - // PHICH Config - liblte_rrc_pack_phich_config_ie(&mib->phich_config, &msg_ptr); - - // SFN/4 - liblte_value_2_bits(mib->sfn_div_4, &msg_ptr, 8); - - // Spare - liblte_value_2_bits(0, &msg_ptr, 10); - - // Fill in the number of bits used - msg->N_bits = msg_ptr - msg->msg; - - err = LIBLTE_SUCCESS; - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_bcch_bch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MIB_STRUCT *mib) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - - if(msg != NULL && - mib != NULL) - { - msg_ptr = msg->msg; - - // DL Bandwidth - mib->dl_bw = (LIBLTE_RRC_DL_BANDWIDTH_ENUM)liblte_bits_2_value(&msg_ptr, 3); - - // PHICH Config - liblte_rrc_unpack_phich_config_ie(&msg_ptr, &mib->phich_config); - - // SFN/4 - mib->sfn_div_4 = liblte_bits_2_value(&msg_ptr, 8); - - err = LIBLTE_SUCCESS; - } - - return(err); -} - -/********************************************************************* - Message Name: BCCH DLSCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE via DLSCH on the BCCH - logical channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_bcch_dlsch_msg(LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT *bcch_dlsch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(bcch_dlsch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - liblte_value_2_bits(ext, &msg_ptr, 1); - - if(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1 == bcch_dlsch_msg->sibs[0].sib_type) - { - // SIB1 Choice - liblte_value_2_bits(1, &msg_ptr, 1); - - err = liblte_rrc_pack_sys_info_block_type_1_msg((LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *)&bcch_dlsch_msg->sibs[0].sib, - &global_msg); - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 2)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 2; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - }else{ - // SIB1 Choice - liblte_value_2_bits(0, &msg_ptr, 1); - - err = liblte_rrc_pack_sys_info_msg(bcch_dlsch_msg, - &global_msg); - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 2)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 2; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_bcch_dlsch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT *bcch_dlsch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 N_bits_used; - uint8 ext; - - if(msg != NULL && - bcch_dlsch_msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - ext = liblte_bits_2_value(&msg_ptr, 1); - - // SIB1 Choice - if(true == liblte_bits_2_value(&msg_ptr, 1)) - { - bcch_dlsch_msg->N_sibs = 1; - bcch_dlsch_msg->sibs[0].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1; - if((msg->N_bits-(msg_ptr-msg->msg)) <= (LIBLTE_MAX_MSG_SIZE_BITS - 2)) - { - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - global_msg.N_bits = msg->N_bits-(msg_ptr-msg->msg); - err = liblte_rrc_unpack_sys_info_block_type_1_msg(&global_msg, - (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *)&bcch_dlsch_msg->sibs[0].sib, - &N_bits_used); - msg_ptr += N_bits_used; - } - }else{ - if((msg->N_bits-(msg_ptr-msg->msg)) <= (LIBLTE_MAX_MSG_SIZE_BITS - 2)) - { - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - err = liblte_rrc_unpack_sys_info_msg(&global_msg, - bcch_dlsch_msg); - } - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - } - - return(err); -} - -/********************************************************************* - Message Name: MCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the MCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_mcch_msg(LIBLTE_RRC_MCCH_MSG_STRUCT *mcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(mcch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // MCCH choice - liblte_value_2_bits(0, &msg_ptr, 1); - - err = liblte_rrc_pack_mbsfn_area_configuration_r9_msg(mcch_msg, - &global_msg); - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 1)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 1; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_mcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_MCCH_MSG_STRUCT *mcch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 N_bits_used; - - if(msg != NULL && - mcch_msg != NULL) - { - msg_ptr = msg->msg; - - // MCCH choice - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - if((msg->N_bits-(msg_ptr-msg->msg)) <= (LIBLTE_MAX_MSG_SIZE_BITS - 1)) - { - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - err = liblte_rrc_unpack_mbsfn_area_configuration_r9_msg(&global_msg, - mcch_msg); - } - } - - return(err); -} - -/********************************************************************* - Message Name: PCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the PCCH logical - channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_pcch_msg(LIBLTE_RRC_PCCH_MSG_STRUCT *pcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(pcch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Paging choice - liblte_value_2_bits(0, &msg_ptr, 1); - - err = liblte_rrc_pack_paging_msg(pcch_msg, - &global_msg); - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 1)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 1; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_pcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_PCCH_MSG_STRUCT *pcch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint32 N_bits_used; - - if(msg != NULL && - pcch_msg != NULL) - { - msg_ptr = msg->msg; - - // Paging choice - liblte_rrc_warning_not_handled(liblte_bits_2_value(&msg_ptr, 1), __func__); - - if((msg->N_bits-(msg_ptr-msg->msg)) <= (LIBLTE_MAX_MSG_SIZE_BITS - 1)) - { - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - err = liblte_rrc_unpack_paging_msg(&global_msg, - pcch_msg); - } - } - - return(err); -} - -/********************************************************************* - Message Name: DL CCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the downlink CCCH - logical channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_dl_ccch_msg(LIBLTE_RRC_DL_CCCH_MSG_STRUCT *dl_ccch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(dl_ccch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - liblte_value_2_bits(ext, &msg_ptr, 1); - - // Message type choice - liblte_value_2_bits(dl_ccch_msg->msg_type, &msg_ptr, 2); - - if(LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST == dl_ccch_msg->msg_type) - { - err = liblte_rrc_pack_rrc_connection_reestablishment_msg((LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *)&dl_ccch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST_REJ == dl_ccch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_reestablishment_reject_msg((LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT *)&dl_ccch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REJ == dl_ccch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_reject_msg((LIBLTE_RRC_CONNECTION_REJECT_STRUCT *)&dl_ccch_msg->msg, - &global_msg); - }else{ // LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_SETUP == dl_ccch_msg->msg_type - err = liblte_rrc_pack_rrc_connection_setup_msg((LIBLTE_RRC_CONNECTION_SETUP_STRUCT *)&dl_ccch_msg->msg, - &global_msg); - } - - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 3)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 3; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dl_ccch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_DL_CCCH_MSG_STRUCT *dl_ccch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext; - - if(msg != NULL && - dl_ccch_msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - ext = liblte_bits_2_value(&msg_ptr, 1); - - // Message type choice - dl_ccch_msg->msg_type = (LIBLTE_RRC_DL_CCCH_MSG_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 2); - - // Message - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - global_msg.N_bits = msg->N_bits-(msg_ptr-msg->msg); - if(LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST == dl_ccch_msg->msg_type) - { - err = liblte_rrc_unpack_rrc_connection_reestablishment_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *)&dl_ccch_msg->msg); - }else if(LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST_REJ == dl_ccch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_reestablishment_reject_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REJECT_STRUCT *)&dl_ccch_msg->msg); - }else if(LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REJ == dl_ccch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_reject_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_REJECT_STRUCT *)&dl_ccch_msg->msg); - }else{ // LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_SETUP == dl_ccch_msg->msg_type - err = liblte_rrc_unpack_rrc_connection_setup_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_SETUP_STRUCT *)&dl_ccch_msg->msg); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - } - - return(err); -} - -/********************************************************************* - Message Name: DL DCCH Message - - Description: Contains the set of RRC messages that may be sent - from the E-UTRAN to the UE on the downlink DCCH - logical channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_dl_dcch_msg(LIBLTE_RRC_DL_DCCH_MSG_STRUCT *dl_dcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(dl_dcch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - liblte_value_2_bits(ext, &msg_ptr, 1); - - // Message type choice - liblte_value_2_bits(dl_dcch_msg->msg_type, &msg_ptr, 4); - - // Message - if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_CSFB_PARAMS_RESP_CDMA2000 == dl_dcch_msg->msg_type) - { - printf("NOT HANDLING CSFB PARAMETERS RESPONSE CDMA2000\n"); -// err = liblte_rrc_pack_csfb_parameters_response_cdma2000_msg((LIBLTE_RRC_CSFB_PARAMETERS_RESPONSE_CDMA2000_STRUCT *)&dl_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_DL_INFO_TRANSFER == dl_dcch_msg->msg_type){ - err = liblte_rrc_pack_dl_information_transfer_msg((LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT *)&dl_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_HANDOVER_FROM_EUTRA_PREP_REQ == dl_dcch_msg->msg_type){ - printf("NOT HANDLING HANDOVER FROM EUTRA PREPARATION REQUEST\n"); -// err = liblte_rrc_pack_handover_from_eutra_preparation_request_msg((LIBLTE_RRC_HANDOVER_FROM_EUTRA_PREPARATION_REQUEST_STRUCT *)&dl_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_MOBILITY_FROM_EUTRA_COMMAND == dl_dcch_msg->msg_type){ - printf("NOT HANDLING MOBILITY FROM EUTRA COMMAND\n"); -// err = liblte_rrc_pack_mobility_from_eutra_command_msg((LIBLTE_RRC_MOBILITY_FROM_EUTRA_COMMAND_STRUCT *)&dl_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG == dl_dcch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_reconfiguration_msg((LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *)&dl_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RELEASE == dl_dcch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_release_msg((LIBLTE_RRC_CONNECTION_RELEASE_STRUCT *)&dl_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_SECURITY_MODE_COMMAND == dl_dcch_msg->msg_type){ - err = liblte_rrc_pack_security_mode_command_msg((LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT *)&dl_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_CAPABILITY_ENQUIRY == dl_dcch_msg->msg_type){ - err = liblte_rrc_pack_ue_capability_enquiry_msg((LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT *)&dl_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_COUNTER_CHECK == dl_dcch_msg->msg_type){ - printf("NOT HANDLING COUNTER CHECK\n"); -// err = liblte_rrc_pack_counter_check_msg((LIBLTE_RRC_COUNTER_CHECK_STRUCT *)&dl_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_INFO_REQ == dl_dcch_msg->msg_type){ - err = liblte_rrc_pack_ue_information_request_msg((LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT *)&dl_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_LOGGED_MEASUREMENTS_CONFIG == dl_dcch_msg->msg_type){ - printf("NOT HANDLING LOGGED MEASUREMENTS CONFIGURATION\n"); -// err = liblte_rrc_pack_logged_measurements_configuration_msg((LIBLTE_RRC_LOGGED_MEASUREMENTS_CONFIGURATION_STRUCT *)&dl_dcch_msg->msg, -// &global_msg); - }else{ // LIBLTE_RRC_DL_DCCH_MSG_TYPE_RN_RECONFIG == dl_dcch_msg->msg_type - printf("NOT HANDLING RN RECONFIGURATION\n"); -// err = liblte_rrc_pack_rn_reconfiguration_msg((LIBLTE_RRC_RN_RECONFIGURATION_STRUCT *)&dl_dcch_msg->msg, -// &global_msg); - } - - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 5)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 5; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_dl_dcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_DL_DCCH_MSG_STRUCT *dl_dcch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext; - - if(msg != NULL && - dl_dcch_msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - ext = liblte_bits_2_value(&msg_ptr, 1); - - // Message type choice - dl_dcch_msg->msg_type = (LIBLTE_RRC_DL_DCCH_MSG_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 4); - - // Message - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - global_msg.N_bits = msg->N_bits-(msg_ptr-msg->msg); - if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_CSFB_PARAMS_RESP_CDMA2000 == dl_dcch_msg->msg_type) - { - printf("NOT HANDLING CSFB PARAMETERS RESPONSE CDMA2000\n"); -// err = liblte_rrc_unpack_csfb_parameters_response_cdma2000_msg(&global_msg, -// (LIBLTE_RRC_CSFB_PARAMETERS_RESPONSE_CDMA2000_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_DL_INFO_TRANSFER == dl_dcch_msg->msg_type){ - err = liblte_rrc_unpack_dl_information_transfer_msg(&global_msg, - (LIBLTE_RRC_DL_INFORMATION_TRANSFER_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_HANDOVER_FROM_EUTRA_PREP_REQ == dl_dcch_msg->msg_type){ - printf("NOT HANDLING HANDOVER FROM EUTRA PREPARATION REQUEST\n"); -// err = liblte_rrc_unpack_handover_from_eutra_preparation_request_msg(&global_msg, -// (LIBLTE_RRC_HANDOVER_FROM_EUTRA_PREPARATION_REQUEST_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_MOBILITY_FROM_EUTRA_COMMAND == dl_dcch_msg->msg_type){ - printf("NOT HANDLING MOBILITY FROM EUTRA COMMAND\n"); -// err = liblte_rrc_unpack_mobility_from_eutra_command_msg(&global_msg, -// (LIBLTE_RRC_MOBILITY_FROM_EUTRA_COMMAND_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG == dl_dcch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_reconfiguration_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RELEASE == dl_dcch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_release_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_RELEASE_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_SECURITY_MODE_COMMAND == dl_dcch_msg->msg_type){ - err = liblte_rrc_unpack_security_mode_command_msg(&global_msg, - (LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_CAPABILITY_ENQUIRY == dl_dcch_msg->msg_type){ - err = liblte_rrc_unpack_ue_capability_enquiry_msg(&global_msg, - (LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_COUNTER_CHECK == dl_dcch_msg->msg_type){ - printf("NOT HANDLING COUNTER CHECK\n"); -// err = liblte_rrc_unpack_counter_check_msg(&global_msg, -// (LIBLTE_RRC_COUNTER_CHECK_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_INFO_REQ == dl_dcch_msg->msg_type){ - err = liblte_rrc_unpack_ue_information_request_msg(&global_msg, - (LIBLTE_RRC_UE_INFORMATION_REQUEST_STRUCT *)&dl_dcch_msg->msg); - }else if(LIBLTE_RRC_DL_DCCH_MSG_TYPE_LOGGED_MEASUREMENTS_CONFIG == dl_dcch_msg->msg_type){ - printf("NOT HANDLING LOGGED MEASUREMENTS CONFIGURATION\n"); -// err = liblte_rrc_unpack_logged_measurements_configuration_msg(&global_msg, -// (LIBLTE_RRC_LOGGED_MEASUREMENTS_CONFIGURATION_STRUCT *)&dl_dcch_msg->msg); - }else{ // LIBLTE_RRC_DL_DCCH_MSG_TYPE_RN_RECONFIG == dl_dcch_msg->msg_type - printf("NOT HANDLING RN RECONFIGURATION\n"); -// err = liblte_rrc_unpack_rn_reconfiguration_msg(&global_msg, -// (LIBLTE_RRC_RN_RECONFIGURATION_STRUCT *)&dl_dcch_msg->msg); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - } - - return(err); -} - -/********************************************************************* - Message Name: UL CCCH Message - - Description: Contains the set of RRC messages that may be sent - from the UE to the E-UTRAN on the uplink CCCH - logical channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_ccch_msg(LIBLTE_RRC_UL_CCCH_MSG_STRUCT *ul_ccch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(ul_ccch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - liblte_value_2_bits(ext, &msg_ptr, 1); - - // Message type choice - liblte_value_2_bits(ul_ccch_msg->msg_type, &msg_ptr, 1); - - if(LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ == ul_ccch_msg->msg_type) - { - err = liblte_rrc_pack_rrc_connection_reestablishment_request_msg((LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *)&ul_ccch_msg->msg, - &global_msg); - }else{ // LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ == ul_ccch_msg->msg_type - err = liblte_rrc_pack_rrc_connection_request_msg((LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *)&ul_ccch_msg->msg, - &global_msg); - } - - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 2)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 2; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_ccch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_CCCH_MSG_STRUCT *ul_ccch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext; - - if(msg != NULL && - ul_ccch_msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - ext = liblte_bits_2_value(&msg_ptr, 1); - - // Message type choice - ul_ccch_msg->msg_type = (LIBLTE_RRC_UL_CCCH_MSG_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 1); - - // Message - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - global_msg.N_bits = msg->N_bits-(msg_ptr-msg->msg); - if(LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ == ul_ccch_msg->msg_type) - { - err = liblte_rrc_unpack_rrc_connection_reestablishment_request_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *)&ul_ccch_msg->msg); - }else{ // LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ == ul_ccch_msg->msg_type - err = liblte_rrc_unpack_rrc_connection_request_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *)&ul_ccch_msg->msg); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - } - - return(err); -} - -/********************************************************************* - Message Name: UL DCCH Message - - Description: Contains the set of RRC messages that may be sent - from the UE to the E-UTRAN on the uplink DCCH - logical channel - - Document Reference: 36.331 v10.0.0 Section 6.2.1 -*********************************************************************/ -LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_dcch_msg(LIBLTE_RRC_UL_DCCH_MSG_STRUCT *ul_dcch_msg, - LIBLTE_BIT_MSG_STRUCT *msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext = false; - - if(ul_dcch_msg != NULL && - msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - liblte_value_2_bits(ext, &msg_ptr, 1); - - // Message type choice - liblte_value_2_bits(ul_dcch_msg->msg_type, &msg_ptr, 4); - - // Message - if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_CSFB_PARAMS_REQ_CDMA2000 == ul_dcch_msg->msg_type) - { - err = liblte_rrc_pack_csfb_parameters_request_cdma2000_msg((LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_MEASUREMENT_REPORT == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_measurement_report_msg((LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_RECONFIG_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_reconfiguration_complete_msg((LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_REEST_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_reestablishment_complete_msg((LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_SETUP_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_rrc_connection_setup_complete_msg((LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_security_mode_complete_msg((LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_FAILURE == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_security_mode_failure_msg((LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_CAPABILITY_INFO == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_ue_capability_information_msg((LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_HANDOVER_PREP_TRANSFER == ul_dcch_msg->msg_type){ - printf("NOT HANDLING UL HANDOVER PREPARATION TRANSFER\n"); -// err = liblte_rrc_pack_ul_handover_preparation_transfer_msg((LIBLTE_RRC_UL_HANDOVER_PREPARATION_TRANSFER_STRUCT *)&ul_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_INFO_TRANSFER == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_ul_information_transfer_msg((LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_COUNTER_CHECK_RESP == ul_dcch_msg->msg_type){ - printf("NOT HANDLING COUNTER CHECK RESPONSE\n"); -// err = liblte_rrc_pack_counter_check_response_msg((LIBLTE_RRC_COUNTER_CHECK_RESPONSE_STRUCT *)&ul_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_INFO_RESP == ul_dcch_msg->msg_type){ - printf("NOT HANDLING UE INFORMATION RESPONSE\n"); -// err = liblte_rrc_pack_ue_information_response_msg((LIBLTE_RRC_UE_INFORMATION_RESPONSE_STRUCT *)&ul_dcch_msg->msg, -// &global_msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_PROXIMITY_IND == ul_dcch_msg->msg_type){ - err = liblte_rrc_pack_proximity_indication_msg((LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - }else{ // LIBLTE_RRC_UL_DCCH_MSG_TYPE_RN_RECONFIG_COMPLETE == ul_dcch_msg->msg_type - err = liblte_rrc_pack_rn_reconfiguration_complete_msg((LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT *)&ul_dcch_msg->msg, - &global_msg); - } - - if(global_msg.N_bits <= (LIBLTE_MAX_MSG_SIZE_BITS - 5)) - { - memcpy(msg_ptr, global_msg.msg, global_msg.N_bits); - msg->N_bits = global_msg.N_bits + 5; - }else{ - msg->N_bits = 0; - err = LIBLTE_ERROR_INVALID_INPUTS; - } - } - - return(err); -} -LIBLTE_ERROR_ENUM liblte_rrc_unpack_ul_dcch_msg(LIBLTE_BIT_MSG_STRUCT *msg, - LIBLTE_RRC_UL_DCCH_MSG_STRUCT *ul_dcch_msg) -{ - LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS; - uint8 *msg_ptr; - uint8 ext; - - if(msg != NULL && - ul_dcch_msg != NULL) - { - msg_ptr = msg->msg; - - // Extension indicator - ext = liblte_bits_2_value(&msg_ptr, 1); - - // Message type choice - ul_dcch_msg->msg_type = (LIBLTE_RRC_UL_DCCH_MSG_TYPE_ENUM)liblte_bits_2_value(&msg_ptr, 4); - - // Message - memcpy(global_msg.msg, msg_ptr, msg->N_bits-(msg_ptr-msg->msg)); - global_msg.N_bits = msg->N_bits-(msg_ptr-msg->msg); - if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_CSFB_PARAMS_REQ_CDMA2000 == ul_dcch_msg->msg_type) - { - err = liblte_rrc_unpack_csfb_parameters_request_cdma2000_msg(&global_msg, - (LIBLTE_RRC_CSFB_PARAMETERS_REQUEST_CDMA2000_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_MEASUREMENT_REPORT == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_measurement_report_msg(&global_msg, - (LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_RECONFIG_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_reconfiguration_complete_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_REEST_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_reestablishment_complete_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_REESTABLISHMENT_COMPLETE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_SETUP_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_rrc_connection_setup_complete_msg(&global_msg, - (LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_COMPLETE == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_security_mode_complete_msg(&global_msg, - (LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_FAILURE == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_security_mode_failure_msg(&global_msg, - (LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_CAPABILITY_INFO == ul_dcch_msg->msg_type){ - printf("NOT HANDLING UE CAPABILITY INFO\n"); -// err = liblte_rrc_unpack_ue_capability_information_msg(&global_msg, -// (LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_HANDOVER_PREP_TRANSFER == ul_dcch_msg->msg_type){ - printf("NOT HANDLING UL HANDOVER PREPARATION TRANSFER\n"); -// err = liblte_rrc_unpack_ul_handover_preparation_transfer_msg(&global_msg, -// (LIBLTE_RRC_UL_HANDOVER_PREPARATION_TRANSFER_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_INFO_TRANSFER == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_ul_information_transfer_msg(&global_msg, - (LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_COUNTER_CHECK_RESP == ul_dcch_msg->msg_type){ - printf("NOT HANDLING COUNTER CHECK RESPONSE\n"); -// err = liblte_rrc_unpack_counter_check_response_msg(&global_msg, -// (LIBLTE_RRC_COUNTER_CHECK_RESPONSE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_INFO_RESP == ul_dcch_msg->msg_type){ - printf("NOT HANDLING UE INFORMATION RESPONSE\n"); -// err = liblte_rrc_unpack_ue_information_response_msg(&global_msg, -// (LIBLTE_RRC_UE_INFORMATION_RESPONSE_STRUCT *)&ul_dcch_msg->msg); - }else if(LIBLTE_RRC_UL_DCCH_MSG_TYPE_PROXIMITY_IND == ul_dcch_msg->msg_type){ - err = liblte_rrc_unpack_proximity_indication_msg(&global_msg, - (LIBLTE_RRC_PROXIMITY_INDICATION_STRUCT *)&ul_dcch_msg->msg); - }else{ // LIBLTE_RRC_UL_DCCH_MSG_TYPE_RN_RECONFIG_COMPLETE == ul_dcch_msg->msg_type - err = liblte_rrc_unpack_rn_reconfiguration_complete_msg(&global_msg, - (LIBLTE_RRC_RN_RECONFIGURATION_COMPLETE_STRUCT *)&ul_dcch_msg->msg); - } - - liblte_rrc_consume_noncrit_extension(ext, __func__, &msg_ptr); - - } - - return(err); -} diff --git a/lib/src/asn1/rrc_asn1.cc b/lib/src/asn1/rrc_asn1.cc new file mode 100644 index 000000000..2d8efb897 --- /dev/null +++ b/lib/src/asn1/rrc_asn1.cc @@ -0,0 +1,126772 @@ +/* +Copyright 2013-2017 Software Radio Systems Limited + +This file is part of srsLTE + +srsASN1 is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +srsASN1 is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +A copy of the GNU Affero General Public License can be found in +the LICENSE file in the top-level directory of this distribution +and at http://www.gnu.org/licenses/. +*/ + +#include "srslte/asn1/rrc_asn1.h" +#include + +using namespace asn1; +using namespace asn1::rrc; + +#define rrc_asn1_warn_assert(cond, file, line) \ + if ((cond)) { \ + rrc_log_print(LOG_LEVEL_WARN, "Assertion in [%s][%d] failed.\n", (file), (line)); \ + } + +static void log_invalid_choice_id(uint32_t val, const char* choice_type) +{ + rrc_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%d for choice type %s\n", val, choice_type); +} + +/******************************************************************************* +/* Struct Methods +/******************************************************************************/ + +// PHICH-Config ::= SEQUENCE +SRSASN_CODE phich_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, phich_dur)); + HANDLE_CODE(pack_enum(bref, phich_res)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phich_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(phich_dur, bref)); + HANDLE_CODE(unpack_enum(phich_res, bref)); + + return SRSASN_SUCCESS; +} +void phich_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("phich-Duration", phich_dur.to_string()); + j.write_str("phich-Resource", phich_res.to_string()); + j.end_obj(); +} + +// MasterInformationBlock ::= SEQUENCE +SRSASN_CODE mib_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, dl_bw)); + HANDLE_CODE(phich_cfg.pack(bref)); + HANDLE_CODE(sys_frame_num.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, sched_info_sib1_br_r13, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(bref.pack(sys_info_unchanged_br_r15, 1)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mib_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(dl_bw, bref)); + HANDLE_CODE(phich_cfg.unpack(bref)); + HANDLE_CODE(sys_frame_num.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(sched_info_sib1_br_r13, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(bref.unpack(sys_info_unchanged_br_r15, 1)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mib_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("dl-Bandwidth", dl_bw.to_string()); + j.write_fieldname("phich-Config"); + phich_cfg.to_json(j); + j.write_str("systemFrameNumber", sys_frame_num.to_string()); + j.write_int("schedulingInfoSIB1-BR-r13", sched_info_sib1_br_r13); + j.write_bool("systemInfoUnchanged-BR-r15", sys_info_unchanged_br_r15); + j.write_str("spare", spare.to_string()); + j.end_obj(); +} + +// 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(bit_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(); +} + +// MasterInformationBlock-MBMS-r14 ::= SEQUENCE +SRSASN_CODE mib_mbms_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, dl_bw_mbms_r14)); + HANDLE_CODE(sys_frame_num_r14.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, add_non_mbsfn_sfs_r14, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mib_mbms_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(dl_bw_mbms_r14, bref)); + HANDLE_CODE(sys_frame_num_r14.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(add_non_mbsfn_sfs_r14, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mib_mbms_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("dl-Bandwidth-MBMS-r14", dl_bw_mbms_r14.to_string()); + j.write_str("systemFrameNumber-r14", sys_frame_num_r14.to_string()); + j.write_int("additionalNonMBSFNSubframes-r14", add_non_mbsfn_sfs_r14); + j.write_str("spare", spare.to_string()); + j.end_obj(); +} + +// BCCH-BCH-Message-MBMS ::= SEQUENCE +SRSASN_CODE bcch_bch_msg_mbms_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_bch_msg_mbms_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void bcch_bch_msg_mbms_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("BCCH-BCH-Message-MBMS"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// GNSS-ID-r15 ::= SEQUENCE +gnss_id_r15_s::gnss_id_r15_s() +{ + ext = false; +} +SRSASN_CODE gnss_id_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, gnss_id_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE gnss_id_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(gnss_id_r15, bref)); + + return SRSASN_SUCCESS; +} +void gnss_id_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("gnss-id-r15", gnss_id_r15.to_string()); + j.end_obj(); +} + +// SBAS-ID-r15 ::= SEQUENCE +sbas_id_r15_s::sbas_id_r15_s() +{ + ext = false; +} +SRSASN_CODE sbas_id_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, sbas_id_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sbas_id_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(sbas_id_r15, bref)); + + return SRSASN_SUCCESS; +} +void sbas_id_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sbas-id-r15", sbas_id_r15.to_string()); + j.end_obj(); +} + +// PLMN-Identity ::= SEQUENCE +plmn_id_s::plmn_id_s() +{ + mcc_present = false; +} +SRSASN_CODE plmn_id_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mcc_present, 1)); + + if (mcc_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(mcc)[0], mcc.size(), UnalignedIntegerPacker(0, 9))); + } + HANDLE_CODE(pack_dyn_seq_of(bref, mnc, 2, 3, UnalignedIntegerPacker(0, 9))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mcc_present, 1)); + + if (mcc_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(mcc)[0], bref, mcc.size(), UnalignedIntegerPacker(0, 9))); + } + HANDLE_CODE(unpack_dyn_seq_of(mnc, bref, 2, 3, UnalignedIntegerPacker(0, 9))); + + return SRSASN_SUCCESS; +} +void plmn_id_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mcc_present) { + j.start_array("mcc"); + for (uint32_t i1 = 0; i1 < mcc.size(); ++i1) { + j.write_int(mcc[i1]); + } + j.end_array(); + } + j.start_array("mnc"); + for (uint32_t i1 = 0; i1 < mnc.size(); ++i1) { + j.write_int(mnc[i1]); + } + j.end_array(); + j.end_obj(); +} + +// PosSIB-Type-r15 ::= SEQUENCE +pos_sib_type_r15_s::pos_sib_type_r15_s() +{ + ext = false; + encrypted_r15_present = false; + gnss_id_r15_present = false; + sbas_id_r15_present = false; +} +SRSASN_CODE pos_sib_type_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(encrypted_r15_present, 1)); + HANDLE_CODE(bref.pack(gnss_id_r15_present, 1)); + HANDLE_CODE(bref.pack(sbas_id_r15_present, 1)); + + if (gnss_id_r15_present) { + HANDLE_CODE(gnss_id_r15.pack(bref)); + } + if (sbas_id_r15_present) { + HANDLE_CODE(sbas_id_r15.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, pos_sib_type_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sib_type_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(encrypted_r15_present, 1)); + HANDLE_CODE(bref.unpack(gnss_id_r15_present, 1)); + HANDLE_CODE(bref.unpack(sbas_id_r15_present, 1)); + + if (gnss_id_r15_present) { + HANDLE_CODE(gnss_id_r15.unpack(bref)); + } + if (sbas_id_r15_present) { + HANDLE_CODE(sbas_id_r15.unpack(bref)); + } + HANDLE_CODE(unpack_enum(pos_sib_type_r15, bref)); + + return SRSASN_SUCCESS; +} +void pos_sib_type_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (encrypted_r15_present) { + j.write_str("encrypted-r15", "true"); + } + if (gnss_id_r15_present) { + j.write_fieldname("gnss-id-r15"); + gnss_id_r15.to_json(j); + } + if (sbas_id_r15_present) { + j.write_fieldname("sbas-id-r15"); + sbas_id_r15.to_json(j); + } + j.write_str("posSibType-r15", pos_sib_type_r15.to_string()); + j.end_obj(); +} + +// PLMN-IdentityInfo-r15 ::= SEQUENCE +SRSASN_CODE plmn_id_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_minus5_gc_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, cell_reserved_for_oper_r15)); + HANDLE_CODE(pack_enum(bref, cell_reserved_for_oper_crs_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id_minus5_gc_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(cell_reserved_for_oper_r15, bref)); + HANDLE_CODE(unpack_enum(cell_reserved_for_oper_crs_r15, bref)); + + return SRSASN_SUCCESS; +} +void plmn_id_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity-5GC-r15"); + plmn_id_minus5_gc_r15.to_json(j); + j.write_str("cellReservedForOperatorUse-r15", cell_reserved_for_oper_r15.to_string()); + j.write_str("cellReservedForOperatorUse-CRS-r15", cell_reserved_for_oper_crs_r15.to_string()); + j.end_obj(); +} + +void plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::destroy_() +{ + switch (type_) { + case types::plmn_id_r15: + c.destroy(); + break; + default: + break; + } +} +void plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_id_r15: + c.init(); + break; + case types::plmn_idx_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_"); + } +} +plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::plmn_id_minus5_gc_r15_c_( + const plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_id_r15: + c.init(other.c.get()); + break; + case types::plmn_idx_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_"); + } +} +plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_& plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_:: + operator=(const plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::plmn_id_r15: + c.set(other.c.get()); + break; + case types::plmn_idx_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_"); + } + + return *this; +} +void plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_id_r15: + j.write_fieldname("plmn-Identity-r15"); + c.get().to_json(j); + break; + case types::plmn_idx_r15: + j.write_int("plmn-Index-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::plmn_id_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::plmn_idx_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)6)); + break; + default: + log_invalid_choice_id(type_, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::plmn_id_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::plmn_idx_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)6)); + break; + default: + log_invalid_choice_id(type_, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CellIdentity-5GC-r15 ::= CHOICE +void cell_id_minus5_gc_r15_c::destroy_() +{ + switch (type_) { + case types::cell_id_r15: + c.destroy >(); + break; + default: + break; + } +} +void cell_id_minus5_gc_r15_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_id_r15: + c.init >(); + break; + case types::cell_id_idx_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_id_minus5_gc_r15_c"); + } +} +cell_id_minus5_gc_r15_c::cell_id_minus5_gc_r15_c(const cell_id_minus5_gc_r15_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_id_r15: + c.init(other.c.get >()); + break; + case types::cell_id_idx_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_id_minus5_gc_r15_c"); + } +} +cell_id_minus5_gc_r15_c& cell_id_minus5_gc_r15_c::operator=(const cell_id_minus5_gc_r15_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_id_r15: + c.set(other.c.get >()); + break; + case types::cell_id_idx_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_id_minus5_gc_r15_c"); + } + + return *this; +} +void cell_id_minus5_gc_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_id_r15: + j.write_str("cellIdentity-r15", c.get >().to_string()); + break; + case types::cell_id_idx_r15: + j.write_int("cellId-Index-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "cell_id_minus5_gc_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE cell_id_minus5_gc_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cell_id_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::cell_id_idx_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)6)); + break; + default: + log_invalid_choice_id(type_, "cell_id_minus5_gc_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_id_minus5_gc_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cell_id_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::cell_id_idx_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)6)); + break; + default: + log_invalid_choice_id(type_, "cell_id_minus5_gc_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PLMN-IdentityInfo-v1530 ::= SEQUENCE +SRSASN_CODE plmn_id_info_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, cell_reserved_for_oper_crs_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(cell_reserved_for_oper_crs_r15, bref)); + + return SRSASN_SUCCESS; +} +void plmn_id_info_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cellReservedForOperatorUse-CRS-r15", cell_reserved_for_oper_crs_r15.to_string()); + j.end_obj(); +} + +// PosSchedulingInfo-r15 ::= SEQUENCE +SRSASN_CODE pos_sched_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, pos_si_periodicity_r15)); + HANDLE_CODE(pack_dyn_seq_of(bref, pos_sib_map_info_r15, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sched_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(pos_si_periodicity_r15, bref)); + HANDLE_CODE(unpack_dyn_seq_of(pos_sib_map_info_r15, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void pos_sched_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("posSI-Periodicity-r15", pos_si_periodicity_r15.to_string()); + j.start_array("posSIB-MappingInfo-r15"); + for (uint32_t i1 = 0; i1 < pos_sib_map_info_r15.size(); ++i1) { + pos_sib_map_info_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// CellAccessRelatedInfo-5GC-r15 ::= SEQUENCE +cell_access_related_info_minus5_gc_r15_s::cell_access_related_info_minus5_gc_r15_s() +{ + ran_area_code_r15_present = false; +} +SRSASN_CODE cell_access_related_info_minus5_gc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ran_area_code_r15_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r15, 1, 6)); + if (ran_area_code_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, ran_area_code_r15, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(tac_minus5_gc_r15.pack(bref)); + HANDLE_CODE(cell_id_minus5_gc_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_access_related_info_minus5_gc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ran_area_code_r15_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r15, bref, 1, 6)); + if (ran_area_code_r15_present) { + HANDLE_CODE(unpack_unalign_integer(ran_area_code_r15, bref, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(tac_minus5_gc_r15.unpack(bref)); + HANDLE_CODE(cell_id_minus5_gc_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_access_related_info_minus5_gc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmn-IdentityList-r15"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r15.size(); ++i1) { + plmn_id_list_r15[i1].to_json(j); + } + j.end_array(); + if (ran_area_code_r15_present) { + j.write_int("ran-AreaCode-r15", ran_area_code_r15); + } + j.write_str("trackingAreaCode-5GC-r15", tac_minus5_gc_r15.to_string()); + j.write_fieldname("cellIdentity-5GC-r15"); + cell_id_minus5_gc_r15.to_json(j); + j.end_obj(); +} + +// CellSelectionInfoCE-v1530 ::= SEQUENCE +SRSASN_CODE cell_sel_info_ce_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, pwr_class14dbm_offset_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_ce_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(pwr_class14dbm_offset_r15, bref)); + + return SRSASN_SUCCESS; +} +void cell_sel_info_ce_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("powerClass14dBm-Offset-r15", pwr_class14dbm_offset_r15.to_string()); + j.end_obj(); +} + +// MCS-PSSCH-Range-r15 ::= SEQUENCE +SRSASN_CODE mcs_pssch_range_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, min_mcs_pssch_r15, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, max_mcs_pssch_r15, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mcs_pssch_range_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(min_mcs_pssch_r15, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(max_mcs_pssch_r15, bref, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +void mcs_pssch_range_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("minMCS-PSSCH-r15", min_mcs_pssch_r15); + j.write_int("maxMCS-PSSCH-r15", max_mcs_pssch_r15); + j.end_obj(); +} + +// PLMN-IdentityInfo ::= SEQUENCE +SRSASN_CODE plmn_id_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(pack_enum(bref, cell_reserved_for_oper)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(unpack_enum(cell_reserved_for_oper, bref)); + + return SRSASN_SUCCESS; +} +void plmn_id_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + j.write_str("cellReservedForOperatorUse", cell_reserved_for_oper.to_string()); + j.end_obj(); +} + +// SL-TxPower-r14 ::= CHOICE +void sl_tx_pwr_r14_c::set(types::options e) +{ + type_ = e; +} +void sl_tx_pwr_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::minusinfinity_r14: + break; + case types::tx_pwr_r14: + j.write_int("txPower-r14", c); + break; + default: + log_invalid_choice_id(type_, "sl_tx_pwr_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE sl_tx_pwr_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::minusinfinity_r14: + break; + case types::tx_pwr_r14: + HANDLE_CODE(pack_unalign_integer(bref, c, (int8_t)-41, (int8_t)31)); + break; + default: + log_invalid_choice_id(type_, "sl_tx_pwr_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_pwr_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::minusinfinity_r14: + break; + case types::tx_pwr_r14: + HANDLE_CODE(unpack_unalign_integer(c, bref, (int8_t)-41, (int8_t)31)); + break; + default: + log_invalid_choice_id(type_, "sl_tx_pwr_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-MinT2Value-r15 ::= SEQUENCE +SRSASN_CODE sl_min_t2_value_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, prio_list_r15, 1, 8, UnalignedIntegerPacker(1, 8))); + HANDLE_CODE(pack_unalign_integer(bref, min_t2_value_r15, (uint8_t)10, (uint8_t)20)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_min_t2_value_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(prio_list_r15, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + HANDLE_CODE(unpack_unalign_integer(min_t2_value_r15, bref, (uint8_t)10, (uint8_t)20)); + + return SRSASN_SUCCESS; +} +void sl_min_t2_value_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("priorityList-r15"); + for (uint32_t i1 = 0; i1 < prio_list_r15.size(); ++i1) { + j.write_int(prio_list_r15[i1]); + } + j.end_array(); + j.write_int("minT2Value-r15", min_t2_value_r15); + j.end_obj(); +} + +// SL-PPPP-TxConfigIndex-r14 ::= SEQUENCE +SRSASN_CODE sl_pppp_tx_cfg_idx_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, prio_thres_r14, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_unalign_integer(bref, default_tx_cfg_idx_r14, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, cbr_cfg_idx_r14, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_dyn_seq_of(bref, tx_cfg_idx_list_r14, 1, 16, UnalignedIntegerPacker(0, 63))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pppp_tx_cfg_idx_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(prio_thres_r14, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_unalign_integer(default_tx_cfg_idx_r14, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(cbr_cfg_idx_r14, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_dyn_seq_of(tx_cfg_idx_list_r14, bref, 1, 16, UnalignedIntegerPacker(0, 63))); + + return SRSASN_SUCCESS; +} +void sl_pppp_tx_cfg_idx_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("priorityThreshold-r14", prio_thres_r14); + j.write_int("defaultTxConfigIndex-r14", default_tx_cfg_idx_r14); + j.write_int("cbr-ConfigIndex-r14", cbr_cfg_idx_r14); + j.start_array("tx-ConfigIndexList-r14"); + for (uint32_t i1 = 0; i1 < tx_cfg_idx_list_r14.size(); ++i1) { + j.write_int(tx_cfg_idx_list_r14[i1]); + } + j.end_array(); + j.end_obj(); +} + +// SL-PPPP-TxConfigIndex-v1530 ::= SEQUENCE +sl_pppp_tx_cfg_idx_v1530_s::sl_pppp_tx_cfg_idx_v1530_s() +{ + mcs_pssch_range_list_r15_present = false; +} +SRSASN_CODE sl_pppp_tx_cfg_idx_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mcs_pssch_range_list_r15_present, 1)); + + if (mcs_pssch_range_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mcs_pssch_range_list_r15, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pppp_tx_cfg_idx_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mcs_pssch_range_list_r15_present, 1)); + + if (mcs_pssch_range_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(mcs_pssch_range_list_r15, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void sl_pppp_tx_cfg_idx_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mcs_pssch_range_list_r15_present) { + j.start_array("mcs-PSSCH-RangeList-r15"); + for (uint32_t i1 = 0; i1 < mcs_pssch_range_list_r15.size(); ++i1) { + mcs_pssch_range_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-PSSCH-TxParameters-r14 ::= SEQUENCE +sl_pssch_tx_params_r14_s::sl_pssch_tx_params_r14_s() +{ + max_tx_pwr_r14_present = false; +} +SRSASN_CODE sl_pssch_tx_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_tx_pwr_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, min_mcs_pssch_r14, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, max_mcs_pssch_r14, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, min_sub_ch_num_pssch_r14, (uint8_t)1, (uint8_t)20)); + HANDLE_CODE(pack_unalign_integer(bref, max_subch_num_pssch_r14, (uint8_t)1, (uint8_t)20)); + HANDLE_CODE(pack_enum(bref, allowed_retx_num_pssch_r14)); + if (max_tx_pwr_r14_present) { + HANDLE_CODE(max_tx_pwr_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pssch_tx_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_tx_pwr_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(min_mcs_pssch_r14, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(max_mcs_pssch_r14, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(min_sub_ch_num_pssch_r14, bref, (uint8_t)1, (uint8_t)20)); + HANDLE_CODE(unpack_unalign_integer(max_subch_num_pssch_r14, bref, (uint8_t)1, (uint8_t)20)); + HANDLE_CODE(unpack_enum(allowed_retx_num_pssch_r14, bref)); + if (max_tx_pwr_r14_present) { + HANDLE_CODE(max_tx_pwr_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_pssch_tx_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("minMCS-PSSCH-r14", min_mcs_pssch_r14); + j.write_int("maxMCS-PSSCH-r14", max_mcs_pssch_r14); + j.write_int("minSubChannel-NumberPSSCH-r14", min_sub_ch_num_pssch_r14); + j.write_int("maxSubchannel-NumberPSSCH-r14", max_subch_num_pssch_r14); + j.write_str("allowedRetxNumberPSSCH-r14", allowed_retx_num_pssch_r14.to_string()); + if (max_tx_pwr_r14_present) { + j.write_fieldname("maxTxPower-r14"); + max_tx_pwr_r14.to_json(j); + } + j.end_obj(); +} + +// SL-PSSCH-TxParameters-v1530 ::= SEQUENCE +SRSASN_CODE sl_pssch_tx_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, min_mcs_pssch_r15, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, max_mcs_pssch_r15, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pssch_tx_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(min_mcs_pssch_r15, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(max_mcs_pssch_r15, bref, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +void sl_pssch_tx_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("minMCS-PSSCH-r15", min_mcs_pssch_r15); + j.write_int("maxMCS-PSSCH-r15", max_mcs_pssch_r15); + j.end_obj(); +} + +// SystemInformationBlockType1-v1530-IEs ::= SEQUENCE +sib_type1_v1530_ies_s::sib_type1_v1530_ies_s() +{ + hsdn_cell_r15_present = false; + cell_sel_info_ce_v1530_present = false; + crs_intf_mitig_cfg_r15_present = false; + plmn_id_list_v1530_present = false; + pos_sched_info_list_r15_present = false; + cell_access_related_info_minus5_gc_r15_present = false; + ims_emergency_support5_gc_r15_present = false; + e_call_over_ims_support5_gc_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(hsdn_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_ce_v1530_present, 1)); + HANDLE_CODE(bref.pack(crs_intf_mitig_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(plmn_id_list_v1530_present, 1)); + HANDLE_CODE(bref.pack(pos_sched_info_list_r15_present, 1)); + HANDLE_CODE(bref.pack(cell_access_related_info_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(ims_emergency_support5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(e_call_over_ims_support5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cell_sel_info_ce_v1530_present) { + HANDLE_CODE(cell_sel_info_ce_v1530.pack(bref)); + } + if (crs_intf_mitig_cfg_r15_present) { + HANDLE_CODE(crs_intf_mitig_cfg_r15.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, cell_barred_crs_r15)); + if (plmn_id_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_v1530, 1, 6)); + } + if (pos_sched_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pos_sched_info_list_r15, 1, 32)); + } + if (cell_access_related_info_minus5_gc_r15_present) { + HANDLE_CODE(pack_enum(bref, cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_r15)); + HANDLE_CODE(pack_enum(bref, cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_crs_r15)); + HANDLE_CODE(pack_dyn_seq_of( + bref, cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15, 1, 6)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(hsdn_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_ce_v1530_present, 1)); + HANDLE_CODE(bref.unpack(crs_intf_mitig_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(plmn_id_list_v1530_present, 1)); + HANDLE_CODE(bref.unpack(pos_sched_info_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(cell_access_related_info_minus5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(ims_emergency_support5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(e_call_over_ims_support5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cell_sel_info_ce_v1530_present) { + HANDLE_CODE(cell_sel_info_ce_v1530.unpack(bref)); + } + if (crs_intf_mitig_cfg_r15_present) { + HANDLE_CODE(crs_intf_mitig_cfg_r15.unpack(bref)); + } + HANDLE_CODE(unpack_enum(cell_barred_crs_r15, bref)); + if (plmn_id_list_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_v1530, bref, 1, 6)); + } + if (pos_sched_info_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(pos_sched_info_list_r15, bref, 1, 32)); + } + if (cell_access_related_info_minus5_gc_r15_present) { + HANDLE_CODE(unpack_enum(cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_r15, bref)); + HANDLE_CODE(unpack_enum(cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_crs_r15, bref)); + HANDLE_CODE(unpack_dyn_seq_of(cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15, + bref, 1, 6)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hsdn_cell_r15_present) { + j.write_str("hsdn-Cell-r15", "true"); + } + if (cell_sel_info_ce_v1530_present) { + j.write_fieldname("cellSelectionInfoCE-v1530"); + cell_sel_info_ce_v1530.to_json(j); + } + if (crs_intf_mitig_cfg_r15_present) { + j.write_fieldname("crs-IntfMitigConfig-r15"); + crs_intf_mitig_cfg_r15.to_json(j); + } + j.write_str("cellBarred-CRS-r15", cell_barred_crs_r15.to_string()); + if (plmn_id_list_v1530_present) { + j.start_array("plmn-IdentityList-v1530"); + for (uint32_t i1 = 0; i1 < plmn_id_list_v1530.size(); ++i1) { + plmn_id_list_v1530[i1].to_json(j); + } + j.end_array(); + } + if (pos_sched_info_list_r15_present) { + j.start_array("posSchedulingInfoList-r15"); + for (uint32_t i1 = 0; i1 < pos_sched_info_list_r15.size(); ++i1) { + pos_sched_info_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (cell_access_related_info_minus5_gc_r15_present) { + j.write_fieldname("cellAccessRelatedInfo-5GC-r15"); + j.start_obj(); + j.write_str("cellBarred-5GC-r15", cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_r15.to_string()); + j.write_str("cellBarred-5GC-CRS-r15", + cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_crs_r15.to_string()); + j.start_array("cellAccessRelatedInfoList-5GC-r15"); + for (uint32_t i1 = 0; + i1 < cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15.size(); ++i1) { + cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + } + if (ims_emergency_support5_gc_r15_present) { + j.write_str("ims-EmergencySupport5GC-r15", "true"); + } + if (e_call_over_ims_support5_gc_r15_present) { + j.write_str("eCallOverIMS-Support5GC-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +void sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::crs_intf_mitig_enabled_minus15: + break; + case types::crs_intf_mitig_num_prbs_r15: + j.write_str("crs-IntfMitigNumPRBs-r15", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::crs_intf_mitig_enabled_minus15: + break; + case types::crs_intf_mitig_num_prbs_r15: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::crs_intf_mitig_enabled_minus15: + break; + case types::crs_intf_mitig_num_prbs_r15: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// TDD-Config-v1450 ::= SEQUENCE +SRSASN_CODE tdd_cfg_v1450_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_cfg_v1450_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void tdd_cfg_v1450_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("specialSubframePatterns-v1450", "ssp10-CRS-LessDwPTS"); + j.end_obj(); +} + +// CellAccessRelatedInfo-r14 ::= SEQUENCE +SRSASN_CODE cell_access_related_info_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r14, 1, 6)); + HANDLE_CODE(tac_r14.pack(bref)); + HANDLE_CODE(cell_id_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_access_related_info_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r14, bref, 1, 6)); + HANDLE_CODE(tac_r14.unpack(bref)); + HANDLE_CODE(cell_id_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_access_related_info_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmn-IdentityList-r14"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r14.size(); ++i1) { + plmn_id_list_r14[i1].to_json(j); + } + j.end_array(); + j.write_str("trackingAreaCode-r14", tac_r14.to_string()); + j.write_str("cellIdentity-r14", cell_id_r14.to_string()); + j.end_obj(); +} + +// CellSelectionInfoCE1-v1360 ::= SEQUENCE +SRSASN_CODE cell_sel_info_ce1_v1360_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, delta_rx_lev_min_ce1_v1360, (int8_t)-8, (int8_t)-1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_ce1_v1360_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(delta_rx_lev_min_ce1_v1360, bref, (int8_t)-8, (int8_t)-1)); + + return SRSASN_SUCCESS; +} +void cell_sel_info_ce1_v1360_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("delta-RxLevMinCE1-v1360", delta_rx_lev_min_ce1_v1360); + j.end_obj(); +} + +// NS-PmaxValue-v10l0 ::= SEQUENCE +ns_pmax_value_v10l0_s::ns_pmax_value_v10l0_s() +{ + add_spec_emission_v10l0_present = false; +} +SRSASN_CODE ns_pmax_value_v10l0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_spec_emission_v10l0_present, 1)); + + if (add_spec_emission_v10l0_present) { + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission_v10l0, (uint16_t)33, (uint16_t)288)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ns_pmax_value_v10l0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_spec_emission_v10l0_present, 1)); + + if (add_spec_emission_v10l0_present) { + HANDLE_CODE(unpack_unalign_integer(add_spec_emission_v10l0, bref, (uint16_t)33, (uint16_t)288)); + } + + return SRSASN_SUCCESS; +} +void ns_pmax_value_v10l0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_spec_emission_v10l0_present) { + j.write_int("additionalSpectrumEmission-v10l0", add_spec_emission_v10l0); + } + j.end_obj(); +} + +// SL-OffsetIndicator-r12 ::= CHOICE +void sl_offset_ind_r12_c::destroy_() {} +void sl_offset_ind_r12_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +sl_offset_ind_r12_c::sl_offset_ind_r12_c(const sl_offset_ind_r12_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::small_r12: + c.init(other.c.get()); + break; + case types::large_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_offset_ind_r12_c"); + } +} +sl_offset_ind_r12_c& sl_offset_ind_r12_c::operator=(const sl_offset_ind_r12_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::small_r12: + c.set(other.c.get()); + break; + case types::large_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_offset_ind_r12_c"); + } + + return *this; +} +void sl_offset_ind_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::small_r12: + j.write_int("small-r12", c.get()); + break; + case types::large_r12: + j.write_int("large-r12", c.get()); + break; + default: + log_invalid_choice_id(type_, "sl_offset_ind_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE sl_offset_ind_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::small_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::large_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)10239)); + break; + default: + log_invalid_choice_id(type_, "sl_offset_ind_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_offset_ind_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::small_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::large_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)10239)); + break; + default: + log_invalid_choice_id(type_, "sl_offset_ind_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-P2X-ResourceSelectionConfig-r14 ::= SEQUENCE +sl_p2_x_res_sel_cfg_r14_s::sl_p2_x_res_sel_cfg_r14_s() +{ + partial_sensing_r14_present = false; + random_sel_r14_present = false; +} +SRSASN_CODE sl_p2_x_res_sel_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(partial_sensing_r14_present, 1)); + HANDLE_CODE(bref.pack(random_sel_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_p2_x_res_sel_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(partial_sensing_r14_present, 1)); + HANDLE_CODE(bref.unpack(random_sel_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void sl_p2_x_res_sel_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (partial_sensing_r14_present) { + j.write_str("partialSensing-r14", "true"); + } + if (random_sel_r14_present) { + j.write_str("randomSelection-r14", "true"); + } + j.end_obj(); +} + +// SL-PSSCH-TxConfig-r14 ::= SEQUENCE +sl_pssch_tx_cfg_r14_s::sl_pssch_tx_cfg_r14_s() +{ + ext = false; + type_tx_sync_r14_present = false; + params_above_thres_v1530_present = false; + params_below_thres_v1530_present = false; +} +SRSASN_CODE sl_pssch_tx_cfg_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(type_tx_sync_r14_present, 1)); + + if (type_tx_sync_r14_present) { + HANDLE_CODE(pack_enum(bref, type_tx_sync_r14)); + } + HANDLE_CODE(pack_enum(bref, thres_ue_speed_r14)); + HANDLE_CODE(params_above_thres_r14.pack(bref)); + HANDLE_CODE(params_below_thres_r14.pack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(params_above_thres_v1530_present != (params_above_thres_v1530.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= params_above_thres_v1530_present; + rrc_asn1_warn_assert(params_below_thres_v1530_present != (params_below_thres_v1530.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= params_below_thres_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(params_above_thres_v1530_present, 1)); + HANDLE_CODE(bref.pack(params_below_thres_v1530_present, 1)); + if (params_above_thres_v1530_present) { + HANDLE_CODE(params_above_thres_v1530->pack(bref)); + } + if (params_below_thres_v1530_present) { + HANDLE_CODE(params_below_thres_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pssch_tx_cfg_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(type_tx_sync_r14_present, 1)); + + if (type_tx_sync_r14_present) { + HANDLE_CODE(unpack_enum(type_tx_sync_r14, bref)); + } + HANDLE_CODE(unpack_enum(thres_ue_speed_r14, bref)); + HANDLE_CODE(params_above_thres_r14.unpack(bref)); + HANDLE_CODE(params_below_thres_r14.unpack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(params_above_thres_v1530_present, 1)); + HANDLE_CODE(bref.unpack(params_below_thres_v1530_present, 1)); + if (params_above_thres_v1530_present) { + params_above_thres_v1530 = make_copy_ptr(sl_pssch_tx_params_v1530_s()); + HANDLE_CODE(params_above_thres_v1530->unpack(bref)); + } + if (params_below_thres_v1530_present) { + params_below_thres_v1530 = make_copy_ptr(sl_pssch_tx_params_v1530_s()); + HANDLE_CODE(params_below_thres_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_pssch_tx_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (type_tx_sync_r14_present) { + j.write_str("typeTxSync-r14", type_tx_sync_r14.to_string()); + } + j.write_str("thresUE-Speed-r14", thres_ue_speed_r14.to_string()); + j.write_fieldname("parametersAboveThres-r14"); + params_above_thres_r14.to_json(j); + j.write_fieldname("parametersBelowThres-r14"); + params_below_thres_r14.to_json(j); + if (params_above_thres_v1530_present) { + j.write_fieldname("parametersAboveThres-v1530"); + params_above_thres_v1530->to_json(j); + } + if (params_below_thres_v1530_present) { + j.write_fieldname("parametersBelowThres-v1530"); + params_below_thres_v1530->to_json(j); + } + j.end_obj(); +} + +// SL-SyncAllowed-r14 ::= SEQUENCE +sl_sync_allowed_r14_s::sl_sync_allowed_r14_s() +{ + gnss_sync_r14_present = false; + enb_sync_r14_present = false; + ue_sync_r14_present = false; +} +SRSASN_CODE sl_sync_allowed_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(gnss_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(enb_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(ue_sync_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_sync_allowed_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(gnss_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(enb_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(ue_sync_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void sl_sync_allowed_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gnss_sync_r14_present) { + j.write_str("gnss-Sync-r14", "true"); + } + if (enb_sync_r14_present) { + j.write_str("enb-Sync-r14", "true"); + } + if (ue_sync_r14_present) { + j.write_str("ue-Sync-r14", "true"); + } + j.end_obj(); +} + +// SL-TxParameters-r12 ::= SEQUENCE +SRSASN_CODE sl_tx_params_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, alpha_r12)); + HANDLE_CODE(pack_unalign_integer(bref, p0_r12, (int8_t)-126, (int8_t)31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_params_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(alpha_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(p0_r12, bref, (int8_t)-126, (int8_t)31)); + + return SRSASN_SUCCESS; +} +void sl_tx_params_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("alpha-r12", alpha_r12.to_string()); + j.write_int("p0-r12", p0_r12); + j.end_obj(); +} + +// SubframeBitmapSL-r12 ::= CHOICE +void sf_bitmap_sl_r12_c::destroy_() +{ + switch (type_) { + case types::bs4_r12: + c.destroy >(); + break; + case types::bs8_r12: + c.destroy >(); + break; + case types::bs12_r12: + c.destroy >(); + break; + case types::bs16_r12: + c.destroy >(); + break; + case types::bs30_r12: + c.destroy >(); + break; + case types::bs40_r12: + c.destroy >(); + break; + case types::bs42_r12: + c.destroy >(); + break; + default: + break; + } +} +void sf_bitmap_sl_r12_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::bs4_r12: + c.init >(); + break; + case types::bs8_r12: + c.init >(); + break; + case types::bs12_r12: + c.init >(); + break; + case types::bs16_r12: + c.init >(); + break; + case types::bs30_r12: + c.init >(); + break; + case types::bs40_r12: + c.init >(); + break; + case types::bs42_r12: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r12_c"); + } +} +sf_bitmap_sl_r12_c::sf_bitmap_sl_r12_c(const sf_bitmap_sl_r12_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::bs4_r12: + c.init(other.c.get >()); + break; + case types::bs8_r12: + c.init(other.c.get >()); + break; + case types::bs12_r12: + c.init(other.c.get >()); + break; + case types::bs16_r12: + c.init(other.c.get >()); + break; + case types::bs30_r12: + c.init(other.c.get >()); + break; + case types::bs40_r12: + c.init(other.c.get >()); + break; + case types::bs42_r12: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r12_c"); + } +} +sf_bitmap_sl_r12_c& sf_bitmap_sl_r12_c::operator=(const sf_bitmap_sl_r12_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::bs4_r12: + c.set(other.c.get >()); + break; + case types::bs8_r12: + c.set(other.c.get >()); + break; + case types::bs12_r12: + c.set(other.c.get >()); + break; + case types::bs16_r12: + c.set(other.c.get >()); + break; + case types::bs30_r12: + c.set(other.c.get >()); + break; + case types::bs40_r12: + c.set(other.c.get >()); + break; + case types::bs42_r12: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r12_c"); + } + + return *this; +} +void sf_bitmap_sl_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::bs4_r12: + j.write_str("bs4-r12", c.get >().to_string()); + break; + case types::bs8_r12: + j.write_str("bs8-r12", c.get >().to_string()); + break; + case types::bs12_r12: + j.write_str("bs12-r12", c.get >().to_string()); + break; + case types::bs16_r12: + j.write_str("bs16-r12", c.get >().to_string()); + break; + case types::bs30_r12: + j.write_str("bs30-r12", c.get >().to_string()); + break; + case types::bs40_r12: + j.write_str("bs40-r12", c.get >().to_string()); + break; + case types::bs42_r12: + j.write_str("bs42-r12", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE sf_bitmap_sl_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::bs4_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs8_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs12_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs16_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs30_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs40_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs42_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sf_bitmap_sl_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::bs4_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs8_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs12_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs16_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs30_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs40_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs42_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SubframeBitmapSL-r14 ::= CHOICE +void sf_bitmap_sl_r14_c::destroy_() +{ + switch (type_) { + case types::bs10_r14: + c.destroy >(); + break; + case types::bs16_r14: + c.destroy >(); + break; + case types::bs20_r14: + c.destroy >(); + break; + case types::bs30_r14: + c.destroy >(); + break; + case types::bs40_r14: + c.destroy >(); + break; + case types::bs50_r14: + c.destroy >(); + break; + case types::bs60_r14: + c.destroy >(); + break; + case types::bs100_r14: + c.destroy >(); + break; + default: + break; + } +} +void sf_bitmap_sl_r14_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::bs10_r14: + c.init >(); + break; + case types::bs16_r14: + c.init >(); + break; + case types::bs20_r14: + c.init >(); + break; + case types::bs30_r14: + c.init >(); + break; + case types::bs40_r14: + c.init >(); + break; + case types::bs50_r14: + c.init >(); + break; + case types::bs60_r14: + c.init >(); + break; + case types::bs100_r14: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r14_c"); + } +} +sf_bitmap_sl_r14_c::sf_bitmap_sl_r14_c(const sf_bitmap_sl_r14_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::bs10_r14: + c.init(other.c.get >()); + break; + case types::bs16_r14: + c.init(other.c.get >()); + break; + case types::bs20_r14: + c.init(other.c.get >()); + break; + case types::bs30_r14: + c.init(other.c.get >()); + break; + case types::bs40_r14: + c.init(other.c.get >()); + break; + case types::bs50_r14: + c.init(other.c.get >()); + break; + case types::bs60_r14: + c.init(other.c.get >()); + break; + case types::bs100_r14: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r14_c"); + } +} +sf_bitmap_sl_r14_c& sf_bitmap_sl_r14_c::operator=(const sf_bitmap_sl_r14_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::bs10_r14: + c.set(other.c.get >()); + break; + case types::bs16_r14: + c.set(other.c.get >()); + break; + case types::bs20_r14: + c.set(other.c.get >()); + break; + case types::bs30_r14: + c.set(other.c.get >()); + break; + case types::bs40_r14: + c.set(other.c.get >()); + break; + case types::bs50_r14: + c.set(other.c.get >()); + break; + case types::bs60_r14: + c.set(other.c.get >()); + break; + case types::bs100_r14: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r14_c"); + } + + return *this; +} +void sf_bitmap_sl_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::bs10_r14: + j.write_str("bs10-r14", c.get >().to_string()); + break; + case types::bs16_r14: + j.write_str("bs16-r14", c.get >().to_string()); + break; + case types::bs20_r14: + j.write_str("bs20-r14", c.get >().to_string()); + break; + case types::bs30_r14: + j.write_str("bs30-r14", c.get >().to_string()); + break; + case types::bs40_r14: + j.write_str("bs40-r14", c.get >().to_string()); + break; + case types::bs50_r14: + j.write_str("bs50-r14", c.get >().to_string()); + break; + case types::bs60_r14: + j.write_str("bs60-r14", c.get >().to_string()); + break; + case types::bs100_r14: + j.write_str("bs100-r14", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE sf_bitmap_sl_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::bs10_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs16_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs20_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs30_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs40_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs50_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs60_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::bs100_r14: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sf_bitmap_sl_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::bs10_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs16_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs20_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs30_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs40_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs50_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs60_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::bs100_r14: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sf_bitmap_sl_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType1-v1450-IEs ::= SEQUENCE +sib_type1_v1450_ies_s::sib_type1_v1450_ies_s() +{ + tdd_cfg_v1450_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1450_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tdd_cfg_v1450_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (tdd_cfg_v1450_present) { + HANDLE_CODE(tdd_cfg_v1450.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1450_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tdd_cfg_v1450_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (tdd_cfg_v1450_present) { + HANDLE_CODE(tdd_cfg_v1450.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1450_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tdd_cfg_v1450_present) { + j.write_fieldname("tdd-Config-v1450"); + tdd_cfg_v1450.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// TDD-Config ::= SEQUENCE +SRSASN_CODE tdd_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sf_assign)); + HANDLE_CODE(pack_enum(bref, special_sf_patterns)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sf_assign, bref)); + HANDLE_CODE(unpack_enum(special_sf_patterns, bref)); + + return SRSASN_SUCCESS; +} +void tdd_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("subframeAssignment", sf_assign.to_string()); + j.write_str("specialSubframePatterns", special_sf_patterns.to_string()); + j.end_obj(); +} + +// TDD-Config-v1430 ::= SEQUENCE +SRSASN_CODE tdd_cfg_v1430_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_cfg_v1430_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void tdd_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("specialSubframePatterns-v1430", "ssp10"); + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1360 ::= SEQUENCE +inter_freq_carrier_freq_info_v1360_s::inter_freq_carrier_freq_info_v1360_s() +{ + cell_sel_info_ce1_v1360_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1360_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_sel_info_ce1_v1360_present, 1)); + + if (cell_sel_info_ce1_v1360_present) { + HANDLE_CODE(cell_sel_info_ce1_v1360.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1360_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_sel_info_ce1_v1360_present, 1)); + + if (cell_sel_info_ce1_v1360_present) { + HANDLE_CODE(cell_sel_info_ce1_v1360.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1360_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_sel_info_ce1_v1360_present) { + j.write_fieldname("cellSelectionInfoCE1-v1360"); + cell_sel_info_ce1_v1360.to_json(j); + } + j.end_obj(); +} + +// NS-PmaxValue-r10 ::= SEQUENCE +ns_pmax_value_r10_s::ns_pmax_value_r10_s() +{ + add_pmax_r10_present = false; +} +SRSASN_CODE ns_pmax_value_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_pmax_r10_present, 1)); + + if (add_pmax_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, add_pmax_r10, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission, (uint8_t)1, (uint8_t)32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ns_pmax_value_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_pmax_r10_present, 1)); + + if (add_pmax_r10_present) { + HANDLE_CODE(unpack_unalign_integer(add_pmax_r10, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_unalign_integer(add_spec_emission, bref, (uint8_t)1, (uint8_t)32)); + + return SRSASN_SUCCESS; +} +void ns_pmax_value_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_pmax_r10_present) { + j.write_int("additionalPmax-r10", add_pmax_r10); + } + j.write_int("additionalSpectrumEmission", add_spec_emission); + j.end_obj(); +} + +// SL-CommResourcePoolV2X-r14 ::= SEQUENCE +sl_comm_res_pool_v2x_r14_s::sl_comm_res_pool_v2x_r14_s() +{ + ext = false; + sl_offset_ind_r14_present = false; + start_rb_pscch_pool_r14_present = false; + rx_params_ncell_r14_present = false; + data_tx_params_r14_present = false; + zone_id_r14_present = false; + thresh_s_rssi_cbr_r14_present = false; + pool_report_id_r14_present = false; + cbr_pssch_tx_cfg_list_r14_present = false; + res_sel_cfg_p2_x_r14_present = false; + sync_allowed_r14_present = false; + restrict_res_reserv_period_r14_present = false; + sl_min_t2_value_list_r15_present = false; + cbr_pssch_tx_cfg_list_v1530_present = false; +} +SRSASN_CODE sl_comm_res_pool_v2x_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_offset_ind_r14_present, 1)); + HANDLE_CODE(bref.pack(start_rb_pscch_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(rx_params_ncell_r14_present, 1)); + HANDLE_CODE(bref.pack(data_tx_params_r14_present, 1)); + HANDLE_CODE(bref.pack(zone_id_r14_present, 1)); + HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r14_present, 1)); + HANDLE_CODE(bref.pack(pool_report_id_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_pssch_tx_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.pack(res_sel_cfg_p2_x_r14_present, 1)); + HANDLE_CODE(bref.pack(sync_allowed_r14_present, 1)); + HANDLE_CODE(bref.pack(restrict_res_reserv_period_r14_present, 1)); + + if (sl_offset_ind_r14_present) { + HANDLE_CODE(sl_offset_ind_r14.pack(bref)); + } + HANDLE_CODE(sl_sf_r14.pack(bref)); + HANDLE_CODE(bref.pack(adjacency_pscch_pssch_r14, 1)); + HANDLE_CODE(pack_enum(bref, size_subch_r14)); + HANDLE_CODE(pack_enum(bref, num_subch_r14)); + HANDLE_CODE(pack_unalign_integer(bref, start_rb_subch_r14, (uint8_t)0, (uint8_t)99)); + if (start_rb_pscch_pool_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, start_rb_pscch_pool_r14, (uint8_t)0, (uint8_t)99)); + } + if (rx_params_ncell_r14_present) { + HANDLE_CODE(bref.pack(rx_params_ncell_r14.tdd_cfg_r14_present, 1)); + if (rx_params_ncell_r14.tdd_cfg_r14_present) { + HANDLE_CODE(rx_params_ncell_r14.tdd_cfg_r14.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, rx_params_ncell_r14.sync_cfg_idx_r14, (uint8_t)0, (uint8_t)15)); + } + if (data_tx_params_r14_present) { + HANDLE_CODE(data_tx_params_r14.pack(bref)); + } + if (zone_id_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, zone_id_r14, (uint8_t)0, (uint8_t)7)); + } + if (thresh_s_rssi_cbr_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_s_rssi_cbr_r14, (uint8_t)0, (uint8_t)45)); + } + if (pool_report_id_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, pool_report_id_r14, (uint8_t)1, (uint8_t)72)); + } + if (cbr_pssch_tx_cfg_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cbr_pssch_tx_cfg_list_r14, 1, 8)); + } + if (res_sel_cfg_p2_x_r14_present) { + HANDLE_CODE(res_sel_cfg_p2_x_r14.pack(bref)); + } + if (sync_allowed_r14_present) { + HANDLE_CODE(sync_allowed_r14.pack(bref)); + } + if (restrict_res_reserv_period_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, restrict_res_reserv_period_r14, 1, 16, EnumPacker())); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(sl_min_t2_value_list_r15_present != (sl_min_t2_value_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= sl_min_t2_value_list_r15_present; + rrc_asn1_warn_assert(cbr_pssch_tx_cfg_list_v1530_present != (cbr_pssch_tx_cfg_list_v1530.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= cbr_pssch_tx_cfg_list_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sl_min_t2_value_list_r15_present, 1)); + HANDLE_CODE(bref.pack(cbr_pssch_tx_cfg_list_v1530_present, 1)); + if (sl_min_t2_value_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sl_min_t2_value_list_r15, 1, 8)); + } + if (cbr_pssch_tx_cfg_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cbr_pssch_tx_cfg_list_v1530, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_res_pool_v2x_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_offset_ind_r14_present, 1)); + HANDLE_CODE(bref.unpack(start_rb_pscch_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(rx_params_ncell_r14_present, 1)); + HANDLE_CODE(bref.unpack(data_tx_params_r14_present, 1)); + HANDLE_CODE(bref.unpack(zone_id_r14_present, 1)); + HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r14_present, 1)); + HANDLE_CODE(bref.unpack(pool_report_id_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_pssch_tx_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(res_sel_cfg_p2_x_r14_present, 1)); + HANDLE_CODE(bref.unpack(sync_allowed_r14_present, 1)); + HANDLE_CODE(bref.unpack(restrict_res_reserv_period_r14_present, 1)); + + if (sl_offset_ind_r14_present) { + HANDLE_CODE(sl_offset_ind_r14.unpack(bref)); + } + HANDLE_CODE(sl_sf_r14.unpack(bref)); + HANDLE_CODE(bref.unpack(adjacency_pscch_pssch_r14, 1)); + HANDLE_CODE(unpack_enum(size_subch_r14, bref)); + HANDLE_CODE(unpack_enum(num_subch_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(start_rb_subch_r14, bref, (uint8_t)0, (uint8_t)99)); + if (start_rb_pscch_pool_r14_present) { + HANDLE_CODE(unpack_unalign_integer(start_rb_pscch_pool_r14, bref, (uint8_t)0, (uint8_t)99)); + } + if (rx_params_ncell_r14_present) { + HANDLE_CODE(bref.unpack(rx_params_ncell_r14.tdd_cfg_r14_present, 1)); + if (rx_params_ncell_r14.tdd_cfg_r14_present) { + HANDLE_CODE(rx_params_ncell_r14.tdd_cfg_r14.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(rx_params_ncell_r14.sync_cfg_idx_r14, bref, (uint8_t)0, (uint8_t)15)); + } + if (data_tx_params_r14_present) { + HANDLE_CODE(data_tx_params_r14.unpack(bref)); + } + if (zone_id_r14_present) { + HANDLE_CODE(unpack_unalign_integer(zone_id_r14, bref, (uint8_t)0, (uint8_t)7)); + } + if (thresh_s_rssi_cbr_r14_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_s_rssi_cbr_r14, bref, (uint8_t)0, (uint8_t)45)); + } + if (pool_report_id_r14_present) { + HANDLE_CODE(unpack_unalign_integer(pool_report_id_r14, bref, (uint8_t)1, (uint8_t)72)); + } + if (cbr_pssch_tx_cfg_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(cbr_pssch_tx_cfg_list_r14, bref, 1, 8)); + } + if (res_sel_cfg_p2_x_r14_present) { + HANDLE_CODE(res_sel_cfg_p2_x_r14.unpack(bref)); + } + if (sync_allowed_r14_present) { + HANDLE_CODE(sync_allowed_r14.unpack(bref)); + } + if (restrict_res_reserv_period_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(restrict_res_reserv_period_r14, bref, 1, 16, EnumPacker())); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sl_min_t2_value_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(cbr_pssch_tx_cfg_list_v1530_present, 1)); + if (sl_min_t2_value_list_r15_present) { + sl_min_t2_value_list_r15 = make_copy_ptr(sl_min_t2_value_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*sl_min_t2_value_list_r15, bref, 1, 8)); + } + if (cbr_pssch_tx_cfg_list_v1530_present) { + cbr_pssch_tx_cfg_list_v1530 = make_copy_ptr(sl_cbr_pppp_tx_cfg_list_v1530_l()); + HANDLE_CODE(unpack_dyn_seq_of(*cbr_pssch_tx_cfg_list_v1530, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_comm_res_pool_v2x_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_offset_ind_r14_present) { + j.write_fieldname("sl-OffsetIndicator-r14"); + sl_offset_ind_r14.to_json(j); + } + j.write_fieldname("sl-Subframe-r14"); + sl_sf_r14.to_json(j); + j.write_bool("adjacencyPSCCH-PSSCH-r14", adjacency_pscch_pssch_r14); + j.write_str("sizeSubchannel-r14", size_subch_r14.to_string()); + j.write_str("numSubchannel-r14", num_subch_r14.to_string()); + j.write_int("startRB-Subchannel-r14", start_rb_subch_r14); + if (start_rb_pscch_pool_r14_present) { + j.write_int("startRB-PSCCH-Pool-r14", start_rb_pscch_pool_r14); + } + if (rx_params_ncell_r14_present) { + j.write_fieldname("rxParametersNCell-r14"); + j.start_obj(); + if (rx_params_ncell_r14.tdd_cfg_r14_present) { + j.write_fieldname("tdd-Config-r14"); + rx_params_ncell_r14.tdd_cfg_r14.to_json(j); + } + j.write_int("syncConfigIndex-r14", rx_params_ncell_r14.sync_cfg_idx_r14); + j.end_obj(); + } + if (data_tx_params_r14_present) { + j.write_fieldname("dataTxParameters-r14"); + data_tx_params_r14.to_json(j); + } + if (zone_id_r14_present) { + j.write_int("zoneID-r14", zone_id_r14); + } + if (thresh_s_rssi_cbr_r14_present) { + j.write_int("threshS-RSSI-CBR-r14", thresh_s_rssi_cbr_r14); + } + if (pool_report_id_r14_present) { + j.write_int("poolReportId-r14", pool_report_id_r14); + } + if (cbr_pssch_tx_cfg_list_r14_present) { + j.start_array("cbr-pssch-TxConfigList-r14"); + for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_r14.size(); ++i1) { + cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (res_sel_cfg_p2_x_r14_present) { + j.write_fieldname("resourceSelectionConfigP2X-r14"); + res_sel_cfg_p2_x_r14.to_json(j); + } + if (sync_allowed_r14_present) { + j.write_fieldname("syncAllowed-r14"); + sync_allowed_r14.to_json(j); + } + if (restrict_res_reserv_period_r14_present) { + j.start_array("restrictResourceReservationPeriod-r14"); + for (uint32_t i1 = 0; i1 < restrict_res_reserv_period_r14.size(); ++i1) { + j.write_str(restrict_res_reserv_period_r14[i1].to_string()); + } + j.end_array(); + } + if (sl_min_t2_value_list_r15_present) { + j.start_array("sl-MinT2ValueList-r15"); + for (uint32_t i1 = 0; i1 < sl_min_t2_value_list_r15->size(); ++i1) { + ((*sl_min_t2_value_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (cbr_pssch_tx_cfg_list_v1530_present) { + j.start_array("cbr-pssch-TxConfigList-v1530"); + for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_v1530->size(); ++i1) { + ((*cbr_pssch_tx_cfg_list_v1530)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +sl_comm_res_pool_v2x_r14_s::rx_params_ncell_r14_s_::rx_params_ncell_r14_s_() +{ + tdd_cfg_r14_present = false; +} + +// SL-PoolSelectionConfig-r12 ::= SEQUENCE +SRSASN_CODE sl_pool_sel_cfg_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, thresh_low_r12, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_high_r12, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pool_sel_cfg_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(thresh_low_r12, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(thresh_high_r12, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void sl_pool_sel_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("threshLow-r12", thresh_low_r12); + j.write_int("threshHigh-r12", thresh_high_r12); + j.end_obj(); +} + +// SL-SyncConfigNFreq-r13 ::= SEQUENCE +sl_sync_cfg_nfreq_r13_s::sl_sync_cfg_nfreq_r13_s() +{ + ext = false; + async_params_r13_present = false; + tx_params_r13_present = false; + rx_params_r13_present = false; + sync_offset_ind_v1430_present = false; + gnss_sync_r14_present = false; + sync_offset_ind2_r14_present = false; + sync_offset_ind3_r14_present = false; + slss_tx_disabled_r15_present = false; +} +SRSASN_CODE sl_sync_cfg_nfreq_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(async_params_r13_present, 1)); + HANDLE_CODE(bref.pack(tx_params_r13_present, 1)); + HANDLE_CODE(bref.pack(rx_params_r13_present, 1)); + + if (async_params_r13_present) { + HANDLE_CODE(pack_enum(bref, async_params_r13.sync_cp_len_r13)); + HANDLE_CODE(pack_unalign_integer(bref, async_params_r13.sync_offset_ind_r13, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(pack_unalign_integer(bref, async_params_r13.slssid_r13, (uint8_t)0, (uint8_t)167)); + } + if (tx_params_r13_present) { + HANDLE_CODE(bref.pack(tx_params_r13.sync_info_reserved_r13_present, 1)); + HANDLE_CODE(bref.pack(tx_params_r13.sync_tx_periodic_r13_present, 1)); + HANDLE_CODE(tx_params_r13.sync_tx_params_r13.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, tx_params_r13.sync_tx_thresh_ic_r13, (uint8_t)0, (uint8_t)13)); + if (tx_params_r13.sync_info_reserved_r13_present) { + HANDLE_CODE(tx_params_r13.sync_info_reserved_r13.pack(bref)); + } + } + if (rx_params_r13_present) { + HANDLE_CODE(pack_enum(bref, rx_params_r13.disc_sync_win_r13)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags[0] |= sync_offset_ind_v1430_present; + group_flags[0] |= gnss_sync_r14_present; + group_flags[1] |= sync_offset_ind2_r14_present; + group_flags[1] |= sync_offset_ind3_r14_present; + group_flags[2] |= slss_tx_disabled_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sync_offset_ind_v1430_present, 1)); + HANDLE_CODE(bref.pack(gnss_sync_r14_present, 1)); + if (sync_offset_ind_v1430_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind_v1430, (uint8_t)40, (uint8_t)159)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sync_offset_ind2_r14_present, 1)); + HANDLE_CODE(bref.pack(sync_offset_ind3_r14_present, 1)); + if (sync_offset_ind2_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind2_r14, (uint8_t)0, (uint8_t)159)); + } + if (sync_offset_ind3_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind3_r14, (uint8_t)0, (uint8_t)159)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(slss_tx_disabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_sync_cfg_nfreq_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(async_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(tx_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(rx_params_r13_present, 1)); + + if (async_params_r13_present) { + HANDLE_CODE(unpack_enum(async_params_r13.sync_cp_len_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(async_params_r13.sync_offset_ind_r13, bref, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(unpack_unalign_integer(async_params_r13.slssid_r13, bref, (uint8_t)0, (uint8_t)167)); + } + if (tx_params_r13_present) { + HANDLE_CODE(bref.unpack(tx_params_r13.sync_info_reserved_r13_present, 1)); + HANDLE_CODE(bref.unpack(tx_params_r13.sync_tx_periodic_r13_present, 1)); + HANDLE_CODE(tx_params_r13.sync_tx_params_r13.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(tx_params_r13.sync_tx_thresh_ic_r13, bref, (uint8_t)0, (uint8_t)13)); + if (tx_params_r13.sync_info_reserved_r13_present) { + HANDLE_CODE(tx_params_r13.sync_info_reserved_r13.unpack(bref)); + } + } + if (rx_params_r13_present) { + HANDLE_CODE(unpack_enum(rx_params_r13.disc_sync_win_r13, bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sync_offset_ind_v1430_present, 1)); + HANDLE_CODE(bref.unpack(gnss_sync_r14_present, 1)); + if (sync_offset_ind_v1430_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind_v1430, bref, (uint8_t)40, (uint8_t)159)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sync_offset_ind2_r14_present, 1)); + HANDLE_CODE(bref.unpack(sync_offset_ind3_r14_present, 1)); + if (sync_offset_ind2_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind2_r14, bref, (uint8_t)0, (uint8_t)159)); + } + if (sync_offset_ind3_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind3_r14, bref, (uint8_t)0, (uint8_t)159)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(slss_tx_disabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sl_sync_cfg_nfreq_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (async_params_r13_present) { + j.write_fieldname("asyncParameters-r13"); + j.start_obj(); + j.write_str("syncCP-Len-r13", async_params_r13.sync_cp_len_r13.to_string()); + j.write_int("syncOffsetIndicator-r13", async_params_r13.sync_offset_ind_r13); + j.write_int("slssid-r13", async_params_r13.slssid_r13); + j.end_obj(); + } + if (tx_params_r13_present) { + j.write_fieldname("txParameters-r13"); + j.start_obj(); + j.write_fieldname("syncTxParameters-r13"); + tx_params_r13.sync_tx_params_r13.to_json(j); + j.write_int("syncTxThreshIC-r13", tx_params_r13.sync_tx_thresh_ic_r13); + if (tx_params_r13.sync_info_reserved_r13_present) { + j.write_str("syncInfoReserved-r13", tx_params_r13.sync_info_reserved_r13.to_string()); + } + if (tx_params_r13.sync_tx_periodic_r13_present) { + j.write_str("syncTxPeriodic-r13", "true"); + } + j.end_obj(); + } + if (rx_params_r13_present) { + j.write_fieldname("rxParameters-r13"); + j.start_obj(); + j.write_str("discSyncWindow-r13", rx_params_r13.disc_sync_win_r13.to_string()); + j.end_obj(); + } + if (sync_offset_ind_v1430_present) { + j.write_int("syncOffsetIndicator-v1430", sync_offset_ind_v1430); + } + if (gnss_sync_r14_present) { + j.write_str("gnss-Sync-r14", "true"); + } + if (sync_offset_ind2_r14_present) { + j.write_int("syncOffsetIndicator2-r14", sync_offset_ind2_r14); + } + if (sync_offset_ind3_r14_present) { + j.write_int("syncOffsetIndicator3-r14", sync_offset_ind3_r14); + } + if (slss_tx_disabled_r15_present) { + j.write_str("slss-TxDisabled-r15", "true"); + } + j.end_obj(); +} + +sl_sync_cfg_nfreq_r13_s::tx_params_r13_s_::tx_params_r13_s_() +{ + sync_info_reserved_r13_present = false; + sync_tx_periodic_r13_present = false; +} + +// SL-TF-ResourceConfig-r12 ::= SEQUENCE +SRSASN_CODE sl_tf_res_cfg_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, prb_num_r12, (uint8_t)1, (uint8_t)100)); + HANDLE_CODE(pack_unalign_integer(bref, prb_start_r12, (uint8_t)0, (uint8_t)99)); + HANDLE_CODE(pack_unalign_integer(bref, prb_end_r12, (uint8_t)0, (uint8_t)99)); + HANDLE_CODE(offset_ind_r12.pack(bref)); + HANDLE_CODE(sf_bitmap_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tf_res_cfg_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(prb_num_r12, bref, (uint8_t)1, (uint8_t)100)); + HANDLE_CODE(unpack_unalign_integer(prb_start_r12, bref, (uint8_t)0, (uint8_t)99)); + HANDLE_CODE(unpack_unalign_integer(prb_end_r12, bref, (uint8_t)0, (uint8_t)99)); + HANDLE_CODE(offset_ind_r12.unpack(bref)); + HANDLE_CODE(sf_bitmap_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_tf_res_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("prb-Num-r12", prb_num_r12); + j.write_int("prb-Start-r12", prb_start_r12); + j.write_int("prb-End-r12", prb_end_r12); + j.write_fieldname("offsetIndicator-r12"); + offset_ind_r12.to_json(j); + j.write_fieldname("subframeBitmap-r12"); + sf_bitmap_r12.to_json(j); + j.end_obj(); +} + +// SystemInformationBlockType1-v1430-IEs ::= SEQUENCE +sib_type1_v1430_ies_s::sib_type1_v1430_ies_s() +{ + e_call_over_ims_support_r14_present = false; + tdd_cfg_v1430_present = false; + cell_access_related_info_list_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_call_over_ims_support_r14_present, 1)); + HANDLE_CODE(bref.pack(tdd_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(cell_access_related_info_list_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (tdd_cfg_v1430_present) { + HANDLE_CODE(tdd_cfg_v1430.pack(bref)); + } + if (cell_access_related_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cell_access_related_info_list_r14, 1, 5)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_call_over_ims_support_r14_present, 1)); + HANDLE_CODE(bref.unpack(tdd_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(cell_access_related_info_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (tdd_cfg_v1430_present) { + HANDLE_CODE(tdd_cfg_v1430.unpack(bref)); + } + if (cell_access_related_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(cell_access_related_info_list_r14, bref, 1, 5)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (e_call_over_ims_support_r14_present) { + j.write_str("eCallOverIMS-Support-r14", "true"); + } + if (tdd_cfg_v1430_present) { + j.write_fieldname("tdd-Config-v1430"); + tdd_cfg_v1430.to_json(j); + } + if (cell_access_related_info_list_r14_present) { + j.start_array("cellAccessRelatedInfoList-r14"); + for (uint32_t i1 = 0; i1 < cell_access_related_info_list_r14.size(); ++i1) { + cell_access_related_info_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// TDD-Config-v1130 ::= SEQUENCE +SRSASN_CODE tdd_cfg_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, special_sf_patterns_v1130)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_cfg_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(special_sf_patterns_v1130, bref)); + + return SRSASN_SUCCESS; +} +void tdd_cfg_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("specialSubframePatterns-v1130", special_sf_patterns_v1130.to_string()); + j.end_obj(); +} + +// BandClassInfoCDMA2000 ::= SEQUENCE +band_class_info_cdma2000_s::band_class_info_cdma2000_s() +{ + ext = false; + cell_resel_prio_present = false; +} +SRSASN_CODE band_class_info_cdma2000_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); + + HANDLE_CODE(pack_enum(bref, band_class)); + if (cell_resel_prio_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_class_info_cdma2000_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); + + HANDLE_CODE(unpack_enum(band_class, bref)); + if (cell_resel_prio_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low, bref, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +void band_class_info_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bandClass", band_class.to_string()); + if (cell_resel_prio_present) { + j.write_int("cellReselectionPriority", cell_resel_prio); + } + j.write_int("threshX-High", thresh_x_high); + j.write_int("threshX-Low", thresh_x_low); + j.end_obj(); +} + +// CellSelectionInfoCE1-r13 ::= SEQUENCE +cell_sel_info_ce1_r13_s::cell_sel_info_ce1_r13_s() +{ + q_qual_min_rsrq_ce1_r13_present = false; +} +SRSASN_CODE cell_sel_info_ce1_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(q_qual_min_rsrq_ce1_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_ce1_r13, (int8_t)-70, (int8_t)-22)); + if (q_qual_min_rsrq_ce1_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_rsrq_ce1_r13, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_ce1_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(q_qual_min_rsrq_ce1_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_ce1_r13, bref, (int8_t)-70, (int8_t)-22)); + if (q_qual_min_rsrq_ce1_r13_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_rsrq_ce1_r13, bref, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +void cell_sel_info_ce1_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-RxLevMinCE1-r13", q_rx_lev_min_ce1_r13); + if (q_qual_min_rsrq_ce1_r13_present) { + j.write_int("q-QualMinRSRQ-CE1-r13", q_qual_min_rsrq_ce1_r13); + } + j.end_obj(); +} + +// NeighCellsPerBandclassCDMA2000-r11 ::= SEQUENCE +SRSASN_CODE neigh_cells_per_bandclass_cdma2000_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, arfcn, (uint16_t)0, (uint16_t)2047)); + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_r11, 1, 40, UnalignedIntegerPacker(0, 511))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_per_bandclass_cdma2000_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(arfcn, bref, (uint16_t)0, (uint16_t)2047)); + HANDLE_CODE(unpack_dyn_seq_of(pci_list_r11, bref, 1, 40, UnalignedIntegerPacker(0, 511))); + + return SRSASN_SUCCESS; +} +void neigh_cells_per_bandclass_cdma2000_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("arfcn", arfcn); + j.start_array("physCellIdList-r11"); + for (uint32_t i1 = 0; i1 < pci_list_r11.size(); ++i1) { + j.write_int(pci_list_r11[i1]); + } + j.end_array(); + j.end_obj(); +} + +// SL-CommTxPoolSensingConfig-r14 ::= SEQUENCE +sl_comm_tx_pool_sensing_cfg_r14_s::sl_comm_tx_pool_sensing_cfg_r14_s() +{ + restrict_res_reserv_period_r14_present = false; + p2x_sensing_cfg_r14_present = false; + sl_reselect_after_r14_present = false; +} +SRSASN_CODE sl_comm_tx_pool_sensing_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(restrict_res_reserv_period_r14_present, 1)); + HANDLE_CODE(bref.pack(p2x_sensing_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(sl_reselect_after_r14_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, pssch_tx_cfg_list_r14, 1, 16)); + HANDLE_CODE(pack_fixed_seq_of(bref, &(*thres_pssch_rsrp_list_r14)[0], thres_pssch_rsrp_list_r14->size(), + UnalignedIntegerPacker(0, 66))); + if (restrict_res_reserv_period_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, restrict_res_reserv_period_r14, 1, 16, EnumPacker())); + } + HANDLE_CODE(pack_enum(bref, prob_res_keep_r14)); + if (p2x_sensing_cfg_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, p2x_sensing_cfg_r14.min_num_candidate_sf_r14, (uint8_t)1, (uint8_t)13)); + HANDLE_CODE(p2x_sensing_cfg_r14.gap_candidate_sensing_r14.pack(bref)); + } + if (sl_reselect_after_r14_present) { + HANDLE_CODE(pack_enum(bref, sl_reselect_after_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_tx_pool_sensing_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(restrict_res_reserv_period_r14_present, 1)); + HANDLE_CODE(bref.unpack(p2x_sensing_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(sl_reselect_after_r14_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(pssch_tx_cfg_list_r14, bref, 1, 16)); + thres_pssch_rsrp_list_r14 = make_copy_ptr(sl_thres_pssch_rsrp_list_r14_l()); + HANDLE_CODE(unpack_fixed_seq_of(&(*thres_pssch_rsrp_list_r14)[0], bref, thres_pssch_rsrp_list_r14->size(), + UnalignedIntegerPacker(0, 66))); + if (restrict_res_reserv_period_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(restrict_res_reserv_period_r14, bref, 1, 16, EnumPacker())); + } + HANDLE_CODE(unpack_enum(prob_res_keep_r14, bref)); + if (p2x_sensing_cfg_r14_present) { + HANDLE_CODE(unpack_unalign_integer(p2x_sensing_cfg_r14.min_num_candidate_sf_r14, bref, (uint8_t)1, (uint8_t)13)); + HANDLE_CODE(p2x_sensing_cfg_r14.gap_candidate_sensing_r14.unpack(bref)); + } + if (sl_reselect_after_r14_present) { + HANDLE_CODE(unpack_enum(sl_reselect_after_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void sl_comm_tx_pool_sensing_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("pssch-TxConfigList-r14"); + for (uint32_t i1 = 0; i1 < pssch_tx_cfg_list_r14.size(); ++i1) { + pssch_tx_cfg_list_r14[i1].to_json(j); + } + j.end_array(); + j.start_array("thresPSSCH-RSRP-List-r14"); + for (uint32_t i1 = 0; i1 < thres_pssch_rsrp_list_r14->size(); ++i1) { + j.write_int(((*thres_pssch_rsrp_list_r14)[i1])); + } + j.end_array(); + if (restrict_res_reserv_period_r14_present) { + j.start_array("restrictResourceReservationPeriod-r14"); + for (uint32_t i1 = 0; i1 < restrict_res_reserv_period_r14.size(); ++i1) { + j.write_str(restrict_res_reserv_period_r14[i1].to_string()); + } + j.end_array(); + } + j.write_str("probResourceKeep-r14", prob_res_keep_r14.to_string()); + if (p2x_sensing_cfg_r14_present) { + j.write_fieldname("p2x-SensingConfig-r14"); + j.start_obj(); + j.write_int("minNumCandidateSF-r14", p2x_sensing_cfg_r14.min_num_candidate_sf_r14); + j.write_str("gapCandidateSensing-r14", p2x_sensing_cfg_r14.gap_candidate_sensing_r14.to_string()); + j.end_obj(); + } + if (sl_reselect_after_r14_present) { + j.write_str("sl-ReselectAfter-r14", sl_reselect_after_r14.to_string()); + } + j.end_obj(); +} + +// SL-DiscResourcePool-r12 ::= SEQUENCE +sl_disc_res_pool_r12_s::sl_disc_res_pool_r12_s() +{ + ext = false; + tx_params_r12_present = false; + rx_params_r12_present = false; + disc_period_v1310_present = false; + rx_params_add_neigh_freq_r13_present = false; + tx_params_add_neigh_freq_r13_present = false; + tx_params_add_neigh_freq_v1370_present = false; +} +SRSASN_CODE sl_disc_res_pool_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tx_params_r12_present, 1)); + HANDLE_CODE(bref.pack(rx_params_r12_present, 1)); + + HANDLE_CODE(pack_enum(bref, cp_len_r12)); + HANDLE_CODE(pack_enum(bref, disc_period_r12)); + HANDLE_CODE(pack_unalign_integer(bref, num_retx_r12, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, num_repeat_r12, (uint8_t)1, (uint8_t)50)); + HANDLE_CODE(tf_res_cfg_r12.pack(bref)); + if (tx_params_r12_present) { + HANDLE_CODE(bref.pack(tx_params_r12.ue_sel_res_cfg_r12_present, 1)); + HANDLE_CODE(tx_params_r12.tx_params_general_r12.pack(bref)); + if (tx_params_r12.ue_sel_res_cfg_r12_present) { + HANDLE_CODE(tx_params_r12.ue_sel_res_cfg_r12.pool_sel_r12.pack(bref)); + HANDLE_CODE(pack_enum(bref, tx_params_r12.ue_sel_res_cfg_r12.tx_probability_r12)); + } + } + if (rx_params_r12_present) { + HANDLE_CODE(bref.pack(rx_params_r12.tdd_cfg_r12_present, 1)); + if (rx_params_r12.tdd_cfg_r12_present) { + HANDLE_CODE(rx_params_r12.tdd_cfg_r12.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, rx_params_r12.sync_cfg_idx_r12, (uint8_t)0, (uint8_t)15)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(disc_period_v1310_present != (disc_period_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= disc_period_v1310_present; + rrc_asn1_warn_assert(rx_params_add_neigh_freq_r13_present != (rx_params_add_neigh_freq_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= rx_params_add_neigh_freq_r13_present; + rrc_asn1_warn_assert(tx_params_add_neigh_freq_r13_present != (tx_params_add_neigh_freq_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= tx_params_add_neigh_freq_r13_present; + rrc_asn1_warn_assert(tx_params_add_neigh_freq_v1370_present != (tx_params_add_neigh_freq_v1370.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= tx_params_add_neigh_freq_v1370_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(disc_period_v1310_present, 1)); + HANDLE_CODE(bref.pack(rx_params_add_neigh_freq_r13_present, 1)); + HANDLE_CODE(bref.pack(tx_params_add_neigh_freq_r13_present, 1)); + if (disc_period_v1310_present) { + HANDLE_CODE(disc_period_v1310->pack(bref)); + } + if (rx_params_add_neigh_freq_r13_present) { + HANDLE_CODE(rx_params_add_neigh_freq_r13->pack(bref)); + } + if (tx_params_add_neigh_freq_r13_present) { + HANDLE_CODE(tx_params_add_neigh_freq_r13->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(tx_params_add_neigh_freq_v1370_present, 1)); + if (tx_params_add_neigh_freq_v1370_present) { + HANDLE_CODE(tx_params_add_neigh_freq_v1370->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_res_pool_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(tx_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(rx_params_r12_present, 1)); + + HANDLE_CODE(unpack_enum(cp_len_r12, bref)); + HANDLE_CODE(unpack_enum(disc_period_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(num_retx_r12, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(num_repeat_r12, bref, (uint8_t)1, (uint8_t)50)); + HANDLE_CODE(tf_res_cfg_r12.unpack(bref)); + if (tx_params_r12_present) { + HANDLE_CODE(bref.unpack(tx_params_r12.ue_sel_res_cfg_r12_present, 1)); + HANDLE_CODE(tx_params_r12.tx_params_general_r12.unpack(bref)); + if (tx_params_r12.ue_sel_res_cfg_r12_present) { + HANDLE_CODE(tx_params_r12.ue_sel_res_cfg_r12.pool_sel_r12.unpack(bref)); + HANDLE_CODE(unpack_enum(tx_params_r12.ue_sel_res_cfg_r12.tx_probability_r12, bref)); + } + } + if (rx_params_r12_present) { + HANDLE_CODE(bref.unpack(rx_params_r12.tdd_cfg_r12_present, 1)); + if (rx_params_r12.tdd_cfg_r12_present) { + HANDLE_CODE(rx_params_r12.tdd_cfg_r12.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(rx_params_r12.sync_cfg_idx_r12, bref, (uint8_t)0, (uint8_t)15)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(disc_period_v1310_present, 1)); + HANDLE_CODE(bref.unpack(rx_params_add_neigh_freq_r13_present, 1)); + HANDLE_CODE(bref.unpack(tx_params_add_neigh_freq_r13_present, 1)); + if (disc_period_v1310_present) { + disc_period_v1310 = make_copy_ptr(disc_period_v1310_c_()); + HANDLE_CODE(disc_period_v1310->unpack(bref)); + } + if (rx_params_add_neigh_freq_r13_present) { + rx_params_add_neigh_freq_r13 = make_copy_ptr(rx_params_add_neigh_freq_r13_c_()); + HANDLE_CODE(rx_params_add_neigh_freq_r13->unpack(bref)); + } + if (tx_params_add_neigh_freq_r13_present) { + tx_params_add_neigh_freq_r13 = make_copy_ptr(tx_params_add_neigh_freq_r13_c_()); + HANDLE_CODE(tx_params_add_neigh_freq_r13->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(tx_params_add_neigh_freq_v1370_present, 1)); + if (tx_params_add_neigh_freq_v1370_present) { + tx_params_add_neigh_freq_v1370 = make_copy_ptr(tx_params_add_neigh_freq_v1370_c_()); + HANDLE_CODE(tx_params_add_neigh_freq_v1370->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_disc_res_pool_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cp-Len-r12", cp_len_r12.to_string()); + j.write_str("discPeriod-r12", disc_period_r12.to_string()); + j.write_int("numRetx-r12", num_retx_r12); + j.write_int("numRepetition-r12", num_repeat_r12); + j.write_fieldname("tf-ResourceConfig-r12"); + tf_res_cfg_r12.to_json(j); + if (tx_params_r12_present) { + j.write_fieldname("txParameters-r12"); + j.start_obj(); + j.write_fieldname("txParametersGeneral-r12"); + tx_params_r12.tx_params_general_r12.to_json(j); + if (tx_params_r12.ue_sel_res_cfg_r12_present) { + j.write_fieldname("ue-SelectedResourceConfig-r12"); + j.start_obj(); + j.write_fieldname("poolSelection-r12"); + tx_params_r12.ue_sel_res_cfg_r12.pool_sel_r12.to_json(j); + j.write_str("txProbability-r12", tx_params_r12.ue_sel_res_cfg_r12.tx_probability_r12.to_string()); + j.end_obj(); + } + j.end_obj(); + } + if (rx_params_r12_present) { + j.write_fieldname("rxParameters-r12"); + j.start_obj(); + if (rx_params_r12.tdd_cfg_r12_present) { + j.write_fieldname("tdd-Config-r12"); + rx_params_r12.tdd_cfg_r12.to_json(j); + } + j.write_int("syncConfigIndex-r12", rx_params_r12.sync_cfg_idx_r12); + j.end_obj(); + } + if (disc_period_v1310_present) { + j.write_fieldname("discPeriod-v1310"); + disc_period_v1310->to_json(j); + } + if (rx_params_add_neigh_freq_r13_present) { + j.write_fieldname("rxParamsAddNeighFreq-r13"); + rx_params_add_neigh_freq_r13->to_json(j); + } + if (tx_params_add_neigh_freq_r13_present) { + j.write_fieldname("txParamsAddNeighFreq-r13"); + tx_params_add_neigh_freq_r13->to_json(j); + } + if (tx_params_add_neigh_freq_v1370_present) { + j.write_fieldname("txParamsAddNeighFreq-v1370"); + tx_params_add_neigh_freq_v1370->to_json(j); + } + j.end_obj(); +} + +sl_disc_res_pool_r12_s::tx_params_r12_s_::tx_params_r12_s_() +{ + ue_sel_res_cfg_r12_present = false; +} + +void sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rsrp_based_r12: + j.write_fieldname("rsrpBased-r12"); + c.to_json(j); + break; + case types::random_r12: + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rsrp_based_r12: + HANDLE_CODE(c.pack(bref)); + break; + case types::random_r12: + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rsrp_based_r12: + HANDLE_CODE(c.unpack(bref)); + break; + case types::random_r12: + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_disc_res_pool_r12_s::rx_params_r12_s_::rx_params_r12_s_() +{ + tdd_cfg_r12_present = false; +} + +void sl_disc_res_pool_r12_s::disc_period_v1310_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_res_pool_r12_s::disc_period_v1310_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::disc_period_v1310_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_res_pool_r12_s::disc_period_v1310_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::disc_period_v1310_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_res_pool_r12_s::disc_period_v1310_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::disc_period_v1310_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_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.start_array("physCellId-r13"); + for (uint32_t i1 = 0; i1 < c.pci_r13.size(); ++i1) { + j.write_int(c.pci_r13[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.pci_r13, 1, 16, UnalignedIntegerPacker(0, 503))); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.pci_r13, bref, 1, 16, UnalignedIntegerPacker(0, 503))); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_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.start_array("physCellId-r13"); + for (uint32_t i1 = 0; i1 < c.pci_r13.size(); ++i1) { + j.write_int(c.pci_r13[i1]); + } + j.end_array(); + if (c.p_max_present) { + j.write_int("p-Max", c.p_max); + } + if (c.tdd_cfg_r13_present) { + j.write_fieldname("tdd-Config-r13"); + c.tdd_cfg_r13.to_json(j); + } + if (c.tdd_cfg_v1130_present) { + j.write_fieldname("tdd-Config-v1130"); + c.tdd_cfg_v1130.to_json(j); + } + j.write_fieldname("freqInfo"); + j.start_obj(); + if (c.freq_info.ul_carrier_freq_present) { + j.write_int("ul-CarrierFreq", c.freq_info.ul_carrier_freq); + } + if (c.freq_info.ul_bw_present) { + j.write_str("ul-Bandwidth", c.freq_info.ul_bw.to_string()); + } + j.write_int("additionalSpectrumEmission", c.freq_info.add_spec_emission); + j.end_obj(); + j.write_int("referenceSignalPower", c.ref_sig_pwr); + if (c.sync_cfg_idx_r13_present) { + j.write_int("syncConfigIndex-r13", c.sync_cfg_idx_r13); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.p_max_present, 1)); + HANDLE_CODE(bref.pack(c.tdd_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(c.tdd_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(c.sync_cfg_idx_r13_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.pci_r13, 1, 16, UnalignedIntegerPacker(0, 503))); + if (c.p_max_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.p_max, (int8_t)-30, (int8_t)33)); + } + if (c.tdd_cfg_r13_present) { + HANDLE_CODE(c.tdd_cfg_r13.pack(bref)); + } + if (c.tdd_cfg_v1130_present) { + HANDLE_CODE(c.tdd_cfg_v1130.pack(bref)); + } + HANDLE_CODE(bref.pack(c.freq_info.ul_carrier_freq_present, 1)); + HANDLE_CODE(bref.pack(c.freq_info.ul_bw_present, 1)); + if (c.freq_info.ul_carrier_freq_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.freq_info.ul_carrier_freq, (uint16_t)0, (uint16_t)65535)); + } + if (c.freq_info.ul_bw_present) { + HANDLE_CODE(pack_enum(bref, c.freq_info.ul_bw)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.freq_info.add_spec_emission, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, c.ref_sig_pwr, (int8_t)-60, (int8_t)50)); + if (c.sync_cfg_idx_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sync_cfg_idx_r13, (uint8_t)0, (uint8_t)15)); + } + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.p_max_present, 1)); + HANDLE_CODE(bref.unpack(c.tdd_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.tdd_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(c.sync_cfg_idx_r13_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(c.pci_r13, bref, 1, 16, UnalignedIntegerPacker(0, 503))); + if (c.p_max_present) { + HANDLE_CODE(unpack_unalign_integer(c.p_max, bref, (int8_t)-30, (int8_t)33)); + } + if (c.tdd_cfg_r13_present) { + HANDLE_CODE(c.tdd_cfg_r13.unpack(bref)); + } + if (c.tdd_cfg_v1130_present) { + HANDLE_CODE(c.tdd_cfg_v1130.unpack(bref)); + } + HANDLE_CODE(bref.unpack(c.freq_info.ul_carrier_freq_present, 1)); + HANDLE_CODE(bref.unpack(c.freq_info.ul_bw_present, 1)); + if (c.freq_info.ul_carrier_freq_present) { + HANDLE_CODE(unpack_unalign_integer(c.freq_info.ul_carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + } + if (c.freq_info.ul_bw_present) { + HANDLE_CODE(unpack_enum(c.freq_info.ul_bw, bref)); + } + HANDLE_CODE(unpack_unalign_integer(c.freq_info.add_spec_emission, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(c.ref_sig_pwr, bref, (int8_t)-60, (int8_t)50)); + if (c.sync_cfg_idx_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.sync_cfg_idx_r13, bref, (uint8_t)0, (uint8_t)15)); + } + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::setup_s_() +{ + p_max_present = false; + tdd_cfg_r13_present = false; + tdd_cfg_v1130_present = false; + sync_cfg_idx_r13_present = false; +} + +sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::freq_info_s_() +{ + ul_carrier_freq_present = false; + ul_bw_present = false; +} + +void sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("freqInfo-v1370"); + j.start_obj(); + j.write_int("additionalSpectrumEmission-v1370", c.freq_info_v1370.add_spec_emission_v1370); + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.freq_info_v1370.add_spec_emission_v1370, (uint16_t)33, (uint16_t)288)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.freq_info_v1370.add_spec_emission_v1370, bref, (uint16_t)33, (uint16_t)288)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_v1370_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-ZoneConfig-r14 ::= SEQUENCE +SRSASN_CODE sl_zone_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, zone_len_r14)); + HANDLE_CODE(pack_enum(bref, zone_width_r14)); + HANDLE_CODE(pack_unalign_integer(bref, zone_id_longi_mod_r14, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_unalign_integer(bref, zone_id_lati_mod_r14, (uint8_t)1, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_zone_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(zone_len_r14, bref)); + HANDLE_CODE(unpack_enum(zone_width_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(zone_id_longi_mod_r14, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_unalign_integer(zone_id_lati_mod_r14, bref, (uint8_t)1, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +void sl_zone_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("zoneLength-r14", zone_len_r14.to_string()); + j.write_str("zoneWidth-r14", zone_width_r14.to_string()); + j.write_int("zoneIdLongiMod-r14", zone_id_longi_mod_r14); + j.write_int("zoneIdLatiMod-r14", zone_id_lati_mod_r14); + j.end_obj(); +} + +// SystemInformationBlockType1-v1360-IEs ::= SEQUENCE +sib_type1_v1360_ies_s::sib_type1_v1360_ies_s() +{ + cell_sel_info_ce1_v1360_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1360_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_sel_info_ce1_v1360_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cell_sel_info_ce1_v1360_present) { + HANDLE_CODE(cell_sel_info_ce1_v1360.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1360_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_sel_info_ce1_v1360_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cell_sel_info_ce1_v1360_present) { + HANDLE_CODE(cell_sel_info_ce1_v1360.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1360_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_sel_info_ce1_v1360_present) { + j.write_fieldname("cellSelectionInfoCE1-v1360"); + cell_sel_info_ce1_v1360.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v10l0 ::= SEQUENCE +inter_freq_carrier_freq_info_v10l0_s::inter_freq_carrier_freq_info_v10l0_s() +{ + freq_band_info_v10l0_present = false; + multi_band_info_list_v10l0_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v10l0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_info_v10l0_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10l0_present, 1)); + + if (freq_band_info_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_info_v10l0, 1, 8)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10l0, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v10l0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_info_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10l0_present, 1)); + + if (freq_band_info_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_info_v10l0, bref, 1, 8)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10l0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v10l0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_info_v10l0_present) { + j.start_array("freqBandInfo-v10l0"); + for (uint32_t i1 = 0; i1 < freq_band_info_v10l0.size(); ++i1) { + freq_band_info_v10l0[i1].to_json(j); + } + j.end_array(); + } + if (multi_band_info_list_v10l0_present) { + j.start_array("multiBandInfoList-v10l0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < multi_band_info_list_v10l0[i1].size(); ++i2) { + multi_band_info_list_v10l0[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + j.end_obj(); +} + +// MultiBandInfo-v9e0 ::= SEQUENCE +multi_band_info_v9e0_s::multi_band_info_v9e0_s() +{ + freq_band_ind_v9e0_present = false; +} +SRSASN_CODE multi_band_info_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_ind_v9e0_present, 1)); + + if (freq_band_ind_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_band_ind_v9e0, (uint16_t)65, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE multi_band_info_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_ind_v9e0_present, 1)); + + if (freq_band_ind_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(freq_band_ind_v9e0, bref, (uint16_t)65, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +void multi_band_info_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_ind_v9e0_present) { + j.write_int("freqBandIndicator-v9e0", freq_band_ind_v9e0); + } + j.end_obj(); +} + +// NeighCellCDMA2000-r11 ::= SEQUENCE +SRSASN_CODE neigh_cell_cdma2000_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, band_class)); + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_freq_info_list_r11, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_cdma2000_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(band_class, bref)); + HANDLE_CODE(unpack_dyn_seq_of(neigh_freq_info_list_r11, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void neigh_cell_cdma2000_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bandClass", band_class.to_string()); + j.start_array("neighFreqInfoList-r11"); + for (uint32_t i1 = 0; i1 < neigh_freq_info_list_r11.size(); ++i1) { + neigh_freq_info_list_r11[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// NeighCellsPerBandclassCDMA2000 ::= SEQUENCE +SRSASN_CODE neigh_cells_per_bandclass_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, arfcn, (uint16_t)0, (uint16_t)2047)); + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list, 1, 16, UnalignedIntegerPacker(0, 511))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_per_bandclass_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(arfcn, bref, (uint16_t)0, (uint16_t)2047)); + HANDLE_CODE(unpack_dyn_seq_of(pci_list, bref, 1, 16, UnalignedIntegerPacker(0, 511))); + + return SRSASN_SUCCESS; +} +void neigh_cells_per_bandclass_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("arfcn", arfcn); + j.start_array("physCellIdList"); + for (uint32_t i1 = 0; i1 < pci_list.size(); ++i1) { + j.write_int(pci_list[i1]); + } + j.end_array(); + j.end_obj(); +} + +// NeighCellsPerBandclassCDMA2000-v920 ::= SEQUENCE +SRSASN_CODE neigh_cells_per_bandclass_cdma2000_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_v920, 0, 24, UnalignedIntegerPacker(0, 511))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_per_bandclass_cdma2000_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(pci_list_v920, bref, 0, 24, UnalignedIntegerPacker(0, 511))); + + return SRSASN_SUCCESS; +} +void neigh_cells_per_bandclass_cdma2000_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("physCellIdList-v920"); + for (uint32_t i1 = 0; i1 < pci_list_v920.size(); ++i1) { + j.write_int(pci_list_v920[i1]); + } + j.end_array(); + j.end_obj(); +} + +// PhysCellIdRange ::= SEQUENCE +pci_range_s::pci_range_s() +{ + range_present = false; +} +SRSASN_CODE pci_range_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(range_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, start, (uint16_t)0, (uint16_t)503)); + if (range_present) { + HANDLE_CODE(pack_enum(bref, range)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_range_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(range_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(start, bref, (uint16_t)0, (uint16_t)503)); + if (range_present) { + HANDLE_CODE(unpack_enum(range, 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(); +} + +// RedistributionNeighCell-r13 ::= SEQUENCE +SRSASN_CODE redist_neigh_cell_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pci_r13, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, redist_factor_cell_r13, (uint8_t)1, (uint8_t)10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE redist_neigh_cell_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pci_r13, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(redist_factor_cell_r13, bref, (uint8_t)1, (uint8_t)10)); + + return SRSASN_SUCCESS; +} +void redist_neigh_cell_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r13", pci_r13); + j.write_int("redistributionFactorCell-r13", redist_factor_cell_r13); + j.end_obj(); +} + +// SL-DiscTxPowerInfo-r12 ::= SEQUENCE +sl_disc_tx_pwr_info_r12_s::sl_disc_tx_pwr_info_r12_s() +{ + ext = false; +} +SRSASN_CODE sl_disc_tx_pwr_info_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, disc_max_tx_pwr_r12, (int8_t)-30, (int8_t)33)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_pwr_info_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(disc_max_tx_pwr_r12, bref, (int8_t)-30, (int8_t)33)); + + return SRSASN_SUCCESS; +} +void sl_disc_tx_pwr_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("discMaxTxPower-r12", disc_max_tx_pwr_r12); + j.end_obj(); +} + +// SL-V2X-FreqSelectionConfig-r15 ::= SEQUENCE +sl_v2x_freq_sel_cfg_r15_s::sl_v2x_freq_sel_cfg_r15_s() +{ + thresh_cbr_freq_resel_r15_present = false; + thresh_cbr_freq_keeping_r15_present = false; +} +SRSASN_CODE sl_v2x_freq_sel_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(thresh_cbr_freq_resel_r15_present, 1)); + HANDLE_CODE(bref.pack(thresh_cbr_freq_keeping_r15_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, prio_list_r15, 1, 8, UnalignedIntegerPacker(1, 8))); + if (thresh_cbr_freq_resel_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_cbr_freq_resel_r15, (uint8_t)0, (uint8_t)100)); + } + if (thresh_cbr_freq_keeping_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_cbr_freq_keeping_r15, (uint8_t)0, (uint8_t)100)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_freq_sel_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(thresh_cbr_freq_resel_r15_present, 1)); + HANDLE_CODE(bref.unpack(thresh_cbr_freq_keeping_r15_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(prio_list_r15, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + if (thresh_cbr_freq_resel_r15_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_cbr_freq_resel_r15, bref, (uint8_t)0, (uint8_t)100)); + } + if (thresh_cbr_freq_keeping_r15_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_cbr_freq_keeping_r15, bref, (uint8_t)0, (uint8_t)100)); + } + + return SRSASN_SUCCESS; +} +void sl_v2x_freq_sel_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("priorityList-r15"); + for (uint32_t i1 = 0; i1 < prio_list_r15.size(); ++i1) { + j.write_int(prio_list_r15[i1]); + } + j.end_array(); + if (thresh_cbr_freq_resel_r15_present) { + j.write_int("threshCBR-FreqReselection-r15", thresh_cbr_freq_resel_r15); + } + if (thresh_cbr_freq_keeping_r15_present) { + j.write_int("threshCBR-FreqKeeping-r15", thresh_cbr_freq_keeping_r15); + } + j.end_obj(); +} + +// SL-V2X-InterFreqUE-Config-r14 ::= SEQUENCE +sl_v2x_inter_freq_ue_cfg_r14_s::sl_v2x_inter_freq_ue_cfg_r14_s() +{ + ext = false; + pci_list_r14_present = false; + type_tx_sync_r14_present = false; + v2x_sync_cfg_r14_present = false; + v2x_comm_rx_pool_r14_present = false; + v2x_comm_tx_pool_normal_r14_present = false; + p2x_comm_tx_pool_normal_r14_present = false; + v2x_comm_tx_pool_exceptional_r14_present = false; + v2x_res_sel_cfg_r14_present = false; + zone_cfg_r14_present = false; + offset_dfn_r14_present = false; +} +SRSASN_CODE sl_v2x_inter_freq_ue_cfg_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pci_list_r14_present, 1)); + HANDLE_CODE(bref.pack(type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_tx_pool_normal_r14_present, 1)); + HANDLE_CODE(bref.pack(p2x_comm_tx_pool_normal_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_res_sel_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(zone_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(offset_dfn_r14_present, 1)); + + if (pci_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_r14, 1, 16, UnalignedIntegerPacker(0, 503))); + } + if (type_tx_sync_r14_present) { + HANDLE_CODE(pack_enum(bref, type_tx_sync_r14)); + } + if (v2x_sync_cfg_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_sync_cfg_r14, 1, 16)); + } + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_rx_pool_r14, 1, 16)); + } + if (v2x_comm_tx_pool_normal_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_tx_pool_normal_r14, 1, 8)); + } + if (p2x_comm_tx_pool_normal_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p2x_comm_tx_pool_normal_r14, 1, 8)); + } + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.pack(bref)); + } + if (v2x_res_sel_cfg_r14_present) { + HANDLE_CODE(v2x_res_sel_cfg_r14.pack(bref)); + } + if (zone_cfg_r14_present) { + HANDLE_CODE(zone_cfg_r14.pack(bref)); + } + if (offset_dfn_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_dfn_r14, (uint16_t)0, (uint16_t)1000)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_inter_freq_ue_cfg_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pci_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_normal_r14_present, 1)); + HANDLE_CODE(bref.unpack(p2x_comm_tx_pool_normal_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_res_sel_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(zone_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(offset_dfn_r14_present, 1)); + + if (pci_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(pci_list_r14, bref, 1, 16, UnalignedIntegerPacker(0, 503))); + } + if (type_tx_sync_r14_present) { + HANDLE_CODE(unpack_enum(type_tx_sync_r14, bref)); + } + if (v2x_sync_cfg_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_sync_cfg_r14, bref, 1, 16)); + } + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_rx_pool_r14, bref, 1, 16)); + } + if (v2x_comm_tx_pool_normal_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_tx_pool_normal_r14, bref, 1, 8)); + } + if (p2x_comm_tx_pool_normal_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(p2x_comm_tx_pool_normal_r14, bref, 1, 8)); + } + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.unpack(bref)); + } + if (v2x_res_sel_cfg_r14_present) { + HANDLE_CODE(v2x_res_sel_cfg_r14.unpack(bref)); + } + if (zone_cfg_r14_present) { + HANDLE_CODE(zone_cfg_r14.unpack(bref)); + } + if (offset_dfn_r14_present) { + HANDLE_CODE(unpack_unalign_integer(offset_dfn_r14, bref, (uint16_t)0, (uint16_t)1000)); + } + + return SRSASN_SUCCESS; +} +void sl_v2x_inter_freq_ue_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pci_list_r14_present) { + j.start_array("physCellIdList-r14"); + for (uint32_t i1 = 0; i1 < pci_list_r14.size(); ++i1) { + j.write_int(pci_list_r14[i1]); + } + j.end_array(); + } + if (type_tx_sync_r14_present) { + j.write_str("typeTxSync-r14", type_tx_sync_r14.to_string()); + } + if (v2x_sync_cfg_r14_present) { + j.start_array("v2x-SyncConfig-r14"); + for (uint32_t i1 = 0; i1 < v2x_sync_cfg_r14.size(); ++i1) { + v2x_sync_cfg_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_comm_rx_pool_r14_present) { + j.start_array("v2x-CommRxPool-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_r14.size(); ++i1) { + v2x_comm_rx_pool_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_comm_tx_pool_normal_r14_present) { + j.start_array("v2x-CommTxPoolNormal-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_tx_pool_normal_r14.size(); ++i1) { + v2x_comm_tx_pool_normal_r14[i1].to_json(j); + } + j.end_array(); + } + if (p2x_comm_tx_pool_normal_r14_present) { + j.start_array("p2x-CommTxPoolNormal-r14"); + for (uint32_t i1 = 0; i1 < p2x_comm_tx_pool_normal_r14.size(); ++i1) { + p2x_comm_tx_pool_normal_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_comm_tx_pool_exceptional_r14_present) { + j.write_fieldname("v2x-CommTxPoolExceptional-r14"); + v2x_comm_tx_pool_exceptional_r14.to_json(j); + } + if (v2x_res_sel_cfg_r14_present) { + j.write_fieldname("v2x-ResourceSelectionConfig-r14"); + v2x_res_sel_cfg_r14.to_json(j); + } + if (zone_cfg_r14_present) { + j.write_fieldname("zoneConfig-r14"); + zone_cfg_r14.to_json(j); + } + if (offset_dfn_r14_present) { + j.write_int("offsetDFN-r14", offset_dfn_r14); + } + j.end_obj(); +} + +// SchedulingInfo-BR-r13 ::= SEQUENCE +SRSASN_CODE sched_info_br_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, si_nb_r13, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_enum(bref, si_tbs_r13)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info_br_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(si_nb_r13, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_enum(si_tbs_r13, bref)); + + return SRSASN_SUCCESS; +} +void sched_info_br_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("si-Narrowband-r13", si_nb_r13); + j.write_str("si-TBS-r13", si_tbs_r13.to_string()); + j.end_obj(); +} + +// SpeedStateScaleFactors ::= SEQUENCE +SRSASN_CODE speed_state_scale_factors_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sf_medium)); + HANDLE_CODE(pack_enum(bref, sf_high)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE speed_state_scale_factors_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sf_medium, bref)); + HANDLE_CODE(unpack_enum(sf_high, 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(); +} + +// SystemInformationBlockType1-v1350-IEs ::= SEQUENCE +sib_type1_v1350_ies_s::sib_type1_v1350_ies_s() +{ + cell_sel_info_ce1_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1350_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_sel_info_ce1_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cell_sel_info_ce1_r13_present) { + HANDLE_CODE(cell_sel_info_ce1_r13.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1350_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_sel_info_ce1_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cell_sel_info_ce1_r13_present) { + HANDLE_CODE(cell_sel_info_ce1_r13.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1350_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_sel_info_ce1_r13_present) { + j.write_fieldname("cellSelectionInfoCE1-r13"); + cell_sel_info_ce1_r13.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType5-v13a0-IEs ::= SEQUENCE +sib_type5_v13a0_ies_s::sib_type5_v13a0_ies_s() +{ + late_non_crit_ext_present = false; + inter_freq_carrier_freq_list_v13a0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type5_v13a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v13a0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (inter_freq_carrier_freq_list_v13a0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list_v13a0, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type5_v13a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v13a0_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 (inter_freq_carrier_freq_list_v13a0_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list_v13a0, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void sib_type5_v13a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (inter_freq_carrier_freq_list_v13a0_present) { + j.start_array("interFreqCarrierFreqList-v13a0"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v13a0.size(); ++i1) { + inter_freq_carrier_freq_list_v13a0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// AC-BarringConfig1XRTT-r9 ::= SEQUENCE +SRSASN_CODE ac_barr_cfg1_xrtt_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ac_barr0to9_r9, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr10_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr11_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr12_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr13_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr14_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr15_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr_msg_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr_reg_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, ac_barr_emg_r9, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ac_barr_cfg1_xrtt_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ac_barr0to9_r9, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(ac_barr10_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr11_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr12_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr13_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr14_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr15_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr_msg_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr_reg_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(ac_barr_emg_r9, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void ac_barr_cfg1_xrtt_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ac-Barring0to9-r9", ac_barr0to9_r9); + j.write_int("ac-Barring10-r9", ac_barr10_r9); + j.write_int("ac-Barring11-r9", ac_barr11_r9); + j.write_int("ac-Barring12-r9", ac_barr12_r9); + j.write_int("ac-Barring13-r9", ac_barr13_r9); + j.write_int("ac-Barring14-r9", ac_barr14_r9); + j.write_int("ac-Barring15-r9", ac_barr15_r9); + j.write_int("ac-BarringMsg-r9", ac_barr_msg_r9); + j.write_int("ac-BarringReg-r9", ac_barr_reg_r9); + j.write_int("ac-BarringEmg-r9", ac_barr_emg_r9); + j.end_obj(); +} + +// BarringPerACDC-Category-r13 ::= SEQUENCE +barr_per_acdc_category_r13_s::barr_per_acdc_category_r13_s() +{ + acdc_barr_cfg_r13_present = false; +} +SRSASN_CODE barr_per_acdc_category_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(acdc_barr_cfg_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, acdc_category_r13, (uint8_t)1, (uint8_t)16)); + if (acdc_barr_cfg_r13_present) { + HANDLE_CODE(pack_enum(bref, acdc_barr_cfg_r13.ac_barr_factor_r13)); + HANDLE_CODE(pack_enum(bref, acdc_barr_cfg_r13.ac_barr_time_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE barr_per_acdc_category_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(acdc_barr_cfg_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(acdc_category_r13, bref, (uint8_t)1, (uint8_t)16)); + if (acdc_barr_cfg_r13_present) { + HANDLE_CODE(unpack_enum(acdc_barr_cfg_r13.ac_barr_factor_r13, bref)); + HANDLE_CODE(unpack_enum(acdc_barr_cfg_r13.ac_barr_time_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void barr_per_acdc_category_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("acdc-Category-r13", acdc_category_r13); + if (acdc_barr_cfg_r13_present) { + j.write_fieldname("acdc-BarringConfig-r13"); + j.start_obj(); + j.write_str("ac-BarringFactor-r13", acdc_barr_cfg_r13.ac_barr_factor_r13.to_string()); + j.write_str("ac-BarringTime-r13", acdc_barr_cfg_r13.ac_barr_time_r13.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +// CSFB-RegistrationParam1XRTT ::= SEQUENCE +SRSASN_CODE csfb_regist_param1_xrtt_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sid.pack(bref)); + HANDLE_CODE(nid.pack(bref)); + HANDLE_CODE(bref.pack(multiple_sid, 1)); + HANDLE_CODE(bref.pack(multiple_nid, 1)); + HANDLE_CODE(bref.pack(home_reg, 1)); + HANDLE_CODE(bref.pack(foreign_sid_reg, 1)); + HANDLE_CODE(bref.pack(foreign_nid_reg, 1)); + HANDLE_CODE(bref.pack(param_reg, 1)); + HANDLE_CODE(bref.pack(pwr_up_reg, 1)); + HANDLE_CODE(regist_period.pack(bref)); + HANDLE_CODE(regist_zone.pack(bref)); + HANDLE_CODE(total_zone.pack(bref)); + HANDLE_CODE(zone_timer.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_regist_param1_xrtt_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(sid.unpack(bref)); + HANDLE_CODE(nid.unpack(bref)); + HANDLE_CODE(bref.unpack(multiple_sid, 1)); + HANDLE_CODE(bref.unpack(multiple_nid, 1)); + HANDLE_CODE(bref.unpack(home_reg, 1)); + HANDLE_CODE(bref.unpack(foreign_sid_reg, 1)); + HANDLE_CODE(bref.unpack(foreign_nid_reg, 1)); + HANDLE_CODE(bref.unpack(param_reg, 1)); + HANDLE_CODE(bref.unpack(pwr_up_reg, 1)); + HANDLE_CODE(regist_period.unpack(bref)); + HANDLE_CODE(regist_zone.unpack(bref)); + HANDLE_CODE(total_zone.unpack(bref)); + HANDLE_CODE(zone_timer.unpack(bref)); + + return SRSASN_SUCCESS; +} +void csfb_regist_param1_xrtt_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sid", sid.to_string()); + j.write_str("nid", nid.to_string()); + j.write_bool("multipleSID", multiple_sid); + j.write_bool("multipleNID", multiple_nid); + j.write_bool("homeReg", home_reg); + j.write_bool("foreignSIDReg", foreign_sid_reg); + j.write_bool("foreignNIDReg", foreign_nid_reg); + j.write_bool("parameterReg", param_reg); + j.write_bool("powerUpReg", pwr_up_reg); + j.write_str("registrationPeriod", regist_period.to_string()); + j.write_str("registrationZone", regist_zone.to_string()); + j.write_str("totalZone", total_zone.to_string()); + j.write_str("zoneTimer", zone_timer.to_string()); + j.end_obj(); +} + +// CSFB-RegistrationParam1XRTT-v920 ::= SEQUENCE +SRSASN_CODE csfb_regist_param1_xrtt_v920_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_regist_param1_xrtt_v920_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void csfb_regist_param1_xrtt_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("powerDownReg-r9", "true"); + j.end_obj(); +} + +// CellReselectionParametersCDMA2000-r11 ::= SEQUENCE +cell_resel_params_cdma2000_r11_s::cell_resel_params_cdma2000_r11_s() +{ + t_resel_cdma2000_sf_present = false; +} +SRSASN_CODE cell_resel_params_cdma2000_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(t_resel_cdma2000_sf_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, band_class_list, 1, 32)); + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cell_list_r11, 1, 16)); + HANDLE_CODE(pack_unalign_integer(bref, t_resel_cdma2000, (uint8_t)0, (uint8_t)7)); + if (t_resel_cdma2000_sf_present) { + HANDLE_CODE(t_resel_cdma2000_sf.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_params_cdma2000_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(t_resel_cdma2000_sf_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(band_class_list, bref, 1, 32)); + HANDLE_CODE(unpack_dyn_seq_of(neigh_cell_list_r11, bref, 1, 16)); + HANDLE_CODE(unpack_unalign_integer(t_resel_cdma2000, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_cdma2000_sf_present) { + HANDLE_CODE(t_resel_cdma2000_sf.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cell_resel_params_cdma2000_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandClassList"); + for (uint32_t i1 = 0; i1 < band_class_list.size(); ++i1) { + band_class_list[i1].to_json(j); + } + j.end_array(); + j.start_array("neighCellList-r11"); + for (uint32_t i1 = 0; i1 < neigh_cell_list_r11.size(); ++i1) { + neigh_cell_list_r11[i1].to_json(j); + } + j.end_array(); + j.write_int("t-ReselectionCDMA2000", t_resel_cdma2000); + if (t_resel_cdma2000_sf_present) { + j.write_fieldname("t-ReselectionCDMA2000-SF"); + t_resel_cdma2000_sf.to_json(j); + } + j.end_obj(); +} + +// CellSelectionInfoCE-r13 ::= SEQUENCE +cell_sel_info_ce_r13_s::cell_sel_info_ce_r13_s() +{ + q_qual_min_rsrq_ce_r13_present = false; +} +SRSASN_CODE cell_sel_info_ce_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(q_qual_min_rsrq_ce_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_ce_r13, (int8_t)-70, (int8_t)-22)); + if (q_qual_min_rsrq_ce_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_rsrq_ce_r13, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_ce_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(q_qual_min_rsrq_ce_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_ce_r13, bref, (int8_t)-70, (int8_t)-22)); + if (q_qual_min_rsrq_ce_r13_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_rsrq_ce_r13, bref, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +void cell_sel_info_ce_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-RxLevMinCE-r13", q_rx_lev_min_ce_r13); + if (q_qual_min_rsrq_ce_r13_present) { + j.write_int("q-QualMinRSRQ-CE-r13", q_qual_min_rsrq_ce_r13); + } + j.end_obj(); +} + +// CellSelectionInfoNFreq-r13 ::= SEQUENCE +cell_sel_info_nfreq_r13_s::cell_sel_info_nfreq_r13_s() +{ + q_rx_lev_min_offset_present = false; +} +SRSASN_CODE cell_sel_info_nfreq_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(q_rx_lev_min_offset_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_r13, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_offset_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_offset, (uint8_t)1, (uint8_t)8)); + } + HANDLE_CODE(pack_enum(bref, q_hyst_r13)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_resel_r13, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(pack_unalign_integer(bref, t_resel_eutra_r13, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_nfreq_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_r13, bref, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_offset_present) { + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_offset, bref, (uint8_t)1, (uint8_t)8)); + } + HANDLE_CODE(unpack_enum(q_hyst_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_resel_r13, bref, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(unpack_unalign_integer(t_resel_eutra_r13, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void cell_sel_info_nfreq_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-RxLevMin-r13", q_rx_lev_min_r13); + if (q_rx_lev_min_offset_present) { + j.write_int("q-RxLevMinOffset", q_rx_lev_min_offset); + } + j.write_str("q-Hyst-r13", q_hyst_r13.to_string()); + j.write_int("q-RxLevMinReselection-r13", q_rx_lev_min_resel_r13); + j.write_int("t-ReselectionEUTRA-r13", t_resel_eutra_r13); + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v10j0 ::= SEQUENCE +inter_freq_carrier_freq_info_v10j0_s::inter_freq_carrier_freq_info_v10j0_s() +{ + freq_band_info_r10_present = false; + multi_band_info_list_v10j0_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v10j0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_info_r10_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10j0_present, 1)); + + if (freq_band_info_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_info_r10, 1, 8)); + } + if (multi_band_info_list_v10j0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10j0, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v10j0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10j0_present, 1)); + + if (freq_band_info_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_info_r10, bref, 1, 8)); + } + if (multi_band_info_list_v10j0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10j0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v10j0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_info_r10_present) { + j.start_array("freqBandInfo-r10"); + for (uint32_t i1 = 0; i1 < freq_band_info_r10.size(); ++i1) { + freq_band_info_r10[i1].to_json(j); + } + j.end_array(); + } + if (multi_band_info_list_v10j0_present) { + j.start_array("multiBandInfoList-v10j0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10j0.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < multi_band_info_list_v10j0[i1].size(); ++i2) { + multi_band_info_list_v10j0[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + j.end_obj(); +} + +// InterFreqNeighCellInfo ::= SEQUENCE +SRSASN_CODE inter_freq_neigh_cell_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, q_offset_cell)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_neigh_cell_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(q_offset_cell, bref)); + + 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()); + j.end_obj(); +} + +// NS-PmaxValueNR-r15 ::= SEQUENCE +ns_pmax_value_nr_r15_s::ns_pmax_value_nr_r15_s() +{ + add_pmax_nr_r15_present = false; +} +SRSASN_CODE ns_pmax_value_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_pmax_nr_r15_present, 1)); + + if (add_pmax_nr_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, add_pmax_nr_r15, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission_nr_r15, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ns_pmax_value_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_pmax_nr_r15_present, 1)); + + if (add_pmax_nr_r15_present) { + HANDLE_CODE(unpack_unalign_integer(add_pmax_nr_r15, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_unalign_integer(add_spec_emission_nr_r15, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void ns_pmax_value_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_pmax_nr_r15_present) { + j.write_int("additionalPmaxNR-r15", add_pmax_nr_r15); + } + j.write_int("additionalSpectrumEmissionNR-r15", add_spec_emission_nr_r15); + j.end_obj(); +} + +// PLMN-IdentityInfo2-r12 ::= CHOICE +void plmn_id_info2_r12_c::destroy_() +{ + switch (type_) { + case types::plmn_id_r12: + c.destroy(); + break; + default: + break; + } +} +void plmn_id_info2_r12_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_idx_r12: + break; + case types::plmn_id_r12: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_info2_r12_c"); + } +} +plmn_id_info2_r12_c::plmn_id_info2_r12_c(const plmn_id_info2_r12_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_idx_r12: + c.init(other.c.get()); + break; + case types::plmn_id_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_info2_r12_c"); + } +} +plmn_id_info2_r12_c& plmn_id_info2_r12_c::operator=(const plmn_id_info2_r12_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::plmn_idx_r12: + c.set(other.c.get()); + break; + case types::plmn_id_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_info2_r12_c"); + } + + return *this; +} +void plmn_id_info2_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_idx_r12: + j.write_int("plmn-Index-r12", c.get()); + break; + case types::plmn_id_r12: + j.write_fieldname("plmnIdentity-r12"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "plmn_id_info2_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE plmn_id_info2_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::plmn_idx_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)6)); + break; + case types::plmn_id_r12: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "plmn_id_info2_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info2_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::plmn_idx_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)6)); + break; + case types::plmn_id_r12: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "plmn_id_info2_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PRACH-ParametersCE-r13 ::= SEQUENCE +prach_params_ce_r13_s::prach_params_ce_r13_s() +{ + prach_start_sf_r13_present = false; + max_num_preamb_attempt_ce_r13_present = false; +} +SRSASN_CODE prach_params_ce_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(prach_start_sf_r13_present, 1)); + HANDLE_CODE(bref.pack(max_num_preamb_attempt_ce_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, prach_cfg_idx_r13, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, prach_freq_offset_r13, (uint8_t)0, (uint8_t)94)); + if (prach_start_sf_r13_present) { + HANDLE_CODE(pack_enum(bref, prach_start_sf_r13)); + } + if (max_num_preamb_attempt_ce_r13_present) { + HANDLE_CODE(pack_enum(bref, max_num_preamb_attempt_ce_r13)); + } + HANDLE_CODE(pack_enum(bref, num_repeat_per_preamb_attempt_r13)); + HANDLE_CODE(pack_dyn_seq_of(bref, mpdcch_nbs_to_monitor_r13, 1, 2, UnalignedIntegerPacker(1, 16))); + HANDLE_CODE(pack_enum(bref, mpdcch_num_repeat_ra_r13)); + HANDLE_CODE(pack_enum(bref, prach_hop_cfg_r13)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_params_ce_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(prach_start_sf_r13_present, 1)); + HANDLE_CODE(bref.unpack(max_num_preamb_attempt_ce_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(prach_cfg_idx_r13, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(prach_freq_offset_r13, bref, (uint8_t)0, (uint8_t)94)); + if (prach_start_sf_r13_present) { + HANDLE_CODE(unpack_enum(prach_start_sf_r13, bref)); + } + if (max_num_preamb_attempt_ce_r13_present) { + HANDLE_CODE(unpack_enum(max_num_preamb_attempt_ce_r13, bref)); + } + HANDLE_CODE(unpack_enum(num_repeat_per_preamb_attempt_r13, bref)); + HANDLE_CODE(unpack_dyn_seq_of(mpdcch_nbs_to_monitor_r13, bref, 1, 2, UnalignedIntegerPacker(1, 16))); + HANDLE_CODE(unpack_enum(mpdcch_num_repeat_ra_r13, bref)); + HANDLE_CODE(unpack_enum(prach_hop_cfg_r13, bref)); + + return SRSASN_SUCCESS; +} +void prach_params_ce_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("prach-ConfigIndex-r13", prach_cfg_idx_r13); + j.write_int("prach-FreqOffset-r13", prach_freq_offset_r13); + if (prach_start_sf_r13_present) { + j.write_str("prach-StartingSubframe-r13", prach_start_sf_r13.to_string()); + } + if (max_num_preamb_attempt_ce_r13_present) { + j.write_str("maxNumPreambleAttemptCE-r13", max_num_preamb_attempt_ce_r13.to_string()); + } + j.write_str("numRepetitionPerPreambleAttempt-r13", num_repeat_per_preamb_attempt_r13.to_string()); + j.start_array("mpdcch-NarrowbandsToMonitor-r13"); + for (uint32_t i1 = 0; i1 < mpdcch_nbs_to_monitor_r13.size(); ++i1) { + j.write_int(mpdcch_nbs_to_monitor_r13[i1]); + } + j.end_array(); + j.write_str("mpdcch-NumRepetition-RA-r13", mpdcch_num_repeat_ra_r13.to_string()); + j.write_str("prach-HoppingConfig-r13", prach_hop_cfg_r13.to_string()); + j.end_obj(); +} + +// PreRegistrationInfoHRPD ::= SEQUENCE +pre_regist_info_hrpd_s::pre_regist_info_hrpd_s() +{ + pre_regist_zone_id_present = false; + secondary_pre_regist_zone_id_list_present = false; +} +SRSASN_CODE pre_regist_info_hrpd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pre_regist_zone_id_present, 1)); + HANDLE_CODE(bref.pack(secondary_pre_regist_zone_id_list_present, 1)); + + HANDLE_CODE(bref.pack(pre_regist_allowed, 1)); + if (pre_regist_zone_id_present) { + HANDLE_CODE(pack_unalign_integer(bref, pre_regist_zone_id, (uint8_t)0, (uint8_t)255)); + } + if (secondary_pre_regist_zone_id_list_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, secondary_pre_regist_zone_id_list, 1, 2, UnalignedIntegerPacker(0, 255))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pre_regist_info_hrpd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pre_regist_zone_id_present, 1)); + HANDLE_CODE(bref.unpack(secondary_pre_regist_zone_id_list_present, 1)); + + HANDLE_CODE(bref.unpack(pre_regist_allowed, 1)); + if (pre_regist_zone_id_present) { + HANDLE_CODE(unpack_unalign_integer(pre_regist_zone_id, bref, (uint8_t)0, (uint8_t)255)); + } + if (secondary_pre_regist_zone_id_list_present) { + HANDLE_CODE( + unpack_dyn_seq_of(secondary_pre_regist_zone_id_list, bref, 1, 2, UnalignedIntegerPacker(0, 255))); + } + + return SRSASN_SUCCESS; +} +void pre_regist_info_hrpd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("preRegistrationAllowed", pre_regist_allowed); + if (pre_regist_zone_id_present) { + j.write_int("preRegistrationZoneId", pre_regist_zone_id); + } + if (secondary_pre_regist_zone_id_list_present) { + j.start_array("secondaryPreRegistrationZoneIdList"); + for (uint32_t i1 = 0; i1 < secondary_pre_regist_zone_id_list.size(); ++i1) { + j.write_int(secondary_pre_regist_zone_id_list[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// RACH-CE-LevelInfo-r13 ::= SEQUENCE +rach_ce_level_info_r13_s::rach_ce_level_info_r13_s() +{ + ext = false; + edt_params_r15_present = false; +} +SRSASN_CODE rach_ce_level_info_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, preamb_map_info_r13.first_preamb_r13, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, preamb_map_info_r13.last_preamb_r13, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_enum(bref, ra_resp_win_size_r13)); + HANDLE_CODE(pack_enum(bref, mac_contention_resolution_timer_r13)); + HANDLE_CODE(pack_enum(bref, rar_hop_cfg_r13)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(edt_params_r15_present != (edt_params_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= edt_params_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(edt_params_r15_present, 1)); + if (edt_params_r15_present) { + HANDLE_CODE(bref.pack(edt_params_r15->mac_contention_resolution_timer_r15_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, edt_params_r15->edt_last_preamb_r15, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(bref.pack(edt_params_r15->edt_small_tbs_enabled_r15, 1)); + HANDLE_CODE(pack_enum(bref, edt_params_r15->edt_tbs_r15)); + if (edt_params_r15->mac_contention_resolution_timer_r15_present) { + HANDLE_CODE(pack_enum(bref, edt_params_r15->mac_contention_resolution_timer_r15)); + } + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_ce_level_info_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(preamb_map_info_r13.first_preamb_r13, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(preamb_map_info_r13.last_preamb_r13, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_enum(ra_resp_win_size_r13, bref)); + HANDLE_CODE(unpack_enum(mac_contention_resolution_timer_r13, bref)); + HANDLE_CODE(unpack_enum(rar_hop_cfg_r13, bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(edt_params_r15_present, 1)); + if (edt_params_r15_present) { + edt_params_r15 = make_copy_ptr(edt_params_r15_s_()); + HANDLE_CODE(bref.unpack(edt_params_r15->mac_contention_resolution_timer_r15_present, 1)); + HANDLE_CODE(unpack_unalign_integer(edt_params_r15->edt_last_preamb_r15, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(bref.unpack(edt_params_r15->edt_small_tbs_enabled_r15, 1)); + HANDLE_CODE(unpack_enum(edt_params_r15->edt_tbs_r15, bref)); + if (edt_params_r15->mac_contention_resolution_timer_r15_present) { + HANDLE_CODE(unpack_enum(edt_params_r15->mac_contention_resolution_timer_r15, bref)); + } + } + } + } + return SRSASN_SUCCESS; +} +void rach_ce_level_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("preambleMappingInfo-r13"); + j.start_obj(); + j.write_int("firstPreamble-r13", preamb_map_info_r13.first_preamb_r13); + j.write_int("lastPreamble-r13", preamb_map_info_r13.last_preamb_r13); + j.end_obj(); + j.write_str("ra-ResponseWindowSize-r13", ra_resp_win_size_r13.to_string()); + j.write_str("mac-ContentionResolutionTimer-r13", mac_contention_resolution_timer_r13.to_string()); + j.write_str("rar-HoppingConfig-r13", rar_hop_cfg_r13.to_string()); + if (edt_params_r15_present) { + j.write_fieldname("edt-Parameters-r15"); + j.start_obj(); + j.write_int("edt-LastPreamble-r15", edt_params_r15->edt_last_preamb_r15); + j.write_bool("edt-SmallTBS-Enabled-r15", edt_params_r15->edt_small_tbs_enabled_r15); + j.write_str("edt-TBS-r15", edt_params_r15->edt_tbs_r15.to_string()); + if (edt_params_r15->mac_contention_resolution_timer_r15_present) { + j.write_str("mac-ContentionResolutionTimer-r15", edt_params_r15->mac_contention_resolution_timer_r15.to_string()); + } + j.end_obj(); + } + j.end_obj(); +} + +rach_ce_level_info_r13_s::edt_params_r15_s_::edt_params_r15_s_() +{ + mac_contention_resolution_timer_r15_present = false; +} + +// SL-AllowedCarrierFreqList-r15 ::= SEQUENCE +SRSASN_CODE sl_allowed_carrier_freq_list_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_carrier_freq_set1, 1, 8, UnalignedIntegerPacker(0, 262143))); + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_carrier_freq_set2, 1, 8, UnalignedIntegerPacker(0, 262143))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_allowed_carrier_freq_list_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(allowed_carrier_freq_set1, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + HANDLE_CODE(unpack_dyn_seq_of(allowed_carrier_freq_set2, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + + return SRSASN_SUCCESS; +} +void sl_allowed_carrier_freq_list_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("allowedCarrierFreqSet1"); + for (uint32_t i1 = 0; i1 < allowed_carrier_freq_set1.size(); ++i1) { + j.write_int(allowed_carrier_freq_set1[i1]); + } + j.end_array(); + j.start_array("allowedCarrierFreqSet2"); + for (uint32_t i1 = 0; i1 < allowed_carrier_freq_set2.size(); ++i1) { + j.write_int(allowed_carrier_freq_set2[i1]); + } + j.end_array(); + j.end_obj(); +} + +// SL-DiscTxResourcesInterFreq-r13 ::= CHOICE +void sl_disc_tx_res_inter_freq_r13_c::set(types::options e) +{ + type_ = e; +} +void sl_disc_tx_res_inter_freq_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::acquire_si_from_carrier_r13: + break; + case types::disc_tx_pool_common_r13: + j.start_array("discTxPoolCommon-r13"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + case types::request_ded_r13: + break; + case types::no_tx_on_carrier_r13: + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_inter_freq_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_tx_res_inter_freq_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::acquire_si_from_carrier_r13: + break; + case types::disc_tx_pool_common_r13: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 4)); + break; + case types::request_ded_r13: + break; + case types::no_tx_on_carrier_r13: + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_inter_freq_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_res_inter_freq_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::acquire_si_from_carrier_r13: + break; + case types::disc_tx_pool_common_r13: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 4)); + break; + case types::request_ded_r13: + break; + case types::no_tx_on_carrier_r13: + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_inter_freq_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType1-v1320-IEs ::= SEQUENCE +sib_type1_v1320_ies_s::sib_type1_v1320_ies_s() +{ + freq_hop_params_dl_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1320_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_hop_params_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_hop_params_dl_r13_present) { + HANDLE_CODE(bref.pack(freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13_present, 1)); + if (freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13_present) { + HANDLE_CODE(pack_enum(bref, freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13)); + } + if (freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13_present) { + HANDLE_CODE(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13.pack(bref)); + } + if (freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13_present) { + HANDLE_CODE(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13.pack(bref)); + } + if (freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13_present) { + HANDLE_CODE( + pack_unalign_integer(bref, freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13, (uint8_t)1, (uint8_t)16)); + } + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1320_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_hop_params_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_hop_params_dl_r13_present) { + HANDLE_CODE(bref.unpack(freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13_present, 1)); + if (freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13_present) { + HANDLE_CODE(unpack_enum(freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13, bref)); + } + if (freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13_present) { + HANDLE_CODE(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13.unpack(bref)); + } + if (freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13_present) { + HANDLE_CODE(freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13.unpack(bref)); + } + if (freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13_present) { + HANDLE_CODE( + unpack_unalign_integer(freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13, bref, (uint8_t)1, (uint8_t)16)); + } + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1320_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_hop_params_dl_r13_present) { + j.write_fieldname("freqHoppingParametersDL-r13"); + j.start_obj(); + if (freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13_present) { + j.write_str("mpdcch-pdsch-HoppingNB-r13", freq_hop_params_dl_r13.mpdcch_pdsch_hop_nb_r13.to_string()); + } + if (freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13_present) { + j.write_fieldname("interval-DLHoppingConfigCommonModeA-r13"); + freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_a_r13.to_json(j); + } + if (freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13_present) { + j.write_fieldname("interval-DLHoppingConfigCommonModeB-r13"); + freq_hop_params_dl_r13.interv_dl_hop_cfg_common_mode_b_r13.to_json(j); + } + if (freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13_present) { + j.write_int("mpdcch-pdsch-HoppingOffset-r13", freq_hop_params_dl_r13.mpdcch_pdsch_hop_offset_r13); + } + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::freq_hop_params_dl_r13_s_() +{ + mpdcch_pdsch_hop_nb_r13_present = false; + interv_dl_hop_cfg_common_mode_a_r13_present = false; + interv_dl_hop_cfg_common_mode_b_r13_present = false; + mpdcch_pdsch_hop_offset_r13_present = false; +} + +void sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::destroy_() {} +void sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_:: + interv_dl_hop_cfg_common_mode_a_r13_c_( + const sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_r13: + c.init(other.c.get()); + break; + case types::interv_tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_"); + } +} +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_& +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_:: +operator=(const sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_r13: + c.set(other.c.get()); + break; + case types::interv_tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_"); + } + + return *this; +} +void sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_r13: + j.write_str("interval-FDD-r13", c.get().to_string()); + break; + case types::interv_tdd_r13: + j.write_str("interval-TDD-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::destroy_() {} +void sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_:: + interv_dl_hop_cfg_common_mode_b_r13_c_( + const sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_r13: + c.init(other.c.get()); + break; + case types::interv_tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_"); + } +} +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_& +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_:: +operator=(const sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_r13: + c.set(other.c.get()); + break; + case types::interv_tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_"); + } + + return *this; +} +void sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_r13: + j.write_str("interval-FDD-r13", c.get().to_string()); + break; + case types::interv_tdd_r13: + j.write_str("interval-TDD-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE +sib_type2_v10m0_ies_s::sib_type2_v10m0_ies_s() +{ + freq_info_v10l0_present = false; + multi_band_info_list_v10l0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type2_v10m0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_info_v10l0_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10l0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_info_v10l0_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_info_v10l0.add_spec_emission_v10l0, (uint16_t)33, (uint16_t)288)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10l0, 1, 8, UnalignedIntegerPacker(33, 288))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type2_v10m0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_info_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_info_v10l0_present) { + HANDLE_CODE(unpack_unalign_integer(freq_info_v10l0.add_spec_emission_v10l0, bref, (uint16_t)33, (uint16_t)288)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10l0, bref, 1, 8, UnalignedIntegerPacker(33, 288))); + } + + return SRSASN_SUCCESS; +} +void sib_type2_v10m0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_info_v10l0_present) { + j.write_fieldname("freqInfo-v10l0"); + j.start_obj(); + j.write_int("additionalSpectrumEmission-v10l0", freq_info_v10l0.add_spec_emission_v10l0); + j.end_obj(); + } + if (multi_band_info_list_v10l0_present) { + j.start_array("multiBandInfoList-v10l0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + j.write_int(multi_band_info_list_v10l0[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SystemInformationBlockType5-v10l0-IEs ::= SEQUENCE +sib_type5_v10l0_ies_s::sib_type5_v10l0_ies_s() +{ + inter_freq_carrier_freq_list_v10l0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type5_v10l0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v10l0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list_v10l0, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type5_v10l0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list_v10l0, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type5_v10l0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_freq_carrier_freq_list_v10l0_present) { + j.start_array("interFreqCarrierFreqList-v10l0"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v10l0.size(); ++i1) { + inter_freq_carrier_freq_list_v10l0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemTimeInfoCDMA2000 ::= SEQUENCE +SRSASN_CODE sys_time_info_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cdma_eutra_synchronisation, 1)); + HANDLE_CODE(cdma_sys_time.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_time_info_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cdma_eutra_synchronisation, 1)); + HANDLE_CODE(cdma_sys_time.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sys_time_info_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("cdma-EUTRA-Synchronisation", cdma_eutra_synchronisation); + j.write_fieldname("cdma-SystemTime"); + cdma_sys_time.to_json(j); + j.end_obj(); +} + +void sys_time_info_cdma2000_s::cdma_sys_time_c_::destroy_() +{ + switch (type_) { + case types::sync_sys_time: + c.destroy >(); + break; + case types::async_sys_time: + c.destroy >(); + break; + default: + break; + } +} +void sys_time_info_cdma2000_s::cdma_sys_time_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sync_sys_time: + c.init >(); + break; + case types::async_sys_time: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_time_info_cdma2000_s::cdma_sys_time_c_"); + } +} +sys_time_info_cdma2000_s::cdma_sys_time_c_::cdma_sys_time_c_(const sys_time_info_cdma2000_s::cdma_sys_time_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sync_sys_time: + c.init(other.c.get >()); + break; + case types::async_sys_time: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_time_info_cdma2000_s::cdma_sys_time_c_"); + } +} +sys_time_info_cdma2000_s::cdma_sys_time_c_& sys_time_info_cdma2000_s::cdma_sys_time_c_:: + operator=(const sys_time_info_cdma2000_s::cdma_sys_time_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sync_sys_time: + c.set(other.c.get >()); + break; + case types::async_sys_time: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_time_info_cdma2000_s::cdma_sys_time_c_"); + } + + return *this; +} +void sys_time_info_cdma2000_s::cdma_sys_time_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sync_sys_time: + j.write_str("synchronousSystemTime", c.get >().to_string()); + break; + case types::async_sys_time: + j.write_str("asynchronousSystemTime", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "sys_time_info_cdma2000_s::cdma_sys_time_c_"); + } + j.end_obj(); +} +SRSASN_CODE sys_time_info_cdma2000_s::cdma_sys_time_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sync_sys_time: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::async_sys_time: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sys_time_info_cdma2000_s::cdma_sys_time_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_time_info_cdma2000_s::cdma_sys_time_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sync_sys_time: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::async_sys_time: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sys_time_info_cdma2000_s::cdma_sys_time_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UAC-BarringPerCat-r15 ::= SEQUENCE +SRSASN_CODE uac_barr_per_cat_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, access_category_r15, (uint8_t)1, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, uac_barr_info_set_idx_r15, (uint8_t)1, (uint8_t)8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_per_cat_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(access_category_r15, bref, (uint8_t)1, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(uac_barr_info_set_idx_r15, bref, (uint8_t)1, (uint8_t)8)); + + return SRSASN_SUCCESS; +} +void uac_barr_per_cat_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("accessCategory-r15", access_category_r15); + j.write_int("uac-barringInfoSetIndex-r15", uac_barr_info_set_idx_r15); + j.end_obj(); +} + +// AC-BarringConfig ::= SEQUENCE +SRSASN_CODE ac_barr_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, ac_barr_factor)); + HANDLE_CODE(pack_enum(bref, ac_barr_time)); + HANDLE_CODE(ac_barr_for_special_ac.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ac_barr_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(ac_barr_factor, bref)); + HANDLE_CODE(unpack_enum(ac_barr_time, bref)); + HANDLE_CODE(ac_barr_for_special_ac.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ac_barr_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ac-BarringFactor", ac_barr_factor.to_string()); + j.write_str("ac-BarringTime", ac_barr_time.to_string()); + j.write_str("ac-BarringForSpecialAC", ac_barr_for_special_ac.to_string()); + j.end_obj(); +} + +// CarrierFreqsGERAN ::= SEQUENCE +SRSASN_CODE carrier_freqs_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, start_arfcn, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(pack_enum(bref, band_ind)); + HANDLE_CODE(following_arfcns.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freqs_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(start_arfcn, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(unpack_enum(band_ind, bref)); + HANDLE_CODE(following_arfcns.unpack(bref)); + + return SRSASN_SUCCESS; +} +void carrier_freqs_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("startingARFCN", start_arfcn); + j.write_str("bandIndicator", band_ind.to_string()); + j.write_fieldname("followingARFCNs"); + following_arfcns.to_json(j); + j.end_obj(); +} + +void carrier_freqs_geran_s::following_arfcns_c_::destroy_() +{ + switch (type_) { + case types::explicit_list_of_arfcns: + c.destroy(); + break; + case types::equally_spaced_arfcns: + c.destroy(); + break; + case types::variable_bit_map_of_arfcns: + c.destroy(); + break; + default: + break; + } +} +void carrier_freqs_geran_s::following_arfcns_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::explicit_list_of_arfcns: + c.init(); + break; + case types::equally_spaced_arfcns: + c.init(); + break; + case types::variable_bit_map_of_arfcns: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "carrier_freqs_geran_s::following_arfcns_c_"); + } +} +carrier_freqs_geran_s::following_arfcns_c_::following_arfcns_c_(const carrier_freqs_geran_s::following_arfcns_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::explicit_list_of_arfcns: + c.init(other.c.get()); + break; + case types::equally_spaced_arfcns: + c.init(other.c.get()); + break; + case types::variable_bit_map_of_arfcns: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "carrier_freqs_geran_s::following_arfcns_c_"); + } +} +carrier_freqs_geran_s::following_arfcns_c_& carrier_freqs_geran_s::following_arfcns_c_:: + operator=(const carrier_freqs_geran_s::following_arfcns_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::explicit_list_of_arfcns: + c.set(other.c.get()); + break; + case types::equally_spaced_arfcns: + c.set(other.c.get()); + break; + case types::variable_bit_map_of_arfcns: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "carrier_freqs_geran_s::following_arfcns_c_"); + } + + return *this; +} +void carrier_freqs_geran_s::following_arfcns_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_list_of_arfcns: + j.start_array("explicitListOfARFCNs"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_int(c.get()[i1]); + } + j.end_array(); + break; + case types::equally_spaced_arfcns: + j.write_fieldname("equallySpacedARFCNs"); + j.start_obj(); + j.write_int("arfcn-Spacing", c.get().arfcn_spacing); + j.write_int("numberOfFollowingARFCNs", c.get().nof_following_arfcns); + j.end_obj(); + break; + case types::variable_bit_map_of_arfcns: + j.write_str("variableBitMapOfARFCNs", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "carrier_freqs_geran_s::following_arfcns_c_"); + } + j.end_obj(); +} +SRSASN_CODE carrier_freqs_geran_s::following_arfcns_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_list_of_arfcns: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 0, 31, UnalignedIntegerPacker(0, 1023))); + break; + case types::equally_spaced_arfcns: + HANDLE_CODE(pack_unalign_integer(bref, c.get().arfcn_spacing, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE( + pack_unalign_integer(bref, c.get().nof_following_arfcns, (uint8_t)0, (uint8_t)31)); + break; + case types::variable_bit_map_of_arfcns: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "carrier_freqs_geran_s::following_arfcns_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freqs_geran_s::following_arfcns_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_list_of_arfcns: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 0, 31, + UnalignedIntegerPacker(0, 1023))); + break; + case types::equally_spaced_arfcns: + HANDLE_CODE( + unpack_unalign_integer(c.get().arfcn_spacing, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_unalign_integer(c.get().nof_following_arfcns, bref, (uint8_t)0, + (uint8_t)31)); + break; + case types::variable_bit_map_of_arfcns: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "carrier_freqs_geran_s::following_arfcns_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CellSelectionInfo-v1250 ::= SEQUENCE +SRSASN_CODE cell_sel_info_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_rsrq_on_all_symbols_r12, (int8_t)-34, (int8_t)-3)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(q_qual_min_rsrq_on_all_symbols_r12, bref, (int8_t)-34, (int8_t)-3)); + + return SRSASN_SUCCESS; +} +void cell_sel_info_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-QualMinRSRQ-OnAllSymbols-r12", q_qual_min_rsrq_on_all_symbols_r12); + j.end_obj(); +} + +// DeltaFList-PUCCH ::= SEQUENCE +SRSASN_CODE delta_flist_pucch_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format1)); + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format1b)); + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format2)); + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format2a)); + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format2b)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE delta_flist_pucch_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(delta_f_pucch_format1, bref)); + HANDLE_CODE(unpack_enum(delta_f_pucch_format1b, bref)); + HANDLE_CODE(unpack_enum(delta_f_pucch_format2, bref)); + HANDLE_CODE(unpack_enum(delta_f_pucch_format2a, bref)); + HANDLE_CODE(unpack_enum(delta_f_pucch_format2b, bref)); + + return SRSASN_SUCCESS; +} +void delta_flist_pucch_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaF-PUCCH-Format1", delta_f_pucch_format1.to_string()); + j.write_str("deltaF-PUCCH-Format1b", delta_f_pucch_format1b.to_string()); + j.write_str("deltaF-PUCCH-Format2", delta_f_pucch_format2.to_string()); + j.write_str("deltaF-PUCCH-Format2a", delta_f_pucch_format2a.to_string()); + j.write_str("deltaF-PUCCH-Format2b", delta_f_pucch_format2b.to_string()); + j.end_obj(); +} + +// EDT-PRACH-ParametersCE-r15 ::= SEQUENCE +edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s() +{ + edt_prach_params_ce_r15_present = false; +} +SRSASN_CODE edt_prach_params_ce_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(edt_prach_params_ce_r15_present, 1)); + + if (edt_prach_params_ce_r15_present) { + HANDLE_CODE(bref.pack(edt_prach_params_ce_r15.prach_start_sf_r15_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, edt_prach_params_ce_r15.prach_cfg_idx_r15, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, edt_prach_params_ce_r15.prach_freq_offset_r15, (uint8_t)0, (uint8_t)94)); + if (edt_prach_params_ce_r15.prach_start_sf_r15_present) { + HANDLE_CODE(pack_enum(bref, edt_prach_params_ce_r15.prach_start_sf_r15)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15, 1, 2, + UnalignedIntegerPacker(1, 16))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE edt_prach_params_ce_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(edt_prach_params_ce_r15_present, 1)); + + if (edt_prach_params_ce_r15_present) { + HANDLE_CODE(bref.unpack(edt_prach_params_ce_r15.prach_start_sf_r15_present, 1)); + HANDLE_CODE(unpack_unalign_integer(edt_prach_params_ce_r15.prach_cfg_idx_r15, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(edt_prach_params_ce_r15.prach_freq_offset_r15, bref, (uint8_t)0, (uint8_t)94)); + if (edt_prach_params_ce_r15.prach_start_sf_r15_present) { + HANDLE_CODE(unpack_enum(edt_prach_params_ce_r15.prach_start_sf_r15, bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15, bref, 1, 2, + UnalignedIntegerPacker(1, 16))); + } + + return SRSASN_SUCCESS; +} +void edt_prach_params_ce_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (edt_prach_params_ce_r15_present) { + j.write_fieldname("edt-PRACH-ParametersCE-r15"); + j.start_obj(); + j.write_int("prach-ConfigIndex-r15", edt_prach_params_ce_r15.prach_cfg_idx_r15); + j.write_int("prach-FreqOffset-r15", edt_prach_params_ce_r15.prach_freq_offset_r15); + if (edt_prach_params_ce_r15.prach_start_sf_r15_present) { + j.write_str("prach-StartingSubframe-r15", edt_prach_params_ce_r15.prach_start_sf_r15.to_string()); + } + j.start_array("mpdcch-NarrowbandsToMonitor-r15"); + for (uint32_t i1 = 0; i1 < edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15.size(); ++i1) { + j.write_int(edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15[i1]); + } + j.end_array(); + j.end_obj(); + } + j.end_obj(); +} + +edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::edt_prach_params_ce_r15_s_() +{ + prach_start_sf_r15_present = false; +} + +// InterFreqCarrierFreqInfo-v9e0 ::= SEQUENCE +inter_freq_carrier_freq_info_v9e0_s::inter_freq_carrier_freq_info_v9e0_s() +{ + dl_carrier_freq_v9e0_present = false; + multi_band_info_list_v9e0_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dl_carrier_freq_v9e0_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v9e0_present, 1)); + + if (dl_carrier_freq_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_v9e0, (uint32_t)65536, (uint32_t)262143)); + } + if (multi_band_info_list_v9e0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v9e0, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dl_carrier_freq_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v9e0_present, 1)); + + if (dl_carrier_freq_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + } + if (multi_band_info_list_v9e0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v9e0, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_carrier_freq_v9e0_present) { + j.write_int("dl-CarrierFreq-v9e0", dl_carrier_freq_v9e0); + } + if (multi_band_info_list_v9e0_present) { + j.start_array("multiBandInfoList-v9e0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v9e0.size(); ++i1) { + multi_band_info_list_v9e0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MTC-SSB-NR-r15 ::= SEQUENCE +SRSASN_CODE mtc_ssb_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(periodicity_and_offset_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, ssb_dur_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mtc_ssb_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(periodicity_and_offset_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(ssb_dur_r15, bref)); + + return SRSASN_SUCCESS; +} +void mtc_ssb_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("periodicityAndOffset-r15"); + periodicity_and_offset_r15.to_json(j); + j.write_str("ssb-Duration-r15", ssb_dur_r15.to_string()); + j.end_obj(); +} + +void mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::destroy_() {} +void mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::periodicity_and_offset_r15_c_( + const mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf5_r15: + c.init(other.c.get()); + break; + case types::sf10_r15: + c.init(other.c.get()); + break; + case types::sf20_r15: + c.init(other.c.get()); + break; + case types::sf40_r15: + c.init(other.c.get()); + break; + case types::sf80_r15: + c.init(other.c.get()); + break; + case types::sf160_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_"); + } +} +mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_& mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_:: + operator=(const mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf5_r15: + c.set(other.c.get()); + break; + case types::sf10_r15: + c.set(other.c.get()); + break; + case types::sf20_r15: + c.set(other.c.get()); + break; + case types::sf40_r15: + c.set(other.c.get()); + break; + case types::sf80_r15: + c.set(other.c.get()); + break; + case types::sf160_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_"); + } + + return *this; +} +void mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf5_r15: + j.write_int("sf5-r15", c.get()); + break; + case types::sf10_r15: + j.write_int("sf10-r15", c.get()); + break; + case types::sf20_r15: + j.write_int("sf20-r15", c.get()); + break; + case types::sf40_r15: + j.write_int("sf40-r15", c.get()); + break; + case types::sf80_r15: + j.write_int("sf80-r15", c.get()); + break; + case types::sf160_r15: + j.write_int("sf160-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf5_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)4)); + break; + case types::sf10_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)9)); + break; + case types::sf20_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + break; + case types::sf40_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::sf80_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::sf160_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + default: + log_invalid_choice_id(type_, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf5_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)4)); + break; + case types::sf10_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)9)); + break; + case types::sf20_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + break; + case types::sf40_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::sf80_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::sf160_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + default: + log_invalid_choice_id(type_, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasIdleCarrierEUTRA-r15 ::= SEQUENCE +meas_idle_carrier_eutra_r15_s::meas_idle_carrier_eutra_r15_s() +{ + ext = false; + validity_area_r15_present = false; + meas_cell_list_r15_present = false; + quality_thres_r15_present = false; +} +SRSASN_CODE meas_idle_carrier_eutra_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(validity_area_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_cell_list_r15_present, 1)); + HANDLE_CODE(bref.pack(quality_thres_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_enum(bref, allowed_meas_bw_r15)); + if (validity_area_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, validity_area_r15, 1, 8)); + } + if (meas_cell_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_cell_list_r15, 1, 8)); + } + HANDLE_CODE(pack_enum(bref, report_quantities)); + if (quality_thres_r15_present) { + HANDLE_CODE(bref.pack(quality_thres_r15.idle_rsrp_thres_r15_present, 1)); + HANDLE_CODE(bref.pack(quality_thres_r15.idle_rsrq_thres_r15_present, 1)); + if (quality_thres_r15.idle_rsrp_thres_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, quality_thres_r15.idle_rsrp_thres_r15, (uint8_t)0, (uint8_t)97)); + } + if (quality_thres_r15.idle_rsrq_thres_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, quality_thres_r15.idle_rsrq_thres_r15, (int8_t)-30, (int8_t)46)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_carrier_eutra_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(validity_area_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_cell_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(quality_thres_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_enum(allowed_meas_bw_r15, bref)); + if (validity_area_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(validity_area_r15, bref, 1, 8)); + } + if (meas_cell_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_cell_list_r15, bref, 1, 8)); + } + HANDLE_CODE(unpack_enum(report_quantities, bref)); + if (quality_thres_r15_present) { + HANDLE_CODE(bref.unpack(quality_thres_r15.idle_rsrp_thres_r15_present, 1)); + HANDLE_CODE(bref.unpack(quality_thres_r15.idle_rsrq_thres_r15_present, 1)); + if (quality_thres_r15.idle_rsrp_thres_r15_present) { + HANDLE_CODE(unpack_unalign_integer(quality_thres_r15.idle_rsrp_thres_r15, bref, (uint8_t)0, (uint8_t)97)); + } + if (quality_thres_r15.idle_rsrq_thres_r15_present) { + HANDLE_CODE(unpack_unalign_integer(quality_thres_r15.idle_rsrq_thres_r15, bref, (int8_t)-30, (int8_t)46)); + } + } + + return SRSASN_SUCCESS; +} +void meas_idle_carrier_eutra_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + j.write_str("allowedMeasBandwidth-r15", allowed_meas_bw_r15.to_string()); + if (validity_area_r15_present) { + j.start_array("validityArea-r15"); + for (uint32_t i1 = 0; i1 < validity_area_r15.size(); ++i1) { + validity_area_r15[i1].to_json(j); + } + j.end_array(); + } + if (meas_cell_list_r15_present) { + j.start_array("measCellList-r15"); + for (uint32_t i1 = 0; i1 < meas_cell_list_r15.size(); ++i1) { + meas_cell_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.write_str("reportQuantities", report_quantities.to_string()); + if (quality_thres_r15_present) { + j.write_fieldname("qualityThreshold-r15"); + j.start_obj(); + if (quality_thres_r15.idle_rsrp_thres_r15_present) { + j.write_int("idleRSRP-Threshold-r15", quality_thres_r15.idle_rsrp_thres_r15); + } + if (quality_thres_r15.idle_rsrq_thres_r15_present) { + j.write_int("idleRSRQ-Threshold-r15", quality_thres_r15.idle_rsrq_thres_r15); + } + j.end_obj(); + } + j.end_obj(); +} + +meas_idle_carrier_eutra_r15_s::quality_thres_r15_s_::quality_thres_r15_s_() +{ + idle_rsrp_thres_r15_present = false; + idle_rsrq_thres_r15_present = false; +} + +// NeighCellCDMA2000 ::= SEQUENCE +SRSASN_CODE neigh_cell_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, band_class)); + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cells_per_freq_list, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(band_class, bref)); + HANDLE_CODE(unpack_dyn_seq_of(neigh_cells_per_freq_list, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void neigh_cell_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bandClass", band_class.to_string()); + j.start_array("neighCellsPerFreqList"); + for (uint32_t i1 = 0; i1 < neigh_cells_per_freq_list.size(); ++i1) { + neigh_cells_per_freq_list[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// NeighCellCDMA2000-v920 ::= SEQUENCE +SRSASN_CODE neigh_cell_cdma2000_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cells_per_freq_list_v920, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_cdma2000_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(neigh_cells_per_freq_list_v920, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void neigh_cell_cdma2000_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("neighCellsPerFreqList-v920"); + for (uint32_t i1 = 0; i1 < neigh_cells_per_freq_list_v920.size(); ++i1) { + neigh_cells_per_freq_list_v920[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// PRACH-ConfigInfo ::= SEQUENCE +SRSASN_CODE prach_cfg_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, prach_cfg_idx, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(bref.pack(high_speed_flag, 1)); + HANDLE_CODE(pack_unalign_integer(bref, zero_correlation_zone_cfg, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, prach_freq_offset, (uint8_t)0, (uint8_t)94)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(prach_cfg_idx, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(bref.unpack(high_speed_flag, 1)); + HANDLE_CODE(unpack_unalign_integer(zero_correlation_zone_cfg, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(prach_freq_offset, bref, (uint8_t)0, (uint8_t)94)); + + return SRSASN_SUCCESS; +} +void prach_cfg_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("prach-ConfigIndex", prach_cfg_idx); + j.write_bool("highSpeedFlag", high_speed_flag); + j.write_int("zeroCorrelationZoneConfig", zero_correlation_zone_cfg); + j.write_int("prach-FreqOffset", prach_freq_offset); + j.end_obj(); +} + +// ParametersCDMA2000-r11 ::= SEQUENCE +params_cdma2000_r11_s::params_cdma2000_r11_s() +{ + ext = false; + sys_time_info_r11_present = false; + params_hrpd_r11_present = false; + params1_xrtt_r11_present = false; +} +SRSASN_CODE params_cdma2000_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sys_time_info_r11_present, 1)); + HANDLE_CODE(bref.pack(params_hrpd_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11_present, 1)); + + if (sys_time_info_r11_present) { + HANDLE_CODE(sys_time_info_r11.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, search_win_size_r11, (uint8_t)0, (uint8_t)15)); + if (params_hrpd_r11_present) { + HANDLE_CODE(bref.pack(params_hrpd_r11.cell_resel_params_hrpd_r11_present, 1)); + HANDLE_CODE(params_hrpd_r11.pre_regist_info_hrpd_r11.pack(bref)); + if (params_hrpd_r11.cell_resel_params_hrpd_r11_present) { + HANDLE_CODE(params_hrpd_r11.cell_resel_params_hrpd_r11.pack(bref)); + } + } + if (params1_xrtt_r11_present) { + HANDLE_CODE(bref.pack(params1_xrtt_r11.csfb_regist_param1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11.long_code_state1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11.cell_resel_params1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11.ac_barr_cfg1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_r11.csfb_dual_rx_tx_support_r11_present, 1)); + if (params1_xrtt_r11.csfb_regist_param1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.csfb_regist_param1_xrtt_r11.pack(bref)); + } + if (params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11_present) { + HANDLE_CODE(params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11.pack(bref)); + } + if (params1_xrtt_r11.long_code_state1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.long_code_state1_xrtt_r11.pack(bref)); + } + if (params1_xrtt_r11.cell_resel_params1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.cell_resel_params1_xrtt_r11.pack(bref)); + } + if (params1_xrtt_r11.ac_barr_cfg1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.ac_barr_cfg1_xrtt_r11.pack(bref)); + } + if (params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11_present) { + HANDLE_CODE(bref.pack(params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11, 1)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE params_cdma2000_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sys_time_info_r11_present, 1)); + HANDLE_CODE(bref.unpack(params_hrpd_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11_present, 1)); + + if (sys_time_info_r11_present) { + HANDLE_CODE(sys_time_info_r11.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(search_win_size_r11, bref, (uint8_t)0, (uint8_t)15)); + if (params_hrpd_r11_present) { + HANDLE_CODE(bref.unpack(params_hrpd_r11.cell_resel_params_hrpd_r11_present, 1)); + HANDLE_CODE(params_hrpd_r11.pre_regist_info_hrpd_r11.unpack(bref)); + if (params_hrpd_r11.cell_resel_params_hrpd_r11_present) { + HANDLE_CODE(params_hrpd_r11.cell_resel_params_hrpd_r11.unpack(bref)); + } + } + if (params1_xrtt_r11_present) { + HANDLE_CODE(bref.unpack(params1_xrtt_r11.csfb_regist_param1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11.long_code_state1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11.cell_resel_params1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11.ac_barr_cfg1_xrtt_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_r11.csfb_dual_rx_tx_support_r11_present, 1)); + if (params1_xrtt_r11.csfb_regist_param1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.csfb_regist_param1_xrtt_r11.unpack(bref)); + } + if (params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11_present) { + HANDLE_CODE(params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11.unpack(bref)); + } + if (params1_xrtt_r11.long_code_state1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.long_code_state1_xrtt_r11.unpack(bref)); + } + if (params1_xrtt_r11.cell_resel_params1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.cell_resel_params1_xrtt_r11.unpack(bref)); + } + if (params1_xrtt_r11.ac_barr_cfg1_xrtt_r11_present) { + HANDLE_CODE(params1_xrtt_r11.ac_barr_cfg1_xrtt_r11.unpack(bref)); + } + if (params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11_present) { + HANDLE_CODE(bref.unpack(params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11, 1)); + } + } + + return SRSASN_SUCCESS; +} +void params_cdma2000_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sys_time_info_r11_present) { + j.write_fieldname("systemTimeInfo-r11"); + sys_time_info_r11.to_json(j); + } + j.write_int("searchWindowSize-r11", search_win_size_r11); + if (params_hrpd_r11_present) { + j.write_fieldname("parametersHRPD-r11"); + j.start_obj(); + j.write_fieldname("preRegistrationInfoHRPD-r11"); + params_hrpd_r11.pre_regist_info_hrpd_r11.to_json(j); + if (params_hrpd_r11.cell_resel_params_hrpd_r11_present) { + j.write_fieldname("cellReselectionParametersHRPD-r11"); + params_hrpd_r11.cell_resel_params_hrpd_r11.to_json(j); + } + j.end_obj(); + } + if (params1_xrtt_r11_present) { + j.write_fieldname("parameters1XRTT-r11"); + j.start_obj(); + if (params1_xrtt_r11.csfb_regist_param1_xrtt_r11_present) { + j.write_fieldname("csfb-RegistrationParam1XRTT-r11"); + params1_xrtt_r11.csfb_regist_param1_xrtt_r11.to_json(j); + } + if (params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11_present) { + j.write_fieldname("csfb-RegistrationParam1XRTT-Ext-r11"); + params1_xrtt_r11.csfb_regist_param1_xrtt_ext_r11.to_json(j); + } + if (params1_xrtt_r11.long_code_state1_xrtt_r11_present) { + j.write_str("longCodeState1XRTT-r11", params1_xrtt_r11.long_code_state1_xrtt_r11.to_string()); + } + if (params1_xrtt_r11.cell_resel_params1_xrtt_r11_present) { + j.write_fieldname("cellReselectionParameters1XRTT-r11"); + params1_xrtt_r11.cell_resel_params1_xrtt_r11.to_json(j); + } + if (params1_xrtt_r11.ac_barr_cfg1_xrtt_r11_present) { + j.write_fieldname("ac-BarringConfig1XRTT-r11"); + params1_xrtt_r11.ac_barr_cfg1_xrtt_r11.to_json(j); + } + if (params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11_present) { + j.write_bool("csfb-SupportForDualRxUEs-r11", params1_xrtt_r11.csfb_support_for_dual_rx_ues_r11); + } + if (params1_xrtt_r11.csfb_dual_rx_tx_support_r11_present) { + j.write_str("csfb-DualRxTxSupport-r11", "true"); + } + j.end_obj(); + } + j.end_obj(); +} + +void params_cdma2000_r11_s::sys_time_info_r11_c_::set(types::options e) +{ + type_ = e; +} +void params_cdma2000_r11_s::sys_time_info_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "params_cdma2000_r11_s::sys_time_info_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE params_cdma2000_r11_s::sys_time_info_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "params_cdma2000_r11_s::sys_time_info_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE params_cdma2000_r11_s::sys_time_info_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "params_cdma2000_r11_s::sys_time_info_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +params_cdma2000_r11_s::params_hrpd_r11_s_::params_hrpd_r11_s_() +{ + cell_resel_params_hrpd_r11_present = false; +} + +params_cdma2000_r11_s::params1_xrtt_r11_s_::params1_xrtt_r11_s_() +{ + csfb_regist_param1_xrtt_r11_present = false; + csfb_regist_param1_xrtt_ext_r11_present = false; + long_code_state1_xrtt_r11_present = false; + cell_resel_params1_xrtt_r11_present = false; + ac_barr_cfg1_xrtt_r11_present = false; + csfb_support_for_dual_rx_ues_r11_present = false; + csfb_dual_rx_tx_support_r11_present = false; +} + +// PowerRampingParameters ::= SEQUENCE +SRSASN_CODE pwr_ramp_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, pwr_ramp_step)); + HANDLE_CODE(pack_enum(bref, preamb_init_rx_target_pwr)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pwr_ramp_params_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(pwr_ramp_step, bref)); + HANDLE_CODE(unpack_enum(preamb_init_rx_target_pwr, bref)); + + return SRSASN_SUCCESS; +} +void pwr_ramp_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("powerRampingStep", pwr_ramp_step.to_string()); + j.write_str("preambleInitialReceivedTargetPower", preamb_init_rx_target_pwr.to_string()); + j.end_obj(); +} + +// RedistributionInterFreqInfo-r13 ::= SEQUENCE +redist_inter_freq_info_r13_s::redist_inter_freq_info_r13_s() +{ + redist_factor_freq_r13_present = false; + redist_neigh_cell_list_r13_present = false; +} +SRSASN_CODE redist_inter_freq_info_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(redist_factor_freq_r13_present, 1)); + HANDLE_CODE(bref.pack(redist_neigh_cell_list_r13_present, 1)); + + if (redist_factor_freq_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, redist_factor_freq_r13, (uint8_t)1, (uint8_t)10)); + } + if (redist_neigh_cell_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, redist_neigh_cell_list_r13, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE redist_inter_freq_info_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(redist_factor_freq_r13_present, 1)); + HANDLE_CODE(bref.unpack(redist_neigh_cell_list_r13_present, 1)); + + if (redist_factor_freq_r13_present) { + HANDLE_CODE(unpack_unalign_integer(redist_factor_freq_r13, bref, (uint8_t)1, (uint8_t)10)); + } + if (redist_neigh_cell_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(redist_neigh_cell_list_r13, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void redist_inter_freq_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (redist_factor_freq_r13_present) { + j.write_int("redistributionFactorFreq-r13", redist_factor_freq_r13); + } + if (redist_neigh_cell_list_r13_present) { + j.start_array("redistributionNeighCellList-r13"); + for (uint32_t i1 = 0; i1 < redist_neigh_cell_list_r13.size(); ++i1) { + redist_neigh_cell_list_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-CBR-PSSCH-TxConfig-r14 ::= SEQUENCE +SRSASN_CODE sl_cbr_pssch_tx_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cr_limit_r14, (uint16_t)0, (uint16_t)10000)); + HANDLE_CODE(tx_params_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_cbr_pssch_tx_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cr_limit_r14, bref, (uint16_t)0, (uint16_t)10000)); + HANDLE_CODE(tx_params_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_cbr_pssch_tx_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cr-Limit-r14", cr_limit_r14); + j.write_fieldname("tx-Parameters-r14"); + tx_params_r14.to_json(j); + j.end_obj(); +} + +// SL-DiscConfigOtherInterFreq-r13 ::= SEQUENCE +sl_disc_cfg_other_inter_freq_r13_s::sl_disc_cfg_other_inter_freq_r13_s() +{ + tx_pwr_info_r13_present = false; + ref_carrier_common_r13_present = false; + disc_sync_cfg_r13_present = false; + disc_cell_sel_info_r13_present = false; +} +SRSASN_CODE sl_disc_cfg_other_inter_freq_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_pwr_info_r13_present, 1)); + HANDLE_CODE(bref.pack(ref_carrier_common_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_sync_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_cell_sel_info_r13_present, 1)); + + if (tx_pwr_info_r13_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(tx_pwr_info_r13)[0], tx_pwr_info_r13.size())); + } + if (disc_sync_cfg_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_sync_cfg_r13, 1, 16)); + } + if (disc_cell_sel_info_r13_present) { + HANDLE_CODE(disc_cell_sel_info_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_other_inter_freq_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_pwr_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(ref_carrier_common_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_sync_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_cell_sel_info_r13_present, 1)); + + if (tx_pwr_info_r13_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(tx_pwr_info_r13)[0], bref, tx_pwr_info_r13.size())); + } + if (disc_sync_cfg_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_sync_cfg_r13, bref, 1, 16)); + } + if (disc_cell_sel_info_r13_present) { + HANDLE_CODE(disc_cell_sel_info_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_disc_cfg_other_inter_freq_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_pwr_info_r13_present) { + j.start_array("txPowerInfo-r13"); + for (uint32_t i1 = 0; i1 < tx_pwr_info_r13.size(); ++i1) { + tx_pwr_info_r13[i1].to_json(j); + } + j.end_array(); + } + if (ref_carrier_common_r13_present) { + j.write_str("refCarrierCommon-r13", "pCell"); + } + if (disc_sync_cfg_r13_present) { + j.start_array("discSyncConfig-r13"); + for (uint32_t i1 = 0; i1 < disc_sync_cfg_r13.size(); ++i1) { + disc_sync_cfg_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_cell_sel_info_r13_present) { + j.write_fieldname("discCellSelectionInfo-r13"); + disc_cell_sel_info_r13.to_json(j); + } + j.end_obj(); +} + +// SL-HoppingConfigComm-r12 ::= SEQUENCE +SRSASN_CODE sl_hop_cfg_comm_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, hop_param_r12, (uint16_t)0, (uint16_t)504)); + HANDLE_CODE(pack_enum(bref, num_subbands_r12)); + HANDLE_CODE(pack_unalign_integer(bref, rb_offset_r12, (uint8_t)0, (uint8_t)110)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_hop_cfg_comm_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(hop_param_r12, bref, (uint16_t)0, (uint16_t)504)); + HANDLE_CODE(unpack_enum(num_subbands_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(rb_offset_r12, bref, (uint8_t)0, (uint8_t)110)); + + return SRSASN_SUCCESS; +} +void sl_hop_cfg_comm_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("hoppingParameter-r12", hop_param_r12); + j.write_str("numSubbands-r12", num_subbands_r12.to_string()); + j.write_int("rb-Offset-r12", rb_offset_r12); + j.end_obj(); +} + +// SL-InterFreqInfoV2X-r14 ::= SEQUENCE +sl_inter_freq_info_v2x_r14_s::sl_inter_freq_info_v2x_r14_s() +{ + ext = false; + plmn_id_list_r14_present = false; + sl_max_tx_pwr_r14_present = false; + sl_bw_r14_present = false; + v2x_sched_pool_r14_present = false; + v2x_ue_cfg_list_r14_present = false; + add_spec_emission_v2x_r14_present = false; + v2x_freq_sel_cfg_list_r15_present = false; +} +SRSASN_CODE sl_inter_freq_info_v2x_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(plmn_id_list_r14_present, 1)); + HANDLE_CODE(bref.pack(sl_max_tx_pwr_r14_present, 1)); + HANDLE_CODE(bref.pack(sl_bw_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_sched_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_ue_cfg_list_r14_present, 1)); + + if (plmn_id_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r14, 1, 6)); + } + HANDLE_CODE(pack_unalign_integer(bref, v2x_comm_carrier_freq_r14, (uint32_t)0, (uint32_t)262143)); + if (sl_max_tx_pwr_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sl_max_tx_pwr_r14, (int8_t)-30, (int8_t)33)); + } + if (sl_bw_r14_present) { + HANDLE_CODE(pack_enum(bref, sl_bw_r14)); + } + if (v2x_sched_pool_r14_present) { + HANDLE_CODE(v2x_sched_pool_r14.pack(bref)); + } + if (v2x_ue_cfg_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_ue_cfg_list_r14, 1, 16)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(add_spec_emission_v2x_r14_present != (add_spec_emission_v2x_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= add_spec_emission_v2x_r14_present; + rrc_asn1_warn_assert(v2x_freq_sel_cfg_list_r15_present != (v2x_freq_sel_cfg_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= v2x_freq_sel_cfg_list_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(add_spec_emission_v2x_r14_present, 1)); + if (add_spec_emission_v2x_r14_present) { + HANDLE_CODE(add_spec_emission_v2x_r14->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(v2x_freq_sel_cfg_list_r15_present, 1)); + if (v2x_freq_sel_cfg_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *v2x_freq_sel_cfg_list_r15, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_inter_freq_info_v2x_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(plmn_id_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(sl_max_tx_pwr_r14_present, 1)); + HANDLE_CODE(bref.unpack(sl_bw_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_sched_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_ue_cfg_list_r14_present, 1)); + + if (plmn_id_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r14, bref, 1, 6)); + } + HANDLE_CODE(unpack_unalign_integer(v2x_comm_carrier_freq_r14, bref, (uint32_t)0, (uint32_t)262143)); + if (sl_max_tx_pwr_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sl_max_tx_pwr_r14, bref, (int8_t)-30, (int8_t)33)); + } + if (sl_bw_r14_present) { + HANDLE_CODE(unpack_enum(sl_bw_r14, bref)); + } + if (v2x_sched_pool_r14_present) { + HANDLE_CODE(v2x_sched_pool_r14.unpack(bref)); + } + if (v2x_ue_cfg_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_ue_cfg_list_r14, bref, 1, 16)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(add_spec_emission_v2x_r14_present, 1)); + if (add_spec_emission_v2x_r14_present) { + add_spec_emission_v2x_r14 = make_copy_ptr(add_spec_emission_v2x_r14_c_()); + HANDLE_CODE(add_spec_emission_v2x_r14->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(v2x_freq_sel_cfg_list_r15_present, 1)); + if (v2x_freq_sel_cfg_list_r15_present) { + v2x_freq_sel_cfg_list_r15 = make_copy_ptr(sl_v2x_freq_sel_cfg_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*v2x_freq_sel_cfg_list_r15, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_inter_freq_info_v2x_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_list_r14_present) { + j.start_array("plmn-IdentityList-r14"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r14.size(); ++i1) { + plmn_id_list_r14[i1].to_json(j); + } + j.end_array(); + } + j.write_int("v2x-CommCarrierFreq-r14", v2x_comm_carrier_freq_r14); + if (sl_max_tx_pwr_r14_present) { + j.write_int("sl-MaxTxPower-r14", sl_max_tx_pwr_r14); + } + if (sl_bw_r14_present) { + j.write_str("sl-Bandwidth-r14", sl_bw_r14.to_string()); + } + if (v2x_sched_pool_r14_present) { + j.write_fieldname("v2x-SchedulingPool-r14"); + v2x_sched_pool_r14.to_json(j); + } + if (v2x_ue_cfg_list_r14_present) { + j.start_array("v2x-UE-ConfigList-r14"); + for (uint32_t i1 = 0; i1 < v2x_ue_cfg_list_r14.size(); ++i1) { + v2x_ue_cfg_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (add_spec_emission_v2x_r14_present) { + j.write_fieldname("additionalSpectrumEmissionV2X-r14"); + add_spec_emission_v2x_r14->to_json(j); + } + if (v2x_freq_sel_cfg_list_r15_present) { + j.start_array("v2x-FreqSelectionConfigList-r15"); + for (uint32_t i1 = 0; i1 < v2x_freq_sel_cfg_list_r15->size(); ++i1) { + ((*v2x_freq_sel_cfg_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +void sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::destroy_() {} +void sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::add_spec_emission_v2x_r14_c_( + const sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::add_spec_emission_r14: + c.init(other.c.get()); + break; + case types::add_spec_emission_v1440: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_"); + } +} +sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_& sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_:: + operator=(const sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::add_spec_emission_r14: + c.set(other.c.get()); + break; + case types::add_spec_emission_v1440: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_"); + } + + return *this; +} +void sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::add_spec_emission_r14: + j.write_int("additionalSpectrumEmission-r14", c.get()); + break; + case types::add_spec_emission_v1440: + j.write_int("additionalSpectrumEmission-v1440", c.get()); + break; + default: + log_invalid_choice_id(type_, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::add_spec_emission_r14: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)32)); + break; + case types::add_spec_emission_v1440: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)33, (uint16_t)288)); + break; + default: + log_invalid_choice_id(type_, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::add_spec_emission_r14: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)32)); + break; + case types::add_spec_emission_v1440: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)33, (uint16_t)288)); + break; + default: + log_invalid_choice_id(type_, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-PPPR-Dest-CarrierFreq ::= SEQUENCE +sl_pppr_dest_carrier_freq_s::sl_pppr_dest_carrier_freq_s() +{ + dest_info_list_r15_present = false; + allowed_carrier_freq_list_r15_present = false; +} +SRSASN_CODE sl_pppr_dest_carrier_freq_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dest_info_list_r15_present, 1)); + HANDLE_CODE(bref.pack(allowed_carrier_freq_list_r15_present, 1)); + + if (dest_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, dest_info_list_r15, 1, 16)); + } + if (allowed_carrier_freq_list_r15_present) { + HANDLE_CODE(allowed_carrier_freq_list_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pppr_dest_carrier_freq_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dest_info_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(allowed_carrier_freq_list_r15_present, 1)); + + if (dest_info_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(dest_info_list_r15, bref, 1, 16)); + } + if (allowed_carrier_freq_list_r15_present) { + HANDLE_CODE(allowed_carrier_freq_list_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_pppr_dest_carrier_freq_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dest_info_list_r15_present) { + j.start_array("destinationInfoList-r15"); + for (uint32_t i1 = 0; i1 < dest_info_list_r15.size(); ++i1) { + j.write_str(dest_info_list_r15[i1].to_string()); + } + j.end_array(); + } + if (allowed_carrier_freq_list_r15_present) { + j.write_fieldname("allowedCarrierFreqList-r15"); + allowed_carrier_freq_list_r15.to_json(j); + } + j.end_obj(); +} + +// SL-ResourcesInterFreq-r13 ::= SEQUENCE +sl_res_inter_freq_r13_s::sl_res_inter_freq_r13_s() +{ + disc_rx_res_inter_freq_r13_present = false; + disc_tx_res_inter_freq_r13_present = false; +} +SRSASN_CODE sl_res_inter_freq_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(disc_rx_res_inter_freq_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_res_inter_freq_r13_present, 1)); + + if (disc_rx_res_inter_freq_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_rx_res_inter_freq_r13, 1, 16)); + } + if (disc_tx_res_inter_freq_r13_present) { + HANDLE_CODE(disc_tx_res_inter_freq_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_res_inter_freq_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(disc_rx_res_inter_freq_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_res_inter_freq_r13_present, 1)); + + if (disc_rx_res_inter_freq_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_rx_res_inter_freq_r13, bref, 1, 16)); + } + if (disc_tx_res_inter_freq_r13_present) { + HANDLE_CODE(disc_tx_res_inter_freq_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_res_inter_freq_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_rx_res_inter_freq_r13_present) { + j.start_array("discRxResourcesInterFreq-r13"); + for (uint32_t i1 = 0; i1 < disc_rx_res_inter_freq_r13.size(); ++i1) { + disc_rx_res_inter_freq_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_tx_res_inter_freq_r13_present) { + j.write_fieldname("discTxResourcesInterFreq-r13"); + disc_tx_res_inter_freq_r13.to_json(j); + } + j.end_obj(); +} + +// SL-SyncConfig-r12 ::= SEQUENCE +sl_sync_cfg_r12_s::sl_sync_cfg_r12_s() +{ + ext = false; + tx_params_r12_present = false; + rx_params_ncell_r12_present = false; + sync_tx_periodic_r13_present = false; + sync_offset_ind_v1430_present = false; + gnss_sync_r14_present = false; + sync_offset_ind2_r14_present = false; + sync_offset_ind3_r14_present = false; + slss_tx_disabled_r15_present = false; +} +SRSASN_CODE sl_sync_cfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tx_params_r12_present, 1)); + HANDLE_CODE(bref.pack(rx_params_ncell_r12_present, 1)); + + HANDLE_CODE(pack_enum(bref, sync_cp_len_r12)); + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind_r12, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(pack_unalign_integer(bref, slssid_r12, (uint8_t)0, (uint8_t)167)); + if (tx_params_r12_present) { + HANDLE_CODE(bref.pack(tx_params_r12.sync_info_reserved_r12_present, 1)); + HANDLE_CODE(tx_params_r12.sync_tx_params_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, tx_params_r12.sync_tx_thresh_ic_r12, (uint8_t)0, (uint8_t)13)); + if (tx_params_r12.sync_info_reserved_r12_present) { + HANDLE_CODE(tx_params_r12.sync_info_reserved_r12.pack(bref)); + } + } + if (rx_params_ncell_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, rx_params_ncell_r12.pci_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, rx_params_ncell_r12.disc_sync_win_r12)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags[0] |= sync_tx_periodic_r13_present; + group_flags[1] |= sync_offset_ind_v1430_present; + group_flags[1] |= gnss_sync_r14_present; + group_flags[2] |= sync_offset_ind2_r14_present; + group_flags[2] |= sync_offset_ind3_r14_present; + group_flags[3] |= slss_tx_disabled_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sync_tx_periodic_r13_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sync_offset_ind_v1430_present, 1)); + HANDLE_CODE(bref.pack(gnss_sync_r14_present, 1)); + if (sync_offset_ind_v1430_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind_v1430, (uint8_t)40, (uint8_t)159)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sync_offset_ind2_r14_present, 1)); + HANDLE_CODE(bref.pack(sync_offset_ind3_r14_present, 1)); + if (sync_offset_ind2_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind2_r14, (uint8_t)0, (uint8_t)159)); + } + if (sync_offset_ind3_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind3_r14, (uint8_t)0, (uint8_t)159)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(slss_tx_disabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_sync_cfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(tx_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(rx_params_ncell_r12_present, 1)); + + HANDLE_CODE(unpack_enum(sync_cp_len_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind_r12, bref, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(unpack_unalign_integer(slssid_r12, bref, (uint8_t)0, (uint8_t)167)); + if (tx_params_r12_present) { + HANDLE_CODE(bref.unpack(tx_params_r12.sync_info_reserved_r12_present, 1)); + HANDLE_CODE(tx_params_r12.sync_tx_params_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(tx_params_r12.sync_tx_thresh_ic_r12, bref, (uint8_t)0, (uint8_t)13)); + if (tx_params_r12.sync_info_reserved_r12_present) { + HANDLE_CODE(tx_params_r12.sync_info_reserved_r12.unpack(bref)); + } + } + if (rx_params_ncell_r12_present) { + HANDLE_CODE(unpack_unalign_integer(rx_params_ncell_r12.pci_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(rx_params_ncell_r12.disc_sync_win_r12, bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sync_tx_periodic_r13_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sync_offset_ind_v1430_present, 1)); + HANDLE_CODE(bref.unpack(gnss_sync_r14_present, 1)); + if (sync_offset_ind_v1430_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind_v1430, bref, (uint8_t)40, (uint8_t)159)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sync_offset_ind2_r14_present, 1)); + HANDLE_CODE(bref.unpack(sync_offset_ind3_r14_present, 1)); + if (sync_offset_ind2_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind2_r14, bref, (uint8_t)0, (uint8_t)159)); + } + if (sync_offset_ind3_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind3_r14, bref, (uint8_t)0, (uint8_t)159)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(slss_tx_disabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sl_sync_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("syncCP-Len-r12", sync_cp_len_r12.to_string()); + j.write_int("syncOffsetIndicator-r12", sync_offset_ind_r12); + j.write_int("slssid-r12", slssid_r12); + if (tx_params_r12_present) { + j.write_fieldname("txParameters-r12"); + j.start_obj(); + j.write_fieldname("syncTxParameters-r12"); + tx_params_r12.sync_tx_params_r12.to_json(j); + j.write_int("syncTxThreshIC-r12", tx_params_r12.sync_tx_thresh_ic_r12); + if (tx_params_r12.sync_info_reserved_r12_present) { + j.write_str("syncInfoReserved-r12", tx_params_r12.sync_info_reserved_r12.to_string()); + } + j.end_obj(); + } + if (rx_params_ncell_r12_present) { + j.write_fieldname("rxParamsNCell-r12"); + j.start_obj(); + j.write_int("physCellId-r12", rx_params_ncell_r12.pci_r12); + j.write_str("discSyncWindow-r12", rx_params_ncell_r12.disc_sync_win_r12.to_string()); + j.end_obj(); + } + if (sync_tx_periodic_r13_present) { + j.write_str("syncTxPeriodic-r13", "true"); + } + if (sync_offset_ind_v1430_present) { + j.write_int("syncOffsetIndicator-v1430", sync_offset_ind_v1430); + } + if (gnss_sync_r14_present) { + j.write_str("gnss-Sync-r14", "true"); + } + if (sync_offset_ind2_r14_present) { + j.write_int("syncOffsetIndicator2-r14", sync_offset_ind2_r14); + } + if (sync_offset_ind3_r14_present) { + j.write_int("syncOffsetIndicator3-r14", sync_offset_ind3_r14); + } + if (slss_tx_disabled_r15_present) { + j.write_str("slss-TxDisabled-r15", "true"); + } + j.end_obj(); +} + +sl_sync_cfg_r12_s::tx_params_r12_s_::tx_params_r12_s_() +{ + sync_info_reserved_r12_present = false; +} + +// SS-RSSI-Measurement-r15 ::= SEQUENCE +SRSASN_CODE ss_rssi_meas_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(meas_slots_r15.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, end_symbol_r15, (uint8_t)0, (uint8_t)3)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ss_rssi_meas_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(meas_slots_r15.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(end_symbol_r15, bref, (uint8_t)0, (uint8_t)3)); + + return SRSASN_SUCCESS; +} +void ss_rssi_meas_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("measurementSlots-r15", meas_slots_r15.to_string()); + j.write_int("endSymbol-r15", end_symbol_r15); + j.end_obj(); +} + +// SystemInformationBlockType1-v10l0-IEs ::= SEQUENCE +sib_type1_v10l0_ies_s::sib_type1_v10l0_ies_s() +{ + freq_band_info_v10l0_present = false; + multi_band_info_list_v10l0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v10l0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_info_v10l0_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10l0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_band_info_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_info_v10l0, 1, 8)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10l0, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v10l0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_info_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_band_info_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_info_v10l0, bref, 1, 8)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10l0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v10l0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_info_v10l0_present) { + j.start_array("freqBandInfo-v10l0"); + for (uint32_t i1 = 0; i1 < freq_band_info_v10l0.size(); ++i1) { + freq_band_info_v10l0[i1].to_json(j); + } + j.end_array(); + } + if (multi_band_info_list_v10l0_present) { + j.start_array("multiBandInfoList-v10l0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < multi_band_info_list_v10l0[i1].size(); ++i2) { + multi_band_info_list_v10l0[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v1310-IEs ::= SEQUENCE +sib_type1_v1310_ies_s::sib_type1_v1310_ies_s() +{ + hyper_sfn_r13_present = false; + e_drx_allowed_r13_present = false; + cell_sel_info_ce_r13_present = false; + bw_reduced_access_related_info_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(hyper_sfn_r13_present, 1)); + HANDLE_CODE(bref.pack(e_drx_allowed_r13_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_ce_r13_present, 1)); + HANDLE_CODE(bref.pack(bw_reduced_access_related_info_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (hyper_sfn_r13_present) { + HANDLE_CODE(hyper_sfn_r13.pack(bref)); + } + if (cell_sel_info_ce_r13_present) { + HANDLE_CODE(cell_sel_info_ce_r13.pack(bref)); + } + if (bw_reduced_access_related_info_r13_present) { + HANDLE_CODE(bref.pack(bw_reduced_access_related_info_r13.sched_info_list_br_r13_present, 1)); + HANDLE_CODE(bref.pack(bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13_present, 1)); + HANDLE_CODE(bref.pack(bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13_present, 1)); + HANDLE_CODE(bref.pack(bw_reduced_access_related_info_r13.si_validity_time_r13_present, 1)); + HANDLE_CODE(bref.pack(bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13_present, 1)); + HANDLE_CODE(pack_enum(bref, bw_reduced_access_related_info_r13.si_win_len_br_r13)); + HANDLE_CODE(pack_enum(bref, bw_reduced_access_related_info_r13.si_repeat_pattern_r13)); + if (bw_reduced_access_related_info_r13.sched_info_list_br_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, bw_reduced_access_related_info_r13.sched_info_list_br_r13, 1, 32)); + } + if (bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13_present) { + HANDLE_CODE(bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13.pack(bref)); + } + if (bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13_present) { + HANDLE_CODE(bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13.pack(bref)); + } + HANDLE_CODE( + pack_unalign_integer(bref, bw_reduced_access_related_info_r13.start_symbol_br_r13, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, bw_reduced_access_related_info_r13.si_hop_cfg_common_r13)); + if (bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13, 1, 32, + UnalignedIntegerPacker(0, 3))); + } + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(hyper_sfn_r13_present, 1)); + HANDLE_CODE(bref.unpack(e_drx_allowed_r13_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_ce_r13_present, 1)); + HANDLE_CODE(bref.unpack(bw_reduced_access_related_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (hyper_sfn_r13_present) { + HANDLE_CODE(hyper_sfn_r13.unpack(bref)); + } + if (cell_sel_info_ce_r13_present) { + HANDLE_CODE(cell_sel_info_ce_r13.unpack(bref)); + } + if (bw_reduced_access_related_info_r13_present) { + HANDLE_CODE(bref.unpack(bw_reduced_access_related_info_r13.sched_info_list_br_r13_present, 1)); + HANDLE_CODE(bref.unpack(bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13_present, 1)); + HANDLE_CODE(bref.unpack(bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13_present, 1)); + HANDLE_CODE(bref.unpack(bw_reduced_access_related_info_r13.si_validity_time_r13_present, 1)); + HANDLE_CODE(bref.unpack(bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13_present, 1)); + HANDLE_CODE(unpack_enum(bw_reduced_access_related_info_r13.si_win_len_br_r13, bref)); + HANDLE_CODE(unpack_enum(bw_reduced_access_related_info_r13.si_repeat_pattern_r13, bref)); + if (bw_reduced_access_related_info_r13.sched_info_list_br_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(bw_reduced_access_related_info_r13.sched_info_list_br_r13, bref, 1, 32)); + } + if (bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13_present) { + HANDLE_CODE(bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13.unpack(bref)); + } + if (bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13_present) { + HANDLE_CODE(bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13.unpack(bref)); + } + HANDLE_CODE( + unpack_unalign_integer(bw_reduced_access_related_info_r13.start_symbol_br_r13, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_enum(bw_reduced_access_related_info_r13.si_hop_cfg_common_r13, bref)); + if (bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13, bref, 1, 32, + UnalignedIntegerPacker(0, 3))); + } + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hyper_sfn_r13_present) { + j.write_str("hyperSFN-r13", hyper_sfn_r13.to_string()); + } + if (e_drx_allowed_r13_present) { + j.write_str("eDRX-Allowed-r13", "true"); + } + if (cell_sel_info_ce_r13_present) { + j.write_fieldname("cellSelectionInfoCE-r13"); + cell_sel_info_ce_r13.to_json(j); + } + if (bw_reduced_access_related_info_r13_present) { + j.write_fieldname("bandwidthReducedAccessRelatedInfo-r13"); + j.start_obj(); + j.write_str("si-WindowLength-BR-r13", bw_reduced_access_related_info_r13.si_win_len_br_r13.to_string()); + j.write_str("si-RepetitionPattern-r13", bw_reduced_access_related_info_r13.si_repeat_pattern_r13.to_string()); + if (bw_reduced_access_related_info_r13.sched_info_list_br_r13_present) { + j.start_array("schedulingInfoList-BR-r13"); + for (uint32_t i1 = 0; i1 < bw_reduced_access_related_info_r13.sched_info_list_br_r13.size(); ++i1) { + bw_reduced_access_related_info_r13.sched_info_list_br_r13[i1].to_json(j); + } + j.end_array(); + } + if (bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13_present) { + j.write_fieldname("fdd-DownlinkOrTddSubframeBitmapBR-r13"); + bw_reduced_access_related_info_r13.fdd_dl_or_tdd_sf_bitmap_br_r13.to_json(j); + } + if (bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13_present) { + j.write_str("fdd-UplinkSubframeBitmapBR-r13", + bw_reduced_access_related_info_r13.fdd_ul_sf_bitmap_br_r13.to_string()); + } + j.write_int("startSymbolBR-r13", bw_reduced_access_related_info_r13.start_symbol_br_r13); + j.write_str("si-HoppingConfigCommon-r13", bw_reduced_access_related_info_r13.si_hop_cfg_common_r13.to_string()); + if (bw_reduced_access_related_info_r13.si_validity_time_r13_present) { + j.write_str("si-ValidityTime-r13", "true"); + } + if (bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13_present) { + j.start_array("systemInfoValueTagList-r13"); + for (uint32_t i1 = 0; i1 < bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13.size(); ++i1) { + j.write_int(bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13[i1]); + } + j.end_array(); + } + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::bw_reduced_access_related_info_r13_s_() +{ + sched_info_list_br_r13_present = false; + fdd_dl_or_tdd_sf_bitmap_br_r13_present = false; + fdd_ul_sf_bitmap_br_r13_present = false; + si_validity_time_r13_present = false; + sys_info_value_tag_list_r13_present = false; +} + +void sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::destroy_() +{ + switch (type_) { + case types::sf_pattern10_r13: + c.destroy >(); + break; + case types::sf_pattern40_r13: + c.destroy >(); + break; + default: + break; + } +} +void sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::set( + types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sf_pattern10_r13: + c.init >(); + break; + case types::sf_pattern40_r13: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_"); + } +} +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_:: + fdd_dl_or_tdd_sf_bitmap_br_r13_c_( + const sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf_pattern10_r13: + c.init(other.c.get >()); + break; + case types::sf_pattern40_r13: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_"); + } +} +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_& +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_:: +operator=(const sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf_pattern10_r13: + c.set(other.c.get >()); + break; + case types::sf_pattern40_r13: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_"); + } + + return *this; +} +void sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf_pattern10_r13: + j.write_str("subframePattern10-r13", c.get >().to_string()); + break; + case types::sf_pattern40_r13: + j.write_str("subframePattern40-r13", c.get >().to_string()); + break; + default: + log_invalid_choice_id( + type_, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::pack( + bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf_pattern10_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_pattern40_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id( + type_, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf_pattern10_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_pattern40_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id( + type_, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType2-v9i0-IEs ::= SEQUENCE +sib_type2_v9i0_ies_s::sib_type2_v9i0_ies_s() +{ + non_crit_ext_present = false; + dummy_present = false; +} +SRSASN_CODE sib_type2_v9i0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); + + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type2_v9i0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(dummy_present, 1)); + + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type2_v9i0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_str("nonCriticalExtension", non_crit_ext.to_string()); + } + if (dummy_present) { + j.write_fieldname("dummy"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SystemInformationBlockType5-v10j0-IEs ::= SEQUENCE +sib_type5_v10j0_ies_s::sib_type5_v10j0_ies_s() +{ + inter_freq_carrier_freq_list_v10j0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type5_v10j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v10j0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v10j0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list_v10j0, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type5_v10j0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v10j0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v10j0_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list_v10j0, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type5_v10j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_freq_carrier_freq_list_v10j0_present) { + j.start_array("interFreqCarrierFreqList-v10j0"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v10j0.size(); ++i1) { + inter_freq_carrier_freq_list_v10j0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// ThresholdListNR-r15 ::= SEQUENCE +thres_list_nr_r15_s::thres_list_nr_r15_s() +{ + nr_rsrp_r15_present = false; + nr_rsrq_r15_present = false; + nr_sinr_r15_present = false; +} +SRSASN_CODE thres_list_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nr_rsrp_r15_present, 1)); + HANDLE_CODE(bref.pack(nr_rsrq_r15_present, 1)); + HANDLE_CODE(bref.pack(nr_sinr_r15_present, 1)); + + if (nr_rsrp_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, nr_rsrp_r15, (uint8_t)0, (uint8_t)127)); + } + if (nr_rsrq_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, nr_rsrq_r15, (uint8_t)0, (uint8_t)127)); + } + if (nr_sinr_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, nr_sinr_r15, (uint8_t)0, (uint8_t)127)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE thres_list_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nr_rsrp_r15_present, 1)); + HANDLE_CODE(bref.unpack(nr_rsrq_r15_present, 1)); + HANDLE_CODE(bref.unpack(nr_sinr_r15_present, 1)); + + if (nr_rsrp_r15_present) { + HANDLE_CODE(unpack_unalign_integer(nr_rsrp_r15, bref, (uint8_t)0, (uint8_t)127)); + } + if (nr_rsrq_r15_present) { + HANDLE_CODE(unpack_unalign_integer(nr_rsrq_r15, bref, (uint8_t)0, (uint8_t)127)); + } + if (nr_sinr_r15_present) { + HANDLE_CODE(unpack_unalign_integer(nr_sinr_r15, bref, (uint8_t)0, (uint8_t)127)); + } + + return SRSASN_SUCCESS; +} +void thres_list_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (nr_rsrp_r15_present) { + j.write_int("nr-RSRP-r15", nr_rsrp_r15); + } + if (nr_rsrq_r15_present) { + j.write_int("nr-RSRQ-r15", nr_rsrq_r15); + } + if (nr_sinr_r15_present) { + j.write_int("nr-SINR-r15", nr_sinr_r15); + } + j.end_obj(); +} + +// UDT-Restricting-r13 ::= SEQUENCE +udt_restricting_r13_s::udt_restricting_r13_s() +{ + udt_restricting_r13_present = false; + udt_restricting_time_r13_present = false; +} +SRSASN_CODE udt_restricting_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(udt_restricting_r13_present, 1)); + HANDLE_CODE(bref.pack(udt_restricting_time_r13_present, 1)); + + if (udt_restricting_time_r13_present) { + HANDLE_CODE(pack_enum(bref, udt_restricting_time_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE udt_restricting_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(udt_restricting_r13_present, 1)); + HANDLE_CODE(bref.unpack(udt_restricting_time_r13_present, 1)); + + if (udt_restricting_time_r13_present) { + HANDLE_CODE(unpack_enum(udt_restricting_time_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void udt_restricting_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (udt_restricting_r13_present) { + j.write_str("udt-Restricting-r13", "true"); + } + if (udt_restricting_time_r13_present) { + j.write_str("udt-RestrictingTime-r13", udt_restricting_time_r13.to_string()); + } + j.end_obj(); +} + +// UL-ReferenceSignalsPUSCH ::= SEQUENCE +SRSASN_CODE ul_ref_sigs_pusch_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(group_hop_enabled, 1)); + HANDLE_CODE(pack_unalign_integer(bref, group_assign_pusch, (uint8_t)0, (uint8_t)29)); + HANDLE_CODE(bref.pack(seq_hop_enabled, 1)); + HANDLE_CODE(pack_unalign_integer(bref, cyclic_shift, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ref_sigs_pusch_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(group_hop_enabled, 1)); + HANDLE_CODE(unpack_unalign_integer(group_assign_pusch, bref, (uint8_t)0, (uint8_t)29)); + HANDLE_CODE(bref.unpack(seq_hop_enabled, 1)); + HANDLE_CODE(unpack_unalign_integer(cyclic_shift, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void ul_ref_sigs_pusch_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("groupHoppingEnabled", group_hop_enabled); + j.write_int("groupAssignmentPUSCH", group_assign_pusch); + j.write_bool("sequenceHoppingEnabled", seq_hop_enabled); + j.write_int("cyclicShift", cyclic_shift); + j.end_obj(); +} + +// WLAN-Identifiers-r12 ::= SEQUENCE +wlan_ids_r12_s::wlan_ids_r12_s() +{ + ext = false; + ssid_r12_present = false; + bssid_r12_present = false; + hessid_r12_present = false; +} +SRSASN_CODE wlan_ids_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ssid_r12_present, 1)); + HANDLE_CODE(bref.pack(bssid_r12_present, 1)); + HANDLE_CODE(bref.pack(hessid_r12_present, 1)); + + if (ssid_r12_present) { + HANDLE_CODE(ssid_r12.pack(bref)); + } + if (bssid_r12_present) { + HANDLE_CODE(bssid_r12.pack(bref)); + } + if (hessid_r12_present) { + HANDLE_CODE(hessid_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_ids_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ssid_r12_present, 1)); + HANDLE_CODE(bref.unpack(bssid_r12_present, 1)); + HANDLE_CODE(bref.unpack(hessid_r12_present, 1)); + + if (ssid_r12_present) { + HANDLE_CODE(ssid_r12.unpack(bref)); + } + if (bssid_r12_present) { + HANDLE_CODE(bssid_r12.unpack(bref)); + } + if (hessid_r12_present) { + HANDLE_CODE(hessid_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void wlan_ids_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssid_r12_present) { + j.write_str("ssid-r12", ssid_r12.to_string()); + } + if (bssid_r12_present) { + j.write_str("bssid-r12", bssid_r12.to_string()); + } + if (hessid_r12_present) { + j.write_str("hessid-r12", hessid_r12.to_string()); + } + j.end_obj(); +} + +// AC-BarringPerPLMN-r12 ::= SEQUENCE +ac_barr_per_plmn_r12_s::ac_barr_per_plmn_r12_s() +{ + ac_barr_info_r12_present = false; + ac_barr_skip_for_mmtel_voice_r12_present = false; + ac_barr_skip_for_mmtel_video_r12_present = false; + ac_barr_skip_for_sms_r12_present = false; + ac_barr_for_csfb_r12_present = false; + ssac_barr_for_mmtel_voice_r12_present = false; + ssac_barr_for_mmtel_video_r12_present = false; +} +SRSASN_CODE ac_barr_per_plmn_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ac_barr_info_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_skip_for_mmtel_voice_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_skip_for_mmtel_video_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_skip_for_sms_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_for_csfb_r12_present, 1)); + HANDLE_CODE(bref.pack(ssac_barr_for_mmtel_voice_r12_present, 1)); + HANDLE_CODE(bref.pack(ssac_barr_for_mmtel_video_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, plmn_id_idx_r12, (uint8_t)1, (uint8_t)6)); + if (ac_barr_info_r12_present) { + HANDLE_CODE(bref.pack(ac_barr_info_r12.ac_barr_for_mo_sig_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_info_r12.ac_barr_for_mo_data_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_info_r12.ac_barr_for_emergency_r12, 1)); + if (ac_barr_info_r12.ac_barr_for_mo_sig_r12_present) { + HANDLE_CODE(ac_barr_info_r12.ac_barr_for_mo_sig_r12.pack(bref)); + } + if (ac_barr_info_r12.ac_barr_for_mo_data_r12_present) { + HANDLE_CODE(ac_barr_info_r12.ac_barr_for_mo_data_r12.pack(bref)); + } + } + if (ac_barr_for_csfb_r12_present) { + HANDLE_CODE(ac_barr_for_csfb_r12.pack(bref)); + } + if (ssac_barr_for_mmtel_voice_r12_present) { + HANDLE_CODE(ssac_barr_for_mmtel_voice_r12.pack(bref)); + } + if (ssac_barr_for_mmtel_video_r12_present) { + HANDLE_CODE(ssac_barr_for_mmtel_video_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ac_barr_per_plmn_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ac_barr_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_skip_for_mmtel_voice_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_skip_for_mmtel_video_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_skip_for_sms_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_for_csfb_r12_present, 1)); + HANDLE_CODE(bref.unpack(ssac_barr_for_mmtel_voice_r12_present, 1)); + HANDLE_CODE(bref.unpack(ssac_barr_for_mmtel_video_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(plmn_id_idx_r12, bref, (uint8_t)1, (uint8_t)6)); + if (ac_barr_info_r12_present) { + HANDLE_CODE(bref.unpack(ac_barr_info_r12.ac_barr_for_mo_sig_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_info_r12.ac_barr_for_mo_data_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_info_r12.ac_barr_for_emergency_r12, 1)); + if (ac_barr_info_r12.ac_barr_for_mo_sig_r12_present) { + HANDLE_CODE(ac_barr_info_r12.ac_barr_for_mo_sig_r12.unpack(bref)); + } + if (ac_barr_info_r12.ac_barr_for_mo_data_r12_present) { + HANDLE_CODE(ac_barr_info_r12.ac_barr_for_mo_data_r12.unpack(bref)); + } + } + if (ac_barr_for_csfb_r12_present) { + HANDLE_CODE(ac_barr_for_csfb_r12.unpack(bref)); + } + if (ssac_barr_for_mmtel_voice_r12_present) { + HANDLE_CODE(ssac_barr_for_mmtel_voice_r12.unpack(bref)); + } + if (ssac_barr_for_mmtel_video_r12_present) { + HANDLE_CODE(ssac_barr_for_mmtel_video_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ac_barr_per_plmn_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex-r12", plmn_id_idx_r12); + if (ac_barr_info_r12_present) { + j.write_fieldname("ac-BarringInfo-r12"); + j.start_obj(); + j.write_bool("ac-BarringForEmergency-r12", ac_barr_info_r12.ac_barr_for_emergency_r12); + if (ac_barr_info_r12.ac_barr_for_mo_sig_r12_present) { + j.write_fieldname("ac-BarringForMO-Signalling-r12"); + ac_barr_info_r12.ac_barr_for_mo_sig_r12.to_json(j); + } + if (ac_barr_info_r12.ac_barr_for_mo_data_r12_present) { + j.write_fieldname("ac-BarringForMO-Data-r12"); + ac_barr_info_r12.ac_barr_for_mo_data_r12.to_json(j); + } + j.end_obj(); + } + if (ac_barr_skip_for_mmtel_voice_r12_present) { + j.write_str("ac-BarringSkipForMMTELVoice-r12", "true"); + } + if (ac_barr_skip_for_mmtel_video_r12_present) { + j.write_str("ac-BarringSkipForMMTELVideo-r12", "true"); + } + if (ac_barr_skip_for_sms_r12_present) { + j.write_str("ac-BarringSkipForSMS-r12", "true"); + } + if (ac_barr_for_csfb_r12_present) { + j.write_fieldname("ac-BarringForCSFB-r12"); + ac_barr_for_csfb_r12.to_json(j); + } + if (ssac_barr_for_mmtel_voice_r12_present) { + j.write_fieldname("ssac-BarringForMMTEL-Voice-r12"); + ssac_barr_for_mmtel_voice_r12.to_json(j); + } + if (ssac_barr_for_mmtel_video_r12_present) { + j.write_fieldname("ssac-BarringForMMTEL-Video-r12"); + ssac_barr_for_mmtel_video_r12.to_json(j); + } + j.end_obj(); +} + +ac_barr_per_plmn_r12_s::ac_barr_info_r12_s_::ac_barr_info_r12_s_() +{ + ac_barr_for_mo_sig_r12_present = false; + ac_barr_for_mo_data_r12_present = false; +} + +// ACDC-BarringPerPLMN-r13 ::= SEQUENCE +SRSASN_CODE acdc_barr_per_plmn_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, plmn_id_idx_r13, (uint8_t)1, (uint8_t)6)); + HANDLE_CODE(bref.pack(acdc_only_for_hplmn_r13, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, barr_per_acdc_category_list_r13, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE acdc_barr_per_plmn_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(plmn_id_idx_r13, bref, (uint8_t)1, (uint8_t)6)); + HANDLE_CODE(bref.unpack(acdc_only_for_hplmn_r13, 1)); + HANDLE_CODE(unpack_dyn_seq_of(barr_per_acdc_category_list_r13, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void acdc_barr_per_plmn_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex-r13", plmn_id_idx_r13); + j.write_bool("acdc-OnlyForHPLMN-r13", acdc_only_for_hplmn_r13); + j.start_array("barringPerACDC-CategoryList-r13"); + for (uint32_t i1 = 0; i1 < barr_per_acdc_category_list_r13.size(); ++i1) { + barr_per_acdc_category_list_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// BCCH-Config ::= SEQUENCE +SRSASN_CODE bcch_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, mod_period_coeff)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(mod_period_coeff, 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(); +} + +// BCCH-Config-v1310 ::= SEQUENCE +SRSASN_CODE bcch_cfg_v1310_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_cfg_v1310_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void bcch_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("modificationPeriodCoeff-v1310", "n64"); + j.end_obj(); +} + +// CIOT-OptimisationPLMN-r13 ::= SEQUENCE +ciot_optim_plmn_r13_s::ciot_optim_plmn_r13_s() +{ + up_cio_t_eps_optim_r13_present = false; + cp_cio_t_eps_optim_r13_present = false; + attach_without_pdn_connect_r13_present = false; +} +SRSASN_CODE ciot_optim_plmn_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(up_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.pack(cp_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.pack(attach_without_pdn_connect_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ciot_optim_plmn_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(up_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.unpack(cp_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.unpack(attach_without_pdn_connect_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void ciot_optim_plmn_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (up_cio_t_eps_optim_r13_present) { + j.write_str("up-CIoT-EPS-Optimisation-r13", "true"); + } + if (cp_cio_t_eps_optim_r13_present) { + j.write_str("cp-CIoT-EPS-Optimisation-r13", "true"); + } + if (attach_without_pdn_connect_r13_present) { + j.write_str("attachWithoutPDN-Connectivity-r13", "true"); + } + j.end_obj(); +} + +// CarrierFreqInfoUTRA-FDD-v8h0 ::= SEQUENCE +carrier_freq_info_utra_fdd_v8h0_s::carrier_freq_info_utra_fdd_v8h0_s() +{ + multi_band_info_list_present = false; +} +SRSASN_CODE carrier_freq_info_utra_fdd_v8h0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_band_info_list_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, UnalignedIntegerPacker(1, 86))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_info_utra_fdd_v8h0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_band_info_list_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list, bref, 1, 8, UnalignedIntegerPacker(1, 86))); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_info_utra_fdd_v8h0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multi_band_info_list_present) { + j.start_array("multiBandInfoList"); + for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { + j.write_int(multi_band_info_list[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// CarrierFreqNR-r15 ::= SEQUENCE +carrier_freq_nr_r15_s::carrier_freq_nr_r15_s() +{ + ext = false; + multi_band_info_list_r15_present = false; + multi_band_info_list_sul_r15_present = false; + meas_timing_cfg_r15_present = false; + ss_rssi_meas_r15_present = false; + cell_resel_prio_r15_present = false; + cell_resel_sub_prio_r15_present = false; + thresh_x_q_r15_present = false; + q_rx_lev_min_sul_r15_present = false; + ns_pmax_list_nr_r15_present = false; + q_qual_min_r15_present = false; + max_rs_idx_cell_qual_r15_present = false; + thresh_rs_idx_r15_present = false; +} +SRSASN_CODE carrier_freq_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(multi_band_info_list_r15_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_sul_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_timing_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(ss_rssi_meas_r15_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_prio_r15_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_sub_prio_r15_present, 1)); + HANDLE_CODE(bref.pack(thresh_x_q_r15_present, 1)); + HANDLE_CODE(bref.pack(q_rx_lev_min_sul_r15_present, 1)); + HANDLE_CODE(bref.pack(ns_pmax_list_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_r15_present, 1)); + HANDLE_CODE(bref.pack(max_rs_idx_cell_qual_r15_present, 1)); + HANDLE_CODE(bref.pack(thresh_rs_idx_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)3279165)); + if (multi_band_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_r15, 1, 32, UnalignedIntegerPacker(1, 1024))); + } + if (multi_band_info_list_sul_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_sul_r15, 1, 32, UnalignedIntegerPacker(1, 1024))); + } + if (meas_timing_cfg_r15_present) { + HANDLE_CODE(meas_timing_cfg_r15.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, subcarrier_spacing_ssb_r15)); + if (ss_rssi_meas_r15_present) { + HANDLE_CODE(ss_rssi_meas_r15.pack(bref)); + } + if (cell_resel_prio_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio_r15, (uint8_t)0, (uint8_t)7)); + } + if (cell_resel_sub_prio_r15_present) { + HANDLE_CODE(pack_enum(bref, cell_resel_sub_prio_r15)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high_r15, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low_r15, (uint8_t)0, (uint8_t)31)); + if (thresh_x_q_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r15.thresh_x_high_q_r15, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r15.thresh_x_low_q_r15, (uint8_t)0, (uint8_t)31)); + } + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_r15, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_sul_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_sul_r15, (int8_t)-70, (int8_t)-22)); + } + HANDLE_CODE(pack_unalign_integer(bref, p_max_nr_r15, (int8_t)-30, (int8_t)33)); + if (ns_pmax_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ns_pmax_list_nr_r15, 1, 8)); + } + if (q_qual_min_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_r15, (int8_t)-34, (int8_t)-3)); + } + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_r15, 1)); + if (max_rs_idx_cell_qual_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_rs_idx_cell_qual_r15, (uint8_t)1, (uint8_t)16)); + } + if (thresh_rs_idx_r15_present) { + HANDLE_CODE(thresh_rs_idx_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(multi_band_info_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_sul_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_timing_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(ss_rssi_meas_r15_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_prio_r15_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_r15_present, 1)); + HANDLE_CODE(bref.unpack(thresh_x_q_r15_present, 1)); + HANDLE_CODE(bref.unpack(q_rx_lev_min_sul_r15_present, 1)); + HANDLE_CODE(bref.unpack(ns_pmax_list_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_r15_present, 1)); + HANDLE_CODE(bref.unpack(max_rs_idx_cell_qual_r15_present, 1)); + HANDLE_CODE(bref.unpack(thresh_rs_idx_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)3279165)); + if (multi_band_info_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_r15, bref, 1, 32, UnalignedIntegerPacker(1, 1024))); + } + if (multi_band_info_list_sul_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(multi_band_info_list_sul_r15, bref, 1, 32, UnalignedIntegerPacker(1, 1024))); + } + if (meas_timing_cfg_r15_present) { + HANDLE_CODE(meas_timing_cfg_r15.unpack(bref)); + } + HANDLE_CODE(unpack_enum(subcarrier_spacing_ssb_r15, bref)); + if (ss_rssi_meas_r15_present) { + HANDLE_CODE(ss_rssi_meas_r15.unpack(bref)); + } + if (cell_resel_prio_r15_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio_r15, bref, (uint8_t)0, (uint8_t)7)); + } + if (cell_resel_sub_prio_r15_present) { + HANDLE_CODE(unpack_enum(cell_resel_sub_prio_r15, bref)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high_r15, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low_r15, bref, (uint8_t)0, (uint8_t)31)); + if (thresh_x_q_r15_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r15.thresh_x_high_q_r15, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r15.thresh_x_low_q_r15, bref, (uint8_t)0, (uint8_t)31)); + } + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_r15, bref, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_sul_r15_present) { + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_sul_r15, bref, (int8_t)-70, (int8_t)-22)); + } + HANDLE_CODE(unpack_unalign_integer(p_max_nr_r15, bref, (int8_t)-30, (int8_t)33)); + if (ns_pmax_list_nr_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(ns_pmax_list_nr_r15, bref, 1, 8)); + } + if (q_qual_min_r15_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_r15, bref, (int8_t)-34, (int8_t)-3)); + } + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_r15, 1)); + if (max_rs_idx_cell_qual_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_rs_idx_cell_qual_r15, bref, (uint8_t)1, (uint8_t)16)); + } + if (thresh_rs_idx_r15_present) { + HANDLE_CODE(thresh_rs_idx_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + if (multi_band_info_list_r15_present) { + j.start_array("multiBandInfoList-r15"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_r15.size(); ++i1) { + j.write_int(multi_band_info_list_r15[i1]); + } + j.end_array(); + } + if (multi_band_info_list_sul_r15_present) { + j.start_array("multiBandInfoListSUL-r15"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_sul_r15.size(); ++i1) { + j.write_int(multi_band_info_list_sul_r15[i1]); + } + j.end_array(); + } + if (meas_timing_cfg_r15_present) { + j.write_fieldname("measTimingConfig-r15"); + meas_timing_cfg_r15.to_json(j); + } + j.write_str("subcarrierSpacingSSB-r15", subcarrier_spacing_ssb_r15.to_string()); + if (ss_rssi_meas_r15_present) { + j.write_fieldname("ss-RSSI-Measurement-r15"); + ss_rssi_meas_r15.to_json(j); + } + if (cell_resel_prio_r15_present) { + j.write_int("cellReselectionPriority-r15", cell_resel_prio_r15); + } + if (cell_resel_sub_prio_r15_present) { + j.write_str("cellReselectionSubPriority-r15", cell_resel_sub_prio_r15.to_string()); + } + j.write_int("threshX-High-r15", thresh_x_high_r15); + j.write_int("threshX-Low-r15", thresh_x_low_r15); + if (thresh_x_q_r15_present) { + j.write_fieldname("threshX-Q-r15"); + j.start_obj(); + j.write_int("threshX-HighQ-r15", thresh_x_q_r15.thresh_x_high_q_r15); + j.write_int("threshX-LowQ-r15", thresh_x_q_r15.thresh_x_low_q_r15); + j.end_obj(); + } + j.write_int("q-RxLevMin-r15", q_rx_lev_min_r15); + if (q_rx_lev_min_sul_r15_present) { + j.write_int("q-RxLevMinSUL-r15", q_rx_lev_min_sul_r15); + } + j.write_int("p-MaxNR-r15", p_max_nr_r15); + if (ns_pmax_list_nr_r15_present) { + j.start_array("ns-PmaxListNR-r15"); + for (uint32_t i1 = 0; i1 < ns_pmax_list_nr_r15.size(); ++i1) { + ns_pmax_list_nr_r15[i1].to_json(j); + } + j.end_array(); + } + if (q_qual_min_r15_present) { + j.write_int("q-QualMin-r15", q_qual_min_r15); + } + j.write_bool("deriveSSB-IndexFromCell-r15", derive_ssb_idx_from_cell_r15); + if (max_rs_idx_cell_qual_r15_present) { + j.write_int("maxRS-IndexCellQual-r15", max_rs_idx_cell_qual_r15); + } + if (thresh_rs_idx_r15_present) { + j.write_fieldname("threshRS-Index-r15"); + thresh_rs_idx_r15.to_json(j); + } + j.end_obj(); +} + +// CarrierFreqUTRA-FDD ::= SEQUENCE +carrier_freq_utra_fdd_s::carrier_freq_utra_fdd_s() +{ + ext = false; + cell_resel_prio_present = false; + thresh_x_q_r9_present = false; +} +SRSASN_CODE carrier_freq_utra_fdd_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(pack_unalign_integer(bref, p_max_utra, (int8_t)-50, (int8_t)33)); + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min, (int8_t)-24, (int8_t)0)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(thresh_x_q_r9_present != (thresh_x_q_r9.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= thresh_x_q_r9_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(thresh_x_q_r9_present, 1)); + if (thresh_x_q_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r9->thresh_x_high_q_r9, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r9->thresh_x_low_q_r9, (uint8_t)0, (uint8_t)31)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_utra_fdd_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min, bref, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(unpack_unalign_integer(p_max_utra, bref, (int8_t)-50, (int8_t)33)); + HANDLE_CODE(unpack_unalign_integer(q_qual_min, bref, (int8_t)-24, (int8_t)0)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(thresh_x_q_r9_present, 1)); + if (thresh_x_q_r9_present) { + thresh_x_q_r9 = make_copy_ptr(thresh_x_q_r9_s_()); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r9->thresh_x_high_q_r9, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r9->thresh_x_low_q_r9, bref, (uint8_t)0, (uint8_t)31)); + } + } + } + return SRSASN_SUCCESS; +} +void carrier_freq_utra_fdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + if (cell_resel_prio_present) { + j.write_int("cellReselectionPriority", cell_resel_prio); + } + 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("p-MaxUTRA", p_max_utra); + j.write_int("q-QualMin", q_qual_min); + if (thresh_x_q_r9_present) { + j.write_fieldname("threshX-Q-r9"); + j.start_obj(); + j.write_int("threshX-HighQ-r9", thresh_x_q_r9->thresh_x_high_q_r9); + j.write_int("threshX-LowQ-r9", thresh_x_q_r9->thresh_x_low_q_r9); + j.end_obj(); + } + j.end_obj(); +} + +// CarrierFreqUTRA-FDD-Ext-r12 ::= SEQUENCE +carrier_freq_utra_fdd_ext_r12_s::carrier_freq_utra_fdd_ext_r12_s() +{ + ext = false; + cell_resel_prio_r12_present = false; + thresh_x_q_r12_present = false; + multi_band_info_list_r12_present = false; + reduced_meas_performance_r12_present = false; +} +SRSASN_CODE carrier_freq_utra_fdd_ext_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_resel_prio_r12_present, 1)); + HANDLE_CODE(bref.pack(thresh_x_q_r12_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_r12_present, 1)); + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio_r12, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_r12, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(pack_unalign_integer(bref, p_max_utra_r12, (int8_t)-50, (int8_t)33)); + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_r12, (int8_t)-24, (int8_t)0)); + if (thresh_x_q_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r12.thresh_x_high_q_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r12.thresh_x_low_q_r12, (uint8_t)0, (uint8_t)31)); + } + if (multi_band_info_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_r12, 1, 8, UnalignedIntegerPacker(1, 86))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_utra_fdd_ext_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_prio_r12_present, 1)); + HANDLE_CODE(bref.unpack(thresh_x_q_r12_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_r12_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio_r12, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_r12, bref, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(unpack_unalign_integer(p_max_utra_r12, bref, (int8_t)-50, (int8_t)33)); + HANDLE_CODE(unpack_unalign_integer(q_qual_min_r12, bref, (int8_t)-24, (int8_t)0)); + if (thresh_x_q_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r12.thresh_x_high_q_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r12.thresh_x_low_q_r12, bref, (uint8_t)0, (uint8_t)31)); + } + if (multi_band_info_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_r12, bref, 1, 8, UnalignedIntegerPacker(1, 86))); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_utra_fdd_ext_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r12", carrier_freq_r12); + if (cell_resel_prio_r12_present) { + j.write_int("cellReselectionPriority-r12", cell_resel_prio_r12); + } + j.write_int("threshX-High-r12", thresh_x_high_r12); + j.write_int("threshX-Low-r12", thresh_x_low_r12); + j.write_int("q-RxLevMin-r12", q_rx_lev_min_r12); + j.write_int("p-MaxUTRA-r12", p_max_utra_r12); + j.write_int("q-QualMin-r12", q_qual_min_r12); + if (thresh_x_q_r12_present) { + j.write_fieldname("threshX-Q-r12"); + j.start_obj(); + j.write_int("threshX-HighQ-r12", thresh_x_q_r12.thresh_x_high_q_r12); + j.write_int("threshX-LowQ-r12", thresh_x_q_r12.thresh_x_low_q_r12); + j.end_obj(); + } + if (multi_band_info_list_r12_present) { + j.start_array("multiBandInfoList-r12"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_r12.size(); ++i1) { + j.write_int(multi_band_info_list_r12[i1]); + } + j.end_array(); + } + if (reduced_meas_performance_r12_present) { + j.write_str("reducedMeasPerformance-r12", "true"); + } + j.end_obj(); +} + +// CarrierFreqUTRA-TDD ::= SEQUENCE +carrier_freq_utra_tdd_s::carrier_freq_utra_tdd_s() +{ + ext = false; + cell_resel_prio_present = false; +} +SRSASN_CODE carrier_freq_utra_tdd_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(pack_unalign_integer(bref, p_max_utra, (int8_t)-50, (int8_t)33)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_utra_tdd_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min, bref, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(unpack_unalign_integer(p_max_utra, bref, (int8_t)-50, (int8_t)33)); + + return SRSASN_SUCCESS; +} +void carrier_freq_utra_tdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + if (cell_resel_prio_present) { + j.write_int("cellReselectionPriority", cell_resel_prio); + } + 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("p-MaxUTRA", p_max_utra); + j.end_obj(); +} + +// CarrierFreqUTRA-TDD-r12 ::= SEQUENCE +carrier_freq_utra_tdd_r12_s::carrier_freq_utra_tdd_r12_s() +{ + ext = false; + cell_resel_prio_r12_present = false; + reduced_meas_performance_r12_present = false; +} +SRSASN_CODE carrier_freq_utra_tdd_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_resel_prio_r12_present, 1)); + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio_r12, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_r12, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(pack_unalign_integer(bref, p_max_utra_r12, (int8_t)-50, (int8_t)33)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_utra_tdd_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_prio_r12_present, 1)); + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint16_t)0, (uint16_t)16383)); + if (cell_resel_prio_r12_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio_r12, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_r12, bref, (int8_t)-60, (int8_t)-13)); + HANDLE_CODE(unpack_unalign_integer(p_max_utra_r12, bref, (int8_t)-50, (int8_t)33)); + + return SRSASN_SUCCESS; +} +void carrier_freq_utra_tdd_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r12", carrier_freq_r12); + if (cell_resel_prio_r12_present) { + j.write_int("cellReselectionPriority-r12", cell_resel_prio_r12); + } + j.write_int("threshX-High-r12", thresh_x_high_r12); + j.write_int("threshX-Low-r12", thresh_x_low_r12); + j.write_int("q-RxLevMin-r12", q_rx_lev_min_r12); + j.write_int("p-MaxUTRA-r12", p_max_utra_r12); + if (reduced_meas_performance_r12_present) { + j.write_str("reducedMeasPerformance-r12", "true"); + } + j.end_obj(); +} + +// CarrierFreqsInfoGERAN ::= SEQUENCE +carrier_freqs_info_geran_s::carrier_freqs_info_geran_s() +{ + ext = false; +} +SRSASN_CODE carrier_freqs_info_geran_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(carrier_freqs.pack(bref)); + HANDLE_CODE(bref.pack(common_info.cell_resel_prio_present, 1)); + HANDLE_CODE(bref.pack(common_info.p_max_geran_present, 1)); + if (common_info.cell_resel_prio_present) { + HANDLE_CODE(pack_unalign_integer(bref, common_info.cell_resel_prio, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(common_info.ncc_permitted.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, common_info.q_rx_lev_min, (uint8_t)0, (uint8_t)45)); + if (common_info.p_max_geran_present) { + HANDLE_CODE(pack_unalign_integer(bref, common_info.p_max_geran, (uint8_t)0, (uint8_t)39)); + } + HANDLE_CODE(pack_unalign_integer(bref, common_info.thresh_x_high, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, common_info.thresh_x_low, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freqs_info_geran_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(carrier_freqs.unpack(bref)); + HANDLE_CODE(bref.unpack(common_info.cell_resel_prio_present, 1)); + HANDLE_CODE(bref.unpack(common_info.p_max_geran_present, 1)); + if (common_info.cell_resel_prio_present) { + HANDLE_CODE(unpack_unalign_integer(common_info.cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(common_info.ncc_permitted.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(common_info.q_rx_lev_min, bref, (uint8_t)0, (uint8_t)45)); + if (common_info.p_max_geran_present) { + HANDLE_CODE(unpack_unalign_integer(common_info.p_max_geran, bref, (uint8_t)0, (uint8_t)39)); + } + HANDLE_CODE(unpack_unalign_integer(common_info.thresh_x_high, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(common_info.thresh_x_low, bref, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +void carrier_freqs_info_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("carrierFreqs"); + carrier_freqs.to_json(j); + j.write_fieldname("commonInfo"); + j.start_obj(); + if (common_info.cell_resel_prio_present) { + j.write_int("cellReselectionPriority", common_info.cell_resel_prio); + } + j.write_str("ncc-Permitted", common_info.ncc_permitted.to_string()); + j.write_int("q-RxLevMin", common_info.q_rx_lev_min); + if (common_info.p_max_geran_present) { + j.write_int("p-MaxGERAN", common_info.p_max_geran); + } + j.write_int("threshX-High", common_info.thresh_x_high); + j.write_int("threshX-Low", common_info.thresh_x_low); + j.end_obj(); + j.end_obj(); +} + +carrier_freqs_info_geran_s::common_info_s_::common_info_s_() +{ + cell_resel_prio_present = false; + p_max_geran_present = false; +} + +// CellSelectionInfo-v1130 ::= SEQUENCE +SRSASN_CODE cell_sel_info_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_wb_r11, (int8_t)-34, (int8_t)-3)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(q_qual_min_wb_r11, bref, (int8_t)-34, (int8_t)-3)); + + return SRSASN_SUCCESS; +} +void cell_sel_info_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-QualMinWB-r11", q_qual_min_wb_r11); + j.end_obj(); +} + +// EAB-Config-r11 ::= SEQUENCE +SRSASN_CODE eab_cfg_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, eab_category_r11)); + HANDLE_CODE(eab_barr_bitmap_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE eab_cfg_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(eab_category_r11, bref)); + HANDLE_CODE(eab_barr_bitmap_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void eab_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("eab-Category-r11", eab_category_r11.to_string()); + j.write_str("eab-BarringBitmap-r11", eab_barr_bitmap_r11.to_string()); + j.end_obj(); +} + +// FreqHoppingParameters-r13 ::= SEQUENCE +freq_hop_params_r13_s::freq_hop_params_r13_s() +{ + dummy_present = false; + dummy2_present = false; + dummy3_present = false; + interv_ul_hop_cfg_common_mode_a_r13_present = false; + interv_ul_hop_cfg_common_mode_b_r13_present = false; + dummy4_present = false; +} +SRSASN_CODE freq_hop_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dummy_present, 1)); + HANDLE_CODE(bref.pack(dummy2_present, 1)); + HANDLE_CODE(bref.pack(dummy3_present, 1)); + HANDLE_CODE(bref.pack(interv_ul_hop_cfg_common_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(interv_ul_hop_cfg_common_mode_b_r13_present, 1)); + HANDLE_CODE(bref.pack(dummy4_present, 1)); + + if (dummy_present) { + HANDLE_CODE(pack_enum(bref, dummy)); + } + if (dummy2_present) { + HANDLE_CODE(dummy2.pack(bref)); + } + if (dummy3_present) { + HANDLE_CODE(dummy3.pack(bref)); + } + if (interv_ul_hop_cfg_common_mode_a_r13_present) { + HANDLE_CODE(interv_ul_hop_cfg_common_mode_a_r13.pack(bref)); + } + if (interv_ul_hop_cfg_common_mode_b_r13_present) { + HANDLE_CODE(interv_ul_hop_cfg_common_mode_b_r13.pack(bref)); + } + if (dummy4_present) { + HANDLE_CODE(pack_unalign_integer(bref, dummy4, (uint8_t)1, (uint8_t)16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_hop_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dummy_present, 1)); + HANDLE_CODE(bref.unpack(dummy2_present, 1)); + HANDLE_CODE(bref.unpack(dummy3_present, 1)); + HANDLE_CODE(bref.unpack(interv_ul_hop_cfg_common_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(interv_ul_hop_cfg_common_mode_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(dummy4_present, 1)); + + if (dummy_present) { + HANDLE_CODE(unpack_enum(dummy, bref)); + } + if (dummy2_present) { + HANDLE_CODE(dummy2.unpack(bref)); + } + if (dummy3_present) { + HANDLE_CODE(dummy3.unpack(bref)); + } + if (interv_ul_hop_cfg_common_mode_a_r13_present) { + HANDLE_CODE(interv_ul_hop_cfg_common_mode_a_r13.unpack(bref)); + } + if (interv_ul_hop_cfg_common_mode_b_r13_present) { + HANDLE_CODE(interv_ul_hop_cfg_common_mode_b_r13.unpack(bref)); + } + if (dummy4_present) { + HANDLE_CODE(unpack_unalign_integer(dummy4, bref, (uint8_t)1, (uint8_t)16)); + } + + return SRSASN_SUCCESS; +} +void freq_hop_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dummy_present) { + j.write_str("dummy", dummy.to_string()); + } + if (dummy2_present) { + j.write_fieldname("dummy2"); + dummy2.to_json(j); + } + if (dummy3_present) { + j.write_fieldname("dummy3"); + dummy3.to_json(j); + } + if (interv_ul_hop_cfg_common_mode_a_r13_present) { + j.write_fieldname("interval-ULHoppingConfigCommonModeA-r13"); + interv_ul_hop_cfg_common_mode_a_r13.to_json(j); + } + if (interv_ul_hop_cfg_common_mode_b_r13_present) { + j.write_fieldname("interval-ULHoppingConfigCommonModeB-r13"); + interv_ul_hop_cfg_common_mode_b_r13.to_json(j); + } + if (dummy4_present) { + j.write_int("dummy4", dummy4); + } + j.end_obj(); +} + +void freq_hop_params_r13_s::dummy2_c_::destroy_() {} +void freq_hop_params_r13_s::dummy2_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +freq_hop_params_r13_s::dummy2_c_::dummy2_c_(const freq_hop_params_r13_s::dummy2_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_r13: + c.init(other.c.get()); + break; + case types::interv_tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy2_c_"); + } +} +freq_hop_params_r13_s::dummy2_c_& freq_hop_params_r13_s::dummy2_c_:: + operator=(const freq_hop_params_r13_s::dummy2_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_r13: + c.set(other.c.get()); + break; + case types::interv_tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy2_c_"); + } + + return *this; +} +void freq_hop_params_r13_s::dummy2_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_r13: + j.write_str("interval-FDD-r13", c.get().to_string()); + break; + case types::interv_tdd_r13: + j.write_str("interval-TDD-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy2_c_"); + } + j.end_obj(); +} +SRSASN_CODE freq_hop_params_r13_s::dummy2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_hop_params_r13_s::dummy2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy2_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void freq_hop_params_r13_s::dummy3_c_::destroy_() {} +void freq_hop_params_r13_s::dummy3_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +freq_hop_params_r13_s::dummy3_c_::dummy3_c_(const freq_hop_params_r13_s::dummy3_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_r13: + c.init(other.c.get()); + break; + case types::interv_tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy3_c_"); + } +} +freq_hop_params_r13_s::dummy3_c_& freq_hop_params_r13_s::dummy3_c_:: + operator=(const freq_hop_params_r13_s::dummy3_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_r13: + c.set(other.c.get()); + break; + case types::interv_tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy3_c_"); + } + + return *this; +} +void freq_hop_params_r13_s::dummy3_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_r13: + j.write_str("interval-FDD-r13", c.get().to_string()); + break; + case types::interv_tdd_r13: + j.write_str("interval-TDD-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy3_c_"); + } + j.end_obj(); +} +SRSASN_CODE freq_hop_params_r13_s::dummy3_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy3_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_hop_params_r13_s::dummy3_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::dummy3_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::destroy_() {} +void freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_ul_hop_cfg_common_mode_a_r13_c_( + const freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_r13: + c.init(other.c.get()); + break; + case types::interv_tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_"); + } +} +freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_& +freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_:: +operator=(const freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_r13: + c.set(other.c.get()); + break; + case types::interv_tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_"); + } + + return *this; +} +void freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_r13: + j.write_str("interval-FDD-r13", c.get().to_string()); + break; + case types::interv_tdd_r13: + j.write_str("interval-TDD-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::destroy_() {} +void freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_ul_hop_cfg_common_mode_b_r13_c_( + const freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_r13: + c.init(other.c.get()); + break; + case types::interv_tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_"); + } +} +freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_& +freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_:: +operator=(const freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_r13: + c.set(other.c.get()); + break; + case types::interv_tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_"); + } + + return *this; +} +void freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_r13: + j.write_str("interval-FDD-r13", c.get().to_string()); + break; + case types::interv_tdd_r13: + j.write_str("interval-TDD-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// HighSpeedConfig-r14 ::= SEQUENCE +high_speed_cfg_r14_s::high_speed_cfg_r14_s() +{ + high_speed_enhanced_meas_flag_r14_present = false; + high_speed_enhanced_demod_flag_r14_present = false; +} +SRSASN_CODE high_speed_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(high_speed_enhanced_meas_flag_r14_present, 1)); + HANDLE_CODE(bref.pack(high_speed_enhanced_demod_flag_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE high_speed_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(high_speed_enhanced_meas_flag_r14_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_enhanced_demod_flag_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void high_speed_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (high_speed_enhanced_meas_flag_r14_present) { + j.write_str("highSpeedEnhancedMeasFlag-r14", "true"); + } + if (high_speed_enhanced_demod_flag_r14_present) { + j.write_str("highSpeedEnhancedDemodulationFlag-r14", "true"); + } + j.end_obj(); +} + +// HighSpeedConfig-v1530 ::= SEQUENCE +SRSASN_CODE high_speed_cfg_v1530_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE high_speed_cfg_v1530_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void high_speed_cfg_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("highSpeedMeasGapCE-ModeA-r15", "true"); + j.end_obj(); +} + +// InterFreqCarrierFreqInfo ::= SEQUENCE +inter_freq_carrier_freq_info_s::inter_freq_carrier_freq_info_s() +{ + ext = false; + p_max_present = false; + t_resel_eutra_sf_present = false; + cell_resel_prio_present = false; + q_offset_freq_present = false; + inter_freq_neigh_cell_list_present = false; + inter_freq_black_cell_list_present = false; + q_qual_min_r9_present = false; + thresh_x_q_r9_present = false; + q_qual_min_wb_r11_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(t_resel_eutra_sf_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); + HANDLE_CODE(bref.pack(q_offset_freq_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_black_cell_list_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); + if (p_max_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_unalign_integer(bref, t_resel_eutra, (uint8_t)0, (uint8_t)7)); + if (t_resel_eutra_sf_present) { + HANDLE_CODE(t_resel_eutra_sf.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_enum(bref, allowed_meas_bw)); + HANDLE_CODE(bref.pack(presence_ant_port1, 1)); + if (cell_resel_prio_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(neigh_cell_cfg.pack(bref)); + if (q_offset_freq_present) { + HANDLE_CODE(pack_enum(bref, q_offset_freq)); + } + if (inter_freq_neigh_cell_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list, 1, 16)); + } + if (inter_freq_black_cell_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_black_cell_list, 1, 16)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= q_qual_min_r9_present; + rrc_asn1_warn_assert(thresh_x_q_r9_present != (thresh_x_q_r9.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= thresh_x_q_r9_present; + group_flags[1] |= q_qual_min_wb_r11_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(q_qual_min_r9_present, 1)); + HANDLE_CODE(bref.pack(thresh_x_q_r9_present, 1)); + if (q_qual_min_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_r9, (int8_t)-34, (int8_t)-3)); + } + if (thresh_x_q_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r9->thresh_x_high_q_r9, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r9->thresh_x_low_q_r9, (uint8_t)0, (uint8_t)31)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(q_qual_min_wb_r11_present, 1)); + if (q_qual_min_wb_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_wb_r11, (int8_t)-34, (int8_t)-3)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_eutra_sf_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); + HANDLE_CODE(bref.unpack(q_offset_freq_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_black_cell_list_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); + if (p_max_present) { + HANDLE_CODE(unpack_unalign_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_unalign_integer(t_resel_eutra, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_eutra_sf_present) { + HANDLE_CODE(t_resel_eutra_sf.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_enum(allowed_meas_bw, bref)); + HANDLE_CODE(bref.unpack(presence_ant_port1, 1)); + if (cell_resel_prio_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(neigh_cell_cfg.unpack(bref)); + if (q_offset_freq_present) { + HANDLE_CODE(unpack_enum(q_offset_freq, 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_black_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_black_cell_list, bref, 1, 16)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(q_qual_min_r9_present, 1)); + HANDLE_CODE(bref.unpack(thresh_x_q_r9_present, 1)); + if (q_qual_min_r9_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_r9, bref, (int8_t)-34, (int8_t)-3)); + } + if (thresh_x_q_r9_present) { + thresh_x_q_r9 = make_copy_ptr(thresh_x_q_r9_s_()); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r9->thresh_x_high_q_r9, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r9->thresh_x_low_q_r9, bref, (uint8_t)0, (uint8_t)31)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(q_qual_min_wb_r11_present, 1)); + if (q_qual_min_wb_r11_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_wb_r11, bref, (int8_t)-34, (int8_t)-3)); + } + } + } + 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); + j.write_int("q-RxLevMin", q_rx_lev_min); + if (p_max_present) { + j.write_int("p-Max", p_max); + } + 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); + } + j.write_int("threshX-High", thresh_x_high); + j.write_int("threshX-Low", thresh_x_low); + 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); + } + j.write_str("neighCellConfig", neigh_cell_cfg.to_string()); + if (q_offset_freq_present) { + j.write_str("q-OffsetFreq", q_offset_freq.to_string()); + } + if (inter_freq_neigh_cell_list_present) { + j.start_array("interFreqNeighCellList"); + for (uint32_t i1 = 0; i1 < inter_freq_neigh_cell_list.size(); ++i1) { + inter_freq_neigh_cell_list[i1].to_json(j); + } + j.end_array(); + } + if (inter_freq_black_cell_list_present) { + j.start_array("interFreqBlackCellList"); + for (uint32_t i1 = 0; i1 < inter_freq_black_cell_list.size(); ++i1) { + inter_freq_black_cell_list[i1].to_json(j); + } + j.end_array(); + } + if (q_qual_min_r9_present) { + j.write_int("q-QualMin-r9", q_qual_min_r9); + } + if (thresh_x_q_r9_present) { + j.write_fieldname("threshX-Q-r9"); + j.start_obj(); + j.write_int("threshX-HighQ-r9", thresh_x_q_r9->thresh_x_high_q_r9); + j.write_int("threshX-LowQ-r9", thresh_x_q_r9->thresh_x_low_q_r9); + j.end_obj(); + } + if (q_qual_min_wb_r11_present) { + j.write_int("q-QualMinWB-r11", q_qual_min_wb_r11); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-r12 ::= SEQUENCE +inter_freq_carrier_freq_info_r12_s::inter_freq_carrier_freq_info_r12_s() +{ + ext = false; + p_max_r12_present = false; + t_resel_eutra_sf_r12_present = false; + cell_resel_prio_r12_present = false; + q_offset_freq_r12_present = false; + inter_freq_neigh_cell_list_r12_present = false; + inter_freq_black_cell_list_r12_present = false; + q_qual_min_r12_present = false; + thresh_x_q_r12_present = false; + q_qual_min_wb_r12_present = false; + multi_band_info_list_r12_present = false; + reduced_meas_performance_r12_present = false; + q_qual_min_rsrq_on_all_symbols_r12_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(p_max_r12_present, 1)); + HANDLE_CODE(bref.pack(t_resel_eutra_sf_r12_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_prio_r12_present, 1)); + HANDLE_CODE(bref.pack(q_offset_freq_r12_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list_r12_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_black_cell_list_r12_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_r12_present, 1)); + HANDLE_CODE(bref.pack(thresh_x_q_r12_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_wb_r12_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_r12_present, 1)); + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_rsrq_on_all_symbols_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_r12, (int8_t)-70, (int8_t)-22)); + if (p_max_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max_r12, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_unalign_integer(bref, t_resel_eutra_r12, (uint8_t)0, (uint8_t)7)); + if (t_resel_eutra_sf_r12_present) { + HANDLE_CODE(t_resel_eutra_sf_r12.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_high_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_low_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_enum(bref, allowed_meas_bw_r12)); + HANDLE_CODE(bref.pack(presence_ant_port1_r12, 1)); + if (cell_resel_prio_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio_r12, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(neigh_cell_cfg_r12.pack(bref)); + if (q_offset_freq_r12_present) { + HANDLE_CODE(pack_enum(bref, q_offset_freq_r12)); + } + if (inter_freq_neigh_cell_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list_r12, 1, 16)); + } + if (inter_freq_black_cell_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_black_cell_list_r12, 1, 16)); + } + if (q_qual_min_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_r12, (int8_t)-34, (int8_t)-3)); + } + if (thresh_x_q_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r12.thresh_x_high_q_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, thresh_x_q_r12.thresh_x_low_q_r12, (uint8_t)0, (uint8_t)31)); + } + if (q_qual_min_wb_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_wb_r12, (int8_t)-34, (int8_t)-3)); + } + if (multi_band_info_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_r12, 1, 8, UnalignedIntegerPacker(1, 256))); + } + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_rsrq_on_all_symbols_r12, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(p_max_r12_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_eutra_sf_r12_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_prio_r12_present, 1)); + HANDLE_CODE(bref.unpack(q_offset_freq_r12_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_black_cell_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_r12_present, 1)); + HANDLE_CODE(bref.unpack(thresh_x_q_r12_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_wb_r12_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_rsrq_on_all_symbols_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_r12, bref, (int8_t)-70, (int8_t)-22)); + if (p_max_r12_present) { + HANDLE_CODE(unpack_unalign_integer(p_max_r12, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_unalign_integer(t_resel_eutra_r12, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_eutra_sf_r12_present) { + HANDLE_CODE(t_resel_eutra_sf_r12.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(thresh_x_high_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_low_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_enum(allowed_meas_bw_r12, bref)); + HANDLE_CODE(bref.unpack(presence_ant_port1_r12, 1)); + if (cell_resel_prio_r12_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio_r12, bref, (uint8_t)0, (uint8_t)7)); + } + HANDLE_CODE(neigh_cell_cfg_r12.unpack(bref)); + if (q_offset_freq_r12_present) { + HANDLE_CODE(unpack_enum(q_offset_freq_r12, bref)); + } + if (inter_freq_neigh_cell_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list_r12, bref, 1, 16)); + } + if (inter_freq_black_cell_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_black_cell_list_r12, bref, 1, 16)); + } + if (q_qual_min_r12_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_r12, bref, (int8_t)-34, (int8_t)-3)); + } + if (thresh_x_q_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r12.thresh_x_high_q_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(thresh_x_q_r12.thresh_x_low_q_r12, bref, (uint8_t)0, (uint8_t)31)); + } + if (q_qual_min_wb_r12_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_wb_r12, bref, (int8_t)-34, (int8_t)-3)); + } + if (multi_band_info_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_r12, bref, 1, 8, UnalignedIntegerPacker(1, 256))); + } + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_rsrq_on_all_symbols_r12, bref, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq-r12", dl_carrier_freq_r12); + j.write_int("q-RxLevMin-r12", q_rx_lev_min_r12); + if (p_max_r12_present) { + j.write_int("p-Max-r12", p_max_r12); + } + j.write_int("t-ReselectionEUTRA-r12", t_resel_eutra_r12); + if (t_resel_eutra_sf_r12_present) { + j.write_fieldname("t-ReselectionEUTRA-SF-r12"); + t_resel_eutra_sf_r12.to_json(j); + } + j.write_int("threshX-High-r12", thresh_x_high_r12); + j.write_int("threshX-Low-r12", thresh_x_low_r12); + j.write_str("allowedMeasBandwidth-r12", allowed_meas_bw_r12.to_string()); + j.write_bool("presenceAntennaPort1-r12", presence_ant_port1_r12); + if (cell_resel_prio_r12_present) { + j.write_int("cellReselectionPriority-r12", cell_resel_prio_r12); + } + j.write_str("neighCellConfig-r12", neigh_cell_cfg_r12.to_string()); + if (q_offset_freq_r12_present) { + j.write_str("q-OffsetFreq-r12", q_offset_freq_r12.to_string()); + } + if (inter_freq_neigh_cell_list_r12_present) { + j.start_array("interFreqNeighCellList-r12"); + for (uint32_t i1 = 0; i1 < inter_freq_neigh_cell_list_r12.size(); ++i1) { + inter_freq_neigh_cell_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (inter_freq_black_cell_list_r12_present) { + j.start_array("interFreqBlackCellList-r12"); + for (uint32_t i1 = 0; i1 < inter_freq_black_cell_list_r12.size(); ++i1) { + inter_freq_black_cell_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (q_qual_min_r12_present) { + j.write_int("q-QualMin-r12", q_qual_min_r12); + } + if (thresh_x_q_r12_present) { + j.write_fieldname("threshX-Q-r12"); + j.start_obj(); + j.write_int("threshX-HighQ-r12", thresh_x_q_r12.thresh_x_high_q_r12); + j.write_int("threshX-LowQ-r12", thresh_x_q_r12.thresh_x_low_q_r12); + j.end_obj(); + } + if (q_qual_min_wb_r12_present) { + j.write_int("q-QualMinWB-r12", q_qual_min_wb_r12); + } + if (multi_band_info_list_r12_present) { + j.start_array("multiBandInfoList-r12"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_r12.size(); ++i1) { + j.write_int(multi_band_info_list_r12[i1]); + } + j.end_array(); + } + if (reduced_meas_performance_r12_present) { + j.write_str("reducedMeasPerformance-r12", "true"); + } + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + j.write_int("q-QualMinRSRQ-OnAllSymbols-r12", q_qual_min_rsrq_on_all_symbols_r12); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1250 ::= SEQUENCE +inter_freq_carrier_freq_info_v1250_s::inter_freq_carrier_freq_info_v1250_s() +{ + reduced_meas_performance_r12_present = false; + q_qual_min_rsrq_on_all_symbols_r12_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_rsrq_on_all_symbols_r12_present, 1)); + + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_rsrq_on_all_symbols_r12, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_rsrq_on_all_symbols_r12_present, 1)); + + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_rsrq_on_all_symbols_r12, bref, (int8_t)-34, (int8_t)-3)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_meas_performance_r12_present) { + j.write_str("reducedMeasPerformance-r12", "true"); + } + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + j.write_int("q-QualMinRSRQ-OnAllSymbols-r12", q_qual_min_rsrq_on_all_symbols_r12); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1310 ::= SEQUENCE +inter_freq_carrier_freq_info_v1310_s::inter_freq_carrier_freq_info_v1310_s() +{ + cell_resel_sub_prio_r13_present = false; + redist_inter_freq_info_r13_present = false; + cell_sel_info_ce_r13_present = false; + t_resel_eutra_ce_r13_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_resel_sub_prio_r13_present, 1)); + HANDLE_CODE(bref.pack(redist_inter_freq_info_r13_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_ce_r13_present, 1)); + HANDLE_CODE(bref.pack(t_resel_eutra_ce_r13_present, 1)); + + if (cell_resel_sub_prio_r13_present) { + HANDLE_CODE(pack_enum(bref, cell_resel_sub_prio_r13)); + } + if (redist_inter_freq_info_r13_present) { + HANDLE_CODE(redist_inter_freq_info_r13.pack(bref)); + } + if (cell_sel_info_ce_r13_present) { + HANDLE_CODE(cell_sel_info_ce_r13.pack(bref)); + } + if (t_resel_eutra_ce_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, t_resel_eutra_ce_r13, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_r13_present, 1)); + HANDLE_CODE(bref.unpack(redist_inter_freq_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_ce_r13_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_eutra_ce_r13_present, 1)); + + if (cell_resel_sub_prio_r13_present) { + HANDLE_CODE(unpack_enum(cell_resel_sub_prio_r13, bref)); + } + if (redist_inter_freq_info_r13_present) { + HANDLE_CODE(redist_inter_freq_info_r13.unpack(bref)); + } + if (cell_sel_info_ce_r13_present) { + HANDLE_CODE(cell_sel_info_ce_r13.unpack(bref)); + } + if (t_resel_eutra_ce_r13_present) { + HANDLE_CODE(unpack_unalign_integer(t_resel_eutra_ce_r13, bref, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_resel_sub_prio_r13_present) { + j.write_str("cellReselectionSubPriority-r13", cell_resel_sub_prio_r13.to_string()); + } + if (redist_inter_freq_info_r13_present) { + j.write_fieldname("redistributionInterFreqInfo-r13"); + redist_inter_freq_info_r13.to_json(j); + } + if (cell_sel_info_ce_r13_present) { + j.write_fieldname("cellSelectionInfoCE-r13"); + cell_sel_info_ce_r13.to_json(j); + } + if (t_resel_eutra_ce_r13_present) { + j.write_int("t-ReselectionEUTRA-CE-r13", t_resel_eutra_ce_r13); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1350 ::= SEQUENCE +inter_freq_carrier_freq_info_v1350_s::inter_freq_carrier_freq_info_v1350_s() +{ + cell_sel_info_ce1_r13_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1350_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_sel_info_ce1_r13_present, 1)); + + if (cell_sel_info_ce1_r13_present) { + HANDLE_CODE(cell_sel_info_ce1_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1350_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_sel_info_ce1_r13_present, 1)); + + if (cell_sel_info_ce1_r13_present) { + HANDLE_CODE(cell_sel_info_ce1_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1350_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_sel_info_ce1_r13_present) { + j.write_fieldname("cellSelectionInfoCE1-r13"); + cell_sel_info_ce1_r13.to_json(j); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1530 ::= SEQUENCE +inter_freq_carrier_freq_info_v1530_s::inter_freq_carrier_freq_info_v1530_s() +{ + inter_freq_neigh_hsdn_cell_list_r15_present = false; + cell_sel_info_ce_v1530_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_neigh_hsdn_cell_list_r15_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_ce_v1530_present, 1)); + + HANDLE_CODE(bref.pack(hsdn_ind_r15, 1)); + if (inter_freq_neigh_hsdn_cell_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_hsdn_cell_list_r15, 1, 16)); + } + if (cell_sel_info_ce_v1530_present) { + HANDLE_CODE(cell_sel_info_ce_v1530.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_neigh_hsdn_cell_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_ce_v1530_present, 1)); + + HANDLE_CODE(bref.unpack(hsdn_ind_r15, 1)); + if (inter_freq_neigh_hsdn_cell_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_hsdn_cell_list_r15, bref, 1, 16)); + } + if (cell_sel_info_ce_v1530_present) { + HANDLE_CODE(cell_sel_info_ce_v1530.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("hsdn-Indication-r15", hsdn_ind_r15); + if (inter_freq_neigh_hsdn_cell_list_r15_present) { + j.start_array("interFreqNeighHSDN-CellList-r15"); + for (uint32_t i1 = 0; i1 < inter_freq_neigh_hsdn_cell_list_r15.size(); ++i1) { + inter_freq_neigh_hsdn_cell_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (cell_sel_info_ce_v1530_present) { + j.write_fieldname("cellSelectionInfoCE-v1530"); + cell_sel_info_ce_v1530.to_json(j); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v8h0 ::= SEQUENCE +inter_freq_carrier_freq_info_v8h0_s::inter_freq_carrier_freq_info_v8h0_s() +{ + multi_band_info_list_present = false; +} +SRSASN_CODE inter_freq_carrier_freq_info_v8h0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_band_info_list_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, UnalignedIntegerPacker(1, 64))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v8h0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_band_info_list_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list, bref, 1, 8, UnalignedIntegerPacker(1, 64))); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v8h0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multi_band_info_list_present) { + j.start_array("multiBandInfoList"); + for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { + j.write_int(multi_band_info_list[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// IntraFreqNeighCellInfo ::= SEQUENCE +intra_freq_neigh_cell_info_s::intra_freq_neigh_cell_info_s() +{ + ext = false; +} +SRSASN_CODE intra_freq_neigh_cell_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, q_offset_cell)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE intra_freq_neigh_cell_info_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(q_offset_cell, 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()); + j.end_obj(); +} + +// MBMS-CarrierType-r14 ::= SEQUENCE +mbms_carrier_type_r14_s::mbms_carrier_type_r14_s() +{ + frame_offset_r14_present = false; +} +SRSASN_CODE mbms_carrier_type_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(frame_offset_r14_present, 1)); + + HANDLE_CODE(pack_enum(bref, carrier_type_r14)); + if (frame_offset_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, frame_offset_r14, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_carrier_type_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(frame_offset_r14_present, 1)); + + HANDLE_CODE(unpack_enum(carrier_type_r14, bref)); + if (frame_offset_r14_present) { + HANDLE_CODE(unpack_unalign_integer(frame_offset_r14, bref, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +void mbms_carrier_type_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("carrierType-r14", carrier_type_r14.to_string()); + if (frame_offset_r14_present) { + j.write_int("frameOffset-r14", frame_offset_r14); + } + j.end_obj(); +} + +// MBMS-SAI-InterFreq-r11 ::= SEQUENCE +SRSASN_CODE mbms_sai_inter_freq_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_r11, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_sai_list_r11, 1, 64, UnalignedIntegerPacker(0, 65535))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_sai_inter_freq_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_r11, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_dyn_seq_of(mbms_sai_list_r11, bref, 1, 64, UnalignedIntegerPacker(0, 65535))); + + return SRSASN_SUCCESS; +} +void mbms_sai_inter_freq_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq-r11", dl_carrier_freq_r11); + j.start_array("mbms-SAI-List-r11"); + for (uint32_t i1 = 0; i1 < mbms_sai_list_r11.size(); ++i1) { + j.write_int(mbms_sai_list_r11[i1]); + } + j.end_array(); + j.end_obj(); +} + +// MBMS-SAI-InterFreq-v1140 ::= SEQUENCE +mbms_sai_inter_freq_v1140_s::mbms_sai_inter_freq_v1140_s() +{ + multi_band_info_list_r11_present = false; +} +SRSASN_CODE mbms_sai_inter_freq_v1140_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_band_info_list_r11_present, 1)); + + if (multi_band_info_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_r11, 1, 8, UnalignedIntegerPacker(1, 256))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_sai_inter_freq_v1140_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_band_info_list_r11_present, 1)); + + if (multi_band_info_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_r11, bref, 1, 8, UnalignedIntegerPacker(1, 256))); + } + + return SRSASN_SUCCESS; +} +void mbms_sai_inter_freq_v1140_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multi_band_info_list_r11_present) { + j.start_array("multiBandInfoList-r11"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_r11.size(); ++i1) { + j.write_int(multi_band_info_list_r11[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// MBSFN-AreaInfo-r9 ::= SEQUENCE +mbsfn_area_info_r9_s::mbsfn_area_info_r9_s() +{ + ext = false; + mcch_cfg_r14_present = false; + subcarrier_spacing_mbms_r14_present = false; +} +SRSASN_CODE mbsfn_area_info_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, mbsfn_area_id_r9, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE(pack_enum(bref, non_mbsfn_region_len)); + HANDLE_CODE(pack_unalign_integer(bref, notif_ind_r9, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_enum(bref, mcch_cfg_r9.mcch_repeat_period_r9)); + HANDLE_CODE(pack_unalign_integer(bref, mcch_cfg_r9.mcch_offset_r9, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(pack_enum(bref, mcch_cfg_r9.mcch_mod_period_r9)); + HANDLE_CODE(mcch_cfg_r9.sf_alloc_info_r9.pack(bref)); + HANDLE_CODE(pack_enum(bref, mcch_cfg_r9.sig_mcs_r9)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(mcch_cfg_r14_present != (mcch_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= mcch_cfg_r14_present; + group_flags[0] |= subcarrier_spacing_mbms_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mcch_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(subcarrier_spacing_mbms_r14_present, 1)); + if (mcch_cfg_r14_present) { + HANDLE_CODE(bref.pack(mcch_cfg_r14->mcch_repeat_period_v1430_present, 1)); + HANDLE_CODE(bref.pack(mcch_cfg_r14->mcch_mod_period_v1430_present, 1)); + if (mcch_cfg_r14->mcch_repeat_period_v1430_present) { + HANDLE_CODE(pack_enum(bref, mcch_cfg_r14->mcch_repeat_period_v1430)); + } + if (mcch_cfg_r14->mcch_mod_period_v1430_present) { + HANDLE_CODE(pack_enum(bref, mcch_cfg_r14->mcch_mod_period_v1430)); + } + } + if (subcarrier_spacing_mbms_r14_present) { + HANDLE_CODE(pack_enum(bref, subcarrier_spacing_mbms_r14)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_area_info_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(mbsfn_area_id_r9, bref, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE(unpack_enum(non_mbsfn_region_len, bref)); + HANDLE_CODE(unpack_unalign_integer(notif_ind_r9, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_enum(mcch_cfg_r9.mcch_repeat_period_r9, bref)); + HANDLE_CODE(unpack_unalign_integer(mcch_cfg_r9.mcch_offset_r9, bref, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(unpack_enum(mcch_cfg_r9.mcch_mod_period_r9, bref)); + HANDLE_CODE(mcch_cfg_r9.sf_alloc_info_r9.unpack(bref)); + HANDLE_CODE(unpack_enum(mcch_cfg_r9.sig_mcs_r9, bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mcch_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(subcarrier_spacing_mbms_r14_present, 1)); + if (mcch_cfg_r14_present) { + mcch_cfg_r14 = make_copy_ptr(mcch_cfg_r14_s_()); + HANDLE_CODE(bref.unpack(mcch_cfg_r14->mcch_repeat_period_v1430_present, 1)); + HANDLE_CODE(bref.unpack(mcch_cfg_r14->mcch_mod_period_v1430_present, 1)); + if (mcch_cfg_r14->mcch_repeat_period_v1430_present) { + HANDLE_CODE(unpack_enum(mcch_cfg_r14->mcch_repeat_period_v1430, bref)); + } + if (mcch_cfg_r14->mcch_mod_period_v1430_present) { + HANDLE_CODE(unpack_enum(mcch_cfg_r14->mcch_mod_period_v1430, bref)); + } + } + if (subcarrier_spacing_mbms_r14_present) { + HANDLE_CODE(unpack_enum(subcarrier_spacing_mbms_r14, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void mbsfn_area_info_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("mbsfn-AreaId-r9", mbsfn_area_id_r9); + j.write_str("non-MBSFNregionLength", non_mbsfn_region_len.to_string()); + j.write_int("notificationIndicator-r9", notif_ind_r9); + j.write_fieldname("mcch-Config-r9"); + j.start_obj(); + j.write_str("mcch-RepetitionPeriod-r9", mcch_cfg_r9.mcch_repeat_period_r9.to_string()); + j.write_int("mcch-Offset-r9", mcch_cfg_r9.mcch_offset_r9); + j.write_str("mcch-ModificationPeriod-r9", mcch_cfg_r9.mcch_mod_period_r9.to_string()); + j.write_str("sf-AllocInfo-r9", mcch_cfg_r9.sf_alloc_info_r9.to_string()); + j.write_str("signallingMCS-r9", mcch_cfg_r9.sig_mcs_r9.to_string()); + j.end_obj(); + if (mcch_cfg_r14_present) { + j.write_fieldname("mcch-Config-r14"); + j.start_obj(); + if (mcch_cfg_r14->mcch_repeat_period_v1430_present) { + j.write_str("mcch-RepetitionPeriod-v1430", mcch_cfg_r14->mcch_repeat_period_v1430.to_string()); + } + if (mcch_cfg_r14->mcch_mod_period_v1430_present) { + j.write_str("mcch-ModificationPeriod-v1430", mcch_cfg_r14->mcch_mod_period_v1430.to_string()); + } + j.end_obj(); + } + if (subcarrier_spacing_mbms_r14_present) { + j.write_str("subcarrierSpacingMBMS-r14", subcarrier_spacing_mbms_r14.to_string()); + } + j.end_obj(); +} + +mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_cfg_r14_s_() +{ + mcch_repeat_period_v1430_present = false; + mcch_mod_period_v1430_present = false; +} + +// MBSFN-SubframeConfig ::= SEQUENCE +SRSASN_CODE mbsfn_sf_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, radioframe_alloc_period)); + HANDLE_CODE(pack_unalign_integer(bref, radioframe_alloc_offset, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(sf_alloc.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_sf_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(radioframe_alloc_period, bref)); + HANDLE_CODE(unpack_unalign_integer(radioframe_alloc_offset, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(sf_alloc.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mbsfn_sf_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("radioframeAllocationPeriod", radioframe_alloc_period.to_string()); + j.write_int("radioframeAllocationOffset", radioframe_alloc_offset); + j.write_fieldname("subframeAllocation"); + sf_alloc.to_json(j); + j.end_obj(); +} + +void mbsfn_sf_cfg_s::sf_alloc_c_::destroy_() +{ + switch (type_) { + case types::one_frame: + c.destroy >(); + break; + case types::four_frames: + c.destroy >(); + break; + default: + break; + } +} +void mbsfn_sf_cfg_s::sf_alloc_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_, "mbsfn_sf_cfg_s::sf_alloc_c_"); + } +} +mbsfn_sf_cfg_s::sf_alloc_c_::sf_alloc_c_(const mbsfn_sf_cfg_s::sf_alloc_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_, "mbsfn_sf_cfg_s::sf_alloc_c_"); + } +} +mbsfn_sf_cfg_s::sf_alloc_c_& mbsfn_sf_cfg_s::sf_alloc_c_::operator=(const mbsfn_sf_cfg_s::sf_alloc_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_, "mbsfn_sf_cfg_s::sf_alloc_c_"); + } + + return *this; +} +void mbsfn_sf_cfg_s::sf_alloc_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_, "mbsfn_sf_cfg_s::sf_alloc_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbsfn_sf_cfg_s::sf_alloc_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + 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_, "mbsfn_sf_cfg_s::sf_alloc_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_sf_cfg_s::sf_alloc_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, 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_, "mbsfn_sf_cfg_s::sf_alloc_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MBSFN-SubframeConfig-v1430 ::= SEQUENCE +SRSASN_CODE mbsfn_sf_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sf_alloc_v1430.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_sf_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(sf_alloc_v1430.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mbsfn_sf_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("subframeAllocation-v1430"); + sf_alloc_v1430.to_json(j); + j.end_obj(); +} + +void mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::destroy_() +{ + switch (type_) { + case types::one_frame_v1430: + c.destroy >(); + break; + case types::four_frames_v1430: + c.destroy >(); + break; + default: + break; + } +} +void mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::one_frame_v1430: + c.init >(); + break; + case types::four_frames_v1430: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_"); + } +} +mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::sf_alloc_v1430_c_(const mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_frame_v1430: + c.init(other.c.get >()); + break; + case types::four_frames_v1430: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_"); + } +} +mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_& mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_:: + operator=(const mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::one_frame_v1430: + c.set(other.c.get >()); + break; + case types::four_frames_v1430: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_"); + } + + return *this; +} +void mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_frame_v1430: + j.write_str("oneFrame-v1430", c.get >().to_string()); + break; + case types::four_frames_v1430: + j.write_str("fourFrames-v1430", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::one_frame_v1430: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_frames_v1430: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::one_frame_v1430: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_frames_v1430: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PCCH-Config ::= SEQUENCE +SRSASN_CODE pcch_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, default_paging_cycle)); + HANDLE_CODE(pack_enum(bref, nb)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pcch_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(default_paging_cycle, bref)); + HANDLE_CODE(unpack_enum(nb, 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_str("nB", nb.to_string()); + j.end_obj(); +} + +// PCCH-Config-v1310 ::= SEQUENCE +pcch_cfg_v1310_s::pcch_cfg_v1310_s() +{ + nb_v1310_present = false; +} +SRSASN_CODE pcch_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nb_v1310_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, paging_narrow_bands_r13, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_enum(bref, mpdcch_num_repeat_paging_r13)); + if (nb_v1310_present) { + HANDLE_CODE(pack_enum(bref, nb_v1310)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pcch_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nb_v1310_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(paging_narrow_bands_r13, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_enum(mpdcch_num_repeat_paging_r13, bref)); + if (nb_v1310_present) { + HANDLE_CODE(unpack_enum(nb_v1310, bref)); + } + + return SRSASN_SUCCESS; +} +void pcch_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("paging-narrowBands-r13", paging_narrow_bands_r13); + j.write_str("mpdcch-NumRepetition-Paging-r13", mpdcch_num_repeat_paging_r13.to_string()); + if (nb_v1310_present) { + j.write_str("nB-v1310", nb_v1310.to_string()); + } + j.end_obj(); +} + +// PDSCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pdsch_cfg_common_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ref_sig_pwr, (int8_t)-60, (int8_t)50)); + HANDLE_CODE(pack_unalign_integer(bref, p_b, (uint8_t)0, (uint8_t)3)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_common_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ref_sig_pwr, bref, (int8_t)-60, (int8_t)50)); + HANDLE_CODE(unpack_unalign_integer(p_b, bref, (uint8_t)0, (uint8_t)3)); + + return SRSASN_SUCCESS; +} +void pdsch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("referenceSignalPower", ref_sig_pwr); + j.write_int("p-b", p_b); + j.end_obj(); +} + +// PDSCH-ConfigCommon-v1310 ::= SEQUENCE +pdsch_cfg_common_v1310_s::pdsch_cfg_common_v1310_s() +{ + pdsch_max_num_repeat_cemode_a_r13_present = false; + pdsch_max_num_repeat_cemode_b_r13_present = false; +} +SRSASN_CODE pdsch_cfg_common_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdsch_max_num_repeat_cemode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(pdsch_max_num_repeat_cemode_b_r13_present, 1)); + + if (pdsch_max_num_repeat_cemode_a_r13_present) { + HANDLE_CODE(pack_enum(bref, pdsch_max_num_repeat_cemode_a_r13)); + } + if (pdsch_max_num_repeat_cemode_b_r13_present) { + HANDLE_CODE(pack_enum(bref, pdsch_max_num_repeat_cemode_b_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_common_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pdsch_max_num_repeat_cemode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_max_num_repeat_cemode_b_r13_present, 1)); + + if (pdsch_max_num_repeat_cemode_a_r13_present) { + HANDLE_CODE(unpack_enum(pdsch_max_num_repeat_cemode_a_r13, bref)); + } + if (pdsch_max_num_repeat_cemode_b_r13_present) { + HANDLE_CODE(unpack_enum(pdsch_max_num_repeat_cemode_b_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_common_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdsch_max_num_repeat_cemode_a_r13_present) { + j.write_str("pdsch-maxNumRepetitionCEmodeA-r13", pdsch_max_num_repeat_cemode_a_r13.to_string()); + } + if (pdsch_max_num_repeat_cemode_b_r13_present) { + j.write_str("pdsch-maxNumRepetitionCEmodeB-r13", pdsch_max_num_repeat_cemode_b_r13.to_string()); + } + j.end_obj(); +} + +// PLMN-Info-r15 ::= SEQUENCE +plmn_info_r15_s::plmn_info_r15_s() +{ + upper_layer_ind_r15_present = false; +} +SRSASN_CODE plmn_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(upper_layer_ind_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(upper_layer_ind_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void plmn_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (upper_layer_ind_r15_present) { + j.write_str("upperLayerIndication-r15", "true"); + } + j.end_obj(); +} + +// PRACH-Config-v1430 ::= SEQUENCE +SRSASN_CODE prach_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, root_seq_idx_high_speed_r14, (uint16_t)0, (uint16_t)837)); + HANDLE_CODE(pack_unalign_integer(bref, zero_correlation_zone_cfg_high_speed_r14, (uint8_t)0, (uint8_t)12)); + HANDLE_CODE(pack_unalign_integer(bref, prach_cfg_idx_high_speed_r14, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, prach_freq_offset_high_speed_r14, (uint8_t)0, (uint8_t)94)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(root_seq_idx_high_speed_r14, bref, (uint16_t)0, (uint16_t)837)); + HANDLE_CODE(unpack_unalign_integer(zero_correlation_zone_cfg_high_speed_r14, bref, (uint8_t)0, (uint8_t)12)); + HANDLE_CODE(unpack_unalign_integer(prach_cfg_idx_high_speed_r14, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(prach_freq_offset_high_speed_r14, bref, (uint8_t)0, (uint8_t)94)); + + return SRSASN_SUCCESS; +} +void prach_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rootSequenceIndexHighSpeed-r14", root_seq_idx_high_speed_r14); + j.write_int("zeroCorrelationZoneConfigHighSpeed-r14", zero_correlation_zone_cfg_high_speed_r14); + j.write_int("prach-ConfigIndexHighSpeed-r14", prach_cfg_idx_high_speed_r14); + j.write_int("prach-FreqOffsetHighSpeed-r14", prach_freq_offset_high_speed_r14); + j.end_obj(); +} + +// PRACH-ConfigSIB ::= SEQUENCE +SRSASN_CODE prach_cfg_sib_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, root_seq_idx, (uint16_t)0, (uint16_t)837)); + HANDLE_CODE(prach_cfg_info.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_sib_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(root_seq_idx, bref, (uint16_t)0, (uint16_t)837)); + HANDLE_CODE(prach_cfg_info.unpack(bref)); + + return SRSASN_SUCCESS; +} +void prach_cfg_sib_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rootSequenceIndex", root_seq_idx); + j.write_fieldname("prach-ConfigInfo"); + prach_cfg_info.to_json(j); + j.end_obj(); +} + +// PRACH-ConfigSIB-v1310 ::= SEQUENCE +prach_cfg_sib_v1310_s::prach_cfg_sib_v1310_s() +{ + mpdcch_start_sf_css_ra_r13_present = false; + prach_hop_offset_r13_present = false; +} +SRSASN_CODE prach_cfg_sib_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mpdcch_start_sf_css_ra_r13_present, 1)); + HANDLE_CODE(bref.pack(prach_hop_offset_r13_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, rsrp_thress_prach_info_list_r13, 1, 3, UnalignedIntegerPacker(0, 97))); + if (mpdcch_start_sf_css_ra_r13_present) { + HANDLE_CODE(mpdcch_start_sf_css_ra_r13.pack(bref)); + } + if (prach_hop_offset_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, prach_hop_offset_r13, (uint8_t)0, (uint8_t)94)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, prach_params_list_ce_r13, 1, 4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_sib_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mpdcch_start_sf_css_ra_r13_present, 1)); + HANDLE_CODE(bref.unpack(prach_hop_offset_r13_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(rsrp_thress_prach_info_list_r13, bref, 1, 3, UnalignedIntegerPacker(0, 97))); + if (mpdcch_start_sf_css_ra_r13_present) { + HANDLE_CODE(mpdcch_start_sf_css_ra_r13.unpack(bref)); + } + if (prach_hop_offset_r13_present) { + HANDLE_CODE(unpack_unalign_integer(prach_hop_offset_r13, bref, (uint8_t)0, (uint8_t)94)); + } + HANDLE_CODE(unpack_dyn_seq_of(prach_params_list_ce_r13, bref, 1, 4)); + + return SRSASN_SUCCESS; +} +void prach_cfg_sib_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("rsrp-ThresholdsPrachInfoList-r13"); + for (uint32_t i1 = 0; i1 < rsrp_thress_prach_info_list_r13.size(); ++i1) { + j.write_int(rsrp_thress_prach_info_list_r13[i1]); + } + j.end_array(); + if (mpdcch_start_sf_css_ra_r13_present) { + j.write_fieldname("mpdcch-startSF-CSS-RA-r13"); + mpdcch_start_sf_css_ra_r13.to_json(j); + } + if (prach_hop_offset_r13_present) { + j.write_int("prach-HoppingOffset-r13", prach_hop_offset_r13); + } + j.start_array("prach-ParametersListCE-r13"); + for (uint32_t i1 = 0; i1 < prach_params_list_ce_r13.size(); ++i1) { + prach_params_list_ce_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +void prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::destroy_() {} +void prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::mpdcch_start_sf_css_ra_r13_c_( + const prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r13: + c.init(other.c.get()); + break; + case types::tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + } +} +prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_& prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_:: + operator=(const prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r13: + c.set(other.c.get()); + break; + case types::tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + } + + return *this; +} +void prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r13: + j.write_str("fdd-r13", c.get().to_string()); + break; + case types::tdd_r13: + j.write_str("tdd-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PRACH-ConfigSIB-v1530 ::= SEQUENCE +SRSASN_CODE prach_cfg_sib_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, edt_prach_params_list_ce_r15, 1, 4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_sib_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(edt_prach_params_list_ce_r15, bref, 1, 4)); + + return SRSASN_SUCCESS; +} +void prach_cfg_sib_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("edt-PRACH-ParametersListCE-r15"); + for (uint32_t i1 = 0; i1 < edt_prach_params_list_ce_r15.size(); ++i1) { + edt_prach_params_list_ce_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// PUCCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pucch_cfg_common_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, delta_pucch_shift)); + HANDLE_CODE(pack_unalign_integer(bref, n_rb_cqi, (uint8_t)0, (uint8_t)98)); + HANDLE_CODE(pack_unalign_integer(bref, n_cs_an, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, n1_pucch_an, (uint16_t)0, (uint16_t)2047)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_common_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(delta_pucch_shift, bref)); + HANDLE_CODE(unpack_unalign_integer(n_rb_cqi, bref, (uint8_t)0, (uint8_t)98)); + HANDLE_CODE(unpack_unalign_integer(n_cs_an, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(n1_pucch_an, bref, (uint16_t)0, (uint16_t)2047)); + + return SRSASN_SUCCESS; +} +void pucch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaPUCCH-Shift", delta_pucch_shift.to_string()); + j.write_int("nRB-CQI", n_rb_cqi); + j.write_int("nCS-AN", n_cs_an); + j.write_int("n1PUCCH-AN", n1_pucch_an); + j.end_obj(); +} + +// PUCCH-ConfigCommon-v1310 ::= SEQUENCE +pucch_cfg_common_v1310_s::pucch_cfg_common_v1310_s() +{ + n1_pucch_an_info_list_r13_present = false; + pucch_num_repeat_ce_msg4_level0_r13_present = false; + pucch_num_repeat_ce_msg4_level1_r13_present = false; + pucch_num_repeat_ce_msg4_level2_r13_present = false; + pucch_num_repeat_ce_msg4_level3_r13_present = false; +} +SRSASN_CODE pucch_cfg_common_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(n1_pucch_an_info_list_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_msg4_level0_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_msg4_level1_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_msg4_level2_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_msg4_level3_r13_present, 1)); + + if (n1_pucch_an_info_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, n1_pucch_an_info_list_r13, 1, 4, UnalignedIntegerPacker(0, 2047))); + } + if (pucch_num_repeat_ce_msg4_level0_r13_present) { + HANDLE_CODE(pack_enum(bref, pucch_num_repeat_ce_msg4_level0_r13)); + } + if (pucch_num_repeat_ce_msg4_level1_r13_present) { + HANDLE_CODE(pack_enum(bref, pucch_num_repeat_ce_msg4_level1_r13)); + } + if (pucch_num_repeat_ce_msg4_level2_r13_present) { + HANDLE_CODE(pack_enum(bref, pucch_num_repeat_ce_msg4_level2_r13)); + } + if (pucch_num_repeat_ce_msg4_level3_r13_present) { + HANDLE_CODE(pack_enum(bref, pucch_num_repeat_ce_msg4_level3_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_common_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(n1_pucch_an_info_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_msg4_level0_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_msg4_level1_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_msg4_level2_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_msg4_level3_r13_present, 1)); + + if (n1_pucch_an_info_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(n1_pucch_an_info_list_r13, bref, 1, 4, UnalignedIntegerPacker(0, 2047))); + } + if (pucch_num_repeat_ce_msg4_level0_r13_present) { + HANDLE_CODE(unpack_enum(pucch_num_repeat_ce_msg4_level0_r13, bref)); + } + if (pucch_num_repeat_ce_msg4_level1_r13_present) { + HANDLE_CODE(unpack_enum(pucch_num_repeat_ce_msg4_level1_r13, bref)); + } + if (pucch_num_repeat_ce_msg4_level2_r13_present) { + HANDLE_CODE(unpack_enum(pucch_num_repeat_ce_msg4_level2_r13, bref)); + } + if (pucch_num_repeat_ce_msg4_level3_r13_present) { + HANDLE_CODE(unpack_enum(pucch_num_repeat_ce_msg4_level3_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_common_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (n1_pucch_an_info_list_r13_present) { + j.start_array("n1PUCCH-AN-InfoList-r13"); + for (uint32_t i1 = 0; i1 < n1_pucch_an_info_list_r13.size(); ++i1) { + j.write_int(n1_pucch_an_info_list_r13[i1]); + } + j.end_array(); + } + if (pucch_num_repeat_ce_msg4_level0_r13_present) { + j.write_str("pucch-NumRepetitionCE-Msg4-Level0-r13", pucch_num_repeat_ce_msg4_level0_r13.to_string()); + } + if (pucch_num_repeat_ce_msg4_level1_r13_present) { + j.write_str("pucch-NumRepetitionCE-Msg4-Level1-r13", pucch_num_repeat_ce_msg4_level1_r13.to_string()); + } + if (pucch_num_repeat_ce_msg4_level2_r13_present) { + j.write_str("pucch-NumRepetitionCE-Msg4-Level2-r13", pucch_num_repeat_ce_msg4_level2_r13.to_string()); + } + if (pucch_num_repeat_ce_msg4_level3_r13_present) { + j.write_str("pucch-NumRepetitionCE-Msg4-Level3-r13", pucch_num_repeat_ce_msg4_level3_r13.to_string()); + } + j.end_obj(); +} + +// PUCCH-ConfigCommon-v1430 ::= SEQUENCE +pucch_cfg_common_v1430_s::pucch_cfg_common_v1430_s() +{ + pucch_num_repeat_ce_msg4_level3_r14_present = false; +} +SRSASN_CODE pucch_cfg_common_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_msg4_level3_r14_present, 1)); + + if (pucch_num_repeat_ce_msg4_level3_r14_present) { + HANDLE_CODE(pack_enum(bref, pucch_num_repeat_ce_msg4_level3_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_common_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_msg4_level3_r14_present, 1)); + + if (pucch_num_repeat_ce_msg4_level3_r14_present) { + HANDLE_CODE(unpack_enum(pucch_num_repeat_ce_msg4_level3_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_common_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_num_repeat_ce_msg4_level3_r14_present) { + j.write_str("pucch-NumRepetitionCE-Msg4-Level3-r14", pucch_num_repeat_ce_msg4_level3_r14.to_string()); + } + j.end_obj(); +} + +// PUSCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pusch_cfg_common_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pusch_cfg_basic.n_sb, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, pusch_cfg_basic.hop_mode)); + HANDLE_CODE(pack_unalign_integer(bref, pusch_cfg_basic.pusch_hop_offset, (uint8_t)0, (uint8_t)98)); + HANDLE_CODE(bref.pack(pusch_cfg_basic.enable64_qam, 1)); + HANDLE_CODE(ul_ref_sigs_pusch.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_common_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pusch_cfg_basic.n_sb, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_enum(pusch_cfg_basic.hop_mode, bref)); + HANDLE_CODE(unpack_unalign_integer(pusch_cfg_basic.pusch_hop_offset, bref, (uint8_t)0, (uint8_t)98)); + HANDLE_CODE(bref.unpack(pusch_cfg_basic.enable64_qam, 1)); + HANDLE_CODE(ul_ref_sigs_pusch.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pusch-ConfigBasic"); + j.start_obj(); + j.write_int("n-SB", pusch_cfg_basic.n_sb); + j.write_str("hoppingMode", pusch_cfg_basic.hop_mode.to_string()); + j.write_int("pusch-HoppingOffset", pusch_cfg_basic.pusch_hop_offset); + j.write_bool("enable64QAM", pusch_cfg_basic.enable64_qam); + j.end_obj(); + j.write_fieldname("ul-ReferenceSignalsPUSCH"); + ul_ref_sigs_pusch.to_json(j); + j.end_obj(); +} + +// PUSCH-ConfigCommon-v1270 ::= SEQUENCE +SRSASN_CODE pusch_cfg_common_v1270_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_common_v1270_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void pusch_cfg_common_v1270_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("enable64QAM-v1270", "true"); + j.end_obj(); +} + +// PUSCH-ConfigCommon-v1310 ::= SEQUENCE +pusch_cfg_common_v1310_s::pusch_cfg_common_v1310_s() +{ + pusch_max_num_repeat_cemode_a_r13_present = false; + pusch_max_num_repeat_cemode_b_r13_present = false; + pusch_hop_offset_v1310_present = false; +} +SRSASN_CODE pusch_cfg_common_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pusch_max_num_repeat_cemode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(pusch_max_num_repeat_cemode_b_r13_present, 1)); + HANDLE_CODE(bref.pack(pusch_hop_offset_v1310_present, 1)); + + if (pusch_max_num_repeat_cemode_a_r13_present) { + HANDLE_CODE(pack_enum(bref, pusch_max_num_repeat_cemode_a_r13)); + } + if (pusch_max_num_repeat_cemode_b_r13_present) { + HANDLE_CODE(pack_enum(bref, pusch_max_num_repeat_cemode_b_r13)); + } + if (pusch_hop_offset_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, pusch_hop_offset_v1310, (uint8_t)1, (uint8_t)16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_common_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pusch_max_num_repeat_cemode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(pusch_max_num_repeat_cemode_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(pusch_hop_offset_v1310_present, 1)); + + if (pusch_max_num_repeat_cemode_a_r13_present) { + HANDLE_CODE(unpack_enum(pusch_max_num_repeat_cemode_a_r13, bref)); + } + if (pusch_max_num_repeat_cemode_b_r13_present) { + HANDLE_CODE(unpack_enum(pusch_max_num_repeat_cemode_b_r13, bref)); + } + if (pusch_hop_offset_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(pusch_hop_offset_v1310, bref, (uint8_t)1, (uint8_t)16)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_common_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pusch_max_num_repeat_cemode_a_r13_present) { + j.write_str("pusch-maxNumRepetitionCEmodeA-r13", pusch_max_num_repeat_cemode_a_r13.to_string()); + } + if (pusch_max_num_repeat_cemode_b_r13_present) { + j.write_str("pusch-maxNumRepetitionCEmodeB-r13", pusch_max_num_repeat_cemode_b_r13.to_string()); + } + if (pusch_hop_offset_v1310_present) { + j.write_int("pusch-HoppingOffset-v1310", pusch_hop_offset_v1310); + } + j.end_obj(); +} + +// RACH-ConfigCommon ::= SEQUENCE +rach_cfg_common_s::rach_cfg_common_s() +{ + ext = false; + preamb_trans_max_ce_r13_present = false; + rach_ce_level_info_list_r13_present = false; + edt_small_tbs_subset_r15_present = false; +} +SRSASN_CODE rach_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(preamb_info.preambs_group_a_cfg_present, 1)); + HANDLE_CODE(pack_enum(bref, preamb_info.nof_ra_preambs)); + if (preamb_info.preambs_group_a_cfg_present) { + bref.pack(preamb_info.preambs_group_a_cfg.ext, 1); + HANDLE_CODE(pack_enum(bref, preamb_info.preambs_group_a_cfg.size_of_ra_preambs_group_a)); + HANDLE_CODE(pack_enum(bref, preamb_info.preambs_group_a_cfg.msg_size_group_a)); + HANDLE_CODE(pack_enum(bref, preamb_info.preambs_group_a_cfg.msg_pwr_offset_group_b)); + } + HANDLE_CODE(pwr_ramp_params.pack(bref)); + HANDLE_CODE(pack_enum(bref, ra_supervision_info.preamb_trans_max)); + HANDLE_CODE(pack_enum(bref, ra_supervision_info.ra_resp_win_size)); + HANDLE_CODE(pack_enum(bref, ra_supervision_info.mac_contention_resolution_timer)); + HANDLE_CODE(pack_unalign_integer(bref, max_harq_msg3_tx, (uint8_t)1, (uint8_t)8)); + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= preamb_trans_max_ce_r13_present; + rrc_asn1_warn_assert(rach_ce_level_info_list_r13_present != (rach_ce_level_info_list_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= rach_ce_level_info_list_r13_present; + group_flags[1] |= edt_small_tbs_subset_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(preamb_trans_max_ce_r13_present, 1)); + HANDLE_CODE(bref.pack(rach_ce_level_info_list_r13_present, 1)); + if (preamb_trans_max_ce_r13_present) { + HANDLE_CODE(pack_enum(bref, preamb_trans_max_ce_r13)); + } + if (rach_ce_level_info_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *rach_ce_level_info_list_r13, 1, 4)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(edt_small_tbs_subset_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(preamb_info.preambs_group_a_cfg_present, 1)); + HANDLE_CODE(unpack_enum(preamb_info.nof_ra_preambs, bref)); + if (preamb_info.preambs_group_a_cfg_present) { + bref.unpack(preamb_info.preambs_group_a_cfg.ext, 1); + HANDLE_CODE(unpack_enum(preamb_info.preambs_group_a_cfg.size_of_ra_preambs_group_a, bref)); + HANDLE_CODE(unpack_enum(preamb_info.preambs_group_a_cfg.msg_size_group_a, bref)); + HANDLE_CODE(unpack_enum(preamb_info.preambs_group_a_cfg.msg_pwr_offset_group_b, bref)); + } + HANDLE_CODE(pwr_ramp_params.unpack(bref)); + HANDLE_CODE(unpack_enum(ra_supervision_info.preamb_trans_max, bref)); + HANDLE_CODE(unpack_enum(ra_supervision_info.ra_resp_win_size, bref)); + HANDLE_CODE(unpack_enum(ra_supervision_info.mac_contention_resolution_timer, bref)); + HANDLE_CODE(unpack_unalign_integer(max_harq_msg3_tx, bref, (uint8_t)1, (uint8_t)8)); + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(preamb_trans_max_ce_r13_present, 1)); + HANDLE_CODE(bref.unpack(rach_ce_level_info_list_r13_present, 1)); + if (preamb_trans_max_ce_r13_present) { + HANDLE_CODE(unpack_enum(preamb_trans_max_ce_r13, bref)); + } + if (rach_ce_level_info_list_r13_present) { + rach_ce_level_info_list_r13 = make_copy_ptr(rach_ce_level_info_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*rach_ce_level_info_list_r13, bref, 1, 4)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(edt_small_tbs_subset_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void rach_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("preambleInfo"); + j.start_obj(); + j.write_str("numberOfRA-Preambles", preamb_info.nof_ra_preambs.to_string()); + if (preamb_info.preambs_group_a_cfg_present) { + j.write_fieldname("preamblesGroupAConfig"); + j.start_obj(); + j.write_str("sizeOfRA-PreamblesGroupA", preamb_info.preambs_group_a_cfg.size_of_ra_preambs_group_a.to_string()); + j.write_str("messageSizeGroupA", preamb_info.preambs_group_a_cfg.msg_size_group_a.to_string()); + j.write_str("messagePowerOffsetGroupB", preamb_info.preambs_group_a_cfg.msg_pwr_offset_group_b.to_string()); + j.end_obj(); + } + j.end_obj(); + j.write_fieldname("powerRampingParameters"); + pwr_ramp_params.to_json(j); + j.write_fieldname("ra-SupervisionInfo"); + j.start_obj(); + j.write_str("preambleTransMax", ra_supervision_info.preamb_trans_max.to_string()); + j.write_str("ra-ResponseWindowSize", ra_supervision_info.ra_resp_win_size.to_string()); + j.write_str("mac-ContentionResolutionTimer", ra_supervision_info.mac_contention_resolution_timer.to_string()); + j.end_obj(); + j.write_int("maxHARQ-Msg3Tx", max_harq_msg3_tx); + if (preamb_trans_max_ce_r13_present) { + j.write_str("preambleTransMax-CE-r13", preamb_trans_max_ce_r13.to_string()); + } + if (rach_ce_level_info_list_r13_present) { + j.start_array("rach-CE-LevelInfoList-r13"); + for (uint32_t i1 = 0; i1 < rach_ce_level_info_list_r13->size(); ++i1) { + ((*rach_ce_level_info_list_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (edt_small_tbs_subset_r15_present) { + j.write_str("edt-SmallTBS-Subset-r15", "true"); + } + j.end_obj(); +} + +rach_cfg_common_s::preamb_info_s_::preamb_info_s_() +{ + preambs_group_a_cfg_present = false; +} + +rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::preambs_group_a_cfg_s_() +{ + ext = false; +} + +// RACH-ConfigCommon-v1250 ::= SEQUENCE +SRSASN_CODE rach_cfg_common_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_fail_params_r12.conn_est_fail_offset_r12_present, 1)); + HANDLE_CODE(pack_enum(bref, tx_fail_params_r12.conn_est_fail_count_r12)); + HANDLE_CODE(pack_enum(bref, tx_fail_params_r12.conn_est_fail_offset_validity_r12)); + if (tx_fail_params_r12.conn_est_fail_offset_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_fail_params_r12.conn_est_fail_offset_r12, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_fail_params_r12.conn_est_fail_offset_r12_present, 1)); + HANDLE_CODE(unpack_enum(tx_fail_params_r12.conn_est_fail_count_r12, bref)); + HANDLE_CODE(unpack_enum(tx_fail_params_r12.conn_est_fail_offset_validity_r12, bref)); + if (tx_fail_params_r12.conn_est_fail_offset_r12_present) { + HANDLE_CODE(unpack_unalign_integer(tx_fail_params_r12.conn_est_fail_offset_r12, bref, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +void rach_cfg_common_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("txFailParams-r12"); + j.start_obj(); + j.write_str("connEstFailCount-r12", tx_fail_params_r12.conn_est_fail_count_r12.to_string()); + j.write_str("connEstFailOffsetValidity-r12", tx_fail_params_r12.conn_est_fail_offset_validity_r12.to_string()); + if (tx_fail_params_r12.conn_est_fail_offset_r12_present) { + j.write_int("connEstFailOffset-r12", tx_fail_params_r12.conn_est_fail_offset_r12); + } + j.end_obj(); + j.end_obj(); +} + +rach_cfg_common_v1250_s::tx_fail_params_r12_s_::tx_fail_params_r12_s_() +{ + conn_est_fail_offset_r12_present = false; +} + +// RSS-Config-r15 ::= SEQUENCE +SRSASN_CODE rss_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, dur_r15)); + HANDLE_CODE(pack_unalign_integer(bref, freq_location_r15, (uint8_t)0, (uint8_t)98)); + HANDLE_CODE(pack_enum(bref, periodicity_r15)); + HANDLE_CODE(pack_enum(bref, pwr_boost_r15)); + HANDLE_CODE(pack_unalign_integer(bref, time_offset_r15, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rss_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(dur_r15, bref)); + HANDLE_CODE(unpack_unalign_integer(freq_location_r15, bref, (uint8_t)0, (uint8_t)98)); + HANDLE_CODE(unpack_enum(periodicity_r15, bref)); + HANDLE_CODE(unpack_enum(pwr_boost_r15, bref)); + HANDLE_CODE(unpack_unalign_integer(time_offset_r15, bref, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +void rss_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("duration-r15", dur_r15.to_string()); + j.write_int("freqLocation-r15", freq_location_r15); + j.write_str("periodicity-r15", periodicity_r15.to_string()); + j.write_str("powerBoost-r15", pwr_boost_r15.to_string()); + j.write_int("timeOffset-r15", time_offset_r15); + j.end_obj(); +} + +// ReferenceTime-r15 ::= SEQUENCE +SRSASN_CODE ref_time_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ref_days_r15, (uint32_t)0, (uint32_t)72999)); + HANDLE_CODE(pack_unalign_integer(bref, ref_seconds_r15, (uint32_t)0, (uint32_t)86399)); + HANDLE_CODE(pack_unalign_integer(bref, ref_milli_seconds_r15, (uint16_t)0, (uint16_t)999)); + HANDLE_CODE(pack_unalign_integer(bref, ref_quarter_micro_seconds_r15, (uint16_t)0, (uint16_t)3999)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ref_time_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ref_days_r15, bref, (uint32_t)0, (uint32_t)72999)); + HANDLE_CODE(unpack_unalign_integer(ref_seconds_r15, bref, (uint32_t)0, (uint32_t)86399)); + HANDLE_CODE(unpack_unalign_integer(ref_milli_seconds_r15, bref, (uint16_t)0, (uint16_t)999)); + HANDLE_CODE(unpack_unalign_integer(ref_quarter_micro_seconds_r15, bref, (uint16_t)0, (uint16_t)3999)); + + return SRSASN_SUCCESS; +} +void ref_time_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("refDays-r15", ref_days_r15); + j.write_int("refSeconds-r15", ref_seconds_r15); + j.write_int("refMilliSeconds-r15", ref_milli_seconds_r15); + j.write_int("refQuarterMicroSeconds-r15", ref_quarter_micro_seconds_r15); + j.end_obj(); +} + +// ReselectionInfoRelay-r13 ::= SEQUENCE +resel_info_relay_r13_s::resel_info_relay_r13_s() +{ + min_hyst_r13_present = false; +} +SRSASN_CODE resel_info_relay_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(min_hyst_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, q_rx_lev_min_r13, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(pack_enum(bref, filt_coef_r13)); + if (min_hyst_r13_present) { + HANDLE_CODE(pack_enum(bref, min_hyst_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE resel_info_relay_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(min_hyst_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(q_rx_lev_min_r13, bref, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(unpack_enum(filt_coef_r13, bref)); + if (min_hyst_r13_present) { + HANDLE_CODE(unpack_enum(min_hyst_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void resel_info_relay_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-RxLevMin-r13", q_rx_lev_min_r13); + j.write_str("filterCoefficient-r13", filt_coef_r13.to_string()); + if (min_hyst_r13_present) { + j.write_str("minHyst-r13", min_hyst_r13.to_string()); + } + j.end_obj(); +} + +// SIB8-PerPLMN-r11 ::= SEQUENCE +SRSASN_CODE sib8_per_plmn_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, plmn_id_r11, (uint8_t)1, (uint8_t)6)); + HANDLE_CODE(params_cdma2000_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib8_per_plmn_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(plmn_id_r11, bref, (uint8_t)1, (uint8_t)6)); + HANDLE_CODE(params_cdma2000_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sib8_per_plmn_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-Identity-r11", plmn_id_r11); + j.write_fieldname("parametersCDMA2000-r11"); + params_cdma2000_r11.to_json(j); + j.end_obj(); +} + +void sib8_per_plmn_r11_s::params_cdma2000_r11_c_::set(types::options e) +{ + type_ = e; +} +void sib8_per_plmn_r11_s::params_cdma2000_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "sib8_per_plmn_r11_s::params_cdma2000_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib8_per_plmn_r11_s::params_cdma2000_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "sib8_per_plmn_r11_s::params_cdma2000_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib8_per_plmn_r11_s::params_cdma2000_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "sib8_per_plmn_r11_s::params_cdma2000_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-CBR-CommonTxConfigList-r14 ::= SEQUENCE +SRSASN_CODE sl_cbr_common_tx_cfg_list_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE( + pack_dyn_seq_of(bref, cbr_range_common_cfg_list_r14, 1, 4, + SeqOfPacker >(1, 16, UnalignedIntegerPacker(0, 100)))); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_cbr_pssch_tx_cfg_list_r14, 1, 64)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_cbr_common_tx_cfg_list_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE( + unpack_dyn_seq_of(cbr_range_common_cfg_list_r14, bref, 1, 4, + SeqOfPacker >(1, 16, UnalignedIntegerPacker(0, 100)))); + HANDLE_CODE(unpack_dyn_seq_of(sl_cbr_pssch_tx_cfg_list_r14, bref, 1, 64)); + + return SRSASN_SUCCESS; +} +void sl_cbr_common_tx_cfg_list_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("cbr-RangeCommonConfigList-r14"); + for (uint32_t i1 = 0; i1 < cbr_range_common_cfg_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < cbr_range_common_cfg_list_r14[i1].size(); ++i2) { + j.write_int(cbr_range_common_cfg_list_r14[i1][i2]); + } + j.end_array(); + } + j.end_array(); + j.start_array("sl-CBR-PSSCH-TxConfigList-r14"); + for (uint32_t i1 = 0; i1 < sl_cbr_pssch_tx_cfg_list_r14.size(); ++i1) { + sl_cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// SL-CarrierFreqInfo-r12 ::= SEQUENCE +sl_carrier_freq_info_r12_s::sl_carrier_freq_info_r12_s() +{ + plmn_id_list_r12_present = false; +} +SRSASN_CODE sl_carrier_freq_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_list_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + if (plmn_id_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r12, 1, 6)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_carrier_freq_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_list_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + if (plmn_id_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r12, bref, 1, 6)); + } + + return SRSASN_SUCCESS; +} +void sl_carrier_freq_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r12", carrier_freq_r12); + if (plmn_id_list_r12_present) { + j.start_array("plmn-IdentityList-r12"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r12.size(); ++i1) { + plmn_id_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-CarrierFreqInfo-v1310 ::= SEQUENCE +sl_carrier_freq_info_v1310_s::sl_carrier_freq_info_v1310_s() +{ + ext = false; + disc_res_non_ps_r13_present = false; + disc_res_ps_r13_present = false; + disc_cfg_other_r13_present = false; +} +SRSASN_CODE sl_carrier_freq_info_v1310_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(disc_res_non_ps_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_res_ps_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_cfg_other_r13_present, 1)); + + if (disc_res_non_ps_r13_present) { + HANDLE_CODE(disc_res_non_ps_r13.pack(bref)); + } + if (disc_res_ps_r13_present) { + HANDLE_CODE(disc_res_ps_r13.pack(bref)); + } + if (disc_cfg_other_r13_present) { + HANDLE_CODE(disc_cfg_other_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_carrier_freq_info_v1310_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(disc_res_non_ps_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_res_ps_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_cfg_other_r13_present, 1)); + + if (disc_res_non_ps_r13_present) { + HANDLE_CODE(disc_res_non_ps_r13.unpack(bref)); + } + if (disc_res_ps_r13_present) { + HANDLE_CODE(disc_res_ps_r13.unpack(bref)); + } + if (disc_cfg_other_r13_present) { + HANDLE_CODE(disc_cfg_other_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_carrier_freq_info_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_res_non_ps_r13_present) { + j.write_fieldname("discResourcesNonPS-r13"); + disc_res_non_ps_r13.to_json(j); + } + if (disc_res_ps_r13_present) { + j.write_fieldname("discResourcesPS-r13"); + disc_res_ps_r13.to_json(j); + } + if (disc_cfg_other_r13_present) { + j.write_fieldname("discConfigOther-r13"); + disc_cfg_other_r13.to_json(j); + } + j.end_obj(); +} + +// SL-CommResourcePool-r12 ::= SEQUENCE +sl_comm_res_pool_r12_s::sl_comm_res_pool_r12_s() +{ + ext = false; + ue_sel_res_cfg_r12_present = false; + rx_params_ncell_r12_present = false; + tx_params_r12_present = false; + prio_list_r13_present = false; +} +SRSASN_CODE sl_comm_res_pool_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ue_sel_res_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(rx_params_ncell_r12_present, 1)); + HANDLE_CODE(bref.pack(tx_params_r12_present, 1)); + + HANDLE_CODE(pack_enum(bref, sc_cp_len_r12)); + HANDLE_CODE(pack_enum(bref, sc_period_r12)); + HANDLE_CODE(sc_tf_res_cfg_r12.pack(bref)); + HANDLE_CODE(pack_enum(bref, data_cp_len_r12)); + HANDLE_CODE(data_hop_cfg_r12.pack(bref)); + if (ue_sel_res_cfg_r12_present) { + HANDLE_CODE(bref.pack(ue_sel_res_cfg_r12.trpt_subset_r12_present, 1)); + HANDLE_CODE(ue_sel_res_cfg_r12.data_tf_res_cfg_r12.pack(bref)); + if (ue_sel_res_cfg_r12.trpt_subset_r12_present) { + HANDLE_CODE(ue_sel_res_cfg_r12.trpt_subset_r12.pack(bref)); + } + } + if (rx_params_ncell_r12_present) { + HANDLE_CODE(bref.pack(rx_params_ncell_r12.tdd_cfg_r12_present, 1)); + if (rx_params_ncell_r12.tdd_cfg_r12_present) { + HANDLE_CODE(rx_params_ncell_r12.tdd_cfg_r12.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, rx_params_ncell_r12.sync_cfg_idx_r12, (uint8_t)0, (uint8_t)15)); + } + if (tx_params_r12_present) { + HANDLE_CODE(tx_params_r12.sc_tx_params_r12.pack(bref)); + HANDLE_CODE(tx_params_r12.data_tx_params_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(prio_list_r13_present != (prio_list_r13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= prio_list_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(prio_list_r13_present, 1)); + if (prio_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *prio_list_r13, 1, 8, UnalignedIntegerPacker(1, 8))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_res_pool_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ue_sel_res_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(rx_params_ncell_r12_present, 1)); + HANDLE_CODE(bref.unpack(tx_params_r12_present, 1)); + + HANDLE_CODE(unpack_enum(sc_cp_len_r12, bref)); + HANDLE_CODE(unpack_enum(sc_period_r12, bref)); + HANDLE_CODE(sc_tf_res_cfg_r12.unpack(bref)); + HANDLE_CODE(unpack_enum(data_cp_len_r12, bref)); + HANDLE_CODE(data_hop_cfg_r12.unpack(bref)); + if (ue_sel_res_cfg_r12_present) { + HANDLE_CODE(bref.unpack(ue_sel_res_cfg_r12.trpt_subset_r12_present, 1)); + HANDLE_CODE(ue_sel_res_cfg_r12.data_tf_res_cfg_r12.unpack(bref)); + if (ue_sel_res_cfg_r12.trpt_subset_r12_present) { + HANDLE_CODE(ue_sel_res_cfg_r12.trpt_subset_r12.unpack(bref)); + } + } + if (rx_params_ncell_r12_present) { + HANDLE_CODE(bref.unpack(rx_params_ncell_r12.tdd_cfg_r12_present, 1)); + if (rx_params_ncell_r12.tdd_cfg_r12_present) { + HANDLE_CODE(rx_params_ncell_r12.tdd_cfg_r12.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(rx_params_ncell_r12.sync_cfg_idx_r12, bref, (uint8_t)0, (uint8_t)15)); + } + if (tx_params_r12_present) { + HANDLE_CODE(tx_params_r12.sc_tx_params_r12.unpack(bref)); + HANDLE_CODE(tx_params_r12.data_tx_params_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(prio_list_r13_present, 1)); + if (prio_list_r13_present) { + prio_list_r13 = make_copy_ptr(sl_prio_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*prio_list_r13, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + } + } + } + return SRSASN_SUCCESS; +} +void sl_comm_res_pool_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sc-CP-Len-r12", sc_cp_len_r12.to_string()); + j.write_str("sc-Period-r12", sc_period_r12.to_string()); + j.write_fieldname("sc-TF-ResourceConfig-r12"); + sc_tf_res_cfg_r12.to_json(j); + j.write_str("data-CP-Len-r12", data_cp_len_r12.to_string()); + j.write_fieldname("dataHoppingConfig-r12"); + data_hop_cfg_r12.to_json(j); + if (ue_sel_res_cfg_r12_present) { + j.write_fieldname("ue-SelectedResourceConfig-r12"); + j.start_obj(); + j.write_fieldname("data-TF-ResourceConfig-r12"); + ue_sel_res_cfg_r12.data_tf_res_cfg_r12.to_json(j); + if (ue_sel_res_cfg_r12.trpt_subset_r12_present) { + j.write_str("trpt-Subset-r12", ue_sel_res_cfg_r12.trpt_subset_r12.to_string()); + } + j.end_obj(); + } + if (rx_params_ncell_r12_present) { + j.write_fieldname("rxParametersNCell-r12"); + j.start_obj(); + if (rx_params_ncell_r12.tdd_cfg_r12_present) { + j.write_fieldname("tdd-Config-r12"); + rx_params_ncell_r12.tdd_cfg_r12.to_json(j); + } + j.write_int("syncConfigIndex-r12", rx_params_ncell_r12.sync_cfg_idx_r12); + j.end_obj(); + } + if (tx_params_r12_present) { + j.write_fieldname("txParameters-r12"); + j.start_obj(); + j.write_fieldname("sc-TxParameters-r12"); + tx_params_r12.sc_tx_params_r12.to_json(j); + j.write_fieldname("dataTxParameters-r12"); + tx_params_r12.data_tx_params_r12.to_json(j); + j.end_obj(); + } + if (prio_list_r13_present) { + j.start_array("priorityList-r13"); + for (uint32_t i1 = 0; i1 < prio_list_r13->size(); ++i1) { + j.write_int(((*prio_list_r13)[i1])); + } + j.end_array(); + } + j.end_obj(); +} + +sl_comm_res_pool_r12_s::ue_sel_res_cfg_r12_s_::ue_sel_res_cfg_r12_s_() +{ + trpt_subset_r12_present = false; +} + +sl_comm_res_pool_r12_s::rx_params_ncell_r12_s_::rx_params_ncell_r12_s_() +{ + tdd_cfg_r12_present = false; +} + +// SL-PPPP-TxConfigIndex-r15 ::= SEQUENCE +SRSASN_CODE sl_pppp_tx_cfg_idx_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, prio_thres_r15, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_unalign_integer(bref, default_tx_cfg_idx_r15, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, cbr_cfg_idx_r15, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_dyn_seq_of(bref, tx_cfg_idx_list_r15, 1, 16, UnalignedIntegerPacker(0, 63))); + HANDLE_CODE(pack_dyn_seq_of(bref, mcs_pssch_range_list_r15, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pppp_tx_cfg_idx_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(prio_thres_r15, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_unalign_integer(default_tx_cfg_idx_r15, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(cbr_cfg_idx_r15, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_dyn_seq_of(tx_cfg_idx_list_r15, bref, 1, 16, UnalignedIntegerPacker(0, 63))); + HANDLE_CODE(unpack_dyn_seq_of(mcs_pssch_range_list_r15, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void sl_pppp_tx_cfg_idx_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("priorityThreshold-r15", prio_thres_r15); + j.write_int("defaultTxConfigIndex-r15", default_tx_cfg_idx_r15); + j.write_int("cbr-ConfigIndex-r15", cbr_cfg_idx_r15); + j.start_array("tx-ConfigIndexList-r15"); + for (uint32_t i1 = 0; i1 < tx_cfg_idx_list_r15.size(); ++i1) { + j.write_int(tx_cfg_idx_list_r15[i1]); + } + j.end_array(); + j.start_array("mcs-PSSCH-RangeList-r15"); + for (uint32_t i1 = 0; i1 < mcs_pssch_range_list_r15.size(); ++i1) { + mcs_pssch_range_list_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// SoundingRS-UL-ConfigCommon ::= CHOICE +void srs_ul_cfg_common_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_common_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("srs-BandwidthConfig", c.srs_bw_cfg.to_string()); + j.write_str("srs-SubframeConfig", c.srs_sf_cfg.to_string()); + j.write_bool("ackNackSRS-SimultaneousTransmission", c.ack_nack_srs_simul_tx); + if (c.srs_max_up_pts_present) { + j.write_str("srs-MaxUpPts", "true"); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_common_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_common_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_max_up_pts_present, 1)); + HANDLE_CODE(pack_enum(bref, c.srs_bw_cfg)); + HANDLE_CODE(pack_enum(bref, c.srs_sf_cfg)); + HANDLE_CODE(bref.pack(c.ack_nack_srs_simul_tx, 1)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_common_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_common_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_max_up_pts_present, 1)); + HANDLE_CODE(unpack_enum(c.srs_bw_cfg, bref)); + HANDLE_CODE(unpack_enum(c.srs_sf_cfg, bref)); + HANDLE_CODE(bref.unpack(c.ack_nack_srs_simul_tx, 1)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_common_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_common_c::setup_s_::setup_s_() +{ + srs_max_up_pts_present = false; +} + +// SystemInformationBlockType1-v10j0-IEs ::= SEQUENCE +sib_type1_v10j0_ies_s::sib_type1_v10j0_ies_s() +{ + freq_band_info_r10_present = false; + multi_band_info_list_v10j0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v10j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_info_r10_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10j0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_band_info_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_info_r10, 1, 8)); + } + if (multi_band_info_list_v10j0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10j0, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v10j0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10j0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_band_info_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_info_r10, bref, 1, 8)); + } + if (multi_band_info_list_v10j0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10j0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v10j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_info_r10_present) { + j.start_array("freqBandInfo-r10"); + for (uint32_t i1 = 0; i1 < freq_band_info_r10.size(); ++i1) { + freq_band_info_r10[i1].to_json(j); + } + j.end_array(); + } + if (multi_band_info_list_v10j0_present) { + j.start_array("multiBandInfoList-v10j0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10j0.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < multi_band_info_list_v10j0[i1].size(); ++i2) { + multi_band_info_list_v10j0[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v1250-IEs ::= SEQUENCE +sib_type1_v1250_ies_s::sib_type1_v1250_ies_s() +{ + cell_sel_info_v1250_present = false; + freq_band_ind_prio_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_sel_info_v1250_present, 1)); + HANDLE_CODE(bref.pack(freq_band_ind_prio_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.pack(cell_access_related_info_v1250.category0_allowed_r12_present, 1)); + if (cell_sel_info_v1250_present) { + HANDLE_CODE(cell_sel_info_v1250.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_sel_info_v1250_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_ind_prio_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.unpack(cell_access_related_info_v1250.category0_allowed_r12_present, 1)); + if (cell_sel_info_v1250_present) { + HANDLE_CODE(cell_sel_info_v1250.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cellAccessRelatedInfo-v1250"); + j.start_obj(); + if (cell_access_related_info_v1250.category0_allowed_r12_present) { + j.write_str("category0Allowed-r12", "true"); + } + j.end_obj(); + if (cell_sel_info_v1250_present) { + j.write_fieldname("cellSelectionInfo-v1250"); + cell_sel_info_v1250.to_json(j); + } + if (freq_band_ind_prio_r12_present) { + j.write_str("freqBandIndicatorPriority-r12", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +sib_type1_v1250_ies_s::cell_access_related_info_v1250_s_::cell_access_related_info_v1250_s_() +{ + category0_allowed_r12_present = false; +} + +// SystemInformationBlockType2-v9e0-IEs ::= SEQUENCE +sib_type2_v9e0_ies_s::sib_type2_v9e0_ies_s() +{ + ul_carrier_freq_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type2_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_carrier_freq_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_carrier_freq_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_carrier_freq_v9e0, (uint32_t)65536, (uint32_t)262143)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type2_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_carrier_freq_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_carrier_freq_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(ul_carrier_freq_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type2_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_carrier_freq_v9e0_present) { + j.write_int("ul-CarrierFreq-v9e0", ul_carrier_freq_v9e0); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType3-v10l0-IEs ::= SEQUENCE +sib_type3_v10l0_ies_s::sib_type3_v10l0_ies_s() +{ + freq_band_info_v10l0_present = false; + multi_band_info_list_v10l0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type3_v10l0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_info_v10l0_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10l0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_band_info_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_info_v10l0, 1, 8)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10l0, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type3_v10l0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_info_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_band_info_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_info_v10l0, bref, 1, 8)); + } + if (multi_band_info_list_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10l0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + + return SRSASN_SUCCESS; +} +void sib_type3_v10l0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_info_v10l0_present) { + j.start_array("freqBandInfo-v10l0"); + for (uint32_t i1 = 0; i1 < freq_band_info_v10l0.size(); ++i1) { + freq_band_info_v10l0[i1].to_json(j); + } + j.end_array(); + } + if (multi_band_info_list_v10l0_present) { + j.start_array("multiBandInfoList-v10l0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < multi_band_info_list_v10l0[i1].size(); ++i2) { + multi_band_info_list_v10l0[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SystemInformationBlockType5-v9e0-IEs ::= SEQUENCE +sib_type5_v9e0_ies_s::sib_type5_v9e0_ies_s() +{ + inter_freq_carrier_freq_list_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type5_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v9e0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list_v9e0, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type5_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v9e0_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list_v9e0, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type5_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_freq_carrier_freq_list_v9e0_present) { + j.start_array("interFreqCarrierFreqList-v9e0"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v9e0.size(); ++i1) { + inter_freq_carrier_freq_list_v9e0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UAC-BarringInfoSet-r15 ::= SEQUENCE +SRSASN_CODE uac_barr_info_set_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, uac_barr_factor_r15)); + HANDLE_CODE(pack_enum(bref, uac_barr_time_r15)); + HANDLE_CODE(uac_barr_for_access_id_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_info_set_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(uac_barr_factor_r15, bref)); + HANDLE_CODE(unpack_enum(uac_barr_time_r15, bref)); + HANDLE_CODE(uac_barr_for_access_id_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void uac_barr_info_set_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("uac-BarringFactor-r15", uac_barr_factor_r15.to_string()); + j.write_str("uac-BarringTime-r15", uac_barr_time_r15.to_string()); + j.write_str("uac-BarringForAccessIdentity-r15", uac_barr_for_access_id_r15.to_string()); + j.end_obj(); +} + +// UAC-BarringPerPLMN-r15 ::= SEQUENCE +uac_barr_per_plmn_r15_s::uac_barr_per_plmn_r15_s() +{ + uac_ac_barr_list_type_r15_present = false; +} +SRSASN_CODE uac_barr_per_plmn_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(uac_ac_barr_list_type_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, plmn_id_idx_r15, (uint8_t)1, (uint8_t)6)); + if (uac_ac_barr_list_type_r15_present) { + HANDLE_CODE(uac_ac_barr_list_type_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_per_plmn_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(uac_ac_barr_list_type_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(plmn_id_idx_r15, bref, (uint8_t)1, (uint8_t)6)); + if (uac_ac_barr_list_type_r15_present) { + HANDLE_CODE(uac_ac_barr_list_type_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void uac_barr_per_plmn_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex-r15", plmn_id_idx_r15); + if (uac_ac_barr_list_type_r15_present) { + j.write_fieldname("uac-AC-BarringListType-r15"); + uac_ac_barr_list_type_r15.to_json(j); + } + j.end_obj(); +} + +void uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::destroy_() +{ + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + c.destroy(); + break; + case types::uac_explicit_ac_barr_list_r15: + c.destroy(); + break; + default: + break; + } +} +void uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + c.init(); + break; + case types::uac_explicit_ac_barr_list_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_"); + } +} +uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::uac_ac_barr_list_type_r15_c_( + const uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + c.init(other.c.get()); + break; + case types::uac_explicit_ac_barr_list_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_"); + } +} +uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_& uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_:: + operator=(const uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + c.set(other.c.get()); + break; + case types::uac_explicit_ac_barr_list_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_"); + } + + return *this; +} +void uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + j.start_array("uac-ImplicitAC-BarringList-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_int(c.get()[i1]); + } + j.end_array(); + break; + case types::uac_explicit_ac_barr_list_r15: + j.start_array("uac-ExplicitAC-BarringList-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + HANDLE_CODE(pack_fixed_seq_of(bref, &(c.get())[0], + c.get().size(), + UnalignedIntegerPacker(1, 8))); + break; + case types::uac_explicit_ac_barr_list_r15: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 63)); + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::uac_implicit_ac_barr_list_r15: + HANDLE_CODE(unpack_fixed_seq_of(&(c.get())[0], bref, + c.get().size(), + UnalignedIntegerPacker(1, 8))); + break; + case types::uac_explicit_ac_barr_list_r15: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 63)); + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UDT-RestrictingPerPLMN-r13 ::= SEQUENCE +udt_restricting_per_plmn_r13_s::udt_restricting_per_plmn_r13_s() +{ + udt_restricting_r13_present = false; +} +SRSASN_CODE udt_restricting_per_plmn_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(udt_restricting_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, plmn_id_idx_r13, (uint8_t)1, (uint8_t)6)); + if (udt_restricting_r13_present) { + HANDLE_CODE(udt_restricting_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE udt_restricting_per_plmn_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(udt_restricting_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(plmn_id_idx_r13, bref, (uint8_t)1, (uint8_t)6)); + if (udt_restricting_r13_present) { + HANDLE_CODE(udt_restricting_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void udt_restricting_per_plmn_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex-r13", plmn_id_idx_r13); + if (udt_restricting_r13_present) { + j.write_fieldname("udt-Restricting-r13"); + udt_restricting_r13.to_json(j); + } + j.end_obj(); +} + +// UplinkPowerControlCommon ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_common_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_pusch, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_enum(bref, alpha)); + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_pucch, (int8_t)-127, (int8_t)-96)); + HANDLE_CODE(delta_flist_pucch.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, delta_preamb_msg3, (int8_t)-1, (int8_t)6)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(p0_nominal_pusch, bref, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(unpack_enum(alpha, bref)); + HANDLE_CODE(unpack_unalign_integer(p0_nominal_pucch, bref, (int8_t)-127, (int8_t)-96)); + HANDLE_CODE(delta_flist_pucch.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(delta_preamb_msg3, bref, (int8_t)-1, (int8_t)6)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-NominalPUSCH", p0_nominal_pusch); + j.write_str("alpha", alpha.to_string()); + j.write_int("p0-NominalPUCCH", p0_nominal_pucch); + j.write_fieldname("deltaFList-PUCCH"); + delta_flist_pucch.to_json(j); + j.write_int("deltaPreambleMsg3", delta_preamb_msg3); + j.end_obj(); +} + +// UplinkPowerControlCommon-v1020 ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_common_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format3_r10)); + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format1b_cs_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(delta_f_pucch_format3_r10, bref)); + HANDLE_CODE(unpack_enum(delta_f_pucch_format1b_cs_r10, bref)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaF-PUCCH-Format3-r10", delta_f_pucch_format3_r10.to_string()); + j.write_str("deltaF-PUCCH-Format1bCS-r10", delta_f_pucch_format1b_cs_r10.to_string()); + j.end_obj(); +} + +// WLAN-OffloadConfig-r12 ::= SEQUENCE +wlan_offload_cfg_r12_s::wlan_offload_cfg_r12_s() +{ + ext = false; + thres_rsrp_r12_present = false; + thres_rsrq_r12_present = false; + thres_rsrq_on_all_symbols_with_wb_r12_present = false; + thres_rsrq_on_all_symbols_r12_present = false; + thres_rsrq_wb_r12_present = false; + thres_ch_utilization_r12_present = false; + thres_backhaul_bw_r12_present = false; + thres_wlan_rssi_r12_present = false; + offload_pref_ind_r12_present = false; + t_steering_wlan_r12_present = false; +} +SRSASN_CODE wlan_offload_cfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(thres_rsrp_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_rsrq_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_rsrq_on_all_symbols_with_wb_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_rsrq_on_all_symbols_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_rsrq_wb_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_ch_utilization_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_backhaul_bw_r12_present, 1)); + HANDLE_CODE(bref.pack(thres_wlan_rssi_r12_present, 1)); + HANDLE_CODE(bref.pack(offload_pref_ind_r12_present, 1)); + HANDLE_CODE(bref.pack(t_steering_wlan_r12_present, 1)); + + if (thres_rsrp_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrp_r12.thres_rsrp_low_r12, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrp_r12.thres_rsrp_high_r12, (uint8_t)0, (uint8_t)97)); + } + if (thres_rsrq_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrq_r12.thres_rsrq_low_r12, (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrq_r12.thres_rsrq_high_r12, (uint8_t)0, (uint8_t)34)); + } + if (thres_rsrq_on_all_symbols_with_wb_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, + thres_rsrq_on_all_symbols_with_wb_r12.thres_rsrq_on_all_symbols_with_wb_low_r12, + (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(pack_unalign_integer(bref, + thres_rsrq_on_all_symbols_with_wb_r12.thres_rsrq_on_all_symbols_with_wb_high_r12, + (uint8_t)0, (uint8_t)34)); + } + if (thres_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrq_on_all_symbols_r12.thres_rsrq_on_all_symbols_low_r12, (uint8_t)0, + (uint8_t)34)); + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrq_on_all_symbols_r12.thres_rsrq_on_all_symbols_high_r12, (uint8_t)0, + (uint8_t)34)); + } + if (thres_rsrq_wb_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrq_wb_r12.thres_rsrq_wb_low_r12, (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(pack_unalign_integer(bref, thres_rsrq_wb_r12.thres_rsrq_wb_high_r12, (uint8_t)0, (uint8_t)34)); + } + if (thres_ch_utilization_r12_present) { + HANDLE_CODE( + pack_unalign_integer(bref, thres_ch_utilization_r12.thres_ch_utilization_low_r12, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE( + pack_unalign_integer(bref, thres_ch_utilization_r12.thres_ch_utilization_high_r12, (uint8_t)0, (uint8_t)255)); + } + if (thres_backhaul_bw_r12_present) { + HANDLE_CODE(pack_enum(bref, thres_backhaul_bw_r12.thres_backhaul_dl_bw_low_r12)); + HANDLE_CODE(pack_enum(bref, thres_backhaul_bw_r12.thres_backhaul_dl_bw_high_r12)); + HANDLE_CODE(pack_enum(bref, thres_backhaul_bw_r12.thres_backhaul_ul_bw_low_r12)); + HANDLE_CODE(pack_enum(bref, thres_backhaul_bw_r12.thres_backhaul_ul_bw_high_r12)); + } + if (thres_wlan_rssi_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_wlan_rssi_r12.thres_wlan_rssi_low_r12, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE(pack_unalign_integer(bref, thres_wlan_rssi_r12.thres_wlan_rssi_high_r12, (uint8_t)0, (uint8_t)255)); + } + if (offload_pref_ind_r12_present) { + HANDLE_CODE(offload_pref_ind_r12.pack(bref)); + } + if (t_steering_wlan_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, t_steering_wlan_r12, (uint8_t)0, (uint8_t)7)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_offload_cfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(thres_rsrp_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_rsrq_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_rsrq_on_all_symbols_with_wb_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_rsrq_on_all_symbols_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_rsrq_wb_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_ch_utilization_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_backhaul_bw_r12_present, 1)); + HANDLE_CODE(bref.unpack(thres_wlan_rssi_r12_present, 1)); + HANDLE_CODE(bref.unpack(offload_pref_ind_r12_present, 1)); + HANDLE_CODE(bref.unpack(t_steering_wlan_r12_present, 1)); + + if (thres_rsrp_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thres_rsrp_r12.thres_rsrp_low_r12, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(thres_rsrp_r12.thres_rsrp_high_r12, bref, (uint8_t)0, (uint8_t)97)); + } + if (thres_rsrq_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_r12.thres_rsrq_low_r12, bref, (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_r12.thres_rsrq_high_r12, bref, (uint8_t)0, (uint8_t)34)); + } + if (thres_rsrq_on_all_symbols_with_wb_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_on_all_symbols_with_wb_r12.thres_rsrq_on_all_symbols_with_wb_low_r12, + bref, (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_on_all_symbols_with_wb_r12.thres_rsrq_on_all_symbols_with_wb_high_r12, + bref, (uint8_t)0, (uint8_t)34)); + } + if (thres_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_on_all_symbols_r12.thres_rsrq_on_all_symbols_low_r12, bref, + (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_on_all_symbols_r12.thres_rsrq_on_all_symbols_high_r12, bref, + (uint8_t)0, (uint8_t)34)); + } + if (thres_rsrq_wb_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_wb_r12.thres_rsrq_wb_low_r12, bref, (uint8_t)0, (uint8_t)34)); + HANDLE_CODE(unpack_unalign_integer(thres_rsrq_wb_r12.thres_rsrq_wb_high_r12, bref, (uint8_t)0, (uint8_t)34)); + } + if (thres_ch_utilization_r12_present) { + HANDLE_CODE( + unpack_unalign_integer(thres_ch_utilization_r12.thres_ch_utilization_low_r12, bref, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE( + unpack_unalign_integer(thres_ch_utilization_r12.thres_ch_utilization_high_r12, bref, (uint8_t)0, (uint8_t)255)); + } + if (thres_backhaul_bw_r12_present) { + HANDLE_CODE(unpack_enum(thres_backhaul_bw_r12.thres_backhaul_dl_bw_low_r12, bref)); + HANDLE_CODE(unpack_enum(thres_backhaul_bw_r12.thres_backhaul_dl_bw_high_r12, bref)); + HANDLE_CODE(unpack_enum(thres_backhaul_bw_r12.thres_backhaul_ul_bw_low_r12, bref)); + HANDLE_CODE(unpack_enum(thres_backhaul_bw_r12.thres_backhaul_ul_bw_high_r12, bref)); + } + if (thres_wlan_rssi_r12_present) { + HANDLE_CODE(unpack_unalign_integer(thres_wlan_rssi_r12.thres_wlan_rssi_low_r12, bref, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE(unpack_unalign_integer(thres_wlan_rssi_r12.thres_wlan_rssi_high_r12, bref, (uint8_t)0, (uint8_t)255)); + } + if (offload_pref_ind_r12_present) { + HANDLE_CODE(offload_pref_ind_r12.unpack(bref)); + } + if (t_steering_wlan_r12_present) { + HANDLE_CODE(unpack_unalign_integer(t_steering_wlan_r12, bref, (uint8_t)0, (uint8_t)7)); + } + + return SRSASN_SUCCESS; +} +void wlan_offload_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thres_rsrp_r12_present) { + j.write_fieldname("thresholdRSRP-r12"); + j.start_obj(); + j.write_int("thresholdRSRP-Low-r12", thres_rsrp_r12.thres_rsrp_low_r12); + j.write_int("thresholdRSRP-High-r12", thres_rsrp_r12.thres_rsrp_high_r12); + j.end_obj(); + } + if (thres_rsrq_r12_present) { + j.write_fieldname("thresholdRSRQ-r12"); + j.start_obj(); + j.write_int("thresholdRSRQ-Low-r12", thres_rsrq_r12.thres_rsrq_low_r12); + j.write_int("thresholdRSRQ-High-r12", thres_rsrq_r12.thres_rsrq_high_r12); + j.end_obj(); + } + if (thres_rsrq_on_all_symbols_with_wb_r12_present) { + j.write_fieldname("thresholdRSRQ-OnAllSymbolsWithWB-r12"); + j.start_obj(); + j.write_int("thresholdRSRQ-OnAllSymbolsWithWB-Low-r12", + thres_rsrq_on_all_symbols_with_wb_r12.thres_rsrq_on_all_symbols_with_wb_low_r12); + j.write_int("thresholdRSRQ-OnAllSymbolsWithWB-High-r12", + thres_rsrq_on_all_symbols_with_wb_r12.thres_rsrq_on_all_symbols_with_wb_high_r12); + j.end_obj(); + } + if (thres_rsrq_on_all_symbols_r12_present) { + j.write_fieldname("thresholdRSRQ-OnAllSymbols-r12"); + j.start_obj(); + j.write_int("thresholdRSRQ-OnAllSymbolsLow-r12", thres_rsrq_on_all_symbols_r12.thres_rsrq_on_all_symbols_low_r12); + j.write_int("thresholdRSRQ-OnAllSymbolsHigh-r12", thres_rsrq_on_all_symbols_r12.thres_rsrq_on_all_symbols_high_r12); + j.end_obj(); + } + if (thres_rsrq_wb_r12_present) { + j.write_fieldname("thresholdRSRQ-WB-r12"); + j.start_obj(); + j.write_int("thresholdRSRQ-WB-Low-r12", thres_rsrq_wb_r12.thres_rsrq_wb_low_r12); + j.write_int("thresholdRSRQ-WB-High-r12", thres_rsrq_wb_r12.thres_rsrq_wb_high_r12); + j.end_obj(); + } + if (thres_ch_utilization_r12_present) { + j.write_fieldname("thresholdChannelUtilization-r12"); + j.start_obj(); + j.write_int("thresholdChannelUtilizationLow-r12", thres_ch_utilization_r12.thres_ch_utilization_low_r12); + j.write_int("thresholdChannelUtilizationHigh-r12", thres_ch_utilization_r12.thres_ch_utilization_high_r12); + j.end_obj(); + } + if (thres_backhaul_bw_r12_present) { + j.write_fieldname("thresholdBackhaul-Bandwidth-r12"); + j.start_obj(); + j.write_str("thresholdBackhaulDL-BandwidthLow-r12", thres_backhaul_bw_r12.thres_backhaul_dl_bw_low_r12.to_string()); + j.write_str("thresholdBackhaulDL-BandwidthHigh-r12", + thres_backhaul_bw_r12.thres_backhaul_dl_bw_high_r12.to_string()); + j.write_str("thresholdBackhaulUL-BandwidthLow-r12", thres_backhaul_bw_r12.thres_backhaul_ul_bw_low_r12.to_string()); + j.write_str("thresholdBackhaulUL-BandwidthHigh-r12", + thres_backhaul_bw_r12.thres_backhaul_ul_bw_high_r12.to_string()); + j.end_obj(); + } + if (thres_wlan_rssi_r12_present) { + j.write_fieldname("thresholdWLAN-RSSI-r12"); + j.start_obj(); + j.write_int("thresholdWLAN-RSSI-Low-r12", thres_wlan_rssi_r12.thres_wlan_rssi_low_r12); + j.write_int("thresholdWLAN-RSSI-High-r12", thres_wlan_rssi_r12.thres_wlan_rssi_high_r12); + j.end_obj(); + } + if (offload_pref_ind_r12_present) { + j.write_str("offloadPreferenceIndicator-r12", offload_pref_ind_r12.to_string()); + } + if (t_steering_wlan_r12_present) { + j.write_int("t-SteeringWLAN-r12", t_steering_wlan_r12); + } + j.end_obj(); +} + +// WUS-Config-r15 ::= SEQUENCE +wus_cfg_r15_s::wus_cfg_r15_s() +{ + num_pos_r15_present = false; + time_offset_e_drx_long_r15_present = false; +} +SRSASN_CODE wus_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(num_pos_r15_present, 1)); + HANDLE_CODE(bref.pack(time_offset_e_drx_long_r15_present, 1)); + + HANDLE_CODE(pack_enum(bref, max_dur_factor_r15)); + if (num_pos_r15_present) { + HANDLE_CODE(pack_enum(bref, num_pos_r15)); + } + HANDLE_CODE(pack_enum(bref, freq_location_r15)); + HANDLE_CODE(pack_enum(bref, time_offset_drx_r15)); + HANDLE_CODE(pack_enum(bref, time_offset_e_drx_short_r15)); + if (time_offset_e_drx_long_r15_present) { + HANDLE_CODE(pack_enum(bref, time_offset_e_drx_long_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wus_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(num_pos_r15_present, 1)); + HANDLE_CODE(bref.unpack(time_offset_e_drx_long_r15_present, 1)); + + HANDLE_CODE(unpack_enum(max_dur_factor_r15, bref)); + if (num_pos_r15_present) { + HANDLE_CODE(unpack_enum(num_pos_r15, bref)); + } + HANDLE_CODE(unpack_enum(freq_location_r15, bref)); + HANDLE_CODE(unpack_enum(time_offset_drx_r15, bref)); + HANDLE_CODE(unpack_enum(time_offset_e_drx_short_r15, bref)); + if (time_offset_e_drx_long_r15_present) { + HANDLE_CODE(unpack_enum(time_offset_e_drx_long_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void wus_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("maxDurationFactor-r15", max_dur_factor_r15.to_string()); + if (num_pos_r15_present) { + j.write_str("numPOs-r15", num_pos_r15.to_string()); + } + j.write_str("freqLocation-r15", freq_location_r15.to_string()); + j.write_str("timeOffsetDRX-r15", time_offset_drx_r15.to_string()); + j.write_str("timeOffset-eDRX-Short-r15", time_offset_e_drx_short_r15.to_string()); + if (time_offset_e_drx_long_r15_present) { + j.write_str("timeOffset-eDRX-Long-r15", time_offset_e_drx_long_r15.to_string()); + } + j.end_obj(); +} + +// ACDC-BarringForCommon-r13 ::= SEQUENCE +SRSASN_CODE acdc_barr_for_common_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(acdc_hplm_nonly_r13, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, barr_per_acdc_category_list_r13, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE acdc_barr_for_common_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(acdc_hplm_nonly_r13, 1)); + HANDLE_CODE(unpack_dyn_seq_of(barr_per_acdc_category_list_r13, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void acdc_barr_for_common_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("acdc-HPLMNonly-r13", acdc_hplm_nonly_r13); + j.start_array("barringPerACDC-CategoryList-r13"); + for (uint32_t i1 = 0; i1 < barr_per_acdc_category_list_r13.size(); ++i1) { + barr_per_acdc_category_list_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// CarrierFreqInfoUTRA-v1250 ::= SEQUENCE +carrier_freq_info_utra_v1250_s::carrier_freq_info_utra_v1250_s() +{ + reduced_meas_performance_r12_present = false; +} +SRSASN_CODE carrier_freq_info_utra_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_info_utra_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void carrier_freq_info_utra_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_meas_performance_r12_present) { + j.write_str("reducedMeasPerformance-r12", "true"); + } + j.end_obj(); +} + +// CellReselectionInfoCommon-v1460 ::= SEQUENCE +SRSASN_CODE cell_resel_info_common_v1460_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, s_search_delta_p_r14)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_info_common_v1460_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(s_search_delta_p_r14, bref)); + + return SRSASN_SUCCESS; +} +void cell_resel_info_common_v1460_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("s-SearchDeltaP-r14", s_search_delta_p_r14.to_string()); + j.end_obj(); +} + +// CellReselectionInfoHSDN-r15 ::= SEQUENCE +SRSASN_CODE cell_resel_info_hsdn_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_equivalent_size_r15, (uint8_t)2, (uint8_t)16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_info_hsdn_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_equivalent_size_r15, bref, (uint8_t)2, (uint8_t)16)); + + return SRSASN_SUCCESS; +} +void cell_resel_info_hsdn_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellEquivalentSize-r15", cell_equivalent_size_r15); + j.end_obj(); +} + +// CellReselectionParametersCDMA2000 ::= SEQUENCE +cell_resel_params_cdma2000_s::cell_resel_params_cdma2000_s() +{ + t_resel_cdma2000_sf_present = false; +} +SRSASN_CODE cell_resel_params_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(t_resel_cdma2000_sf_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, band_class_list, 1, 32)); + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cell_list, 1, 16)); + HANDLE_CODE(pack_unalign_integer(bref, t_resel_cdma2000, (uint8_t)0, (uint8_t)7)); + if (t_resel_cdma2000_sf_present) { + HANDLE_CODE(t_resel_cdma2000_sf.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_params_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(t_resel_cdma2000_sf_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(band_class_list, bref, 1, 32)); + HANDLE_CODE(unpack_dyn_seq_of(neigh_cell_list, bref, 1, 16)); + HANDLE_CODE(unpack_unalign_integer(t_resel_cdma2000, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_cdma2000_sf_present) { + HANDLE_CODE(t_resel_cdma2000_sf.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cell_resel_params_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandClassList"); + for (uint32_t i1 = 0; i1 < band_class_list.size(); ++i1) { + band_class_list[i1].to_json(j); + } + j.end_array(); + j.start_array("neighCellList"); + for (uint32_t i1 = 0; i1 < neigh_cell_list.size(); ++i1) { + neigh_cell_list[i1].to_json(j); + } + j.end_array(); + j.write_int("t-ReselectionCDMA2000", t_resel_cdma2000); + if (t_resel_cdma2000_sf_present) { + j.write_fieldname("t-ReselectionCDMA2000-SF"); + t_resel_cdma2000_sf.to_json(j); + } + j.end_obj(); +} + +// CellReselectionParametersCDMA2000-v920 ::= SEQUENCE +SRSASN_CODE cell_resel_params_cdma2000_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cell_list_v920, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_params_cdma2000_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(neigh_cell_list_v920, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void cell_resel_params_cdma2000_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("neighCellList-v920"); + for (uint32_t i1 = 0; i1 < neigh_cell_list_v920.size(); ++i1) { + neigh_cell_list_v920[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// CellReselectionServingFreqInfo-v1310 ::= SEQUENCE +SRSASN_CODE cell_resel_serving_freq_info_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, cell_resel_sub_prio_r13)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_serving_freq_info_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(cell_resel_sub_prio_r13, bref)); + + return SRSASN_SUCCESS; +} +void cell_resel_serving_freq_info_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cellReselectionSubPriority-r13", cell_resel_sub_prio_r13.to_string()); + j.end_obj(); +} + +// CellSelectionInfo-v920 ::= SEQUENCE +cell_sel_info_v920_s::cell_sel_info_v920_s() +{ + q_qual_min_offset_r9_present = false; +} +SRSASN_CODE cell_sel_info_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(q_qual_min_offset_r9_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_r9, (int8_t)-34, (int8_t)-3)); + if (q_qual_min_offset_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_offset_r9, (uint8_t)1, (uint8_t)8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_sel_info_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(q_qual_min_offset_r9_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(q_qual_min_r9, bref, (int8_t)-34, (int8_t)-3)); + if (q_qual_min_offset_r9_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_offset_r9, bref, (uint8_t)1, (uint8_t)8)); + } + + return SRSASN_SUCCESS; +} +void cell_sel_info_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-QualMin-r9", q_qual_min_r9); + if (q_qual_min_offset_r9_present) { + j.write_int("q-QualMinOffset-r9", q_qual_min_offset_r9); + } + j.end_obj(); +} + +// EAB-ConfigPLMN-r11 ::= SEQUENCE +eab_cfg_plmn_r11_s::eab_cfg_plmn_r11_s() +{ + eab_cfg_r11_present = false; +} +SRSASN_CODE eab_cfg_plmn_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eab_cfg_r11_present, 1)); + + if (eab_cfg_r11_present) { + HANDLE_CODE(eab_cfg_r11.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE eab_cfg_plmn_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(eab_cfg_r11_present, 1)); + + if (eab_cfg_r11_present) { + HANDLE_CODE(eab_cfg_r11.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void eab_cfg_plmn_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eab_cfg_r11_present) { + j.write_fieldname("eab-Config-r11"); + eab_cfg_r11.to_json(j); + } + j.end_obj(); +} + +// MBMS-NotificationConfig-r9 ::= SEQUENCE +SRSASN_CODE mbms_notif_cfg_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, notif_repeat_coeff_r9)); + HANDLE_CODE(pack_unalign_integer(bref, notif_offset_r9, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(pack_unalign_integer(bref, notif_sf_idx_r9, (uint8_t)1, (uint8_t)6)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_notif_cfg_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(notif_repeat_coeff_r9, bref)); + HANDLE_CODE(unpack_unalign_integer(notif_offset_r9, bref, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(unpack_unalign_integer(notif_sf_idx_r9, bref, (uint8_t)1, (uint8_t)6)); + + return SRSASN_SUCCESS; +} +void mbms_notif_cfg_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("notificationRepetitionCoeff-r9", notif_repeat_coeff_r9.to_string()); + j.write_int("notificationOffset-r9", notif_offset_r9); + j.write_int("notificationSF-Index-r9", notif_sf_idx_r9); + j.end_obj(); +} + +// MBMS-NotificationConfig-v1430 ::= SEQUENCE +SRSASN_CODE mbms_notif_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, notif_sf_idx_v1430, (uint8_t)7, (uint8_t)10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_notif_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(notif_sf_idx_v1430, bref, (uint8_t)7, (uint8_t)10)); + + return SRSASN_SUCCESS; +} +void mbms_notif_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("notificationSF-Index-v1430", notif_sf_idx_v1430); + j.end_obj(); +} + +// MeasIdleConfigSIB-r15 ::= SEQUENCE +meas_idle_cfg_sib_r15_s::meas_idle_cfg_sib_r15_s() +{ + ext = false; +} +SRSASN_CODE meas_idle_cfg_sib_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r15, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_cfg_sib_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r15, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_idle_cfg_sib_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measIdleCarrierListEUTRA-r15"); + for (uint32_t i1 = 0; i1 < meas_idle_carrier_list_eutra_r15.size(); ++i1) { + meas_idle_carrier_list_eutra_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MobilityStateParameters ::= SEQUENCE +SRSASN_CODE mob_state_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, t_eval)); + HANDLE_CODE(pack_enum(bref, t_hyst_normal)); + HANDLE_CODE(pack_unalign_integer(bref, n_cell_change_medium, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_unalign_integer(bref, n_cell_change_high, (uint8_t)1, (uint8_t)16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_state_params_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(t_eval, bref)); + HANDLE_CODE(unpack_enum(t_hyst_normal, bref)); + HANDLE_CODE(unpack_unalign_integer(n_cell_change_medium, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_unalign_integer(n_cell_change_high, bref, (uint8_t)1, (uint8_t)16)); + + 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(); +} + +// RadioResourceConfigCommonSIB ::= SEQUENCE +rr_cfg_common_sib_s::rr_cfg_common_sib_s() +{ + ext = false; + ul_pwr_ctrl_common_v1020_present = false; + rach_cfg_common_v1250_present = false; + pusch_cfg_common_v1270_present = false; + bcch_cfg_v1310_present = false; + pcch_cfg_v1310_present = false; + freq_hop_params_r13_present = false; + pdsch_cfg_common_v1310_present = false; + pusch_cfg_common_v1310_present = false; + prach_cfg_common_v1310_present = false; + pucch_cfg_common_v1310_present = false; + high_speed_cfg_r14_present = false; + prach_cfg_v1430_present = false; + pucch_cfg_common_v1430_present = false; + prach_cfg_v1530_present = false; + ce_rss_cfg_r15_present = false; + wus_cfg_r15_present = false; + high_speed_cfg_v1530_present = false; +} +SRSASN_CODE rr_cfg_common_sib_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(rach_cfg_common.pack(bref)); + HANDLE_CODE(bcch_cfg.pack(bref)); + HANDLE_CODE(pcch_cfg.pack(bref)); + HANDLE_CODE(prach_cfg.pack(bref)); + HANDLE_CODE(pdsch_cfg_common.pack(bref)); + HANDLE_CODE(pusch_cfg_common.pack(bref)); + HANDLE_CODE(pucch_cfg_common.pack(bref)); + HANDLE_CODE(srs_ul_cfg_common.pack(bref)); + HANDLE_CODE(ul_pwr_ctrl_common.pack(bref)); + HANDLE_CODE(pack_enum(bref, ul_cp_len)); + + if (ext) { + ext_groups_header group_flags(6); + rrc_asn1_warn_assert(ul_pwr_ctrl_common_v1020_present != (ul_pwr_ctrl_common_v1020.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= ul_pwr_ctrl_common_v1020_present; + rrc_asn1_warn_assert(rach_cfg_common_v1250_present != (rach_cfg_common_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= rach_cfg_common_v1250_present; + rrc_asn1_warn_assert(pusch_cfg_common_v1270_present != (pusch_cfg_common_v1270.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= pusch_cfg_common_v1270_present; + rrc_asn1_warn_assert(bcch_cfg_v1310_present != (bcch_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= bcch_cfg_v1310_present; + rrc_asn1_warn_assert(pcch_cfg_v1310_present != (pcch_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pcch_cfg_v1310_present; + rrc_asn1_warn_assert(freq_hop_params_r13_present != (freq_hop_params_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= freq_hop_params_r13_present; + rrc_asn1_warn_assert(pdsch_cfg_common_v1310_present != (pdsch_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pdsch_cfg_common_v1310_present; + rrc_asn1_warn_assert(pusch_cfg_common_v1310_present != (pusch_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pusch_cfg_common_v1310_present; + rrc_asn1_warn_assert(prach_cfg_common_v1310_present != (prach_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= prach_cfg_common_v1310_present; + rrc_asn1_warn_assert(pucch_cfg_common_v1310_present != (pucch_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pucch_cfg_common_v1310_present; + rrc_asn1_warn_assert(high_speed_cfg_r14_present != (high_speed_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= high_speed_cfg_r14_present; + rrc_asn1_warn_assert(prach_cfg_v1430_present != (prach_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= prach_cfg_v1430_present; + rrc_asn1_warn_assert(pucch_cfg_common_v1430_present != (pucch_cfg_common_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= pucch_cfg_common_v1430_present; + rrc_asn1_warn_assert(prach_cfg_v1530_present != (prach_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= prach_cfg_v1530_present; + rrc_asn1_warn_assert(ce_rss_cfg_r15_present != (ce_rss_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= ce_rss_cfg_r15_present; + rrc_asn1_warn_assert(wus_cfg_r15_present != (wus_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= wus_cfg_r15_present; + rrc_asn1_warn_assert(high_speed_cfg_v1530_present != (high_speed_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= high_speed_cfg_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_v1020_present, 1)); + if (ul_pwr_ctrl_common_v1020_present) { + HANDLE_CODE(ul_pwr_ctrl_common_v1020->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rach_cfg_common_v1250_present, 1)); + if (rach_cfg_common_v1250_present) { + HANDLE_CODE(rach_cfg_common_v1250->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pusch_cfg_common_v1270_present, 1)); + if (pusch_cfg_common_v1270_present) { + HANDLE_CODE(pusch_cfg_common_v1270->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(bcch_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(pcch_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_params_r13_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_common_v1310_present, 1)); + if (bcch_cfg_v1310_present) { + HANDLE_CODE(bcch_cfg_v1310->pack(bref)); + } + if (pcch_cfg_v1310_present) { + HANDLE_CODE(pcch_cfg_v1310->pack(bref)); + } + if (freq_hop_params_r13_present) { + HANDLE_CODE(freq_hop_params_r13->pack(bref)); + } + if (pdsch_cfg_common_v1310_present) { + HANDLE_CODE(pdsch_cfg_common_v1310->pack(bref)); + } + if (pusch_cfg_common_v1310_present) { + HANDLE_CODE(pusch_cfg_common_v1310->pack(bref)); + } + if (prach_cfg_common_v1310_present) { + HANDLE_CODE(prach_cfg_common_v1310->pack(bref)); + } + if (pucch_cfg_common_v1310_present) { + HANDLE_CODE(pucch_cfg_common_v1310->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(high_speed_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_common_v1430_present, 1)); + if (high_speed_cfg_r14_present) { + HANDLE_CODE(high_speed_cfg_r14->pack(bref)); + } + if (prach_cfg_v1430_present) { + HANDLE_CODE(prach_cfg_v1430->pack(bref)); + } + if (pucch_cfg_common_v1430_present) { + HANDLE_CODE(pucch_cfg_common_v1430->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(prach_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(ce_rss_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(wus_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(high_speed_cfg_v1530_present, 1)); + if (prach_cfg_v1530_present) { + HANDLE_CODE(prach_cfg_v1530->pack(bref)); + } + if (ce_rss_cfg_r15_present) { + HANDLE_CODE(ce_rss_cfg_r15->pack(bref)); + } + if (wus_cfg_r15_present) { + HANDLE_CODE(wus_cfg_r15->pack(bref)); + } + if (high_speed_cfg_v1530_present) { + HANDLE_CODE(high_speed_cfg_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_sib_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(rach_cfg_common.unpack(bref)); + HANDLE_CODE(bcch_cfg.unpack(bref)); + HANDLE_CODE(pcch_cfg.unpack(bref)); + HANDLE_CODE(prach_cfg.unpack(bref)); + HANDLE_CODE(pdsch_cfg_common.unpack(bref)); + HANDLE_CODE(pusch_cfg_common.unpack(bref)); + HANDLE_CODE(pucch_cfg_common.unpack(bref)); + HANDLE_CODE(srs_ul_cfg_common.unpack(bref)); + HANDLE_CODE(ul_pwr_ctrl_common.unpack(bref)); + HANDLE_CODE(unpack_enum(ul_cp_len, bref)); + + if (ext) { + ext_groups_header group_flags(6); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_v1020_present, 1)); + if (ul_pwr_ctrl_common_v1020_present) { + ul_pwr_ctrl_common_v1020 = make_copy_ptr(ul_pwr_ctrl_common_v1020_s()); + HANDLE_CODE(ul_pwr_ctrl_common_v1020->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rach_cfg_common_v1250_present, 1)); + if (rach_cfg_common_v1250_present) { + rach_cfg_common_v1250 = make_copy_ptr(rach_cfg_common_v1250_s()); + HANDLE_CODE(rach_cfg_common_v1250->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pusch_cfg_common_v1270_present, 1)); + if (pusch_cfg_common_v1270_present) { + pusch_cfg_common_v1270 = make_copy_ptr(pusch_cfg_common_v1270_s()); + HANDLE_CODE(pusch_cfg_common_v1270->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(bcch_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pcch_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_common_v1310_present, 1)); + if (bcch_cfg_v1310_present) { + bcch_cfg_v1310 = make_copy_ptr(bcch_cfg_v1310_s()); + HANDLE_CODE(bcch_cfg_v1310->unpack(bref)); + } + if (pcch_cfg_v1310_present) { + pcch_cfg_v1310 = make_copy_ptr(pcch_cfg_v1310_s()); + HANDLE_CODE(pcch_cfg_v1310->unpack(bref)); + } + if (freq_hop_params_r13_present) { + freq_hop_params_r13 = make_copy_ptr(freq_hop_params_r13_s()); + HANDLE_CODE(freq_hop_params_r13->unpack(bref)); + } + if (pdsch_cfg_common_v1310_present) { + pdsch_cfg_common_v1310 = make_copy_ptr(pdsch_cfg_common_v1310_s()); + HANDLE_CODE(pdsch_cfg_common_v1310->unpack(bref)); + } + if (pusch_cfg_common_v1310_present) { + pusch_cfg_common_v1310 = make_copy_ptr(pusch_cfg_common_v1310_s()); + HANDLE_CODE(pusch_cfg_common_v1310->unpack(bref)); + } + if (prach_cfg_common_v1310_present) { + prach_cfg_common_v1310 = make_copy_ptr(prach_cfg_sib_v1310_s()); + HANDLE_CODE(prach_cfg_common_v1310->unpack(bref)); + } + if (pucch_cfg_common_v1310_present) { + pucch_cfg_common_v1310 = make_copy_ptr(pucch_cfg_common_v1310_s()); + HANDLE_CODE(pucch_cfg_common_v1310->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(high_speed_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_common_v1430_present, 1)); + if (high_speed_cfg_r14_present) { + high_speed_cfg_r14 = make_copy_ptr(high_speed_cfg_r14_s()); + HANDLE_CODE(high_speed_cfg_r14->unpack(bref)); + } + if (prach_cfg_v1430_present) { + prach_cfg_v1430 = make_copy_ptr(prach_cfg_v1430_s()); + HANDLE_CODE(prach_cfg_v1430->unpack(bref)); + } + if (pucch_cfg_common_v1430_present) { + pucch_cfg_common_v1430 = make_copy_ptr(pucch_cfg_common_v1430_s()); + HANDLE_CODE(pucch_cfg_common_v1430->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(prach_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ce_rss_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(wus_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_cfg_v1530_present, 1)); + if (prach_cfg_v1530_present) { + prach_cfg_v1530 = make_copy_ptr(prach_cfg_sib_v1530_s()); + HANDLE_CODE(prach_cfg_v1530->unpack(bref)); + } + if (ce_rss_cfg_r15_present) { + ce_rss_cfg_r15 = make_copy_ptr(rss_cfg_r15_s()); + HANDLE_CODE(ce_rss_cfg_r15->unpack(bref)); + } + if (wus_cfg_r15_present) { + wus_cfg_r15 = make_copy_ptr(wus_cfg_r15_s()); + HANDLE_CODE(wus_cfg_r15->unpack(bref)); + } + if (high_speed_cfg_v1530_present) { + high_speed_cfg_v1530 = make_copy_ptr(high_speed_cfg_v1530_s()); + HANDLE_CODE(high_speed_cfg_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_common_sib_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rach-ConfigCommon"); + rach_cfg_common.to_json(j); + j.write_fieldname("bcch-Config"); + bcch_cfg.to_json(j); + j.write_fieldname("pcch-Config"); + pcch_cfg.to_json(j); + j.write_fieldname("prach-Config"); + prach_cfg.to_json(j); + j.write_fieldname("pdsch-ConfigCommon"); + pdsch_cfg_common.to_json(j); + j.write_fieldname("pusch-ConfigCommon"); + pusch_cfg_common.to_json(j); + j.write_fieldname("pucch-ConfigCommon"); + pucch_cfg_common.to_json(j); + j.write_fieldname("soundingRS-UL-ConfigCommon"); + srs_ul_cfg_common.to_json(j); + j.write_fieldname("uplinkPowerControlCommon"); + ul_pwr_ctrl_common.to_json(j); + j.write_str("ul-CyclicPrefixLength", ul_cp_len.to_string()); + if (ul_pwr_ctrl_common_v1020_present) { + j.write_fieldname("uplinkPowerControlCommon-v1020"); + ul_pwr_ctrl_common_v1020->to_json(j); + } + if (rach_cfg_common_v1250_present) { + j.write_fieldname("rach-ConfigCommon-v1250"); + rach_cfg_common_v1250->to_json(j); + } + if (pusch_cfg_common_v1270_present) { + j.write_fieldname("pusch-ConfigCommon-v1270"); + pusch_cfg_common_v1270->to_json(j); + } + if (bcch_cfg_v1310_present) { + j.write_fieldname("bcch-Config-v1310"); + bcch_cfg_v1310->to_json(j); + } + if (pcch_cfg_v1310_present) { + j.write_fieldname("pcch-Config-v1310"); + pcch_cfg_v1310->to_json(j); + } + if (freq_hop_params_r13_present) { + j.write_fieldname("freqHoppingParameters-r13"); + freq_hop_params_r13->to_json(j); + } + if (pdsch_cfg_common_v1310_present) { + j.write_fieldname("pdsch-ConfigCommon-v1310"); + pdsch_cfg_common_v1310->to_json(j); + } + if (pusch_cfg_common_v1310_present) { + j.write_fieldname("pusch-ConfigCommon-v1310"); + pusch_cfg_common_v1310->to_json(j); + } + if (prach_cfg_common_v1310_present) { + j.write_fieldname("prach-ConfigCommon-v1310"); + prach_cfg_common_v1310->to_json(j); + } + if (pucch_cfg_common_v1310_present) { + j.write_fieldname("pucch-ConfigCommon-v1310"); + pucch_cfg_common_v1310->to_json(j); + } + if (high_speed_cfg_r14_present) { + j.write_fieldname("highSpeedConfig-r14"); + high_speed_cfg_r14->to_json(j); + } + if (prach_cfg_v1430_present) { + j.write_fieldname("prach-Config-v1430"); + prach_cfg_v1430->to_json(j); + } + if (pucch_cfg_common_v1430_present) { + j.write_fieldname("pucch-ConfigCommon-v1430"); + pucch_cfg_common_v1430->to_json(j); + } + if (prach_cfg_v1530_present) { + j.write_fieldname("prach-Config-v1530"); + prach_cfg_v1530->to_json(j); + } + if (ce_rss_cfg_r15_present) { + j.write_fieldname("ce-RSS-Config-r15"); + ce_rss_cfg_r15->to_json(j); + } + if (wus_cfg_r15_present) { + j.write_fieldname("wus-Config-r15"); + wus_cfg_r15->to_json(j); + } + if (high_speed_cfg_v1530_present) { + j.write_fieldname("highSpeedConfig-v1530"); + high_speed_cfg_v1530->to_json(j); + } + j.end_obj(); +} + +// RedistributionServingInfo-r13 ::= SEQUENCE +redist_serving_info_r13_s::redist_serving_info_r13_s() +{ + redist_factor_cell_r13_present = false; + redistr_on_paging_only_r13_present = false; +} +SRSASN_CODE redist_serving_info_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(redist_factor_cell_r13_present, 1)); + HANDLE_CODE(bref.pack(redistr_on_paging_only_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, redist_factor_serving_r13, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(pack_enum(bref, t360_r13)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE redist_serving_info_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(redist_factor_cell_r13_present, 1)); + HANDLE_CODE(bref.unpack(redistr_on_paging_only_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(redist_factor_serving_r13, bref, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(unpack_enum(t360_r13, bref)); + + return SRSASN_SUCCESS; +} +void redist_serving_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("redistributionFactorServing-r13", redist_factor_serving_r13); + if (redist_factor_cell_r13_present) { + j.write_str("redistributionFactorCell-r13", "true"); + } + j.write_str("t360-r13", t360_r13.to_string()); + if (redistr_on_paging_only_r13_present) { + j.write_str("redistrOnPagingOnly-r13", "true"); + } + j.end_obj(); +} + +// SC-MCCH-SchedulingInfo-r14 ::= SEQUENCE +sc_mcch_sched_info_r14_s::sc_mcch_sched_info_r14_s() +{ + ext = false; +} +SRSASN_CODE sc_mcch_sched_info_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, on_dur_timer_scptm_r14)); + HANDLE_CODE(pack_enum(bref, drx_inactivity_timer_scptm_r14)); + HANDLE_CODE(sched_period_start_offset_scptm_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_sched_info_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(on_dur_timer_scptm_r14, bref)); + HANDLE_CODE(unpack_enum(drx_inactivity_timer_scptm_r14, bref)); + HANDLE_CODE(sched_period_start_offset_scptm_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sc_mcch_sched_info_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("onDurationTimerSCPTM-r14", on_dur_timer_scptm_r14.to_string()); + j.write_str("drx-InactivityTimerSCPTM-r14", drx_inactivity_timer_scptm_r14.to_string()); + j.write_fieldname("schedulingPeriodStartOffsetSCPTM-r14"); + sched_period_start_offset_scptm_r14.to_json(j); + j.end_obj(); +} + +void sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::destroy_() {} +void sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::sched_period_start_offset_scptm_r14_c_( + const sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf10: + c.init(other.c.get()); + break; + case types::sf20: + c.init(other.c.get()); + break; + case types::sf32: + c.init(other.c.get()); + break; + case types::sf40: + c.init(other.c.get()); + break; + case types::sf64: + c.init(other.c.get()); + break; + case types::sf80: + c.init(other.c.get()); + break; + case types::sf128: + c.init(other.c.get()); + break; + case types::sf160: + c.init(other.c.get()); + break; + case types::sf256: + c.init(other.c.get()); + break; + case types::sf320: + c.init(other.c.get()); + break; + case types::sf512: + c.init(other.c.get()); + break; + case types::sf640: + c.init(other.c.get()); + break; + case types::sf1024: + c.init(other.c.get()); + break; + case types::sf2048: + c.init(other.c.get()); + break; + case types::sf4096: + c.init(other.c.get()); + break; + case types::sf8192: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_"); + } +} +sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_& +sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_:: +operator=(const sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf10: + c.set(other.c.get()); + break; + case types::sf20: + c.set(other.c.get()); + break; + case types::sf32: + c.set(other.c.get()); + break; + case types::sf40: + c.set(other.c.get()); + break; + case types::sf64: + c.set(other.c.get()); + break; + case types::sf80: + c.set(other.c.get()); + break; + case types::sf128: + c.set(other.c.get()); + break; + case types::sf160: + c.set(other.c.get()); + break; + case types::sf256: + c.set(other.c.get()); + break; + case types::sf320: + c.set(other.c.get()); + break; + case types::sf512: + c.set(other.c.get()); + break; + case types::sf640: + c.set(other.c.get()); + break; + case types::sf1024: + c.set(other.c.get()); + break; + case types::sf2048: + c.set(other.c.get()); + break; + case types::sf4096: + c.set(other.c.get()); + break; + case types::sf8192: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_"); + } + + return *this; +} +void sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf10: + j.write_int("sf10", c.get()); + break; + case types::sf20: + j.write_int("sf20", c.get()); + break; + case types::sf32: + j.write_int("sf32", c.get()); + break; + case types::sf40: + j.write_int("sf40", c.get()); + break; + case types::sf64: + j.write_int("sf64", c.get()); + break; + case types::sf80: + j.write_int("sf80", c.get()); + break; + case types::sf128: + j.write_int("sf128", c.get()); + break; + case types::sf160: + j.write_int("sf160", c.get()); + break; + case types::sf256: + j.write_int("sf256", c.get()); + break; + case types::sf320: + j.write_int("sf320", c.get()); + break; + case types::sf512: + j.write_int("sf512", c.get()); + break; + case types::sf640: + j.write_int("sf640", c.get()); + break; + case types::sf1024: + j.write_int("sf1024", c.get()); + break; + case types::sf2048: + j.write_int("sf2048", c.get()); + break; + case types::sf4096: + j.write_int("sf4096", c.get()); + break; + case types::sf8192: + j.write_int("sf8192", c.get()); + break; + default: + log_invalid_choice_id(type_, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf10: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1023)); + break; + case types::sf2048: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)2047)); + break; + case types::sf4096: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)4095)); + break; + case types::sf8192: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)8191)); + break; + default: + log_invalid_choice_id(type_, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf10: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1023)); + break; + case types::sf2048: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)2047)); + break; + case types::sf4096: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)4095)); + break; + case types::sf8192: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)8191)); + break; + default: + log_invalid_choice_id(type_, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-DiscConfigRelayUE-r13 ::= SEQUENCE +sl_disc_cfg_relay_ue_r13_s::sl_disc_cfg_relay_ue_r13_s() +{ + thresh_high_r13_present = false; + thresh_low_r13_present = false; + hyst_max_r13_present = false; + hyst_min_r13_present = false; +} +SRSASN_CODE sl_disc_cfg_relay_ue_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(thresh_high_r13_present, 1)); + HANDLE_CODE(bref.pack(thresh_low_r13_present, 1)); + HANDLE_CODE(bref.pack(hyst_max_r13_present, 1)); + HANDLE_CODE(bref.pack(hyst_min_r13_present, 1)); + + if (thresh_high_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_high_r13, (uint8_t)0, (uint8_t)49)); + } + if (thresh_low_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_low_r13, (uint8_t)0, (uint8_t)49)); + } + if (hyst_max_r13_present) { + HANDLE_CODE(pack_enum(bref, hyst_max_r13)); + } + if (hyst_min_r13_present) { + HANDLE_CODE(pack_enum(bref, hyst_min_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_relay_ue_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(thresh_high_r13_present, 1)); + HANDLE_CODE(bref.unpack(thresh_low_r13_present, 1)); + HANDLE_CODE(bref.unpack(hyst_max_r13_present, 1)); + HANDLE_CODE(bref.unpack(hyst_min_r13_present, 1)); + + if (thresh_high_r13_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_high_r13, bref, (uint8_t)0, (uint8_t)49)); + } + if (thresh_low_r13_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_low_r13, bref, (uint8_t)0, (uint8_t)49)); + } + if (hyst_max_r13_present) { + HANDLE_CODE(unpack_enum(hyst_max_r13, bref)); + } + if (hyst_min_r13_present) { + HANDLE_CODE(unpack_enum(hyst_min_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void sl_disc_cfg_relay_ue_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thresh_high_r13_present) { + j.write_int("threshHigh-r13", thresh_high_r13); + } + if (thresh_low_r13_present) { + j.write_int("threshLow-r13", thresh_low_r13); + } + if (hyst_max_r13_present) { + j.write_str("hystMax-r13", hyst_max_r13.to_string()); + } + if (hyst_min_r13_present) { + j.write_str("hystMin-r13", hyst_min_r13.to_string()); + } + j.end_obj(); +} + +// SL-DiscConfigRemoteUE-r13 ::= SEQUENCE +sl_disc_cfg_remote_ue_r13_s::sl_disc_cfg_remote_ue_r13_s() +{ + thresh_high_r13_present = false; + hyst_max_r13_present = false; +} +SRSASN_CODE sl_disc_cfg_remote_ue_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(thresh_high_r13_present, 1)); + HANDLE_CODE(bref.pack(hyst_max_r13_present, 1)); + + if (thresh_high_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_high_r13, (uint8_t)0, (uint8_t)49)); + } + if (hyst_max_r13_present) { + HANDLE_CODE(pack_enum(bref, hyst_max_r13)); + } + HANDLE_CODE(resel_info_ic_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_remote_ue_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(thresh_high_r13_present, 1)); + HANDLE_CODE(bref.unpack(hyst_max_r13_present, 1)); + + if (thresh_high_r13_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_high_r13, bref, (uint8_t)0, (uint8_t)49)); + } + if (hyst_max_r13_present) { + HANDLE_CODE(unpack_enum(hyst_max_r13, bref)); + } + HANDLE_CODE(resel_info_ic_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_disc_cfg_remote_ue_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thresh_high_r13_present) { + j.write_int("threshHigh-r13", thresh_high_r13); + } + if (hyst_max_r13_present) { + j.write_str("hystMax-r13", hyst_max_r13.to_string()); + } + j.write_fieldname("reselectionInfoIC-r13"); + resel_info_ic_r13.to_json(j); + j.end_obj(); +} + +// SL-V2X-ConfigCommon-r14 ::= SEQUENCE +sl_v2x_cfg_common_r14_s::sl_v2x_cfg_common_r14_s() +{ + v2x_comm_rx_pool_r14_present = false; + v2x_comm_tx_pool_normal_common_r14_present = false; + p2x_comm_tx_pool_normal_common_r14_present = false; + v2x_comm_tx_pool_exceptional_r14_present = false; + v2x_sync_cfg_r14_present = false; + v2x_inter_freq_info_list_r14_present = false; + v2x_res_sel_cfg_r14_present = false; + zone_cfg_r14_present = false; + type_tx_sync_r14_present = false; + thres_sl_tx_prioritization_r14_present = false; + anchor_carrier_freq_list_r14_present = false; + offset_dfn_r14_present = false; + cbr_common_tx_cfg_list_r14_present = false; +} +SRSASN_CODE sl_v2x_cfg_common_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_tx_pool_normal_common_r14_present, 1)); + HANDLE_CODE(bref.pack(p2x_comm_tx_pool_normal_common_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_inter_freq_info_list_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_res_sel_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(zone_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(thres_sl_tx_prioritization_r14_present, 1)); + HANDLE_CODE(bref.pack(anchor_carrier_freq_list_r14_present, 1)); + HANDLE_CODE(bref.pack(offset_dfn_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_common_tx_cfg_list_r14_present, 1)); + + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_rx_pool_r14, 1, 16)); + } + if (v2x_comm_tx_pool_normal_common_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_tx_pool_normal_common_r14, 1, 8)); + } + if (p2x_comm_tx_pool_normal_common_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p2x_comm_tx_pool_normal_common_r14, 1, 8)); + } + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.pack(bref)); + } + if (v2x_sync_cfg_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_sync_cfg_r14, 1, 16)); + } + if (v2x_inter_freq_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_inter_freq_info_list_r14, 0, 7)); + } + if (v2x_res_sel_cfg_r14_present) { + HANDLE_CODE(v2x_res_sel_cfg_r14.pack(bref)); + } + if (zone_cfg_r14_present) { + HANDLE_CODE(zone_cfg_r14.pack(bref)); + } + if (type_tx_sync_r14_present) { + HANDLE_CODE(pack_enum(bref, type_tx_sync_r14)); + } + if (thres_sl_tx_prioritization_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_sl_tx_prioritization_r14, (uint8_t)1, (uint8_t)8)); + } + if (anchor_carrier_freq_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, anchor_carrier_freq_list_r14, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (offset_dfn_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_dfn_r14, (uint16_t)0, (uint16_t)1000)); + } + if (cbr_common_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_common_tx_cfg_list_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_cfg_common_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_normal_common_r14_present, 1)); + HANDLE_CODE(bref.unpack(p2x_comm_tx_pool_normal_common_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_inter_freq_info_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_res_sel_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(zone_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(thres_sl_tx_prioritization_r14_present, 1)); + HANDLE_CODE(bref.unpack(anchor_carrier_freq_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(offset_dfn_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_common_tx_cfg_list_r14_present, 1)); + + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_rx_pool_r14, bref, 1, 16)); + } + if (v2x_comm_tx_pool_normal_common_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_tx_pool_normal_common_r14, bref, 1, 8)); + } + if (p2x_comm_tx_pool_normal_common_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(p2x_comm_tx_pool_normal_common_r14, bref, 1, 8)); + } + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.unpack(bref)); + } + if (v2x_sync_cfg_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_sync_cfg_r14, bref, 1, 16)); + } + if (v2x_inter_freq_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_inter_freq_info_list_r14, bref, 0, 7)); + } + if (v2x_res_sel_cfg_r14_present) { + HANDLE_CODE(v2x_res_sel_cfg_r14.unpack(bref)); + } + if (zone_cfg_r14_present) { + HANDLE_CODE(zone_cfg_r14.unpack(bref)); + } + if (type_tx_sync_r14_present) { + HANDLE_CODE(unpack_enum(type_tx_sync_r14, bref)); + } + if (thres_sl_tx_prioritization_r14_present) { + HANDLE_CODE(unpack_unalign_integer(thres_sl_tx_prioritization_r14, bref, (uint8_t)1, (uint8_t)8)); + } + if (anchor_carrier_freq_list_r14_present) { + HANDLE_CODE( + unpack_dyn_seq_of(anchor_carrier_freq_list_r14, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (offset_dfn_r14_present) { + HANDLE_CODE(unpack_unalign_integer(offset_dfn_r14, bref, (uint16_t)0, (uint16_t)1000)); + } + if (cbr_common_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_common_tx_cfg_list_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_v2x_cfg_common_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (v2x_comm_rx_pool_r14_present) { + j.start_array("v2x-CommRxPool-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_r14.size(); ++i1) { + v2x_comm_rx_pool_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_comm_tx_pool_normal_common_r14_present) { + j.start_array("v2x-CommTxPoolNormalCommon-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_tx_pool_normal_common_r14.size(); ++i1) { + v2x_comm_tx_pool_normal_common_r14[i1].to_json(j); + } + j.end_array(); + } + if (p2x_comm_tx_pool_normal_common_r14_present) { + j.start_array("p2x-CommTxPoolNormalCommon-r14"); + for (uint32_t i1 = 0; i1 < p2x_comm_tx_pool_normal_common_r14.size(); ++i1) { + p2x_comm_tx_pool_normal_common_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_comm_tx_pool_exceptional_r14_present) { + j.write_fieldname("v2x-CommTxPoolExceptional-r14"); + v2x_comm_tx_pool_exceptional_r14.to_json(j); + } + if (v2x_sync_cfg_r14_present) { + j.start_array("v2x-SyncConfig-r14"); + for (uint32_t i1 = 0; i1 < v2x_sync_cfg_r14.size(); ++i1) { + v2x_sync_cfg_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_inter_freq_info_list_r14_present) { + j.start_array("v2x-InterFreqInfoList-r14"); + for (uint32_t i1 = 0; i1 < v2x_inter_freq_info_list_r14.size(); ++i1) { + v2x_inter_freq_info_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_res_sel_cfg_r14_present) { + j.write_fieldname("v2x-ResourceSelectionConfig-r14"); + v2x_res_sel_cfg_r14.to_json(j); + } + if (zone_cfg_r14_present) { + j.write_fieldname("zoneConfig-r14"); + zone_cfg_r14.to_json(j); + } + if (type_tx_sync_r14_present) { + j.write_str("typeTxSync-r14", type_tx_sync_r14.to_string()); + } + if (thres_sl_tx_prioritization_r14_present) { + j.write_int("thresSL-TxPrioritization-r14", thres_sl_tx_prioritization_r14); + } + if (anchor_carrier_freq_list_r14_present) { + j.start_array("anchorCarrierFreqList-r14"); + for (uint32_t i1 = 0; i1 < anchor_carrier_freq_list_r14.size(); ++i1) { + j.write_int(anchor_carrier_freq_list_r14[i1]); + } + j.end_array(); + } + if (offset_dfn_r14_present) { + j.write_int("offsetDFN-r14", offset_dfn_r14); + } + if (cbr_common_tx_cfg_list_r14_present) { + j.write_fieldname("cbr-CommonTxConfigList-r14"); + cbr_common_tx_cfg_list_r14.to_json(j); + } + j.end_obj(); +} + +// SL-V2X-PacketDuplicationConfig-r15 ::= SEQUENCE +sl_v2x_packet_dupl_cfg_r15_s::sl_v2x_packet_dupl_cfg_r15_s() +{ + ext = false; + allowed_carrier_freq_cfg_r15_present = false; +} +SRSASN_CODE sl_v2x_packet_dupl_cfg_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(allowed_carrier_freq_cfg_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, thresh_sl_reliability_r15, (uint8_t)1, (uint8_t)8)); + if (allowed_carrier_freq_cfg_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_carrier_freq_cfg_r15, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_packet_dupl_cfg_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(allowed_carrier_freq_cfg_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(thresh_sl_reliability_r15, bref, (uint8_t)1, (uint8_t)8)); + if (allowed_carrier_freq_cfg_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(allowed_carrier_freq_cfg_r15, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void sl_v2x_packet_dupl_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("threshSL-Reliability-r15", thresh_sl_reliability_r15); + if (allowed_carrier_freq_cfg_r15_present) { + j.start_array("allowedCarrierFreqConfig-r15"); + for (uint32_t i1 = 0; i1 < allowed_carrier_freq_cfg_r15.size(); ++i1) { + allowed_carrier_freq_cfg_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v1130-IEs ::= SEQUENCE +sib_type1_v1130_ies_s::sib_type1_v1130_ies_s() +{ + tdd_cfg_v1130_present = false; + cell_sel_info_v1130_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tdd_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_v1130_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (tdd_cfg_v1130_present) { + HANDLE_CODE(tdd_cfg_v1130.pack(bref)); + } + if (cell_sel_info_v1130_present) { + HANDLE_CODE(cell_sel_info_v1130.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tdd_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_v1130_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (tdd_cfg_v1130_present) { + HANDLE_CODE(tdd_cfg_v1130.unpack(bref)); + } + if (cell_sel_info_v1130_present) { + HANDLE_CODE(cell_sel_info_v1130.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tdd_cfg_v1130_present) { + j.write_fieldname("tdd-Config-v1130"); + tdd_cfg_v1130.to_json(j); + } + if (cell_sel_info_v1130_present) { + j.write_fieldname("cellSelectionInfo-v1130"); + cell_sel_info_v1130.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v9e0-IEs ::= SEQUENCE +sib_type1_v9e0_ies_s::sib_type1_v9e0_ies_s() +{ + freq_band_ind_v9e0_present = false; + multi_band_info_list_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_ind_v9e0_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_band_ind_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_band_ind_v9e0, (uint16_t)65, (uint16_t)256)); + } + if (multi_band_info_list_v9e0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v9e0, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_ind_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_band_ind_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(freq_band_ind_v9e0, bref, (uint16_t)65, (uint16_t)256)); + } + if (multi_band_info_list_v9e0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v9e0, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_ind_v9e0_present) { + j.write_int("freqBandIndicator-v9e0", freq_band_ind_v9e0); + } + if (multi_band_info_list_v9e0_present) { + j.start_array("multiBandInfoList-v9e0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v9e0.size(); ++i1) { + multi_band_info_list_v9e0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType2-v8h0-IEs ::= SEQUENCE +sib_type2_v8h0_ies_s::sib_type2_v8h0_ies_s() +{ + multi_band_info_list_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type2_v8h0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_band_info_list_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, UnalignedIntegerPacker(1, 32))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type2_v8h0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_band_info_list_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list, bref, 1, 8, UnalignedIntegerPacker(1, 32))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type2_v8h0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multi_band_info_list_present) { + j.start_array("multiBandInfoList"); + for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { + j.write_int(multi_band_info_list[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType3-v10j0-IEs ::= SEQUENCE +sib_type3_v10j0_ies_s::sib_type3_v10j0_ies_s() +{ + freq_band_info_r10_present = false; + multi_band_info_list_v10j0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type3_v10j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_info_r10_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list_v10j0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (freq_band_info_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_info_r10, 1, 8)); + } + if (multi_band_info_list_v10j0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_v10j0, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type3_v10j0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_list_v10j0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (freq_band_info_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_info_r10, bref, 1, 8)); + } + if (multi_band_info_list_v10j0_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_v10j0, bref, 1, 8, SeqOfPacker(1, 8, Packer()))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type3_v10j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_info_r10_present) { + j.start_array("freqBandInfo-r10"); + for (uint32_t i1 = 0; i1 < freq_band_info_r10.size(); ++i1) { + freq_band_info_r10[i1].to_json(j); + } + j.end_array(); + } + if (multi_band_info_list_v10j0_present) { + j.start_array("multiBandInfoList-v10j0"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_v10j0.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < multi_band_info_list_v10j0[i1].size(); ++i2) { + multi_band_info_list_v10j0[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType5-v8h0-IEs ::= SEQUENCE +sib_type5_v8h0_ies_s::sib_type5_v8h0_ies_s() +{ + inter_freq_carrier_freq_list_v8h0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type5_v8h0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v8h0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v8h0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list_v8h0, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type5_v8h0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v8h0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (inter_freq_carrier_freq_list_v8h0_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list_v8h0, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type5_v8h0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_freq_carrier_freq_list_v8h0_present) { + j.start_array("interFreqCarrierFreqList-v8h0"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v8h0.size(); ++i1) { + inter_freq_carrier_freq_list_v8h0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType6-v8h0-IEs ::= SEQUENCE +sib_type6_v8h0_ies_s::sib_type6_v8h0_ies_s() +{ + carrier_freq_list_utra_fdd_v8h0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type6_v8h0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_list_utra_fdd_v8h0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (carrier_freq_list_utra_fdd_v8h0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freq_list_utra_fdd_v8h0, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type6_v8h0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_fdd_v8h0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (carrier_freq_list_utra_fdd_v8h0_present) { + HANDLE_CODE(unpack_dyn_seq_of(carrier_freq_list_utra_fdd_v8h0, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void sib_type6_v8h0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_list_utra_fdd_v8h0_present) { + j.start_array("carrierFreqListUTRA-FDD-v8h0"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd_v8h0.size(); ++i1) { + carrier_freq_list_utra_fdd_v8h0[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// TimeReferenceInfo-r15 ::= SEQUENCE +time_ref_info_r15_s::time_ref_info_r15_s() +{ + uncertainty_r15_present = false; + time_info_type_r15_present = false; + ref_sfn_r15_present = false; +} +SRSASN_CODE time_ref_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(uncertainty_r15_present, 1)); + HANDLE_CODE(bref.pack(time_info_type_r15_present, 1)); + HANDLE_CODE(bref.pack(ref_sfn_r15_present, 1)); + + HANDLE_CODE(time_r15.pack(bref)); + if (uncertainty_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, uncertainty_r15, (uint8_t)0, (uint8_t)12)); + } + if (ref_sfn_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, ref_sfn_r15, (uint16_t)0, (uint16_t)1023)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE time_ref_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(uncertainty_r15_present, 1)); + HANDLE_CODE(bref.unpack(time_info_type_r15_present, 1)); + HANDLE_CODE(bref.unpack(ref_sfn_r15_present, 1)); + + HANDLE_CODE(time_r15.unpack(bref)); + if (uncertainty_r15_present) { + HANDLE_CODE(unpack_unalign_integer(uncertainty_r15, bref, (uint8_t)0, (uint8_t)12)); + } + if (ref_sfn_r15_present) { + HANDLE_CODE(unpack_unalign_integer(ref_sfn_r15, bref, (uint16_t)0, (uint16_t)1023)); + } + + return SRSASN_SUCCESS; +} +void time_ref_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("time-r15"); + time_r15.to_json(j); + if (uncertainty_r15_present) { + j.write_int("uncertainty-r15", uncertainty_r15); + } + if (time_info_type_r15_present) { + j.write_str("timeInfoType-r15", "localClock"); + } + if (ref_sfn_r15_present) { + j.write_int("referenceSFN-r15", ref_sfn_r15); + } + j.end_obj(); +} + +// UE-TimersAndConstants ::= SEQUENCE +ue_timers_and_consts_s::ue_timers_and_consts_s() +{ + ext = false; + t300_v1310_present = false; + t301_v1310_present = false; + t310_v1330_present = false; + t300_r15_present = false; +} +SRSASN_CODE ue_timers_and_consts_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, t300)); + HANDLE_CODE(pack_enum(bref, t301)); + HANDLE_CODE(pack_enum(bref, t310)); + HANDLE_CODE(pack_enum(bref, n310)); + HANDLE_CODE(pack_enum(bref, t311)); + HANDLE_CODE(pack_enum(bref, n311)); + + if (ext) { + ext_groups_header group_flags(3); + group_flags[0] |= t300_v1310_present; + group_flags[0] |= t301_v1310_present; + group_flags[1] |= t310_v1330_present; + group_flags[2] |= t300_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(t300_v1310_present, 1)); + HANDLE_CODE(bref.pack(t301_v1310_present, 1)); + if (t300_v1310_present) { + HANDLE_CODE(pack_enum(bref, t300_v1310)); + } + if (t301_v1310_present) { + HANDLE_CODE(pack_enum(bref, t301_v1310)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(t310_v1330_present, 1)); + if (t310_v1330_present) { + HANDLE_CODE(pack_enum(bref, t310_v1330)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(t300_r15_present, 1)); + if (t300_r15_present) { + HANDLE_CODE(pack_enum(bref, t300_r15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_timers_and_consts_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(t300, bref)); + HANDLE_CODE(unpack_enum(t301, bref)); + HANDLE_CODE(unpack_enum(t310, bref)); + HANDLE_CODE(unpack_enum(n310, bref)); + HANDLE_CODE(unpack_enum(t311, bref)); + HANDLE_CODE(unpack_enum(n311, bref)); + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(t300_v1310_present, 1)); + HANDLE_CODE(bref.unpack(t301_v1310_present, 1)); + if (t300_v1310_present) { + HANDLE_CODE(unpack_enum(t300_v1310, bref)); + } + if (t301_v1310_present) { + HANDLE_CODE(unpack_enum(t301_v1310, bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(t310_v1330_present, 1)); + if (t310_v1330_present) { + HANDLE_CODE(unpack_enum(t310_v1330, bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(t300_r15_present, 1)); + if (t300_r15_present) { + HANDLE_CODE(unpack_enum(t300_r15, 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()); + if (t300_v1310_present) { + j.write_str("t300-v1310", t300_v1310.to_string()); + } + if (t301_v1310_present) { + j.write_str("t301-v1310", t301_v1310.to_string()); + } + if (t310_v1330_present) { + j.write_str("t310-v1330", t310_v1330.to_string()); + } + if (t300_r15_present) { + j.write_str("t300-r15", t300_r15.to_string()); + } + j.end_obj(); +} + +// WLAN-OffloadInfoPerPLMN-r12 ::= SEQUENCE +wlan_offload_info_per_plmn_r12_s::wlan_offload_info_per_plmn_r12_s() +{ + ext = false; + wlan_offload_cfg_common_r12_present = false; + wlan_id_list_r12_present = false; +} +SRSASN_CODE wlan_offload_info_per_plmn_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(wlan_offload_cfg_common_r12_present, 1)); + HANDLE_CODE(bref.pack(wlan_id_list_r12_present, 1)); + + if (wlan_offload_cfg_common_r12_present) { + HANDLE_CODE(wlan_offload_cfg_common_r12.pack(bref)); + } + if (wlan_id_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_id_list_r12, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_offload_info_per_plmn_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(wlan_offload_cfg_common_r12_present, 1)); + HANDLE_CODE(bref.unpack(wlan_id_list_r12_present, 1)); + + if (wlan_offload_cfg_common_r12_present) { + HANDLE_CODE(wlan_offload_cfg_common_r12.unpack(bref)); + } + if (wlan_id_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_id_list_r12, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void wlan_offload_info_per_plmn_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_offload_cfg_common_r12_present) { + j.write_fieldname("wlan-OffloadConfigCommon-r12"); + wlan_offload_cfg_common_r12.to_json(j); + } + if (wlan_id_list_r12_present) { + j.start_array("wlan-Id-List-r12"); + for (uint32_t i1 = 0; i1 < wlan_id_list_r12.size(); ++i1) { + wlan_id_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SchedulingInfo ::= SEQUENCE +SRSASN_CODE sched_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, si_periodicity)); + HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info, 0, 31, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(si_periodicity, bref)); + HANDLE_CODE(unpack_dyn_seq_of(sib_map_info, bref, 0, 31, EnumPacker())); + + return SRSASN_SUCCESS; +} +void sched_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("si-Periodicity", si_periodicity.to_string()); + j.start_array("sib-MappingInfo"); + for (uint32_t i1 = 0; i1 < sib_map_info.size(); ++i1) { + j.write_str(sib_map_info[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// SystemInformation-v8a0-IEs ::= SEQUENCE +sys_info_v8a0_ies_s::sys_info_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sys_info_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sys_info_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SystemInformationBlockPos-r15 ::= SEQUENCE +sib_pos_r15_s::sib_pos_r15_s() +{ + ext = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_pos_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(assist_data_sib_elem_r15.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_pos_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(assist_data_sib_elem_r15.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_pos_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("assistanceDataSIB-Element-r15", assist_data_sib_elem_r15.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v8h0-IEs ::= SEQUENCE +sib_type1_v8h0_ies_s::sib_type1_v8h0_ies_s() +{ + multi_band_info_list_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v8h0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_band_info_list_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, UnalignedIntegerPacker(1, 64))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v8h0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_band_info_list_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (multi_band_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list, bref, 1, 8, UnalignedIntegerPacker(1, 64))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v8h0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multi_band_info_list_present) { + j.start_array("multiBandInfoList"); + for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { + j.write_int(multi_band_info_list[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v920-IEs ::= SEQUENCE +sib_type1_v920_ies_s::sib_type1_v920_ies_s() +{ + ims_emergency_support_r9_present = false; + cell_sel_info_v920_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ims_emergency_support_r9_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_v920_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cell_sel_info_v920_present) { + HANDLE_CODE(cell_sel_info_v920.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ims_emergency_support_r9_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_v920_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cell_sel_info_v920_present) { + HANDLE_CODE(cell_sel_info_v920.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ims_emergency_support_r9_present) { + j.write_str("ims-EmergencySupport-r9", "true"); + } + if (cell_sel_info_v920_present) { + j.write_fieldname("cellSelectionInfo-v920"); + cell_sel_info_v920.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType10 ::= SEQUENCE +sib_type10_s::sib_type10_s() +{ + ext = false; + dummy_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dummy_present, 1)); + + HANDLE_CODE(msg_id.pack(bref)); + HANDLE_CODE(serial_num.pack(bref)); + HANDLE_CODE(warning_type.pack(bref)); + if (dummy_present) { + HANDLE_CODE(dummy.pack(bref)); + } + + if (ext) { + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dummy_present, 1)); + + HANDLE_CODE(msg_id.unpack(bref)); + HANDLE_CODE(serial_num.unpack(bref)); + HANDLE_CODE(warning_type.unpack(bref)); + if (dummy_present) { + HANDLE_CODE(dummy.unpack(bref)); + } + + if (ext) { + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + } + return SRSASN_SUCCESS; +} +void sib_type10_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 (dummy_present) { + j.write_str("dummy", dummy.to_string()); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType11 ::= SEQUENCE +sib_type11_s::sib_type11_s() +{ + ext = false; + data_coding_scheme_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(data_coding_scheme_present, 1)); + + HANDLE_CODE(msg_id.pack(bref)); + HANDLE_CODE(serial_num.pack(bref)); + HANDLE_CODE(pack_enum(bref, warning_msg_segment_type)); + HANDLE_CODE(pack_unalign_integer(bref, warning_msg_segment_num, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(warning_msg_segment.pack(bref)); + if (data_coding_scheme_present) { + HANDLE_CODE(data_coding_scheme.pack(bref)); + } + + if (ext) { + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(data_coding_scheme_present, 1)); + + HANDLE_CODE(msg_id.unpack(bref)); + HANDLE_CODE(serial_num.unpack(bref)); + HANDLE_CODE(unpack_enum(warning_msg_segment_type, bref)); + HANDLE_CODE(unpack_unalign_integer(warning_msg_segment_num, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(warning_msg_segment.unpack(bref)); + if (data_coding_scheme_present) { + HANDLE_CODE(data_coding_scheme.unpack(bref)); + } + + if (ext) { + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + } + return SRSASN_SUCCESS; +} +void sib_type11_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_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType12-r9 ::= SEQUENCE +sib_type12_r9_s::sib_type12_r9_s() +{ + ext = false; + data_coding_scheme_r9_present = false; + late_non_crit_ext_present = false; + warning_area_coordinates_segment_r15_present = false; +} +SRSASN_CODE sib_type12_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(data_coding_scheme_r9_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(msg_id_r9.pack(bref)); + HANDLE_CODE(serial_num_r9.pack(bref)); + HANDLE_CODE(pack_enum(bref, warning_msg_segment_type_r9)); + HANDLE_CODE(pack_unalign_integer(bref, warning_msg_segment_num_r9, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(warning_msg_segment_r9.pack(bref)); + if (data_coding_scheme_r9_present) { + HANDLE_CODE(data_coding_scheme_r9.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= warning_area_coordinates_segment_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(warning_area_coordinates_segment_r15_present, 1)); + if (warning_area_coordinates_segment_r15_present) { + HANDLE_CODE(warning_area_coordinates_segment_r15.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type12_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(data_coding_scheme_r9_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(msg_id_r9.unpack(bref)); + HANDLE_CODE(serial_num_r9.unpack(bref)); + HANDLE_CODE(unpack_enum(warning_msg_segment_type_r9, bref)); + HANDLE_CODE(unpack_unalign_integer(warning_msg_segment_num_r9, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(warning_msg_segment_r9.unpack(bref)); + if (data_coding_scheme_r9_present) { + HANDLE_CODE(data_coding_scheme_r9.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(warning_area_coordinates_segment_r15_present, 1)); + if (warning_area_coordinates_segment_r15_present) { + HANDLE_CODE(warning_area_coordinates_segment_r15.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type12_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("messageIdentifier-r9", msg_id_r9.to_string()); + j.write_str("serialNumber-r9", serial_num_r9.to_string()); + j.write_str("warningMessageSegmentType-r9", warning_msg_segment_type_r9.to_string()); + j.write_int("warningMessageSegmentNumber-r9", warning_msg_segment_num_r9); + j.write_str("warningMessageSegment-r9", warning_msg_segment_r9.to_string()); + if (data_coding_scheme_r9_present) { + j.write_str("dataCodingScheme-r9", data_coding_scheme_r9.to_string()); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (warning_area_coordinates_segment_r15_present) { + j.write_str("warningAreaCoordinatesSegment-r15", warning_area_coordinates_segment_r15.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType13-r9 ::= SEQUENCE +sib_type13_r9_s::sib_type13_r9_s() +{ + ext = false; + late_non_crit_ext_present = false; + notif_cfg_v1430_present = false; +} +SRSASN_CODE sib_type13_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_area_info_list_r9, 1, 8)); + HANDLE_CODE(notif_cfg_r9.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(notif_cfg_v1430_present != (notif_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= notif_cfg_v1430_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(notif_cfg_v1430_present, 1)); + if (notif_cfg_v1430_present) { + HANDLE_CODE(notif_cfg_v1430->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type13_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(mbsfn_area_info_list_r9, bref, 1, 8)); + HANDLE_CODE(notif_cfg_r9.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(notif_cfg_v1430_present, 1)); + if (notif_cfg_v1430_present) { + notif_cfg_v1430 = make_copy_ptr(mbms_notif_cfg_v1430_s()); + HANDLE_CODE(notif_cfg_v1430->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type13_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("mbsfn-AreaInfoList-r9"); + for (uint32_t i1 = 0; i1 < mbsfn_area_info_list_r9.size(); ++i1) { + mbsfn_area_info_list_r9[i1].to_json(j); + } + j.end_array(); + j.write_fieldname("notificationConfig-r9"); + notif_cfg_r9.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (notif_cfg_v1430_present) { + j.write_fieldname("notificationConfig-v1430"); + notif_cfg_v1430->to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType14-r11 ::= SEQUENCE +sib_type14_r11_s::sib_type14_r11_s() +{ + ext = false; + eab_param_r11_present = false; + late_non_crit_ext_present = false; + eab_per_rsrp_r15_present = false; +} +SRSASN_CODE sib_type14_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(eab_param_r11_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (eab_param_r11_present) { + HANDLE_CODE(eab_param_r11.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= eab_per_rsrp_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(eab_per_rsrp_r15_present, 1)); + if (eab_per_rsrp_r15_present) { + HANDLE_CODE(pack_enum(bref, eab_per_rsrp_r15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type14_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(eab_param_r11_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (eab_param_r11_present) { + HANDLE_CODE(eab_param_r11.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(eab_per_rsrp_r15_present, 1)); + if (eab_per_rsrp_r15_present) { + HANDLE_CODE(unpack_enum(eab_per_rsrp_r15, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type14_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eab_param_r11_present) { + j.write_fieldname("eab-Param-r11"); + eab_param_r11.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (eab_per_rsrp_r15_present) { + j.write_str("eab-PerRSRP-r15", eab_per_rsrp_r15.to_string()); + } + j.end_obj(); +} + +void sib_type14_r11_s::eab_param_r11_c_::destroy_() +{ + switch (type_) { + case types::eab_common_r11: + c.destroy(); + break; + case types::eab_per_plmn_list_r11: + c.destroy(); + break; + default: + break; + } +} +void sib_type14_r11_s::eab_param_r11_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::eab_common_r11: + c.init(); + break; + case types::eab_per_plmn_list_r11: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type14_r11_s::eab_param_r11_c_"); + } +} +sib_type14_r11_s::eab_param_r11_c_::eab_param_r11_c_(const sib_type14_r11_s::eab_param_r11_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::eab_common_r11: + c.init(other.c.get()); + break; + case types::eab_per_plmn_list_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type14_r11_s::eab_param_r11_c_"); + } +} +sib_type14_r11_s::eab_param_r11_c_& sib_type14_r11_s::eab_param_r11_c_:: + operator=(const sib_type14_r11_s::eab_param_r11_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::eab_common_r11: + c.set(other.c.get()); + break; + case types::eab_per_plmn_list_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type14_r11_s::eab_param_r11_c_"); + } + + return *this; +} +void sib_type14_r11_s::eab_param_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::eab_common_r11: + j.write_fieldname("eab-Common-r11"); + c.get().to_json(j); + break; + case types::eab_per_plmn_list_r11: + j.start_array("eab-PerPLMN-List-r11"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "sib_type14_r11_s::eab_param_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib_type14_r11_s::eab_param_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::eab_common_r11: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eab_per_plmn_list_r11: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 6)); + break; + default: + log_invalid_choice_id(type_, "sib_type14_r11_s::eab_param_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type14_r11_s::eab_param_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::eab_common_r11: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eab_per_plmn_list_r11: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 6)); + break; + default: + log_invalid_choice_id(type_, "sib_type14_r11_s::eab_param_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType15-r11 ::= SEQUENCE +sib_type15_r11_s::sib_type15_r11_s() +{ + ext = false; + mbms_sai_intra_freq_r11_present = false; + mbms_sai_inter_freq_list_r11_present = false; + late_non_crit_ext_present = false; + mbms_sai_inter_freq_list_v1140_present = false; + mbms_intra_freq_carrier_type_r14_present = false; + mbms_inter_freq_carrier_type_list_r14_present = false; +} +SRSASN_CODE sib_type15_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mbms_sai_intra_freq_r11_present, 1)); + HANDLE_CODE(bref.pack(mbms_sai_inter_freq_list_r11_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (mbms_sai_intra_freq_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_sai_intra_freq_r11, 1, 64, UnalignedIntegerPacker(0, 65535))); + } + if (mbms_sai_inter_freq_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_sai_inter_freq_list_r11, 1, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(mbms_sai_inter_freq_list_v1140_present != (mbms_sai_inter_freq_list_v1140.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= mbms_sai_inter_freq_list_v1140_present; + rrc_asn1_warn_assert(mbms_intra_freq_carrier_type_r14_present != (mbms_intra_freq_carrier_type_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= mbms_intra_freq_carrier_type_r14_present; + rrc_asn1_warn_assert(mbms_inter_freq_carrier_type_list_r14_present != + (mbms_inter_freq_carrier_type_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= mbms_inter_freq_carrier_type_list_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbms_sai_inter_freq_list_v1140_present, 1)); + if (mbms_sai_inter_freq_list_v1140_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mbms_sai_inter_freq_list_v1140, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbms_intra_freq_carrier_type_r14_present, 1)); + HANDLE_CODE(bref.pack(mbms_inter_freq_carrier_type_list_r14_present, 1)); + if (mbms_intra_freq_carrier_type_r14_present) { + HANDLE_CODE(mbms_intra_freq_carrier_type_r14->pack(bref)); + } + if (mbms_inter_freq_carrier_type_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mbms_inter_freq_carrier_type_list_r14, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type15_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(mbms_sai_intra_freq_r11_present, 1)); + HANDLE_CODE(bref.unpack(mbms_sai_inter_freq_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (mbms_sai_intra_freq_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbms_sai_intra_freq_r11, bref, 1, 64, UnalignedIntegerPacker(0, 65535))); + } + if (mbms_sai_inter_freq_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbms_sai_inter_freq_list_r11, bref, 1, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbms_sai_inter_freq_list_v1140_present, 1)); + if (mbms_sai_inter_freq_list_v1140_present) { + mbms_sai_inter_freq_list_v1140 = make_copy_ptr(mbms_sai_inter_freq_list_v1140_l()); + HANDLE_CODE(unpack_dyn_seq_of(*mbms_sai_inter_freq_list_v1140, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbms_intra_freq_carrier_type_r14_present, 1)); + HANDLE_CODE(bref.unpack(mbms_inter_freq_carrier_type_list_r14_present, 1)); + if (mbms_intra_freq_carrier_type_r14_present) { + mbms_intra_freq_carrier_type_r14 = make_copy_ptr(mbms_carrier_type_r14_s()); + HANDLE_CODE(mbms_intra_freq_carrier_type_r14->unpack(bref)); + } + if (mbms_inter_freq_carrier_type_list_r14_present) { + mbms_inter_freq_carrier_type_list_r14 = make_copy_ptr(mbms_inter_freq_carrier_type_list_r14_l()); + HANDLE_CODE(unpack_dyn_seq_of(*mbms_inter_freq_carrier_type_list_r14, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type15_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbms_sai_intra_freq_r11_present) { + j.start_array("mbms-SAI-IntraFreq-r11"); + for (uint32_t i1 = 0; i1 < mbms_sai_intra_freq_r11.size(); ++i1) { + j.write_int(mbms_sai_intra_freq_r11[i1]); + } + j.end_array(); + } + if (mbms_sai_inter_freq_list_r11_present) { + j.start_array("mbms-SAI-InterFreqList-r11"); + for (uint32_t i1 = 0; i1 < mbms_sai_inter_freq_list_r11.size(); ++i1) { + mbms_sai_inter_freq_list_r11[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (mbms_sai_inter_freq_list_v1140_present) { + j.start_array("mbms-SAI-InterFreqList-v1140"); + for (uint32_t i1 = 0; i1 < mbms_sai_inter_freq_list_v1140->size(); ++i1) { + ((*mbms_sai_inter_freq_list_v1140)[i1]).to_json(j); + } + j.end_array(); + } + if (mbms_intra_freq_carrier_type_r14_present) { + j.write_fieldname("mbms-IntraFreqCarrierType-r14"); + mbms_intra_freq_carrier_type_r14->to_json(j); + } + if (mbms_inter_freq_carrier_type_list_r14_present) { + j.start_array("mbms-InterFreqCarrierTypeList-r14"); + for (uint32_t i1 = 0; i1 < mbms_inter_freq_carrier_type_list_r14->size(); ++i1) { + ((*mbms_inter_freq_carrier_type_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SystemInformationBlockType16-r11 ::= SEQUENCE +sib_type16_r11_s::sib_type16_r11_s() +{ + ext = false; + time_info_r11_present = false; + late_non_crit_ext_present = false; + time_ref_info_r15_present = false; +} +SRSASN_CODE sib_type16_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(time_info_r11_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (time_info_r11_present) { + HANDLE_CODE(bref.pack(time_info_r11.day_light_saving_time_r11_present, 1)); + HANDLE_CODE(bref.pack(time_info_r11.leap_seconds_r11_present, 1)); + HANDLE_CODE(bref.pack(time_info_r11.local_time_offset_r11_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, time_info_r11.time_info_utc_r11, (uint64_t)0, (uint64_t)549755813887)); + if (time_info_r11.day_light_saving_time_r11_present) { + HANDLE_CODE(time_info_r11.day_light_saving_time_r11.pack(bref)); + } + if (time_info_r11.leap_seconds_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, time_info_r11.leap_seconds_r11, (int16_t)-127, (int16_t)128)); + } + if (time_info_r11.local_time_offset_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, time_info_r11.local_time_offset_r11, (int8_t)-63, (int8_t)64)); + } + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(time_ref_info_r15_present != (time_ref_info_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= time_ref_info_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(time_ref_info_r15_present, 1)); + if (time_ref_info_r15_present) { + HANDLE_CODE(time_ref_info_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type16_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(time_info_r11_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (time_info_r11_present) { + HANDLE_CODE(bref.unpack(time_info_r11.day_light_saving_time_r11_present, 1)); + HANDLE_CODE(bref.unpack(time_info_r11.leap_seconds_r11_present, 1)); + HANDLE_CODE(bref.unpack(time_info_r11.local_time_offset_r11_present, 1)); + HANDLE_CODE(unpack_unalign_integer(time_info_r11.time_info_utc_r11, bref, (uint64_t)0, (uint64_t)549755813887)); + if (time_info_r11.day_light_saving_time_r11_present) { + HANDLE_CODE(time_info_r11.day_light_saving_time_r11.unpack(bref)); + } + if (time_info_r11.leap_seconds_r11_present) { + HANDLE_CODE(unpack_unalign_integer(time_info_r11.leap_seconds_r11, bref, (int16_t)-127, (int16_t)128)); + } + if (time_info_r11.local_time_offset_r11_present) { + HANDLE_CODE(unpack_unalign_integer(time_info_r11.local_time_offset_r11, 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_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(time_ref_info_r15_present, 1)); + if (time_ref_info_r15_present) { + time_ref_info_r15 = make_copy_ptr(time_ref_info_r15_s()); + HANDLE_CODE(time_ref_info_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type16_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (time_info_r11_present) { + j.write_fieldname("timeInfo-r11"); + j.start_obj(); + j.write_int("timeInfoUTC-r11", time_info_r11.time_info_utc_r11); + if (time_info_r11.day_light_saving_time_r11_present) { + j.write_str("dayLightSavingTime-r11", time_info_r11.day_light_saving_time_r11.to_string()); + } + if (time_info_r11.leap_seconds_r11_present) { + j.write_int("leapSeconds-r11", time_info_r11.leap_seconds_r11); + } + if (time_info_r11.local_time_offset_r11_present) { + j.write_int("localTimeOffset-r11", time_info_r11.local_time_offset_r11); + } + j.end_obj(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (time_ref_info_r15_present) { + j.write_fieldname("timeReferenceInfo-r15"); + time_ref_info_r15->to_json(j); + } + j.end_obj(); +} + +sib_type16_r11_s::time_info_r11_s_::time_info_r11_s_() +{ + day_light_saving_time_r11_present = false; + leap_seconds_r11_present = false; + local_time_offset_r11_present = false; +} + +// SystemInformationBlockType17-r12 ::= SEQUENCE +sib_type17_r12_s::sib_type17_r12_s() +{ + ext = false; + wlan_offload_info_per_plmn_list_r12_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type17_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(wlan_offload_info_per_plmn_list_r12_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (wlan_offload_info_per_plmn_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_offload_info_per_plmn_list_r12, 1, 6)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type17_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(wlan_offload_info_per_plmn_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (wlan_offload_info_per_plmn_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_offload_info_per_plmn_list_r12, bref, 1, 6)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type17_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_offload_info_per_plmn_list_r12_present) { + j.start_array("wlan-OffloadInfoPerPLMN-List-r12"); + for (uint32_t i1 = 0; i1 < wlan_offload_info_per_plmn_list_r12.size(); ++i1) { + wlan_offload_info_per_plmn_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType18-r12 ::= SEQUENCE +sib_type18_r12_s::sib_type18_r12_s() +{ + ext = false; + comm_cfg_r12_present = false; + late_non_crit_ext_present = false; + comm_tx_pool_normal_common_ext_r13_present = false; + comm_tx_res_uc_req_allowed_r13_present = false; + comm_tx_allow_relay_common_r13_present = false; +} +SRSASN_CODE sib_type18_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(comm_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (comm_cfg_r12_present) { + HANDLE_CODE(bref.pack(comm_cfg_r12.comm_tx_pool_normal_common_r12_present, 1)); + HANDLE_CODE(bref.pack(comm_cfg_r12.comm_tx_pool_exceptional_r12_present, 1)); + HANDLE_CODE(bref.pack(comm_cfg_r12.comm_sync_cfg_r12_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, comm_cfg_r12.comm_rx_pool_r12, 1, 16)); + if (comm_cfg_r12.comm_tx_pool_normal_common_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, comm_cfg_r12.comm_tx_pool_normal_common_r12, 1, 4)); + } + if (comm_cfg_r12.comm_tx_pool_exceptional_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, comm_cfg_r12.comm_tx_pool_exceptional_r12, 1, 4)); + } + if (comm_cfg_r12.comm_sync_cfg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, comm_cfg_r12.comm_sync_cfg_r12, 1, 16)); + } + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(comm_tx_pool_normal_common_ext_r13_present != + (comm_tx_pool_normal_common_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= comm_tx_pool_normal_common_ext_r13_present; + group_flags[0] |= comm_tx_res_uc_req_allowed_r13_present; + group_flags[0] |= comm_tx_allow_relay_common_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(comm_tx_pool_normal_common_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(comm_tx_res_uc_req_allowed_r13_present, 1)); + HANDLE_CODE(bref.pack(comm_tx_allow_relay_common_r13_present, 1)); + if (comm_tx_pool_normal_common_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *comm_tx_pool_normal_common_ext_r13, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type18_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(comm_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (comm_cfg_r12_present) { + HANDLE_CODE(bref.unpack(comm_cfg_r12.comm_tx_pool_normal_common_r12_present, 1)); + HANDLE_CODE(bref.unpack(comm_cfg_r12.comm_tx_pool_exceptional_r12_present, 1)); + HANDLE_CODE(bref.unpack(comm_cfg_r12.comm_sync_cfg_r12_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(comm_cfg_r12.comm_rx_pool_r12, bref, 1, 16)); + if (comm_cfg_r12.comm_tx_pool_normal_common_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(comm_cfg_r12.comm_tx_pool_normal_common_r12, bref, 1, 4)); + } + if (comm_cfg_r12.comm_tx_pool_exceptional_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(comm_cfg_r12.comm_tx_pool_exceptional_r12, bref, 1, 4)); + } + if (comm_cfg_r12.comm_sync_cfg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(comm_cfg_r12.comm_sync_cfg_r12, bref, 1, 16)); + } + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(comm_tx_pool_normal_common_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(comm_tx_res_uc_req_allowed_r13_present, 1)); + HANDLE_CODE(bref.unpack(comm_tx_allow_relay_common_r13_present, 1)); + if (comm_tx_pool_normal_common_ext_r13_present) { + comm_tx_pool_normal_common_ext_r13 = make_copy_ptr(sl_comm_tx_pool_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*comm_tx_pool_normal_common_ext_r13, bref, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type18_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (comm_cfg_r12_present) { + j.write_fieldname("commConfig-r12"); + j.start_obj(); + j.start_array("commRxPool-r12"); + for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_rx_pool_r12.size(); ++i1) { + comm_cfg_r12.comm_rx_pool_r12[i1].to_json(j); + } + j.end_array(); + if (comm_cfg_r12.comm_tx_pool_normal_common_r12_present) { + j.start_array("commTxPoolNormalCommon-r12"); + for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_tx_pool_normal_common_r12.size(); ++i1) { + comm_cfg_r12.comm_tx_pool_normal_common_r12[i1].to_json(j); + } + j.end_array(); + } + if (comm_cfg_r12.comm_tx_pool_exceptional_r12_present) { + j.start_array("commTxPoolExceptional-r12"); + for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_tx_pool_exceptional_r12.size(); ++i1) { + comm_cfg_r12.comm_tx_pool_exceptional_r12[i1].to_json(j); + } + j.end_array(); + } + if (comm_cfg_r12.comm_sync_cfg_r12_present) { + j.start_array("commSyncConfig-r12"); + for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_sync_cfg_r12.size(); ++i1) { + comm_cfg_r12.comm_sync_cfg_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (comm_tx_pool_normal_common_ext_r13_present) { + j.start_array("commTxPoolNormalCommonExt-r13"); + for (uint32_t i1 = 0; i1 < comm_tx_pool_normal_common_ext_r13->size(); ++i1) { + ((*comm_tx_pool_normal_common_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (comm_tx_res_uc_req_allowed_r13_present) { + j.write_str("commTxResourceUC-ReqAllowed-r13", "true"); + } + if (comm_tx_allow_relay_common_r13_present) { + j.write_str("commTxAllowRelayCommon-r13", "true"); + } + j.end_obj(); +} + +sib_type18_r12_s::comm_cfg_r12_s_::comm_cfg_r12_s_() +{ + comm_tx_pool_normal_common_r12_present = false; + comm_tx_pool_exceptional_r12_present = false; + comm_sync_cfg_r12_present = false; +} + +// SystemInformationBlockType19-r12 ::= SEQUENCE +sib_type19_r12_s::sib_type19_r12_s() +{ + ext = false; + disc_cfg_r12_present = false; + disc_inter_freq_list_r12_present = false; + late_non_crit_ext_present = false; + disc_cfg_v1310_present = false; + disc_cfg_relay_r13_present = false; + disc_cfg_ps_minus13_present = false; +} +SRSASN_CODE sib_type19_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(disc_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_inter_freq_list_r12_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (disc_cfg_r12_present) { + HANDLE_CODE(bref.pack(disc_cfg_r12.disc_tx_pool_common_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_cfg_r12.disc_tx_pwr_info_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_cfg_r12.disc_sync_cfg_r12_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, disc_cfg_r12.disc_rx_pool_r12, 1, 16)); + if (disc_cfg_r12.disc_tx_pool_common_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_cfg_r12.disc_tx_pool_common_r12, 1, 4)); + } + if (disc_cfg_r12.disc_tx_pwr_info_r12_present) { + HANDLE_CODE( + pack_fixed_seq_of(bref, &(disc_cfg_r12.disc_tx_pwr_info_r12)[0], disc_cfg_r12.disc_tx_pwr_info_r12.size())); + } + if (disc_cfg_r12.disc_sync_cfg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_cfg_r12.disc_sync_cfg_r12, 1, 16)); + } + } + if (disc_inter_freq_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_inter_freq_list_r12, 1, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(disc_cfg_v1310_present != (disc_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= disc_cfg_v1310_present; + rrc_asn1_warn_assert(disc_cfg_relay_r13_present != (disc_cfg_relay_r13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= disc_cfg_relay_r13_present; + rrc_asn1_warn_assert(disc_cfg_ps_minus13_present != (disc_cfg_ps_minus13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= disc_cfg_ps_minus13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(disc_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(disc_cfg_relay_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_cfg_ps_minus13_present, 1)); + if (disc_cfg_v1310_present) { + HANDLE_CODE(bref.pack(disc_cfg_v1310->disc_inter_freq_list_v1310_present, 1)); + HANDLE_CODE(bref.pack(disc_cfg_v1310->gap_requests_allowed_common_present, 1)); + if (disc_cfg_v1310->disc_inter_freq_list_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_cfg_v1310->disc_inter_freq_list_v1310, 1, 8)); + } + } + if (disc_cfg_relay_r13_present) { + HANDLE_CODE(disc_cfg_relay_r13->relay_ue_cfg_r13.pack(bref)); + HANDLE_CODE(disc_cfg_relay_r13->remote_ue_cfg_r13.pack(bref)); + } + if (disc_cfg_ps_minus13_present) { + HANDLE_CODE(bref.pack(disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, disc_cfg_ps_minus13->disc_rx_pool_ps_r13, 1, 16)); + if (disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13, 1, 4)); + } + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type19_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(disc_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_inter_freq_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (disc_cfg_r12_present) { + HANDLE_CODE(bref.unpack(disc_cfg_r12.disc_tx_pool_common_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_cfg_r12.disc_tx_pwr_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_cfg_r12.disc_sync_cfg_r12_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(disc_cfg_r12.disc_rx_pool_r12, bref, 1, 16)); + if (disc_cfg_r12.disc_tx_pool_common_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_cfg_r12.disc_tx_pool_common_r12, bref, 1, 4)); + } + if (disc_cfg_r12.disc_tx_pwr_info_r12_present) { + HANDLE_CODE( + unpack_fixed_seq_of(&(disc_cfg_r12.disc_tx_pwr_info_r12)[0], bref, disc_cfg_r12.disc_tx_pwr_info_r12.size())); + } + if (disc_cfg_r12.disc_sync_cfg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_cfg_r12.disc_sync_cfg_r12, bref, 1, 16)); + } + } + if (disc_inter_freq_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_inter_freq_list_r12, bref, 1, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(disc_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(disc_cfg_relay_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_cfg_ps_minus13_present, 1)); + if (disc_cfg_v1310_present) { + disc_cfg_v1310 = make_copy_ptr(disc_cfg_v1310_s_()); + HANDLE_CODE(bref.unpack(disc_cfg_v1310->disc_inter_freq_list_v1310_present, 1)); + HANDLE_CODE(bref.unpack(disc_cfg_v1310->gap_requests_allowed_common_present, 1)); + if (disc_cfg_v1310->disc_inter_freq_list_v1310_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_cfg_v1310->disc_inter_freq_list_v1310, bref, 1, 8)); + } + } + if (disc_cfg_relay_r13_present) { + disc_cfg_relay_r13 = make_copy_ptr(disc_cfg_relay_r13_s_()); + HANDLE_CODE(disc_cfg_relay_r13->relay_ue_cfg_r13.unpack(bref)); + HANDLE_CODE(disc_cfg_relay_r13->remote_ue_cfg_r13.unpack(bref)); + } + if (disc_cfg_ps_minus13_present) { + disc_cfg_ps_minus13 = make_copy_ptr(disc_cfg_ps_minus13_s_()); + HANDLE_CODE(bref.unpack(disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(disc_cfg_ps_minus13->disc_rx_pool_ps_r13, bref, 1, 16)); + if (disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13, bref, 1, 4)); + } + } + } + } + return SRSASN_SUCCESS; +} +void sib_type19_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_cfg_r12_present) { + j.write_fieldname("discConfig-r12"); + j.start_obj(); + j.start_array("discRxPool-r12"); + for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_rx_pool_r12.size(); ++i1) { + disc_cfg_r12.disc_rx_pool_r12[i1].to_json(j); + } + j.end_array(); + if (disc_cfg_r12.disc_tx_pool_common_r12_present) { + j.start_array("discTxPoolCommon-r12"); + for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_tx_pool_common_r12.size(); ++i1) { + disc_cfg_r12.disc_tx_pool_common_r12[i1].to_json(j); + } + j.end_array(); + } + if (disc_cfg_r12.disc_tx_pwr_info_r12_present) { + j.start_array("discTxPowerInfo-r12"); + for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_tx_pwr_info_r12.size(); ++i1) { + disc_cfg_r12.disc_tx_pwr_info_r12[i1].to_json(j); + } + j.end_array(); + } + if (disc_cfg_r12.disc_sync_cfg_r12_present) { + j.start_array("discSyncConfig-r12"); + for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_sync_cfg_r12.size(); ++i1) { + disc_cfg_r12.disc_sync_cfg_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (disc_inter_freq_list_r12_present) { + j.start_array("discInterFreqList-r12"); + for (uint32_t i1 = 0; i1 < disc_inter_freq_list_r12.size(); ++i1) { + disc_inter_freq_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (disc_cfg_v1310_present) { + j.write_fieldname("discConfig-v1310"); + j.start_obj(); + if (disc_cfg_v1310->disc_inter_freq_list_v1310_present) { + j.start_array("discInterFreqList-v1310"); + for (uint32_t i1 = 0; i1 < disc_cfg_v1310->disc_inter_freq_list_v1310.size(); ++i1) { + disc_cfg_v1310->disc_inter_freq_list_v1310[i1].to_json(j); + } + j.end_array(); + } + if (disc_cfg_v1310->gap_requests_allowed_common_present) { + j.write_str("gapRequestsAllowedCommon", "true"); + } + j.end_obj(); + } + if (disc_cfg_relay_r13_present) { + j.write_fieldname("discConfigRelay-r13"); + j.start_obj(); + j.write_fieldname("relayUE-Config-r13"); + disc_cfg_relay_r13->relay_ue_cfg_r13.to_json(j); + j.write_fieldname("remoteUE-Config-r13"); + disc_cfg_relay_r13->remote_ue_cfg_r13.to_json(j); + j.end_obj(); + } + if (disc_cfg_ps_minus13_present) { + j.write_fieldname("discConfigPS-13"); + j.start_obj(); + j.start_array("discRxPoolPS-r13"); + for (uint32_t i1 = 0; i1 < disc_cfg_ps_minus13->disc_rx_pool_ps_r13.size(); ++i1) { + disc_cfg_ps_minus13->disc_rx_pool_ps_r13[i1].to_json(j); + } + j.end_array(); + if (disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13_present) { + j.start_array("discTxPoolPS-Common-r13"); + for (uint32_t i1 = 0; i1 < disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13.size(); ++i1) { + disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.end_obj(); +} + +sib_type19_r12_s::disc_cfg_r12_s_::disc_cfg_r12_s_() +{ + disc_tx_pool_common_r12_present = false; + disc_tx_pwr_info_r12_present = false; + disc_sync_cfg_r12_present = false; +} + +sib_type19_r12_s::disc_cfg_v1310_s_::disc_cfg_v1310_s_() +{ + disc_inter_freq_list_v1310_present = false; + gap_requests_allowed_common_present = false; +} + +sib_type19_r12_s::disc_cfg_ps_minus13_s_::disc_cfg_ps_minus13_s_() +{ + disc_tx_pool_ps_common_r13_present = false; +} + +// SystemInformationBlockType2 ::= SEQUENCE +sib_type2_s::sib_type2_s() +{ + ext = false; + ac_barr_info_present = false; + mbsfn_sf_cfg_list_present = false; + late_non_crit_ext_present = false; + ssac_barr_for_mmtel_voice_r9_present = false; + ssac_barr_for_mmtel_video_r9_present = false; + ac_barr_for_csfb_r10_present = false; + ac_barr_skip_for_mmtel_voice_r12_present = false; + ac_barr_skip_for_mmtel_video_r12_present = false; + ac_barr_skip_for_sms_r12_present = false; + ac_barr_per_plmn_list_r12_present = false; + voice_service_cause_ind_r12_present = false; + acdc_barr_for_common_r13_present = false; + acdc_barr_per_plmn_list_r13_present = false; + udt_restricting_for_common_r13_present = false; + udt_restricting_per_plmn_list_r13_present = false; + c_io_t_eps_optim_info_r13_present = false; + use_full_resume_id_r13_present = false; + unicast_freq_hop_ind_r13_present = false; + mbsfn_sf_cfg_list_v1430_present = false; + video_service_cause_ind_r14_present = false; + plmn_info_list_r15_present = false; + cp_edt_r15_present = false; + up_edt_r15_present = false; + idle_mode_meass_r15_present = false; + reduced_cp_latency_enabled_r15_present = false; +} +SRSASN_CODE sib_type2_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ac_barr_info_present, 1)); + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_present, 1)); + + if (ac_barr_info_present) { + HANDLE_CODE(bref.pack(ac_barr_info.ac_barr_for_mo_sig_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_info.ac_barr_for_mo_data_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_info.ac_barr_for_emergency, 1)); + if (ac_barr_info.ac_barr_for_mo_sig_present) { + HANDLE_CODE(ac_barr_info.ac_barr_for_mo_sig.pack(bref)); + } + if (ac_barr_info.ac_barr_for_mo_data_present) { + HANDLE_CODE(ac_barr_info.ac_barr_for_mo_data.pack(bref)); + } + } + HANDLE_CODE(rr_cfg_common.pack(bref)); + HANDLE_CODE(ue_timers_and_consts.pack(bref)); + HANDLE_CODE(bref.pack(freq_info.ul_carrier_freq_present, 1)); + HANDLE_CODE(bref.pack(freq_info.ul_bw_present, 1)); + if (freq_info.ul_carrier_freq_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_info.ul_carrier_freq, (uint16_t)0, (uint16_t)65535)); + } + if (freq_info.ul_bw_present) { + HANDLE_CODE(pack_enum(bref, freq_info.ul_bw)); + } + HANDLE_CODE(pack_unalign_integer(bref, freq_info.add_spec_emission, (uint8_t)1, (uint8_t)32)); + if (mbsfn_sf_cfg_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_sf_cfg_list, 1, 8)); + } + HANDLE_CODE(pack_enum(bref, time_align_timer_common)); + + if (ext) { + ext_groups_header group_flags(10, 1); + rrc_asn1_warn_assert(ssac_barr_for_mmtel_voice_r9_present != (ssac_barr_for_mmtel_voice_r9.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= ssac_barr_for_mmtel_voice_r9_present; + rrc_asn1_warn_assert(ssac_barr_for_mmtel_video_r9_present != (ssac_barr_for_mmtel_video_r9.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= ssac_barr_for_mmtel_video_r9_present; + rrc_asn1_warn_assert(ac_barr_for_csfb_r10_present != (ac_barr_for_csfb_r10.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= ac_barr_for_csfb_r10_present; + group_flags[2] |= ac_barr_skip_for_mmtel_voice_r12_present; + group_flags[2] |= ac_barr_skip_for_mmtel_video_r12_present; + group_flags[2] |= ac_barr_skip_for_sms_r12_present; + rrc_asn1_warn_assert(ac_barr_per_plmn_list_r12_present != (ac_barr_per_plmn_list_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= ac_barr_per_plmn_list_r12_present; + group_flags[3] |= voice_service_cause_ind_r12_present; + rrc_asn1_warn_assert(acdc_barr_for_common_r13_present != (acdc_barr_for_common_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= acdc_barr_for_common_r13_present; + rrc_asn1_warn_assert(acdc_barr_per_plmn_list_r13_present != (acdc_barr_per_plmn_list_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= acdc_barr_per_plmn_list_r13_present; + rrc_asn1_warn_assert(udt_restricting_for_common_r13_present != (udt_restricting_for_common_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= udt_restricting_for_common_r13_present; + rrc_asn1_warn_assert(udt_restricting_per_plmn_list_r13_present != (udt_restricting_per_plmn_list_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= udt_restricting_per_plmn_list_r13_present; + rrc_asn1_warn_assert(c_io_t_eps_optim_info_r13_present != (c_io_t_eps_optim_info_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= c_io_t_eps_optim_info_r13_present; + group_flags[5] |= use_full_resume_id_r13_present; + group_flags[6] |= unicast_freq_hop_ind_r13_present; + rrc_asn1_warn_assert(mbsfn_sf_cfg_list_v1430_present != (mbsfn_sf_cfg_list_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= mbsfn_sf_cfg_list_v1430_present; + group_flags[7] |= video_service_cause_ind_r14_present; + rrc_asn1_warn_assert(plmn_info_list_r15_present != (plmn_info_list_r15.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= plmn_info_list_r15_present; + group_flags[9] |= cp_edt_r15_present; + group_flags[9] |= up_edt_r15_present; + group_flags[9] |= idle_mode_meass_r15_present; + group_flags[9] |= reduced_cp_latency_enabled_r15_present; + group_flags.pack_nof_groups(bref); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + group_flags.pack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ssac_barr_for_mmtel_voice_r9_present, 1)); + HANDLE_CODE(bref.pack(ssac_barr_for_mmtel_video_r9_present, 1)); + if (ssac_barr_for_mmtel_voice_r9_present) { + HANDLE_CODE(ssac_barr_for_mmtel_voice_r9->pack(bref)); + } + if (ssac_barr_for_mmtel_video_r9_present) { + HANDLE_CODE(ssac_barr_for_mmtel_video_r9->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ac_barr_for_csfb_r10_present, 1)); + if (ac_barr_for_csfb_r10_present) { + HANDLE_CODE(ac_barr_for_csfb_r10->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ac_barr_skip_for_mmtel_voice_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_skip_for_mmtel_video_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_skip_for_sms_r12_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_per_plmn_list_r12_present, 1)); + if (ac_barr_per_plmn_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ac_barr_per_plmn_list_r12, 1, 6)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(voice_service_cause_ind_r12_present, 1)); + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(acdc_barr_for_common_r13_present, 1)); + HANDLE_CODE(bref.pack(acdc_barr_per_plmn_list_r13_present, 1)); + if (acdc_barr_for_common_r13_present) { + HANDLE_CODE(acdc_barr_for_common_r13->pack(bref)); + } + if (acdc_barr_per_plmn_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *acdc_barr_per_plmn_list_r13, 1, 6)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(udt_restricting_for_common_r13_present, 1)); + HANDLE_CODE(bref.pack(udt_restricting_per_plmn_list_r13_present, 1)); + HANDLE_CODE(bref.pack(c_io_t_eps_optim_info_r13_present, 1)); + HANDLE_CODE(bref.pack(use_full_resume_id_r13_present, 1)); + if (udt_restricting_for_common_r13_present) { + HANDLE_CODE(udt_restricting_for_common_r13->pack(bref)); + } + if (udt_restricting_per_plmn_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *udt_restricting_per_plmn_list_r13, 1, 6)); + } + if (c_io_t_eps_optim_info_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *c_io_t_eps_optim_info_r13, 1, 6)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(unicast_freq_hop_ind_r13_present, 1)); + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_v1430_present, 1)); + HANDLE_CODE(bref.pack(video_service_cause_ind_r14_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mbsfn_sf_cfg_list_v1430, 1, 8)); + } + } + if (group_flags[8]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(plmn_info_list_r15_present, 1)); + if (plmn_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *plmn_info_list_r15, 1, 6)); + } + } + if (group_flags[9]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cp_edt_r15_present, 1)); + HANDLE_CODE(bref.pack(up_edt_r15_present, 1)); + HANDLE_CODE(bref.pack(idle_mode_meass_r15_present, 1)); + HANDLE_CODE(bref.pack(reduced_cp_latency_enabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type2_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ac_barr_info_present, 1)); + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_present, 1)); + + if (ac_barr_info_present) { + HANDLE_CODE(bref.unpack(ac_barr_info.ac_barr_for_mo_sig_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_info.ac_barr_for_mo_data_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_info.ac_barr_for_emergency, 1)); + if (ac_barr_info.ac_barr_for_mo_sig_present) { + HANDLE_CODE(ac_barr_info.ac_barr_for_mo_sig.unpack(bref)); + } + if (ac_barr_info.ac_barr_for_mo_data_present) { + HANDLE_CODE(ac_barr_info.ac_barr_for_mo_data.unpack(bref)); + } + } + HANDLE_CODE(rr_cfg_common.unpack(bref)); + HANDLE_CODE(ue_timers_and_consts.unpack(bref)); + HANDLE_CODE(bref.unpack(freq_info.ul_carrier_freq_present, 1)); + HANDLE_CODE(bref.unpack(freq_info.ul_bw_present, 1)); + if (freq_info.ul_carrier_freq_present) { + HANDLE_CODE(unpack_unalign_integer(freq_info.ul_carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + } + if (freq_info.ul_bw_present) { + HANDLE_CODE(unpack_enum(freq_info.ul_bw, bref)); + } + HANDLE_CODE(unpack_unalign_integer(freq_info.add_spec_emission, bref, (uint8_t)1, (uint8_t)32)); + if (mbsfn_sf_cfg_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbsfn_sf_cfg_list, bref, 1, 8)); + } + HANDLE_CODE(unpack_enum(time_align_timer_common, bref)); + + if (ext) { + ext_groups_header group_flags(10, 1); + group_flags.unpack_nof_groups(bref); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + group_flags.unpack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ssac_barr_for_mmtel_voice_r9_present, 1)); + HANDLE_CODE(bref.unpack(ssac_barr_for_mmtel_video_r9_present, 1)); + if (ssac_barr_for_mmtel_voice_r9_present) { + ssac_barr_for_mmtel_voice_r9 = make_copy_ptr(ac_barr_cfg_s()); + HANDLE_CODE(ssac_barr_for_mmtel_voice_r9->unpack(bref)); + } + if (ssac_barr_for_mmtel_video_r9_present) { + ssac_barr_for_mmtel_video_r9 = make_copy_ptr(ac_barr_cfg_s()); + HANDLE_CODE(ssac_barr_for_mmtel_video_r9->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ac_barr_for_csfb_r10_present, 1)); + if (ac_barr_for_csfb_r10_present) { + ac_barr_for_csfb_r10 = make_copy_ptr(ac_barr_cfg_s()); + HANDLE_CODE(ac_barr_for_csfb_r10->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ac_barr_skip_for_mmtel_voice_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_skip_for_mmtel_video_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_skip_for_sms_r12_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_per_plmn_list_r12_present, 1)); + if (ac_barr_per_plmn_list_r12_present) { + ac_barr_per_plmn_list_r12 = make_copy_ptr(ac_barr_per_plmn_list_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*ac_barr_per_plmn_list_r12, bref, 1, 6)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(voice_service_cause_ind_r12_present, 1)); + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(acdc_barr_for_common_r13_present, 1)); + HANDLE_CODE(bref.unpack(acdc_barr_per_plmn_list_r13_present, 1)); + if (acdc_barr_for_common_r13_present) { + acdc_barr_for_common_r13 = make_copy_ptr(acdc_barr_for_common_r13_s()); + HANDLE_CODE(acdc_barr_for_common_r13->unpack(bref)); + } + if (acdc_barr_per_plmn_list_r13_present) { + acdc_barr_per_plmn_list_r13 = make_copy_ptr(acdc_barr_per_plmn_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*acdc_barr_per_plmn_list_r13, bref, 1, 6)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(udt_restricting_for_common_r13_present, 1)); + HANDLE_CODE(bref.unpack(udt_restricting_per_plmn_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(c_io_t_eps_optim_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(use_full_resume_id_r13_present, 1)); + if (udt_restricting_for_common_r13_present) { + udt_restricting_for_common_r13 = make_copy_ptr(udt_restricting_r13_s()); + HANDLE_CODE(udt_restricting_for_common_r13->unpack(bref)); + } + if (udt_restricting_per_plmn_list_r13_present) { + udt_restricting_per_plmn_list_r13 = make_copy_ptr(udt_restricting_per_plmn_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*udt_restricting_per_plmn_list_r13, bref, 1, 6)); + } + if (c_io_t_eps_optim_info_r13_present) { + c_io_t_eps_optim_info_r13 = make_copy_ptr(ciot_eps_optim_info_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*c_io_t_eps_optim_info_r13, bref, 1, 6)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(unicast_freq_hop_ind_r13_present, 1)); + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_v1430_present, 1)); + HANDLE_CODE(bref.unpack(video_service_cause_ind_r14_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + mbsfn_sf_cfg_list_v1430 = make_copy_ptr(mbsfn_sf_cfg_list_v1430_l()); + HANDLE_CODE(unpack_dyn_seq_of(*mbsfn_sf_cfg_list_v1430, bref, 1, 8)); + } + } + if (group_flags[8]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(plmn_info_list_r15_present, 1)); + if (plmn_info_list_r15_present) { + plmn_info_list_r15 = make_copy_ptr(plmn_info_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*plmn_info_list_r15, bref, 1, 6)); + } + } + if (group_flags[9]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cp_edt_r15_present, 1)); + HANDLE_CODE(bref.unpack(up_edt_r15_present, 1)); + HANDLE_CODE(bref.unpack(idle_mode_meass_r15_present, 1)); + HANDLE_CODE(bref.unpack(reduced_cp_latency_enabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sib_type2_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ac_barr_info_present) { + j.write_fieldname("ac-BarringInfo"); + j.start_obj(); + j.write_bool("ac-BarringForEmergency", ac_barr_info.ac_barr_for_emergency); + if (ac_barr_info.ac_barr_for_mo_sig_present) { + j.write_fieldname("ac-BarringForMO-Signalling"); + ac_barr_info.ac_barr_for_mo_sig.to_json(j); + } + if (ac_barr_info.ac_barr_for_mo_data_present) { + j.write_fieldname("ac-BarringForMO-Data"); + ac_barr_info.ac_barr_for_mo_data.to_json(j); + } + j.end_obj(); + } + j.write_fieldname("radioResourceConfigCommon"); + rr_cfg_common.to_json(j); + j.write_fieldname("ue-TimersAndConstants"); + ue_timers_and_consts.to_json(j); + j.write_fieldname("freqInfo"); + j.start_obj(); + if (freq_info.ul_carrier_freq_present) { + j.write_int("ul-CarrierFreq", freq_info.ul_carrier_freq); + } + if (freq_info.ul_bw_present) { + j.write_str("ul-Bandwidth", freq_info.ul_bw.to_string()); + } + j.write_int("additionalSpectrumEmission", freq_info.add_spec_emission); + j.end_obj(); + if (mbsfn_sf_cfg_list_present) { + j.start_array("mbsfn-SubframeConfigList"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list.size(); ++i1) { + mbsfn_sf_cfg_list[i1].to_json(j); + } + j.end_array(); + } + j.write_str("timeAlignmentTimerCommon", time_align_timer_common.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ssac_barr_for_mmtel_voice_r9_present) { + j.write_fieldname("ssac-BarringForMMTEL-Voice-r9"); + ssac_barr_for_mmtel_voice_r9->to_json(j); + } + if (ssac_barr_for_mmtel_video_r9_present) { + j.write_fieldname("ssac-BarringForMMTEL-Video-r9"); + ssac_barr_for_mmtel_video_r9->to_json(j); + } + if (ac_barr_for_csfb_r10_present) { + j.write_fieldname("ac-BarringForCSFB-r10"); + ac_barr_for_csfb_r10->to_json(j); + } + if (ac_barr_skip_for_mmtel_voice_r12_present) { + j.write_str("ac-BarringSkipForMMTELVoice-r12", "true"); + } + if (ac_barr_skip_for_mmtel_video_r12_present) { + j.write_str("ac-BarringSkipForMMTELVideo-r12", "true"); + } + if (ac_barr_skip_for_sms_r12_present) { + j.write_str("ac-BarringSkipForSMS-r12", "true"); + } + if (ac_barr_per_plmn_list_r12_present) { + j.start_array("ac-BarringPerPLMN-List-r12"); + for (uint32_t i1 = 0; i1 < ac_barr_per_plmn_list_r12->size(); ++i1) { + ((*ac_barr_per_plmn_list_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (voice_service_cause_ind_r12_present) { + j.write_str("voiceServiceCauseIndication-r12", "true"); + } + if (acdc_barr_for_common_r13_present) { + j.write_fieldname("acdc-BarringForCommon-r13"); + acdc_barr_for_common_r13->to_json(j); + } + if (acdc_barr_per_plmn_list_r13_present) { + j.start_array("acdc-BarringPerPLMN-List-r13"); + for (uint32_t i1 = 0; i1 < acdc_barr_per_plmn_list_r13->size(); ++i1) { + ((*acdc_barr_per_plmn_list_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (udt_restricting_for_common_r13_present) { + j.write_fieldname("udt-RestrictingForCommon-r13"); + udt_restricting_for_common_r13->to_json(j); + } + if (udt_restricting_per_plmn_list_r13_present) { + j.start_array("udt-RestrictingPerPLMN-List-r13"); + for (uint32_t i1 = 0; i1 < udt_restricting_per_plmn_list_r13->size(); ++i1) { + ((*udt_restricting_per_plmn_list_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (c_io_t_eps_optim_info_r13_present) { + j.start_array("cIoT-EPS-OptimisationInfo-r13"); + for (uint32_t i1 = 0; i1 < c_io_t_eps_optim_info_r13->size(); ++i1) { + ((*c_io_t_eps_optim_info_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (use_full_resume_id_r13_present) { + j.write_str("useFullResumeID-r13", "true"); + } + if (unicast_freq_hop_ind_r13_present) { + j.write_str("unicastFreqHoppingInd-r13", "true"); + } + if (mbsfn_sf_cfg_list_v1430_present) { + j.start_array("mbsfn-SubframeConfigList-v1430"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { + ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + } + j.end_array(); + } + if (video_service_cause_ind_r14_present) { + j.write_str("videoServiceCauseIndication-r14", "true"); + } + if (plmn_info_list_r15_present) { + j.start_array("plmn-InfoList-r15"); + for (uint32_t i1 = 0; i1 < plmn_info_list_r15->size(); ++i1) { + ((*plmn_info_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (cp_edt_r15_present) { + j.write_str("cp-EDT-r15", "true"); + } + if (up_edt_r15_present) { + j.write_str("up-EDT-r15", "true"); + } + if (idle_mode_meass_r15_present) { + j.write_str("idleModeMeasurements-r15", "true"); + } + if (reduced_cp_latency_enabled_r15_present) { + j.write_str("reducedCP-LatencyEnabled-r15", "true"); + } + j.end_obj(); +} + +sib_type2_s::ac_barr_info_s_::ac_barr_info_s_() +{ + ac_barr_for_mo_sig_present = false; + ac_barr_for_mo_data_present = false; +} + +sib_type2_s::freq_info_s_::freq_info_s_() +{ + ul_carrier_freq_present = false; + ul_bw_present = false; +} + +// SystemInformationBlockType20-r13 ::= SEQUENCE +sib_type20_r13_s::sib_type20_r13_s() +{ + ext = false; + sc_mcch_dur_r13_present = false; + late_non_crit_ext_present = false; + br_bcch_cfg_r14_present = false; + sc_mcch_sched_info_r14_present = false; + pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present = false; + pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present = false; + sc_mcch_repeat_period_v1470_present = false; + sc_mcch_mod_period_v1470_present = false; +} +SRSASN_CODE sib_type20_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sc_mcch_dur_r13_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, sc_mcch_repeat_period_r13)); + HANDLE_CODE(pack_unalign_integer(bref, sc_mcch_offset_r13, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(pack_unalign_integer(bref, sc_mcch_first_sf_r13, (uint8_t)0, (uint8_t)9)); + if (sc_mcch_dur_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, sc_mcch_dur_r13, (uint8_t)2, (uint8_t)9)); + } + HANDLE_CODE(pack_enum(bref, sc_mcch_mod_period_r13)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(br_bcch_cfg_r14_present != (br_bcch_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= br_bcch_cfg_r14_present; + rrc_asn1_warn_assert(sc_mcch_sched_info_r14_present != (sc_mcch_sched_info_r14.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= sc_mcch_sched_info_r14_present; + group_flags[0] |= pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present; + group_flags[0] |= pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present; + group_flags[1] |= sc_mcch_repeat_period_v1470_present; + group_flags[1] |= sc_mcch_mod_period_v1470_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(br_bcch_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(sc_mcch_sched_info_r14_present, 1)); + HANDLE_CODE(bref.pack(pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present, 1)); + HANDLE_CODE(bref.pack(pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present, 1)); + if (br_bcch_cfg_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, br_bcch_cfg_r14->mpdcch_nb_sc_mcch_r14, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_enum(bref, br_bcch_cfg_r14->mpdcch_num_repeat_sc_mcch_r14)); + HANDLE_CODE(br_bcch_cfg_r14->mpdcch_start_sf_sc_mcch_r14.pack(bref)); + HANDLE_CODE(pack_enum(bref, br_bcch_cfg_r14->mpdcch_pdsch_hop_cfg_sc_mcch_r14)); + HANDLE_CODE( + pack_unalign_integer(bref, br_bcch_cfg_r14->sc_mcch_carrier_freq_r14, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_unalign_integer(bref, br_bcch_cfg_r14->sc_mcch_offset_br_r14, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(pack_enum(bref, br_bcch_cfg_r14->sc_mcch_repeat_period_br_r14)); + HANDLE_CODE(pack_enum(bref, br_bcch_cfg_r14->sc_mcch_mod_period_br_r14)); + } + if (sc_mcch_sched_info_r14_present) { + HANDLE_CODE(sc_mcch_sched_info_r14->pack(bref)); + } + if (pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present) { + HANDLE_CODE(pack_enum(bref, pdsch_max_num_repeat_cemode_a_sc_mtch_r14)); + } + if (pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present) { + HANDLE_CODE(pack_enum(bref, pdsch_max_num_repeat_cemode_b_sc_mtch_r14)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sc_mcch_repeat_period_v1470_present, 1)); + HANDLE_CODE(bref.pack(sc_mcch_mod_period_v1470_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type20_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sc_mcch_dur_r13_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(sc_mcch_repeat_period_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(sc_mcch_offset_r13, bref, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(unpack_unalign_integer(sc_mcch_first_sf_r13, bref, (uint8_t)0, (uint8_t)9)); + if (sc_mcch_dur_r13_present) { + HANDLE_CODE(unpack_unalign_integer(sc_mcch_dur_r13, bref, (uint8_t)2, (uint8_t)9)); + } + HANDLE_CODE(unpack_enum(sc_mcch_mod_period_r13, bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(br_bcch_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(sc_mcch_sched_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present, 1)); + if (br_bcch_cfg_r14_present) { + br_bcch_cfg_r14 = make_copy_ptr(br_bcch_cfg_r14_s_()); + HANDLE_CODE(unpack_unalign_integer(br_bcch_cfg_r14->mpdcch_nb_sc_mcch_r14, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_enum(br_bcch_cfg_r14->mpdcch_num_repeat_sc_mcch_r14, bref)); + HANDLE_CODE(br_bcch_cfg_r14->mpdcch_start_sf_sc_mcch_r14.unpack(bref)); + HANDLE_CODE(unpack_enum(br_bcch_cfg_r14->mpdcch_pdsch_hop_cfg_sc_mcch_r14, bref)); + HANDLE_CODE( + unpack_unalign_integer(br_bcch_cfg_r14->sc_mcch_carrier_freq_r14, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_unalign_integer(br_bcch_cfg_r14->sc_mcch_offset_br_r14, bref, (uint8_t)0, (uint8_t)10)); + HANDLE_CODE(unpack_enum(br_bcch_cfg_r14->sc_mcch_repeat_period_br_r14, bref)); + HANDLE_CODE(unpack_enum(br_bcch_cfg_r14->sc_mcch_mod_period_br_r14, bref)); + } + if (sc_mcch_sched_info_r14_present) { + sc_mcch_sched_info_r14 = make_copy_ptr(sc_mcch_sched_info_r14_s()); + HANDLE_CODE(sc_mcch_sched_info_r14->unpack(bref)); + } + if (pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present) { + HANDLE_CODE(unpack_enum(pdsch_max_num_repeat_cemode_a_sc_mtch_r14, bref)); + } + if (pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present) { + HANDLE_CODE(unpack_enum(pdsch_max_num_repeat_cemode_b_sc_mtch_r14, bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sc_mcch_repeat_period_v1470_present, 1)); + HANDLE_CODE(bref.unpack(sc_mcch_mod_period_v1470_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sib_type20_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sc-mcch-RepetitionPeriod-r13", sc_mcch_repeat_period_r13.to_string()); + j.write_int("sc-mcch-Offset-r13", sc_mcch_offset_r13); + j.write_int("sc-mcch-FirstSubframe-r13", sc_mcch_first_sf_r13); + if (sc_mcch_dur_r13_present) { + j.write_int("sc-mcch-duration-r13", sc_mcch_dur_r13); + } + j.write_str("sc-mcch-ModificationPeriod-r13", sc_mcch_mod_period_r13.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (br_bcch_cfg_r14_present) { + j.write_fieldname("br-BCCH-Config-r14"); + j.start_obj(); + j.write_str("dummy", "rf1"); + j.write_str("dummy2", "rf1"); + j.write_int("mpdcch-Narrowband-SC-MCCH-r14", br_bcch_cfg_r14->mpdcch_nb_sc_mcch_r14); + j.write_str("mpdcch-NumRepetition-SC-MCCH-r14", br_bcch_cfg_r14->mpdcch_num_repeat_sc_mcch_r14.to_string()); + j.write_fieldname("mpdcch-StartSF-SC-MCCH-r14"); + br_bcch_cfg_r14->mpdcch_start_sf_sc_mcch_r14.to_json(j); + j.write_str("mpdcch-PDSCH-HoppingConfig-SC-MCCH-r14", + br_bcch_cfg_r14->mpdcch_pdsch_hop_cfg_sc_mcch_r14.to_string()); + j.write_int("sc-mcch-CarrierFreq-r14", br_bcch_cfg_r14->sc_mcch_carrier_freq_r14); + j.write_int("sc-mcch-Offset-BR-r14", br_bcch_cfg_r14->sc_mcch_offset_br_r14); + j.write_str("sc-mcch-RepetitionPeriod-BR-r14", br_bcch_cfg_r14->sc_mcch_repeat_period_br_r14.to_string()); + j.write_str("sc-mcch-ModificationPeriod-BR-r14", br_bcch_cfg_r14->sc_mcch_mod_period_br_r14.to_string()); + j.end_obj(); + } + if (sc_mcch_sched_info_r14_present) { + j.write_fieldname("sc-mcch-SchedulingInfo-r14"); + sc_mcch_sched_info_r14->to_json(j); + } + if (pdsch_max_num_repeat_cemode_a_sc_mtch_r14_present) { + j.write_str("pdsch-maxNumRepetitionCEmodeA-SC-MTCH-r14", pdsch_max_num_repeat_cemode_a_sc_mtch_r14.to_string()); + } + if (pdsch_max_num_repeat_cemode_b_sc_mtch_r14_present) { + j.write_str("pdsch-maxNumRepetitionCEmodeB-SC-MTCH-r14", pdsch_max_num_repeat_cemode_b_sc_mtch_r14.to_string()); + } + if (sc_mcch_repeat_period_v1470_present) { + j.write_str("sc-mcch-RepetitionPeriod-v1470", "rf1"); + } + if (sc_mcch_mod_period_v1470_present) { + j.write_str("sc-mcch-ModificationPeriod-v1470", "rf1"); + } + j.end_obj(); +} + +void sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::destroy_() {} +void sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::mpdcch_start_sf_sc_mcch_r14_c_( + const sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r14: + c.init(other.c.get()); + break; + case types::tdd_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_"); + } +} +sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_& +sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_:: +operator=(const sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r14: + c.set(other.c.get()); + break; + case types::tdd_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_"); + } + + return *this; +} +void sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r14: + j.write_str("fdd-r14", c.get().to_string()); + break; + case types::tdd_r14: + j.write_str("tdd-r14", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r14: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::tdd_r14: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r14: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::tdd_r14: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType21-r14 ::= SEQUENCE +sib_type21_r14_s::sib_type21_r14_s() +{ + ext = false; + sl_v2x_cfg_common_r14_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type21_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_v2x_cfg_common_r14_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (sl_v2x_cfg_common_r14_present) { + HANDLE_CODE(sl_v2x_cfg_common_r14.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type21_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_v2x_cfg_common_r14_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (sl_v2x_cfg_common_r14_present) { + HANDLE_CODE(sl_v2x_cfg_common_r14.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type21_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_v2x_cfg_common_r14_present) { + j.write_fieldname("sl-V2X-ConfigCommon-r14"); + sl_v2x_cfg_common_r14.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType24-r15 ::= SEQUENCE +sib_type24_r15_s::sib_type24_r15_s() +{ + ext = false; + carrier_freq_list_nr_r15_present = false; + t_resel_nr_sf_r15_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type24_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_freq_list_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(t_resel_nr_sf_r15_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (carrier_freq_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freq_list_nr_r15, 1, 8)); + } + HANDLE_CODE(pack_unalign_integer(bref, t_resel_nr_r15, (uint8_t)0, (uint8_t)7)); + if (t_resel_nr_sf_r15_present) { + HANDLE_CODE(t_resel_nr_sf_r15.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type24_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(carrier_freq_list_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_nr_sf_r15_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (carrier_freq_list_nr_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(carrier_freq_list_nr_r15, bref, 1, 8)); + } + HANDLE_CODE(unpack_unalign_integer(t_resel_nr_r15, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_nr_sf_r15_present) { + HANDLE_CODE(t_resel_nr_sf_r15.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type24_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_list_nr_r15_present) { + j.start_array("carrierFreqListNR-r15"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_nr_r15.size(); ++i1) { + carrier_freq_list_nr_r15[i1].to_json(j); + } + j.end_array(); + } + j.write_int("t-ReselectionNR-r15", t_resel_nr_r15); + if (t_resel_nr_sf_r15_present) { + j.write_fieldname("t-ReselectionNR-SF-r15"); + t_resel_nr_sf_r15.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType25-r15 ::= SEQUENCE +sib_type25_r15_s::sib_type25_r15_s() +{ + ext = false; + uac_barr_for_common_r15_present = false; + uac_barr_per_plmn_list_r15_present = false; + uac_ac1_select_assist_info_r15_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type25_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(uac_barr_for_common_r15_present, 1)); + HANDLE_CODE(bref.pack(uac_barr_per_plmn_list_r15_present, 1)); + HANDLE_CODE(bref.pack(uac_ac1_select_assist_info_r15_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (uac_barr_for_common_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_for_common_r15, 1, 63)); + } + if (uac_barr_per_plmn_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_per_plmn_list_r15, 1, 6)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info_set_list_r15, 1, 8)); + if (uac_ac1_select_assist_info_r15_present) { + HANDLE_CODE(uac_ac1_select_assist_info_r15.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type25_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(uac_barr_for_common_r15_present, 1)); + HANDLE_CODE(bref.unpack(uac_barr_per_plmn_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(uac_ac1_select_assist_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (uac_barr_for_common_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_for_common_r15, bref, 1, 63)); + } + if (uac_barr_per_plmn_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_per_plmn_list_r15, bref, 1, 6)); + } + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info_set_list_r15, bref, 1, 8)); + if (uac_ac1_select_assist_info_r15_present) { + HANDLE_CODE(uac_ac1_select_assist_info_r15.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type25_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (uac_barr_for_common_r15_present) { + j.start_array("uac-BarringForCommon-r15"); + for (uint32_t i1 = 0; i1 < uac_barr_for_common_r15.size(); ++i1) { + uac_barr_for_common_r15[i1].to_json(j); + } + j.end_array(); + } + if (uac_barr_per_plmn_list_r15_present) { + j.start_array("uac-BarringPerPLMN-List-r15"); + for (uint32_t i1 = 0; i1 < uac_barr_per_plmn_list_r15.size(); ++i1) { + uac_barr_per_plmn_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.start_array("uac-BarringInfoSetList-r15"); + for (uint32_t i1 = 0; i1 < uac_barr_info_set_list_r15.size(); ++i1) { + uac_barr_info_set_list_r15[i1].to_json(j); + } + j.end_array(); + if (uac_ac1_select_assist_info_r15_present) { + j.write_fieldname("uac-AC1-SelectAssistInfo-r15"); + uac_ac1_select_assist_info_r15.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +void sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::destroy_() +{ + switch (type_) { + case types::individual_plmn_list_r15: + c.destroy(); + break; + default: + break; + } +} +void sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_common_r15: + break; + case types::individual_plmn_list_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_"); + } +} +sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::uac_ac1_select_assist_info_r15_c_( + const sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_common_r15: + c.init(other.c.get()); + break; + case types::individual_plmn_list_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_"); + } +} +sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_& sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_:: + operator=(const sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::plmn_common_r15: + c.set(other.c.get()); + break; + case types::individual_plmn_list_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_"); + } + + return *this; +} +void sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_common_r15: + j.write_str("plmnCommon-r15", c.get().to_string()); + break; + case types::individual_plmn_list_r15: + j.start_array("individualPLMNList-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_str(c.get()[i1].to_string()); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::plmn_common_r15: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::individual_plmn_list_r15: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 2, 6, EnumPacker())); + break; + default: + log_invalid_choice_id(type_, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::plmn_common_r15: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::individual_plmn_list_r15: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 2, 6, EnumPacker())); + break; + default: + log_invalid_choice_id(type_, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType26-r15 ::= SEQUENCE +sib_type26_r15_s::sib_type26_r15_s() +{ + ext = false; + v2x_inter_freq_info_list_r15_present = false; + cbr_pssch_tx_cfg_list_r15_present = false; + v2x_packet_dupl_cfg_r15_present = false; + sync_freq_list_r15_present = false; + slss_tx_multi_freq_r15_present = false; + v2x_freq_sel_cfg_list_r15_present = false; + thresh_s_rssi_cbr_r14_present = false; +} +SRSASN_CODE sib_type26_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(v2x_inter_freq_info_list_r15_present, 1)); + HANDLE_CODE(bref.pack(cbr_pssch_tx_cfg_list_r15_present, 1)); + HANDLE_CODE(bref.pack(v2x_packet_dupl_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(sync_freq_list_r15_present, 1)); + HANDLE_CODE(bref.pack(slss_tx_multi_freq_r15_present, 1)); + HANDLE_CODE(bref.pack(v2x_freq_sel_cfg_list_r15_present, 1)); + HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r14_present, 1)); + + if (v2x_inter_freq_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_inter_freq_info_list_r15, 0, 7)); + } + if (cbr_pssch_tx_cfg_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cbr_pssch_tx_cfg_list_r15, 1, 8)); + } + if (v2x_packet_dupl_cfg_r15_present) { + HANDLE_CODE(v2x_packet_dupl_cfg_r15.pack(bref)); + } + if (sync_freq_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sync_freq_list_r15, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (v2x_freq_sel_cfg_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_freq_sel_cfg_list_r15, 1, 8)); + } + if (thresh_s_rssi_cbr_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_s_rssi_cbr_r14, (uint8_t)0, (uint8_t)45)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type26_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(v2x_inter_freq_info_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(cbr_pssch_tx_cfg_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(v2x_packet_dupl_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(sync_freq_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(slss_tx_multi_freq_r15_present, 1)); + HANDLE_CODE(bref.unpack(v2x_freq_sel_cfg_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r14_present, 1)); + + if (v2x_inter_freq_info_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_inter_freq_info_list_r15, bref, 0, 7)); + } + if (cbr_pssch_tx_cfg_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(cbr_pssch_tx_cfg_list_r15, bref, 1, 8)); + } + if (v2x_packet_dupl_cfg_r15_present) { + HANDLE_CODE(v2x_packet_dupl_cfg_r15.unpack(bref)); + } + if (sync_freq_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(sync_freq_list_r15, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (v2x_freq_sel_cfg_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_freq_sel_cfg_list_r15, bref, 1, 8)); + } + if (thresh_s_rssi_cbr_r14_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_s_rssi_cbr_r14, bref, (uint8_t)0, (uint8_t)45)); + } + + return SRSASN_SUCCESS; +} +void sib_type26_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (v2x_inter_freq_info_list_r15_present) { + j.start_array("v2x-InterFreqInfoList-r15"); + for (uint32_t i1 = 0; i1 < v2x_inter_freq_info_list_r15.size(); ++i1) { + v2x_inter_freq_info_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (cbr_pssch_tx_cfg_list_r15_present) { + j.start_array("cbr-pssch-TxConfigList-r15"); + for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_r15.size(); ++i1) { + cbr_pssch_tx_cfg_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (v2x_packet_dupl_cfg_r15_present) { + j.write_fieldname("v2x-PacketDuplicationConfig-r15"); + v2x_packet_dupl_cfg_r15.to_json(j); + } + if (sync_freq_list_r15_present) { + j.start_array("syncFreqList-r15"); + for (uint32_t i1 = 0; i1 < sync_freq_list_r15.size(); ++i1) { + j.write_int(sync_freq_list_r15[i1]); + } + j.end_array(); + } + if (slss_tx_multi_freq_r15_present) { + j.write_str("slss-TxMultiFreq-r15", "true"); + } + if (v2x_freq_sel_cfg_list_r15_present) { + j.start_array("v2x-FreqSelectionConfigList-r15"); + for (uint32_t i1 = 0; i1 < v2x_freq_sel_cfg_list_r15.size(); ++i1) { + v2x_freq_sel_cfg_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (thresh_s_rssi_cbr_r14_present) { + j.write_int("threshS-RSSI-CBR-r14", thresh_s_rssi_cbr_r14); + } + j.end_obj(); +} + +// SystemInformationBlockType3 ::= SEQUENCE +sib_type3_s::sib_type3_s() +{ + ext = false; + late_non_crit_ext_present = false; + s_intra_search_v920_present = false; + s_non_intra_search_v920_present = false; + q_qual_min_r9_present = false; + thresh_serving_low_q_r9_present = false; + q_qual_min_wb_r11_present = false; + q_qual_min_rsrq_on_all_symbols_r12_present = false; + cell_resel_serving_freq_info_v1310_present = false; + redist_serving_info_r13_present = false; + cell_sel_info_ce_r13_present = false; + t_resel_eutra_ce_r13_present = false; + cell_sel_info_ce1_r13_present = false; + cell_sel_info_ce1_v1360_present = false; + cell_resel_info_common_v1460_present = false; + cell_resel_info_hsdn_r15_present = false; + cell_sel_info_ce_v1530_present = false; + crs_intf_mitig_neigh_cells_ce_r15_present = false; +} +SRSASN_CODE sib_type3_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_resel_info_common.speed_state_resel_pars_present, 1)); + HANDLE_CODE(pack_enum(bref, cell_resel_info_common.q_hyst)); + 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(pack_enum(bref, cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium)); + HANDLE_CODE(pack_enum(bref, cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high)); + } + HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.s_non_intra_search_present, 1)); + if (cell_resel_serving_freq_info.s_non_intra_search_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_serving_freq_info.s_non_intra_search, (uint8_t)0, (uint8_t)31)); + } + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_serving_freq_info.thresh_serving_low, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_serving_freq_info.cell_resel_prio, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(bref.pack(intra_freq_cell_resel_info.p_max_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_cell_resel_info.s_intra_search_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_cell_resel_info.allowed_meas_bw_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_cell_resel_info.t_resel_eutra_sf_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, intra_freq_cell_resel_info.q_rx_lev_min, (int8_t)-70, (int8_t)-22)); + if (intra_freq_cell_resel_info.p_max_present) { + HANDLE_CODE(pack_unalign_integer(bref, intra_freq_cell_resel_info.p_max, (int8_t)-30, (int8_t)33)); + } + if (intra_freq_cell_resel_info.s_intra_search_present) { + HANDLE_CODE(pack_unalign_integer(bref, intra_freq_cell_resel_info.s_intra_search, (uint8_t)0, (uint8_t)31)); + } + if (intra_freq_cell_resel_info.allowed_meas_bw_present) { + HANDLE_CODE(pack_enum(bref, intra_freq_cell_resel_info.allowed_meas_bw)); + } + HANDLE_CODE(bref.pack(intra_freq_cell_resel_info.presence_ant_port1, 1)); + HANDLE_CODE(intra_freq_cell_resel_info.neigh_cell_cfg.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, intra_freq_cell_resel_info.t_resel_eutra, (uint8_t)0, (uint8_t)7)); + if (intra_freq_cell_resel_info.t_resel_eutra_sf_present) { + HANDLE_CODE(intra_freq_cell_resel_info.t_resel_eutra_sf.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(8, 1); + rrc_asn1_warn_assert(s_intra_search_v920_present != (s_intra_search_v920.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= s_intra_search_v920_present; + rrc_asn1_warn_assert(s_non_intra_search_v920_present != (s_non_intra_search_v920.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= s_non_intra_search_v920_present; + group_flags[0] |= q_qual_min_r9_present; + group_flags[0] |= thresh_serving_low_q_r9_present; + group_flags[1] |= q_qual_min_wb_r11_present; + group_flags[2] |= q_qual_min_rsrq_on_all_symbols_r12_present; + rrc_asn1_warn_assert(cell_resel_serving_freq_info_v1310_present != + (cell_resel_serving_freq_info_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= cell_resel_serving_freq_info_v1310_present; + rrc_asn1_warn_assert(redist_serving_info_r13_present != (redist_serving_info_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= redist_serving_info_r13_present; + rrc_asn1_warn_assert(cell_sel_info_ce_r13_present != (cell_sel_info_ce_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= cell_sel_info_ce_r13_present; + group_flags[3] |= t_resel_eutra_ce_r13_present; + rrc_asn1_warn_assert(cell_sel_info_ce1_r13_present != (cell_sel_info_ce1_r13.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= cell_sel_info_ce1_r13_present; + rrc_asn1_warn_assert(cell_sel_info_ce1_v1360_present != (cell_sel_info_ce1_v1360.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= cell_sel_info_ce1_v1360_present; + rrc_asn1_warn_assert(cell_resel_info_common_v1460_present != (cell_resel_info_common_v1460.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= cell_resel_info_common_v1460_present; + rrc_asn1_warn_assert(cell_resel_info_hsdn_r15_present != (cell_resel_info_hsdn_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= cell_resel_info_hsdn_r15_present; + rrc_asn1_warn_assert(cell_sel_info_ce_v1530_present != (cell_sel_info_ce_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= cell_sel_info_ce_v1530_present; + group_flags[7] |= crs_intf_mitig_neigh_cells_ce_r15_present; + group_flags.pack_nof_groups(bref); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + group_flags.pack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_intra_search_v920_present, 1)); + HANDLE_CODE(bref.pack(s_non_intra_search_v920_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_r9_present, 1)); + HANDLE_CODE(bref.pack(thresh_serving_low_q_r9_present, 1)); + if (s_intra_search_v920_present) { + HANDLE_CODE(pack_unalign_integer(bref, s_intra_search_v920->s_intra_search_p_r9, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, s_intra_search_v920->s_intra_search_q_r9, (uint8_t)0, (uint8_t)31)); + } + if (s_non_intra_search_v920_present) { + HANDLE_CODE( + pack_unalign_integer(bref, s_non_intra_search_v920->s_non_intra_search_p_r9, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE( + pack_unalign_integer(bref, s_non_intra_search_v920->s_non_intra_search_q_r9, (uint8_t)0, (uint8_t)31)); + } + if (q_qual_min_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_r9, (int8_t)-34, (int8_t)-3)); + } + if (thresh_serving_low_q_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_serving_low_q_r9, (uint8_t)0, (uint8_t)31)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(q_qual_min_wb_r11_present, 1)); + if (q_qual_min_wb_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_wb_r11, (int8_t)-34, (int8_t)-3)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(q_qual_min_rsrq_on_all_symbols_r12_present, 1)); + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, q_qual_min_rsrq_on_all_symbols_r12, (int8_t)-34, (int8_t)-3)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cell_resel_serving_freq_info_v1310_present, 1)); + HANDLE_CODE(bref.pack(redist_serving_info_r13_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_ce_r13_present, 1)); + HANDLE_CODE(bref.pack(t_resel_eutra_ce_r13_present, 1)); + if (cell_resel_serving_freq_info_v1310_present) { + HANDLE_CODE(cell_resel_serving_freq_info_v1310->pack(bref)); + } + if (redist_serving_info_r13_present) { + HANDLE_CODE(redist_serving_info_r13->pack(bref)); + } + if (cell_sel_info_ce_r13_present) { + HANDLE_CODE(cell_sel_info_ce_r13->pack(bref)); + } + if (t_resel_eutra_ce_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, t_resel_eutra_ce_r13, (uint8_t)0, (uint8_t)15)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cell_sel_info_ce1_r13_present, 1)); + if (cell_sel_info_ce1_r13_present) { + HANDLE_CODE(cell_sel_info_ce1_r13->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cell_sel_info_ce1_v1360_present, 1)); + if (cell_sel_info_ce1_v1360_present) { + HANDLE_CODE(cell_sel_info_ce1_v1360->pack(bref)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cell_resel_info_common_v1460_present, 1)); + if (cell_resel_info_common_v1460_present) { + HANDLE_CODE(cell_resel_info_common_v1460->pack(bref)); + } + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cell_resel_info_hsdn_r15_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info_ce_v1530_present, 1)); + HANDLE_CODE(bref.pack(crs_intf_mitig_neigh_cells_ce_r15_present, 1)); + if (cell_resel_info_hsdn_r15_present) { + HANDLE_CODE(cell_resel_info_hsdn_r15->pack(bref)); + } + if (cell_sel_info_ce_v1530_present) { + HANDLE_CODE(cell_sel_info_ce_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type3_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_info_common.speed_state_resel_pars_present, 1)); + HANDLE_CODE(unpack_enum(cell_resel_info_common.q_hyst, 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(unpack_enum(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium, bref)); + HANDLE_CODE(unpack_enum(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high, bref)); + } + HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.s_non_intra_search_present, 1)); + if (cell_resel_serving_freq_info.s_non_intra_search_present) { + HANDLE_CODE(unpack_unalign_integer(cell_resel_serving_freq_info.s_non_intra_search, bref, (uint8_t)0, (uint8_t)31)); + } + HANDLE_CODE(unpack_unalign_integer(cell_resel_serving_freq_info.thresh_serving_low, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_serving_freq_info.cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(bref.unpack(intra_freq_cell_resel_info.p_max_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_cell_resel_info.s_intra_search_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_cell_resel_info.allowed_meas_bw_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_cell_resel_info.t_resel_eutra_sf_present, 1)); + HANDLE_CODE(unpack_unalign_integer(intra_freq_cell_resel_info.q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); + if (intra_freq_cell_resel_info.p_max_present) { + HANDLE_CODE(unpack_unalign_integer(intra_freq_cell_resel_info.p_max, bref, (int8_t)-30, (int8_t)33)); + } + if (intra_freq_cell_resel_info.s_intra_search_present) { + HANDLE_CODE(unpack_unalign_integer(intra_freq_cell_resel_info.s_intra_search, bref, (uint8_t)0, (uint8_t)31)); + } + if (intra_freq_cell_resel_info.allowed_meas_bw_present) { + HANDLE_CODE(unpack_enum(intra_freq_cell_resel_info.allowed_meas_bw, bref)); + } + HANDLE_CODE(bref.unpack(intra_freq_cell_resel_info.presence_ant_port1, 1)); + HANDLE_CODE(intra_freq_cell_resel_info.neigh_cell_cfg.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(intra_freq_cell_resel_info.t_resel_eutra, bref, (uint8_t)0, (uint8_t)7)); + if (intra_freq_cell_resel_info.t_resel_eutra_sf_present) { + HANDLE_CODE(intra_freq_cell_resel_info.t_resel_eutra_sf.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(8, 1); + group_flags.unpack_nof_groups(bref); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + group_flags.unpack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_intra_search_v920_present, 1)); + HANDLE_CODE(bref.unpack(s_non_intra_search_v920_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_r9_present, 1)); + HANDLE_CODE(bref.unpack(thresh_serving_low_q_r9_present, 1)); + if (s_intra_search_v920_present) { + s_intra_search_v920 = make_copy_ptr(s_intra_search_v920_s_()); + HANDLE_CODE(unpack_unalign_integer(s_intra_search_v920->s_intra_search_p_r9, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(s_intra_search_v920->s_intra_search_q_r9, bref, (uint8_t)0, (uint8_t)31)); + } + if (s_non_intra_search_v920_present) { + s_non_intra_search_v920 = make_copy_ptr(s_non_intra_search_v920_s_()); + HANDLE_CODE( + unpack_unalign_integer(s_non_intra_search_v920->s_non_intra_search_p_r9, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE( + unpack_unalign_integer(s_non_intra_search_v920->s_non_intra_search_q_r9, bref, (uint8_t)0, (uint8_t)31)); + } + if (q_qual_min_r9_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_r9, bref, (int8_t)-34, (int8_t)-3)); + } + if (thresh_serving_low_q_r9_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_serving_low_q_r9, bref, (uint8_t)0, (uint8_t)31)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(q_qual_min_wb_r11_present, 1)); + if (q_qual_min_wb_r11_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_wb_r11, bref, (int8_t)-34, (int8_t)-3)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(q_qual_min_rsrq_on_all_symbols_r12_present, 1)); + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(unpack_unalign_integer(q_qual_min_rsrq_on_all_symbols_r12, bref, (int8_t)-34, (int8_t)-3)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info_v1310_present, 1)); + HANDLE_CODE(bref.unpack(redist_serving_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_ce_r13_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_eutra_ce_r13_present, 1)); + if (cell_resel_serving_freq_info_v1310_present) { + cell_resel_serving_freq_info_v1310 = make_copy_ptr(cell_resel_serving_freq_info_v1310_s()); + HANDLE_CODE(cell_resel_serving_freq_info_v1310->unpack(bref)); + } + if (redist_serving_info_r13_present) { + redist_serving_info_r13 = make_copy_ptr(redist_serving_info_r13_s()); + HANDLE_CODE(redist_serving_info_r13->unpack(bref)); + } + if (cell_sel_info_ce_r13_present) { + cell_sel_info_ce_r13 = make_copy_ptr(cell_sel_info_ce_r13_s()); + HANDLE_CODE(cell_sel_info_ce_r13->unpack(bref)); + } + if (t_resel_eutra_ce_r13_present) { + HANDLE_CODE(unpack_unalign_integer(t_resel_eutra_ce_r13, bref, (uint8_t)0, (uint8_t)15)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cell_sel_info_ce1_r13_present, 1)); + if (cell_sel_info_ce1_r13_present) { + cell_sel_info_ce1_r13 = make_copy_ptr(cell_sel_info_ce1_r13_s()); + HANDLE_CODE(cell_sel_info_ce1_r13->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cell_sel_info_ce1_v1360_present, 1)); + if (cell_sel_info_ce1_v1360_present) { + cell_sel_info_ce1_v1360 = make_copy_ptr(cell_sel_info_ce1_v1360_s()); + HANDLE_CODE(cell_sel_info_ce1_v1360->unpack(bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cell_resel_info_common_v1460_present, 1)); + if (cell_resel_info_common_v1460_present) { + cell_resel_info_common_v1460 = make_copy_ptr(cell_resel_info_common_v1460_s()); + HANDLE_CODE(cell_resel_info_common_v1460->unpack(bref)); + } + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cell_resel_info_hsdn_r15_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info_ce_v1530_present, 1)); + HANDLE_CODE(bref.unpack(crs_intf_mitig_neigh_cells_ce_r15_present, 1)); + if (cell_resel_info_hsdn_r15_present) { + cell_resel_info_hsdn_r15 = make_copy_ptr(cell_resel_info_hsdn_r15_s()); + HANDLE_CODE(cell_resel_info_hsdn_r15->unpack(bref)); + } + if (cell_sel_info_ce_v1530_present) { + cell_sel_info_ce_v1530 = make_copy_ptr(cell_sel_info_ce_v1530_s()); + HANDLE_CODE(cell_sel_info_ce_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type3_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cellReselectionInfoCommon"); + j.start_obj(); + 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_present) { + j.write_int("s-NonIntraSearch", cell_resel_serving_freq_info.s_non_intra_search); + } + j.write_int("threshServingLow", cell_resel_serving_freq_info.thresh_serving_low); + j.write_int("cellReselectionPriority", cell_resel_serving_freq_info.cell_resel_prio); + j.end_obj(); + j.write_fieldname("intraFreqCellReselectionInfo"); + j.start_obj(); + j.write_int("q-RxLevMin", intra_freq_cell_resel_info.q_rx_lev_min); + if (intra_freq_cell_resel_info.p_max_present) { + j.write_int("p-Max", intra_freq_cell_resel_info.p_max); + } + if (intra_freq_cell_resel_info.s_intra_search_present) { + j.write_int("s-IntraSearch", intra_freq_cell_resel_info.s_intra_search); + } + if (intra_freq_cell_resel_info.allowed_meas_bw_present) { + j.write_str("allowedMeasBandwidth", intra_freq_cell_resel_info.allowed_meas_bw.to_string()); + } + j.write_bool("presenceAntennaPort1", intra_freq_cell_resel_info.presence_ant_port1); + j.write_str("neighCellConfig", intra_freq_cell_resel_info.neigh_cell_cfg.to_string()); + j.write_int("t-ReselectionEUTRA", intra_freq_cell_resel_info.t_resel_eutra); + if (intra_freq_cell_resel_info.t_resel_eutra_sf_present) { + j.write_fieldname("t-ReselectionEUTRA-SF"); + intra_freq_cell_resel_info.t_resel_eutra_sf.to_json(j); + } + j.end_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (s_intra_search_v920_present) { + j.write_fieldname("s-IntraSearch-v920"); + j.start_obj(); + j.write_int("s-IntraSearchP-r9", s_intra_search_v920->s_intra_search_p_r9); + j.write_int("s-IntraSearchQ-r9", s_intra_search_v920->s_intra_search_q_r9); + j.end_obj(); + } + if (s_non_intra_search_v920_present) { + j.write_fieldname("s-NonIntraSearch-v920"); + j.start_obj(); + j.write_int("s-NonIntraSearchP-r9", s_non_intra_search_v920->s_non_intra_search_p_r9); + j.write_int("s-NonIntraSearchQ-r9", s_non_intra_search_v920->s_non_intra_search_q_r9); + j.end_obj(); + } + if (q_qual_min_r9_present) { + j.write_int("q-QualMin-r9", q_qual_min_r9); + } + if (thresh_serving_low_q_r9_present) { + j.write_int("threshServingLowQ-r9", thresh_serving_low_q_r9); + } + if (q_qual_min_wb_r11_present) { + j.write_int("q-QualMinWB-r11", q_qual_min_wb_r11); + } + if (q_qual_min_rsrq_on_all_symbols_r12_present) { + j.write_int("q-QualMinRSRQ-OnAllSymbols-r12", q_qual_min_rsrq_on_all_symbols_r12); + } + if (cell_resel_serving_freq_info_v1310_present) { + j.write_fieldname("cellReselectionServingFreqInfo-v1310"); + cell_resel_serving_freq_info_v1310->to_json(j); + } + if (redist_serving_info_r13_present) { + j.write_fieldname("redistributionServingInfo-r13"); + redist_serving_info_r13->to_json(j); + } + if (cell_sel_info_ce_r13_present) { + j.write_fieldname("cellSelectionInfoCE-r13"); + cell_sel_info_ce_r13->to_json(j); + } + if (t_resel_eutra_ce_r13_present) { + j.write_int("t-ReselectionEUTRA-CE-r13", t_resel_eutra_ce_r13); + } + if (cell_sel_info_ce1_r13_present) { + j.write_fieldname("cellSelectionInfoCE1-r13"); + cell_sel_info_ce1_r13->to_json(j); + } + if (cell_sel_info_ce1_v1360_present) { + j.write_fieldname("cellSelectionInfoCE1-v1360"); + cell_sel_info_ce1_v1360->to_json(j); + } + if (cell_resel_info_common_v1460_present) { + j.write_fieldname("cellReselectionInfoCommon-v1460"); + cell_resel_info_common_v1460->to_json(j); + } + if (cell_resel_info_hsdn_r15_present) { + j.write_fieldname("cellReselectionInfoHSDN-r15"); + cell_resel_info_hsdn_r15->to_json(j); + } + if (cell_sel_info_ce_v1530_present) { + j.write_fieldname("cellSelectionInfoCE-v1530"); + cell_sel_info_ce_v1530->to_json(j); + } + if (crs_intf_mitig_neigh_cells_ce_r15_present) { + j.write_str("crs-IntfMitigNeighCellsCE-r15", "enabled"); + } + j.end_obj(); +} + +sib_type3_s::cell_resel_info_common_s_::cell_resel_info_common_s_() +{ + speed_state_resel_pars_present = false; +} + +sib_type3_s::cell_resel_serving_freq_info_s_::cell_resel_serving_freq_info_s_() +{ + s_non_intra_search_present = false; +} + +sib_type3_s::intra_freq_cell_resel_info_s_::intra_freq_cell_resel_info_s_() +{ + p_max_present = false; + s_intra_search_present = false; + allowed_meas_bw_present = false; + t_resel_eutra_sf_present = false; +} + +// SystemInformationBlockType4 ::= SEQUENCE +sib_type4_s::sib_type4_s() +{ + ext = false; + intra_freq_neigh_cell_list_present = false; + intra_freq_black_cell_list_present = false; + csg_pci_range_present = false; + late_non_crit_ext_present = false; + intra_freq_neigh_hsdn_cell_list_r15_present = false; +} +SRSASN_CODE sib_type4_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_black_cell_list_present, 1)); + HANDLE_CODE(bref.pack(csg_pci_range_present, 1)); + + if (intra_freq_neigh_cell_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_neigh_cell_list, 1, 16)); + } + if (intra_freq_black_cell_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_black_cell_list, 1, 16)); + } + if (csg_pci_range_present) { + HANDLE_CODE(csg_pci_range.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1, 1); + rrc_asn1_warn_assert(intra_freq_neigh_hsdn_cell_list_r15_present != + (intra_freq_neigh_hsdn_cell_list_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= intra_freq_neigh_hsdn_cell_list_r15_present; + group_flags.pack_nof_groups(bref); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + group_flags.pack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(intra_freq_neigh_hsdn_cell_list_r15_present, 1)); + if (intra_freq_neigh_hsdn_cell_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_hsdn_cell_list_r15, 1, 16)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type4_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(intra_freq_neigh_cell_list_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_black_cell_list_present, 1)); + HANDLE_CODE(bref.unpack(csg_pci_range_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_black_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(intra_freq_black_cell_list, bref, 1, 16)); + } + if (csg_pci_range_present) { + HANDLE_CODE(csg_pci_range.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1, 1); + group_flags.unpack_nof_groups(bref); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + group_flags.unpack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(intra_freq_neigh_hsdn_cell_list_r15_present, 1)); + if (intra_freq_neigh_hsdn_cell_list_r15_present) { + intra_freq_neigh_hsdn_cell_list_r15 = make_copy_ptr(intra_freq_neigh_hsdn_cell_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_hsdn_cell_list_r15, bref, 1, 16)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type4_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (intra_freq_neigh_cell_list_present) { + j.start_array("intraFreqNeighCellList"); + for (uint32_t i1 = 0; i1 < intra_freq_neigh_cell_list.size(); ++i1) { + intra_freq_neigh_cell_list[i1].to_json(j); + } + j.end_array(); + } + if (intra_freq_black_cell_list_present) { + j.start_array("intraFreqBlackCellList"); + for (uint32_t i1 = 0; i1 < intra_freq_black_cell_list.size(); ++i1) { + intra_freq_black_cell_list[i1].to_json(j); + } + j.end_array(); + } + if (csg_pci_range_present) { + j.write_fieldname("csg-PhysCellIdRange"); + csg_pci_range.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (intra_freq_neigh_hsdn_cell_list_r15_present) { + j.start_array("intraFreqNeighHSDN-CellList-r15"); + for (uint32_t i1 = 0; i1 < intra_freq_neigh_hsdn_cell_list_r15->size(); ++i1) { + ((*intra_freq_neigh_hsdn_cell_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SystemInformationBlockType5 ::= SEQUENCE +sib_type5_s::sib_type5_s() +{ + ext = false; + late_non_crit_ext_present = false; + inter_freq_carrier_freq_list_v1250_present = false; + inter_freq_carrier_freq_list_ext_r12_present = false; + inter_freq_carrier_freq_list_ext_v1280_present = false; + inter_freq_carrier_freq_list_v1310_present = false; + inter_freq_carrier_freq_list_ext_v1310_present = false; + inter_freq_carrier_freq_list_v1350_present = false; + inter_freq_carrier_freq_list_ext_v1350_present = false; + inter_freq_carrier_freq_list_ext_v1360_present = false; + scptm_freq_offset_r14_present = false; + inter_freq_carrier_freq_list_v1530_present = false; + inter_freq_carrier_freq_list_ext_v1530_present = false; + meas_idle_cfg_sib_r15_present = false; +} +SRSASN_CODE sib_type5_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list, 1, 8)); + + if (ext) { + ext_groups_header group_flags(7, 1); + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_v1250_present != + (inter_freq_carrier_freq_list_v1250.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= inter_freq_carrier_freq_list_v1250_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_ext_r12_present != + (inter_freq_carrier_freq_list_ext_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= inter_freq_carrier_freq_list_ext_r12_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_ext_v1280_present != + (inter_freq_carrier_freq_list_ext_v1280.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= inter_freq_carrier_freq_list_ext_v1280_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_v1310_present != + (inter_freq_carrier_freq_list_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= inter_freq_carrier_freq_list_v1310_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_ext_v1310_present != + (inter_freq_carrier_freq_list_ext_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= inter_freq_carrier_freq_list_ext_v1310_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_v1350_present != + (inter_freq_carrier_freq_list_v1350.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= inter_freq_carrier_freq_list_v1350_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_ext_v1350_present != + (inter_freq_carrier_freq_list_ext_v1350.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= inter_freq_carrier_freq_list_ext_v1350_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_ext_v1360_present != + (inter_freq_carrier_freq_list_ext_v1360.get() != NULL), + __FILE__, __LINE__); + group_flags[4] |= inter_freq_carrier_freq_list_ext_v1360_present; + group_flags[5] |= scptm_freq_offset_r14_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_v1530_present != + (inter_freq_carrier_freq_list_v1530.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= inter_freq_carrier_freq_list_v1530_present; + rrc_asn1_warn_assert(inter_freq_carrier_freq_list_ext_v1530_present != + (inter_freq_carrier_freq_list_ext_v1530.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= inter_freq_carrier_freq_list_ext_v1530_present; + rrc_asn1_warn_assert(meas_idle_cfg_sib_r15_present != (meas_idle_cfg_sib_r15.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= meas_idle_cfg_sib_r15_present; + group_flags.pack_nof_groups(bref); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + group_flags.pack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1250_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_ext_r12_present, 1)); + if (inter_freq_carrier_freq_list_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1250, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_ext_r12, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_ext_v1280_present, 1)); + if (inter_freq_carrier_freq_list_ext_v1280_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_ext_v1280, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1310_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_ext_v1310_present, 1)); + if (inter_freq_carrier_freq_list_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1310, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_ext_v1310, 1, 8)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1350_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_ext_v1350_present, 1)); + if (inter_freq_carrier_freq_list_v1350_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1350, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_v1350_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_ext_v1350, 1, 8)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_ext_v1360_present, 1)); + if (inter_freq_carrier_freq_list_ext_v1360_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_ext_v1360, 1, 8)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(scptm_freq_offset_r14_present, 1)); + if (scptm_freq_offset_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, scptm_freq_offset_r14, (uint8_t)1, (uint8_t)8)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1530_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_ext_v1530_present, 1)); + HANDLE_CODE(bref.pack(meas_idle_cfg_sib_r15_present, 1)); + if (inter_freq_carrier_freq_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1530, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_ext_v1530, 1, 8)); + } + if (meas_idle_cfg_sib_r15_present) { + HANDLE_CODE(meas_idle_cfg_sib_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type5_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list, bref, 1, 8)); + + if (ext) { + ext_groups_header group_flags(7, 1); + group_flags.unpack_nof_groups(bref); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + group_flags.unpack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v1250_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_ext_r12_present, 1)); + if (inter_freq_carrier_freq_list_v1250_present) { + inter_freq_carrier_freq_list_v1250 = make_copy_ptr(inter_freq_carrier_freq_list_v1250_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1250, bref, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_r12_present) { + inter_freq_carrier_freq_list_ext_r12 = make_copy_ptr(inter_freq_carrier_freq_list_ext_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_ext_r12, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_ext_v1280_present, 1)); + if (inter_freq_carrier_freq_list_ext_v1280_present) { + inter_freq_carrier_freq_list_ext_v1280 = make_copy_ptr(inter_freq_carrier_freq_list_ext_v1280_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_ext_v1280, bref, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v1310_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_ext_v1310_present, 1)); + if (inter_freq_carrier_freq_list_v1310_present) { + inter_freq_carrier_freq_list_v1310 = make_copy_ptr(inter_freq_carrier_freq_list_v1310_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1310, bref, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_v1310_present) { + inter_freq_carrier_freq_list_ext_v1310 = make_copy_ptr(inter_freq_carrier_freq_list_ext_v1310_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_ext_v1310, bref, 1, 8)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v1350_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_ext_v1350_present, 1)); + if (inter_freq_carrier_freq_list_v1350_present) { + inter_freq_carrier_freq_list_v1350 = make_copy_ptr(inter_freq_carrier_freq_list_v1350_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1350, bref, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_v1350_present) { + inter_freq_carrier_freq_list_ext_v1350 = make_copy_ptr(inter_freq_carrier_freq_list_ext_v1350_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_ext_v1350, bref, 1, 8)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_ext_v1360_present, 1)); + if (inter_freq_carrier_freq_list_ext_v1360_present) { + inter_freq_carrier_freq_list_ext_v1360 = make_copy_ptr(inter_freq_carrier_freq_list_ext_v1360_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_ext_v1360, bref, 1, 8)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(scptm_freq_offset_r14_present, 1)); + if (scptm_freq_offset_r14_present) { + HANDLE_CODE(unpack_unalign_integer(scptm_freq_offset_r14, bref, (uint8_t)1, (uint8_t)8)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_v1530_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_carrier_freq_list_ext_v1530_present, 1)); + HANDLE_CODE(bref.unpack(meas_idle_cfg_sib_r15_present, 1)); + if (inter_freq_carrier_freq_list_v1530_present) { + inter_freq_carrier_freq_list_v1530 = make_copy_ptr(inter_freq_carrier_freq_list_v1530_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1530, bref, 1, 8)); + } + if (inter_freq_carrier_freq_list_ext_v1530_present) { + inter_freq_carrier_freq_list_ext_v1530 = make_copy_ptr(inter_freq_carrier_freq_list_ext_v1530_l()); + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_ext_v1530, bref, 1, 8)); + } + if (meas_idle_cfg_sib_r15_present) { + meas_idle_cfg_sib_r15 = make_copy_ptr(meas_idle_cfg_sib_r15_s()); + HANDLE_CODE(meas_idle_cfg_sib_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type5_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("interFreqCarrierFreqList"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list.size(); ++i1) { + inter_freq_carrier_freq_list[i1].to_json(j); + } + j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (inter_freq_carrier_freq_list_v1250_present) { + j.start_array("interFreqCarrierFreqList-v1250"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1250->size(); ++i1) { + ((*inter_freq_carrier_freq_list_v1250)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_ext_r12_present) { + j.start_array("interFreqCarrierFreqListExt-r12"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_r12->size(); ++i1) { + ((*inter_freq_carrier_freq_list_ext_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_ext_v1280_present) { + j.start_array("interFreqCarrierFreqListExt-v1280"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1280->size(); ++i1) { + ((*inter_freq_carrier_freq_list_ext_v1280)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_v1310_present) { + j.start_array("interFreqCarrierFreqList-v1310"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1310->size(); ++i1) { + ((*inter_freq_carrier_freq_list_v1310)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_ext_v1310_present) { + j.start_array("interFreqCarrierFreqListExt-v1310"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1310->size(); ++i1) { + ((*inter_freq_carrier_freq_list_ext_v1310)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_v1350_present) { + j.start_array("interFreqCarrierFreqList-v1350"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1350->size(); ++i1) { + ((*inter_freq_carrier_freq_list_v1350)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_ext_v1350_present) { + j.start_array("interFreqCarrierFreqListExt-v1350"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1350->size(); ++i1) { + ((*inter_freq_carrier_freq_list_ext_v1350)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_ext_v1360_present) { + j.start_array("interFreqCarrierFreqListExt-v1360"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1360->size(); ++i1) { + ((*inter_freq_carrier_freq_list_ext_v1360)[i1]).to_json(j); + } + j.end_array(); + } + if (scptm_freq_offset_r14_present) { + j.write_int("scptm-FreqOffset-r14", scptm_freq_offset_r14); + } + if (inter_freq_carrier_freq_list_v1530_present) { + j.start_array("interFreqCarrierFreqList-v1530"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1530->size(); ++i1) { + ((*inter_freq_carrier_freq_list_v1530)[i1]).to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_ext_v1530_present) { + j.start_array("interFreqCarrierFreqListExt-v1530"); + for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1530->size(); ++i1) { + ((*inter_freq_carrier_freq_list_ext_v1530)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_idle_cfg_sib_r15_present) { + j.write_fieldname("measIdleConfigSIB-r15"); + meas_idle_cfg_sib_r15->to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType6 ::= SEQUENCE +sib_type6_s::sib_type6_s() +{ + ext = false; + carrier_freq_list_utra_fdd_present = false; + carrier_freq_list_utra_tdd_present = false; + t_resel_utra_sf_present = false; + late_non_crit_ext_present = false; + carrier_freq_list_utra_fdd_v1250_present = false; + carrier_freq_list_utra_tdd_v1250_present = false; + carrier_freq_list_utra_fdd_ext_r12_present = false; + carrier_freq_list_utra_tdd_ext_r12_present = false; +} +SRSASN_CODE sib_type6_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_freq_list_utra_fdd_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_list_utra_tdd_present, 1)); + HANDLE_CODE(bref.pack(t_resel_utra_sf_present, 1)); + + if (carrier_freq_list_utra_fdd_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freq_list_utra_fdd, 1, 16)); + } + if (carrier_freq_list_utra_tdd_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freq_list_utra_tdd, 1, 16)); + } + HANDLE_CODE(pack_unalign_integer(bref, t_resel_utra, (uint8_t)0, (uint8_t)7)); + if (t_resel_utra_sf_present) { + HANDLE_CODE(t_resel_utra_sf.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1, 1); + rrc_asn1_warn_assert(carrier_freq_list_utra_fdd_v1250_present != (carrier_freq_list_utra_fdd_v1250.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= carrier_freq_list_utra_fdd_v1250_present; + rrc_asn1_warn_assert(carrier_freq_list_utra_tdd_v1250_present != (carrier_freq_list_utra_tdd_v1250.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= carrier_freq_list_utra_tdd_v1250_present; + rrc_asn1_warn_assert(carrier_freq_list_utra_fdd_ext_r12_present != + (carrier_freq_list_utra_fdd_ext_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= carrier_freq_list_utra_fdd_ext_r12_present; + rrc_asn1_warn_assert(carrier_freq_list_utra_tdd_ext_r12_present != + (carrier_freq_list_utra_tdd_ext_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= carrier_freq_list_utra_tdd_ext_r12_present; + group_flags.pack_nof_groups(bref); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + group_flags.pack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(carrier_freq_list_utra_fdd_v1250_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_list_utra_tdd_v1250_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_list_utra_fdd_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_list_utra_tdd_ext_r12_present, 1)); + if (carrier_freq_list_utra_fdd_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_utra_fdd_v1250, 1, 16)); + } + if (carrier_freq_list_utra_tdd_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_utra_tdd_v1250, 1, 16)); + } + if (carrier_freq_list_utra_fdd_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_utra_fdd_ext_r12, 1, 16)); + } + if (carrier_freq_list_utra_tdd_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_utra_tdd_ext_r12, 1, 16)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type6_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_fdd_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_tdd_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_utra_sf_present, 1)); + + if (carrier_freq_list_utra_fdd_present) { + HANDLE_CODE(unpack_dyn_seq_of(carrier_freq_list_utra_fdd, bref, 1, 16)); + } + if (carrier_freq_list_utra_tdd_present) { + HANDLE_CODE(unpack_dyn_seq_of(carrier_freq_list_utra_tdd, bref, 1, 16)); + } + HANDLE_CODE(unpack_unalign_integer(t_resel_utra, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_utra_sf_present) { + HANDLE_CODE(t_resel_utra_sf.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1, 1); + group_flags.unpack_nof_groups(bref); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + group_flags.unpack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_fdd_v1250_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_tdd_v1250_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_fdd_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_list_utra_tdd_ext_r12_present, 1)); + if (carrier_freq_list_utra_fdd_v1250_present) { + carrier_freq_list_utra_fdd_v1250 = make_copy_ptr(carrier_freq_list_utra_fdd_v1250_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_utra_fdd_v1250, bref, 1, 16)); + } + if (carrier_freq_list_utra_tdd_v1250_present) { + carrier_freq_list_utra_tdd_v1250 = make_copy_ptr(carrier_freq_list_utra_tdd_v1250_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_utra_tdd_v1250, bref, 1, 16)); + } + if (carrier_freq_list_utra_fdd_ext_r12_present) { + carrier_freq_list_utra_fdd_ext_r12 = make_copy_ptr(carrier_freq_list_utra_fdd_ext_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_utra_fdd_ext_r12, bref, 1, 16)); + } + if (carrier_freq_list_utra_tdd_ext_r12_present) { + carrier_freq_list_utra_tdd_ext_r12 = make_copy_ptr(carrier_freq_list_utra_tdd_ext_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_utra_tdd_ext_r12, bref, 1, 16)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type6_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_list_utra_fdd_present) { + j.start_array("carrierFreqListUTRA-FDD"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd.size(); ++i1) { + carrier_freq_list_utra_fdd[i1].to_json(j); + } + j.end_array(); + } + if (carrier_freq_list_utra_tdd_present) { + j.start_array("carrierFreqListUTRA-TDD"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_tdd.size(); ++i1) { + carrier_freq_list_utra_tdd[i1].to_json(j); + } + j.end_array(); + } + j.write_int("t-ReselectionUTRA", t_resel_utra); + if (t_resel_utra_sf_present) { + j.write_fieldname("t-ReselectionUTRA-SF"); + t_resel_utra_sf.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (carrier_freq_list_utra_fdd_v1250_present) { + j.start_array("carrierFreqListUTRA-FDD-v1250"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd_v1250->size(); ++i1) { + ((*carrier_freq_list_utra_fdd_v1250)[i1]).to_json(j); + } + j.end_array(); + } + if (carrier_freq_list_utra_tdd_v1250_present) { + j.start_array("carrierFreqListUTRA-TDD-v1250"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_tdd_v1250->size(); ++i1) { + ((*carrier_freq_list_utra_tdd_v1250)[i1]).to_json(j); + } + j.end_array(); + } + if (carrier_freq_list_utra_fdd_ext_r12_present) { + j.start_array("carrierFreqListUTRA-FDD-Ext-r12"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd_ext_r12->size(); ++i1) { + ((*carrier_freq_list_utra_fdd_ext_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (carrier_freq_list_utra_tdd_ext_r12_present) { + j.start_array("carrierFreqListUTRA-TDD-Ext-r12"); + for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_tdd_ext_r12->size(); ++i1) { + ((*carrier_freq_list_utra_tdd_ext_r12)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SystemInformationBlockType7 ::= SEQUENCE +sib_type7_s::sib_type7_s() +{ + ext = false; + t_resel_geran_sf_present = false; + carrier_freqs_info_list_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type7_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(t_resel_geran_sf_present, 1)); + HANDLE_CODE(bref.pack(carrier_freqs_info_list_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, t_resel_geran, (uint8_t)0, (uint8_t)7)); + if (t_resel_geran_sf_present) { + HANDLE_CODE(t_resel_geran_sf.pack(bref)); + } + if (carrier_freqs_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freqs_info_list, 1, 16)); + } + + if (ext) { + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type7_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(t_resel_geran_sf_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freqs_info_list_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(t_resel_geran, bref, (uint8_t)0, (uint8_t)7)); + if (t_resel_geran_sf_present) { + HANDLE_CODE(t_resel_geran_sf.unpack(bref)); + } + if (carrier_freqs_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(carrier_freqs_info_list, bref, 1, 16)); + } + + if (ext) { + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + } + return SRSASN_SUCCESS; +} +void sib_type7_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("t-ReselectionGERAN", t_resel_geran); + if (t_resel_geran_sf_present) { + j.write_fieldname("t-ReselectionGERAN-SF"); + t_resel_geran_sf.to_json(j); + } + if (carrier_freqs_info_list_present) { + j.start_array("carrierFreqsInfoList"); + for (uint32_t i1 = 0; i1 < carrier_freqs_info_list.size(); ++i1) { + carrier_freqs_info_list[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SystemInformationBlockType8 ::= SEQUENCE +sib_type8_s::sib_type8_s() +{ + ext = false; + sys_time_info_present = false; + search_win_size_present = false; + params_hrpd_present = false; + params1_xrtt_present = false; + late_non_crit_ext_present = false; + csfb_support_for_dual_rx_ues_r9_present = false; + cell_resel_params_hrpd_v920_present = false; + cell_resel_params1_xrtt_v920_present = false; + csfb_regist_param1_xrtt_v920_present = false; + ac_barr_cfg1_xrtt_r9_present = false; + csfb_dual_rx_tx_support_r10_present = false; + sib8_per_plmn_list_r11_present = false; +} +SRSASN_CODE sib_type8_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sys_time_info_present, 1)); + HANDLE_CODE(bref.pack(search_win_size_present, 1)); + HANDLE_CODE(bref.pack(params_hrpd_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt_present, 1)); + + if (sys_time_info_present) { + HANDLE_CODE(sys_time_info.pack(bref)); + } + if (search_win_size_present) { + HANDLE_CODE(pack_unalign_integer(bref, search_win_size, (uint8_t)0, (uint8_t)15)); + } + if (params_hrpd_present) { + HANDLE_CODE(bref.pack(params_hrpd.cell_resel_params_hrpd_present, 1)); + HANDLE_CODE(params_hrpd.pre_regist_info_hrpd.pack(bref)); + if (params_hrpd.cell_resel_params_hrpd_present) { + HANDLE_CODE(params_hrpd.cell_resel_params_hrpd.pack(bref)); + } + } + if (params1_xrtt_present) { + HANDLE_CODE(bref.pack(params1_xrtt.csfb_regist_param1_xrtt_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt.long_code_state1_xrtt_present, 1)); + HANDLE_CODE(bref.pack(params1_xrtt.cell_resel_params1_xrtt_present, 1)); + if (params1_xrtt.csfb_regist_param1_xrtt_present) { + HANDLE_CODE(params1_xrtt.csfb_regist_param1_xrtt.pack(bref)); + } + if (params1_xrtt.long_code_state1_xrtt_present) { + HANDLE_CODE(params1_xrtt.long_code_state1_xrtt.pack(bref)); + } + if (params1_xrtt.cell_resel_params1_xrtt_present) { + HANDLE_CODE(params1_xrtt.cell_resel_params1_xrtt.pack(bref)); + } + } + + if (ext) { + ext_groups_header group_flags(3, 1); + group_flags[0] |= csfb_support_for_dual_rx_ues_r9_present; + rrc_asn1_warn_assert(cell_resel_params_hrpd_v920_present != (cell_resel_params_hrpd_v920.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= cell_resel_params_hrpd_v920_present; + rrc_asn1_warn_assert(cell_resel_params1_xrtt_v920_present != (cell_resel_params1_xrtt_v920.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= cell_resel_params1_xrtt_v920_present; + rrc_asn1_warn_assert(csfb_regist_param1_xrtt_v920_present != (csfb_regist_param1_xrtt_v920.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= csfb_regist_param1_xrtt_v920_present; + rrc_asn1_warn_assert(ac_barr_cfg1_xrtt_r9_present != (ac_barr_cfg1_xrtt_r9.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= ac_barr_cfg1_xrtt_r9_present; + group_flags[1] |= csfb_dual_rx_tx_support_r10_present; + rrc_asn1_warn_assert(sib8_per_plmn_list_r11_present != (sib8_per_plmn_list_r11.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= sib8_per_plmn_list_r11_present; + group_flags.pack_nof_groups(bref); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + group_flags.pack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csfb_support_for_dual_rx_ues_r9_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_params_hrpd_v920_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_params1_xrtt_v920_present, 1)); + HANDLE_CODE(bref.pack(csfb_regist_param1_xrtt_v920_present, 1)); + HANDLE_CODE(bref.pack(ac_barr_cfg1_xrtt_r9_present, 1)); + if (csfb_support_for_dual_rx_ues_r9_present) { + HANDLE_CODE(bref.pack(csfb_support_for_dual_rx_ues_r9, 1)); + } + if (cell_resel_params_hrpd_v920_present) { + HANDLE_CODE(cell_resel_params_hrpd_v920->pack(bref)); + } + if (cell_resel_params1_xrtt_v920_present) { + HANDLE_CODE(cell_resel_params1_xrtt_v920->pack(bref)); + } + if (csfb_regist_param1_xrtt_v920_present) { + HANDLE_CODE(csfb_regist_param1_xrtt_v920->pack(bref)); + } + if (ac_barr_cfg1_xrtt_r9_present) { + HANDLE_CODE(ac_barr_cfg1_xrtt_r9->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csfb_dual_rx_tx_support_r10_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sib8_per_plmn_list_r11_present, 1)); + if (sib8_per_plmn_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sib8_per_plmn_list_r11, 1, 6)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type8_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sys_time_info_present, 1)); + HANDLE_CODE(bref.unpack(search_win_size_present, 1)); + HANDLE_CODE(bref.unpack(params_hrpd_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt_present, 1)); + + if (sys_time_info_present) { + HANDLE_CODE(sys_time_info.unpack(bref)); + } + if (search_win_size_present) { + HANDLE_CODE(unpack_unalign_integer(search_win_size, bref, (uint8_t)0, (uint8_t)15)); + } + if (params_hrpd_present) { + HANDLE_CODE(bref.unpack(params_hrpd.cell_resel_params_hrpd_present, 1)); + HANDLE_CODE(params_hrpd.pre_regist_info_hrpd.unpack(bref)); + if (params_hrpd.cell_resel_params_hrpd_present) { + HANDLE_CODE(params_hrpd.cell_resel_params_hrpd.unpack(bref)); + } + } + if (params1_xrtt_present) { + HANDLE_CODE(bref.unpack(params1_xrtt.csfb_regist_param1_xrtt_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt.long_code_state1_xrtt_present, 1)); + HANDLE_CODE(bref.unpack(params1_xrtt.cell_resel_params1_xrtt_present, 1)); + if (params1_xrtt.csfb_regist_param1_xrtt_present) { + HANDLE_CODE(params1_xrtt.csfb_regist_param1_xrtt.unpack(bref)); + } + if (params1_xrtt.long_code_state1_xrtt_present) { + HANDLE_CODE(params1_xrtt.long_code_state1_xrtt.unpack(bref)); + } + if (params1_xrtt.cell_resel_params1_xrtt_present) { + HANDLE_CODE(params1_xrtt.cell_resel_params1_xrtt.unpack(bref)); + } + } + + if (ext) { + ext_groups_header group_flags(3, 1); + group_flags.unpack_nof_groups(bref); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + group_flags.unpack_group_flags(bref); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csfb_support_for_dual_rx_ues_r9_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_params_hrpd_v920_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_params1_xrtt_v920_present, 1)); + HANDLE_CODE(bref.unpack(csfb_regist_param1_xrtt_v920_present, 1)); + HANDLE_CODE(bref.unpack(ac_barr_cfg1_xrtt_r9_present, 1)); + if (csfb_support_for_dual_rx_ues_r9_present) { + HANDLE_CODE(bref.unpack(csfb_support_for_dual_rx_ues_r9, 1)); + } + if (cell_resel_params_hrpd_v920_present) { + cell_resel_params_hrpd_v920 = make_copy_ptr(cell_resel_params_cdma2000_v920_s()); + HANDLE_CODE(cell_resel_params_hrpd_v920->unpack(bref)); + } + if (cell_resel_params1_xrtt_v920_present) { + cell_resel_params1_xrtt_v920 = make_copy_ptr(cell_resel_params_cdma2000_v920_s()); + HANDLE_CODE(cell_resel_params1_xrtt_v920->unpack(bref)); + } + if (csfb_regist_param1_xrtt_v920_present) { + csfb_regist_param1_xrtt_v920 = make_copy_ptr(csfb_regist_param1_xrtt_v920_s()); + HANDLE_CODE(csfb_regist_param1_xrtt_v920->unpack(bref)); + } + if (ac_barr_cfg1_xrtt_r9_present) { + ac_barr_cfg1_xrtt_r9 = make_copy_ptr(ac_barr_cfg1_xrtt_r9_s()); + HANDLE_CODE(ac_barr_cfg1_xrtt_r9->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csfb_dual_rx_tx_support_r10_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sib8_per_plmn_list_r11_present, 1)); + if (sib8_per_plmn_list_r11_present) { + sib8_per_plmn_list_r11 = make_copy_ptr(sib8_per_plmn_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*sib8_per_plmn_list_r11, bref, 1, 6)); + } + } + } + return SRSASN_SUCCESS; +} +void sib_type8_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sys_time_info_present) { + j.write_fieldname("systemTimeInfo"); + sys_time_info.to_json(j); + } + if (search_win_size_present) { + j.write_int("searchWindowSize", search_win_size); + } + if (params_hrpd_present) { + j.write_fieldname("parametersHRPD"); + j.start_obj(); + j.write_fieldname("preRegistrationInfoHRPD"); + params_hrpd.pre_regist_info_hrpd.to_json(j); + if (params_hrpd.cell_resel_params_hrpd_present) { + j.write_fieldname("cellReselectionParametersHRPD"); + params_hrpd.cell_resel_params_hrpd.to_json(j); + } + j.end_obj(); + } + if (params1_xrtt_present) { + j.write_fieldname("parameters1XRTT"); + j.start_obj(); + if (params1_xrtt.csfb_regist_param1_xrtt_present) { + j.write_fieldname("csfb-RegistrationParam1XRTT"); + params1_xrtt.csfb_regist_param1_xrtt.to_json(j); + } + if (params1_xrtt.long_code_state1_xrtt_present) { + j.write_str("longCodeState1XRTT", params1_xrtt.long_code_state1_xrtt.to_string()); + } + if (params1_xrtt.cell_resel_params1_xrtt_present) { + j.write_fieldname("cellReselectionParameters1XRTT"); + params1_xrtt.cell_resel_params1_xrtt.to_json(j); + } + j.end_obj(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (csfb_support_for_dual_rx_ues_r9_present) { + j.write_bool("csfb-SupportForDualRxUEs-r9", csfb_support_for_dual_rx_ues_r9); + } + if (cell_resel_params_hrpd_v920_present) { + j.write_fieldname("cellReselectionParametersHRPD-v920"); + cell_resel_params_hrpd_v920->to_json(j); + } + if (cell_resel_params1_xrtt_v920_present) { + j.write_fieldname("cellReselectionParameters1XRTT-v920"); + cell_resel_params1_xrtt_v920->to_json(j); + } + if (csfb_regist_param1_xrtt_v920_present) { + j.write_fieldname("csfb-RegistrationParam1XRTT-v920"); + csfb_regist_param1_xrtt_v920->to_json(j); + } + if (ac_barr_cfg1_xrtt_r9_present) { + j.write_fieldname("ac-BarringConfig1XRTT-r9"); + ac_barr_cfg1_xrtt_r9->to_json(j); + } + if (csfb_dual_rx_tx_support_r10_present) { + j.write_str("csfb-DualRxTxSupport-r10", "true"); + } + if (sib8_per_plmn_list_r11_present) { + j.start_array("sib8-PerPLMN-List-r11"); + for (uint32_t i1 = 0; i1 < sib8_per_plmn_list_r11->size(); ++i1) { + ((*sib8_per_plmn_list_r11)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +sib_type8_s::params_hrpd_s_::params_hrpd_s_() +{ + cell_resel_params_hrpd_present = false; +} + +sib_type8_s::params1_xrtt_s_::params1_xrtt_s_() +{ + csfb_regist_param1_xrtt_present = false; + long_code_state1_xrtt_present = false; + cell_resel_params1_xrtt_present = false; +} + +// SystemInformationBlockType9 ::= SEQUENCE +sib_type9_s::sib_type9_s() +{ + ext = false; + hnb_name_present = false; + late_non_crit_ext_present = false; +} +SRSASN_CODE sib_type9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(hnb_name_present, 1)); + + if (hnb_name_present) { + HANDLE_CODE(hnb_name.pack(bref)); + } + + if (ext) { + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(hnb_name_present, 1)); + + if (hnb_name_present) { + HANDLE_CODE(hnb_name.unpack(bref)); + } + + if (ext) { + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + } + return SRSASN_SUCCESS; +} +void sib_type9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hnb_name_present) { + j.write_str("hnb-Name", hnb_name.to_string()); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// PosSystemInformation-r15-IEs ::= SEQUENCE +pos_sys_info_r15_ies_s::pos_sys_info_r15_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE pos_sys_info_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, pos_sib_type_and_info_r15, 1, 32)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sys_info_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(pos_sib_type_and_info_r15, bref, 1, 32)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pos_sys_info_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("posSIB-TypeAndInfo-r15"); + for (uint32_t i1 = 0; i1 < pos_sib_type_and_info_r15.size(); ++i1) { + pos_sib_type_and_info_r15[i1].to_json(j); + } + j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +void pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::destroy_() +{ + switch (type_) { + case types::pos_sib1_minus1_r15: + c.destroy(); + break; + case types::pos_sib1_minus2_r15: + c.destroy(); + break; + case types::pos_sib1_minus3_r15: + c.destroy(); + break; + case types::pos_sib1_minus4_r15: + c.destroy(); + break; + case types::pos_sib1_minus5_r15: + c.destroy(); + break; + case types::pos_sib1_minus6_r15: + c.destroy(); + break; + case types::pos_sib1_minus7_r15: + c.destroy(); + break; + case types::pos_sib2_minus1_r15: + c.destroy(); + break; + case types::pos_sib2_minus2_r15: + c.destroy(); + break; + case types::pos_sib2_minus3_r15: + c.destroy(); + break; + case types::pos_sib2_minus4_r15: + c.destroy(); + break; + case types::pos_sib2_minus5_r15: + c.destroy(); + break; + case types::pos_sib2_minus6_r15: + c.destroy(); + break; + case types::pos_sib2_minus7_r15: + c.destroy(); + break; + case types::pos_sib2_minus8_r15: + c.destroy(); + break; + case types::pos_sib2_minus9_r15: + c.destroy(); + break; + case types::pos_sib2_minus10_r15: + c.destroy(); + break; + case types::pos_sib2_minus11_r15: + c.destroy(); + break; + case types::pos_sib2_minus12_r15: + c.destroy(); + break; + case types::pos_sib2_minus13_r15: + c.destroy(); + break; + case types::pos_sib2_minus14_r15: + c.destroy(); + break; + case types::pos_sib2_minus15_r15: + c.destroy(); + break; + case types::pos_sib2_minus16_r15: + c.destroy(); + break; + case types::pos_sib2_minus17_r15: + c.destroy(); + break; + case types::pos_sib2_minus18_r15: + c.destroy(); + break; + case types::pos_sib2_minus19_r15: + c.destroy(); + break; + case types::pos_sib3_minus1_r15: + c.destroy(); + break; + default: + break; + } +} +void pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::pos_sib1_minus1_r15: + c.init(); + break; + case types::pos_sib1_minus2_r15: + c.init(); + break; + case types::pos_sib1_minus3_r15: + c.init(); + break; + case types::pos_sib1_minus4_r15: + c.init(); + break; + case types::pos_sib1_minus5_r15: + c.init(); + break; + case types::pos_sib1_minus6_r15: + c.init(); + break; + case types::pos_sib1_minus7_r15: + c.init(); + break; + case types::pos_sib2_minus1_r15: + c.init(); + break; + case types::pos_sib2_minus2_r15: + c.init(); + break; + case types::pos_sib2_minus3_r15: + c.init(); + break; + case types::pos_sib2_minus4_r15: + c.init(); + break; + case types::pos_sib2_minus5_r15: + c.init(); + break; + case types::pos_sib2_minus6_r15: + c.init(); + break; + case types::pos_sib2_minus7_r15: + c.init(); + break; + case types::pos_sib2_minus8_r15: + c.init(); + break; + case types::pos_sib2_minus9_r15: + c.init(); + break; + case types::pos_sib2_minus10_r15: + c.init(); + break; + case types::pos_sib2_minus11_r15: + c.init(); + break; + case types::pos_sib2_minus12_r15: + c.init(); + break; + case types::pos_sib2_minus13_r15: + c.init(); + break; + case types::pos_sib2_minus14_r15: + c.init(); + break; + case types::pos_sib2_minus15_r15: + c.init(); + break; + case types::pos_sib2_minus16_r15: + c.init(); + break; + case types::pos_sib2_minus17_r15: + c.init(); + break; + case types::pos_sib2_minus18_r15: + c.init(); + break; + case types::pos_sib2_minus19_r15: + c.init(); + break; + case types::pos_sib3_minus1_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_"); + } +} +pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::pos_sib_type_and_info_r15_item_c_( + const pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::pos_sib1_minus1_r15: + c.init(other.c.get()); + break; + case types::pos_sib1_minus2_r15: + c.init(other.c.get()); + break; + case types::pos_sib1_minus3_r15: + c.init(other.c.get()); + break; + case types::pos_sib1_minus4_r15: + c.init(other.c.get()); + break; + case types::pos_sib1_minus5_r15: + c.init(other.c.get()); + break; + case types::pos_sib1_minus6_r15: + c.init(other.c.get()); + break; + case types::pos_sib1_minus7_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus1_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus2_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus3_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus4_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus5_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus6_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus7_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus8_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus9_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus10_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus11_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus12_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus13_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus14_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus15_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus16_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus17_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus18_r15: + c.init(other.c.get()); + break; + case types::pos_sib2_minus19_r15: + c.init(other.c.get()); + break; + case types::pos_sib3_minus1_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_"); + } +} +pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_& pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_:: + operator=(const pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pos_sib1_minus1_r15: + c.set(other.c.get()); + break; + case types::pos_sib1_minus2_r15: + c.set(other.c.get()); + break; + case types::pos_sib1_minus3_r15: + c.set(other.c.get()); + break; + case types::pos_sib1_minus4_r15: + c.set(other.c.get()); + break; + case types::pos_sib1_minus5_r15: + c.set(other.c.get()); + break; + case types::pos_sib1_minus6_r15: + c.set(other.c.get()); + break; + case types::pos_sib1_minus7_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus1_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus2_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus3_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus4_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus5_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus6_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus7_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus8_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus9_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus10_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus11_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus12_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus13_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus14_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus15_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus16_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus17_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus18_r15: + c.set(other.c.get()); + break; + case types::pos_sib2_minus19_r15: + c.set(other.c.get()); + break; + case types::pos_sib3_minus1_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_"); + } + + return *this; +} +void pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pos_sib1_minus1_r15: + j.write_fieldname("posSib1-1-r15"); + c.get().to_json(j); + break; + case types::pos_sib1_minus2_r15: + j.write_fieldname("posSib1-2-r15"); + c.get().to_json(j); + break; + case types::pos_sib1_minus3_r15: + j.write_fieldname("posSib1-3-r15"); + c.get().to_json(j); + break; + case types::pos_sib1_minus4_r15: + j.write_fieldname("posSib1-4-r15"); + c.get().to_json(j); + break; + case types::pos_sib1_minus5_r15: + j.write_fieldname("posSib1-5-r15"); + c.get().to_json(j); + break; + case types::pos_sib1_minus6_r15: + j.write_fieldname("posSib1-6-r15"); + c.get().to_json(j); + break; + case types::pos_sib1_minus7_r15: + j.write_fieldname("posSib1-7-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus1_r15: + j.write_fieldname("posSib2-1-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus2_r15: + j.write_fieldname("posSib2-2-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus3_r15: + j.write_fieldname("posSib2-3-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus4_r15: + j.write_fieldname("posSib2-4-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus5_r15: + j.write_fieldname("posSib2-5-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus6_r15: + j.write_fieldname("posSib2-6-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus7_r15: + j.write_fieldname("posSib2-7-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus8_r15: + j.write_fieldname("posSib2-8-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus9_r15: + j.write_fieldname("posSib2-9-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus10_r15: + j.write_fieldname("posSib2-10-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus11_r15: + j.write_fieldname("posSib2-11-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus12_r15: + j.write_fieldname("posSib2-12-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus13_r15: + j.write_fieldname("posSib2-13-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus14_r15: + j.write_fieldname("posSib2-14-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus15_r15: + j.write_fieldname("posSib2-15-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus16_r15: + j.write_fieldname("posSib2-16-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus17_r15: + j.write_fieldname("posSib2-17-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus18_r15: + j.write_fieldname("posSib2-18-r15"); + c.get().to_json(j); + break; + case types::pos_sib2_minus19_r15: + j.write_fieldname("posSib2-19-r15"); + c.get().to_json(j); + break; + case types::pos_sib3_minus1_r15: + j.write_fieldname("posSib3-1-r15"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_"); + } + j.end_obj(); +} +SRSASN_CODE pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::pos_sib1_minus1_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_minus2_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_minus3_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_minus4_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_minus5_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_minus6_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_minus7_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus1_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus2_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus3_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus4_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus5_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus6_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus7_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus8_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus9_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus10_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus11_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus12_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus13_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus14_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus15_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus16_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus17_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus18_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_minus19_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib3_minus1_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::pos_sib1_minus1_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_minus2_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_minus3_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_minus4_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_minus5_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_minus6_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_minus7_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus1_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus2_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus3_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus4_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus5_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus6_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus7_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus8_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus9_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus10_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus11_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus12_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus13_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus14_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus15_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus16_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus17_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus18_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_minus19_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib3_minus1_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sib_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: + c.destroy(); + break; + case types::sib11: + c.destroy(); + break; + case types::sib12_v920: + c.destroy(); + break; + case types::sib13_v920: + c.destroy(); + break; + case types::sib14_v1130: + c.destroy(); + break; + case types::sib15_v1130: + c.destroy(); + break; + case types::sib16_v1130: + c.destroy(); + break; + case types::sib17_v1250: + c.destroy(); + break; + case types::sib18_v1250: + c.destroy(); + break; + case types::sib19_v1250: + c.destroy(); + break; + case types::sib20_v1310: + c.destroy(); + break; + case types::sib21_v1430: + c.destroy(); + break; + case types::sib24_v1530: + c.destroy(); + break; + case types::sib25_v1530: + c.destroy(); + break; + case types::sib26_v1530: + c.destroy(); + break; + default: + break; + } +} +void sib_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: + c.init(); + break; + case types::sib11: + c.init(); + break; + case types::sib12_v920: + c.init(); + break; + case types::sib13_v920: + c.init(); + break; + case types::sib14_v1130: + c.init(); + break; + case types::sib15_v1130: + c.init(); + break; + case types::sib16_v1130: + c.init(); + break; + case types::sib17_v1250: + c.init(); + break; + case types::sib18_v1250: + c.init(); + break; + case types::sib19_v1250: + c.init(); + break; + case types::sib20_v1310: + c.init(); + break; + case types::sib21_v1430: + c.init(); + break; + case types::sib24_v1530: + c.init(); + break; + case types::sib25_v1530: + c.init(); + break; + case types::sib26_v1530: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_info_item_c"); + } +} +sib_info_item_c::sib_info_item_c(const sib_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: + c.init(other.c.get()); + break; + case types::sib11: + c.init(other.c.get()); + break; + case types::sib12_v920: + c.init(other.c.get()); + break; + case types::sib13_v920: + c.init(other.c.get()); + break; + case types::sib14_v1130: + c.init(other.c.get()); + break; + case types::sib15_v1130: + c.init(other.c.get()); + break; + case types::sib16_v1130: + c.init(other.c.get()); + break; + case types::sib17_v1250: + c.init(other.c.get()); + break; + case types::sib18_v1250: + c.init(other.c.get()); + break; + case types::sib19_v1250: + c.init(other.c.get()); + break; + case types::sib20_v1310: + c.init(other.c.get()); + break; + case types::sib21_v1430: + c.init(other.c.get()); + break; + case types::sib24_v1530: + c.init(other.c.get()); + break; + case types::sib25_v1530: + c.init(other.c.get()); + break; + case types::sib26_v1530: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_info_item_c"); + } +} +sib_info_item_c& sib_info_item_c::operator=(const sib_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: + c.set(other.c.get()); + break; + case types::sib11: + c.set(other.c.get()); + break; + case types::sib12_v920: + c.set(other.c.get()); + break; + case types::sib13_v920: + c.set(other.c.get()); + break; + case types::sib14_v1130: + c.set(other.c.get()); + break; + case types::sib15_v1130: + c.set(other.c.get()); + break; + case types::sib16_v1130: + c.set(other.c.get()); + break; + case types::sib17_v1250: + c.set(other.c.get()); + break; + case types::sib18_v1250: + c.set(other.c.get()); + break; + case types::sib19_v1250: + c.set(other.c.get()); + break; + case types::sib20_v1310: + c.set(other.c.get()); + break; + case types::sib21_v1430: + c.set(other.c.get()); + break; + case types::sib24_v1530: + c.set(other.c.get()); + break; + case types::sib25_v1530: + c.set(other.c.get()); + break; + case types::sib26_v1530: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_info_item_c"); + } + + return *this; +} +void sib_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: + j.write_fieldname("sib10"); + c.get().to_json(j); + break; + case types::sib11: + j.write_fieldname("sib11"); + c.get().to_json(j); + break; + case types::sib12_v920: + j.write_fieldname("sib12-v920"); + c.get().to_json(j); + break; + case types::sib13_v920: + j.write_fieldname("sib13-v920"); + c.get().to_json(j); + break; + case types::sib14_v1130: + j.write_fieldname("sib14-v1130"); + c.get().to_json(j); + break; + case types::sib15_v1130: + j.write_fieldname("sib15-v1130"); + c.get().to_json(j); + break; + case types::sib16_v1130: + j.write_fieldname("sib16-v1130"); + c.get().to_json(j); + break; + case types::sib17_v1250: + j.write_fieldname("sib17-v1250"); + c.get().to_json(j); + break; + case types::sib18_v1250: + j.write_fieldname("sib18-v1250"); + c.get().to_json(j); + break; + case types::sib19_v1250: + j.write_fieldname("sib19-v1250"); + c.get().to_json(j); + break; + case types::sib20_v1310: + j.write_fieldname("sib20-v1310"); + c.get().to_json(j); + break; + case types::sib21_v1430: + j.write_fieldname("sib21-v1430"); + c.get().to_json(j); + break; + case types::sib24_v1530: + j.write_fieldname("sib24-v1530"); + c.get().to_json(j); + break; + case types::sib25_v1530: + j.write_fieldname("sib25-v1530"); + c.get().to_json(j); + break; + case types::sib26_v1530: + j.write_fieldname("sib26-v1530"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "sib_info_item_c"); + } + j.end_obj(); +} +SRSASN_CODE sib_info_item_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + 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: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib11: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib12_v920: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib13_v920: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib14_v1130: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib15_v1130: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib16_v1130: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib17_v1250: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib18_v1250: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib19_v1250: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib20_v1310: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib21_v1430: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib24_v1530: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib25_v1530: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib26_v1530: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "sib_info_item_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_info_item_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, 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: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib11: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib12_v920: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib13_v920: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib14_v1130: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib15_v1130: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib16_v1130: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib17_v1250: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib18_v1250: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib19_v1250: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib20_v1310: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib21_v1430: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib24_v1530: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib25_v1530: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib26_v1530: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "sib_info_item_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformation-r8-IEs ::= SEQUENCE +sys_info_r8_ies_s::sys_info_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE sys_info_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, sib_type_and_info, 1, 32)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(sib_type_and_info, bref, 1, 32)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sys_info_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("sib-TypeAndInfo"); + for (uint32_t i1 = 0; i1 < sib_type_and_info.size(); ++i1) { + sib_type_and_info[i1].to_json(j); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformationBlockType1-v890-IEs ::= SEQUENCE +sib_type1_v890_ies_s::sib_type1_v890_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_v890_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_v890_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_v890_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// 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(bit_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_r8: + c.destroy(); + break; + case types::crit_exts_future_r15: + 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_r8: + c.init(); + break; + case types::crit_exts_future_r15: + 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_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future_r15: + 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_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + } + + return *this; +} +void sys_info_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sys_info_r8: + j.write_fieldname("systemInformation-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future_r15: + j.write_fieldname("criticalExtensionsFuture-r15"); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::sys_info_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future_r15: + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sys_info_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future_r15: + 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_r15_c_::destroy_() +{ + switch (type_) { + case types::pos_sys_info_r15: + c.destroy(); + break; + default: + break; + } +} +void sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::pos_sys_info_r15: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_"); + } +} +sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::crit_exts_future_r15_c_( + const sys_info_s::crit_exts_c_::crit_exts_future_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::pos_sys_info_r15: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_"); + } +} +sys_info_s::crit_exts_c_::crit_exts_future_r15_c_& sys_info_s::crit_exts_c_::crit_exts_future_r15_c_:: + operator=(const sys_info_s::crit_exts_c_::crit_exts_future_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pos_sys_info_r15: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_"); + } + + return *this; +} +void sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pos_sys_info_r15: + j.write_fieldname("posSystemInformation-r15"); + c.get().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_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::pos_sys_info_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::pos_sys_info_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SystemInformationBlockType1 ::= SEQUENCE +sib_type1_s::sib_type1_s() +{ + p_max_present = false; + tdd_cfg_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(tdd_cfg_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.pack(cell_access_related_info.csg_id_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, cell_access_related_info.plmn_id_list, 1, 6)); + HANDLE_CODE(cell_access_related_info.tac.pack(bref)); + HANDLE_CODE(cell_access_related_info.cell_id.pack(bref)); + HANDLE_CODE(pack_enum(bref, cell_access_related_info.cell_barred)); + HANDLE_CODE(pack_enum(bref, cell_access_related_info.intra_freq_resel)); + HANDLE_CODE(bref.pack(cell_access_related_info.csg_ind, 1)); + if (cell_access_related_info.csg_id_present) { + HANDLE_CODE(cell_access_related_info.csg_id.pack(bref)); + } + HANDLE_CODE(bref.pack(cell_sel_info.q_rx_lev_min_offset_present, 1)); + HANDLE_CODE(pack_unalign_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_unalign_integer(bref, cell_sel_info.q_rx_lev_min_offset, (uint8_t)1, (uint8_t)8)); + } + if (p_max_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_unalign_integer(bref, freq_band_ind, (uint8_t)1, (uint8_t)64)); + HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list, 1, 32)); + if (tdd_cfg_present) { + HANDLE_CODE(tdd_cfg.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, si_win_len)); + HANDLE_CODE(pack_unalign_integer(bref, sys_info_value_tag, (uint8_t)0, (uint8_t)31)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(tdd_cfg_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.unpack(cell_access_related_info.csg_id_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(cell_access_related_info.plmn_id_list, bref, 1, 6)); + HANDLE_CODE(cell_access_related_info.tac.unpack(bref)); + HANDLE_CODE(cell_access_related_info.cell_id.unpack(bref)); + HANDLE_CODE(unpack_enum(cell_access_related_info.cell_barred, bref)); + HANDLE_CODE(unpack_enum(cell_access_related_info.intra_freq_resel, bref)); + HANDLE_CODE(bref.unpack(cell_access_related_info.csg_ind, 1)); + if (cell_access_related_info.csg_id_present) { + HANDLE_CODE(cell_access_related_info.csg_id.unpack(bref)); + } + HANDLE_CODE(bref.unpack(cell_sel_info.q_rx_lev_min_offset_present, 1)); + HANDLE_CODE(unpack_unalign_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_unalign_integer(cell_sel_info.q_rx_lev_min_offset, bref, (uint8_t)1, (uint8_t)8)); + } + if (p_max_present) { + HANDLE_CODE(unpack_unalign_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_unalign_integer(freq_band_ind, bref, (uint8_t)1, (uint8_t)64)); + HANDLE_CODE(unpack_dyn_seq_of(sched_info_list, bref, 1, 32)); + if (tdd_cfg_present) { + HANDLE_CODE(tdd_cfg.unpack(bref)); + } + HANDLE_CODE(unpack_enum(si_win_len, bref)); + HANDLE_CODE(unpack_unalign_integer(sys_info_value_tag, bref, (uint8_t)0, (uint8_t)31)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cellAccessRelatedInfo"); + j.start_obj(); + j.start_array("plmn-IdentityList"); + for (uint32_t i1 = 0; i1 < cell_access_related_info.plmn_id_list.size(); ++i1) { + cell_access_related_info.plmn_id_list[i1].to_json(j); + } + j.end_array(); + j.write_str("trackingAreaCode", cell_access_related_info.tac.to_string()); + j.write_str("cellIdentity", cell_access_related_info.cell_id.to_string()); + j.write_str("cellBarred", cell_access_related_info.cell_barred.to_string()); + j.write_str("intraFreqReselection", cell_access_related_info.intra_freq_resel.to_string()); + j.write_bool("csg-Indication", cell_access_related_info.csg_ind); + if (cell_access_related_info.csg_id_present) { + j.write_str("csg-Identity", cell_access_related_info.csg_id.to_string()); + } + j.end_obj(); + 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); + } + j.end_obj(); + if (p_max_present) { + j.write_int("p-Max", p_max); + } + j.write_int("freqBandIndicator", freq_band_ind); + j.start_array("schedulingInfoList"); + for (uint32_t i1 = 0; i1 < sched_info_list.size(); ++i1) { + sched_info_list[i1].to_json(j); + } + j.end_array(); + if (tdd_cfg_present) { + j.write_fieldname("tdd-Config"); + tdd_cfg.to_json(j); + } + j.write_str("si-WindowLength", si_win_len.to_string()); + j.write_int("systemInfoValueTag", sys_info_value_tag); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +sib_type1_s::cell_access_related_info_s_::cell_access_related_info_s_() +{ + csg_id_present = false; +} + +sib_type1_s::cell_sel_info_s_::cell_sel_info_s_() +{ + q_rx_lev_min_offset_present = false; +} + +// BCCH-DL-SCH-MessageType ::= CHOICE +void bcch_dl_sch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void bcch_dl_sch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); + } +} +bcch_dl_sch_msg_type_c::bcch_dl_sch_msg_type_c(const bcch_dl_sch_msg_type_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); + } +} +bcch_dl_sch_msg_type_c& bcch_dl_sch_msg_type_c::operator=(const bcch_dl_sch_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: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); + } + + return *this; +} +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.get().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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "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; +} +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 +{ + pack_enum(bref, type_); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, 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; +} + +// 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(bit_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(); +} + +// BCCH-DL-SCH-MessageType-BR-r13 ::= CHOICE +void bcch_dl_sch_msg_type_br_r13_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void bcch_dl_sch_msg_type_br_r13_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c"); + } +} +bcch_dl_sch_msg_type_br_r13_c::bcch_dl_sch_msg_type_br_r13_c(const bcch_dl_sch_msg_type_br_r13_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c"); + } +} +bcch_dl_sch_msg_type_br_r13_c& bcch_dl_sch_msg_type_br_r13_c::operator=(const bcch_dl_sch_msg_type_br_r13_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: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c"); + } + + return *this; +} +void bcch_dl_sch_msg_type_br_r13_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: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE bcch_dl_sch_msg_type_br_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_type_br_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void bcch_dl_sch_msg_type_br_r13_c::c1_c_::destroy_() +{ + switch (type_) { + case types::sys_info_br_r13: + c.destroy(); + break; + case types::sib_type1_br_r13: + c.destroy(); + break; + default: + break; + } +} +void bcch_dl_sch_msg_type_br_r13_c::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sys_info_br_r13: + c.init(); + break; + case types::sib_type1_br_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c::c1_c_"); + } +} +bcch_dl_sch_msg_type_br_r13_c::c1_c_::c1_c_(const bcch_dl_sch_msg_type_br_r13_c::c1_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sys_info_br_r13: + c.init(other.c.get()); + break; + case types::sib_type1_br_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c::c1_c_"); + } +} +bcch_dl_sch_msg_type_br_r13_c::c1_c_& bcch_dl_sch_msg_type_br_r13_c::c1_c_:: + operator=(const bcch_dl_sch_msg_type_br_r13_c::c1_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sys_info_br_r13: + c.set(other.c.get()); + break; + case types::sib_type1_br_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c::c1_c_"); + } + + return *this; +} +void bcch_dl_sch_msg_type_br_r13_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sys_info_br_r13: + j.write_fieldname("systemInformation-BR-r13"); + c.get().to_json(j); + break; + case types::sib_type1_br_r13: + j.write_fieldname("systemInformationBlockType1-BR-r13"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE bcch_dl_sch_msg_type_br_r13_c::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sys_info_br_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib_type1_br_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_type_br_r13_c::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sys_info_br_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib_type1_br_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_br_r13_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// BCCH-DL-SCH-Message-BR ::= SEQUENCE +SRSASN_CODE bcch_dl_sch_msg_br_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_br_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void bcch_dl_sch_msg_br_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("BCCH-DL-SCH-Message-BR"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// SchedulingInfo-MBMS-r14 ::= SEQUENCE +SRSASN_CODE sched_info_mbms_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, si_periodicity_r14)); + HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_r14, 0, 31, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info_mbms_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(si_periodicity_r14, bref)); + HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_r14, bref, 0, 31, EnumPacker())); + + return SRSASN_SUCCESS; +} +void sched_info_mbms_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("si-Periodicity-r14", si_periodicity_r14.to_string()); + j.start_array("sib-MappingInfo-r14"); + for (uint32_t i1 = 0; i1 < sib_map_info_r14.size(); ++i1) { + j.write_str(sib_map_info_r14[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// NonMBSFN-SubframeConfig-r14 ::= SEQUENCE +SRSASN_CODE non_mbsfn_sf_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, radio_frame_alloc_period_r14)); + HANDLE_CODE(pack_unalign_integer(bref, radio_frame_alloc_offset_r14, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(sf_alloc_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE non_mbsfn_sf_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(radio_frame_alloc_period_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(radio_frame_alloc_offset_r14, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(sf_alloc_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void non_mbsfn_sf_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("radioFrameAllocationPeriod-r14", radio_frame_alloc_period_r14.to_string()); + j.write_int("radioFrameAllocationOffset-r14", radio_frame_alloc_offset_r14); + j.write_str("subframeAllocation-r14", sf_alloc_r14.to_string()); + j.end_obj(); +} + +// SystemInformationBlockType1-MBMS-r14 ::= SEQUENCE +sib_type1_mbms_r14_s::sib_type1_mbms_r14_s() +{ + multi_band_info_list_r14_present = false; + non_mbsfn_sf_cfg_r14_present = false; + sib_type13_r14_present = false; + cell_access_related_info_list_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sib_type1_mbms_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_band_info_list_r14_present, 1)); + HANDLE_CODE(bref.pack(non_mbsfn_sf_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(sib_type13_r14_present, 1)); + HANDLE_CODE(bref.pack(cell_access_related_info_list_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, cell_access_related_info_r14.plmn_id_list_r14, 1, 6)); + HANDLE_CODE(cell_access_related_info_r14.tac_r14.pack(bref)); + HANDLE_CODE(cell_access_related_info_r14.cell_id_r14.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, freq_band_ind_r14, (uint16_t)1, (uint16_t)256)); + if (multi_band_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list_r14, 1, 8, UnalignedIntegerPacker(1, 256))); + } + HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list_mbms_r14, 1, 32)); + HANDLE_CODE(pack_enum(bref, si_win_len_r14)); + HANDLE_CODE(pack_unalign_integer(bref, sys_info_value_tag_r14, (uint8_t)0, (uint8_t)31)); + if (non_mbsfn_sf_cfg_r14_present) { + HANDLE_CODE(non_mbsfn_sf_cfg_r14.pack(bref)); + } + HANDLE_CODE(pdsch_cfg_common_r14.pack(bref)); + if (sib_type13_r14_present) { + HANDLE_CODE(sib_type13_r14.pack(bref)); + } + if (cell_access_related_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cell_access_related_info_list_r14, 1, 5)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type1_mbms_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_band_info_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_mbsfn_sf_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(sib_type13_r14_present, 1)); + HANDLE_CODE(bref.unpack(cell_access_related_info_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(cell_access_related_info_r14.plmn_id_list_r14, bref, 1, 6)); + HANDLE_CODE(cell_access_related_info_r14.tac_r14.unpack(bref)); + HANDLE_CODE(cell_access_related_info_r14.cell_id_r14.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(freq_band_ind_r14, bref, (uint16_t)1, (uint16_t)256)); + if (multi_band_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(multi_band_info_list_r14, bref, 1, 8, UnalignedIntegerPacker(1, 256))); + } + HANDLE_CODE(unpack_dyn_seq_of(sched_info_list_mbms_r14, bref, 1, 32)); + HANDLE_CODE(unpack_enum(si_win_len_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(sys_info_value_tag_r14, bref, (uint8_t)0, (uint8_t)31)); + if (non_mbsfn_sf_cfg_r14_present) { + HANDLE_CODE(non_mbsfn_sf_cfg_r14.unpack(bref)); + } + HANDLE_CODE(pdsch_cfg_common_r14.unpack(bref)); + if (sib_type13_r14_present) { + HANDLE_CODE(sib_type13_r14.unpack(bref)); + } + if (cell_access_related_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(cell_access_related_info_list_r14, bref, 1, 5)); + } + + return SRSASN_SUCCESS; +} +void sib_type1_mbms_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cellAccessRelatedInfo-r14"); + j.start_obj(); + j.start_array("plmn-IdentityList-r14"); + for (uint32_t i1 = 0; i1 < cell_access_related_info_r14.plmn_id_list_r14.size(); ++i1) { + cell_access_related_info_r14.plmn_id_list_r14[i1].to_json(j); + } + j.end_array(); + j.write_str("trackingAreaCode-r14", cell_access_related_info_r14.tac_r14.to_string()); + j.write_str("cellIdentity-r14", cell_access_related_info_r14.cell_id_r14.to_string()); + j.end_obj(); + j.write_int("freqBandIndicator-r14", freq_band_ind_r14); + if (multi_band_info_list_r14_present) { + j.start_array("multiBandInfoList-r14"); + for (uint32_t i1 = 0; i1 < multi_band_info_list_r14.size(); ++i1) { + j.write_int(multi_band_info_list_r14[i1]); + } + j.end_array(); + } + j.start_array("schedulingInfoList-MBMS-r14"); + for (uint32_t i1 = 0; i1 < sched_info_list_mbms_r14.size(); ++i1) { + sched_info_list_mbms_r14[i1].to_json(j); + } + j.end_array(); + j.write_str("si-WindowLength-r14", si_win_len_r14.to_string()); + j.write_int("systemInfoValueTag-r14", sys_info_value_tag_r14); + if (non_mbsfn_sf_cfg_r14_present) { + j.write_fieldname("nonMBSFN-SubframeConfig-r14"); + non_mbsfn_sf_cfg_r14.to_json(j); + } + j.write_fieldname("pdsch-ConfigCommon-r14"); + pdsch_cfg_common_r14.to_json(j); + if (sib_type13_r14_present) { + j.write_fieldname("systemInformationBlockType13-r14"); + sib_type13_r14.to_json(j); + } + if (cell_access_related_info_list_r14_present) { + j.start_array("cellAccessRelatedInfoList-r14"); + for (uint32_t i1 = 0; i1 < cell_access_related_info_list_r14.size(); ++i1) { + cell_access_related_info_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE +void bcch_dl_sch_msg_type_mbms_r14_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void bcch_dl_sch_msg_type_mbms_r14_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c"); + } +} +bcch_dl_sch_msg_type_mbms_r14_c::bcch_dl_sch_msg_type_mbms_r14_c(const bcch_dl_sch_msg_type_mbms_r14_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c"); + } +} +bcch_dl_sch_msg_type_mbms_r14_c& bcch_dl_sch_msg_type_mbms_r14_c:: + operator=(const bcch_dl_sch_msg_type_mbms_r14_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: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c"); + } + + return *this; +} +void bcch_dl_sch_msg_type_mbms_r14_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: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE bcch_dl_sch_msg_type_mbms_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_type_mbms_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::destroy_() +{ + switch (type_) { + case types::sys_info_mbms_r14: + c.destroy(); + break; + case types::sib_type1_mbms_r14: + c.destroy(); + break; + default: + break; + } +} +void bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sys_info_mbms_r14: + c.init(); + break; + case types::sib_type1_mbms_r14: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_"); + } +} +bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::c1_c_(const bcch_dl_sch_msg_type_mbms_r14_c::c1_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sys_info_mbms_r14: + c.init(other.c.get()); + break; + case types::sib_type1_mbms_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_"); + } +} +bcch_dl_sch_msg_type_mbms_r14_c::c1_c_& bcch_dl_sch_msg_type_mbms_r14_c::c1_c_:: + operator=(const bcch_dl_sch_msg_type_mbms_r14_c::c1_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sys_info_mbms_r14: + c.set(other.c.get()); + break; + case types::sib_type1_mbms_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_"); + } + + return *this; +} +void bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sys_info_mbms_r14: + j.write_fieldname("systemInformation-MBMS-r14"); + c.get().to_json(j); + break; + case types::sib_type1_mbms_r14: + j.write_fieldname("systemInformationBlockType1-MBMS-r14"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sys_info_mbms_r14: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib_type1_mbms_r14: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sys_info_mbms_r14: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib_type1_mbms_r14: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// BCCH-DL-SCH-Message-MBMS ::= SEQUENCE +SRSASN_CODE bcch_dl_sch_msg_mbms_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_mbms_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void bcch_dl_sch_msg_mbms_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("BCCH-DL-SCH-Message-MBMS"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// P-C-AndCBSR-r13 ::= SEQUENCE +p_c_and_cbsr_r13_s::p_c_and_cbsr_r13_s() +{ + ext = false; +} +SRSASN_CODE p_c_and_cbsr_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, p_c_r13, (int8_t)-8, (int8_t)15)); + HANDLE_CODE(cbsr_sel_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE p_c_and_cbsr_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(p_c_r13, bref, (int8_t)-8, (int8_t)15)); + HANDLE_CODE(cbsr_sel_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void p_c_and_cbsr_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p-C-r13", p_c_r13); + j.write_fieldname("cbsr-Selection-r13"); + cbsr_sel_r13.to_json(j); + j.end_obj(); +} + +void p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::destroy_() +{ + switch (type_) { + case types::non_precoded_r13: + c.destroy(); + break; + case types::beamformed_k1a_r13: + c.destroy(); + break; + case types::beamformed_kn_r13: + c.destroy(); + break; + default: + break; + } +} +void p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::non_precoded_r13: + c.init(); + break; + case types::beamformed_k1a_r13: + c.init(); + break; + case types::beamformed_kn_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_"); + } +} +p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::cbsr_sel_r13_c_(const p_c_and_cbsr_r13_s::cbsr_sel_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::non_precoded_r13: + c.init(other.c.get()); + break; + case types::beamformed_k1a_r13: + c.init(other.c.get()); + break; + case types::beamformed_kn_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_"); + } +} +p_c_and_cbsr_r13_s::cbsr_sel_r13_c_& p_c_and_cbsr_r13_s::cbsr_sel_r13_c_:: + operator=(const p_c_and_cbsr_r13_s::cbsr_sel_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::non_precoded_r13: + c.set(other.c.get()); + break; + case types::beamformed_k1a_r13: + c.set(other.c.get()); + break; + case types::beamformed_kn_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_"); + } + + return *this; +} +void p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::non_precoded_r13: + j.write_fieldname("nonPrecoded-r13"); + j.start_obj(); + j.write_str("codebookSubsetRestriction1-r13", + c.get().codebook_subset_restrict1_r13.to_string()); + j.write_str("codebookSubsetRestriction2-r13", + c.get().codebook_subset_restrict2_r13.to_string()); + j.end_obj(); + break; + case types::beamformed_k1a_r13: + j.write_fieldname("beamformedK1a-r13"); + j.start_obj(); + j.write_str("codebookSubsetRestriction3-r13", + c.get().codebook_subset_restrict3_r13.to_string()); + j.end_obj(); + break; + case types::beamformed_kn_r13: + j.write_fieldname("beamformedKN-r13"); + j.start_obj(); + j.write_str("codebookSubsetRestriction-r13", + c.get().codebook_subset_restrict_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::non_precoded_r13: + HANDLE_CODE(c.get().codebook_subset_restrict1_r13.pack(bref)); + HANDLE_CODE(c.get().codebook_subset_restrict2_r13.pack(bref)); + break; + case types::beamformed_k1a_r13: + HANDLE_CODE(c.get().codebook_subset_restrict3_r13.pack(bref)); + break; + case types::beamformed_kn_r13: + HANDLE_CODE(c.get().codebook_subset_restrict_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::non_precoded_r13: + HANDLE_CODE(c.get().codebook_subset_restrict1_r13.unpack(bref)); + HANDLE_CODE(c.get().codebook_subset_restrict2_r13.unpack(bref)); + break; + case types::beamformed_k1a_r13: + HANDLE_CODE(c.get().codebook_subset_restrict3_r13.unpack(bref)); + break; + case types::beamformed_kn_r13: + HANDLE_CODE(c.get().codebook_subset_restrict_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-Config-NZP-v1430 ::= SEQUENCE +csi_rs_cfg_nzp_v1430_s::csi_rs_cfg_nzp_v1430_s() +{ + tx_comb_r14_present = false; + freq_density_r14_present = false; +} +SRSASN_CODE csi_rs_cfg_nzp_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_comb_r14_present, 1)); + HANDLE_CODE(bref.pack(freq_density_r14_present, 1)); + + if (tx_comb_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_comb_r14, (uint8_t)0, (uint8_t)2)); + } + if (freq_density_r14_present) { + HANDLE_CODE(pack_enum(bref, freq_density_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_comb_r14_present, 1)); + HANDLE_CODE(bref.unpack(freq_density_r14_present, 1)); + + if (tx_comb_r14_present) { + HANDLE_CODE(unpack_unalign_integer(tx_comb_r14, bref, (uint8_t)0, (uint8_t)2)); + } + if (freq_density_r14_present) { + HANDLE_CODE(unpack_enum(freq_density_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_nzp_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_comb_r14_present) { + j.write_int("transmissionComb-r14", tx_comb_r14); + } + if (freq_density_r14_present) { + j.write_str("frequencyDensity-r14", freq_density_r14.to_string()); + } + j.end_obj(); +} + +// CSI-RS-ConfigNZP-Activation-r14 ::= SEQUENCE +SRSASN_CODE csi_rs_cfg_nzp_activation_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, csi_rs_nzp_mode_r14)); + HANDLE_CODE(pack_unalign_integer(bref, activ_res_r14, (uint8_t)0, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_activation_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(csi_rs_nzp_mode_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(activ_res_r14, bref, (uint8_t)0, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_nzp_activation_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("csi-RS-NZP-mode-r14", csi_rs_nzp_mode_r14.to_string()); + j.write_int("activatedResources-r14", activ_res_r14); + j.end_obj(); +} + +// CSI-RS-ConfigNZP-r11 ::= SEQUENCE +csi_rs_cfg_nzp_r11_s::csi_rs_cfg_nzp_r11_s() +{ + ext = false; + qcl_crs_info_r11_present = false; + csi_rs_cfg_nzp_id_v1310_present = false; + tx_comb_r14_present = false; + freq_density_r14_present = false; + mbsfn_sf_cfg_list_v1430_present = false; +} +SRSASN_CODE csi_rs_cfg_nzp_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(qcl_crs_info_r11_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, csi_rs_cfg_nzp_id_r11, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(pack_enum(bref, ant_ports_count_r11)); + HANDLE_CODE(pack_unalign_integer(bref, res_cfg_r11, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, sf_cfg_r11, (uint8_t)0, (uint8_t)154)); + HANDLE_CODE(pack_unalign_integer(bref, scrambling_id_r11, (uint16_t)0, (uint16_t)503)); + if (qcl_crs_info_r11_present) { + HANDLE_CODE(bref.pack(qcl_crs_info_r11.mbsfn_sf_cfg_list_r11_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, qcl_crs_info_r11.qcl_scrambling_id_r11, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, qcl_crs_info_r11.crs_ports_count_r11)); + if (qcl_crs_info_r11.mbsfn_sf_cfg_list_r11_present) { + HANDLE_CODE(qcl_crs_info_r11.mbsfn_sf_cfg_list_r11.pack(bref)); + } + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags[0] |= csi_rs_cfg_nzp_id_v1310_present; + group_flags[1] |= tx_comb_r14_present; + group_flags[1] |= freq_density_r14_present; + rrc_asn1_warn_assert(mbsfn_sf_cfg_list_v1430_present != (mbsfn_sf_cfg_list_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= mbsfn_sf_cfg_list_v1430_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_id_v1310_present, 1)); + if (csi_rs_cfg_nzp_id_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, csi_rs_cfg_nzp_id_v1310, (uint8_t)4, (uint8_t)24)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(tx_comb_r14_present, 1)); + HANDLE_CODE(bref.pack(freq_density_r14_present, 1)); + if (tx_comb_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_comb_r14, (uint8_t)0, (uint8_t)2)); + } + if (freq_density_r14_present) { + HANDLE_CODE(pack_enum(bref, freq_density_r14)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + HANDLE_CODE(mbsfn_sf_cfg_list_v1430->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(qcl_crs_info_r11_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(csi_rs_cfg_nzp_id_r11, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(unpack_enum(ant_ports_count_r11, bref)); + HANDLE_CODE(unpack_unalign_integer(res_cfg_r11, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(sf_cfg_r11, bref, (uint8_t)0, (uint8_t)154)); + HANDLE_CODE(unpack_unalign_integer(scrambling_id_r11, bref, (uint16_t)0, (uint16_t)503)); + if (qcl_crs_info_r11_present) { + HANDLE_CODE(bref.unpack(qcl_crs_info_r11.mbsfn_sf_cfg_list_r11_present, 1)); + HANDLE_CODE(unpack_unalign_integer(qcl_crs_info_r11.qcl_scrambling_id_r11, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(qcl_crs_info_r11.crs_ports_count_r11, bref)); + if (qcl_crs_info_r11.mbsfn_sf_cfg_list_r11_present) { + HANDLE_CODE(qcl_crs_info_r11.mbsfn_sf_cfg_list_r11.unpack(bref)); + } + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_id_v1310_present, 1)); + if (csi_rs_cfg_nzp_id_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(csi_rs_cfg_nzp_id_v1310, bref, (uint8_t)4, (uint8_t)24)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(tx_comb_r14_present, 1)); + HANDLE_CODE(bref.unpack(freq_density_r14_present, 1)); + if (tx_comb_r14_present) { + HANDLE_CODE(unpack_unalign_integer(tx_comb_r14, bref, (uint8_t)0, (uint8_t)2)); + } + if (freq_density_r14_present) { + HANDLE_CODE(unpack_enum(freq_density_r14, bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + mbsfn_sf_cfg_list_v1430 = make_copy_ptr(mbsfn_sf_cfg_list_v1430_c_()); + HANDLE_CODE(mbsfn_sf_cfg_list_v1430->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void csi_rs_cfg_nzp_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-RS-ConfigNZPId-r11", csi_rs_cfg_nzp_id_r11); + j.write_str("antennaPortsCount-r11", ant_ports_count_r11.to_string()); + j.write_int("resourceConfig-r11", res_cfg_r11); + j.write_int("subframeConfig-r11", sf_cfg_r11); + j.write_int("scramblingIdentity-r11", scrambling_id_r11); + if (qcl_crs_info_r11_present) { + j.write_fieldname("qcl-CRS-Info-r11"); + j.start_obj(); + j.write_int("qcl-ScramblingIdentity-r11", qcl_crs_info_r11.qcl_scrambling_id_r11); + j.write_str("crs-PortsCount-r11", qcl_crs_info_r11.crs_ports_count_r11.to_string()); + if (qcl_crs_info_r11.mbsfn_sf_cfg_list_r11_present) { + j.write_fieldname("mbsfn-SubframeConfigList-r11"); + qcl_crs_info_r11.mbsfn_sf_cfg_list_r11.to_json(j); + } + j.end_obj(); + } + if (csi_rs_cfg_nzp_id_v1310_present) { + j.write_int("csi-RS-ConfigNZPId-v1310", csi_rs_cfg_nzp_id_v1310); + } + if (tx_comb_r14_present) { + j.write_int("transmissionComb-r14", tx_comb_r14); + } + if (freq_density_r14_present) { + j.write_str("frequencyDensity-r14", freq_density_r14.to_string()); + } + if (mbsfn_sf_cfg_list_v1430_present) { + j.write_fieldname("mbsfn-SubframeConfigList-v1430"); + mbsfn_sf_cfg_list_v1430->to_json(j); + } + j.end_obj(); +} + +csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::qcl_crs_info_r11_s_() +{ + mbsfn_sf_cfg_list_r11_present = false; +} + +void csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_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.start_array("subframeConfigList"); + for (uint32_t i1 = 0; i1 < c.sf_cfg_list.size(); ++i1) { + c.sf_cfg_list[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.sf_cfg_list, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.sf_cfg_list, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_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.start_array("subframeConfigList-v1430"); + for (uint32_t i1 = 0; i1 < c.sf_cfg_list_v1430.size(); ++i1) { + c.sf_cfg_list_v1430[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.sf_cfg_list_v1430, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.sf_cfg_list_v1430, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// NZP-ResourceConfig-r13 ::= SEQUENCE +nzp_res_cfg_r13_s::nzp_res_cfg_r13_s() +{ + ext = false; + tx_comb_r14_present = false; + freq_density_r14_present = false; +} +SRSASN_CODE nzp_res_cfg_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, res_cfg_r13, (uint8_t)0, (uint8_t)31)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= tx_comb_r14_present; + group_flags[0] |= freq_density_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(tx_comb_r14_present, 1)); + HANDLE_CODE(bref.pack(freq_density_r14_present, 1)); + if (tx_comb_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_comb_r14, (uint8_t)0, (uint8_t)2)); + } + if (freq_density_r14_present) { + HANDLE_CODE(pack_enum(bref, freq_density_r14)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE nzp_res_cfg_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(res_cfg_r13, bref, (uint8_t)0, (uint8_t)31)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(tx_comb_r14_present, 1)); + HANDLE_CODE(bref.unpack(freq_density_r14_present, 1)); + if (tx_comb_r14_present) { + HANDLE_CODE(unpack_unalign_integer(tx_comb_r14, bref, (uint8_t)0, (uint8_t)2)); + } + if (freq_density_r14_present) { + HANDLE_CODE(unpack_enum(freq_density_r14, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void nzp_res_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("resourceConfig-r13", res_cfg_r13); + if (tx_comb_r14_present) { + j.write_int("transmissionComb-r14", tx_comb_r14); + } + if (freq_density_r14_present) { + j.write_str("frequencyDensity-r14", freq_density_r14.to_string()); + } + j.end_obj(); +} + +// P-C-AndCBSR-r15 ::= SEQUENCE +SRSASN_CODE p_c_and_cbsr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, p_c_r15, (int8_t)-8, (int8_t)15)); + HANDLE_CODE(codebook_subset_restrict4_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE p_c_and_cbsr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(p_c_r15, bref, (int8_t)-8, (int8_t)15)); + HANDLE_CODE(codebook_subset_restrict4_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void p_c_and_cbsr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p-C-r15", p_c_r15); + j.write_str("codebookSubsetRestriction4-r15", codebook_subset_restrict4_r15.to_string()); + j.end_obj(); +} + +// CSI-RS-ConfigBeamformed-r14 ::= SEQUENCE +csi_rs_cfg_beamformed_r14_s::csi_rs_cfg_beamformed_r14_s() +{ + csi_rs_cfg_nzp_id_list_ext_r14_present = false; + csi_im_cfg_id_list_r14_present = false; + p_c_and_cbsr_per_res_cfg_list_r14_present = false; + ace_for4_tx_per_res_cfg_list_r14_present = false; + alternative_codebook_enabled_beamformed_r14_present = false; + ch_meas_restrict_r14_present = false; + csi_rs_cfg_nzp_ap_list_r14_present = false; + nzp_res_cfg_original_v1430_present = false; + csi_rs_nzp_activation_r14_present = false; +} +SRSASN_CODE csi_rs_cfg_beamformed_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_id_list_ext_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_id_list_r14_present, 1)); + HANDLE_CODE(bref.pack(p_c_and_cbsr_per_res_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.pack(ace_for4_tx_per_res_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.pack(alternative_codebook_enabled_beamformed_r14_present, 1)); + HANDLE_CODE(bref.pack(ch_meas_restrict_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.pack(nzp_res_cfg_original_v1430_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_nzp_activation_r14_present, 1)); + + if (csi_rs_cfg_nzp_id_list_ext_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_cfg_nzp_id_list_ext_r14, 1, 7, UnalignedIntegerPacker(1, 24))); + } + if (csi_im_cfg_id_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_cfg_id_list_r14, 1, 8, UnalignedIntegerPacker(1, 24))); + } + if (p_c_and_cbsr_per_res_cfg_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p_c_and_cbsr_per_res_cfg_list_r14, 1, 8, SeqOfPacker(1, 2, Packer()))); + } + if (ace_for4_tx_per_res_cfg_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ace_for4_tx_per_res_cfg_list_r14, 1, 7, BitPacker(1))); + } + if (csi_rs_cfg_nzp_ap_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_cfg_nzp_ap_list_r14, 1, 8)); + } + if (nzp_res_cfg_original_v1430_present) { + HANDLE_CODE(nzp_res_cfg_original_v1430.pack(bref)); + } + if (csi_rs_nzp_activation_r14_present) { + HANDLE_CODE(csi_rs_nzp_activation_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_beamformed_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_id_list_ext_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_id_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(p_c_and_cbsr_per_res_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(ace_for4_tx_per_res_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(alternative_codebook_enabled_beamformed_r14_present, 1)); + HANDLE_CODE(bref.unpack(ch_meas_restrict_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(nzp_res_cfg_original_v1430_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_nzp_activation_r14_present, 1)); + + if (csi_rs_cfg_nzp_id_list_ext_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_cfg_nzp_id_list_ext_r14, bref, 1, 7, UnalignedIntegerPacker(1, 24))); + } + if (csi_im_cfg_id_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_cfg_id_list_r14, bref, 1, 8, UnalignedIntegerPacker(1, 24))); + } + if (p_c_and_cbsr_per_res_cfg_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(p_c_and_cbsr_per_res_cfg_list_r14, bref, 1, 8, SeqOfPacker(1, 2, Packer()))); + } + if (ace_for4_tx_per_res_cfg_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(ace_for4_tx_per_res_cfg_list_r14, bref, 1, 7, BitPacker(1))); + } + if (csi_rs_cfg_nzp_ap_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_cfg_nzp_ap_list_r14, bref, 1, 8)); + } + if (nzp_res_cfg_original_v1430_present) { + HANDLE_CODE(nzp_res_cfg_original_v1430.unpack(bref)); + } + if (csi_rs_nzp_activation_r14_present) { + HANDLE_CODE(csi_rs_nzp_activation_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_beamformed_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_cfg_nzp_id_list_ext_r14_present) { + j.start_array("csi-RS-ConfigNZPIdListExt-r14"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_id_list_ext_r14.size(); ++i1) { + j.write_int(csi_rs_cfg_nzp_id_list_ext_r14[i1]); + } + j.end_array(); + } + if (csi_im_cfg_id_list_r14_present) { + j.start_array("csi-IM-ConfigIdList-r14"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_id_list_r14.size(); ++i1) { + j.write_int(csi_im_cfg_id_list_r14[i1]); + } + j.end_array(); + } + if (p_c_and_cbsr_per_res_cfg_list_r14_present) { + j.start_array("p-C-AndCBSR-PerResourceConfigList-r14"); + for (uint32_t i1 = 0; i1 < p_c_and_cbsr_per_res_cfg_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < p_c_and_cbsr_per_res_cfg_list_r14[i1].size(); ++i2) { + p_c_and_cbsr_per_res_cfg_list_r14[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (ace_for4_tx_per_res_cfg_list_r14_present) { + j.start_array("ace-For4Tx-PerResourceConfigList-r14"); + for (uint32_t i1 = 0; i1 < ace_for4_tx_per_res_cfg_list_r14.size(); ++i1) { + j.write_bool(ace_for4_tx_per_res_cfg_list_r14[i1]); + } + j.end_array(); + } + if (alternative_codebook_enabled_beamformed_r14_present) { + j.write_str("alternativeCodebookEnabledBeamformed-r14", "true"); + } + if (ch_meas_restrict_r14_present) { + j.write_str("channelMeasRestriction-r14", "on"); + } + if (csi_rs_cfg_nzp_ap_list_r14_present) { + j.start_array("csi-RS-ConfigNZP-ApList-r14"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_ap_list_r14.size(); ++i1) { + csi_rs_cfg_nzp_ap_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (nzp_res_cfg_original_v1430_present) { + j.write_fieldname("nzp-ResourceConfigOriginal-v1430"); + nzp_res_cfg_original_v1430.to_json(j); + } + if (csi_rs_nzp_activation_r14_present) { + j.write_fieldname("csi-RS-NZP-Activation-r14"); + csi_rs_nzp_activation_r14.to_json(j); + } + j.end_obj(); +} + +// CSI-RS-ConfigNZP-EMIMO-r13 ::= CHOICE +void csi_rs_cfg_nzp_emimo_r13_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_nzp_emimo_r13_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.start_array("nzp-resourceConfigList-r13"); + for (uint32_t i1 = 0; i1 < c.nzp_res_cfg_list_r13.size(); ++i1) { + c.nzp_res_cfg_list_r13[i1].to_json(j); + } + j.end_array(); + if (c.cdm_type_r13_present) { + j.write_str("cdmType-r13", c.cdm_type_r13.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_emimo_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_nzp_emimo_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.cdm_type_r13_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.nzp_res_cfg_list_r13, 1, 2)); + if (c.cdm_type_r13_present) { + HANDLE_CODE(pack_enum(bref, c.cdm_type_r13)); + } + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_emimo_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_emimo_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.cdm_type_r13_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(c.nzp_res_cfg_list_r13, bref, 1, 2)); + if (c.cdm_type_r13_present) { + HANDLE_CODE(unpack_enum(c.cdm_type_r13, bref)); + } + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_nzp_emimo_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +csi_rs_cfg_nzp_emimo_r13_c::setup_s_::setup_s_() +{ + cdm_type_r13_present = false; +} + +// CSI-RS-ConfigNZP-EMIMO-v1430 ::= SEQUENCE +csi_rs_cfg_nzp_emimo_v1430_s::csi_rs_cfg_nzp_emimo_v1430_s() +{ + cdm_type_v1430_present = false; +} +SRSASN_CODE csi_rs_cfg_nzp_emimo_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cdm_type_v1430_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, nzp_res_cfg_list_ext_r14, 0, 4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_nzp_emimo_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cdm_type_v1430_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(nzp_res_cfg_list_ext_r14, bref, 0, 4)); + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_nzp_emimo_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("nzp-resourceConfigListExt-r14"); + for (uint32_t i1 = 0; i1 < nzp_res_cfg_list_ext_r14.size(); ++i1) { + nzp_res_cfg_list_ext_r14[i1].to_json(j); + } + j.end_array(); + if (cdm_type_v1430_present) { + j.write_str("cdmType-v1430", "cdm8"); + } + j.end_obj(); +} + +// CSI-RS-ConfigBeamformed-r13 ::= SEQUENCE +csi_rs_cfg_beamformed_r13_s::csi_rs_cfg_beamformed_r13_s() +{ + csi_rs_cfg_nzp_id_list_ext_r13_present = false; + csi_im_cfg_id_list_r13_present = false; + p_c_and_cbsr_per_res_cfg_list_r13_present = false; + ace_for4_tx_per_res_cfg_list_r13_present = false; + alternative_codebook_enabled_beamformed_r13_present = false; + ch_meas_restrict_r13_present = false; +} +SRSASN_CODE csi_rs_cfg_beamformed_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_id_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_id_list_r13_present, 1)); + HANDLE_CODE(bref.pack(p_c_and_cbsr_per_res_cfg_list_r13_present, 1)); + HANDLE_CODE(bref.pack(ace_for4_tx_per_res_cfg_list_r13_present, 1)); + HANDLE_CODE(bref.pack(alternative_codebook_enabled_beamformed_r13_present, 1)); + HANDLE_CODE(bref.pack(ch_meas_restrict_r13_present, 1)); + + if (csi_rs_cfg_nzp_id_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_cfg_nzp_id_list_ext_r13, 1, 7, UnalignedIntegerPacker(1, 24))); + } + if (csi_im_cfg_id_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_cfg_id_list_r13, 1, 8, UnalignedIntegerPacker(1, 24))); + } + if (p_c_and_cbsr_per_res_cfg_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p_c_and_cbsr_per_res_cfg_list_r13, 1, 8, SeqOfPacker(1, 2, Packer()))); + } + if (ace_for4_tx_per_res_cfg_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ace_for4_tx_per_res_cfg_list_r13, 1, 7, BitPacker(1))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_beamformed_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_id_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_id_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(p_c_and_cbsr_per_res_cfg_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(ace_for4_tx_per_res_cfg_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(alternative_codebook_enabled_beamformed_r13_present, 1)); + HANDLE_CODE(bref.unpack(ch_meas_restrict_r13_present, 1)); + + if (csi_rs_cfg_nzp_id_list_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_cfg_nzp_id_list_ext_r13, bref, 1, 7, UnalignedIntegerPacker(1, 24))); + } + if (csi_im_cfg_id_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_cfg_id_list_r13, bref, 1, 8, UnalignedIntegerPacker(1, 24))); + } + if (p_c_and_cbsr_per_res_cfg_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(p_c_and_cbsr_per_res_cfg_list_r13, bref, 1, 8, SeqOfPacker(1, 2, Packer()))); + } + if (ace_for4_tx_per_res_cfg_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(ace_for4_tx_per_res_cfg_list_r13, bref, 1, 7, BitPacker(1))); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_beamformed_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_cfg_nzp_id_list_ext_r13_present) { + j.start_array("csi-RS-ConfigNZPIdListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_id_list_ext_r13.size(); ++i1) { + j.write_int(csi_rs_cfg_nzp_id_list_ext_r13[i1]); + } + j.end_array(); + } + if (csi_im_cfg_id_list_r13_present) { + j.start_array("csi-IM-ConfigIdList-r13"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_id_list_r13.size(); ++i1) { + j.write_int(csi_im_cfg_id_list_r13[i1]); + } + j.end_array(); + } + if (p_c_and_cbsr_per_res_cfg_list_r13_present) { + j.start_array("p-C-AndCBSR-PerResourceConfigList-r13"); + for (uint32_t i1 = 0; i1 < p_c_and_cbsr_per_res_cfg_list_r13.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < p_c_and_cbsr_per_res_cfg_list_r13[i1].size(); ++i2) { + p_c_and_cbsr_per_res_cfg_list_r13[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (ace_for4_tx_per_res_cfg_list_r13_present) { + j.start_array("ace-For4Tx-PerResourceConfigList-r13"); + for (uint32_t i1 = 0; i1 < ace_for4_tx_per_res_cfg_list_r13.size(); ++i1) { + j.write_bool(ace_for4_tx_per_res_cfg_list_r13[i1]); + } + j.end_array(); + } + if (alternative_codebook_enabled_beamformed_r13_present) { + j.write_str("alternativeCodebookEnabledBeamformed-r13", "true"); + } + if (ch_meas_restrict_r13_present) { + j.write_str("channelMeasRestriction-r13", "on"); + } + j.end_obj(); +} + +// CSI-RS-ConfigBeamformed-v1430 ::= SEQUENCE +csi_rs_cfg_beamformed_v1430_s::csi_rs_cfg_beamformed_v1430_s() +{ + csi_rs_cfg_nzp_ap_list_r14_present = false; + nzp_res_cfg_original_v1430_present = false; + csi_rs_nzp_activation_r14_present = false; +} +SRSASN_CODE csi_rs_cfg_beamformed_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.pack(nzp_res_cfg_original_v1430_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_nzp_activation_r14_present, 1)); + + if (csi_rs_cfg_nzp_ap_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_cfg_nzp_ap_list_r14, 1, 8)); + } + if (nzp_res_cfg_original_v1430_present) { + HANDLE_CODE(nzp_res_cfg_original_v1430.pack(bref)); + } + if (csi_rs_nzp_activation_r14_present) { + HANDLE_CODE(csi_rs_nzp_activation_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_beamformed_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(nzp_res_cfg_original_v1430_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_nzp_activation_r14_present, 1)); + + if (csi_rs_cfg_nzp_ap_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_cfg_nzp_ap_list_r14, bref, 1, 8)); + } + if (nzp_res_cfg_original_v1430_present) { + HANDLE_CODE(nzp_res_cfg_original_v1430.unpack(bref)); + } + if (csi_rs_nzp_activation_r14_present) { + HANDLE_CODE(csi_rs_nzp_activation_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_beamformed_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_cfg_nzp_ap_list_r14_present) { + j.start_array("csi-RS-ConfigNZP-ApList-r14"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_ap_list_r14.size(); ++i1) { + csi_rs_cfg_nzp_ap_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (nzp_res_cfg_original_v1430_present) { + j.write_fieldname("nzp-ResourceConfigOriginal-v1430"); + nzp_res_cfg_original_v1430.to_json(j); + } + if (csi_rs_nzp_activation_r14_present) { + j.write_fieldname("csi-RS-NZP-Activation-r14"); + csi_rs_nzp_activation_r14.to_json(j); + } + j.end_obj(); +} + +// CSI-RS-ConfigEMIMO2-r14 ::= CHOICE +void csi_rs_cfg_emimo2_r14_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo2_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo2_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo2_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo2_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo2_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo2_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-ConfigNonPrecoded-r13 ::= SEQUENCE +csi_rs_cfg_non_precoded_r13_s::csi_rs_cfg_non_precoded_r13_s() +{ + p_c_and_cbsr_list_r13_present = false; + codebook_over_sampling_rate_cfg_o1_r13_present = false; + codebook_over_sampling_rate_cfg_o2_r13_present = false; + csi_im_cfg_id_list_r13_present = false; + csi_rs_cfg_nzp_emimo_r13_present = false; +} +SRSASN_CODE csi_rs_cfg_non_precoded_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_c_and_cbsr_list_r13_present, 1)); + HANDLE_CODE(bref.pack(codebook_over_sampling_rate_cfg_o1_r13_present, 1)); + HANDLE_CODE(bref.pack(codebook_over_sampling_rate_cfg_o2_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_id_list_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_emimo_r13_present, 1)); + + if (p_c_and_cbsr_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p_c_and_cbsr_list_r13, 1, 2)); + } + HANDLE_CODE(pack_enum(bref, codebook_cfg_n1_r13)); + HANDLE_CODE(pack_enum(bref, codebook_cfg_n2_r13)); + if (codebook_over_sampling_rate_cfg_o1_r13_present) { + HANDLE_CODE(pack_enum(bref, codebook_over_sampling_rate_cfg_o1_r13)); + } + if (codebook_over_sampling_rate_cfg_o2_r13_present) { + HANDLE_CODE(pack_enum(bref, codebook_over_sampling_rate_cfg_o2_r13)); + } + HANDLE_CODE(pack_unalign_integer(bref, codebook_cfg_r13, (uint8_t)1, (uint8_t)4)); + if (csi_im_cfg_id_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_cfg_id_list_r13, 1, 2, UnalignedIntegerPacker(1, 24))); + } + if (csi_rs_cfg_nzp_emimo_r13_present) { + HANDLE_CODE(csi_rs_cfg_nzp_emimo_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_non_precoded_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_c_and_cbsr_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(codebook_over_sampling_rate_cfg_o1_r13_present, 1)); + HANDLE_CODE(bref.unpack(codebook_over_sampling_rate_cfg_o2_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_id_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_emimo_r13_present, 1)); + + if (p_c_and_cbsr_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(p_c_and_cbsr_list_r13, bref, 1, 2)); + } + HANDLE_CODE(unpack_enum(codebook_cfg_n1_r13, bref)); + HANDLE_CODE(unpack_enum(codebook_cfg_n2_r13, bref)); + if (codebook_over_sampling_rate_cfg_o1_r13_present) { + HANDLE_CODE(unpack_enum(codebook_over_sampling_rate_cfg_o1_r13, bref)); + } + if (codebook_over_sampling_rate_cfg_o2_r13_present) { + HANDLE_CODE(unpack_enum(codebook_over_sampling_rate_cfg_o2_r13, bref)); + } + HANDLE_CODE(unpack_unalign_integer(codebook_cfg_r13, bref, (uint8_t)1, (uint8_t)4)); + if (csi_im_cfg_id_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_cfg_id_list_r13, bref, 1, 2, UnalignedIntegerPacker(1, 24))); + } + if (csi_rs_cfg_nzp_emimo_r13_present) { + HANDLE_CODE(csi_rs_cfg_nzp_emimo_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_non_precoded_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p_c_and_cbsr_list_r13_present) { + j.start_array("p-C-AndCBSRList-r13"); + for (uint32_t i1 = 0; i1 < p_c_and_cbsr_list_r13.size(); ++i1) { + p_c_and_cbsr_list_r13[i1].to_json(j); + } + j.end_array(); + } + j.write_str("codebookConfigN1-r13", codebook_cfg_n1_r13.to_string()); + j.write_str("codebookConfigN2-r13", codebook_cfg_n2_r13.to_string()); + if (codebook_over_sampling_rate_cfg_o1_r13_present) { + j.write_str("codebookOverSamplingRateConfig-O1-r13", codebook_over_sampling_rate_cfg_o1_r13.to_string()); + } + if (codebook_over_sampling_rate_cfg_o2_r13_present) { + j.write_str("codebookOverSamplingRateConfig-O2-r13", codebook_over_sampling_rate_cfg_o2_r13.to_string()); + } + j.write_int("codebookConfig-r13", codebook_cfg_r13); + if (csi_im_cfg_id_list_r13_present) { + j.start_array("csi-IM-ConfigIdList-r13"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_id_list_r13.size(); ++i1) { + j.write_int(csi_im_cfg_id_list_r13[i1]); + } + j.end_array(); + } + if (csi_rs_cfg_nzp_emimo_r13_present) { + j.write_fieldname("csi-RS-ConfigNZP-EMIMO-r13"); + csi_rs_cfg_nzp_emimo_r13.to_json(j); + } + j.end_obj(); +} + +// CSI-RS-ConfigNonPrecoded-v1430 ::= SEQUENCE +csi_rs_cfg_non_precoded_v1430_s::csi_rs_cfg_non_precoded_v1430_s() +{ + csi_rs_cfg_nzp_emimo_v1430_present = false; +} +SRSASN_CODE csi_rs_cfg_non_precoded_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_emimo_v1430_present, 1)); + + if (csi_rs_cfg_nzp_emimo_v1430_present) { + HANDLE_CODE(csi_rs_cfg_nzp_emimo_v1430.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, codebook_cfg_n1_v1430)); + HANDLE_CODE(pack_enum(bref, codebook_cfg_n2_v1430)); + HANDLE_CODE(nzp_res_cfg_tm9_original_v1430.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_non_precoded_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_emimo_v1430_present, 1)); + + if (csi_rs_cfg_nzp_emimo_v1430_present) { + HANDLE_CODE(csi_rs_cfg_nzp_emimo_v1430.unpack(bref)); + } + HANDLE_CODE(unpack_enum(codebook_cfg_n1_v1430, bref)); + HANDLE_CODE(unpack_enum(codebook_cfg_n2_v1430, bref)); + HANDLE_CODE(nzp_res_cfg_tm9_original_v1430.unpack(bref)); + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_non_precoded_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_cfg_nzp_emimo_v1430_present) { + j.write_fieldname("csi-RS-ConfigNZP-EMIMO-v1430"); + csi_rs_cfg_nzp_emimo_v1430.to_json(j); + } + j.write_str("codebookConfigN1-v1430", codebook_cfg_n1_v1430.to_string()); + j.write_str("codebookConfigN2-v1430", codebook_cfg_n2_v1430.to_string()); + j.write_fieldname("nzp-ResourceConfigTM9-Original-v1430"); + nzp_res_cfg_tm9_original_v1430.to_json(j); + j.end_obj(); +} + +// CSI-RS-ConfigNonPrecoded-v1480 ::= SEQUENCE +csi_rs_cfg_non_precoded_v1480_s::csi_rs_cfg_non_precoded_v1480_s() +{ + csi_rs_cfg_nzp_emimo_v1480_present = false; + codebook_cfg_n1_v1480_present = false; + codebook_cfg_n2_r1480_present = false; +} +SRSASN_CODE csi_rs_cfg_non_precoded_v1480_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_emimo_v1480_present, 1)); + HANDLE_CODE(bref.pack(codebook_cfg_n1_v1480_present, 1)); + HANDLE_CODE(bref.pack(codebook_cfg_n2_r1480_present, 1)); + + if (csi_rs_cfg_nzp_emimo_v1480_present) { + HANDLE_CODE(csi_rs_cfg_nzp_emimo_v1480.pack(bref)); + } + if (codebook_cfg_n1_v1480_present) { + HANDLE_CODE(pack_enum(bref, codebook_cfg_n1_v1480)); + } + if (codebook_cfg_n2_r1480_present) { + HANDLE_CODE(pack_enum(bref, codebook_cfg_n2_r1480)); + } + HANDLE_CODE(nzp_res_cfg_tm9_original_v1480.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_non_precoded_v1480_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_emimo_v1480_present, 1)); + HANDLE_CODE(bref.unpack(codebook_cfg_n1_v1480_present, 1)); + HANDLE_CODE(bref.unpack(codebook_cfg_n2_r1480_present, 1)); + + if (csi_rs_cfg_nzp_emimo_v1480_present) { + HANDLE_CODE(csi_rs_cfg_nzp_emimo_v1480.unpack(bref)); + } + if (codebook_cfg_n1_v1480_present) { + HANDLE_CODE(unpack_enum(codebook_cfg_n1_v1480, bref)); + } + if (codebook_cfg_n2_r1480_present) { + HANDLE_CODE(unpack_enum(codebook_cfg_n2_r1480, bref)); + } + HANDLE_CODE(nzp_res_cfg_tm9_original_v1480.unpack(bref)); + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_non_precoded_v1480_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_cfg_nzp_emimo_v1480_present) { + j.write_fieldname("csi-RS-ConfigNZP-EMIMO-v1480"); + csi_rs_cfg_nzp_emimo_v1480.to_json(j); + } + if (codebook_cfg_n1_v1480_present) { + j.write_str("codebookConfigN1-v1480", codebook_cfg_n1_v1480.to_string()); + } + if (codebook_cfg_n2_r1480_present) { + j.write_str("codebookConfigN2-r1480", codebook_cfg_n2_r1480.to_string()); + } + j.write_fieldname("nzp-ResourceConfigTM9-Original-v1480"); + nzp_res_cfg_tm9_original_v1480.to_json(j); + j.end_obj(); +} + +// CSI-RS-ConfigNonPrecoded-v1530 ::= SEQUENCE +csi_rs_cfg_non_precoded_v1530_s::csi_rs_cfg_non_precoded_v1530_s() +{ + p_c_and_cbsr_list_r15_present = false; +} +SRSASN_CODE csi_rs_cfg_non_precoded_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_c_and_cbsr_list_r15_present, 1)); + + if (p_c_and_cbsr_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, p_c_and_cbsr_list_r15, 1, 2)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_non_precoded_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_c_and_cbsr_list_r15_present, 1)); + + if (p_c_and_cbsr_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(p_c_and_cbsr_list_r15, bref, 1, 2)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_non_precoded_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p_c_and_cbsr_list_r15_present) { + j.start_array("p-C-AndCBSRList-r15"); + for (uint32_t i1 = 0; i1 < p_c_and_cbsr_list_r15.size(); ++i1) { + p_c_and_cbsr_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// P-C-AndCBSR-r11 ::= SEQUENCE +SRSASN_CODE p_c_and_cbsr_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, p_c_r11, (int8_t)-8, (int8_t)15)); + HANDLE_CODE(codebook_subset_restrict_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE p_c_and_cbsr_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(p_c_r11, bref, (int8_t)-8, (int8_t)15)); + HANDLE_CODE(codebook_subset_restrict_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void p_c_and_cbsr_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p-C-r11", p_c_r11); + j.write_str("codebookSubsetRestriction-r11", codebook_subset_restrict_r11.to_string()); + j.end_obj(); +} + +// CQI-ReportAperiodicProc-r11 ::= SEQUENCE +SRSASN_CODE cqi_report_aperiodic_proc_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, cqi_report_mode_aperiodic_r11)); + HANDLE_CODE(bref.pack(trigger01_r11, 1)); + HANDLE_CODE(bref.pack(trigger10_r11, 1)); + HANDLE_CODE(bref.pack(trigger11_r11, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_proc_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(cqi_report_mode_aperiodic_r11, bref)); + HANDLE_CODE(bref.unpack(trigger01_r11, 1)); + HANDLE_CODE(bref.unpack(trigger10_r11, 1)); + HANDLE_CODE(bref.unpack(trigger11_r11, 1)); + + return SRSASN_SUCCESS; +} +void cqi_report_aperiodic_proc_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cqi-ReportModeAperiodic-r11", cqi_report_mode_aperiodic_r11.to_string()); + j.write_bool("trigger01-r11", trigger01_r11); + j.write_bool("trigger10-r11", trigger10_r11); + j.write_bool("trigger11-r11", trigger11_r11); + j.end_obj(); +} + +// CQI-ReportAperiodicProc-v1310 ::= SEQUENCE +SRSASN_CODE cqi_report_aperiodic_proc_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(trigger001_r13, 1)); + HANDLE_CODE(bref.pack(trigger010_r13, 1)); + HANDLE_CODE(bref.pack(trigger011_r13, 1)); + HANDLE_CODE(bref.pack(trigger100_r13, 1)); + HANDLE_CODE(bref.pack(trigger101_r13, 1)); + HANDLE_CODE(bref.pack(trigger110_r13, 1)); + HANDLE_CODE(bref.pack(trigger111_r13, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_proc_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(trigger001_r13, 1)); + HANDLE_CODE(bref.unpack(trigger010_r13, 1)); + HANDLE_CODE(bref.unpack(trigger011_r13, 1)); + HANDLE_CODE(bref.unpack(trigger100_r13, 1)); + HANDLE_CODE(bref.unpack(trigger101_r13, 1)); + HANDLE_CODE(bref.unpack(trigger110_r13, 1)); + HANDLE_CODE(bref.unpack(trigger111_r13, 1)); + + return SRSASN_SUCCESS; +} +void cqi_report_aperiodic_proc_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("trigger001-r13", trigger001_r13); + j.write_bool("trigger010-r13", trigger010_r13); + j.write_bool("trigger011-r13", trigger011_r13); + j.write_bool("trigger100-r13", trigger100_r13); + j.write_bool("trigger101-r13", trigger101_r13); + j.write_bool("trigger110-r13", trigger110_r13); + j.write_bool("trigger111-r13", trigger111_r13); + j.end_obj(); +} + +// CQI-ReportBothProc-r11 ::= SEQUENCE +cqi_report_both_proc_r11_s::cqi_report_both_proc_r11_s() +{ + ri_ref_csi_process_id_r11_present = false; + pmi_ri_report_r11_present = false; +} +SRSASN_CODE cqi_report_both_proc_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ri_ref_csi_process_id_r11_present, 1)); + HANDLE_CODE(bref.pack(pmi_ri_report_r11_present, 1)); + + if (ri_ref_csi_process_id_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, ri_ref_csi_process_id_r11, (uint8_t)1, (uint8_t)4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_both_proc_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ri_ref_csi_process_id_r11_present, 1)); + HANDLE_CODE(bref.unpack(pmi_ri_report_r11_present, 1)); + + if (ri_ref_csi_process_id_r11_present) { + HANDLE_CODE(unpack_unalign_integer(ri_ref_csi_process_id_r11, bref, (uint8_t)1, (uint8_t)4)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_both_proc_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ri_ref_csi_process_id_r11_present) { + j.write_int("ri-Ref-CSI-ProcessId-r11", ri_ref_csi_process_id_r11); + } + if (pmi_ri_report_r11_present) { + j.write_str("pmi-RI-Report-r11", "setup"); + } + j.end_obj(); +} + +// CRI-ReportConfig-r13 ::= CHOICE +void cri_report_cfg_r13_c::set(types::options e) +{ + type_ = e; +} +void cri_report_cfg_r13_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_int("cri-ConfigIndex-r13", c.cri_cfg_idx_r13); + if (c.cri_cfg_idx2_r13_present) { + j.write_int("cri-ConfigIndex2-r13", c.cri_cfg_idx2_r13); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cri_report_cfg_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE cri_report_cfg_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.cri_cfg_idx2_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cri_cfg_idx_r13, (uint16_t)0, (uint16_t)1023)); + if (c.cri_cfg_idx2_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.cri_cfg_idx2_r13, (uint16_t)0, (uint16_t)1023)); + } + break; + default: + log_invalid_choice_id(type_, "cri_report_cfg_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cri_report_cfg_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.cri_cfg_idx2_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cri_cfg_idx_r13, bref, (uint16_t)0, (uint16_t)1023)); + if (c.cri_cfg_idx2_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.cri_cfg_idx2_r13, bref, (uint16_t)0, (uint16_t)1023)); + } + break; + default: + log_invalid_choice_id(type_, "cri_report_cfg_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cri_report_cfg_r13_c::setup_s_::setup_s_() +{ + cri_cfg_idx2_r13_present = false; +} + +// CSI-RS-ConfigEMIMO-Hybrid-r14 ::= CHOICE +void csi_rs_cfg_emimo_hybrid_r14_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo_hybrid_r14_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(); + if (c.periodicity_offset_idx_r14_present) { + j.write_int("periodicityOffsetIndex-r14", c.periodicity_offset_idx_r14); + } + if (c.e_mimo_type2_r14_present) { + j.write_fieldname("eMIMO-Type2-r14"); + c.e_mimo_type2_r14.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_hybrid_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_hybrid_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.periodicity_offset_idx_r14_present, 1)); + HANDLE_CODE(bref.pack(c.e_mimo_type2_r14_present, 1)); + if (c.periodicity_offset_idx_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.periodicity_offset_idx_r14, (uint16_t)0, (uint16_t)1023)); + } + if (c.e_mimo_type2_r14_present) { + HANDLE_CODE(c.e_mimo_type2_r14.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_hybrid_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_hybrid_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.periodicity_offset_idx_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.e_mimo_type2_r14_present, 1)); + if (c.periodicity_offset_idx_r14_present) { + HANDLE_CODE(unpack_unalign_integer(c.periodicity_offset_idx_r14, bref, (uint16_t)0, (uint16_t)1023)); + } + if (c.e_mimo_type2_r14_present) { + HANDLE_CODE(c.e_mimo_type2_r14.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_hybrid_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +csi_rs_cfg_emimo_hybrid_r14_c::setup_s_::setup_s_() +{ + periodicity_offset_idx_r14_present = false; + e_mimo_type2_r14_present = false; +} + +// CSI-RS-ConfigEMIMO-r13 ::= CHOICE +void csi_rs_cfg_emimo_r13_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_rs_cfg_emimo_r13_c::setup_c_::destroy_() +{ + switch (type_) { + case types::non_precoded_r13: + c.destroy(); + break; + case types::beamformed_r13: + c.destroy(); + break; + default: + break; + } +} +void csi_rs_cfg_emimo_r13_c::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::non_precoded_r13: + c.init(); + break; + case types::beamformed_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c::setup_c_"); + } +} +csi_rs_cfg_emimo_r13_c::setup_c_::setup_c_(const csi_rs_cfg_emimo_r13_c::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::non_precoded_r13: + c.init(other.c.get()); + break; + case types::beamformed_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c::setup_c_"); + } +} +csi_rs_cfg_emimo_r13_c::setup_c_& csi_rs_cfg_emimo_r13_c::setup_c_:: + operator=(const csi_rs_cfg_emimo_r13_c::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::non_precoded_r13: + c.set(other.c.get()); + break; + case types::beamformed_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c::setup_c_"); + } + + return *this; +} +void csi_rs_cfg_emimo_r13_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::non_precoded_r13: + j.write_fieldname("nonPrecoded-r13"); + c.get().to_json(j); + break; + case types::beamformed_r13: + j.write_fieldname("beamformed-r13"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_r13_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::non_precoded_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::beamformed_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_r13_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::non_precoded_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::beamformed_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_r13_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-ConfigEMIMO-v1430 ::= CHOICE +void csi_rs_cfg_emimo_v1430_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo_v1430_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_v1430_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_v1430_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_rs_cfg_emimo_v1430_c::setup_c_::destroy_() +{ + switch (type_) { + case types::non_precoded_v1430: + c.destroy(); + break; + case types::beamformed_v1430: + c.destroy(); + break; + default: + break; + } +} +void csi_rs_cfg_emimo_v1430_c::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::non_precoded_v1430: + c.init(); + break; + case types::beamformed_v1430: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c::setup_c_"); + } +} +csi_rs_cfg_emimo_v1430_c::setup_c_::setup_c_(const csi_rs_cfg_emimo_v1430_c::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::non_precoded_v1430: + c.init(other.c.get()); + break; + case types::beamformed_v1430: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c::setup_c_"); + } +} +csi_rs_cfg_emimo_v1430_c::setup_c_& csi_rs_cfg_emimo_v1430_c::setup_c_:: + operator=(const csi_rs_cfg_emimo_v1430_c::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::non_precoded_v1430: + c.set(other.c.get()); + break; + case types::beamformed_v1430: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c::setup_c_"); + } + + return *this; +} +void csi_rs_cfg_emimo_v1430_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::non_precoded_v1430: + j.write_fieldname("nonPrecoded-v1430"); + c.get().to_json(j); + break; + case types::beamformed_v1430: + j.write_fieldname("beamformed-v1430"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_v1430_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::non_precoded_v1430: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::beamformed_v1430: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_v1430_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::non_precoded_v1430: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::beamformed_v1430: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1430_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-ConfigEMIMO-v1480 ::= CHOICE +void csi_rs_cfg_emimo_v1480_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo_v1480_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_v1480_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_v1480_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_rs_cfg_emimo_v1480_c::setup_c_::destroy_() +{ + switch (type_) { + case types::non_precoded_v1480: + c.destroy(); + break; + case types::beamformed_v1480: + c.destroy(); + break; + default: + break; + } +} +void csi_rs_cfg_emimo_v1480_c::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::non_precoded_v1480: + c.init(); + break; + case types::beamformed_v1480: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c::setup_c_"); + } +} +csi_rs_cfg_emimo_v1480_c::setup_c_::setup_c_(const csi_rs_cfg_emimo_v1480_c::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::non_precoded_v1480: + c.init(other.c.get()); + break; + case types::beamformed_v1480: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c::setup_c_"); + } +} +csi_rs_cfg_emimo_v1480_c::setup_c_& csi_rs_cfg_emimo_v1480_c::setup_c_:: + operator=(const csi_rs_cfg_emimo_v1480_c::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::non_precoded_v1480: + c.set(other.c.get()); + break; + case types::beamformed_v1480: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c::setup_c_"); + } + + return *this; +} +void csi_rs_cfg_emimo_v1480_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::non_precoded_v1480: + j.write_fieldname("nonPrecoded-v1480"); + c.get().to_json(j); + break; + case types::beamformed_v1480: + j.write_fieldname("beamformed-v1480"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_v1480_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::non_precoded_v1480: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::beamformed_v1480: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_v1480_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::non_precoded_v1480: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::beamformed_v1480: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1480_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-ConfigEMIMO-v1530 ::= CHOICE +void csi_rs_cfg_emimo_v1530_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo_v1530_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1530_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_v1530_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1530_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_v1530_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1530_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_rs_cfg_emimo_v1530_c::setup_c_::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_emimo_v1530_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::non_precoded_v1530: + j.write_fieldname("nonPrecoded-v1530"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1530_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_emimo_v1530_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::non_precoded_v1530: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1530_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_emimo_v1530_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::non_precoded_v1530: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_emimo_v1530_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportPeriodicProcExt-r11 ::= SEQUENCE +cqi_report_periodic_proc_ext_r11_s::cqi_report_periodic_proc_ext_r11_s() +{ + ext = false; + ri_cfg_idx_r11_present = false; + csi_cfg_idx_r11_present = false; + cri_report_cfg_r13_present = false; + periodicity_factor_wb_r13_present = false; +} +SRSASN_CODE cqi_report_periodic_proc_ext_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ri_cfg_idx_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_cfg_idx_r11_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, cqi_report_periodic_proc_ext_id_r11, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, cqi_pmi_cfg_idx_r11, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(cqi_format_ind_periodic_r11.pack(bref)); + if (ri_cfg_idx_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, ri_cfg_idx_r11, (uint16_t)0, (uint16_t)1023)); + } + if (csi_cfg_idx_r11_present) { + HANDLE_CODE(csi_cfg_idx_r11.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(cri_report_cfg_r13_present != (cri_report_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= cri_report_cfg_r13_present; + group_flags[1] |= periodicity_factor_wb_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cri_report_cfg_r13_present, 1)); + if (cri_report_cfg_r13_present) { + HANDLE_CODE(cri_report_cfg_r13->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(periodicity_factor_wb_r13_present, 1)); + if (periodicity_factor_wb_r13_present) { + HANDLE_CODE(pack_enum(bref, periodicity_factor_wb_r13)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_proc_ext_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ri_cfg_idx_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_cfg_idx_r11_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(cqi_report_periodic_proc_ext_id_r11, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(cqi_pmi_cfg_idx_r11, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(cqi_format_ind_periodic_r11.unpack(bref)); + if (ri_cfg_idx_r11_present) { + HANDLE_CODE(unpack_unalign_integer(ri_cfg_idx_r11, bref, (uint16_t)0, (uint16_t)1023)); + } + if (csi_cfg_idx_r11_present) { + HANDLE_CODE(csi_cfg_idx_r11.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cri_report_cfg_r13_present, 1)); + if (cri_report_cfg_r13_present) { + cri_report_cfg_r13 = make_copy_ptr(cri_report_cfg_r13_c()); + HANDLE_CODE(cri_report_cfg_r13->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(periodicity_factor_wb_r13_present, 1)); + if (periodicity_factor_wb_r13_present) { + HANDLE_CODE(unpack_enum(periodicity_factor_wb_r13, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void cqi_report_periodic_proc_ext_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cqi-ReportPeriodicProcExtId-r11", cqi_report_periodic_proc_ext_id_r11); + j.write_int("cqi-pmi-ConfigIndex-r11", cqi_pmi_cfg_idx_r11); + j.write_fieldname("cqi-FormatIndicatorPeriodic-r11"); + cqi_format_ind_periodic_r11.to_json(j); + if (ri_cfg_idx_r11_present) { + j.write_int("ri-ConfigIndex-r11", ri_cfg_idx_r11); + } + if (csi_cfg_idx_r11_present) { + j.write_fieldname("csi-ConfigIndex-r11"); + csi_cfg_idx_r11.to_json(j); + } + if (cri_report_cfg_r13_present) { + j.write_fieldname("cri-ReportConfig-r13"); + cri_report_cfg_r13->to_json(j); + } + if (periodicity_factor_wb_r13_present) { + j.write_str("periodicityFactorWB-r13", periodicity_factor_wb_r13.to_string()); + } + j.end_obj(); +} + +void cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::destroy_() +{ + switch (type_) { + case types::wideband_cqi_r11: + c.destroy(); + break; + case types::subband_cqi_r11: + c.destroy(); + break; + default: + break; + } +} +void cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::wideband_cqi_r11: + c.init(); + break; + case types::subband_cqi_r11: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_"); + } +} +cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::cqi_format_ind_periodic_r11_c_( + const cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::wideband_cqi_r11: + c.init(other.c.get()); + break; + case types::subband_cqi_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_"); + } +} +cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_& +cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_:: +operator=(const cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::wideband_cqi_r11: + c.set(other.c.get()); + break; + case types::subband_cqi_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_"); + } + + return *this; +} +void cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::wideband_cqi_r11: + j.write_fieldname("widebandCQI-r11"); + j.start_obj(); + if (c.get().csi_report_mode_r11_present) { + j.write_str("csi-ReportMode-r11", c.get().csi_report_mode_r11.to_string()); + } + j.end_obj(); + break; + case types::subband_cqi_r11: + j.write_fieldname("subbandCQI-r11"); + j.start_obj(); + j.write_int("k", c.get().k); + j.write_str("periodicityFactor-r11", c.get().periodicity_factor_r11.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::wideband_cqi_r11: + HANDLE_CODE(bref.pack(c.get().csi_report_mode_r11_present, 1)); + if (c.get().csi_report_mode_r11_present) { + HANDLE_CODE(pack_enum(bref, c.get().csi_report_mode_r11)); + } + break; + case types::subband_cqi_r11: + HANDLE_CODE(pack_unalign_integer(bref, c.get().k, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, c.get().periodicity_factor_r11)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::wideband_cqi_r11: + HANDLE_CODE(bref.unpack(c.get().csi_report_mode_r11_present, 1)); + if (c.get().csi_report_mode_r11_present) { + HANDLE_CODE(unpack_enum(c.get().csi_report_mode_r11, bref)); + } + break; + case types::subband_cqi_r11: + HANDLE_CODE(unpack_unalign_integer(c.get().k, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_enum(c.get().periodicity_factor_r11, bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_::wideband_cqi_r11_s_() +{ + csi_report_mode_r11_present = false; +} + +void cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_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_int("cqi-pmi-ConfigIndex2-r11", c.cqi_pmi_cfg_idx2_r11); + if (c.ri_cfg_idx2_r11_present) { + j.write_int("ri-ConfigIndex2-r11", c.ri_cfg_idx2_r11); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ri_cfg_idx2_r11_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pmi_cfg_idx2_r11, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx2_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ri_cfg_idx2_r11, (uint16_t)0, (uint16_t)1023)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ri_cfg_idx2_r11_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pmi_cfg_idx2_r11, bref, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx2_r11_present) { + HANDLE_CODE(unpack_unalign_integer(c.ri_cfg_idx2_r11, bref, (uint16_t)0, (uint16_t)1023)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_proc_ext_r11_s::csi_cfg_idx_r11_c_::setup_s_::setup_s_() +{ + ri_cfg_idx2_r11_present = false; +} + +// CSI-IM-Config-r11 ::= SEQUENCE +csi_im_cfg_r11_s::csi_im_cfg_r11_s() +{ + ext = false; + interference_meas_restrict_r13_present = false; +} +SRSASN_CODE csi_im_cfg_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, csi_im_cfg_id_r11, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, res_cfg_r11, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, sf_cfg_r11, (uint8_t)0, (uint8_t)154)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= interference_meas_restrict_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(interference_meas_restrict_r13_present, 1)); + if (interference_meas_restrict_r13_present) { + HANDLE_CODE(bref.pack(interference_meas_restrict_r13, 1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_im_cfg_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(csi_im_cfg_id_r11, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(res_cfg_r11, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(sf_cfg_r11, bref, (uint8_t)0, (uint8_t)154)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(interference_meas_restrict_r13_present, 1)); + if (interference_meas_restrict_r13_present) { + HANDLE_CODE(bref.unpack(interference_meas_restrict_r13, 1)); + } + } + } + return SRSASN_SUCCESS; +} +void csi_im_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-IM-ConfigId-r11", csi_im_cfg_id_r11); + j.write_int("resourceConfig-r11", res_cfg_r11); + j.write_int("subframeConfig-r11", sf_cfg_r11); + if (interference_meas_restrict_r13_present) { + j.write_bool("interferenceMeasRestriction-r13", interference_meas_restrict_r13); + } + j.end_obj(); +} + +// CSI-IM-ConfigExt-r12 ::= SEQUENCE +csi_im_cfg_ext_r12_s::csi_im_cfg_ext_r12_s() +{ + ext = false; + interference_meas_restrict_r13_present = false; + csi_im_cfg_id_v1310_present = false; +} +SRSASN_CODE csi_im_cfg_ext_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, csi_im_cfg_id_v1250, (uint8_t)4, (uint8_t)4)); + HANDLE_CODE(pack_unalign_integer(bref, res_cfg_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, sf_cfg_r12, (uint8_t)0, (uint8_t)154)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= interference_meas_restrict_r13_present; + group_flags[0] |= csi_im_cfg_id_v1310_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(interference_meas_restrict_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_id_v1310_present, 1)); + if (interference_meas_restrict_r13_present) { + HANDLE_CODE(bref.pack(interference_meas_restrict_r13, 1)); + } + if (csi_im_cfg_id_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, csi_im_cfg_id_v1310, (uint8_t)5, (uint8_t)24)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_im_cfg_ext_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(csi_im_cfg_id_v1250, bref, (uint8_t)4, (uint8_t)4)); + HANDLE_CODE(unpack_unalign_integer(res_cfg_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(sf_cfg_r12, bref, (uint8_t)0, (uint8_t)154)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(interference_meas_restrict_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_id_v1310_present, 1)); + if (interference_meas_restrict_r13_present) { + HANDLE_CODE(bref.unpack(interference_meas_restrict_r13, 1)); + } + if (csi_im_cfg_id_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(csi_im_cfg_id_v1310, bref, (uint8_t)5, (uint8_t)24)); + } + } + } + return SRSASN_SUCCESS; +} +void csi_im_cfg_ext_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-IM-ConfigId-v1250", csi_im_cfg_id_v1250); + j.write_int("resourceConfig-r12", res_cfg_r12); + j.write_int("subframeConfig-r12", sf_cfg_r12); + if (interference_meas_restrict_r13_present) { + j.write_bool("interferenceMeasRestriction-r13", interference_meas_restrict_r13); + } + if (csi_im_cfg_id_v1310_present) { + j.write_int("csi-IM-ConfigId-v1310", csi_im_cfg_id_v1310); + } + j.end_obj(); +} + +// CSI-Process-r11 ::= SEQUENCE +csi_process_r11_s::csi_process_r11_s() +{ + ext = false; + cqi_report_both_proc_r11_present = false; + cqi_report_periodic_proc_id_r11_present = false; + cqi_report_aperiodic_proc_r11_present = false; + alternative_codebook_enabled_for4_tx_proc_r12_present = false; + csi_im_cfg_id_list_r12_present = false; + cqi_report_aperiodic_proc2_r12_present = false; + cqi_report_aperiodic_proc_v1310_present = false; + cqi_report_aperiodic_proc2_v1310_present = false; + e_mimo_type_r13_present = false; + dummy_present = false; + e_mimo_hybrid_r14_present = false; + advanced_codebook_enabled_r14_present = false; + e_mimo_type_v1480_present = false; + fe_comp_csi_enabled_v1530_present = false; + e_mimo_type_v1530_present = false; +} +SRSASN_CODE csi_process_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cqi_report_both_proc_r11_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_proc_id_r11_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_aperiodic_proc_r11_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, csi_process_id_r11, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_unalign_integer(bref, csi_rs_cfg_nzp_id_r11, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, csi_im_cfg_id_r11, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(pack_dyn_seq_of(bref, p_c_and_cbsr_list_r11, 1, 2)); + if (cqi_report_both_proc_r11_present) { + HANDLE_CODE(cqi_report_both_proc_r11.pack(bref)); + } + if (cqi_report_periodic_proc_id_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, cqi_report_periodic_proc_id_r11, (uint8_t)0, (uint8_t)3)); + } + if (cqi_report_aperiodic_proc_r11_present) { + HANDLE_CODE(cqi_report_aperiodic_proc_r11.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags[0] |= alternative_codebook_enabled_for4_tx_proc_r12_present; + rrc_asn1_warn_assert(csi_im_cfg_id_list_r12_present != (csi_im_cfg_id_list_r12.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= csi_im_cfg_id_list_r12_present; + rrc_asn1_warn_assert(cqi_report_aperiodic_proc2_r12_present != (cqi_report_aperiodic_proc2_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= cqi_report_aperiodic_proc2_r12_present; + rrc_asn1_warn_assert(cqi_report_aperiodic_proc_v1310_present != (cqi_report_aperiodic_proc_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= cqi_report_aperiodic_proc_v1310_present; + rrc_asn1_warn_assert(cqi_report_aperiodic_proc2_v1310_present != (cqi_report_aperiodic_proc2_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= cqi_report_aperiodic_proc2_v1310_present; + rrc_asn1_warn_assert(e_mimo_type_r13_present != (e_mimo_type_r13.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= e_mimo_type_r13_present; + rrc_asn1_warn_assert(dummy_present != (dummy.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= dummy_present; + rrc_asn1_warn_assert(e_mimo_hybrid_r14_present != (e_mimo_hybrid_r14.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= e_mimo_hybrid_r14_present; + group_flags[2] |= advanced_codebook_enabled_r14_present; + rrc_asn1_warn_assert(e_mimo_type_v1480_present != (e_mimo_type_v1480.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= e_mimo_type_v1480_present; + group_flags[4] |= fe_comp_csi_enabled_v1530_present; + rrc_asn1_warn_assert(e_mimo_type_v1530_present != (e_mimo_type_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= e_mimo_type_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(alternative_codebook_enabled_for4_tx_proc_r12_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_id_list_r12_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_aperiodic_proc2_r12_present, 1)); + if (csi_im_cfg_id_list_r12_present) { + HANDLE_CODE(csi_im_cfg_id_list_r12->pack(bref)); + } + if (cqi_report_aperiodic_proc2_r12_present) { + HANDLE_CODE(cqi_report_aperiodic_proc2_r12->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cqi_report_aperiodic_proc_v1310_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_aperiodic_proc2_v1310_present, 1)); + HANDLE_CODE(bref.pack(e_mimo_type_r13_present, 1)); + if (cqi_report_aperiodic_proc_v1310_present) { + HANDLE_CODE(cqi_report_aperiodic_proc_v1310->pack(bref)); + } + if (cqi_report_aperiodic_proc2_v1310_present) { + HANDLE_CODE(cqi_report_aperiodic_proc2_v1310->pack(bref)); + } + if (e_mimo_type_r13_present) { + HANDLE_CODE(e_mimo_type_r13->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(dummy_present, 1)); + HANDLE_CODE(bref.pack(e_mimo_hybrid_r14_present, 1)); + HANDLE_CODE(bref.pack(advanced_codebook_enabled_r14_present, 1)); + if (dummy_present) { + HANDLE_CODE(dummy->pack(bref)); + } + if (e_mimo_hybrid_r14_present) { + HANDLE_CODE(e_mimo_hybrid_r14->pack(bref)); + } + if (advanced_codebook_enabled_r14_present) { + HANDLE_CODE(bref.pack(advanced_codebook_enabled_r14, 1)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(e_mimo_type_v1480_present, 1)); + if (e_mimo_type_v1480_present) { + HANDLE_CODE(e_mimo_type_v1480->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(fe_comp_csi_enabled_v1530_present, 1)); + HANDLE_CODE(bref.pack(e_mimo_type_v1530_present, 1)); + if (fe_comp_csi_enabled_v1530_present) { + HANDLE_CODE(bref.pack(fe_comp_csi_enabled_v1530, 1)); + } + if (e_mimo_type_v1530_present) { + HANDLE_CODE(e_mimo_type_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_process_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cqi_report_both_proc_r11_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_proc_id_r11_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_proc_r11_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(csi_process_id_r11, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_unalign_integer(csi_rs_cfg_nzp_id_r11, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(csi_im_cfg_id_r11, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(unpack_dyn_seq_of(p_c_and_cbsr_list_r11, bref, 1, 2)); + if (cqi_report_both_proc_r11_present) { + HANDLE_CODE(cqi_report_both_proc_r11.unpack(bref)); + } + if (cqi_report_periodic_proc_id_r11_present) { + HANDLE_CODE(unpack_unalign_integer(cqi_report_periodic_proc_id_r11, bref, (uint8_t)0, (uint8_t)3)); + } + if (cqi_report_aperiodic_proc_r11_present) { + HANDLE_CODE(cqi_report_aperiodic_proc_r11.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(alternative_codebook_enabled_for4_tx_proc_r12_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_id_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_proc2_r12_present, 1)); + if (csi_im_cfg_id_list_r12_present) { + csi_im_cfg_id_list_r12 = make_copy_ptr(csi_im_cfg_id_list_r12_c_()); + HANDLE_CODE(csi_im_cfg_id_list_r12->unpack(bref)); + } + if (cqi_report_aperiodic_proc2_r12_present) { + cqi_report_aperiodic_proc2_r12 = make_copy_ptr(cqi_report_aperiodic_proc2_r12_c_()); + HANDLE_CODE(cqi_report_aperiodic_proc2_r12->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_proc_v1310_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_proc2_v1310_present, 1)); + HANDLE_CODE(bref.unpack(e_mimo_type_r13_present, 1)); + if (cqi_report_aperiodic_proc_v1310_present) { + cqi_report_aperiodic_proc_v1310 = make_copy_ptr(cqi_report_aperiodic_proc_v1310_c_()); + HANDLE_CODE(cqi_report_aperiodic_proc_v1310->unpack(bref)); + } + if (cqi_report_aperiodic_proc2_v1310_present) { + cqi_report_aperiodic_proc2_v1310 = make_copy_ptr(cqi_report_aperiodic_proc2_v1310_c_()); + HANDLE_CODE(cqi_report_aperiodic_proc2_v1310->unpack(bref)); + } + if (e_mimo_type_r13_present) { + e_mimo_type_r13 = make_copy_ptr(csi_rs_cfg_emimo_r13_c()); + HANDLE_CODE(e_mimo_type_r13->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(dummy_present, 1)); + HANDLE_CODE(bref.unpack(e_mimo_hybrid_r14_present, 1)); + HANDLE_CODE(bref.unpack(advanced_codebook_enabled_r14_present, 1)); + if (dummy_present) { + dummy = make_copy_ptr(csi_rs_cfg_emimo_v1430_c()); + HANDLE_CODE(dummy->unpack(bref)); + } + if (e_mimo_hybrid_r14_present) { + e_mimo_hybrid_r14 = make_copy_ptr(csi_rs_cfg_emimo_hybrid_r14_c()); + HANDLE_CODE(e_mimo_hybrid_r14->unpack(bref)); + } + if (advanced_codebook_enabled_r14_present) { + HANDLE_CODE(bref.unpack(advanced_codebook_enabled_r14, 1)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(e_mimo_type_v1480_present, 1)); + if (e_mimo_type_v1480_present) { + e_mimo_type_v1480 = make_copy_ptr(csi_rs_cfg_emimo_v1480_c()); + HANDLE_CODE(e_mimo_type_v1480->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(fe_comp_csi_enabled_v1530_present, 1)); + HANDLE_CODE(bref.unpack(e_mimo_type_v1530_present, 1)); + if (fe_comp_csi_enabled_v1530_present) { + HANDLE_CODE(bref.unpack(fe_comp_csi_enabled_v1530, 1)); + } + if (e_mimo_type_v1530_present) { + e_mimo_type_v1530 = make_copy_ptr(csi_rs_cfg_emimo_v1530_c()); + HANDLE_CODE(e_mimo_type_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void csi_process_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-ProcessId-r11", csi_process_id_r11); + j.write_int("csi-RS-ConfigNZPId-r11", csi_rs_cfg_nzp_id_r11); + j.write_int("csi-IM-ConfigId-r11", csi_im_cfg_id_r11); + j.start_array("p-C-AndCBSRList-r11"); + for (uint32_t i1 = 0; i1 < p_c_and_cbsr_list_r11.size(); ++i1) { + p_c_and_cbsr_list_r11[i1].to_json(j); + } + j.end_array(); + if (cqi_report_both_proc_r11_present) { + j.write_fieldname("cqi-ReportBothProc-r11"); + cqi_report_both_proc_r11.to_json(j); + } + if (cqi_report_periodic_proc_id_r11_present) { + j.write_int("cqi-ReportPeriodicProcId-r11", cqi_report_periodic_proc_id_r11); + } + if (cqi_report_aperiodic_proc_r11_present) { + j.write_fieldname("cqi-ReportAperiodicProc-r11"); + cqi_report_aperiodic_proc_r11.to_json(j); + } + if (alternative_codebook_enabled_for4_tx_proc_r12_present) { + j.write_str("alternativeCodebookEnabledFor4TXProc-r12", "true"); + } + if (csi_im_cfg_id_list_r12_present) { + j.write_fieldname("csi-IM-ConfigIdList-r12"); + csi_im_cfg_id_list_r12->to_json(j); + } + if (cqi_report_aperiodic_proc2_r12_present) { + j.write_fieldname("cqi-ReportAperiodicProc2-r12"); + cqi_report_aperiodic_proc2_r12->to_json(j); + } + if (cqi_report_aperiodic_proc_v1310_present) { + j.write_fieldname("cqi-ReportAperiodicProc-v1310"); + cqi_report_aperiodic_proc_v1310->to_json(j); + } + if (cqi_report_aperiodic_proc2_v1310_present) { + j.write_fieldname("cqi-ReportAperiodicProc2-v1310"); + cqi_report_aperiodic_proc2_v1310->to_json(j); + } + if (e_mimo_type_r13_present) { + j.write_fieldname("eMIMO-Type-r13"); + e_mimo_type_r13->to_json(j); + } + if (dummy_present) { + j.write_fieldname("dummy"); + dummy->to_json(j); + } + if (e_mimo_hybrid_r14_present) { + j.write_fieldname("eMIMO-Hybrid-r14"); + e_mimo_hybrid_r14->to_json(j); + } + if (advanced_codebook_enabled_r14_present) { + j.write_bool("advancedCodebookEnabled-r14", advanced_codebook_enabled_r14); + } + if (e_mimo_type_v1480_present) { + j.write_fieldname("eMIMO-Type-v1480"); + e_mimo_type_v1480->to_json(j); + } + if (fe_comp_csi_enabled_v1530_present) { + j.write_bool("feCOMP-CSI-Enabled-v1530", fe_comp_csi_enabled_v1530); + } + if (e_mimo_type_v1530_present) { + j.write_fieldname("eMIMO-Type-v1530"); + e_mimo_type_v1530->to_json(j); + } + j.end_obj(); +} + +void csi_process_r11_s::csi_im_cfg_id_list_r12_c_::set(types::options e) +{ + type_ = e; +} +void csi_process_r11_s::csi_im_cfg_id_list_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + j.write_int(c[i1]); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::csi_im_cfg_id_list_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_process_r11_s::csi_im_cfg_id_list_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 2, UnalignedIntegerPacker(1, 4))); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::csi_im_cfg_id_list_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_process_r11_s::csi_im_cfg_id_list_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 2, UnalignedIntegerPacker(1, 4))); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::csi_im_cfg_id_list_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_::set(types::options e) +{ + type_ = e; +} +void csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc2_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_::set(types::options e) +{ + type_ = e; +} +void csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc_v1310_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_::set(types::options e) +{ + type_ = e; +} +void csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_process_r11_s::cqi_report_aperiodic_proc2_v1310_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// N4SPUCCH-Resource-r15 ::= SEQUENCE +SRSASN_CODE n4_spucch_res_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, n4start_prb_r15, (uint8_t)0, (uint8_t)109)); + HANDLE_CODE(pack_unalign_integer(bref, n4nof_prb_r15, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE n4_spucch_res_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(n4start_prb_r15, bref, (uint8_t)0, (uint8_t)109)); + HANDLE_CODE(unpack_unalign_integer(n4nof_prb_r15, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void n4_spucch_res_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("n4startingPRB-r15", n4start_prb_r15); + j.write_int("n4numberOfPRB-r15", n4nof_prb_r15); + j.end_obj(); +} + +// ZeroTxPowerCSI-RS-r12 ::= SEQUENCE +SRSASN_CODE zero_tx_pwr_csi_rs_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(zero_tx_pwr_res_cfg_list_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, zero_tx_pwr_sf_cfg_r12, (uint8_t)0, (uint8_t)154)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE zero_tx_pwr_csi_rs_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(zero_tx_pwr_res_cfg_list_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(zero_tx_pwr_sf_cfg_r12, bref, (uint8_t)0, (uint8_t)154)); + + return SRSASN_SUCCESS; +} +void zero_tx_pwr_csi_rs_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("zeroTxPowerResourceConfigList-r12", zero_tx_pwr_res_cfg_list_r12.to_string()); + j.write_int("zeroTxPowerSubframeConfig-r12", zero_tx_pwr_sf_cfg_r12); + j.end_obj(); +} + +// CQI-ReportAperiodic-r10 ::= CHOICE +void cqi_report_aperiodic_r10_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_aperiodic_r10_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("cqi-ReportModeAperiodic-r10", c.cqi_report_mode_aperiodic_r10.to_string()); + if (c.aperiodic_csi_trigger_r10_present) { + j.write_fieldname("aperiodicCSI-Trigger-r10"); + j.start_obj(); + j.write_str("trigger1-r10", c.aperiodic_csi_trigger_r10.trigger1_r10.to_string()); + j.write_str("trigger2-r10", c.aperiodic_csi_trigger_r10.trigger2_r10.to_string()); + j.end_obj(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_aperiodic_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.aperiodic_csi_trigger_r10_present, 1)); + HANDLE_CODE(pack_enum(bref, c.cqi_report_mode_aperiodic_r10)); + if (c.aperiodic_csi_trigger_r10_present) { + HANDLE_CODE(c.aperiodic_csi_trigger_r10.trigger1_r10.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_r10.trigger2_r10.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.aperiodic_csi_trigger_r10_present, 1)); + HANDLE_CODE(unpack_enum(c.cqi_report_mode_aperiodic_r10, bref)); + if (c.aperiodic_csi_trigger_r10_present) { + HANDLE_CODE(c.aperiodic_csi_trigger_r10.trigger1_r10.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_r10.trigger2_r10.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_aperiodic_r10_c::setup_s_::setup_s_() +{ + aperiodic_csi_trigger_r10_present = false; +} + +// CQI-ReportAperiodic-v1250 ::= CHOICE +void cqi_report_aperiodic_v1250_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_aperiodic_v1250_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("aperiodicCSI-Trigger-v1250"); + j.start_obj(); + j.write_str("trigger-SubframeSetIndicator-r12", c.aperiodic_csi_trigger_v1250.trigger_sf_set_ind_r12.to_string()); + j.write_str("trigger1-SubframeSetIndicator-r12", + c.aperiodic_csi_trigger_v1250.trigger1_sf_set_ind_r12.to_string()); + j.write_str("trigger2-SubframeSetIndicator-r12", + c.aperiodic_csi_trigger_v1250.trigger2_sf_set_ind_r12.to_string()); + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1250_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_aperiodic_v1250_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.aperiodic_csi_trigger_v1250.trigger_sf_set_ind_r12)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1250.trigger1_sf_set_ind_r12.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1250.trigger2_sf_set_ind_r12.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1250_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_v1250_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.aperiodic_csi_trigger_v1250.trigger_sf_set_ind_r12, bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1250.trigger1_sf_set_ind_r12.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1250.trigger2_sf_set_ind_r12.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1250_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportAperiodic-v1310 ::= CHOICE +void cqi_report_aperiodic_v1310_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_aperiodic_v1310_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(); + if (c.aperiodic_csi_trigger_v1310_present) { + j.write_fieldname("aperiodicCSI-Trigger-v1310"); + j.start_obj(); + j.write_str("trigger1-r13", c.aperiodic_csi_trigger_v1310.trigger1_r13.to_string()); + j.write_str("trigger2-r13", c.aperiodic_csi_trigger_v1310.trigger2_r13.to_string()); + j.write_str("trigger3-r13", c.aperiodic_csi_trigger_v1310.trigger3_r13.to_string()); + j.write_str("trigger4-r13", c.aperiodic_csi_trigger_v1310.trigger4_r13.to_string()); + j.write_str("trigger5-r13", c.aperiodic_csi_trigger_v1310.trigger5_r13.to_string()); + j.write_str("trigger6-r13", c.aperiodic_csi_trigger_v1310.trigger6_r13.to_string()); + j.end_obj(); + } + if (c.aperiodic_csi_trigger2_r13_present) { + j.write_fieldname("aperiodicCSI-Trigger2-r13"); + c.aperiodic_csi_trigger2_r13.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1310_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_aperiodic_v1310_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.aperiodic_csi_trigger_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.aperiodic_csi_trigger2_r13_present, 1)); + if (c.aperiodic_csi_trigger_v1310_present) { + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger1_r13.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger2_r13.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger3_r13.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger4_r13.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger5_r13.pack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger6_r13.pack(bref)); + } + if (c.aperiodic_csi_trigger2_r13_present) { + HANDLE_CODE(c.aperiodic_csi_trigger2_r13.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1310_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_v1310_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.aperiodic_csi_trigger_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.aperiodic_csi_trigger2_r13_present, 1)); + if (c.aperiodic_csi_trigger_v1310_present) { + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger1_r13.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger2_r13.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger3_r13.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger4_r13.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger5_r13.unpack(bref)); + HANDLE_CODE(c.aperiodic_csi_trigger_v1310.trigger6_r13.unpack(bref)); + } + if (c.aperiodic_csi_trigger2_r13_present) { + HANDLE_CODE(c.aperiodic_csi_trigger2_r13.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1310_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_aperiodic_v1310_c::setup_s_::setup_s_() +{ + aperiodic_csi_trigger_v1310_present = false; + aperiodic_csi_trigger2_r13_present = false; +} + +void cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_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("trigger1-SubframeSetIndicator-r13", c.trigger1_sf_set_ind_r13.to_string()); + j.write_str("trigger2-SubframeSetIndicator-r13", c.trigger2_sf_set_ind_r13.to_string()); + j.write_str("trigger3-SubframeSetIndicator-r13", c.trigger3_sf_set_ind_r13.to_string()); + j.write_str("trigger4-SubframeSetIndicator-r13", c.trigger4_sf_set_ind_r13.to_string()); + j.write_str("trigger5-SubframeSetIndicator-r13", c.trigger5_sf_set_ind_r13.to_string()); + j.write_str("trigger6-SubframeSetIndicator-r13", c.trigger6_sf_set_ind_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.trigger1_sf_set_ind_r13.pack(bref)); + HANDLE_CODE(c.trigger2_sf_set_ind_r13.pack(bref)); + HANDLE_CODE(c.trigger3_sf_set_ind_r13.pack(bref)); + HANDLE_CODE(c.trigger4_sf_set_ind_r13.pack(bref)); + HANDLE_CODE(c.trigger5_sf_set_ind_r13.pack(bref)); + HANDLE_CODE(c.trigger6_sf_set_ind_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.trigger1_sf_set_ind_r13.unpack(bref)); + HANDLE_CODE(c.trigger2_sf_set_ind_r13.unpack(bref)); + HANDLE_CODE(c.trigger3_sf_set_ind_r13.unpack(bref)); + HANDLE_CODE(c.trigger4_sf_set_ind_r13.unpack(bref)); + HANDLE_CODE(c.trigger5_sf_set_ind_r13.unpack(bref)); + HANDLE_CODE(c.trigger6_sf_set_ind_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_v1310_c::setup_s_::aperiodic_csi_trigger2_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportAperiodicHybrid-r14 ::= SEQUENCE +cqi_report_aperiodic_hybrid_r14_s::cqi_report_aperiodic_hybrid_r14_s() +{ + triggers_r14_present = false; +} +SRSASN_CODE cqi_report_aperiodic_hybrid_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(triggers_r14_present, 1)); + + if (triggers_r14_present) { + HANDLE_CODE(triggers_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_hybrid_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(triggers_r14_present, 1)); + + if (triggers_r14_present) { + HANDLE_CODE(triggers_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_aperiodic_hybrid_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (triggers_r14_present) { + j.write_fieldname("triggers-r14"); + triggers_r14.to_json(j); + } + j.end_obj(); +} + +void cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::destroy_() +{ + switch (type_) { + case types::one_bit_r14: + c.destroy(); + break; + case types::two_bit_r14: + c.destroy(); + break; + case types::three_bit_r14: + c.destroy(); + break; + default: + break; + } +} +void cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::one_bit_r14: + c.init(); + break; + case types::two_bit_r14: + c.init(); + break; + case types::three_bit_r14: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_"); + } +} +cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::triggers_r14_c_( + const cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_bit_r14: + c.init(other.c.get()); + break; + case types::two_bit_r14: + c.init(other.c.get()); + break; + case types::three_bit_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_"); + } +} +cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_& cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_:: + operator=(const cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::one_bit_r14: + c.set(other.c.get()); + break; + case types::two_bit_r14: + c.set(other.c.get()); + break; + case types::three_bit_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_"); + } + + return *this; +} +void cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_bit_r14: + j.write_fieldname("oneBit-r14"); + j.start_obj(); + j.write_str("trigger1-Indicator-r14", c.get().trigger1_ind_r14.to_string()); + j.end_obj(); + break; + case types::two_bit_r14: + j.write_fieldname("twoBit-r14"); + j.start_obj(); + j.write_str("trigger01-Indicator-r14", c.get().trigger01_ind_r14.to_string()); + j.write_str("trigger10-Indicator-r14", c.get().trigger10_ind_r14.to_string()); + j.write_str("trigger11-Indicator-r14", c.get().trigger11_ind_r14.to_string()); + j.end_obj(); + break; + case types::three_bit_r14: + j.write_fieldname("threeBit-r14"); + j.start_obj(); + j.write_str("trigger001-Indicator-r14", c.get().trigger001_ind_r14.to_string()); + j.write_str("trigger010-Indicator-r14", c.get().trigger010_ind_r14.to_string()); + j.write_str("trigger011-Indicator-r14", c.get().trigger011_ind_r14.to_string()); + j.write_str("trigger100-Indicator-r14", c.get().trigger100_ind_r14.to_string()); + j.write_str("trigger101-Indicator-r14", c.get().trigger101_ind_r14.to_string()); + j.write_str("trigger110-Indicator-r14", c.get().trigger110_ind_r14.to_string()); + j.write_str("trigger111-Indicator-r14", c.get().trigger111_ind_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::one_bit_r14: + HANDLE_CODE(c.get().trigger1_ind_r14.pack(bref)); + break; + case types::two_bit_r14: + HANDLE_CODE(c.get().trigger01_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger10_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger11_ind_r14.pack(bref)); + break; + case types::three_bit_r14: + HANDLE_CODE(c.get().trigger001_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger010_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger011_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger100_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger101_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger110_ind_r14.pack(bref)); + HANDLE_CODE(c.get().trigger111_ind_r14.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::one_bit_r14: + HANDLE_CODE(c.get().trigger1_ind_r14.unpack(bref)); + break; + case types::two_bit_r14: + HANDLE_CODE(c.get().trigger01_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger10_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger11_ind_r14.unpack(bref)); + break; + case types::three_bit_r14: + HANDLE_CODE(c.get().trigger001_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger010_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger011_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger100_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger101_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger110_ind_r14.unpack(bref)); + HANDLE_CODE(c.get().trigger111_ind_r14.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportBoth-r11 ::= SEQUENCE +cqi_report_both_r11_s::cqi_report_both_r11_s() +{ + csi_im_cfg_to_release_list_r11_present = false; + csi_im_cfg_to_add_mod_list_r11_present = false; + csi_process_to_release_list_r11_present = false; + csi_process_to_add_mod_list_r11_present = false; +} +SRSASN_CODE cqi_report_both_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_im_cfg_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_process_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_process_to_add_mod_list_r11_present, 1)); + + if (csi_im_cfg_to_release_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_cfg_to_release_list_r11, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (csi_im_cfg_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_cfg_to_add_mod_list_r11, 1, 3)); + } + if (csi_process_to_release_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_process_to_release_list_r11, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (csi_process_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_process_to_add_mod_list_r11, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_both_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_im_cfg_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_process_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_process_to_add_mod_list_r11_present, 1)); + + if (csi_im_cfg_to_release_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_cfg_to_release_list_r11, bref, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (csi_im_cfg_to_add_mod_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_cfg_to_add_mod_list_r11, bref, 1, 3)); + } + if (csi_process_to_release_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_process_to_release_list_r11, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (csi_process_to_add_mod_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_process_to_add_mod_list_r11, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_both_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_im_cfg_to_release_list_r11_present) { + j.start_array("csi-IM-ConfigToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_to_release_list_r11.size(); ++i1) { + j.write_int(csi_im_cfg_to_release_list_r11[i1]); + } + j.end_array(); + } + if (csi_im_cfg_to_add_mod_list_r11_present) { + j.start_array("csi-IM-ConfigToAddModList-r11"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_to_add_mod_list_r11.size(); ++i1) { + csi_im_cfg_to_add_mod_list_r11[i1].to_json(j); + } + j.end_array(); + } + if (csi_process_to_release_list_r11_present) { + j.start_array("csi-ProcessToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < csi_process_to_release_list_r11.size(); ++i1) { + j.write_int(csi_process_to_release_list_r11[i1]); + } + j.end_array(); + } + if (csi_process_to_add_mod_list_r11_present) { + j.start_array("csi-ProcessToAddModList-r11"); + for (uint32_t i1 = 0; i1 < csi_process_to_add_mod_list_r11.size(); ++i1) { + csi_process_to_add_mod_list_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CQI-ReportBoth-v1250 ::= SEQUENCE +cqi_report_both_v1250_s::cqi_report_both_v1250_s() +{ + csi_im_cfg_to_release_list_ext_r12_present = false; + csi_im_cfg_to_add_mod_list_ext_r12_present = false; +} +SRSASN_CODE cqi_report_both_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_im_cfg_to_release_list_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_to_add_mod_list_ext_r12_present, 1)); + + if (csi_im_cfg_to_release_list_ext_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, csi_im_cfg_to_release_list_ext_r12, (uint8_t)4, (uint8_t)4)); + } + if (csi_im_cfg_to_add_mod_list_ext_r12_present) { + HANDLE_CODE(csi_im_cfg_to_add_mod_list_ext_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_both_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_im_cfg_to_release_list_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_to_add_mod_list_ext_r12_present, 1)); + + if (csi_im_cfg_to_release_list_ext_r12_present) { + HANDLE_CODE(unpack_unalign_integer(csi_im_cfg_to_release_list_ext_r12, bref, (uint8_t)4, (uint8_t)4)); + } + if (csi_im_cfg_to_add_mod_list_ext_r12_present) { + HANDLE_CODE(csi_im_cfg_to_add_mod_list_ext_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_both_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_im_cfg_to_release_list_ext_r12_present) { + j.write_int("csi-IM-ConfigToReleaseListExt-r12", csi_im_cfg_to_release_list_ext_r12); + } + if (csi_im_cfg_to_add_mod_list_ext_r12_present) { + j.write_fieldname("csi-IM-ConfigToAddModListExt-r12"); + csi_im_cfg_to_add_mod_list_ext_r12.to_json(j); + } + j.end_obj(); +} + +// CQI-ReportBoth-v1310 ::= SEQUENCE +cqi_report_both_v1310_s::cqi_report_both_v1310_s() +{ + csi_im_cfg_to_release_list_ext_r13_present = false; + csi_im_cfg_to_add_mod_list_ext_r13_present = false; +} +SRSASN_CODE cqi_report_both_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_im_cfg_to_release_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_im_cfg_to_add_mod_list_ext_r13_present, 1)); + + if (csi_im_cfg_to_release_list_ext_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, csi_im_cfg_to_release_list_ext_r13, 1, 20, UnalignedIntegerPacker(5, 24))); + } + if (csi_im_cfg_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_im_cfg_to_add_mod_list_ext_r13, 1, 20)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_both_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_im_cfg_to_release_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_im_cfg_to_add_mod_list_ext_r13_present, 1)); + + if (csi_im_cfg_to_release_list_ext_r13_present) { + HANDLE_CODE( + unpack_dyn_seq_of(csi_im_cfg_to_release_list_ext_r13, bref, 1, 20, UnalignedIntegerPacker(5, 24))); + } + if (csi_im_cfg_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_im_cfg_to_add_mod_list_ext_r13, bref, 1, 20)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_both_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_im_cfg_to_release_list_ext_r13_present) { + j.start_array("csi-IM-ConfigToReleaseListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_to_release_list_ext_r13.size(); ++i1) { + j.write_int(csi_im_cfg_to_release_list_ext_r13[i1]); + } + j.end_array(); + } + if (csi_im_cfg_to_add_mod_list_ext_r13_present) { + j.start_array("csi-IM-ConfigToAddModListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_im_cfg_to_add_mod_list_ext_r13.size(); ++i1) { + csi_im_cfg_to_add_mod_list_ext_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CQI-ReportPeriodic-r10 ::= CHOICE +void cqi_report_periodic_r10_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_r10_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_int("cqi-PUCCH-ResourceIndex-r10", c.cqi_pucch_res_idx_r10); + if (c.cqi_pucch_res_idx_p1_r10_present) { + j.write_int("cqi-PUCCH-ResourceIndexP1-r10", c.cqi_pucch_res_idx_p1_r10); + } + j.write_int("cqi-pmi-ConfigIndex", c.cqi_pmi_cfg_idx); + j.write_fieldname("cqi-FormatIndicatorPeriodic-r10"); + c.cqi_format_ind_periodic_r10.to_json(j); + if (c.ri_cfg_idx_present) { + j.write_int("ri-ConfigIndex", c.ri_cfg_idx); + } + j.write_bool("simultaneousAckNackAndCQI", c.simul_ack_nack_and_cqi); + if (c.cqi_mask_r9_present) { + j.write_str("cqi-Mask-r9", "setup"); + } + if (c.csi_cfg_idx_r10_present) { + j.write_fieldname("csi-ConfigIndex-r10"); + c.csi_cfg_idx_r10.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.cqi_pucch_res_idx_p1_r10_present, 1)); + HANDLE_CODE(bref.pack(c.ri_cfg_idx_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_mask_r9_present, 1)); + HANDLE_CODE(bref.pack(c.csi_cfg_idx_r10_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pucch_res_idx_r10, (uint16_t)0, (uint16_t)1184)); + if (c.cqi_pucch_res_idx_p1_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pucch_res_idx_p1_r10, (uint16_t)0, (uint16_t)1184)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pmi_cfg_idx, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(c.cqi_format_ind_periodic_r10.pack(bref)); + if (c.ri_cfg_idx_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ri_cfg_idx, (uint16_t)0, (uint16_t)1023)); + } + HANDLE_CODE(bref.pack(c.simul_ack_nack_and_cqi, 1)); + if (c.csi_cfg_idx_r10_present) { + HANDLE_CODE(c.csi_cfg_idx_r10.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.cqi_pucch_res_idx_p1_r10_present, 1)); + HANDLE_CODE(bref.unpack(c.ri_cfg_idx_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_mask_r9_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_cfg_idx_r10_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pucch_res_idx_r10, bref, (uint16_t)0, (uint16_t)1184)); + if (c.cqi_pucch_res_idx_p1_r10_present) { + HANDLE_CODE(unpack_unalign_integer(c.cqi_pucch_res_idx_p1_r10, bref, (uint16_t)0, (uint16_t)1184)); + } + HANDLE_CODE(unpack_unalign_integer(c.cqi_pmi_cfg_idx, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(c.cqi_format_ind_periodic_r10.unpack(bref)); + if (c.ri_cfg_idx_present) { + HANDLE_CODE(unpack_unalign_integer(c.ri_cfg_idx, bref, (uint16_t)0, (uint16_t)1023)); + } + HANDLE_CODE(bref.unpack(c.simul_ack_nack_and_cqi, 1)); + if (c.csi_cfg_idx_r10_present) { + HANDLE_CODE(c.csi_cfg_idx_r10.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_r10_c::setup_s_::setup_s_() +{ + cqi_pucch_res_idx_p1_r10_present = false; + ri_cfg_idx_present = false; + cqi_mask_r9_present = false; + csi_cfg_idx_r10_present = false; +} + +void cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::destroy_() +{ + switch (type_) { + case types::wideband_cqi_r10: + c.destroy(); + break; + case types::subband_cqi_r10: + c.destroy(); + break; + default: + break; + } +} +void cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::wideband_cqi_r10: + c.init(); + break; + case types::subband_cqi_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_"); + } +} +cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::cqi_format_ind_periodic_r10_c_( + const cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::wideband_cqi_r10: + c.init(other.c.get()); + break; + case types::subband_cqi_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_"); + } +} +cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_& +cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_:: +operator=(const cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::wideband_cqi_r10: + c.set(other.c.get()); + break; + case types::subband_cqi_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_"); + } + + return *this; +} +void cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::wideband_cqi_r10: + j.write_fieldname("widebandCQI-r10"); + j.start_obj(); + if (c.get().csi_report_mode_r10_present) { + j.write_str("csi-ReportMode-r10", c.get().csi_report_mode_r10.to_string()); + } + j.end_obj(); + break; + case types::subband_cqi_r10: + j.write_fieldname("subbandCQI-r10"); + j.start_obj(); + j.write_int("k", c.get().k); + j.write_str("periodicityFactor-r10", c.get().periodicity_factor_r10.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::wideband_cqi_r10: + HANDLE_CODE(bref.pack(c.get().csi_report_mode_r10_present, 1)); + if (c.get().csi_report_mode_r10_present) { + HANDLE_CODE(pack_enum(bref, c.get().csi_report_mode_r10)); + } + break; + case types::subband_cqi_r10: + HANDLE_CODE(pack_unalign_integer(bref, c.get().k, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, c.get().periodicity_factor_r10)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::wideband_cqi_r10: + HANDLE_CODE(bref.unpack(c.get().csi_report_mode_r10_present, 1)); + if (c.get().csi_report_mode_r10_present) { + HANDLE_CODE(unpack_enum(c.get().csi_report_mode_r10, bref)); + } + break; + case types::subband_cqi_r10: + HANDLE_CODE(unpack_unalign_integer(c.get().k, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_enum(c.get().periodicity_factor_r10, bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_::wideband_cqi_r10_s_() +{ + csi_report_mode_r10_present = false; +} + +void cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_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_int("cqi-pmi-ConfigIndex2-r10", c.cqi_pmi_cfg_idx2_r10); + if (c.ri_cfg_idx2_r10_present) { + j.write_int("ri-ConfigIndex2-r10", c.ri_cfg_idx2_r10); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ri_cfg_idx2_r10_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pmi_cfg_idx2_r10, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx2_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ri_cfg_idx2_r10, (uint16_t)0, (uint16_t)1023)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ri_cfg_idx2_r10_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pmi_cfg_idx2_r10, bref, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx2_r10_present) { + HANDLE_CODE(unpack_unalign_integer(c.ri_cfg_idx2_r10, bref, (uint16_t)0, (uint16_t)1023)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_r10_c::setup_s_::csi_cfg_idx_r10_c_::setup_s_::setup_s_() +{ + ri_cfg_idx2_r10_present = false; +} + +// CQI-ReportPeriodic-v1130 ::= SEQUENCE +cqi_report_periodic_v1130_s::cqi_report_periodic_v1130_s() +{ + simul_ack_nack_and_cqi_format3_r11_present = false; + cqi_report_periodic_proc_ext_to_release_list_r11_present = false; + cqi_report_periodic_proc_ext_to_add_mod_list_r11_present = false; +} +SRSASN_CODE cqi_report_periodic_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(simul_ack_nack_and_cqi_format3_r11_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_proc_ext_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_proc_ext_to_add_mod_list_r11_present, 1)); + + if (cqi_report_periodic_proc_ext_to_release_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cqi_report_periodic_proc_ext_to_release_list_r11, 1, 3, + UnalignedIntegerPacker(1, 3))); + } + if (cqi_report_periodic_proc_ext_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cqi_report_periodic_proc_ext_to_add_mod_list_r11, 1, 3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(simul_ack_nack_and_cqi_format3_r11_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_proc_ext_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_proc_ext_to_add_mod_list_r11_present, 1)); + + if (cqi_report_periodic_proc_ext_to_release_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(cqi_report_periodic_proc_ext_to_release_list_r11, bref, 1, 3, + UnalignedIntegerPacker(1, 3))); + } + if (cqi_report_periodic_proc_ext_to_add_mod_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(cqi_report_periodic_proc_ext_to_add_mod_list_r11, bref, 1, 3)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_periodic_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (simul_ack_nack_and_cqi_format3_r11_present) { + j.write_str("simultaneousAckNackAndCQI-Format3-r11", "setup"); + } + if (cqi_report_periodic_proc_ext_to_release_list_r11_present) { + j.start_array("cqi-ReportPeriodicProcExtToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < cqi_report_periodic_proc_ext_to_release_list_r11.size(); ++i1) { + j.write_int(cqi_report_periodic_proc_ext_to_release_list_r11[i1]); + } + j.end_array(); + } + if (cqi_report_periodic_proc_ext_to_add_mod_list_r11_present) { + j.start_array("cqi-ReportPeriodicProcExtToAddModList-r11"); + for (uint32_t i1 = 0; i1 < cqi_report_periodic_proc_ext_to_add_mod_list_r11.size(); ++i1) { + cqi_report_periodic_proc_ext_to_add_mod_list_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CQI-ReportPeriodic-v1310 ::= SEQUENCE +cqi_report_periodic_v1310_s::cqi_report_periodic_v1310_s() +{ + cri_report_cfg_r13_present = false; + simul_ack_nack_and_cqi_format4_format5_r13_present = false; +} +SRSASN_CODE cqi_report_periodic_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cri_report_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(simul_ack_nack_and_cqi_format4_format5_r13_present, 1)); + + if (cri_report_cfg_r13_present) { + HANDLE_CODE(cri_report_cfg_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cri_report_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(simul_ack_nack_and_cqi_format4_format5_r13_present, 1)); + + if (cri_report_cfg_r13_present) { + HANDLE_CODE(cri_report_cfg_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_periodic_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cri_report_cfg_r13_present) { + j.write_fieldname("cri-ReportConfig-r13"); + cri_report_cfg_r13.to_json(j); + } + if (simul_ack_nack_and_cqi_format4_format5_r13_present) { + j.write_str("simultaneousAckNackAndCQI-Format4-Format5-r13", "setup"); + } + j.end_obj(); +} + +// CQI-ReportPeriodic-v1320 ::= SEQUENCE +cqi_report_periodic_v1320_s::cqi_report_periodic_v1320_s() +{ + periodicity_factor_wb_r13_present = false; +} +SRSASN_CODE cqi_report_periodic_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(periodicity_factor_wb_r13_present, 1)); + + if (periodicity_factor_wb_r13_present) { + HANDLE_CODE(pack_enum(bref, periodicity_factor_wb_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(periodicity_factor_wb_r13_present, 1)); + + if (periodicity_factor_wb_r13_present) { + HANDLE_CODE(unpack_enum(periodicity_factor_wb_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_periodic_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (periodicity_factor_wb_r13_present) { + j.write_str("periodicityFactorWB-r13", periodicity_factor_wb_r13.to_string()); + } + j.end_obj(); +} + +// DL-AM-RLC-r15 ::= SEQUENCE +SRSASN_CODE dl_am_rlc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, t_reordering_r15)); + HANDLE_CODE(pack_enum(bref, t_status_prohibit_r15)); + HANDLE_CODE(bref.pack(extended_rlc_li_field_r15, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_am_rlc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(t_reordering_r15, bref)); + HANDLE_CODE(unpack_enum(t_status_prohibit_r15, bref)); + HANDLE_CODE(bref.unpack(extended_rlc_li_field_r15, 1)); + + return SRSASN_SUCCESS; +} +void dl_am_rlc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t-Reordering-r15", t_reordering_r15.to_string()); + j.write_str("t-StatusProhibit-r15", t_status_prohibit_r15.to_string()); + j.write_bool("extended-RLC-LI-Field-r15", extended_rlc_li_field_r15); + j.end_obj(); +} + +// DL-UM-RLC-r15 ::= SEQUENCE +SRSASN_CODE dl_um_rlc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sn_field_len_r15)); + HANDLE_CODE(pack_enum(bref, t_reordering_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_um_rlc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sn_field_len_r15, bref)); + HANDLE_CODE(unpack_enum(t_reordering_r15, bref)); + + return SRSASN_SUCCESS; +} +void dl_um_rlc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sn-FieldLength-r15", sn_field_len_r15.to_string()); + j.write_str("t-Reordering-r15", t_reordering_r15.to_string()); + j.end_obj(); +} + +// MeasSubframePattern-r10 ::= CHOICE +void meas_sf_pattern_r10_c::destroy_() +{ + switch (type_) { + case types::sf_pattern_fdd_r10: + c.destroy >(); + break; + case types::sf_pattern_tdd_r10: + c.destroy(); + break; + default: + break; + } +} +void meas_sf_pattern_r10_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sf_pattern_fdd_r10: + c.init >(); + break; + case types::sf_pattern_tdd_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c"); + } +} +meas_sf_pattern_r10_c::meas_sf_pattern_r10_c(const meas_sf_pattern_r10_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf_pattern_fdd_r10: + c.init(other.c.get >()); + break; + case types::sf_pattern_tdd_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c"); + } +} +meas_sf_pattern_r10_c& meas_sf_pattern_r10_c::operator=(const meas_sf_pattern_r10_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf_pattern_fdd_r10: + c.set(other.c.get >()); + break; + case types::sf_pattern_tdd_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c"); + } + + return *this; +} +void meas_sf_pattern_r10_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf_pattern_fdd_r10: + j.write_str("subframePatternFDD-r10", c.get >().to_string()); + break; + case types::sf_pattern_tdd_r10: + j.write_fieldname("subframePatternTDD-r10"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_sf_pattern_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf_pattern_fdd_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_pattern_tdd_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_sf_pattern_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf_pattern_fdd_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_pattern_tdd_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::destroy_() +{ + switch (type_) { + case types::sf_cfg1_minus5_r10: + c.destroy >(); + break; + case types::sf_cfg0_r10: + c.destroy >(); + break; + case types::sf_cfg6_r10: + c.destroy >(); + break; + default: + break; + } +} +void meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sf_cfg1_minus5_r10: + c.init >(); + break; + case types::sf_cfg0_r10: + c.init >(); + break; + case types::sf_cfg6_r10: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_"); + } +} +meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::sf_pattern_tdd_r10_c_( + const meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf_cfg1_minus5_r10: + c.init(other.c.get >()); + break; + case types::sf_cfg0_r10: + c.init(other.c.get >()); + break; + case types::sf_cfg6_r10: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_"); + } +} +meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_& meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_:: + operator=(const meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf_cfg1_minus5_r10: + c.set(other.c.get >()); + break; + case types::sf_cfg0_r10: + c.set(other.c.get >()); + break; + case types::sf_cfg6_r10: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_"); + } + + return *this; +} +void meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf_cfg1_minus5_r10: + j.write_str("subframeConfig1-5-r10", c.get >().to_string()); + break; + case types::sf_cfg0_r10: + j.write_str("subframeConfig0-r10", c.get >().to_string()); + break; + case types::sf_cfg6_r10: + j.write_str("subframeConfig6-r10", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf_cfg1_minus5_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_cfg0_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_cfg6_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf_cfg1_minus5_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_cfg0_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_cfg6_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SPDCCH-Elements-r15 ::= CHOICE +void spdcch_elems_r15_c::set(types::options e) +{ + type_ = e; +} +void spdcch_elems_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.spdcch_set_cfg_id_r15_present) { + j.write_int("spdcch-SetConfigId-r15", c.spdcch_set_cfg_id_r15); + } + if (c.spdcch_set_ref_sig_r15_present) { + j.write_str("spdcch-SetReferenceSig-r15", c.spdcch_set_ref_sig_r15.to_string()); + } + if (c.tx_type_r15_present) { + j.write_str("transmissionType-r15", c.tx_type_r15.to_string()); + } + if (c.spdcch_no_of_symbols_r15_present) { + j.write_int("spdcch-NoOfSymbols-r15", c.spdcch_no_of_symbols_r15); + } + if (c.dmrs_scrambling_seq_int_r15_present) { + j.write_int("dmrs-ScramblingSequenceInt-r15", c.dmrs_scrambling_seq_int_r15); + } + if (c.dci7_candidates_per_al_pdcch_r15_present) { + j.start_array("dci7-CandidatesPerAL-PDCCH-r15"); + for (uint32_t i1 = 0; i1 < c.dci7_candidates_per_al_pdcch_r15.size(); ++i1) { + j.write_int(c.dci7_candidates_per_al_pdcch_r15[i1]); + } + j.end_array(); + } + if (c.dci7_candidate_sets_per_al_spdcch_r15_present) { + j.start_array("dci7-CandidateSetsPerAL-SPDCCH-r15"); + for (uint32_t i1 = 0; i1 < c.dci7_candidate_sets_per_al_spdcch_r15.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < c.dci7_candidate_sets_per_al_spdcch_r15[i1].size(); ++i2) { + j.write_int(c.dci7_candidate_sets_per_al_spdcch_r15[i1][i2]); + } + j.end_array(); + } + j.end_array(); + } + if (c.res_block_assign_r15_present) { + j.write_fieldname("resourceBlockAssignment-r15"); + j.start_obj(); + j.write_int("numberRB-InFreq-domain-r15", c.res_block_assign_r15.num_rb_in_freq_domain_r15); + j.write_str("resourceBlockAssignment-r15", c.res_block_assign_r15.res_block_assign_r15.to_string()); + j.end_obj(); + } + if (c.subslot_applicability_r15_present) { + j.write_str("subslotApplicability-r15", c.subslot_applicability_r15.to_string()); + } + if (c.al_start_point_spdcch_r15_present) { + j.start_array("al-StartingPointSPDCCH-r15"); + for (uint32_t i1 = 0; i1 < c.al_start_point_spdcch_r15.size(); ++i1) { + j.write_int(c.al_start_point_spdcch_r15[i1]); + } + j.end_array(); + } + if (c.sf_type_r15_present) { + j.write_str("subframeType-r15", c.sf_type_r15.to_string()); + } + if (c.rate_matching_mode_r15_present) { + j.write_str("rateMatchingMode-r15", c.rate_matching_mode_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "spdcch_elems_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE spdcch_elems_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.spdcch_set_cfg_id_r15_present, 1)); + HANDLE_CODE(bref.pack(c.spdcch_set_ref_sig_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tx_type_r15_present, 1)); + HANDLE_CODE(bref.pack(c.spdcch_no_of_symbols_r15_present, 1)); + HANDLE_CODE(bref.pack(c.dmrs_scrambling_seq_int_r15_present, 1)); + HANDLE_CODE(bref.pack(c.dci7_candidates_per_al_pdcch_r15_present, 1)); + HANDLE_CODE(bref.pack(c.dci7_candidate_sets_per_al_spdcch_r15_present, 1)); + HANDLE_CODE(bref.pack(c.res_block_assign_r15_present, 1)); + HANDLE_CODE(bref.pack(c.subslot_applicability_r15_present, 1)); + HANDLE_CODE(bref.pack(c.al_start_point_spdcch_r15_present, 1)); + HANDLE_CODE(bref.pack(c.sf_type_r15_present, 1)); + HANDLE_CODE(bref.pack(c.rate_matching_mode_r15_present, 1)); + if (c.spdcch_set_cfg_id_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.spdcch_set_cfg_id_r15, (uint8_t)0, (uint8_t)3)); + } + if (c.spdcch_set_ref_sig_r15_present) { + HANDLE_CODE(pack_enum(bref, c.spdcch_set_ref_sig_r15)); + } + if (c.tx_type_r15_present) { + HANDLE_CODE(pack_enum(bref, c.tx_type_r15)); + } + if (c.spdcch_no_of_symbols_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.spdcch_no_of_symbols_r15, (uint8_t)1, (uint8_t)2)); + } + if (c.dmrs_scrambling_seq_int_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.dmrs_scrambling_seq_int_r15, (uint16_t)0, (uint16_t)503)); + } + if (c.dci7_candidates_per_al_pdcch_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.dci7_candidates_per_al_pdcch_r15, 1, 4, UnalignedIntegerPacker(0, 6))); + } + if (c.dci7_candidate_sets_per_al_spdcch_r15_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.dci7_candidate_sets_per_al_spdcch_r15, 1, 2, + SeqOfPacker >(1, 4, UnalignedIntegerPacker(0, 6)))); + } + if (c.res_block_assign_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, c.res_block_assign_r15.num_rb_in_freq_domain_r15, (uint8_t)2, (uint8_t)100)); + HANDLE_CODE(c.res_block_assign_r15.res_block_assign_r15.pack(bref)); + } + if (c.subslot_applicability_r15_present) { + HANDLE_CODE(c.subslot_applicability_r15.pack(bref)); + } + if (c.al_start_point_spdcch_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.al_start_point_spdcch_r15, 1, 4, UnalignedIntegerPacker(0, 49))); + } + if (c.sf_type_r15_present) { + HANDLE_CODE(pack_enum(bref, c.sf_type_r15)); + } + if (c.rate_matching_mode_r15_present) { + HANDLE_CODE(pack_enum(bref, c.rate_matching_mode_r15)); + } + break; + default: + log_invalid_choice_id(type_, "spdcch_elems_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE spdcch_elems_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.spdcch_set_cfg_id_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.spdcch_set_ref_sig_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tx_type_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.spdcch_no_of_symbols_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.dmrs_scrambling_seq_int_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.dci7_candidates_per_al_pdcch_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.dci7_candidate_sets_per_al_spdcch_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.res_block_assign_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.subslot_applicability_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.al_start_point_spdcch_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.sf_type_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.rate_matching_mode_r15_present, 1)); + if (c.spdcch_set_cfg_id_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.spdcch_set_cfg_id_r15, bref, (uint8_t)0, (uint8_t)3)); + } + if (c.spdcch_set_ref_sig_r15_present) { + HANDLE_CODE(unpack_enum(c.spdcch_set_ref_sig_r15, bref)); + } + if (c.tx_type_r15_present) { + HANDLE_CODE(unpack_enum(c.tx_type_r15, bref)); + } + if (c.spdcch_no_of_symbols_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.spdcch_no_of_symbols_r15, bref, (uint8_t)1, (uint8_t)2)); + } + if (c.dmrs_scrambling_seq_int_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.dmrs_scrambling_seq_int_r15, bref, (uint16_t)0, (uint16_t)503)); + } + if (c.dci7_candidates_per_al_pdcch_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.dci7_candidates_per_al_pdcch_r15, bref, 1, 4, UnalignedIntegerPacker(0, 6))); + } + if (c.dci7_candidate_sets_per_al_spdcch_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of( + c.dci7_candidate_sets_per_al_spdcch_r15, bref, 1, 2, + SeqOfPacker >(1, 4, UnalignedIntegerPacker(0, 6)))); + } + if (c.res_block_assign_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(c.res_block_assign_r15.num_rb_in_freq_domain_r15, bref, (uint8_t)2, (uint8_t)100)); + HANDLE_CODE(c.res_block_assign_r15.res_block_assign_r15.unpack(bref)); + } + if (c.subslot_applicability_r15_present) { + HANDLE_CODE(c.subslot_applicability_r15.unpack(bref)); + } + if (c.al_start_point_spdcch_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.al_start_point_spdcch_r15, bref, 1, 4, UnalignedIntegerPacker(0, 49))); + } + if (c.sf_type_r15_present) { + HANDLE_CODE(unpack_enum(c.sf_type_r15, bref)); + } + if (c.rate_matching_mode_r15_present) { + HANDLE_CODE(unpack_enum(c.rate_matching_mode_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "spdcch_elems_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +spdcch_elems_r15_c::setup_s_::setup_s_() +{ + ext = false; + spdcch_set_cfg_id_r15_present = false; + spdcch_set_ref_sig_r15_present = false; + tx_type_r15_present = false; + spdcch_no_of_symbols_r15_present = false; + dmrs_scrambling_seq_int_r15_present = false; + dci7_candidates_per_al_pdcch_r15_present = false; + dci7_candidate_sets_per_al_spdcch_r15_present = false; + res_block_assign_r15_present = false; + subslot_applicability_r15_present = false; + al_start_point_spdcch_r15_present = false; + sf_type_r15_present = false; + rate_matching_mode_r15_present = false; +} + +// SPUCCH-Elements-r15 ::= CHOICE +void spucch_elems_r15_c::set(types::options e) +{ + type_ = e; +} +void spucch_elems_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.n1_subslot_spucch_an_list_r15_present) { + j.start_array("n1SubslotSPUCCH-AN-List-r15"); + for (uint32_t i1 = 0; i1 < c.n1_subslot_spucch_an_list_r15.size(); ++i1) { + j.write_int(c.n1_subslot_spucch_an_list_r15[i1]); + } + j.end_array(); + } + if (c.n1_slot_spucch_fh_an_list_r15_present) { + j.write_int("n1SlotSPUCCH-FH-AN-List-r15", c.n1_slot_spucch_fh_an_list_r15); + } + if (c.n1_slot_spucch_no_fh_an_list_r15_present) { + j.write_int("n1SlotSPUCCH-NoFH-AN-List-r15", c.n1_slot_spucch_no_fh_an_list_r15); + } + if (c.n3_spucch_an_list_r15_present) { + j.write_int("n3SPUCCH-AN-List-r15", c.n3_spucch_an_list_r15); + } + if (c.n4_spucch_slot_res_r15_present) { + j.start_array("n4SPUCCHSlot-Resource-r15"); + for (uint32_t i1 = 0; i1 < c.n4_spucch_slot_res_r15.size(); ++i1) { + c.n4_spucch_slot_res_r15[i1].to_json(j); + } + j.end_array(); + } + if (c.n4_spucch_subslot_res_r15_present) { + j.start_array("n4SPUCCHSubslot-Resource-r15"); + for (uint32_t i1 = 0; i1 < c.n4_spucch_subslot_res_r15.size(); ++i1) { + c.n4_spucch_subslot_res_r15[i1].to_json(j); + } + j.end_array(); + } + if (c.n4max_coderate_slot_pucch_r15_present) { + j.write_int("n4maxCoderateSlotPUCCH-r15", c.n4max_coderate_slot_pucch_r15); + } + if (c.n4max_coderate_subslot_pucch_r15_present) { + j.write_int("n4maxCoderateSubslotPUCCH-r15", c.n4max_coderate_subslot_pucch_r15); + } + if (c.n4max_coderate_multi_res_slot_pucch_r15_present) { + j.write_int("n4maxCoderateMultiResourceSlotPUCCH-r15", c.n4max_coderate_multi_res_slot_pucch_r15); + } + if (c.n4max_coderate_multi_res_subslot_pucch_r15_present) { + j.write_int("n4maxCoderateMultiResourceSubslotPUCCH-r15", c.n4max_coderate_multi_res_subslot_pucch_r15); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "spucch_elems_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE spucch_elems_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.n1_subslot_spucch_an_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n1_slot_spucch_fh_an_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n1_slot_spucch_no_fh_an_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n3_spucch_an_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n4_spucch_slot_res_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n4_spucch_subslot_res_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n4max_coderate_slot_pucch_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n4max_coderate_subslot_pucch_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n4max_coderate_multi_res_slot_pucch_r15_present, 1)); + HANDLE_CODE(bref.pack(c.n4max_coderate_multi_res_subslot_pucch_r15_present, 1)); + if (c.n1_subslot_spucch_an_list_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.n1_subslot_spucch_an_list_r15, 1, 4, UnalignedIntegerPacker(0, 1319))); + } + if (c.n1_slot_spucch_fh_an_list_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n1_slot_spucch_fh_an_list_r15, (uint16_t)0, (uint16_t)1319)); + } + if (c.n1_slot_spucch_no_fh_an_list_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n1_slot_spucch_no_fh_an_list_r15, (uint16_t)0, (uint16_t)3959)); + } + if (c.n3_spucch_an_list_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n3_spucch_an_list_r15, (uint16_t)0, (uint16_t)549)); + } + if (c.n4_spucch_slot_res_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.n4_spucch_slot_res_r15, 1, 2)); + } + if (c.n4_spucch_subslot_res_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.n4_spucch_subslot_res_r15, 1, 2)); + } + if (c.n4max_coderate_slot_pucch_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n4max_coderate_slot_pucch_r15, (uint8_t)0, (uint8_t)7)); + } + if (c.n4max_coderate_subslot_pucch_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n4max_coderate_subslot_pucch_r15, (uint8_t)0, (uint8_t)7)); + } + if (c.n4max_coderate_multi_res_slot_pucch_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n4max_coderate_multi_res_slot_pucch_r15, (uint8_t)0, (uint8_t)7)); + } + if (c.n4max_coderate_multi_res_subslot_pucch_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.n4max_coderate_multi_res_subslot_pucch_r15, (uint8_t)0, (uint8_t)7)); + } + break; + default: + log_invalid_choice_id(type_, "spucch_elems_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE spucch_elems_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.n1_subslot_spucch_an_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n1_slot_spucch_fh_an_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n1_slot_spucch_no_fh_an_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n3_spucch_an_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n4_spucch_slot_res_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n4_spucch_subslot_res_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n4max_coderate_slot_pucch_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n4max_coderate_subslot_pucch_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n4max_coderate_multi_res_slot_pucch_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.n4max_coderate_multi_res_subslot_pucch_r15_present, 1)); + if (c.n1_subslot_spucch_an_list_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.n1_subslot_spucch_an_list_r15, bref, 1, 4, UnalignedIntegerPacker(0, 1319))); + } + if (c.n1_slot_spucch_fh_an_list_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n1_slot_spucch_fh_an_list_r15, bref, (uint16_t)0, (uint16_t)1319)); + } + if (c.n1_slot_spucch_no_fh_an_list_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n1_slot_spucch_no_fh_an_list_r15, bref, (uint16_t)0, (uint16_t)3959)); + } + if (c.n3_spucch_an_list_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n3_spucch_an_list_r15, bref, (uint16_t)0, (uint16_t)549)); + } + if (c.n4_spucch_slot_res_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.n4_spucch_slot_res_r15, bref, 1, 2)); + } + if (c.n4_spucch_subslot_res_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.n4_spucch_subslot_res_r15, bref, 1, 2)); + } + if (c.n4max_coderate_slot_pucch_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n4max_coderate_slot_pucch_r15, bref, (uint8_t)0, (uint8_t)7)); + } + if (c.n4max_coderate_subslot_pucch_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n4max_coderate_subslot_pucch_r15, bref, (uint8_t)0, (uint8_t)7)); + } + if (c.n4max_coderate_multi_res_slot_pucch_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n4max_coderate_multi_res_slot_pucch_r15, bref, (uint8_t)0, (uint8_t)7)); + } + if (c.n4max_coderate_multi_res_subslot_pucch_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.n4max_coderate_multi_res_subslot_pucch_r15, bref, (uint8_t)0, (uint8_t)7)); + } + break; + default: + log_invalid_choice_id(type_, "spucch_elems_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +spucch_elems_r15_c::setup_s_::setup_s_() +{ + n1_subslot_spucch_an_list_r15_present = false; + n1_slot_spucch_fh_an_list_r15_present = false; + n1_slot_spucch_no_fh_an_list_r15_present = false; + n3_spucch_an_list_r15_present = false; + n4_spucch_slot_res_r15_present = false; + n4_spucch_subslot_res_r15_present = false; + n4max_coderate_slot_pucch_r15_present = false; + n4max_coderate_subslot_pucch_r15_present = false; + n4max_coderate_multi_res_slot_pucch_r15_present = false; + n4max_coderate_multi_res_subslot_pucch_r15_present = false; +} + +// TPC-Index ::= CHOICE +void tpc_idx_c::destroy_() {} +void tpc_idx_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +tpc_idx_c::tpc_idx_c(const tpc_idx_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::idx_of_format3: + c.init(other.c.get()); + break; + case types::idx_of_format3_a: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tpc_idx_c"); + } +} +tpc_idx_c& tpc_idx_c::operator=(const tpc_idx_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::idx_of_format3: + c.set(other.c.get()); + break; + case types::idx_of_format3_a: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tpc_idx_c"); + } + + return *this; +} +void tpc_idx_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::idx_of_format3: + j.write_int("indexOfFormat3", c.get()); + break; + case types::idx_of_format3_a: + j.write_int("indexOfFormat3A", c.get()); + break; + default: + log_invalid_choice_id(type_, "tpc_idx_c"); + } + j.end_obj(); +} +SRSASN_CODE tpc_idx_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::idx_of_format3: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)15)); + break; + case types::idx_of_format3_a: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)31)); + break; + default: + log_invalid_choice_id(type_, "tpc_idx_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tpc_idx_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::idx_of_format3: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)15)); + break; + case types::idx_of_format3_a: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)31)); + break; + default: + log_invalid_choice_id(type_, "tpc_idx_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UL-AM-RLC-r15 ::= SEQUENCE +SRSASN_CODE ul_am_rlc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, t_poll_retx_r15)); + HANDLE_CODE(pack_enum(bref, poll_pdu_r15)); + HANDLE_CODE(pack_enum(bref, poll_byte_r15)); + HANDLE_CODE(pack_enum(bref, max_retx_thres_r15)); + HANDLE_CODE(bref.pack(extended_rlc_li_field_r15, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_am_rlc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(t_poll_retx_r15, bref)); + HANDLE_CODE(unpack_enum(poll_pdu_r15, bref)); + HANDLE_CODE(unpack_enum(poll_byte_r15, bref)); + HANDLE_CODE(unpack_enum(max_retx_thres_r15, bref)); + HANDLE_CODE(bref.unpack(extended_rlc_li_field_r15, 1)); + + return SRSASN_SUCCESS; +} +void ul_am_rlc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t-PollRetransmit-r15", t_poll_retx_r15.to_string()); + j.write_str("pollPDU-r15", poll_pdu_r15.to_string()); + j.write_str("pollByte-r15", poll_byte_r15.to_string()); + j.write_str("maxRetxThreshold-r15", max_retx_thres_r15.to_string()); + j.write_bool("extended-RLC-LI-Field-r15", extended_rlc_li_field_r15); + j.end_obj(); +} + +// UL-UM-RLC ::= SEQUENCE +SRSASN_CODE ul_um_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sn_field_len)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_um_rlc_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sn_field_len, bref)); + + return SRSASN_SUCCESS; +} +void ul_um_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sn-FieldLength", sn_field_len.to_string()); + j.end_obj(); +} + +// ZeroTxPowerCSI-RS-Conf-r12 ::= CHOICE +void zero_tx_pwr_csi_rs_conf_r12_c::set(types::options e) +{ + type_ = e; +} +void zero_tx_pwr_csi_rs_conf_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "zero_tx_pwr_csi_rs_conf_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE zero_tx_pwr_csi_rs_conf_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "zero_tx_pwr_csi_rs_conf_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE zero_tx_pwr_csi_rs_conf_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "zero_tx_pwr_csi_rs_conf_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportConfig-r10 ::= SEQUENCE +cqi_report_cfg_r10_s::cqi_report_cfg_r10_s() +{ + cqi_report_aperiodic_r10_present = false; + cqi_report_periodic_r10_present = false; + pmi_ri_report_r9_present = false; + csi_sf_pattern_cfg_r10_present = false; +} +SRSASN_CODE cqi_report_cfg_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_aperiodic_r10_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_r10_present, 1)); + HANDLE_CODE(bref.pack(pmi_ri_report_r9_present, 1)); + HANDLE_CODE(bref.pack(csi_sf_pattern_cfg_r10_present, 1)); + + if (cqi_report_aperiodic_r10_present) { + HANDLE_CODE(cqi_report_aperiodic_r10.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, nom_pdsch_rs_epre_offset, (int8_t)-1, (int8_t)6)); + if (cqi_report_periodic_r10_present) { + HANDLE_CODE(cqi_report_periodic_r10.pack(bref)); + } + if (csi_sf_pattern_cfg_r10_present) { + HANDLE_CODE(csi_sf_pattern_cfg_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_r10_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_r10_present, 1)); + HANDLE_CODE(bref.unpack(pmi_ri_report_r9_present, 1)); + HANDLE_CODE(bref.unpack(csi_sf_pattern_cfg_r10_present, 1)); + + if (cqi_report_aperiodic_r10_present) { + HANDLE_CODE(cqi_report_aperiodic_r10.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(nom_pdsch_rs_epre_offset, bref, (int8_t)-1, (int8_t)6)); + if (cqi_report_periodic_r10_present) { + HANDLE_CODE(cqi_report_periodic_r10.unpack(bref)); + } + if (csi_sf_pattern_cfg_r10_present) { + HANDLE_CODE(csi_sf_pattern_cfg_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_aperiodic_r10_present) { + j.write_fieldname("cqi-ReportAperiodic-r10"); + cqi_report_aperiodic_r10.to_json(j); + } + j.write_int("nomPDSCH-RS-EPRE-Offset", nom_pdsch_rs_epre_offset); + if (cqi_report_periodic_r10_present) { + j.write_fieldname("cqi-ReportPeriodic-r10"); + cqi_report_periodic_r10.to_json(j); + } + if (pmi_ri_report_r9_present) { + j.write_str("pmi-RI-Report-r9", "setup"); + } + if (csi_sf_pattern_cfg_r10_present) { + j.write_fieldname("csi-SubframePatternConfig-r10"); + csi_sf_pattern_cfg_r10.to_json(j); + } + j.end_obj(); +} + +void cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("csi-MeasSubframeSet1-r10"); + c.csi_meas_sf_set1_r10.to_json(j); + j.write_fieldname("csi-MeasSubframeSet2-r10"); + c.csi_meas_sf_set2_r10.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.csi_meas_sf_set1_r10.pack(bref)); + HANDLE_CODE(c.csi_meas_sf_set2_r10.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.csi_meas_sf_set1_r10.unpack(bref)); + HANDLE_CODE(c.csi_meas_sf_set2_r10.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_r10_s::csi_sf_pattern_cfg_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportConfig-v1130 ::= SEQUENCE +SRSASN_CODE cqi_report_cfg_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cqi_report_periodic_v1130.pack(bref)); + HANDLE_CODE(cqi_report_both_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(cqi_report_periodic_v1130.unpack(bref)); + HANDLE_CODE(cqi_report_both_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cqi-ReportPeriodic-v1130"); + cqi_report_periodic_v1130.to_json(j); + j.write_fieldname("cqi-ReportBoth-r11"); + cqi_report_both_r11.to_json(j); + j.end_obj(); +} + +// CQI-ReportConfig-v1250 ::= SEQUENCE +cqi_report_cfg_v1250_s::cqi_report_cfg_v1250_s() +{ + csi_sf_pattern_cfg_r12_present = false; + cqi_report_both_v1250_present = false; + cqi_report_aperiodic_v1250_present = false; + alt_cqi_table_r12_present = false; +} +SRSASN_CODE cqi_report_cfg_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_sf_pattern_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_both_v1250_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_aperiodic_v1250_present, 1)); + HANDLE_CODE(bref.pack(alt_cqi_table_r12_present, 1)); + + if (csi_sf_pattern_cfg_r12_present) { + HANDLE_CODE(csi_sf_pattern_cfg_r12.pack(bref)); + } + if (cqi_report_both_v1250_present) { + HANDLE_CODE(cqi_report_both_v1250.pack(bref)); + } + if (cqi_report_aperiodic_v1250_present) { + HANDLE_CODE(cqi_report_aperiodic_v1250.pack(bref)); + } + if (alt_cqi_table_r12_present) { + HANDLE_CODE(pack_enum(bref, alt_cqi_table_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_sf_pattern_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_both_v1250_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_v1250_present, 1)); + HANDLE_CODE(bref.unpack(alt_cqi_table_r12_present, 1)); + + if (csi_sf_pattern_cfg_r12_present) { + HANDLE_CODE(csi_sf_pattern_cfg_r12.unpack(bref)); + } + if (cqi_report_both_v1250_present) { + HANDLE_CODE(cqi_report_both_v1250.unpack(bref)); + } + if (cqi_report_aperiodic_v1250_present) { + HANDLE_CODE(cqi_report_aperiodic_v1250.unpack(bref)); + } + if (alt_cqi_table_r12_present) { + HANDLE_CODE(unpack_enum(alt_cqi_table_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_sf_pattern_cfg_r12_present) { + j.write_fieldname("csi-SubframePatternConfig-r12"); + csi_sf_pattern_cfg_r12.to_json(j); + } + if (cqi_report_both_v1250_present) { + j.write_fieldname("cqi-ReportBoth-v1250"); + cqi_report_both_v1250.to_json(j); + } + if (cqi_report_aperiodic_v1250_present) { + j.write_fieldname("cqi-ReportAperiodic-v1250"); + cqi_report_aperiodic_v1250.to_json(j); + } + if (alt_cqi_table_r12_present) { + j.write_str("altCQI-Table-r12", alt_cqi_table_r12.to_string()); + } + j.end_obj(); +} + +void cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_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("csi-MeasSubframeSets-r12", c.csi_meas_sf_sets_r12.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.csi_meas_sf_sets_r12.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.csi_meas_sf_sets_r12.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_v1250_s::csi_sf_pattern_cfg_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportConfig-v1310 ::= SEQUENCE +cqi_report_cfg_v1310_s::cqi_report_cfg_v1310_s() +{ + cqi_report_both_v1310_present = false; + cqi_report_aperiodic_v1310_present = false; + cqi_report_periodic_v1310_present = false; +} +SRSASN_CODE cqi_report_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_both_v1310_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_aperiodic_v1310_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_v1310_present, 1)); + + if (cqi_report_both_v1310_present) { + HANDLE_CODE(cqi_report_both_v1310.pack(bref)); + } + if (cqi_report_aperiodic_v1310_present) { + HANDLE_CODE(cqi_report_aperiodic_v1310.pack(bref)); + } + if (cqi_report_periodic_v1310_present) { + HANDLE_CODE(cqi_report_periodic_v1310.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_both_v1310_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_v1310_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_v1310_present, 1)); + + if (cqi_report_both_v1310_present) { + HANDLE_CODE(cqi_report_both_v1310.unpack(bref)); + } + if (cqi_report_aperiodic_v1310_present) { + HANDLE_CODE(cqi_report_aperiodic_v1310.unpack(bref)); + } + if (cqi_report_periodic_v1310_present) { + HANDLE_CODE(cqi_report_periodic_v1310.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_both_v1310_present) { + j.write_fieldname("cqi-ReportBoth-v1310"); + cqi_report_both_v1310.to_json(j); + } + if (cqi_report_aperiodic_v1310_present) { + j.write_fieldname("cqi-ReportAperiodic-v1310"); + cqi_report_aperiodic_v1310.to_json(j); + } + if (cqi_report_periodic_v1310_present) { + j.write_fieldname("cqi-ReportPeriodic-v1310"); + cqi_report_periodic_v1310.to_json(j); + } + j.end_obj(); +} + +// CQI-ReportConfig-v1320 ::= SEQUENCE +cqi_report_cfg_v1320_s::cqi_report_cfg_v1320_s() +{ + cqi_report_periodic_v1320_present = false; +} +SRSASN_CODE cqi_report_cfg_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_periodic_v1320_present, 1)); + + if (cqi_report_periodic_v1320_present) { + HANDLE_CODE(cqi_report_periodic_v1320.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_periodic_v1320_present, 1)); + + if (cqi_report_periodic_v1320_present) { + HANDLE_CODE(cqi_report_periodic_v1320.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_periodic_v1320_present) { + j.write_fieldname("cqi-ReportPeriodic-v1320"); + cqi_report_periodic_v1320.to_json(j); + } + j.end_obj(); +} + +// CQI-ReportConfig-v1430 ::= SEQUENCE +cqi_report_cfg_v1430_s::cqi_report_cfg_v1430_s() +{ + cqi_report_aperiodic_hybrid_r14_present = false; +} +SRSASN_CODE cqi_report_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_aperiodic_hybrid_r14_present, 1)); + + if (cqi_report_aperiodic_hybrid_r14_present) { + HANDLE_CODE(cqi_report_aperiodic_hybrid_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_aperiodic_hybrid_r14_present, 1)); + + if (cqi_report_aperiodic_hybrid_r14_present) { + HANDLE_CODE(cqi_report_aperiodic_hybrid_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_aperiodic_hybrid_r14_present) { + j.write_fieldname("cqi-ReportAperiodicHybrid-r14"); + cqi_report_aperiodic_hybrid_r14.to_json(j); + } + j.end_obj(); +} + +// CSI-RS-Config-r10 ::= SEQUENCE +csi_rs_cfg_r10_s::csi_rs_cfg_r10_s() +{ + csi_rs_r10_present = false; + zero_tx_pwr_csi_rs_r10_present = false; +} +SRSASN_CODE csi_rs_cfg_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_r10_present, 1)); + HANDLE_CODE(bref.pack(zero_tx_pwr_csi_rs_r10_present, 1)); + + if (csi_rs_r10_present) { + HANDLE_CODE(csi_rs_r10.pack(bref)); + } + if (zero_tx_pwr_csi_rs_r10_present) { + HANDLE_CODE(zero_tx_pwr_csi_rs_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_r10_present, 1)); + HANDLE_CODE(bref.unpack(zero_tx_pwr_csi_rs_r10_present, 1)); + + if (csi_rs_r10_present) { + HANDLE_CODE(csi_rs_r10.unpack(bref)); + } + if (zero_tx_pwr_csi_rs_r10_present) { + HANDLE_CODE(zero_tx_pwr_csi_rs_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_r10_present) { + j.write_fieldname("csi-RS-r10"); + csi_rs_r10.to_json(j); + } + if (zero_tx_pwr_csi_rs_r10_present) { + j.write_fieldname("zeroTxPowerCSI-RS-r10"); + zero_tx_pwr_csi_rs_r10.to_json(j); + } + j.end_obj(); +} + +void csi_rs_cfg_r10_s::csi_rs_r10_c_::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_r10_s::csi_rs_r10_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("antennaPortsCount-r10", c.ant_ports_count_r10.to_string()); + j.write_int("resourceConfig-r10", c.res_cfg_r10); + j.write_int("subframeConfig-r10", c.sf_cfg_r10); + j.write_int("p-C-r10", c.p_c_r10); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_r10_s::csi_rs_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_r10_s::csi_rs_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.ant_ports_count_r10)); + HANDLE_CODE(pack_unalign_integer(bref, c.res_cfg_r10, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, c.sf_cfg_r10, (uint8_t)0, (uint8_t)154)); + HANDLE_CODE(pack_unalign_integer(bref, c.p_c_r10, (int8_t)-8, (int8_t)15)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_r10_s::csi_rs_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_r10_s::csi_rs_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.ant_ports_count_r10, bref)); + HANDLE_CODE(unpack_unalign_integer(c.res_cfg_r10, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(c.sf_cfg_r10, bref, (uint8_t)0, (uint8_t)154)); + HANDLE_CODE(unpack_unalign_integer(c.p_c_r10, bref, (int8_t)-8, (int8_t)15)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_r10_s::csi_rs_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-Config-v1250 ::= SEQUENCE +csi_rs_cfg_v1250_s::csi_rs_cfg_v1250_s() +{ + zero_tx_pwr_csi_rs2_r12_present = false; + ds_zero_tx_pwr_csi_rs_r12_present = false; +} +SRSASN_CODE csi_rs_cfg_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(zero_tx_pwr_csi_rs2_r12_present, 1)); + HANDLE_CODE(bref.pack(ds_zero_tx_pwr_csi_rs_r12_present, 1)); + + if (zero_tx_pwr_csi_rs2_r12_present) { + HANDLE_CODE(zero_tx_pwr_csi_rs2_r12.pack(bref)); + } + if (ds_zero_tx_pwr_csi_rs_r12_present) { + HANDLE_CODE(ds_zero_tx_pwr_csi_rs_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(zero_tx_pwr_csi_rs2_r12_present, 1)); + HANDLE_CODE(bref.unpack(ds_zero_tx_pwr_csi_rs_r12_present, 1)); + + if (zero_tx_pwr_csi_rs2_r12_present) { + HANDLE_CODE(zero_tx_pwr_csi_rs2_r12.unpack(bref)); + } + if (ds_zero_tx_pwr_csi_rs_r12_present) { + HANDLE_CODE(ds_zero_tx_pwr_csi_rs_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (zero_tx_pwr_csi_rs2_r12_present) { + j.write_fieldname("zeroTxPowerCSI-RS2-r12"); + zero_tx_pwr_csi_rs2_r12.to_json(j); + } + if (ds_zero_tx_pwr_csi_rs_r12_present) { + j.write_fieldname("ds-ZeroTxPowerCSI-RS-r12"); + ds_zero_tx_pwr_csi_rs_r12.to_json(j); + } + j.end_obj(); +} + +void csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_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.start_array("zeroTxPowerCSI-RS-List-r12"); + for (uint32_t i1 = 0; i1 < c.zero_tx_pwr_csi_rs_list_r12.size(); ++i1) { + c.zero_tx_pwr_csi_rs_list_r12[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.zero_tx_pwr_csi_rs_list_r12, 1, 5)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.zero_tx_pwr_csi_rs_list_r12, bref, 1, 5)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSI-RS-Config-v1310 ::= SEQUENCE +csi_rs_cfg_v1310_s::csi_rs_cfg_v1310_s() +{ + e_mimo_type_r13_present = false; +} +SRSASN_CODE csi_rs_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_mimo_type_r13_present, 1)); + + if (e_mimo_type_r13_present) { + HANDLE_CODE(e_mimo_type_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_mimo_type_r13_present, 1)); + + if (e_mimo_type_r13_present) { + HANDLE_CODE(e_mimo_type_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (e_mimo_type_r13_present) { + j.write_fieldname("eMIMO-Type-r13"); + e_mimo_type_r13.to_json(j); + } + j.end_obj(); +} + +// CSI-RS-Config-v1430 ::= SEQUENCE +csi_rs_cfg_v1430_s::csi_rs_cfg_v1430_s() +{ + dummy_present = false; + e_mimo_hybrid_r14_present = false; + advanced_codebook_enabled_r14_present = false; +} +SRSASN_CODE csi_rs_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dummy_present, 1)); + HANDLE_CODE(bref.pack(e_mimo_hybrid_r14_present, 1)); + HANDLE_CODE(bref.pack(advanced_codebook_enabled_r14_present, 1)); + + if (dummy_present) { + HANDLE_CODE(dummy.pack(bref)); + } + if (e_mimo_hybrid_r14_present) { + HANDLE_CODE(e_mimo_hybrid_r14.pack(bref)); + } + if (advanced_codebook_enabled_r14_present) { + HANDLE_CODE(bref.pack(advanced_codebook_enabled_r14, 1)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dummy_present, 1)); + HANDLE_CODE(bref.unpack(e_mimo_hybrid_r14_present, 1)); + HANDLE_CODE(bref.unpack(advanced_codebook_enabled_r14_present, 1)); + + if (dummy_present) { + HANDLE_CODE(dummy.unpack(bref)); + } + if (e_mimo_hybrid_r14_present) { + HANDLE_CODE(e_mimo_hybrid_r14.unpack(bref)); + } + if (advanced_codebook_enabled_r14_present) { + HANDLE_CODE(bref.unpack(advanced_codebook_enabled_r14, 1)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dummy_present) { + j.write_fieldname("dummy"); + dummy.to_json(j); + } + if (e_mimo_hybrid_r14_present) { + j.write_fieldname("eMIMO-Hybrid-r14"); + e_mimo_hybrid_r14.to_json(j); + } + if (advanced_codebook_enabled_r14_present) { + j.write_bool("advancedCodebookEnabled-r14", advanced_codebook_enabled_r14); + } + j.end_obj(); +} + +// CSI-RS-ConfigZP-r11 ::= SEQUENCE +csi_rs_cfg_zp_r11_s::csi_rs_cfg_zp_r11_s() +{ + ext = false; +} +SRSASN_CODE csi_rs_cfg_zp_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, csi_rs_cfg_zp_id_r11, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(res_cfg_list_r11.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, sf_cfg_r11, (uint8_t)0, (uint8_t)154)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_zp_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(csi_rs_cfg_zp_id_r11, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(res_cfg_list_r11.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(sf_cfg_r11, bref, (uint8_t)0, (uint8_t)154)); + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_zp_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-RS-ConfigZPId-r11", csi_rs_cfg_zp_id_r11); + j.write_str("resourceConfigList-r11", res_cfg_list_r11.to_string()); + j.write_int("subframeConfig-r11", sf_cfg_r11); + j.end_obj(); +} + +// DL-AM-RLC ::= SEQUENCE +SRSASN_CODE dl_am_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, t_reordering)); + HANDLE_CODE(pack_enum(bref, t_status_prohibit)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_am_rlc_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(t_reordering, bref)); + HANDLE_CODE(unpack_enum(t_status_prohibit, bref)); + + return SRSASN_SUCCESS; +} +void dl_am_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t-Reordering", t_reordering.to_string()); + j.write_str("t-StatusProhibit", t_status_prohibit.to_string()); + j.end_obj(); +} + +// DL-UM-RLC ::= SEQUENCE +SRSASN_CODE dl_um_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sn_field_len)); + HANDLE_CODE(pack_enum(bref, t_reordering)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_um_rlc_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sn_field_len, bref)); + HANDLE_CODE(unpack_enum(t_reordering, bref)); + + return SRSASN_SUCCESS; +} +void dl_um_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sn-FieldLength", sn_field_len.to_string()); + j.write_str("t-Reordering", t_reordering.to_string()); + j.end_obj(); +} + +// DeltaTxD-OffsetListSPUCCH-r15 ::= SEQUENCE +delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_list_spucch_r15_s() +{ + ext = false; +} +SRSASN_CODE delta_tx_d_offset_list_spucch_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_spucch_format1_r15)); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_spucch_format1a_r15)); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_spucch_format1b_r15)); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_spucch_format3_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE delta_tx_d_offset_list_spucch_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_spucch_format1_r15, bref)); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_spucch_format1a_r15, bref)); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_spucch_format1b_r15, bref)); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_spucch_format3_r15, bref)); + + return SRSASN_SUCCESS; +} +void delta_tx_d_offset_list_spucch_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaTxD-OffsetSPUCCH-Format1-r15", delta_tx_d_offset_spucch_format1_r15.to_string()); + j.write_str("deltaTxD-OffsetSPUCCH-Format1a-r15", delta_tx_d_offset_spucch_format1a_r15.to_string()); + j.write_str("deltaTxD-OffsetSPUCCH-Format1b-r15", delta_tx_d_offset_spucch_format1b_r15.to_string()); + j.write_str("deltaTxD-OffsetSPUCCH-Format3-r15", delta_tx_d_offset_spucch_format3_r15.to_string()); + j.end_obj(); +} + +// EPDCCH-SetConfig-r11 ::= SEQUENCE +epdcch_set_cfg_r11_s::epdcch_set_cfg_r11_s() +{ + ext = false; + re_map_qcl_cfg_id_r11_present = false; + csi_rs_cfg_zp_id2_r12_present = false; + num_prb_pairs_v1310_present = false; + mpdcch_cfg_r13_present = false; +} +SRSASN_CODE epdcch_set_cfg_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(re_map_qcl_cfg_id_r11_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, set_cfg_id_r11, (uint8_t)0, (uint8_t)1)); + HANDLE_CODE(pack_enum(bref, tx_type_r11)); + HANDLE_CODE(pack_enum(bref, res_block_assign_r11.num_prb_pairs_r11)); + HANDLE_CODE(res_block_assign_r11.res_block_assign_r11.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, dmrs_scrambling_seq_int_r11, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, pucch_res_start_offset_r11, (uint16_t)0, (uint16_t)2047)); + if (re_map_qcl_cfg_id_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, re_map_qcl_cfg_id_r11, (uint8_t)1, (uint8_t)4)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(csi_rs_cfg_zp_id2_r12_present != (csi_rs_cfg_zp_id2_r12.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= csi_rs_cfg_zp_id2_r12_present; + rrc_asn1_warn_assert(num_prb_pairs_v1310_present != (num_prb_pairs_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= num_prb_pairs_v1310_present; + rrc_asn1_warn_assert(mpdcch_cfg_r13_present != (mpdcch_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= mpdcch_cfg_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_id2_r12_present, 1)); + if (csi_rs_cfg_zp_id2_r12_present) { + HANDLE_CODE(csi_rs_cfg_zp_id2_r12->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(num_prb_pairs_v1310_present, 1)); + HANDLE_CODE(bref.pack(mpdcch_cfg_r13_present, 1)); + if (num_prb_pairs_v1310_present) { + HANDLE_CODE(num_prb_pairs_v1310->pack(bref)); + } + if (mpdcch_cfg_r13_present) { + HANDLE_CODE(mpdcch_cfg_r13->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_set_cfg_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(re_map_qcl_cfg_id_r11_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(set_cfg_id_r11, bref, (uint8_t)0, (uint8_t)1)); + HANDLE_CODE(unpack_enum(tx_type_r11, bref)); + HANDLE_CODE(unpack_enum(res_block_assign_r11.num_prb_pairs_r11, bref)); + HANDLE_CODE(res_block_assign_r11.res_block_assign_r11.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(dmrs_scrambling_seq_int_r11, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(pucch_res_start_offset_r11, bref, (uint16_t)0, (uint16_t)2047)); + if (re_map_qcl_cfg_id_r11_present) { + HANDLE_CODE(unpack_unalign_integer(re_map_qcl_cfg_id_r11, bref, (uint8_t)1, (uint8_t)4)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_id2_r12_present, 1)); + if (csi_rs_cfg_zp_id2_r12_present) { + csi_rs_cfg_zp_id2_r12 = make_copy_ptr(csi_rs_cfg_zp_id2_r12_c_()); + HANDLE_CODE(csi_rs_cfg_zp_id2_r12->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(num_prb_pairs_v1310_present, 1)); + HANDLE_CODE(bref.unpack(mpdcch_cfg_r13_present, 1)); + if (num_prb_pairs_v1310_present) { + num_prb_pairs_v1310 = make_copy_ptr(num_prb_pairs_v1310_c_()); + HANDLE_CODE(num_prb_pairs_v1310->unpack(bref)); + } + if (mpdcch_cfg_r13_present) { + mpdcch_cfg_r13 = make_copy_ptr(mpdcch_cfg_r13_c_()); + HANDLE_CODE(mpdcch_cfg_r13->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void epdcch_set_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("setConfigId-r11", set_cfg_id_r11); + j.write_str("transmissionType-r11", tx_type_r11.to_string()); + j.write_fieldname("resourceBlockAssignment-r11"); + j.start_obj(); + j.write_str("numberPRB-Pairs-r11", res_block_assign_r11.num_prb_pairs_r11.to_string()); + j.write_str("resourceBlockAssignment-r11", res_block_assign_r11.res_block_assign_r11.to_string()); + j.end_obj(); + j.write_int("dmrs-ScramblingSequenceInt-r11", dmrs_scrambling_seq_int_r11); + j.write_int("pucch-ResourceStartOffset-r11", pucch_res_start_offset_r11); + if (re_map_qcl_cfg_id_r11_present) { + j.write_int("re-MappingQCL-ConfigId-r11", re_map_qcl_cfg_id_r11); + } + if (csi_rs_cfg_zp_id2_r12_present) { + j.write_fieldname("csi-RS-ConfigZPId2-r12"); + csi_rs_cfg_zp_id2_r12->to_json(j); + } + if (num_prb_pairs_v1310_present) { + j.write_fieldname("numberPRB-Pairs-v1310"); + num_prb_pairs_v1310->to_json(j); + } + if (mpdcch_cfg_r13_present) { + j.write_fieldname("mpdcch-config-r13"); + mpdcch_cfg_r13->to_json(j); + } + j.end_obj(); +} + +void epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_::set(types::options e) +{ + type_ = e; +} +void epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c, bref, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::csi_rs_cfg_zp_id2_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void epdcch_set_cfg_r11_s::num_prb_pairs_v1310_c_::set(types::options e) +{ + type_ = e; +} +void epdcch_set_cfg_r11_s::num_prb_pairs_v1310_c_::to_json(json_writer& j) const +{ + j.start_obj(); + j.end_obj(); +} +SRSASN_CODE epdcch_set_cfg_r11_s::num_prb_pairs_v1310_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_set_cfg_r11_s::num_prb_pairs_v1310_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + return SRSASN_SUCCESS; +} + +void epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::set(types::options e) +{ + type_ = e; +} +void epdcch_set_cfg_r11_s::mpdcch_cfg_r13_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("csi-NumRepetitionCE-r13", c.csi_num_repeat_ce_r13.to_string()); + j.write_str("mpdcch-pdsch-HoppingConfig-r13", c.mpdcch_pdsch_hop_cfg_r13.to_string()); + j.write_fieldname("mpdcch-StartSF-UESS-r13"); + c.mpdcch_start_sf_uess_r13.to_json(j); + j.write_str("mpdcch-NumRepetition-r13", c.mpdcch_num_repeat_r13.to_string()); + j.write_int("mpdcch-Narrowband-r13", c.mpdcch_nb_r13); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.csi_num_repeat_ce_r13)); + HANDLE_CODE(pack_enum(bref, c.mpdcch_pdsch_hop_cfg_r13)); + HANDLE_CODE(c.mpdcch_start_sf_uess_r13.pack(bref)); + HANDLE_CODE(pack_enum(bref, c.mpdcch_num_repeat_r13)); + HANDLE_CODE(pack_unalign_integer(bref, c.mpdcch_nb_r13, (uint8_t)1, (uint8_t)16)); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.csi_num_repeat_ce_r13, bref)); + HANDLE_CODE(unpack_enum(c.mpdcch_pdsch_hop_cfg_r13, bref)); + HANDLE_CODE(c.mpdcch_start_sf_uess_r13.unpack(bref)); + HANDLE_CODE(unpack_enum(c.mpdcch_num_repeat_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(c.mpdcch_nb_r13, bref, (uint8_t)1, (uint8_t)16)); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::destroy_() {} +void epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::mpdcch_start_sf_uess_r13_c_( + const epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r13: + c.init(other.c.get()); + break; + case types::tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_"); + } +} +epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_& +epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_:: +operator=(const epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r13: + c.set(other.c.get()); + break; + case types::tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_"); + } + + return *this; +} +void epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r13: + j.write_str("fdd-r13", c.get().to_string()); + break; + case types::tdd_r13: + j.write_str("tdd-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// Enable256QAM-r14 ::= CHOICE +void enable256_qam_r14_c::set(types::options e) +{ + type_ = e; +} +void enable256_qam_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE enable256_qam_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE enable256_qam_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void enable256_qam_r14_c::setup_c_::destroy_() +{ + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + c.destroy(); + break; + case types::tpc_sf_set_not_cfgured_r14: + c.destroy(); + break; + default: + break; + } +} +void enable256_qam_r14_c::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + c.init(); + break; + case types::tpc_sf_set_not_cfgured_r14: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c::setup_c_"); + } +} +enable256_qam_r14_c::setup_c_::setup_c_(const enable256_qam_r14_c::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + c.init(other.c.get()); + break; + case types::tpc_sf_set_not_cfgured_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c::setup_c_"); + } +} +enable256_qam_r14_c::setup_c_& enable256_qam_r14_c::setup_c_::operator=(const enable256_qam_r14_c::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + c.set(other.c.get()); + break; + case types::tpc_sf_set_not_cfgured_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c::setup_c_"); + } + + return *this; +} +void enable256_qam_r14_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + j.write_fieldname("tpc-SubframeSet-Configured-r14"); + j.start_obj(); + j.write_bool("subframeSet1-DCI-Format0-r14", c.get().sf_set1_dci_format0_r14); + j.write_bool("subframeSet1-DCI-Format4-r14", c.get().sf_set1_dci_format4_r14); + j.write_bool("subframeSet2-DCI-Format0-r14", c.get().sf_set2_dci_format0_r14); + j.write_bool("subframeSet2-DCI-Format4-r14", c.get().sf_set2_dci_format4_r14); + j.end_obj(); + break; + case types::tpc_sf_set_not_cfgured_r14: + j.write_fieldname("tpc-SubframeSet-NotConfigured-r14"); + j.start_obj(); + j.write_bool("dci-Format0-r14", c.get().dci_format0_r14); + j.write_bool("dci-Format4-r14", c.get().dci_format4_r14); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE enable256_qam_r14_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + HANDLE_CODE(bref.pack(c.get().sf_set1_dci_format0_r14, 1)); + HANDLE_CODE(bref.pack(c.get().sf_set1_dci_format4_r14, 1)); + HANDLE_CODE(bref.pack(c.get().sf_set2_dci_format0_r14, 1)); + HANDLE_CODE(bref.pack(c.get().sf_set2_dci_format4_r14, 1)); + break; + case types::tpc_sf_set_not_cfgured_r14: + HANDLE_CODE(bref.pack(c.get().dci_format0_r14, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format4_r14, 1)); + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE enable256_qam_r14_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::tpc_sf_set_cfgured_r14: + HANDLE_CODE(bref.unpack(c.get().sf_set1_dci_format0_r14, 1)); + HANDLE_CODE(bref.unpack(c.get().sf_set1_dci_format4_r14, 1)); + HANDLE_CODE(bref.unpack(c.get().sf_set2_dci_format0_r14, 1)); + HANDLE_CODE(bref.unpack(c.get().sf_set2_dci_format4_r14, 1)); + break; + case types::tpc_sf_set_not_cfgured_r14: + HANDLE_CODE(bref.unpack(c.get().dci_format0_r14, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format4_r14, 1)); + break; + default: + log_invalid_choice_id(type_, "enable256_qam_r14_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// LogicalChannelConfig ::= SEQUENCE +lc_ch_cfg_s::lc_ch_cfg_s() +{ + ext = false; + ul_specific_params_present = false; + lc_ch_sr_mask_r9_present = false; + lc_ch_sr_prohibit_r12_present = false; + laa_ul_allowed_r14_present = false; + bit_rate_query_prohibit_timer_r14_present = false; + allowed_tti_lens_r15_present = false; + lc_ch_sr_restrict_r15_present = false; + chl_access_prio_r15_present = false; + lch_cell_restrict_r15_present = false; +} +SRSASN_CODE lc_ch_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ul_specific_params_present, 1)); + + if (ul_specific_params_present) { + HANDLE_CODE(bref.pack(ul_specific_params.lc_ch_group_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, ul_specific_params.prio, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_enum(bref, ul_specific_params.prioritised_bit_rate)); + HANDLE_CODE(pack_enum(bref, ul_specific_params.bucket_size_dur)); + if (ul_specific_params.lc_ch_group_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_specific_params.lc_ch_group, (uint8_t)0, (uint8_t)3)); + } + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags[0] |= lc_ch_sr_mask_r9_present; + group_flags[1] |= lc_ch_sr_prohibit_r12_present; + group_flags[2] |= laa_ul_allowed_r14_present; + group_flags[2] |= bit_rate_query_prohibit_timer_r14_present; + rrc_asn1_warn_assert(allowed_tti_lens_r15_present != (allowed_tti_lens_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= allowed_tti_lens_r15_present; + rrc_asn1_warn_assert(lc_ch_sr_restrict_r15_present != (lc_ch_sr_restrict_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= lc_ch_sr_restrict_r15_present; + rrc_asn1_warn_assert(chl_access_prio_r15_present != (chl_access_prio_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= chl_access_prio_r15_present; + group_flags[3] |= lch_cell_restrict_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(lc_ch_sr_mask_r9_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(lc_ch_sr_prohibit_r12_present, 1)); + if (lc_ch_sr_prohibit_r12_present) { + HANDLE_CODE(bref.pack(lc_ch_sr_prohibit_r12, 1)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(laa_ul_allowed_r14_present, 1)); + HANDLE_CODE(bref.pack(bit_rate_query_prohibit_timer_r14_present, 1)); + if (laa_ul_allowed_r14_present) { + HANDLE_CODE(bref.pack(laa_ul_allowed_r14, 1)); + } + if (bit_rate_query_prohibit_timer_r14_present) { + HANDLE_CODE(pack_enum(bref, bit_rate_query_prohibit_timer_r14)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(allowed_tti_lens_r15_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_sr_restrict_r15_present, 1)); + HANDLE_CODE(bref.pack(chl_access_prio_r15_present, 1)); + HANDLE_CODE(bref.pack(lch_cell_restrict_r15_present, 1)); + if (allowed_tti_lens_r15_present) { + HANDLE_CODE(allowed_tti_lens_r15->pack(bref)); + } + if (lc_ch_sr_restrict_r15_present) { + HANDLE_CODE(lc_ch_sr_restrict_r15->pack(bref)); + } + if (chl_access_prio_r15_present) { + HANDLE_CODE(chl_access_prio_r15->pack(bref)); + } + if (lch_cell_restrict_r15_present) { + HANDLE_CODE(lch_cell_restrict_r15.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lc_ch_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ul_specific_params_present, 1)); + + if (ul_specific_params_present) { + HANDLE_CODE(bref.unpack(ul_specific_params.lc_ch_group_present, 1)); + HANDLE_CODE(unpack_unalign_integer(ul_specific_params.prio, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_enum(ul_specific_params.prioritised_bit_rate, bref)); + HANDLE_CODE(unpack_enum(ul_specific_params.bucket_size_dur, bref)); + if (ul_specific_params.lc_ch_group_present) { + HANDLE_CODE(unpack_unalign_integer(ul_specific_params.lc_ch_group, bref, (uint8_t)0, (uint8_t)3)); + } + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(lc_ch_sr_mask_r9_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(lc_ch_sr_prohibit_r12_present, 1)); + if (lc_ch_sr_prohibit_r12_present) { + HANDLE_CODE(bref.unpack(lc_ch_sr_prohibit_r12, 1)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(laa_ul_allowed_r14_present, 1)); + HANDLE_CODE(bref.unpack(bit_rate_query_prohibit_timer_r14_present, 1)); + if (laa_ul_allowed_r14_present) { + HANDLE_CODE(bref.unpack(laa_ul_allowed_r14, 1)); + } + if (bit_rate_query_prohibit_timer_r14_present) { + HANDLE_CODE(unpack_enum(bit_rate_query_prohibit_timer_r14, bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(allowed_tti_lens_r15_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_sr_restrict_r15_present, 1)); + HANDLE_CODE(bref.unpack(chl_access_prio_r15_present, 1)); + HANDLE_CODE(bref.unpack(lch_cell_restrict_r15_present, 1)); + if (allowed_tti_lens_r15_present) { + allowed_tti_lens_r15 = make_copy_ptr(allowed_tti_lens_r15_c_()); + HANDLE_CODE(allowed_tti_lens_r15->unpack(bref)); + } + if (lc_ch_sr_restrict_r15_present) { + lc_ch_sr_restrict_r15 = make_copy_ptr(lc_ch_sr_restrict_r15_c_()); + HANDLE_CODE(lc_ch_sr_restrict_r15->unpack(bref)); + } + if (chl_access_prio_r15_present) { + chl_access_prio_r15 = make_copy_ptr(chl_access_prio_r15_c_()); + HANDLE_CODE(chl_access_prio_r15->unpack(bref)); + } + if (lch_cell_restrict_r15_present) { + HANDLE_CODE(lch_cell_restrict_r15.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void lc_ch_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_specific_params_present) { + j.write_fieldname("ul-SpecificParameters"); + j.start_obj(); + j.write_int("priority", ul_specific_params.prio); + j.write_str("prioritisedBitRate", ul_specific_params.prioritised_bit_rate.to_string()); + j.write_str("bucketSizeDuration", ul_specific_params.bucket_size_dur.to_string()); + if (ul_specific_params.lc_ch_group_present) { + j.write_int("logicalChannelGroup", ul_specific_params.lc_ch_group); + } + j.end_obj(); + } + if (lc_ch_sr_mask_r9_present) { + j.write_str("logicalChannelSR-Mask-r9", "setup"); + } + if (lc_ch_sr_prohibit_r12_present) { + j.write_bool("logicalChannelSR-Prohibit-r12", lc_ch_sr_prohibit_r12); + } + if (laa_ul_allowed_r14_present) { + j.write_bool("laa-UL-Allowed-r14", laa_ul_allowed_r14); + } + if (bit_rate_query_prohibit_timer_r14_present) { + j.write_str("bitRateQueryProhibitTimer-r14", bit_rate_query_prohibit_timer_r14.to_string()); + } + if (allowed_tti_lens_r15_present) { + j.write_fieldname("allowedTTI-Lengths-r15"); + allowed_tti_lens_r15->to_json(j); + } + if (lc_ch_sr_restrict_r15_present) { + j.write_fieldname("logicalChannelSR-Restriction-r15"); + lc_ch_sr_restrict_r15->to_json(j); + } + if (chl_access_prio_r15_present) { + j.write_fieldname("channellAccessPriority-r15"); + chl_access_prio_r15->to_json(j); + } + if (lch_cell_restrict_r15_present) { + j.write_str("lch-CellRestriction-r15", lch_cell_restrict_r15.to_string()); + } + j.end_obj(); +} + +lc_ch_cfg_s::ul_specific_params_s_::ul_specific_params_s_() +{ + lc_ch_group_present = false; +} + +void lc_ch_cfg_s::allowed_tti_lens_r15_c_::set(types::options e) +{ + type_ = e; +} +void lc_ch_cfg_s::allowed_tti_lens_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_bool("shortTTI-r15", c.short_tti_r15); + j.write_bool("subframeTTI-r15", c.sf_tti_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::allowed_tti_lens_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE lc_ch_cfg_s::allowed_tti_lens_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.short_tti_r15, 1)); + HANDLE_CODE(bref.pack(c.sf_tti_r15, 1)); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::allowed_tti_lens_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lc_ch_cfg_s::allowed_tti_lens_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.short_tti_r15, 1)); + HANDLE_CODE(bref.unpack(c.sf_tti_r15, 1)); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::allowed_tti_lens_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::set(types::options e) +{ + type_ = e; +} +void lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void lc_ch_cfg_s::chl_access_prio_r15_c_::set(types::options e) +{ + type_ = e; +} +void lc_ch_cfg_s::chl_access_prio_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lc_ch_cfg_s::chl_access_prio_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c, bref, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "lc_ch_cfg_s::chl_access_prio_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PDSCH-RE-MappingQCL-Config-r11 ::= SEQUENCE +pdsch_re_map_qcl_cfg_r11_s::pdsch_re_map_qcl_cfg_r11_s() +{ + ext = false; + optional_set_of_fields_r11_present = false; + qcl_csi_rs_cfg_nzp_id_r11_present = false; + mbsfn_sf_cfg_list_v1430_present = false; + codeword_one_cfg_v1530_present = false; +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(optional_set_of_fields_r11_present, 1)); + HANDLE_CODE(bref.pack(qcl_csi_rs_cfg_nzp_id_r11_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pdsch_re_map_qcl_cfg_id_r11, (uint8_t)1, (uint8_t)4)); + if (optional_set_of_fields_r11_present) { + HANDLE_CODE(bref.pack(optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11_present, 1)); + HANDLE_CODE(pack_enum(bref, optional_set_of_fields_r11.crs_ports_count_r11)); + HANDLE_CODE(pack_unalign_integer(bref, optional_set_of_fields_r11.crs_freq_shift_r11, (uint8_t)0, (uint8_t)5)); + if (optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11_present) { + HANDLE_CODE(optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, optional_set_of_fields_r11.pdsch_start_r11)); + } + HANDLE_CODE(pack_unalign_integer(bref, csi_rs_cfg_zp_id_r11, (uint8_t)1, (uint8_t)4)); + if (qcl_csi_rs_cfg_nzp_id_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, qcl_csi_rs_cfg_nzp_id_r11, (uint8_t)1, (uint8_t)3)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(mbsfn_sf_cfg_list_v1430_present != (mbsfn_sf_cfg_list_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= mbsfn_sf_cfg_list_v1430_present; + rrc_asn1_warn_assert(codeword_one_cfg_v1530_present != (codeword_one_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= codeword_one_cfg_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + HANDLE_CODE(mbsfn_sf_cfg_list_v1430->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(codeword_one_cfg_v1530_present, 1)); + if (codeword_one_cfg_v1530_present) { + HANDLE_CODE(codeword_one_cfg_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(optional_set_of_fields_r11_present, 1)); + HANDLE_CODE(bref.unpack(qcl_csi_rs_cfg_nzp_id_r11_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pdsch_re_map_qcl_cfg_id_r11, bref, (uint8_t)1, (uint8_t)4)); + if (optional_set_of_fields_r11_present) { + HANDLE_CODE(bref.unpack(optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11_present, 1)); + HANDLE_CODE(unpack_enum(optional_set_of_fields_r11.crs_ports_count_r11, bref)); + HANDLE_CODE(unpack_unalign_integer(optional_set_of_fields_r11.crs_freq_shift_r11, bref, (uint8_t)0, (uint8_t)5)); + if (optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11_present) { + HANDLE_CODE(optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11.unpack(bref)); + } + HANDLE_CODE(unpack_enum(optional_set_of_fields_r11.pdsch_start_r11, bref)); + } + HANDLE_CODE(unpack_unalign_integer(csi_rs_cfg_zp_id_r11, bref, (uint8_t)1, (uint8_t)4)); + if (qcl_csi_rs_cfg_nzp_id_r11_present) { + HANDLE_CODE(unpack_unalign_integer(qcl_csi_rs_cfg_nzp_id_r11, bref, (uint8_t)1, (uint8_t)3)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + mbsfn_sf_cfg_list_v1430 = make_copy_ptr(mbsfn_sf_cfg_list_v1430_c_()); + HANDLE_CODE(mbsfn_sf_cfg_list_v1430->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(codeword_one_cfg_v1530_present, 1)); + if (codeword_one_cfg_v1530_present) { + codeword_one_cfg_v1530 = make_copy_ptr(codeword_one_cfg_v1530_c_()); + HANDLE_CODE(codeword_one_cfg_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pdsch_re_map_qcl_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pdsch-RE-MappingQCL-ConfigId-r11", pdsch_re_map_qcl_cfg_id_r11); + if (optional_set_of_fields_r11_present) { + j.write_fieldname("optionalSetOfFields-r11"); + j.start_obj(); + j.write_str("crs-PortsCount-r11", optional_set_of_fields_r11.crs_ports_count_r11.to_string()); + j.write_int("crs-FreqShift-r11", optional_set_of_fields_r11.crs_freq_shift_r11); + if (optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11_present) { + j.write_fieldname("mbsfn-SubframeConfigList-r11"); + optional_set_of_fields_r11.mbsfn_sf_cfg_list_r11.to_json(j); + } + j.write_str("pdsch-Start-r11", optional_set_of_fields_r11.pdsch_start_r11.to_string()); + j.end_obj(); + } + j.write_int("csi-RS-ConfigZPId-r11", csi_rs_cfg_zp_id_r11); + if (qcl_csi_rs_cfg_nzp_id_r11_present) { + j.write_int("qcl-CSI-RS-ConfigNZPId-r11", qcl_csi_rs_cfg_nzp_id_r11); + } + if (mbsfn_sf_cfg_list_v1430_present) { + j.write_fieldname("mbsfn-SubframeConfigList-v1430"); + mbsfn_sf_cfg_list_v1430->to_json(j); + } + if (codeword_one_cfg_v1530_present) { + j.write_fieldname("codewordOneConfig-v1530"); + codeword_one_cfg_v1530->to_json(j); + } + j.end_obj(); +} + +pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::optional_set_of_fields_r11_s_() +{ + mbsfn_sf_cfg_list_r11_present = false; +} + +void pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_c_::set(types::options e) +{ + type_ = e; +} +void pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_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.start_array("subframeConfigList"); + for (uint32_t i1 = 0; i1 < c.sf_cfg_list.size(); ++i1) { + c.sf_cfg_list[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, + "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE +pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.sf_cfg_list, 1, 8)); + break; + default: + log_invalid_choice_id(type_, + "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.sf_cfg_list, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, + "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_list_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_::set(types::options e) +{ + type_ = e; +} +void pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_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.start_array("subframeConfigList-v1430"); + for (uint32_t i1 = 0; i1 < c.sf_cfg_list_v1430.size(); ++i1) { + c.sf_cfg_list_v1430[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.sf_cfg_list_v1430, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.sf_cfg_list_v1430, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::set(types::options e) +{ + type_ = e; +} +void pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_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("crs-PortsCount-v1530", c.crs_ports_count_v1530.to_string()); + j.write_int("crs-FreqShift-v1530", c.crs_freq_shift_v1530); + if (c.mbsfn_sf_cfg_list_v1530_present) { + j.start_array("mbsfn-SubframeConfigList-v1530"); + for (uint32_t i1 = 0; i1 < c.mbsfn_sf_cfg_list_v1530.size(); ++i1) { + c.mbsfn_sf_cfg_list_v1530[i1].to_json(j); + } + j.end_array(); + } + if (c.mbsfn_sf_cfg_list_ext_v1530_present) { + j.start_array("mbsfn-SubframeConfigListExt-v1530"); + for (uint32_t i1 = 0; i1 < c.mbsfn_sf_cfg_list_ext_v1530.size(); ++i1) { + c.mbsfn_sf_cfg_list_ext_v1530[i1].to_json(j); + } + j.end_array(); + } + j.write_str("pdsch-Start-v1530", c.pdsch_start_v1530.to_string()); + j.write_int("csi-RS-ConfigZPId-v1530", c.csi_rs_cfg_zp_id_v1530); + if (c.qcl_csi_rs_cfg_nzp_id_v1530_present) { + j.write_int("qcl-CSI-RS-ConfigNZPId-v1530", c.qcl_csi_rs_cfg_nzp_id_v1530); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.mbsfn_sf_cfg_list_v1530_present, 1)); + HANDLE_CODE(bref.pack(c.mbsfn_sf_cfg_list_ext_v1530_present, 1)); + HANDLE_CODE(bref.pack(c.qcl_csi_rs_cfg_nzp_id_v1530_present, 1)); + HANDLE_CODE(pack_enum(bref, c.crs_ports_count_v1530)); + HANDLE_CODE(pack_unalign_integer(bref, c.crs_freq_shift_v1530, (uint8_t)0, (uint8_t)5)); + if (c.mbsfn_sf_cfg_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.mbsfn_sf_cfg_list_v1530, 1, 8)); + } + if (c.mbsfn_sf_cfg_list_ext_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.mbsfn_sf_cfg_list_ext_v1530, 1, 8)); + } + HANDLE_CODE(pack_enum(bref, c.pdsch_start_v1530)); + HANDLE_CODE(pack_unalign_integer(bref, c.csi_rs_cfg_zp_id_v1530, (uint8_t)1, (uint8_t)4)); + if (c.qcl_csi_rs_cfg_nzp_id_v1530_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.qcl_csi_rs_cfg_nzp_id_v1530, (uint8_t)1, (uint8_t)3)); + } + break; + default: + log_invalid_choice_id(type_, "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.mbsfn_sf_cfg_list_v1530_present, 1)); + HANDLE_CODE(bref.unpack(c.mbsfn_sf_cfg_list_ext_v1530_present, 1)); + HANDLE_CODE(bref.unpack(c.qcl_csi_rs_cfg_nzp_id_v1530_present, 1)); + HANDLE_CODE(unpack_enum(c.crs_ports_count_v1530, bref)); + HANDLE_CODE(unpack_unalign_integer(c.crs_freq_shift_v1530, bref, (uint8_t)0, (uint8_t)5)); + if (c.mbsfn_sf_cfg_list_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.mbsfn_sf_cfg_list_v1530, bref, 1, 8)); + } + if (c.mbsfn_sf_cfg_list_ext_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.mbsfn_sf_cfg_list_ext_v1530, bref, 1, 8)); + } + HANDLE_CODE(unpack_enum(c.pdsch_start_v1530, bref)); + HANDLE_CODE(unpack_unalign_integer(c.csi_rs_cfg_zp_id_v1530, bref, (uint8_t)1, (uint8_t)4)); + if (c.qcl_csi_rs_cfg_nzp_id_v1530_present) { + HANDLE_CODE(unpack_unalign_integer(c.qcl_csi_rs_cfg_nzp_id_v1530, bref, (uint8_t)1, (uint8_t)3)); + } + break; + default: + log_invalid_choice_id(type_, "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::setup_s_() +{ + mbsfn_sf_cfg_list_v1530_present = false; + mbsfn_sf_cfg_list_ext_v1530_present = false; + qcl_csi_rs_cfg_nzp_id_v1530_present = false; +} + +// RLC-Config-r15 ::= SEQUENCE +rlc_cfg_r15_s::rlc_cfg_r15_s() +{ + ext = false; + reestablish_rlc_r15_present = false; + rlc_out_of_order_delivery_r15_present = false; +} +SRSASN_CODE rlc_cfg_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(reestablish_rlc_r15_present, 1)); + HANDLE_CODE(bref.pack(rlc_out_of_order_delivery_r15_present, 1)); + + HANDLE_CODE(mode_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(reestablish_rlc_r15_present, 1)); + HANDLE_CODE(bref.unpack(rlc_out_of_order_delivery_r15_present, 1)); + + HANDLE_CODE(mode_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rlc_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mode-r15"); + mode_r15.to_json(j); + if (reestablish_rlc_r15_present) { + j.write_str("reestablishRLC-r15", "true"); + } + if (rlc_out_of_order_delivery_r15_present) { + j.write_str("rlc-OutOfOrderDelivery-r15", "true"); + } + j.end_obj(); +} + +void rlc_cfg_r15_s::mode_r15_c_::destroy_() +{ + switch (type_) { + case types::am_r15: + c.destroy(); + break; + case types::um_bi_dir_r15: + c.destroy(); + break; + case types::um_uni_dir_ul_r15: + c.destroy(); + break; + case types::um_uni_dir_dl_r15: + c.destroy(); + break; + default: + break; + } +} +void rlc_cfg_r15_s::mode_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::am_r15: + c.init(); + break; + case types::um_bi_dir_r15: + c.init(); + break; + case types::um_uni_dir_ul_r15: + c.init(); + break; + case types::um_uni_dir_dl_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_r15_s::mode_r15_c_"); + } +} +rlc_cfg_r15_s::mode_r15_c_::mode_r15_c_(const rlc_cfg_r15_s::mode_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::am_r15: + c.init(other.c.get()); + break; + case types::um_bi_dir_r15: + c.init(other.c.get()); + break; + case types::um_uni_dir_ul_r15: + c.init(other.c.get()); + break; + case types::um_uni_dir_dl_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_r15_s::mode_r15_c_"); + } +} +rlc_cfg_r15_s::mode_r15_c_& rlc_cfg_r15_s::mode_r15_c_::operator=(const rlc_cfg_r15_s::mode_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::am_r15: + c.set(other.c.get()); + break; + case types::um_bi_dir_r15: + c.set(other.c.get()); + break; + case types::um_uni_dir_ul_r15: + c.set(other.c.get()); + break; + case types::um_uni_dir_dl_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_r15_s::mode_r15_c_"); + } + + return *this; +} +void rlc_cfg_r15_s::mode_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::am_r15: + j.write_fieldname("am-r15"); + j.start_obj(); + j.write_fieldname("ul-AM-RLC-r15"); + c.get().ul_am_rlc_r15.to_json(j); + j.write_fieldname("dl-AM-RLC-r15"); + c.get().dl_am_rlc_r15.to_json(j); + j.end_obj(); + break; + case types::um_bi_dir_r15: + j.write_fieldname("um-Bi-Directional-r15"); + j.start_obj(); + j.write_fieldname("ul-UM-RLC-r15"); + c.get().ul_um_rlc_r15.to_json(j); + j.write_fieldname("dl-UM-RLC-r15"); + c.get().dl_um_rlc_r15.to_json(j); + j.end_obj(); + break; + case types::um_uni_dir_ul_r15: + j.write_fieldname("um-Uni-Directional-UL-r15"); + j.start_obj(); + j.write_fieldname("ul-UM-RLC-r15"); + c.get().ul_um_rlc_r15.to_json(j); + j.end_obj(); + break; + case types::um_uni_dir_dl_r15: + j.write_fieldname("um-Uni-Directional-DL-r15"); + j.start_obj(); + j.write_fieldname("dl-UM-RLC-r15"); + c.get().dl_um_rlc_r15.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_r15_s::mode_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlc_cfg_r15_s::mode_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::am_r15: + HANDLE_CODE(c.get().ul_am_rlc_r15.pack(bref)); + HANDLE_CODE(c.get().dl_am_rlc_r15.pack(bref)); + break; + case types::um_bi_dir_r15: + HANDLE_CODE(c.get().ul_um_rlc_r15.pack(bref)); + HANDLE_CODE(c.get().dl_um_rlc_r15.pack(bref)); + break; + case types::um_uni_dir_ul_r15: + HANDLE_CODE(c.get().ul_um_rlc_r15.pack(bref)); + break; + case types::um_uni_dir_dl_r15: + HANDLE_CODE(c.get().dl_um_rlc_r15.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_r15_s::mode_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_r15_s::mode_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::am_r15: + HANDLE_CODE(c.get().ul_am_rlc_r15.unpack(bref)); + HANDLE_CODE(c.get().dl_am_rlc_r15.unpack(bref)); + break; + case types::um_bi_dir_r15: + HANDLE_CODE(c.get().ul_um_rlc_r15.unpack(bref)); + HANDLE_CODE(c.get().dl_um_rlc_r15.unpack(bref)); + break; + case types::um_uni_dir_ul_r15: + HANDLE_CODE(c.get().ul_um_rlc_r15.unpack(bref)); + break; + case types::um_uni_dir_dl_r15: + HANDLE_CODE(c.get().dl_um_rlc_r15.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_r15_s::mode_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// TPC-PDCCH-Config ::= CHOICE +void tpc_pdcch_cfg_c::set(types::options e) +{ + type_ = e; +} +void tpc_pdcch_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("tpc-RNTI", c.tpc_rnti.to_string()); + j.write_fieldname("tpc-Index"); + c.tpc_idx.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "tpc_pdcch_cfg_c"); + } + j.end_obj(); +} +SRSASN_CODE tpc_pdcch_cfg_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.tpc_rnti.pack(bref)); + HANDLE_CODE(c.tpc_idx.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "tpc_pdcch_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tpc_pdcch_cfg_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.tpc_rnti.unpack(bref)); + HANDLE_CODE(c.tpc_idx.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "tpc_pdcch_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UL-AM-RLC ::= SEQUENCE +SRSASN_CODE ul_am_rlc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, t_poll_retx)); + HANDLE_CODE(pack_enum(bref, poll_pdu)); + HANDLE_CODE(pack_enum(bref, poll_byte)); + HANDLE_CODE(pack_enum(bref, max_retx_thres)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_am_rlc_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(t_poll_retx, bref)); + HANDLE_CODE(unpack_enum(poll_pdu, bref)); + HANDLE_CODE(unpack_enum(poll_byte, bref)); + HANDLE_CODE(unpack_enum(max_retx_thres, bref)); + + return SRSASN_SUCCESS; +} +void ul_am_rlc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t-PollRetransmit", t_poll_retx.to_string()); + j.write_str("pollPDU", poll_pdu.to_string()); + j.write_str("pollByte", poll_byte.to_string()); + j.write_str("maxRetxThreshold", max_retx_thres.to_string()); + j.end_obj(); +} + +// AntennaInfoDedicatedSTTI-r15 ::= CHOICE +void ant_info_ded_stti_r15_c::set(types::options e) +{ + type_ = e; +} +void ant_info_ded_stti_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.tx_mode_dl_mbsfn_r15_present) { + j.write_str("transmissionModeDL-MBSFN-r15", c.tx_mode_dl_mbsfn_r15.to_string()); + } + if (c.tx_mode_dl_non_mbsfn_r15_present) { + j.write_str("transmissionModeDL-nonMBSFN-r15", c.tx_mode_dl_non_mbsfn_r15.to_string()); + } + if (c.codebook_subset_restrict_present) { + j.write_fieldname("codebookSubsetRestriction"); + c.codebook_subset_restrict.to_json(j); + } + if (c.max_layers_mimo_stti_r15_present) { + j.write_str("maxLayersMIMO-STTI-r15", c.max_layers_mimo_stti_r15.to_string()); + } + j.write_bool("slotSubslotPDSCH-TxDiv-2Layer-r15", c.slot_subslot_pdsch_tx_div_minus2_layer_r15); + j.write_bool("slotSubslotPDSCH-TxDiv-4Layer-r15", c.slot_subslot_pdsch_tx_div_minus4_layer_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_stti_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.tx_mode_dl_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tx_mode_dl_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(c.codebook_subset_restrict_present, 1)); + HANDLE_CODE(bref.pack(c.max_layers_mimo_stti_r15_present, 1)); + if (c.tx_mode_dl_mbsfn_r15_present) { + HANDLE_CODE(pack_enum(bref, c.tx_mode_dl_mbsfn_r15)); + } + if (c.tx_mode_dl_non_mbsfn_r15_present) { + HANDLE_CODE(pack_enum(bref, c.tx_mode_dl_non_mbsfn_r15)); + } + if (c.codebook_subset_restrict_present) { + HANDLE_CODE(c.codebook_subset_restrict.pack(bref)); + } + if (c.max_layers_mimo_stti_r15_present) { + HANDLE_CODE(pack_enum(bref, c.max_layers_mimo_stti_r15)); + } + HANDLE_CODE(bref.pack(c.slot_subslot_pdsch_tx_div_minus2_layer_r15, 1)); + HANDLE_CODE(bref.pack(c.slot_subslot_pdsch_tx_div_minus4_layer_r15, 1)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_stti_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.tx_mode_dl_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tx_mode_dl_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.codebook_subset_restrict_present, 1)); + HANDLE_CODE(bref.unpack(c.max_layers_mimo_stti_r15_present, 1)); + if (c.tx_mode_dl_mbsfn_r15_present) { + HANDLE_CODE(unpack_enum(c.tx_mode_dl_mbsfn_r15, bref)); + } + if (c.tx_mode_dl_non_mbsfn_r15_present) { + HANDLE_CODE(unpack_enum(c.tx_mode_dl_non_mbsfn_r15, bref)); + } + if (c.codebook_subset_restrict_present) { + HANDLE_CODE(c.codebook_subset_restrict.unpack(bref)); + } + if (c.max_layers_mimo_stti_r15_present) { + HANDLE_CODE(unpack_enum(c.max_layers_mimo_stti_r15, bref)); + } + HANDLE_CODE(bref.unpack(c.slot_subslot_pdsch_tx_div_minus2_layer_r15, 1)); + HANDLE_CODE(bref.unpack(c.slot_subslot_pdsch_tx_div_minus4_layer_r15, 1)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +ant_info_ded_stti_r15_c::setup_s_::setup_s_() +{ + tx_mode_dl_mbsfn_r15_present = false; + tx_mode_dl_non_mbsfn_r15_present = false; + codebook_subset_restrict_present = false; + max_layers_mimo_stti_r15_present = false; +} + +void ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::destroy_() +{ + switch (type_) { + case types::n2_tx_ant_tm3_r15: + c.destroy >(); + break; + case types::n4_tx_ant_tm3_r15: + c.destroy >(); + break; + case types::n2_tx_ant_tm4_r15: + c.destroy >(); + break; + case types::n4_tx_ant_tm4_r15: + c.destroy >(); + break; + case types::n2_tx_ant_tm5_r15: + c.destroy >(); + break; + case types::n4_tx_ant_tm5_r15: + c.destroy >(); + break; + case types::n2_tx_ant_tm6_r15: + c.destroy >(); + break; + case types::n4_tx_ant_tm6_r15: + c.destroy >(); + break; + case types::n2_tx_ant_tm8_r15: + c.destroy >(); + break; + case types::n4_tx_ant_tm8_r15: + c.destroy >(); + break; + case types::n2_tx_ant_tm9and10_r15: + c.destroy >(); + break; + case types::n4_tx_ant_tm9and10_r15: + c.destroy >(); + break; + case types::n8_tx_ant_tm9and10_r15: + c.destroy >(); + break; + default: + break; + } +} +void ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::n2_tx_ant_tm3_r15: + c.init >(); + break; + case types::n4_tx_ant_tm3_r15: + c.init >(); + break; + case types::n2_tx_ant_tm4_r15: + c.init >(); + break; + case types::n4_tx_ant_tm4_r15: + c.init >(); + break; + case types::n2_tx_ant_tm5_r15: + c.init >(); + break; + case types::n4_tx_ant_tm5_r15: + c.init >(); + break; + case types::n2_tx_ant_tm6_r15: + c.init >(); + break; + case types::n4_tx_ant_tm6_r15: + c.init >(); + break; + case types::n2_tx_ant_tm8_r15: + c.init >(); + break; + case types::n4_tx_ant_tm8_r15: + c.init >(); + break; + case types::n2_tx_ant_tm9and10_r15: + c.init >(); + break; + case types::n4_tx_ant_tm9and10_r15: + c.init >(); + break; + case types::n8_tx_ant_tm9and10_r15: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_"); + } +} +ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::codebook_subset_restrict_c_( + const ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::n2_tx_ant_tm3_r15: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm3_r15: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm4_r15: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm4_r15: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm5_r15: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm5_r15: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm6_r15: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm6_r15: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm8_r15: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm8_r15: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm9and10_r15: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm9and10_r15: + c.init(other.c.get >()); + break; + case types::n8_tx_ant_tm9and10_r15: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_"); + } +} +ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_& +ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_:: +operator=(const ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::n2_tx_ant_tm3_r15: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm3_r15: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm4_r15: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm4_r15: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm5_r15: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm5_r15: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm6_r15: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm6_r15: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm8_r15: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm8_r15: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm9and10_r15: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm9and10_r15: + c.set(other.c.get >()); + break; + case types::n8_tx_ant_tm9and10_r15: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_"); + } + + return *this; +} +void ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n2_tx_ant_tm3_r15: + j.write_str("n2TxAntenna-tm3-r15", c.get >().to_string()); + break; + case types::n4_tx_ant_tm3_r15: + j.write_str("n4TxAntenna-tm3-r15", c.get >().to_string()); + break; + case types::n2_tx_ant_tm4_r15: + j.write_str("n2TxAntenna-tm4-r15", c.get >().to_string()); + break; + case types::n4_tx_ant_tm4_r15: + j.write_str("n4TxAntenna-tm4-r15", c.get >().to_string()); + break; + case types::n2_tx_ant_tm5_r15: + j.write_str("n2TxAntenna-tm5-r15", c.get >().to_string()); + break; + case types::n4_tx_ant_tm5_r15: + j.write_str("n4TxAntenna-tm5-r15", c.get >().to_string()); + break; + case types::n2_tx_ant_tm6_r15: + j.write_str("n2TxAntenna-tm6-r15", c.get >().to_string()); + break; + case types::n4_tx_ant_tm6_r15: + j.write_str("n4TxAntenna-tm6-r15", c.get >().to_string()); + break; + case types::n2_tx_ant_tm8_r15: + j.write_str("n2TxAntenna-tm8-r15", c.get >().to_string()); + break; + case types::n4_tx_ant_tm8_r15: + j.write_str("n4TxAntenna-tm8-r15", c.get >().to_string()); + break; + case types::n2_tx_ant_tm9and10_r15: + j.write_str("n2TxAntenna-tm9and10-r15", c.get >().to_string()); + break; + case types::n4_tx_ant_tm9and10_r15: + j.write_str("n4TxAntenna-tm9and10-r15", c.get >().to_string()); + break; + case types::n8_tx_ant_tm9and10_r15: + j.write_str("n8TxAntenna-tm9and10-r15", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::n2_tx_ant_tm3_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm3_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm4_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm4_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm5_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm5_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm6_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm6_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm8_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm8_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm9and10_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm9and10_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n8_tx_ant_tm9and10_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::n2_tx_ant_tm3_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm3_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm4_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm4_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm5_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm5_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm6_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm6_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm8_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm8_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm9and10_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm9and10_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n8_tx_ant_tm9and10_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AntennaInfoUL-STTI-r15 ::= SEQUENCE +ant_info_ul_stti_r15_s::ant_info_ul_stti_r15_s() +{ + tx_mode_ul_stti_r15_present = false; +} +SRSASN_CODE ant_info_ul_stti_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_mode_ul_stti_r15_present, 1)); + + if (tx_mode_ul_stti_r15_present) { + HANDLE_CODE(pack_enum(bref, tx_mode_ul_stti_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ul_stti_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_mode_ul_stti_r15_present, 1)); + + if (tx_mode_ul_stti_r15_present) { + HANDLE_CODE(unpack_enum(tx_mode_ul_stti_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void ant_info_ul_stti_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_mode_ul_stti_r15_present) { + j.write_str("transmissionModeUL-STTI-r15", tx_mode_ul_stti_r15.to_string()); + } + j.end_obj(); +} + +// CQI-ReportConfig-r15 ::= CHOICE +void cqi_report_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.cqi_report_cfg_r10_present) { + j.write_fieldname("cqi-ReportConfig-r10"); + c.cqi_report_cfg_r10.to_json(j); + } + if (c.cqi_report_cfg_v1130_present) { + j.write_fieldname("cqi-ReportConfig-v1130"); + c.cqi_report_cfg_v1130.to_json(j); + } + if (c.cqi_report_cfg_pcell_v1250_present) { + j.write_fieldname("cqi-ReportConfigPCell-v1250"); + c.cqi_report_cfg_pcell_v1250.to_json(j); + } + if (c.cqi_report_cfg_v1310_present) { + j.write_fieldname("cqi-ReportConfig-v1310"); + c.cqi_report_cfg_v1310.to_json(j); + } + if (c.cqi_report_cfg_v1320_present) { + j.write_fieldname("cqi-ReportConfig-v1320"); + c.cqi_report_cfg_v1320.to_json(j); + } + if (c.cqi_report_cfg_v1430_present) { + j.write_fieldname("cqi-ReportConfig-v1430"); + c.cqi_report_cfg_v1430.to_json(j); + } + if (c.alt_cqi_table_minus1024_qam_r15_present) { + j.write_str("altCQI-Table-1024QAM-r15", c.alt_cqi_table_minus1024_qam_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.cqi_report_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_report_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_report_cfg_pcell_v1250_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_report_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_report_cfg_v1320_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_report_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(c.alt_cqi_table_minus1024_qam_r15_present, 1)); + if (c.cqi_report_cfg_r10_present) { + HANDLE_CODE(c.cqi_report_cfg_r10.pack(bref)); + } + if (c.cqi_report_cfg_v1130_present) { + HANDLE_CODE(c.cqi_report_cfg_v1130.pack(bref)); + } + if (c.cqi_report_cfg_pcell_v1250_present) { + HANDLE_CODE(c.cqi_report_cfg_pcell_v1250.pack(bref)); + } + if (c.cqi_report_cfg_v1310_present) { + HANDLE_CODE(c.cqi_report_cfg_v1310.pack(bref)); + } + if (c.cqi_report_cfg_v1320_present) { + HANDLE_CODE(c.cqi_report_cfg_v1320.pack(bref)); + } + if (c.cqi_report_cfg_v1430_present) { + HANDLE_CODE(c.cqi_report_cfg_v1430.pack(bref)); + } + if (c.alt_cqi_table_minus1024_qam_r15_present) { + HANDLE_CODE(pack_enum(bref, c.alt_cqi_table_minus1024_qam_r15)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_pcell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_v1320_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(c.alt_cqi_table_minus1024_qam_r15_present, 1)); + if (c.cqi_report_cfg_r10_present) { + HANDLE_CODE(c.cqi_report_cfg_r10.unpack(bref)); + } + if (c.cqi_report_cfg_v1130_present) { + HANDLE_CODE(c.cqi_report_cfg_v1130.unpack(bref)); + } + if (c.cqi_report_cfg_pcell_v1250_present) { + HANDLE_CODE(c.cqi_report_cfg_pcell_v1250.unpack(bref)); + } + if (c.cqi_report_cfg_v1310_present) { + HANDLE_CODE(c.cqi_report_cfg_v1310.unpack(bref)); + } + if (c.cqi_report_cfg_v1320_present) { + HANDLE_CODE(c.cqi_report_cfg_v1320.unpack(bref)); + } + if (c.cqi_report_cfg_v1430_present) { + HANDLE_CODE(c.cqi_report_cfg_v1430.unpack(bref)); + } + if (c.alt_cqi_table_minus1024_qam_r15_present) { + HANDLE_CODE(unpack_enum(c.alt_cqi_table_minus1024_qam_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_cfg_r15_c::setup_s_::setup_s_() +{ + cqi_report_cfg_r10_present = false; + cqi_report_cfg_v1130_present = false; + cqi_report_cfg_pcell_v1250_present = false; + cqi_report_cfg_v1310_present = false; + cqi_report_cfg_v1320_present = false; + cqi_report_cfg_v1430_present = false; + alt_cqi_table_minus1024_qam_r15_present = false; +} + +// CQI-ReportPeriodic ::= CHOICE +void cqi_report_periodic_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_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_int("cqi-PUCCH-ResourceIndex", c.cqi_pucch_res_idx); + j.write_int("cqi-pmi-ConfigIndex", c.cqi_pmi_cfg_idx); + j.write_fieldname("cqi-FormatIndicatorPeriodic"); + c.cqi_format_ind_periodic.to_json(j); + if (c.ri_cfg_idx_present) { + j.write_int("ri-ConfigIndex", c.ri_cfg_idx); + } + j.write_bool("simultaneousAckNackAndCQI", c.simul_ack_nack_and_cqi); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ri_cfg_idx_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pucch_res_idx, (uint16_t)0, (uint16_t)1185)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pmi_cfg_idx, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(c.cqi_format_ind_periodic.pack(bref)); + if (c.ri_cfg_idx_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ri_cfg_idx, (uint16_t)0, (uint16_t)1023)); + } + HANDLE_CODE(bref.pack(c.simul_ack_nack_and_cqi, 1)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ri_cfg_idx_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pucch_res_idx, bref, (uint16_t)0, (uint16_t)1185)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pmi_cfg_idx, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(c.cqi_format_ind_periodic.unpack(bref)); + if (c.ri_cfg_idx_present) { + HANDLE_CODE(unpack_unalign_integer(c.ri_cfg_idx, bref, (uint16_t)0, (uint16_t)1023)); + } + HANDLE_CODE(bref.unpack(c.simul_ack_nack_and_cqi, 1)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_c::setup_s_::setup_s_() +{ + ri_cfg_idx_present = false; +} + +void cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::wideband_cqi: + break; + case types::subband_cqi: + j.write_fieldname("subbandCQI"); + j.start_obj(); + j.write_int("k", c.k); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::wideband_cqi: + break; + case types::subband_cqi: + HANDLE_CODE(pack_unalign_integer(bref, c.k, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::wideband_cqi: + break; + case types::subband_cqi: + HANDLE_CODE(unpack_unalign_integer(c.k, bref, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CRS-AssistanceInfo-r11 ::= SEQUENCE +crs_assist_info_r11_s::crs_assist_info_r11_s() +{ + ext = false; + mbsfn_sf_cfg_list_v1430_present = false; +} +SRSASN_CODE crs_assist_info_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, pci_r11, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, ant_ports_count_r11)); + HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_sf_cfg_list_r11, 1, 8)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(mbsfn_sf_cfg_list_v1430_present != (mbsfn_sf_cfg_list_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= mbsfn_sf_cfg_list_v1430_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mbsfn_sf_cfg_list_v1430, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE crs_assist_info_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(pci_r11, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(ant_ports_count_r11, bref)); + HANDLE_CODE(unpack_dyn_seq_of(mbsfn_sf_cfg_list_r11, bref, 1, 8)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + mbsfn_sf_cfg_list_v1430 = make_copy_ptr(mbsfn_sf_cfg_list_v1430_l()); + HANDLE_CODE(unpack_dyn_seq_of(*mbsfn_sf_cfg_list_v1430, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void crs_assist_info_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r11", pci_r11); + j.write_str("antennaPortsCount-r11", ant_ports_count_r11.to_string()); + j.start_array("mbsfn-SubframeConfigList-r11"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_r11.size(); ++i1) { + mbsfn_sf_cfg_list_r11[i1].to_json(j); + } + j.end_array(); + if (mbsfn_sf_cfg_list_v1430_present) { + j.start_array("mbsfn-SubframeConfigList-v1430"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { + ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CRS-AssistanceInfo-r13 ::= SEQUENCE +crs_assist_info_r13_s::crs_assist_info_r13_s() +{ + ext = false; + mbsfn_sf_cfg_list_r13_present = false; + mbsfn_sf_cfg_list_v1430_present = false; +} +SRSASN_CODE crs_assist_info_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r13, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, ant_ports_count_r13)); + if (mbsfn_sf_cfg_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_sf_cfg_list_r13, 1, 8)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(mbsfn_sf_cfg_list_v1430_present != (mbsfn_sf_cfg_list_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= mbsfn_sf_cfg_list_v1430_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mbsfn_sf_cfg_list_v1430, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE crs_assist_info_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r13, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(ant_ports_count_r13, bref)); + if (mbsfn_sf_cfg_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbsfn_sf_cfg_list_r13, bref, 1, 8)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + mbsfn_sf_cfg_list_v1430 = make_copy_ptr(mbsfn_sf_cfg_list_v1430_l()); + HANDLE_CODE(unpack_dyn_seq_of(*mbsfn_sf_cfg_list_v1430, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void crs_assist_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r13", pci_r13); + j.write_str("antennaPortsCount-r13", ant_ports_count_r13.to_string()); + if (mbsfn_sf_cfg_list_r13_present) { + j.start_array("mbsfn-SubframeConfigList-r13"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_r13.size(); ++i1) { + mbsfn_sf_cfg_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (mbsfn_sf_cfg_list_v1430_present) { + j.start_array("mbsfn-SubframeConfigList-v1430"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { + ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CRS-AssistanceInfo-r15 ::= SEQUENCE +crs_assist_info_r15_s::crs_assist_info_r15_s() +{ + crs_intf_mitig_enabled_minus15_present = false; +} +SRSASN_CODE crs_assist_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_minus15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r15, (uint16_t)0, (uint16_t)503)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE crs_assist_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_minus15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r15, bref, (uint16_t)0, (uint16_t)503)); + + return SRSASN_SUCCESS; +} +void crs_assist_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r15", pci_r15); + if (crs_intf_mitig_enabled_minus15_present) { + j.write_str("crs-IntfMitigEnabled-15", "enabled"); + } + j.end_obj(); +} + +// CSI-RS-Config-r15 ::= CHOICE +void csi_rs_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.csi_rs_cfg_r10_present) { + j.write_fieldname("csi-RS-Config-r10"); + c.csi_rs_cfg_r10.to_json(j); + } + if (c.csi_rs_cfg_v1250_present) { + j.write_fieldname("csi-RS-Config-v1250"); + c.csi_rs_cfg_v1250.to_json(j); + } + if (c.csi_rs_cfg_v1310_present) { + j.write_fieldname("csi-RS-Config-v1310"); + c.csi_rs_cfg_v1310.to_json(j); + } + if (c.csi_rs_cfg_v1430_present) { + j.write_fieldname("csi-RS-Config-v1430"); + c.csi_rs_cfg_v1430.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.csi_rs_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_v1250_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_v1430_present, 1)); + if (c.csi_rs_cfg_r10_present) { + HANDLE_CODE(c.csi_rs_cfg_r10.pack(bref)); + } + if (c.csi_rs_cfg_v1250_present) { + HANDLE_CODE(c.csi_rs_cfg_v1250.pack(bref)); + } + if (c.csi_rs_cfg_v1310_present) { + HANDLE_CODE(c.csi_rs_cfg_v1310.pack(bref)); + } + if (c.csi_rs_cfg_v1430_present) { + HANDLE_CODE(c.csi_rs_cfg_v1430.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_v1250_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_v1430_present, 1)); + if (c.csi_rs_cfg_r10_present) { + HANDLE_CODE(c.csi_rs_cfg_r10.unpack(bref)); + } + if (c.csi_rs_cfg_v1250_present) { + HANDLE_CODE(c.csi_rs_cfg_v1250.unpack(bref)); + } + if (c.csi_rs_cfg_v1310_present) { + HANDLE_CODE(c.csi_rs_cfg_v1310.unpack(bref)); + } + if (c.csi_rs_cfg_v1430_present) { + HANDLE_CODE(c.csi_rs_cfg_v1430.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +csi_rs_cfg_r15_c::setup_s_::setup_s_() +{ + csi_rs_cfg_r10_present = false; + csi_rs_cfg_v1250_present = false; + csi_rs_cfg_v1310_present = false; + csi_rs_cfg_v1430_present = false; +} + +// CSI-RS-ConfigZP-ApList-r14 ::= CHOICE +void csi_rs_cfg_zp_ap_list_r14_c::set(types::options e) +{ + type_ = e; +} +void csi_rs_cfg_zp_ap_list_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_zp_ap_list_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_cfg_zp_ap_list_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 4)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_zp_ap_list_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_zp_ap_list_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 4)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_cfg_zp_ap_list_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DMRS-Config-r11 ::= CHOICE +void dmrs_cfg_r11_c::set(types::options e) +{ + type_ = e; +} +void dmrs_cfg_r11_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_int("scramblingIdentity-r11", c.scrambling_id_r11); + j.write_int("scramblingIdentity2-r11", c.scrambling_id2_r11); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "dmrs_cfg_r11_c"); + } + j.end_obj(); +} +SRSASN_CODE dmrs_cfg_r11_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.scrambling_id_r11, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, c.scrambling_id2_r11, (uint16_t)0, (uint16_t)503)); + break; + default: + log_invalid_choice_id(type_, "dmrs_cfg_r11_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_cfg_r11_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.scrambling_id_r11, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(c.scrambling_id2_r11, bref, (uint16_t)0, (uint16_t)503)); + break; + default: + log_invalid_choice_id(type_, "dmrs_cfg_r11_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DMRS-Config-v1310 ::= SEQUENCE +dmrs_cfg_v1310_s::dmrs_cfg_v1310_s() +{ + dmrs_table_alt_r13_present = false; +} +SRSASN_CODE dmrs_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dmrs_table_alt_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dmrs_table_alt_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void dmrs_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dmrs_table_alt_r13_present) { + j.write_str("dmrs-tableAlt-r13", "true"); + } + j.end_obj(); +} + +// DeltaTxD-OffsetListPUCCH-r10 ::= SEQUENCE +delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_list_pucch_r10_s() +{ + ext = false; +} +SRSASN_CODE delta_tx_d_offset_list_pucch_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_pucch_format1_r10)); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_pucch_format1a1b_r10)); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_pucch_format22a2b_r10)); + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_pucch_format3_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE delta_tx_d_offset_list_pucch_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_pucch_format1_r10, bref)); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_pucch_format1a1b_r10, bref)); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_pucch_format22a2b_r10, bref)); + HANDLE_CODE(unpack_enum(delta_tx_d_offset_pucch_format3_r10, bref)); + + return SRSASN_SUCCESS; +} +void delta_tx_d_offset_list_pucch_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaTxD-OffsetPUCCH-Format1-r10", delta_tx_d_offset_pucch_format1_r10.to_string()); + j.write_str("deltaTxD-OffsetPUCCH-Format1a1b-r10", delta_tx_d_offset_pucch_format1a1b_r10.to_string()); + j.write_str("deltaTxD-OffsetPUCCH-Format22a2b-r10", delta_tx_d_offset_pucch_format22a2b_r10.to_string()); + j.write_str("deltaTxD-OffsetPUCCH-Format3-r10", delta_tx_d_offset_pucch_format3_r10.to_string()); + j.end_obj(); +} + +// DeltaTxD-OffsetListPUCCH-v1130 ::= SEQUENCE +SRSASN_CODE delta_tx_d_offset_list_pucch_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, delta_tx_d_offset_pucch_format1b_cs_r11)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE delta_tx_d_offset_list_pucch_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(delta_tx_d_offset_pucch_format1b_cs_r11, bref)); + + return SRSASN_SUCCESS; +} +void delta_tx_d_offset_list_pucch_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaTxD-OffsetPUCCH-Format1bCS-r11", delta_tx_d_offset_pucch_format1b_cs_r11.to_string()); + j.end_obj(); +} + +// EIMTA-MainConfig-r12 ::= CHOICE +void eimta_main_cfg_r12_c::set(types::options e) +{ + type_ = e; +} +void eimta_main_cfg_r12_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("eimta-RNTI-r12", c.eimta_rnti_r12.to_string()); + j.write_str("eimta-CommandPeriodicity-r12", c.eimta_cmd_periodicity_r12.to_string()); + j.write_str("eimta-CommandSubframeSet-r12", c.eimta_cmd_sf_set_r12.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE eimta_main_cfg_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.eimta_rnti_r12.pack(bref)); + HANDLE_CODE(pack_enum(bref, c.eimta_cmd_periodicity_r12)); + HANDLE_CODE(c.eimta_cmd_sf_set_r12.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE eimta_main_cfg_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.eimta_rnti_r12.unpack(bref)); + HANDLE_CODE(unpack_enum(c.eimta_cmd_periodicity_r12, bref)); + HANDLE_CODE(c.eimta_cmd_sf_set_r12.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// EIMTA-MainConfigServCell-r12 ::= CHOICE +void eimta_main_cfg_serv_cell_r12_c::set(types::options e) +{ + type_ = e; +} +void eimta_main_cfg_serv_cell_r12_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_int("eimta-UL-DL-ConfigIndex-r12", c.eimta_ul_dl_cfg_idx_r12); + j.write_str("eimta-HARQ-ReferenceConfig-r12", c.eimta_harq_ref_cfg_r12.to_string()); + j.write_fieldname("mbsfn-SubframeConfigList-v1250"); + c.mbsfn_sf_cfg_list_v1250.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_serv_cell_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE eimta_main_cfg_serv_cell_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.eimta_ul_dl_cfg_idx_r12, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(pack_enum(bref, c.eimta_harq_ref_cfg_r12)); + HANDLE_CODE(c.mbsfn_sf_cfg_list_v1250.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_serv_cell_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE eimta_main_cfg_serv_cell_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.eimta_ul_dl_cfg_idx_r12, bref, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(unpack_enum(c.eimta_harq_ref_cfg_r12, bref)); + HANDLE_CODE(c.mbsfn_sf_cfg_list_v1250.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_serv_cell_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_::set(types::options e) +{ + type_ = e; +} +void eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_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.start_array("subframeConfigList-r12"); + for (uint32_t i1 = 0; i1 < c.sf_cfg_list_r12.size(); ++i1) { + c.sf_cfg_list_r12[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_"); + } + j.end_obj(); +} +SRSASN_CODE eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.sf_cfg_list_r12, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.sf_cfg_list_r12, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// Format4-resource-r13 ::= SEQUENCE +SRSASN_CODE format4_res_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, start_prb_format4_r13, (uint8_t)0, (uint8_t)109)); + HANDLE_CODE(pack_unalign_integer(bref, nof_prb_format4_r13, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE format4_res_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(start_prb_format4_r13, bref, (uint8_t)0, (uint8_t)109)); + HANDLE_CODE(unpack_unalign_integer(nof_prb_format4_r13, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void format4_res_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("startingPRB-format4-r13", start_prb_format4_r13); + j.write_int("numberOfPRB-format4-r13", nof_prb_format4_r13); + j.end_obj(); +} + +// Format5-resource-r13 ::= SEQUENCE +SRSASN_CODE format5_res_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, start_prb_format5_r13, (uint8_t)0, (uint8_t)109)); + HANDLE_CODE(pack_unalign_integer(bref, cdm_idx_format5_r13, (uint8_t)0, (uint8_t)1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE format5_res_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(start_prb_format5_r13, bref, (uint8_t)0, (uint8_t)109)); + HANDLE_CODE(unpack_unalign_integer(cdm_idx_format5_r13, bref, (uint8_t)0, (uint8_t)1)); + + return SRSASN_SUCCESS; +} +void format5_res_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("startingPRB-format5-r13", start_prb_format5_r13); + j.write_int("cdm-index-format5-r13", cdm_idx_format5_r13); + j.end_obj(); +} + +// NeighCellsInfo-r12 ::= SEQUENCE +neigh_cells_info_r12_s::neigh_cells_info_r12_s() +{ + ext = false; + mbsfn_sf_cfg_r12_present = false; +} +SRSASN_CODE neigh_cells_info_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, p_b_r12, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_enum(bref, crs_ports_count_r12)); + if (mbsfn_sf_cfg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbsfn_sf_cfg_r12, 1, 8)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, p_a_list_r12, 1, 3, EnumPacker())); + HANDLE_CODE(tx_mode_list_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, res_alloc_granularity_r12, (uint8_t)1, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_info_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(p_b_r12, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_enum(crs_ports_count_r12, bref)); + if (mbsfn_sf_cfg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbsfn_sf_cfg_r12, bref, 1, 8)); + } + HANDLE_CODE(unpack_dyn_seq_of(p_a_list_r12, bref, 1, 3, EnumPacker())); + HANDLE_CODE(tx_mode_list_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(res_alloc_granularity_r12, bref, (uint8_t)1, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +void neigh_cells_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r12", pci_r12); + j.write_int("p-b-r12", p_b_r12); + j.write_str("crs-PortsCount-r12", crs_ports_count_r12.to_string()); + if (mbsfn_sf_cfg_r12_present) { + j.start_array("mbsfn-SubframeConfig-r12"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_r12.size(); ++i1) { + mbsfn_sf_cfg_r12[i1].to_json(j); + } + j.end_array(); + } + j.start_array("p-aList-r12"); + for (uint32_t i1 = 0; i1 < p_a_list_r12.size(); ++i1) { + j.write_str(p_a_list_r12[i1].to_string()); + } + j.end_array(); + j.write_str("transmissionModeList-r12", tx_mode_list_r12.to_string()); + j.write_int("resAllocGranularity-r12", res_alloc_granularity_r12); + j.end_obj(); +} + +// PDCP-Config ::= SEQUENCE +pdcp_cfg_s::pdcp_cfg_s() +{ + ext = false; + discard_timer_present = false; + rlc_am_present = false; + rlc_um_present = false; + rn_integrity_protection_r10_present = false; + pdcp_sn_size_v1130_present = false; + ul_data_split_drb_via_scg_r12_present = false; + t_reordering_r12_present = false; + ul_data_split_thres_r13_present = false; + pdcp_sn_size_v1310_present = false; + status_feedback_r13_present = false; + ul_lwa_cfg_r14_present = false; + ul_only_hdr_compress_r14_present = false; + ul_data_compress_r15_present = false; + pdcp_dupl_cfg_r15_present = false; +} +SRSASN_CODE pdcp_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(discard_timer_present, 1)); + HANDLE_CODE(bref.pack(rlc_am_present, 1)); + HANDLE_CODE(bref.pack(rlc_um_present, 1)); + + if (discard_timer_present) { + HANDLE_CODE(pack_enum(bref, discard_timer)); + } + if (rlc_am_present) { + HANDLE_CODE(bref.pack(rlc_am.status_report_required, 1)); + } + if (rlc_um_present) { + HANDLE_CODE(pack_enum(bref, rlc_um.pdcp_sn_size)); + } + HANDLE_CODE(hdr_compress.pack(bref)); + + if (ext) { + ext_groups_header group_flags(6); + group_flags[0] |= rn_integrity_protection_r10_present; + group_flags[1] |= pdcp_sn_size_v1130_present; + group_flags[2] |= ul_data_split_drb_via_scg_r12_present; + group_flags[2] |= t_reordering_r12_present; + rrc_asn1_warn_assert(ul_data_split_thres_r13_present != (ul_data_split_thres_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= ul_data_split_thres_r13_present; + group_flags[3] |= pdcp_sn_size_v1310_present; + rrc_asn1_warn_assert(status_feedback_r13_present != (status_feedback_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= status_feedback_r13_present; + rrc_asn1_warn_assert(ul_lwa_cfg_r14_present != (ul_lwa_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= ul_lwa_cfg_r14_present; + rrc_asn1_warn_assert(ul_only_hdr_compress_r14_present != (ul_only_hdr_compress_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= ul_only_hdr_compress_r14_present; + rrc_asn1_warn_assert(ul_data_compress_r15_present != (ul_data_compress_r15.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= ul_data_compress_r15_present; + rrc_asn1_warn_assert(pdcp_dupl_cfg_r15_present != (pdcp_dupl_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= pdcp_dupl_cfg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rn_integrity_protection_r10_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pdcp_sn_size_v1130_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_data_split_drb_via_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(t_reordering_r12_present, 1)); + if (ul_data_split_drb_via_scg_r12_present) { + HANDLE_CODE(bref.pack(ul_data_split_drb_via_scg_r12, 1)); + } + if (t_reordering_r12_present) { + HANDLE_CODE(pack_enum(bref, t_reordering_r12)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_data_split_thres_r13_present, 1)); + HANDLE_CODE(bref.pack(pdcp_sn_size_v1310_present, 1)); + HANDLE_CODE(bref.pack(status_feedback_r13_present, 1)); + if (ul_data_split_thres_r13_present) { + HANDLE_CODE(ul_data_split_thres_r13->pack(bref)); + } + if (status_feedback_r13_present) { + HANDLE_CODE(status_feedback_r13->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_lwa_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_only_hdr_compress_r14_present, 1)); + if (ul_lwa_cfg_r14_present) { + HANDLE_CODE(ul_lwa_cfg_r14->pack(bref)); + } + if (ul_only_hdr_compress_r14_present) { + HANDLE_CODE(ul_only_hdr_compress_r14->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_data_compress_r15_present, 1)); + HANDLE_CODE(bref.pack(pdcp_dupl_cfg_r15_present, 1)); + if (ul_data_compress_r15_present) { + bref.pack(ul_data_compress_r15->ext, 1); + HANDLE_CODE(bref.pack(ul_data_compress_r15->dictionary_r15_present, 1)); + HANDLE_CODE(pack_enum(bref, ul_data_compress_r15->buffer_size_r15)); + if (ul_data_compress_r15->dictionary_r15_present) { + HANDLE_CODE(pack_enum(bref, ul_data_compress_r15->dictionary_r15)); + } + } + if (pdcp_dupl_cfg_r15_present) { + HANDLE_CODE(pdcp_dupl_cfg_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(discard_timer_present, 1)); + HANDLE_CODE(bref.unpack(rlc_am_present, 1)); + HANDLE_CODE(bref.unpack(rlc_um_present, 1)); + + if (discard_timer_present) { + HANDLE_CODE(unpack_enum(discard_timer, bref)); + } + if (rlc_am_present) { + HANDLE_CODE(bref.unpack(rlc_am.status_report_required, 1)); + } + if (rlc_um_present) { + HANDLE_CODE(unpack_enum(rlc_um.pdcp_sn_size, bref)); + } + HANDLE_CODE(hdr_compress.unpack(bref)); + + if (ext) { + ext_groups_header group_flags(6); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rn_integrity_protection_r10_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pdcp_sn_size_v1130_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_data_split_drb_via_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(t_reordering_r12_present, 1)); + if (ul_data_split_drb_via_scg_r12_present) { + HANDLE_CODE(bref.unpack(ul_data_split_drb_via_scg_r12, 1)); + } + if (t_reordering_r12_present) { + HANDLE_CODE(unpack_enum(t_reordering_r12, bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_data_split_thres_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_sn_size_v1310_present, 1)); + HANDLE_CODE(bref.unpack(status_feedback_r13_present, 1)); + if (ul_data_split_thres_r13_present) { + ul_data_split_thres_r13 = make_copy_ptr(ul_data_split_thres_r13_c_()); + HANDLE_CODE(ul_data_split_thres_r13->unpack(bref)); + } + if (status_feedback_r13_present) { + status_feedback_r13 = make_copy_ptr(status_feedback_r13_c_()); + HANDLE_CODE(status_feedback_r13->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_lwa_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_only_hdr_compress_r14_present, 1)); + if (ul_lwa_cfg_r14_present) { + ul_lwa_cfg_r14 = make_copy_ptr(ul_lwa_cfg_r14_c_()); + HANDLE_CODE(ul_lwa_cfg_r14->unpack(bref)); + } + if (ul_only_hdr_compress_r14_present) { + ul_only_hdr_compress_r14 = make_copy_ptr(ul_only_hdr_compress_r14_c_()); + HANDLE_CODE(ul_only_hdr_compress_r14->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_data_compress_r15_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_dupl_cfg_r15_present, 1)); + if (ul_data_compress_r15_present) { + ul_data_compress_r15 = make_copy_ptr(ul_data_compress_r15_s_()); + bref.unpack(ul_data_compress_r15->ext, 1); + HANDLE_CODE(bref.unpack(ul_data_compress_r15->dictionary_r15_present, 1)); + HANDLE_CODE(unpack_enum(ul_data_compress_r15->buffer_size_r15, bref)); + if (ul_data_compress_r15->dictionary_r15_present) { + HANDLE_CODE(unpack_enum(ul_data_compress_r15->dictionary_r15, bref)); + } + } + if (pdcp_dupl_cfg_r15_present) { + pdcp_dupl_cfg_r15 = make_copy_ptr(pdcp_dupl_cfg_r15_c_()); + HANDLE_CODE(pdcp_dupl_cfg_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pdcp_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (discard_timer_present) { + j.write_str("discardTimer", discard_timer.to_string()); + } + if (rlc_am_present) { + j.write_fieldname("rlc-AM"); + j.start_obj(); + j.write_bool("statusReportRequired", rlc_am.status_report_required); + j.end_obj(); + } + if (rlc_um_present) { + j.write_fieldname("rlc-UM"); + j.start_obj(); + j.write_str("pdcp-SN-Size", rlc_um.pdcp_sn_size.to_string()); + j.end_obj(); + } + j.write_fieldname("headerCompression"); + hdr_compress.to_json(j); + if (rn_integrity_protection_r10_present) { + j.write_str("rn-IntegrityProtection-r10", "enabled"); + } + if (pdcp_sn_size_v1130_present) { + j.write_str("pdcp-SN-Size-v1130", "len15bits"); + } + if (ul_data_split_drb_via_scg_r12_present) { + j.write_bool("ul-DataSplitDRB-ViaSCG-r12", ul_data_split_drb_via_scg_r12); + } + if (t_reordering_r12_present) { + j.write_str("t-Reordering-r12", t_reordering_r12.to_string()); + } + if (ul_data_split_thres_r13_present) { + j.write_fieldname("ul-DataSplitThreshold-r13"); + ul_data_split_thres_r13->to_json(j); + } + if (pdcp_sn_size_v1310_present) { + j.write_str("pdcp-SN-Size-v1310", "len18bits"); + } + if (status_feedback_r13_present) { + j.write_fieldname("statusFeedback-r13"); + status_feedback_r13->to_json(j); + } + if (ul_lwa_cfg_r14_present) { + j.write_fieldname("ul-LWA-Config-r14"); + ul_lwa_cfg_r14->to_json(j); + } + if (ul_only_hdr_compress_r14_present) { + j.write_fieldname("uplinkOnlyHeaderCompression-r14"); + ul_only_hdr_compress_r14->to_json(j); + } + if (ul_data_compress_r15_present) { + j.write_fieldname("uplinkDataCompression-r15"); + j.start_obj(); + j.write_str("bufferSize-r15", ul_data_compress_r15->buffer_size_r15.to_string()); + if (ul_data_compress_r15->dictionary_r15_present) { + j.write_str("dictionary-r15", ul_data_compress_r15->dictionary_r15.to_string()); + } + j.end_obj(); + } + if (pdcp_dupl_cfg_r15_present) { + j.write_fieldname("pdcp-DuplicationConfig-r15"); + pdcp_dupl_cfg_r15->to_json(j); + } + j.end_obj(); +} + +void pdcp_cfg_s::hdr_compress_c_::set(types::options e) +{ + type_ = e; +} +void pdcp_cfg_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.max_cid_present) { + j.write_int("maxCID", c.max_cid); + } + j.write_fieldname("profiles"); + j.start_obj(); + j.write_bool("profile0x0001", c.profiles.profile0x0001); + j.write_bool("profile0x0002", c.profiles.profile0x0002); + j.write_bool("profile0x0003", c.profiles.profile0x0003); + j.write_bool("profile0x0004", c.profiles.profile0x0004); + j.write_bool("profile0x0006", c.profiles.profile0x0006); + j.write_bool("profile0x0101", c.profiles.profile0x0101); + j.write_bool("profile0x0102", c.profiles.profile0x0102); + j.write_bool("profile0x0103", c.profiles.profile0x0103); + j.write_bool("profile0x0104", c.profiles.profile0x0104); + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::hdr_compress_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::hdr_compress_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::not_used: + break; + case types::rohc: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.max_cid_present, 1)); + if (c.max_cid_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.max_cid, (uint16_t)1, (uint16_t)16383)); + } + HANDLE_CODE(bref.pack(c.profiles.profile0x0001, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0002, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0003, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0004, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0006, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0101, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0102, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0103, 1)); + HANDLE_CODE(bref.pack(c.profiles.profile0x0104, 1)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::hdr_compress_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::hdr_compress_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::not_used: + break; + case types::rohc: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.max_cid_present, 1)); + if (c.max_cid_present) { + HANDLE_CODE(unpack_unalign_integer(c.max_cid, bref, (uint16_t)1, (uint16_t)16383)); + } + HANDLE_CODE(bref.unpack(c.profiles.profile0x0001, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0002, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0003, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0004, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0006, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0101, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0102, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0103, 1)); + HANDLE_CODE(bref.unpack(c.profiles.profile0x0104, 1)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::hdr_compress_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pdcp_cfg_s::hdr_compress_c_::rohc_s_::rohc_s_() +{ + ext = false; + max_cid_present = false; +} + +void pdcp_cfg_s::ul_data_split_thres_r13_c_::set(types::options e) +{ + type_ = e; +} +void pdcp_cfg_s::ul_data_split_thres_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_data_split_thres_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::ul_data_split_thres_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_data_split_thres_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::ul_data_split_thres_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_data_split_thres_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pdcp_cfg_s::status_feedback_r13_c_::set(types::options e) +{ + type_ = e; +} +void pdcp_cfg_s::status_feedback_r13_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(); + if (c.status_pdu_type_for_polling_r13_present) { + j.write_str("statusPDU-TypeForPolling-r13", c.status_pdu_type_for_polling_r13.to_string()); + } + if (c.status_pdu_periodicity_type1_r13_present) { + j.write_str("statusPDU-Periodicity-Type1-r13", c.status_pdu_periodicity_type1_r13.to_string()); + } + if (c.status_pdu_periodicity_type2_r13_present) { + j.write_str("statusPDU-Periodicity-Type2-r13", c.status_pdu_periodicity_type2_r13.to_string()); + } + if (c.status_pdu_periodicity_offset_r13_present) { + j.write_str("statusPDU-Periodicity-Offset-r13", c.status_pdu_periodicity_offset_r13.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::status_feedback_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::status_feedback_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.status_pdu_type_for_polling_r13_present, 1)); + HANDLE_CODE(bref.pack(c.status_pdu_periodicity_type1_r13_present, 1)); + HANDLE_CODE(bref.pack(c.status_pdu_periodicity_type2_r13_present, 1)); + HANDLE_CODE(bref.pack(c.status_pdu_periodicity_offset_r13_present, 1)); + if (c.status_pdu_type_for_polling_r13_present) { + HANDLE_CODE(pack_enum(bref, c.status_pdu_type_for_polling_r13)); + } + if (c.status_pdu_periodicity_type1_r13_present) { + HANDLE_CODE(pack_enum(bref, c.status_pdu_periodicity_type1_r13)); + } + if (c.status_pdu_periodicity_type2_r13_present) { + HANDLE_CODE(pack_enum(bref, c.status_pdu_periodicity_type2_r13)); + } + if (c.status_pdu_periodicity_offset_r13_present) { + HANDLE_CODE(pack_enum(bref, c.status_pdu_periodicity_offset_r13)); + } + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::status_feedback_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::status_feedback_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.status_pdu_type_for_polling_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.status_pdu_periodicity_type1_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.status_pdu_periodicity_type2_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.status_pdu_periodicity_offset_r13_present, 1)); + if (c.status_pdu_type_for_polling_r13_present) { + HANDLE_CODE(unpack_enum(c.status_pdu_type_for_polling_r13, bref)); + } + if (c.status_pdu_periodicity_type1_r13_present) { + HANDLE_CODE(unpack_enum(c.status_pdu_periodicity_type1_r13, bref)); + } + if (c.status_pdu_periodicity_type2_r13_present) { + HANDLE_CODE(unpack_enum(c.status_pdu_periodicity_type2_r13, bref)); + } + if (c.status_pdu_periodicity_offset_r13_present) { + HANDLE_CODE(unpack_enum(c.status_pdu_periodicity_offset_r13, bref)); + } + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::status_feedback_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pdcp_cfg_s::status_feedback_r13_c_::setup_s_::setup_s_() +{ + status_pdu_type_for_polling_r13_present = false; + status_pdu_periodicity_type1_r13_present = false; + status_pdu_periodicity_type2_r13_present = false; + status_pdu_periodicity_offset_r13_present = false; +} + +void pdcp_cfg_s::ul_lwa_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void pdcp_cfg_s::ul_lwa_cfg_r14_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_bool("ul-LWA-DRB-ViaWLAN-r14", c.ul_lwa_drb_via_wlan_r14); + if (c.ul_lwa_data_split_thres_r14_present) { + j.write_str("ul-LWA-DataSplitThreshold-r14", c.ul_lwa_data_split_thres_r14.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_lwa_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::ul_lwa_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ul_lwa_data_split_thres_r14_present, 1)); + HANDLE_CODE(bref.pack(c.ul_lwa_drb_via_wlan_r14, 1)); + if (c.ul_lwa_data_split_thres_r14_present) { + HANDLE_CODE(pack_enum(bref, c.ul_lwa_data_split_thres_r14)); + } + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_lwa_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::ul_lwa_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ul_lwa_data_split_thres_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.ul_lwa_drb_via_wlan_r14, 1)); + if (c.ul_lwa_data_split_thres_r14_present) { + HANDLE_CODE(unpack_enum(c.ul_lwa_data_split_thres_r14, bref)); + } + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_lwa_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::setup_s_() +{ + ul_lwa_data_split_thres_r14_present = false; +} + +void pdcp_cfg_s::ul_only_hdr_compress_r14_c_::set(types::options e) +{ + type_ = e; +} +void pdcp_cfg_s::ul_only_hdr_compress_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::not_used_r14: + break; + case types::rohc_r14: + j.write_fieldname("rohc-r14"); + j.start_obj(); + if (c.max_cid_r14_present) { + j.write_int("maxCID-r14", c.max_cid_r14); + } + j.write_fieldname("profiles-r14"); + j.start_obj(); + j.write_bool("profile0x0006-r14", c.profiles_r14.profile0x0006_r14); + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_only_hdr_compress_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::ul_only_hdr_compress_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::not_used_r14: + break; + case types::rohc_r14: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.max_cid_r14_present, 1)); + if (c.max_cid_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.max_cid_r14, (uint16_t)1, (uint16_t)16383)); + } + HANDLE_CODE(bref.pack(c.profiles_r14.profile0x0006_r14, 1)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_only_hdr_compress_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::ul_only_hdr_compress_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::not_used_r14: + break; + case types::rohc_r14: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.max_cid_r14_present, 1)); + if (c.max_cid_r14_present) { + HANDLE_CODE(unpack_unalign_integer(c.max_cid_r14, bref, (uint16_t)1, (uint16_t)16383)); + } + HANDLE_CODE(bref.unpack(c.profiles_r14.profile0x0006_r14, 1)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::ul_only_hdr_compress_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pdcp_cfg_s::ul_only_hdr_compress_r14_c_::rohc_r14_s_::rohc_r14_s_() +{ + ext = false; + max_cid_r14_present = false; +} + +pdcp_cfg_s::ul_data_compress_r15_s_::ul_data_compress_r15_s_() +{ + ext = false; + dictionary_r15_present = false; +} + +void pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("pdcp-Duplication-r15", c.pdcp_dupl_r15.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::pdcp_dupl_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.pdcp_dupl_r15)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::pdcp_dupl_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.pdcp_dupl_r15, bref)); + break; + default: + log_invalid_choice_id(type_, "pdcp_cfg_s::pdcp_dupl_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUCCH-ConfigDedicated-v1530 ::= SEQUENCE +pucch_cfg_ded_v1530_s::pucch_cfg_ded_v1530_s() +{ + n1_pucch_an_spt_r15_present = false; + codebooksize_determination_stti_r15_present = false; +} +SRSASN_CODE pucch_cfg_ded_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(n1_pucch_an_spt_r15_present, 1)); + HANDLE_CODE(bref.pack(codebooksize_determination_stti_r15_present, 1)); + + if (n1_pucch_an_spt_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, n1_pucch_an_spt_r15, (uint16_t)0, (uint16_t)2047)); + } + if (codebooksize_determination_stti_r15_present) { + HANDLE_CODE(pack_enum(bref, codebooksize_determination_stti_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(n1_pucch_an_spt_r15_present, 1)); + HANDLE_CODE(bref.unpack(codebooksize_determination_stti_r15_present, 1)); + + if (n1_pucch_an_spt_r15_present) { + HANDLE_CODE(unpack_unalign_integer(n1_pucch_an_spt_r15, bref, (uint16_t)0, (uint16_t)2047)); + } + if (codebooksize_determination_stti_r15_present) { + HANDLE_CODE(unpack_enum(codebooksize_determination_stti_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (n1_pucch_an_spt_r15_present) { + j.write_int("n1PUCCH-AN-SPT-r15", n1_pucch_an_spt_r15); + } + if (codebooksize_determination_stti_r15_present) { + j.write_str("codebooksizeDeterminationSTTI-r15", codebooksize_determination_stti_r15.to_string()); + } + j.end_obj(); +} + +// PUCCH-Format3-Conf-r13 ::= SEQUENCE +pucch_format3_conf_r13_s::pucch_format3_conf_r13_s() +{ + n3_pucch_an_list_r13_present = false; + two_ant_port_activ_pucch_format3_r13_present = false; +} +SRSASN_CODE pucch_format3_conf_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(n3_pucch_an_list_r13_present, 1)); + HANDLE_CODE(bref.pack(two_ant_port_activ_pucch_format3_r13_present, 1)); + + if (n3_pucch_an_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, n3_pucch_an_list_r13, 1, 4, UnalignedIntegerPacker(0, 549))); + } + if (two_ant_port_activ_pucch_format3_r13_present) { + HANDLE_CODE(two_ant_port_activ_pucch_format3_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format3_conf_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(n3_pucch_an_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(two_ant_port_activ_pucch_format3_r13_present, 1)); + + if (n3_pucch_an_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(n3_pucch_an_list_r13, bref, 1, 4, UnalignedIntegerPacker(0, 549))); + } + if (two_ant_port_activ_pucch_format3_r13_present) { + HANDLE_CODE(two_ant_port_activ_pucch_format3_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_format3_conf_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (n3_pucch_an_list_r13_present) { + j.start_array("n3PUCCH-AN-List-r13"); + for (uint32_t i1 = 0; i1 < n3_pucch_an_list_r13.size(); ++i1) { + j.write_int(n3_pucch_an_list_r13[i1]); + } + j.end_array(); + } + if (two_ant_port_activ_pucch_format3_r13_present) { + j.write_fieldname("twoAntennaPortActivatedPUCCH-Format3-r13"); + two_ant_port_activ_pucch_format3_r13.to_json(j); + } + j.end_obj(); +} + +void pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_::set(types::options e) +{ + type_ = e; +} +void pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_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.start_array("n3PUCCH-AN-ListP1-r13"); + for (uint32_t i1 = 0; i1 < c.n3_pucch_an_list_p1_r13.size(); ++i1) { + j.write_int(c.n3_pucch_an_list_p1_r13[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.n3_pucch_an_list_p1_r13, 1, 4, UnalignedIntegerPacker(0, 549))); + break; + default: + log_invalid_choice_id(type_, "pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.n3_pucch_an_list_p1_r13, bref, 1, 4, UnalignedIntegerPacker(0, 549))); + break; + default: + log_invalid_choice_id(type_, "pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RLC-BearerConfig-r15 ::= CHOICE +void rlc_bearer_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void rlc_bearer_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.rlc_cfg_r15_present) { + j.write_fieldname("rlc-Config-r15"); + c.rlc_cfg_r15.to_json(j); + } + j.write_fieldname("logicalChannelIdentityConfig-r15"); + c.lc_ch_id_cfg_r15.to_json(j); + if (c.lc_ch_cfg_r15_present) { + j.write_fieldname("logicalChannelConfig-r15"); + c.lc_ch_cfg_r15.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE rlc_bearer_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.rlc_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.lc_ch_cfg_r15_present, 1)); + if (c.rlc_cfg_r15_present) { + HANDLE_CODE(c.rlc_cfg_r15.pack(bref)); + } + HANDLE_CODE(c.lc_ch_id_cfg_r15.pack(bref)); + if (c.lc_ch_cfg_r15_present) { + HANDLE_CODE(c.lc_ch_cfg_r15.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_bearer_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.rlc_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.lc_ch_cfg_r15_present, 1)); + if (c.rlc_cfg_r15_present) { + HANDLE_CODE(c.rlc_cfg_r15.unpack(bref)); + } + HANDLE_CODE(c.lc_ch_id_cfg_r15.unpack(bref)); + if (c.lc_ch_cfg_r15_present) { + HANDLE_CODE(c.lc_ch_cfg_r15.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rlc_bearer_cfg_r15_c::setup_s_::setup_s_() +{ + rlc_cfg_r15_present = false; + lc_ch_cfg_r15_present = false; +} + +void rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::destroy_() {} +void rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::lc_ch_id_cfg_r15_c_( + const rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::lc_ch_id_r15: + c.init(other.c.get()); + break; + case types::lc_ch_id_ext_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_"); + } +} +rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_& rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_:: + operator=(const rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::lc_ch_id_r15: + c.set(other.c.get()); + break; + case types::lc_ch_id_ext_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_"); + } + + return *this; +} +void rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::lc_ch_id_r15: + j.write_int("logicalChannelIdentity-r15", c.get()); + break; + case types::lc_ch_id_ext_r15: + j.write_int("logicalChannelIdentityExt-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::lc_ch_id_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)10)); + break; + case types::lc_ch_id_ext_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)32, (uint8_t)38)); + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::lc_ch_id_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)10)); + break; + case types::lc_ch_id_ext_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)32, (uint8_t)38)); + break; + default: + log_invalid_choice_id(type_, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RLC-Config ::= CHOICE +void rlc_cfg_c::destroy_() +{ + switch (type_) { + case types::am: + c.destroy(); + break; + case types::um_bi_dir: + c.destroy(); + break; + case types::um_uni_dir_ul: + c.destroy(); + break; + case types::um_uni_dir_dl: + c.destroy(); + break; + default: + break; + } +} +void rlc_cfg_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::am: + c.init(); + break; + case types::um_bi_dir: + c.init(); + break; + case types::um_uni_dir_ul: + c.init(); + break; + case types::um_uni_dir_dl: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + } +} +rlc_cfg_c::rlc_cfg_c(const rlc_cfg_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::am: + c.init(other.c.get()); + break; + case types::um_bi_dir: + c.init(other.c.get()); + break; + case types::um_uni_dir_ul: + c.init(other.c.get()); + break; + case types::um_uni_dir_dl: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + } +} +rlc_cfg_c& rlc_cfg_c::operator=(const rlc_cfg_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::am: + c.set(other.c.get()); + break; + case types::um_bi_dir: + c.set(other.c.get()); + break; + case types::um_uni_dir_ul: + c.set(other.c.get()); + break; + case types::um_uni_dir_dl: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + } + + return *this; +} +void rlc_cfg_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::am: + j.write_fieldname("am"); + j.start_obj(); + j.write_fieldname("ul-AM-RLC"); + c.get().ul_am_rlc.to_json(j); + j.write_fieldname("dl-AM-RLC"); + c.get().dl_am_rlc.to_json(j); + j.end_obj(); + break; + case types::um_bi_dir: + j.write_fieldname("um-Bi-Directional"); + j.start_obj(); + j.write_fieldname("ul-UM-RLC"); + c.get().ul_um_rlc.to_json(j); + j.write_fieldname("dl-UM-RLC"); + c.get().dl_um_rlc.to_json(j); + j.end_obj(); + break; + case types::um_uni_dir_ul: + j.write_fieldname("um-Uni-Directional-UL"); + j.start_obj(); + j.write_fieldname("ul-UM-RLC"); + c.get().ul_um_rlc.to_json(j); + j.end_obj(); + break; + case types::um_uni_dir_dl: + j.write_fieldname("um-Uni-Directional-DL"); + j.start_obj(); + j.write_fieldname("dl-UM-RLC"); + c.get().dl_um_rlc.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + } + j.end_obj(); +} +SRSASN_CODE rlc_cfg_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::am: + HANDLE_CODE(c.get().ul_am_rlc.pack(bref)); + HANDLE_CODE(c.get().dl_am_rlc.pack(bref)); + break; + case types::um_bi_dir: + HANDLE_CODE(c.get().ul_um_rlc.pack(bref)); + HANDLE_CODE(c.get().dl_um_rlc.pack(bref)); + break; + case types::um_uni_dir_ul: + HANDLE_CODE(c.get().ul_um_rlc.pack(bref)); + break; + case types::um_uni_dir_dl: + HANDLE_CODE(c.get().dl_um_rlc.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::am: + HANDLE_CODE(c.get().ul_am_rlc.unpack(bref)); + HANDLE_CODE(c.get().dl_am_rlc.unpack(bref)); + break; + case types::um_bi_dir: + HANDLE_CODE(c.get().ul_um_rlc.unpack(bref)); + HANDLE_CODE(c.get().dl_um_rlc.unpack(bref)); + break; + case types::um_uni_dir_ul: + HANDLE_CODE(c.get().ul_um_rlc.unpack(bref)); + break; + case types::um_uni_dir_dl: + HANDLE_CODE(c.get().dl_um_rlc.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RLC-Config-v1250 ::= SEQUENCE +SRSASN_CODE rlc_cfg_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_extended_rlc_li_field_r12, 1)); + HANDLE_CODE(bref.pack(dl_extended_rlc_li_field_r12, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_extended_rlc_li_field_r12, 1)); + HANDLE_CODE(bref.unpack(dl_extended_rlc_li_field_r12, 1)); + + return SRSASN_SUCCESS; +} +void rlc_cfg_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("ul-extended-RLC-LI-Field-r12", ul_extended_rlc_li_field_r12); + j.write_bool("dl-extended-RLC-LI-Field-r12", dl_extended_rlc_li_field_r12); + j.end_obj(); +} + +// RLC-Config-v1310 ::= SEQUENCE +rlc_cfg_v1310_s::rlc_cfg_v1310_s() +{ + poll_pdu_v1310_present = false; +} +SRSASN_CODE rlc_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(poll_pdu_v1310_present, 1)); + + HANDLE_CODE(bref.pack(ul_extended_rlc_am_sn_r13, 1)); + HANDLE_CODE(bref.pack(dl_extended_rlc_am_sn_r13, 1)); + if (poll_pdu_v1310_present) { + HANDLE_CODE(pack_enum(bref, poll_pdu_v1310)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(poll_pdu_v1310_present, 1)); + + HANDLE_CODE(bref.unpack(ul_extended_rlc_am_sn_r13, 1)); + HANDLE_CODE(bref.unpack(dl_extended_rlc_am_sn_r13, 1)); + if (poll_pdu_v1310_present) { + HANDLE_CODE(unpack_enum(poll_pdu_v1310, bref)); + } + + return SRSASN_SUCCESS; +} +void rlc_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("ul-extended-RLC-AM-SN-r13", ul_extended_rlc_am_sn_r13); + j.write_bool("dl-extended-RLC-AM-SN-r13", dl_extended_rlc_am_sn_r13); + if (poll_pdu_v1310_present) { + j.write_str("pollPDU-v1310", poll_pdu_v1310.to_string()); + } + j.end_obj(); +} + +// RLC-Config-v1430 ::= CHOICE +void rlc_cfg_v1430_c::set(types::options e) +{ + type_ = e; +} +void rlc_cfg_v1430_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("pollByte-r14", c.poll_byte_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_v1430_c"); + } + j.end_obj(); +} +SRSASN_CODE rlc_cfg_v1430_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.poll_byte_r14)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_v1430_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_v1430_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.poll_byte_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_v1430_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RLC-Config-v1510 ::= SEQUENCE +SRSASN_CODE rlc_cfg_v1510_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_v1510_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void rlc_cfg_v1510_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("reestablishRLC-r15", "true"); + j.end_obj(); +} + +// RLC-Config-v1530 ::= CHOICE +void rlc_cfg_v1530_c::set(types::options e) +{ + type_ = e; +} +void rlc_cfg_v1530_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("rlc-OutOfOrderDelivery-r15", "true"); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_v1530_c"); + } + j.end_obj(); +} +SRSASN_CODE rlc_cfg_v1530_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_v1530_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_cfg_v1530_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + break; + default: + log_invalid_choice_id(type_, "rlc_cfg_v1530_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReject-v1320-IEs ::= SEQUENCE +rrc_conn_reject_v1320_ies_s::rrc_conn_reject_v1320_ies_s() +{ + rrc_suspend_ind_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reject_v1320_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rrc_suspend_ind_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_v1320_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rrc_suspend_ind_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_reject_v1320_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rrc_suspend_ind_r13_present) { + j.write_str("rrc-SuspendIndication-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SPDCCH-Config-r15 ::= CHOICE +void spdcch_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void spdcch_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.spdcch_l1_reuse_ind_r15_present) { + j.write_str("spdcch-L1-ReuseIndication-r15", c.spdcch_l1_reuse_ind_r15.to_string()); + } + if (c.spdcch_set_cfg_r15_present) { + j.start_array("spdcch-SetConfig-r15"); + for (uint32_t i1 = 0; i1 < c.spdcch_set_cfg_r15.size(); ++i1) { + c.spdcch_set_cfg_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "spdcch_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE spdcch_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.spdcch_l1_reuse_ind_r15_present, 1)); + HANDLE_CODE(bref.pack(c.spdcch_set_cfg_r15_present, 1)); + if (c.spdcch_l1_reuse_ind_r15_present) { + HANDLE_CODE(pack_enum(bref, c.spdcch_l1_reuse_ind_r15)); + } + if (c.spdcch_set_cfg_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.spdcch_set_cfg_r15, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "spdcch_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE spdcch_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.spdcch_l1_reuse_ind_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.spdcch_set_cfg_r15_present, 1)); + if (c.spdcch_l1_reuse_ind_r15_present) { + HANDLE_CODE(unpack_enum(c.spdcch_l1_reuse_ind_r15, bref)); + } + if (c.spdcch_set_cfg_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.spdcch_set_cfg_r15, bref, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "spdcch_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +spdcch_cfg_r15_c::setup_s_::setup_s_() +{ + spdcch_l1_reuse_ind_r15_present = false; + spdcch_set_cfg_r15_present = false; +} + +// SPS-ConfigSL-r14 ::= SEQUENCE +SRSASN_CODE sps_cfg_sl_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, sps_cfg_idx_r14, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_enum(bref, semi_persist_sched_interv_sl_r14)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_sl_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(sps_cfg_idx_r14, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_enum(semi_persist_sched_interv_sl_r14, bref)); + + return SRSASN_SUCCESS; +} +void sps_cfg_sl_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sps-ConfigIndex-r14", sps_cfg_idx_r14); + j.write_str("semiPersistSchedIntervalSL-r14", semi_persist_sched_interv_sl_r14.to_string()); + j.end_obj(); +} + +// SPS-ConfigUL ::= CHOICE +void sps_cfg_ul_c::set(types::options e) +{ + type_ = e; +} +void sps_cfg_ul_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_c"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_ul_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_ul_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sps_cfg_ul_c::setup_s_::setup_s_() +{ + ext = false; + p0_persistent_present = false; + two_intervs_cfg_present = false; + p0_persistent_sf_set2_r12_present = false; + nof_conf_ul_sps_processes_r13_present = false; + fixed_rv_non_adaptive_r14_present = false; + sps_cfg_idx_r14_present = false; + semi_persist_sched_interv_ul_v1430_present = false; + cyclic_shift_sps_r15_present = false; + harq_proc_id_offset_r15_present = false; + rv_sps_ul_repeats_r15_present = false; + tpc_pdcch_cfg_pusch_sps_r15_present = false; + total_num_pusch_sps_ul_repeats_r15_present = false; + sps_cfg_idx_r15_present = false; +} +SRSASN_CODE sps_cfg_ul_c::setup_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(p0_persistent_present, 1)); + HANDLE_CODE(bref.pack(two_intervs_cfg_present, 1)); + + HANDLE_CODE(pack_enum(bref, semi_persist_sched_interv_ul)); + HANDLE_CODE(pack_enum(bref, implicit_release_after)); + if (p0_persistent_present) { + HANDLE_CODE(pack_unalign_integer(bref, p0_persistent.p0_nominal_pusch_persistent, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_unalign_integer(bref, p0_persistent.p0_ue_pusch_persistent, (int8_t)-8, (int8_t)7)); + } + + if (ext) { + ext_groups_header group_flags(4); + rrc_asn1_warn_assert(p0_persistent_sf_set2_r12_present != (p0_persistent_sf_set2_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= p0_persistent_sf_set2_r12_present; + group_flags[1] |= nof_conf_ul_sps_processes_r13_present; + group_flags[2] |= fixed_rv_non_adaptive_r14_present; + group_flags[2] |= sps_cfg_idx_r14_present; + group_flags[2] |= semi_persist_sched_interv_ul_v1430_present; + group_flags[3] |= cyclic_shift_sps_r15_present; + group_flags[3] |= harq_proc_id_offset_r15_present; + group_flags[3] |= rv_sps_ul_repeats_r15_present; + rrc_asn1_warn_assert(tpc_pdcch_cfg_pusch_sps_r15_present != (tpc_pdcch_cfg_pusch_sps_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= tpc_pdcch_cfg_pusch_sps_r15_present; + group_flags[3] |= total_num_pusch_sps_ul_repeats_r15_present; + group_flags[3] |= sps_cfg_idx_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(p0_persistent_sf_set2_r12_present, 1)); + if (p0_persistent_sf_set2_r12_present) { + HANDLE_CODE(p0_persistent_sf_set2_r12->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(nof_conf_ul_sps_processes_r13_present, 1)); + if (nof_conf_ul_sps_processes_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, nof_conf_ul_sps_processes_r13, (uint8_t)1, (uint8_t)8)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(fixed_rv_non_adaptive_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_idx_r14_present, 1)); + HANDLE_CODE(bref.pack(semi_persist_sched_interv_ul_v1430_present, 1)); + if (sps_cfg_idx_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sps_cfg_idx_r14, (uint8_t)1, (uint8_t)8)); + } + if (semi_persist_sched_interv_ul_v1430_present) { + HANDLE_CODE(pack_enum(bref, semi_persist_sched_interv_ul_v1430)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cyclic_shift_sps_r15_present, 1)); + HANDLE_CODE(bref.pack(harq_proc_id_offset_r15_present, 1)); + HANDLE_CODE(bref.pack(rv_sps_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(tpc_pdcch_cfg_pusch_sps_r15_present, 1)); + HANDLE_CODE(bref.pack(total_num_pusch_sps_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_idx_r15_present, 1)); + if (cyclic_shift_sps_r15_present) { + HANDLE_CODE(pack_enum(bref, cyclic_shift_sps_r15)); + } + if (harq_proc_id_offset_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, harq_proc_id_offset_r15, (uint8_t)0, (uint8_t)7)); + } + if (rv_sps_ul_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, rv_sps_ul_repeats_r15)); + } + if (tpc_pdcch_cfg_pusch_sps_r15_present) { + HANDLE_CODE(tpc_pdcch_cfg_pusch_sps_r15->pack(bref)); + } + if (total_num_pusch_sps_ul_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, total_num_pusch_sps_ul_repeats_r15)); + } + if (sps_cfg_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, sps_cfg_idx_r15, (uint8_t)1, (uint8_t)6)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_ul_c::setup_s_::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(p0_persistent_present, 1)); + HANDLE_CODE(bref.unpack(two_intervs_cfg_present, 1)); + + HANDLE_CODE(unpack_enum(semi_persist_sched_interv_ul, bref)); + HANDLE_CODE(unpack_enum(implicit_release_after, bref)); + if (p0_persistent_present) { + HANDLE_CODE(unpack_unalign_integer(p0_persistent.p0_nominal_pusch_persistent, bref, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(unpack_unalign_integer(p0_persistent.p0_ue_pusch_persistent, bref, (int8_t)-8, (int8_t)7)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(p0_persistent_sf_set2_r12_present, 1)); + if (p0_persistent_sf_set2_r12_present) { + p0_persistent_sf_set2_r12 = make_copy_ptr(p0_persistent_sf_set2_r12_c_()); + HANDLE_CODE(p0_persistent_sf_set2_r12->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(nof_conf_ul_sps_processes_r13_present, 1)); + if (nof_conf_ul_sps_processes_r13_present) { + HANDLE_CODE(unpack_unalign_integer(nof_conf_ul_sps_processes_r13, bref, (uint8_t)1, (uint8_t)8)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(fixed_rv_non_adaptive_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_idx_r14_present, 1)); + HANDLE_CODE(bref.unpack(semi_persist_sched_interv_ul_v1430_present, 1)); + if (sps_cfg_idx_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sps_cfg_idx_r14, bref, (uint8_t)1, (uint8_t)8)); + } + if (semi_persist_sched_interv_ul_v1430_present) { + HANDLE_CODE(unpack_enum(semi_persist_sched_interv_ul_v1430, bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cyclic_shift_sps_r15_present, 1)); + HANDLE_CODE(bref.unpack(harq_proc_id_offset_r15_present, 1)); + HANDLE_CODE(bref.unpack(rv_sps_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pdcch_cfg_pusch_sps_r15_present, 1)); + HANDLE_CODE(bref.unpack(total_num_pusch_sps_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_idx_r15_present, 1)); + if (cyclic_shift_sps_r15_present) { + HANDLE_CODE(unpack_enum(cyclic_shift_sps_r15, bref)); + } + if (harq_proc_id_offset_r15_present) { + HANDLE_CODE(unpack_unalign_integer(harq_proc_id_offset_r15, bref, (uint8_t)0, (uint8_t)7)); + } + if (rv_sps_ul_repeats_r15_present) { + HANDLE_CODE(unpack_enum(rv_sps_ul_repeats_r15, bref)); + } + if (tpc_pdcch_cfg_pusch_sps_r15_present) { + tpc_pdcch_cfg_pusch_sps_r15 = make_copy_ptr(tpc_pdcch_cfg_c()); + HANDLE_CODE(tpc_pdcch_cfg_pusch_sps_r15->unpack(bref)); + } + if (total_num_pusch_sps_ul_repeats_r15_present) { + HANDLE_CODE(unpack_enum(total_num_pusch_sps_ul_repeats_r15, bref)); + } + if (sps_cfg_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(sps_cfg_idx_r15, bref, (uint8_t)1, (uint8_t)6)); + } + } + } + return SRSASN_SUCCESS; +} +void sps_cfg_ul_c::setup_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("semiPersistSchedIntervalUL", semi_persist_sched_interv_ul.to_string()); + j.write_str("implicitReleaseAfter", implicit_release_after.to_string()); + if (p0_persistent_present) { + j.write_fieldname("p0-Persistent"); + j.start_obj(); + j.write_int("p0-NominalPUSCH-Persistent", p0_persistent.p0_nominal_pusch_persistent); + j.write_int("p0-UE-PUSCH-Persistent", p0_persistent.p0_ue_pusch_persistent); + j.end_obj(); + } + if (two_intervs_cfg_present) { + j.write_str("twoIntervalsConfig", "true"); + } + if (p0_persistent_sf_set2_r12_present) { + j.write_fieldname("p0-PersistentSubframeSet2-r12"); + p0_persistent_sf_set2_r12->to_json(j); + } + if (nof_conf_ul_sps_processes_r13_present) { + j.write_int("numberOfConfUlSPS-Processes-r13", nof_conf_ul_sps_processes_r13); + } + if (fixed_rv_non_adaptive_r14_present) { + j.write_str("fixedRV-NonAdaptive-r14", "true"); + } + if (sps_cfg_idx_r14_present) { + j.write_int("sps-ConfigIndex-r14", sps_cfg_idx_r14); + } + if (semi_persist_sched_interv_ul_v1430_present) { + j.write_str("semiPersistSchedIntervalUL-v1430", semi_persist_sched_interv_ul_v1430.to_string()); + } + if (cyclic_shift_sps_r15_present) { + j.write_str("cyclicShiftSPS-r15", cyclic_shift_sps_r15.to_string()); + } + if (harq_proc_id_offset_r15_present) { + j.write_int("harq-ProcID-Offset-r15", harq_proc_id_offset_r15); + } + if (rv_sps_ul_repeats_r15_present) { + j.write_str("rv-SPS-UL-Repetitions-r15", rv_sps_ul_repeats_r15.to_string()); + } + if (tpc_pdcch_cfg_pusch_sps_r15_present) { + j.write_fieldname("tpc-PDCCH-ConfigPUSCH-SPS-r15"); + tpc_pdcch_cfg_pusch_sps_r15->to_json(j); + } + if (total_num_pusch_sps_ul_repeats_r15_present) { + j.write_str("totalNumberPUSCH-SPS-UL-Repetitions-r15", total_num_pusch_sps_ul_repeats_r15.to_string()); + } + if (sps_cfg_idx_r15_present) { + j.write_int("sps-ConfigIndex-r15", sps_cfg_idx_r15); + } + j.end_obj(); +} + +void sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_c_::set(types::options e) +{ + type_ = e; +} +void sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_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_int("p0-NominalPUSCH-PersistentSubframeSet2-r12", c.p0_nominal_pusch_persistent_sf_set2_r12); + j.write_int("p0-UE-PUSCH-PersistentSubframeSet2-r12", c.p0_ue_pusch_persistent_sf_set2_r12); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.p0_nominal_pusch_persistent_sf_set2_r12, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_unalign_integer(bref, c.p0_ue_pusch_persistent_sf_set2_r12, (int8_t)-8, (int8_t)7)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.p0_nominal_pusch_persistent_sf_set2_r12, bref, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(unpack_unalign_integer(c.p0_ue_pusch_persistent_sf_set2_r12, bref, (int8_t)-8, (int8_t)7)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_c::setup_s_::p0_persistent_sf_set2_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SPS-ConfigUL-STTI-r15 ::= CHOICE +void sps_cfg_ul_stti_r15_c::set(types::options e) +{ + type_ = e; +} +void sps_cfg_ul_stti_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("semiPersistSchedIntervalUL-STTI-r15", c.semi_persist_sched_interv_ul_stti_r15.to_string()); + j.write_str("implicitReleaseAfter", c.implicit_release_after.to_string()); + if (c.p0_persistent_r15_present) { + j.write_fieldname("p0-Persistent-r15"); + j.start_obj(); + j.write_int("p0-NominalSPUSCH-Persistent-r15", c.p0_persistent_r15.p0_nominal_spusch_persistent_r15); + j.write_int("p0-UE-SPUSCH-Persistent-r15", c.p0_persistent_r15.p0_ue_spusch_persistent_r15); + j.end_obj(); + } + if (c.two_intervs_cfg_r15_present) { + j.write_str("twoIntervalsConfig-r15", "true"); + } + if (c.p0_persistent_sf_set2_r15_present) { + j.write_fieldname("p0-PersistentSubframeSet2-r15"); + c.p0_persistent_sf_set2_r15.to_json(j); + } + if (c.nof_conf_ul_sps_processes_stti_r15_present) { + j.write_int("numberOfConfUL-SPS-Processes-STTI-r15", c.nof_conf_ul_sps_processes_stti_r15); + } + j.write_int("sTTI-StartTimeUL-r15", c.s_tti_start_time_ul_r15); + if (c.tpc_pdcch_cfg_pusch_sps_r15_present) { + j.write_fieldname("tpc-PDCCH-ConfigPUSCH-SPS-r15"); + c.tpc_pdcch_cfg_pusch_sps_r15.to_json(j); + } + if (c.cyclic_shift_sps_s_tti_r15_present) { + j.write_str("cyclicShiftSPS-sTTI-r15", c.cyclic_shift_sps_s_tti_r15.to_string()); + } + if (c.ifdma_cfg_sps_r15_present) { + j.write_bool("ifdma-Config-SPS-r15", c.ifdma_cfg_sps_r15); + } + if (c.harq_proc_id_offset_r15_present) { + j.write_int("harq-ProcID-offset-r15", c.harq_proc_id_offset_r15); + } + if (c.rv_sps_stti_ul_repeats_r15_present) { + j.write_str("rv-SPS-STTI-UL-Repetitions-r15", c.rv_sps_stti_ul_repeats_r15.to_string()); + } + if (c.sps_cfg_idx_r15_present) { + j.write_int("sps-ConfigIndex-r15", c.sps_cfg_idx_r15); + } + if (c.tbs_scaling_factor_subslot_sps_ul_repeats_r15_present) { + j.write_str("tbs-scalingFactorSubslotSPS-UL-Repetitions-r15", + c.tbs_scaling_factor_subslot_sps_ul_repeats_r15.to_string()); + } + if (c.total_num_pusch_sps_stti_ul_repeats_r15_present) { + j.write_str("totalNumberPUSCH-SPS-STTI-UL-Repetitions-r15", + c.total_num_pusch_sps_stti_ul_repeats_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_stti_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_ul_stti_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.p0_persistent_r15_present, 1)); + HANDLE_CODE(bref.pack(c.two_intervs_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.p0_persistent_sf_set2_r15_present, 1)); + HANDLE_CODE(bref.pack(c.nof_conf_ul_sps_processes_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tpc_pdcch_cfg_pusch_sps_r15_present, 1)); + HANDLE_CODE(bref.pack(c.cyclic_shift_sps_s_tti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.ifdma_cfg_sps_r15_present, 1)); + HANDLE_CODE(bref.pack(c.harq_proc_id_offset_r15_present, 1)); + HANDLE_CODE(bref.pack(c.rv_sps_stti_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.sps_cfg_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tbs_scaling_factor_subslot_sps_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.total_num_pusch_sps_stti_ul_repeats_r15_present, 1)); + HANDLE_CODE(pack_enum(bref, c.semi_persist_sched_interv_ul_stti_r15)); + HANDLE_CODE(pack_enum(bref, c.implicit_release_after)); + if (c.p0_persistent_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, c.p0_persistent_r15.p0_nominal_spusch_persistent_r15, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_unalign_integer(bref, c.p0_persistent_r15.p0_ue_spusch_persistent_r15, (int8_t)-8, (int8_t)7)); + } + if (c.p0_persistent_sf_set2_r15_present) { + HANDLE_CODE(c.p0_persistent_sf_set2_r15.pack(bref)); + } + if (c.nof_conf_ul_sps_processes_stti_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.nof_conf_ul_sps_processes_stti_r15, (uint8_t)1, (uint8_t)12)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.s_tti_start_time_ul_r15, (uint8_t)0, (uint8_t)5)); + if (c.tpc_pdcch_cfg_pusch_sps_r15_present) { + HANDLE_CODE(c.tpc_pdcch_cfg_pusch_sps_r15.pack(bref)); + } + if (c.cyclic_shift_sps_s_tti_r15_present) { + HANDLE_CODE(pack_enum(bref, c.cyclic_shift_sps_s_tti_r15)); + } + if (c.ifdma_cfg_sps_r15_present) { + HANDLE_CODE(bref.pack(c.ifdma_cfg_sps_r15, 1)); + } + if (c.harq_proc_id_offset_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.harq_proc_id_offset_r15, (uint8_t)0, (uint8_t)15)); + } + if (c.rv_sps_stti_ul_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.rv_sps_stti_ul_repeats_r15)); + } + if (c.sps_cfg_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sps_cfg_idx_r15, (uint8_t)1, (uint8_t)6)); + } + if (c.tbs_scaling_factor_subslot_sps_ul_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.tbs_scaling_factor_subslot_sps_ul_repeats_r15)); + } + if (c.total_num_pusch_sps_stti_ul_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.total_num_pusch_sps_stti_ul_repeats_r15)); + } + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_stti_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_ul_stti_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.p0_persistent_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.two_intervs_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.p0_persistent_sf_set2_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.nof_conf_ul_sps_processes_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tpc_pdcch_cfg_pusch_sps_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.cyclic_shift_sps_s_tti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.ifdma_cfg_sps_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.harq_proc_id_offset_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.rv_sps_stti_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.sps_cfg_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tbs_scaling_factor_subslot_sps_ul_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.total_num_pusch_sps_stti_ul_repeats_r15_present, 1)); + HANDLE_CODE(unpack_enum(c.semi_persist_sched_interv_ul_stti_r15, bref)); + HANDLE_CODE(unpack_enum(c.implicit_release_after, bref)); + if (c.p0_persistent_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.p0_persistent_r15.p0_nominal_spusch_persistent_r15, bref, (int8_t)-126, + (int8_t)24)); + HANDLE_CODE( + unpack_unalign_integer(c.p0_persistent_r15.p0_ue_spusch_persistent_r15, bref, (int8_t)-8, (int8_t)7)); + } + if (c.p0_persistent_sf_set2_r15_present) { + HANDLE_CODE(c.p0_persistent_sf_set2_r15.unpack(bref)); + } + if (c.nof_conf_ul_sps_processes_stti_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.nof_conf_ul_sps_processes_stti_r15, bref, (uint8_t)1, (uint8_t)12)); + } + HANDLE_CODE(unpack_unalign_integer(c.s_tti_start_time_ul_r15, bref, (uint8_t)0, (uint8_t)5)); + if (c.tpc_pdcch_cfg_pusch_sps_r15_present) { + HANDLE_CODE(c.tpc_pdcch_cfg_pusch_sps_r15.unpack(bref)); + } + if (c.cyclic_shift_sps_s_tti_r15_present) { + HANDLE_CODE(unpack_enum(c.cyclic_shift_sps_s_tti_r15, bref)); + } + if (c.ifdma_cfg_sps_r15_present) { + HANDLE_CODE(bref.unpack(c.ifdma_cfg_sps_r15, 1)); + } + if (c.harq_proc_id_offset_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.harq_proc_id_offset_r15, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.rv_sps_stti_ul_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.rv_sps_stti_ul_repeats_r15, bref)); + } + if (c.sps_cfg_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.sps_cfg_idx_r15, bref, (uint8_t)1, (uint8_t)6)); + } + if (c.tbs_scaling_factor_subslot_sps_ul_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.tbs_scaling_factor_subslot_sps_ul_repeats_r15, bref)); + } + if (c.total_num_pusch_sps_stti_ul_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.total_num_pusch_sps_stti_ul_repeats_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_stti_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sps_cfg_ul_stti_r15_c::setup_s_::setup_s_() +{ + ext = false; + p0_persistent_r15_present = false; + two_intervs_cfg_r15_present = false; + p0_persistent_sf_set2_r15_present = false; + nof_conf_ul_sps_processes_stti_r15_present = false; + tpc_pdcch_cfg_pusch_sps_r15_present = false; + cyclic_shift_sps_s_tti_r15_present = false; + ifdma_cfg_sps_r15_present = false; + harq_proc_id_offset_r15_present = false; + rv_sps_stti_ul_repeats_r15_present = false; + sps_cfg_idx_r15_present = false; + tbs_scaling_factor_subslot_sps_ul_repeats_r15_present = false; + total_num_pusch_sps_stti_ul_repeats_r15_present = false; +} + +void sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_::set(types::options e) +{ + type_ = e; +} +void sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_int("p0-NominalSPUSCH-PersistentSubframeSet2-r15", c.p0_nominal_spusch_persistent_sf_set2_r15); + j.write_int("p0-UE-SPUSCH-PersistentSubframeSet2-r15", c.p0_ue_spusch_persistent_sf_set2_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.p0_nominal_spusch_persistent_sf_set2_r15, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_unalign_integer(bref, c.p0_ue_spusch_persistent_sf_set2_r15, (int8_t)-8, (int8_t)7)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.p0_nominal_spusch_persistent_sf_set2_r15, bref, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(unpack_unalign_integer(c.p0_ue_spusch_persistent_sf_set2_r15, bref, (int8_t)-8, (int8_t)7)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_ul_stti_r15_c::setup_s_::p0_persistent_sf_set2_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SPUCCH-Config-r15 ::= CHOICE +void spucch_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void spucch_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.spucch_set_r15_present) { + j.start_array("spucch-Set-r15"); + for (uint32_t i1 = 0; i1 < c.spucch_set_r15.size(); ++i1) { + c.spucch_set_r15[i1].to_json(j); + } + j.end_array(); + } + if (c.two_ant_port_activ_spucch_format1a1b_r15_present) { + j.write_str("twoAntennaPortActivatedSPUCCH-Format1a1b-r15", "true"); + } + j.write_fieldname("twoAntennaPortActivatedSPUCCH-Format3-r15"); + j.start_obj(); + j.start_array("n3SPUCCH-AN-List-r15"); + for (uint32_t i1 = 0; i1 < c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15.size(); ++i1) { + j.write_int(c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15[i1]); + } + j.end_array(); + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "spucch_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE spucch_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.spucch_set_r15_present, 1)); + HANDLE_CODE(bref.pack(c.two_ant_port_activ_spucch_format1a1b_r15_present, 1)); + if (c.spucch_set_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.spucch_set_r15, 1, 4)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15, 1, 4, + UnalignedIntegerPacker(0, 549))); + break; + default: + log_invalid_choice_id(type_, "spucch_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE spucch_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.spucch_set_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.two_ant_port_activ_spucch_format1a1b_r15_present, 1)); + if (c.spucch_set_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.spucch_set_r15, bref, 1, 4)); + } + HANDLE_CODE(unpack_dyn_seq_of(c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15, bref, 1, 4, + UnalignedIntegerPacker(0, 549))); + break; + default: + log_invalid_choice_id(type_, "spucch_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +spucch_cfg_r15_c::setup_s_::setup_s_() +{ + spucch_set_r15_present = false; + two_ant_port_activ_spucch_format1a1b_r15_present = false; +} + +// SRS-CC-SetIndex-r14 ::= SEQUENCE +SRSASN_CODE srs_cc_set_idx_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cc_set_idx_r14, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, cc_idx_in_one_cc_set_r14, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_cc_set_idx_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cc_set_idx_r14, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(cc_idx_in_one_cc_set_r14, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void srs_cc_set_idx_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cc-SetIndex-r14", cc_set_idx_r14); + j.write_int("cc-IndexInOneCC-Set-r14", cc_idx_in_one_cc_set_r14); + j.end_obj(); +} + +// SRS-ConfigAp-r10 ::= SEQUENCE +SRSASN_CODE srs_cfg_ap_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, srs_ant_port_ap_r10)); + HANDLE_CODE(pack_enum(bref, srs_bw_ap_r10)); + HANDLE_CODE(pack_unalign_integer(bref, freq_domain_position_ap_r10, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(pack_unalign_integer(bref, tx_comb_ap_r10, (uint8_t)0, (uint8_t)1)); + HANDLE_CODE(pack_enum(bref, cyclic_shift_ap_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_cfg_ap_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(srs_ant_port_ap_r10, bref)); + HANDLE_CODE(unpack_enum(srs_bw_ap_r10, bref)); + HANDLE_CODE(unpack_unalign_integer(freq_domain_position_ap_r10, bref, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(unpack_unalign_integer(tx_comb_ap_r10, bref, (uint8_t)0, (uint8_t)1)); + HANDLE_CODE(unpack_enum(cyclic_shift_ap_r10, bref)); + + return SRSASN_SUCCESS; +} +void srs_cfg_ap_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("srs-AntennaPortAp-r10", srs_ant_port_ap_r10.to_string()); + j.write_str("srs-BandwidthAp-r10", srs_bw_ap_r10.to_string()); + j.write_int("freqDomainPositionAp-r10", freq_domain_position_ap_r10); + j.write_int("transmissionCombAp-r10", tx_comb_ap_r10); + j.write_str("cyclicShiftAp-r10", cyclic_shift_ap_r10.to_string()); + j.end_obj(); +} + +// SRS-ConfigAp-r13 ::= SEQUENCE +SRSASN_CODE srs_cfg_ap_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, srs_ant_port_ap_r13)); + HANDLE_CODE(pack_enum(bref, srs_bw_ap_r13)); + HANDLE_CODE(pack_unalign_integer(bref, freq_domain_position_ap_r13, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(pack_unalign_integer(bref, tx_comb_ap_r13, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_enum(bref, cyclic_shift_ap_r13)); + HANDLE_CODE(pack_enum(bref, tx_comb_num_r13)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_cfg_ap_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(srs_ant_port_ap_r13, bref)); + HANDLE_CODE(unpack_enum(srs_bw_ap_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(freq_domain_position_ap_r13, bref, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(unpack_unalign_integer(tx_comb_ap_r13, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_enum(cyclic_shift_ap_r13, bref)); + HANDLE_CODE(unpack_enum(tx_comb_num_r13, bref)); + + return SRSASN_SUCCESS; +} +void srs_cfg_ap_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("srs-AntennaPortAp-r13", srs_ant_port_ap_r13.to_string()); + j.write_str("srs-BandwidthAp-r13", srs_bw_ap_r13.to_string()); + j.write_int("freqDomainPositionAp-r13", freq_domain_position_ap_r13); + j.write_int("transmissionCombAp-r13", tx_comb_ap_r13); + j.write_str("cyclicShiftAp-r13", cyclic_shift_ap_r13.to_string()); + j.write_str("transmissionCombNum-r13", tx_comb_num_r13.to_string()); + j.end_obj(); +} + +// SRS-ConfigAp-v1310 ::= SEQUENCE +srs_cfg_ap_v1310_s::srs_cfg_ap_v1310_s() +{ + tx_comb_ap_v1310_present = false; + cyclic_shift_ap_v1310_present = false; + tx_comb_num_r13_present = false; +} +SRSASN_CODE srs_cfg_ap_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_comb_ap_v1310_present, 1)); + HANDLE_CODE(bref.pack(cyclic_shift_ap_v1310_present, 1)); + HANDLE_CODE(bref.pack(tx_comb_num_r13_present, 1)); + + if (tx_comb_ap_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_comb_ap_v1310, (uint8_t)2, (uint8_t)3)); + } + if (cyclic_shift_ap_v1310_present) { + HANDLE_CODE(pack_enum(bref, cyclic_shift_ap_v1310)); + } + if (tx_comb_num_r13_present) { + HANDLE_CODE(pack_enum(bref, tx_comb_num_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_cfg_ap_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_comb_ap_v1310_present, 1)); + HANDLE_CODE(bref.unpack(cyclic_shift_ap_v1310_present, 1)); + HANDLE_CODE(bref.unpack(tx_comb_num_r13_present, 1)); + + if (tx_comb_ap_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(tx_comb_ap_v1310, bref, (uint8_t)2, (uint8_t)3)); + } + if (cyclic_shift_ap_v1310_present) { + HANDLE_CODE(unpack_enum(cyclic_shift_ap_v1310, bref)); + } + if (tx_comb_num_r13_present) { + HANDLE_CODE(unpack_enum(tx_comb_num_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void srs_cfg_ap_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_comb_ap_v1310_present) { + j.write_int("transmissionCombAp-v1310", tx_comb_ap_v1310); + } + if (cyclic_shift_ap_v1310_present) { + j.write_str("cyclicShiftAp-v1310", cyclic_shift_ap_v1310.to_string()); + } + if (tx_comb_num_r13_present) { + j.write_str("transmissionCombNum-r13", tx_comb_num_r13.to_string()); + } + j.end_obj(); +} + +// STAG-ToAddMod-r11 ::= SEQUENCE +stag_to_add_mod_r11_s::stag_to_add_mod_r11_s() +{ + ext = false; +} +SRSASN_CODE stag_to_add_mod_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, stag_id_r11, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(pack_enum(bref, time_align_timer_stag_r11)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE stag_to_add_mod_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(stag_id_r11, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(unpack_enum(time_align_timer_stag_r11, bref)); + + return SRSASN_SUCCESS; +} +void stag_to_add_mod_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("stag-Id-r11", stag_id_r11); + j.write_str("timeAlignmentTimerSTAG-r11", time_align_timer_stag_r11.to_string()); + j.end_obj(); +} + +// SchedulingRequestConfig-v1530 ::= CHOICE +void sched_request_cfg_v1530_c::set(types::options e) +{ + type_ = e; +} +void sched_request_cfg_v1530_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(); + if (c.sr_slot_spucch_idx_fh_r15_present) { + j.write_int("sr-SlotSPUCCH-IndexFH-r15", c.sr_slot_spucch_idx_fh_r15); + } + if (c.sr_slot_spucch_idx_no_fh_r15_present) { + j.write_int("sr-SlotSPUCCH-IndexNoFH-r15", c.sr_slot_spucch_idx_no_fh_r15); + } + if (c.sr_subslot_spucch_res_list_r15_present) { + j.start_array("sr-SubslotSPUCCH-ResourceList-r15"); + for (uint32_t i1 = 0; i1 < c.sr_subslot_spucch_res_list_r15.size(); ++i1) { + j.write_int(c.sr_subslot_spucch_res_list_r15[i1]); + } + j.end_array(); + } + if (c.sr_cfg_idx_slot_r15_present) { + j.write_int("sr-ConfigIndexSlot-r15", c.sr_cfg_idx_slot_r15); + } + if (c.sr_cfg_idx_subslot_r15_present) { + j.write_int("sr-ConfigIndexSubslot-r15", c.sr_cfg_idx_subslot_r15); + } + j.write_str("dssr-TransMax-r15", c.dssr_trans_max_r15.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_v1530_c"); + } + j.end_obj(); +} +SRSASN_CODE sched_request_cfg_v1530_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.sr_slot_spucch_idx_fh_r15_present, 1)); + HANDLE_CODE(bref.pack(c.sr_slot_spucch_idx_no_fh_r15_present, 1)); + HANDLE_CODE(bref.pack(c.sr_subslot_spucch_res_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.sr_cfg_idx_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(c.sr_cfg_idx_subslot_r15_present, 1)); + if (c.sr_slot_spucch_idx_fh_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sr_slot_spucch_idx_fh_r15, (uint16_t)0, (uint16_t)1319)); + } + if (c.sr_slot_spucch_idx_no_fh_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sr_slot_spucch_idx_no_fh_r15, (uint16_t)0, (uint16_t)3959)); + } + if (c.sr_subslot_spucch_res_list_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.sr_subslot_spucch_res_list_r15, 1, 4, UnalignedIntegerPacker(0, 1319))); + } + if (c.sr_cfg_idx_slot_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sr_cfg_idx_slot_r15, (uint8_t)0, (uint8_t)36)); + } + if (c.sr_cfg_idx_subslot_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sr_cfg_idx_subslot_r15, (uint8_t)0, (uint8_t)122)); + } + HANDLE_CODE(pack_enum(bref, c.dssr_trans_max_r15)); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_v1530_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_cfg_v1530_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.sr_slot_spucch_idx_fh_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.sr_slot_spucch_idx_no_fh_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.sr_subslot_spucch_res_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.sr_cfg_idx_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.sr_cfg_idx_subslot_r15_present, 1)); + if (c.sr_slot_spucch_idx_fh_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.sr_slot_spucch_idx_fh_r15, bref, (uint16_t)0, (uint16_t)1319)); + } + if (c.sr_slot_spucch_idx_no_fh_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.sr_slot_spucch_idx_no_fh_r15, bref, (uint16_t)0, (uint16_t)3959)); + } + if (c.sr_subslot_spucch_res_list_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.sr_subslot_spucch_res_list_r15, bref, 1, 4, UnalignedIntegerPacker(0, 1319))); + } + if (c.sr_cfg_idx_slot_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.sr_cfg_idx_slot_r15, bref, (uint8_t)0, (uint8_t)36)); + } + if (c.sr_cfg_idx_subslot_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.sr_cfg_idx_subslot_r15, bref, (uint8_t)0, (uint8_t)122)); + } + HANDLE_CODE(unpack_enum(c.dssr_trans_max_r15, bref)); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_v1530_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sched_request_cfg_v1530_c::setup_s_::setup_s_() +{ + sr_slot_spucch_idx_fh_r15_present = false; + sr_slot_spucch_idx_no_fh_r15_present = false; + sr_subslot_spucch_res_list_r15_present = false; + sr_cfg_idx_slot_r15_present = false; + sr_cfg_idx_subslot_r15_present = false; +} + +// ShortTTI-r15 ::= SEQUENCE +short_tti_r15_s::short_tti_r15_s() +{ + dl_stti_len_r15_present = false; + ul_stti_len_r15_present = false; +} +SRSASN_CODE short_tti_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dl_stti_len_r15_present, 1)); + HANDLE_CODE(bref.pack(ul_stti_len_r15_present, 1)); + + if (dl_stti_len_r15_present) { + HANDLE_CODE(pack_enum(bref, dl_stti_len_r15)); + } + if (ul_stti_len_r15_present) { + HANDLE_CODE(pack_enum(bref, ul_stti_len_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE short_tti_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dl_stti_len_r15_present, 1)); + HANDLE_CODE(bref.unpack(ul_stti_len_r15_present, 1)); + + if (dl_stti_len_r15_present) { + HANDLE_CODE(unpack_enum(dl_stti_len_r15, bref)); + } + if (ul_stti_len_r15_present) { + HANDLE_CODE(unpack_enum(ul_stti_len_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void short_tti_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_stti_len_r15_present) { + j.write_str("dl-STTI-Length-r15", dl_stti_len_r15.to_string()); + } + if (ul_stti_len_r15_present) { + j.write_str("ul-STTI-Length-r15", ul_stti_len_r15.to_string()); + } + j.end_obj(); +} + +// SlotOrSubslotPDSCH-Config-r15 ::= CHOICE +void slot_or_subslot_pdsch_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void slot_or_subslot_pdsch_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.alt_cqi_table_stti_r15_present) { + j.write_str("altCQI-TableSTTI-r15", c.alt_cqi_table_stti_r15.to_string()); + } + if (c.alt_cqi_table1024_qam_stti_r15_present) { + j.write_str("altCQI-Table1024QAM-STTI-r15", c.alt_cqi_table1024_qam_stti_r15.to_string()); + } + if (c.res_alloc_r15_present) { + j.write_str("resourceAllocation-r15", c.res_alloc_r15.to_string()); + } + if (c.tbs_idx_alt_stti_r15_present) { + j.write_str("tbsIndexAlt-STTI-r15", "a33"); + } + if (c.tbs_idx_alt2_stti_r15_present) { + j.write_str("tbsIndexAlt2-STTI-r15", "b33"); + } + if (c.tbs_idx_alt3_stti_r15_present) { + j.write_str("tbsIndexAlt3-STTI-r15", "a37"); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "slot_or_subslot_pdsch_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE slot_or_subslot_pdsch_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.alt_cqi_table_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.alt_cqi_table1024_qam_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.res_alloc_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tbs_idx_alt_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tbs_idx_alt2_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tbs_idx_alt3_stti_r15_present, 1)); + if (c.alt_cqi_table_stti_r15_present) { + HANDLE_CODE(pack_enum(bref, c.alt_cqi_table_stti_r15)); + } + if (c.alt_cqi_table1024_qam_stti_r15_present) { + HANDLE_CODE(pack_enum(bref, c.alt_cqi_table1024_qam_stti_r15)); + } + if (c.res_alloc_r15_present) { + HANDLE_CODE(pack_enum(bref, c.res_alloc_r15)); + } + break; + default: + log_invalid_choice_id(type_, "slot_or_subslot_pdsch_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE slot_or_subslot_pdsch_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.alt_cqi_table_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.alt_cqi_table1024_qam_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.res_alloc_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tbs_idx_alt_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tbs_idx_alt2_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tbs_idx_alt3_stti_r15_present, 1)); + if (c.alt_cqi_table_stti_r15_present) { + HANDLE_CODE(unpack_enum(c.alt_cqi_table_stti_r15, bref)); + } + if (c.alt_cqi_table1024_qam_stti_r15_present) { + HANDLE_CODE(unpack_enum(c.alt_cqi_table1024_qam_stti_r15, bref)); + } + if (c.res_alloc_r15_present) { + HANDLE_CODE(unpack_enum(c.res_alloc_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "slot_or_subslot_pdsch_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +slot_or_subslot_pdsch_cfg_r15_c::setup_s_::setup_s_() +{ + ext = false; + alt_cqi_table_stti_r15_present = false; + alt_cqi_table1024_qam_stti_r15_present = false; + res_alloc_r15_present = false; + tbs_idx_alt_stti_r15_present = false; + tbs_idx_alt2_stti_r15_present = false; + tbs_idx_alt3_stti_r15_present = false; +} + +// SlotOrSubslotPUSCH-Config-r15 ::= CHOICE +void slot_or_subslot_pusch_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void slot_or_subslot_pusch_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.beta_offset_slot_ack_idx_r15_present) { + j.write_int("betaOffsetSlot-ACK-Index-r15", c.beta_offset_slot_ack_idx_r15); + } + if (c.beta_offset2_slot_ack_idx_r15_present) { + j.write_int("betaOffset2Slot-ACK-Index-r15", c.beta_offset2_slot_ack_idx_r15); + } + if (c.beta_offset_subslot_ack_idx_r15_present) { + j.start_array("betaOffsetSubslot-ACK-Index-r15"); + for (uint32_t i1 = 0; i1 < c.beta_offset_subslot_ack_idx_r15.size(); ++i1) { + j.write_int(c.beta_offset_subslot_ack_idx_r15[i1]); + } + j.end_array(); + } + if (c.beta_offset2_subslot_ack_idx_r15_present) { + j.start_array("betaOffset2Subslot-ACK-Index-r15"); + for (uint32_t i1 = 0; i1 < c.beta_offset2_subslot_ack_idx_r15.size(); ++i1) { + j.write_int(c.beta_offset2_subslot_ack_idx_r15[i1]); + } + j.end_array(); + } + if (c.beta_offset_slot_ri_idx_r15_present) { + j.write_int("betaOffsetSlot-RI-Index-r15", c.beta_offset_slot_ri_idx_r15); + } + if (c.beta_offset_subslot_ri_idx_r15_present) { + j.start_array("betaOffsetSubslot-RI-Index-r15"); + for (uint32_t i1 = 0; i1 < c.beta_offset_subslot_ri_idx_r15.size(); ++i1) { + j.write_int(c.beta_offset_subslot_ri_idx_r15[i1]); + } + j.end_array(); + } + if (c.beta_offset_slot_cqi_idx_r15_present) { + j.write_int("betaOffsetSlot-CQI-Index-r15", c.beta_offset_slot_cqi_idx_r15); + } + if (c.beta_offset_subslot_cqi_idx_r15_present) { + j.write_int("betaOffsetSubslot-CQI-Index-r15", c.beta_offset_subslot_cqi_idx_r15); + } + if (c.enable256_qam_slot_or_subslot_r15_present) { + j.write_fieldname("enable256QAM-SlotOrSubslot-r15"); + c.enable256_qam_slot_or_subslot_r15.to_json(j); + } + if (c.res_alloc_offset_r15_present) { + j.write_int("resourceAllocationOffset-r15", c.res_alloc_offset_r15); + } + j.write_bool("ul-DMRS-IFDMA-SlotOrSubslot-r15", c.ul_dmrs_ifdma_slot_or_subslot_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "slot_or_subslot_pusch_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE slot_or_subslot_pusch_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.beta_offset_slot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset2_slot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset_subslot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset2_subslot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset_slot_ri_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset_subslot_ri_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset_slot_cqi_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset_subslot_cqi_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(c.enable256_qam_slot_or_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(c.res_alloc_offset_r15_present, 1)); + if (c.beta_offset_slot_ack_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_slot_ack_idx_r15, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset2_slot_ack_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset2_slot_ack_idx_r15, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset_subslot_ack_idx_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.beta_offset_subslot_ack_idx_r15, 1, 2, UnalignedIntegerPacker(0, 15))); + } + if (c.beta_offset2_subslot_ack_idx_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.beta_offset2_subslot_ack_idx_r15, 1, 2, UnalignedIntegerPacker(0, 15))); + } + if (c.beta_offset_slot_ri_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_slot_ri_idx_r15, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset_subslot_ri_idx_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.beta_offset_subslot_ri_idx_r15, 1, 2, UnalignedIntegerPacker(0, 15))); + } + if (c.beta_offset_slot_cqi_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_slot_cqi_idx_r15, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset_subslot_cqi_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_subslot_cqi_idx_r15, (uint8_t)0, (uint8_t)15)); + } + if (c.enable256_qam_slot_or_subslot_r15_present) { + HANDLE_CODE(c.enable256_qam_slot_or_subslot_r15.pack(bref)); + } + if (c.res_alloc_offset_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.res_alloc_offset_r15, (uint8_t)1, (uint8_t)2)); + } + HANDLE_CODE(bref.pack(c.ul_dmrs_ifdma_slot_or_subslot_r15, 1)); + break; + default: + log_invalid_choice_id(type_, "slot_or_subslot_pusch_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE slot_or_subslot_pusch_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.beta_offset_slot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset2_slot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset_subslot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset2_subslot_ack_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset_slot_ri_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset_subslot_ri_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset_slot_cqi_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset_subslot_cqi_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.enable256_qam_slot_or_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.res_alloc_offset_r15_present, 1)); + if (c.beta_offset_slot_ack_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_slot_ack_idx_r15, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset2_slot_ack_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset2_slot_ack_idx_r15, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset_subslot_ack_idx_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.beta_offset_subslot_ack_idx_r15, bref, 1, 2, UnalignedIntegerPacker(0, 15))); + } + if (c.beta_offset2_subslot_ack_idx_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.beta_offset2_subslot_ack_idx_r15, bref, 1, 2, UnalignedIntegerPacker(0, 15))); + } + if (c.beta_offset_slot_ri_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_slot_ri_idx_r15, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset_subslot_ri_idx_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.beta_offset_subslot_ri_idx_r15, bref, 1, 2, UnalignedIntegerPacker(0, 15))); + } + if (c.beta_offset_slot_cqi_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_slot_cqi_idx_r15, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.beta_offset_subslot_cqi_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_subslot_cqi_idx_r15, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.enable256_qam_slot_or_subslot_r15_present) { + HANDLE_CODE(c.enable256_qam_slot_or_subslot_r15.unpack(bref)); + } + if (c.res_alloc_offset_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.res_alloc_offset_r15, bref, (uint8_t)1, (uint8_t)2)); + } + HANDLE_CODE(bref.unpack(c.ul_dmrs_ifdma_slot_or_subslot_r15, 1)); + break; + default: + log_invalid_choice_id(type_, "slot_or_subslot_pusch_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +slot_or_subslot_pusch_cfg_r15_c::setup_s_::setup_s_() +{ + ext = false; + beta_offset_slot_ack_idx_r15_present = false; + beta_offset2_slot_ack_idx_r15_present = false; + beta_offset_subslot_ack_idx_r15_present = false; + beta_offset2_subslot_ack_idx_r15_present = false; + beta_offset_slot_ri_idx_r15_present = false; + beta_offset_subslot_ri_idx_r15_present = false; + beta_offset_slot_cqi_idx_r15_present = false; + beta_offset_subslot_cqi_idx_r15_present = false; + enable256_qam_slot_or_subslot_r15_present = false; + res_alloc_offset_r15_present = false; +} + +// TDD-PUSCH-UpPTS-r14 ::= CHOICE +void tdd_pusch_up_pts_r14_c::set(types::options e) +{ + type_ = e; +} +void tdd_pusch_up_pts_r14_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(); + if (c.sym_pusch_up_pts_r14_present) { + j.write_str("symPUSCH-UpPTS-r14", c.sym_pusch_up_pts_r14.to_string()); + } + if (c.dmrs_less_up_pts_cfg_r14_present) { + j.write_str("dmrs-LessUpPTS-Config-r14", "true"); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "tdd_pusch_up_pts_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE tdd_pusch_up_pts_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.sym_pusch_up_pts_r14_present, 1)); + HANDLE_CODE(bref.pack(c.dmrs_less_up_pts_cfg_r14_present, 1)); + if (c.sym_pusch_up_pts_r14_present) { + HANDLE_CODE(pack_enum(bref, c.sym_pusch_up_pts_r14)); + } + break; + default: + log_invalid_choice_id(type_, "tdd_pusch_up_pts_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_pusch_up_pts_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.sym_pusch_up_pts_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.dmrs_less_up_pts_cfg_r14_present, 1)); + if (c.sym_pusch_up_pts_r14_present) { + HANDLE_CODE(unpack_enum(c.sym_pusch_up_pts_r14, bref)); + } + break; + default: + log_invalid_choice_id(type_, "tdd_pusch_up_pts_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +tdd_pusch_up_pts_r14_c::setup_s_::setup_s_() +{ + sym_pusch_up_pts_r14_present = false; + dmrs_less_up_pts_cfg_r14_present = false; +} + +// UplinkPowerControlDedicatedSTTI-r15 ::= SEQUENCE +ul_pwr_ctrl_ded_stti_r15_s::ul_pwr_ctrl_ded_stti_r15_s() +{ + delta_tx_d_offset_list_spucch_r15_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_stti_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delta_tx_d_offset_list_spucch_r15_present, 1)); + + HANDLE_CODE(bref.pack(accumulation_enabled_stti_r15, 1)); + if (delta_tx_d_offset_list_spucch_r15_present) { + HANDLE_CODE(delta_tx_d_offset_list_spucch_r15.pack(bref)); + } + HANDLE_CODE(bref.pack(ul_pwr_csi_payload, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_stti_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delta_tx_d_offset_list_spucch_r15_present, 1)); + + HANDLE_CODE(bref.unpack(accumulation_enabled_stti_r15, 1)); + if (delta_tx_d_offset_list_spucch_r15_present) { + HANDLE_CODE(delta_tx_d_offset_list_spucch_r15.unpack(bref)); + } + HANDLE_CODE(bref.unpack(ul_pwr_csi_payload, 1)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_stti_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("accumulationEnabledSTTI-r15", accumulation_enabled_stti_r15); + if (delta_tx_d_offset_list_spucch_r15_present) { + j.write_fieldname("deltaTxD-OffsetListSPUCCH-r15"); + delta_tx_d_offset_list_spucch_r15.to_json(j); + } + j.write_bool("uplinkPower-CSIPayload", ul_pwr_csi_payload); + j.end_obj(); +} + +// AntennaInfoDedicated ::= SEQUENCE +ant_info_ded_s::ant_info_ded_s() +{ + codebook_subset_restrict_present = false; +} +SRSASN_CODE ant_info_ded_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(codebook_subset_restrict_present, 1)); + + HANDLE_CODE(pack_enum(bref, tx_mode)); + if (codebook_subset_restrict_present) { + HANDLE_CODE(codebook_subset_restrict.pack(bref)); + } + HANDLE_CODE(ue_tx_ant_sel.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(codebook_subset_restrict_present, 1)); + + HANDLE_CODE(unpack_enum(tx_mode, bref)); + if (codebook_subset_restrict_present) { + HANDLE_CODE(codebook_subset_restrict.unpack(bref)); + } + HANDLE_CODE(ue_tx_ant_sel.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ant_info_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("transmissionMode", tx_mode.to_string()); + if (codebook_subset_restrict_present) { + j.write_fieldname("codebookSubsetRestriction"); + codebook_subset_restrict.to_json(j); + } + j.write_fieldname("ue-TransmitAntennaSelection"); + ue_tx_ant_sel.to_json(j); + j.end_obj(); +} + +void ant_info_ded_s::codebook_subset_restrict_c_::destroy_() +{ + switch (type_) { + case types::n2_tx_ant_tm3: + c.destroy >(); + break; + case types::n4_tx_ant_tm3: + c.destroy >(); + break; + case types::n2_tx_ant_tm4: + c.destroy >(); + break; + case types::n4_tx_ant_tm4: + c.destroy >(); + break; + case types::n2_tx_ant_tm5: + c.destroy >(); + break; + case types::n4_tx_ant_tm5: + c.destroy >(); + break; + case types::n2_tx_ant_tm6: + c.destroy >(); + break; + case types::n4_tx_ant_tm6: + c.destroy >(); + break; + default: + break; + } +} +void ant_info_ded_s::codebook_subset_restrict_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::n2_tx_ant_tm3: + c.init >(); + break; + case types::n4_tx_ant_tm3: + c.init >(); + break; + case types::n2_tx_ant_tm4: + c.init >(); + break; + case types::n4_tx_ant_tm4: + c.init >(); + break; + case types::n2_tx_ant_tm5: + c.init >(); + break; + case types::n4_tx_ant_tm5: + c.init >(); + break; + case types::n2_tx_ant_tm6: + c.init >(); + break; + case types::n4_tx_ant_tm6: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::codebook_subset_restrict_c_"); + } +} +ant_info_ded_s::codebook_subset_restrict_c_::codebook_subset_restrict_c_( + const ant_info_ded_s::codebook_subset_restrict_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::n2_tx_ant_tm3: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm3: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm4: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm4: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm5: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm5: + c.init(other.c.get >()); + break; + case types::n2_tx_ant_tm6: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm6: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::codebook_subset_restrict_c_"); + } +} +ant_info_ded_s::codebook_subset_restrict_c_& ant_info_ded_s::codebook_subset_restrict_c_:: + operator=(const ant_info_ded_s::codebook_subset_restrict_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::n2_tx_ant_tm3: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm3: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm4: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm4: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm5: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm5: + c.set(other.c.get >()); + break; + case types::n2_tx_ant_tm6: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm6: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::codebook_subset_restrict_c_"); + } + + return *this; +} +void ant_info_ded_s::codebook_subset_restrict_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n2_tx_ant_tm3: + j.write_str("n2TxAntenna-tm3", c.get >().to_string()); + break; + case types::n4_tx_ant_tm3: + j.write_str("n4TxAntenna-tm3", c.get >().to_string()); + break; + case types::n2_tx_ant_tm4: + j.write_str("n2TxAntenna-tm4", c.get >().to_string()); + break; + case types::n4_tx_ant_tm4: + j.write_str("n4TxAntenna-tm4", c.get >().to_string()); + break; + case types::n2_tx_ant_tm5: + j.write_str("n2TxAntenna-tm5", c.get >().to_string()); + break; + case types::n4_tx_ant_tm5: + j.write_str("n4TxAntenna-tm5", c.get >().to_string()); + break; + case types::n2_tx_ant_tm6: + j.write_str("n2TxAntenna-tm6", c.get >().to_string()); + break; + case types::n4_tx_ant_tm6: + j.write_str("n4TxAntenna-tm6", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::codebook_subset_restrict_c_"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_s::codebook_subset_restrict_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::n2_tx_ant_tm3: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm3: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm4: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm4: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm5: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm5: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n2_tx_ant_tm6: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm6: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::codebook_subset_restrict_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_s::codebook_subset_restrict_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::n2_tx_ant_tm3: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm3: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm4: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm4: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm5: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm5: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n2_tx_ant_tm6: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm6: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::codebook_subset_restrict_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ant_info_ded_s::ue_tx_ant_sel_c_::set(types::options e) +{ + type_ = e; +} +void ant_info_ded_s::ue_tx_ant_sel_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::ue_tx_ant_sel_c_"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_s::ue_tx_ant_sel_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::ue_tx_ant_sel_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_s::ue_tx_ant_sel_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_s::ue_tx_ant_sel_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AntennaInfoDedicated-r10 ::= SEQUENCE +ant_info_ded_r10_s::ant_info_ded_r10_s() +{ + codebook_subset_restrict_r10_present = false; +} +SRSASN_CODE ant_info_ded_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(codebook_subset_restrict_r10_present, 1)); + + HANDLE_CODE(pack_enum(bref, tx_mode_r10)); + if (codebook_subset_restrict_r10_present) { + HANDLE_CODE(codebook_subset_restrict_r10.pack(bref)); + } + HANDLE_CODE(ue_tx_ant_sel.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(codebook_subset_restrict_r10_present, 1)); + + HANDLE_CODE(unpack_enum(tx_mode_r10, bref)); + if (codebook_subset_restrict_r10_present) { + HANDLE_CODE(codebook_subset_restrict_r10.unpack(bref)); + } + HANDLE_CODE(ue_tx_ant_sel.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ant_info_ded_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("transmissionMode-r10", tx_mode_r10.to_string()); + if (codebook_subset_restrict_r10_present) { + j.write_str("codebookSubsetRestriction-r10", codebook_subset_restrict_r10.to_string()); + } + j.write_fieldname("ue-TransmitAntennaSelection"); + ue_tx_ant_sel.to_json(j); + j.end_obj(); +} + +void ant_info_ded_r10_s::ue_tx_ant_sel_c_::set(types::options e) +{ + type_ = e; +} +void ant_info_ded_r10_s::ue_tx_ant_sel_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_r10_s::ue_tx_ant_sel_c_"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_r10_s::ue_tx_ant_sel_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_r10_s::ue_tx_ant_sel_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_r10_s::ue_tx_ant_sel_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_r10_s::ue_tx_ant_sel_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AntennaInfoDedicated-v1250 ::= SEQUENCE +SRSASN_CODE ant_info_ded_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(alternative_codebook_enabled_for4_tx_r12, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(alternative_codebook_enabled_for4_tx_r12, 1)); + + return SRSASN_SUCCESS; +} +void ant_info_ded_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("alternativeCodebookEnabledFor4TX-r12", alternative_codebook_enabled_for4_tx_r12); + j.end_obj(); +} + +// AntennaInfoDedicated-v1430 ::= SEQUENCE +ant_info_ded_v1430_s::ant_info_ded_v1430_s() +{ + ce_ue_tx_ant_sel_cfg_r14_present = false; +} +SRSASN_CODE ant_info_ded_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_ue_tx_ant_sel_cfg_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_ue_tx_ant_sel_cfg_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void ant_info_ded_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_ue_tx_ant_sel_cfg_r14_present) { + j.write_str("ce-UE-TxAntennaSelection-config-r14", "on"); + } + j.end_obj(); +} + +// AntennaInfoDedicated-v1530 ::= CHOICE +void ant_info_ded_v1530_c::set(types::options e) +{ + type_ = e; +} +void ant_info_ded_v1530_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v1530_c"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_v1530_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v1530_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v1530_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v1530_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ant_info_ded_v1530_c::setup_c_::set(types::options e) +{ + type_ = e; +} +void ant_info_ded_v1530_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_tx_ant_sel_srs_minus1_t4_r_cfg_r15: + break; + case types::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15: + j.write_str("ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v1530_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_v1530_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_tx_ant_sel_srs_minus1_t4_r_cfg_r15: + break; + case types::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v1530_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v1530_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_tx_ant_sel_srs_minus1_t4_r_cfg_r15: + break; + case types::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v1530_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AntennaInfoDedicated-v920 ::= SEQUENCE +ant_info_ded_v920_s::ant_info_ded_v920_s() +{ + codebook_subset_restrict_v920_present = false; +} +SRSASN_CODE ant_info_ded_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(codebook_subset_restrict_v920_present, 1)); + + if (codebook_subset_restrict_v920_present) { + HANDLE_CODE(codebook_subset_restrict_v920.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(codebook_subset_restrict_v920_present, 1)); + + if (codebook_subset_restrict_v920_present) { + HANDLE_CODE(codebook_subset_restrict_v920.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ant_info_ded_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (codebook_subset_restrict_v920_present) { + j.write_fieldname("codebookSubsetRestriction-v920"); + codebook_subset_restrict_v920.to_json(j); + } + j.end_obj(); +} + +void ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::destroy_() +{ + switch (type_) { + case types::n2_tx_ant_tm8_r9: + c.destroy >(); + break; + case types::n4_tx_ant_tm8_r9: + c.destroy >(); + break; + default: + break; + } +} +void ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::n2_tx_ant_tm8_r9: + c.init >(); + break; + case types::n4_tx_ant_tm8_r9: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_"); + } +} +ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::codebook_subset_restrict_v920_c_( + const ant_info_ded_v920_s::codebook_subset_restrict_v920_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::n2_tx_ant_tm8_r9: + c.init(other.c.get >()); + break; + case types::n4_tx_ant_tm8_r9: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_"); + } +} +ant_info_ded_v920_s::codebook_subset_restrict_v920_c_& ant_info_ded_v920_s::codebook_subset_restrict_v920_c_:: + operator=(const ant_info_ded_v920_s::codebook_subset_restrict_v920_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::n2_tx_ant_tm8_r9: + c.set(other.c.get >()); + break; + case types::n4_tx_ant_tm8_r9: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_"); + } + + return *this; +} +void ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n2_tx_ant_tm8_r9: + j.write_str("n2TxAntenna-tm8-r9", c.get >().to_string()); + break; + case types::n4_tx_ant_tm8_r9: + j.write_str("n4TxAntenna-tm8-r9", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_"); + } + j.end_obj(); +} +SRSASN_CODE ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::n2_tx_ant_tm8_r9: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::n4_tx_ant_tm8_r9: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::n2_tx_ant_tm8_r9: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::n4_tx_ant_tm8_r9: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AntennaInfoUL-r10 ::= SEQUENCE +ant_info_ul_r10_s::ant_info_ul_r10_s() +{ + tx_mode_ul_r10_present = false; + four_ant_port_activ_r10_present = false; +} +SRSASN_CODE ant_info_ul_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_mode_ul_r10_present, 1)); + HANDLE_CODE(bref.pack(four_ant_port_activ_r10_present, 1)); + + if (tx_mode_ul_r10_present) { + HANDLE_CODE(pack_enum(bref, tx_mode_ul_r10)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ul_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_mode_ul_r10_present, 1)); + HANDLE_CODE(bref.unpack(four_ant_port_activ_r10_present, 1)); + + if (tx_mode_ul_r10_present) { + HANDLE_CODE(unpack_enum(tx_mode_ul_r10, bref)); + } + + return SRSASN_SUCCESS; +} +void ant_info_ul_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_mode_ul_r10_present) { + j.write_str("transmissionModeUL-r10", tx_mode_ul_r10.to_string()); + } + if (four_ant_port_activ_r10_present) { + j.write_str("fourAntennaPortActivated-r10", "setup"); + } + j.end_obj(); +} + +// BandClassPriority1XRTT ::= SEQUENCE +SRSASN_CODE band_class_prio1_xrtt_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, band_class)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_class_prio1_xrtt_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(band_class, bref)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void band_class_prio1_xrtt_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bandClass", band_class.to_string()); + j.write_int("cellReselectionPriority", cell_resel_prio); + j.end_obj(); +} + +// BandClassPriorityHRPD ::= SEQUENCE +SRSASN_CODE band_class_prio_hrpd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, band_class)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_class_prio_hrpd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(band_class, bref)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void band_class_prio_hrpd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bandClass", band_class.to_string()); + j.write_int("cellReselectionPriority", cell_resel_prio); + j.end_obj(); +} + +// CFI-Config-r15 ::= SEQUENCE +cfi_cfg_r15_s::cfi_cfg_r15_s() +{ + cfi_sf_non_mbsfn_r15_present = false; + cfi_slot_subslot_non_mbsfn_r15_present = false; + cfi_sf_mbsfn_r15_present = false; + cfi_slot_subslot_mbsfn_r15_present = false; +} +SRSASN_CODE cfi_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cfi_sf_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(cfi_slot_subslot_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(cfi_sf_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(cfi_slot_subslot_mbsfn_r15_present, 1)); + + if (cfi_sf_non_mbsfn_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, cfi_sf_non_mbsfn_r15, (uint8_t)1, (uint8_t)4)); + } + if (cfi_slot_subslot_non_mbsfn_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, cfi_slot_subslot_non_mbsfn_r15, (uint8_t)1, (uint8_t)3)); + } + if (cfi_sf_mbsfn_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, cfi_sf_mbsfn_r15, (uint8_t)1, (uint8_t)2)); + } + if (cfi_slot_subslot_mbsfn_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, cfi_slot_subslot_mbsfn_r15, (uint8_t)1, (uint8_t)2)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cfi_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cfi_sf_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(cfi_slot_subslot_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(cfi_sf_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(cfi_slot_subslot_mbsfn_r15_present, 1)); + + if (cfi_sf_non_mbsfn_r15_present) { + HANDLE_CODE(unpack_unalign_integer(cfi_sf_non_mbsfn_r15, bref, (uint8_t)1, (uint8_t)4)); + } + if (cfi_slot_subslot_non_mbsfn_r15_present) { + HANDLE_CODE(unpack_unalign_integer(cfi_slot_subslot_non_mbsfn_r15, bref, (uint8_t)1, (uint8_t)3)); + } + if (cfi_sf_mbsfn_r15_present) { + HANDLE_CODE(unpack_unalign_integer(cfi_sf_mbsfn_r15, bref, (uint8_t)1, (uint8_t)2)); + } + if (cfi_slot_subslot_mbsfn_r15_present) { + HANDLE_CODE(unpack_unalign_integer(cfi_slot_subslot_mbsfn_r15, bref, (uint8_t)1, (uint8_t)2)); + } + + return SRSASN_SUCCESS; +} +void cfi_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cfi_sf_non_mbsfn_r15_present) { + j.write_int("cfi-SubframeNonMBSFN-r15", cfi_sf_non_mbsfn_r15); + } + if (cfi_slot_subslot_non_mbsfn_r15_present) { + j.write_int("cfi-SlotSubslotNonMBSFN-r15", cfi_slot_subslot_non_mbsfn_r15); + } + if (cfi_sf_mbsfn_r15_present) { + j.write_int("cfi-SubframeMBSFN-r15", cfi_sf_mbsfn_r15); + } + if (cfi_slot_subslot_mbsfn_r15_present) { + j.write_int("cfi-SlotSubslotMBSFN-r15", cfi_slot_subslot_mbsfn_r15); + } + j.end_obj(); +} + +// CFI-PatternConfig-r15 ::= SEQUENCE +cfi_pattern_cfg_r15_s::cfi_pattern_cfg_r15_s() +{ + cfi_pattern_sf_r15_present = false; + cfi_pattern_slot_subslot_r15_present = false; +} +SRSASN_CODE cfi_pattern_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cfi_pattern_sf_r15_present, 1)); + HANDLE_CODE(bref.pack(cfi_pattern_slot_subslot_r15_present, 1)); + + if (cfi_pattern_sf_r15_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(cfi_pattern_sf_r15)[0], cfi_pattern_sf_r15.size(), + UnalignedIntegerPacker(1, 4))); + } + if (cfi_pattern_slot_subslot_r15_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(cfi_pattern_slot_subslot_r15)[0], cfi_pattern_slot_subslot_r15.size(), + UnalignedIntegerPacker(1, 3))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cfi_pattern_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cfi_pattern_sf_r15_present, 1)); + HANDLE_CODE(bref.unpack(cfi_pattern_slot_subslot_r15_present, 1)); + + if (cfi_pattern_sf_r15_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(cfi_pattern_sf_r15)[0], bref, cfi_pattern_sf_r15.size(), + UnalignedIntegerPacker(1, 4))); + } + if (cfi_pattern_slot_subslot_r15_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(cfi_pattern_slot_subslot_r15)[0], bref, cfi_pattern_slot_subslot_r15.size(), + UnalignedIntegerPacker(1, 3))); + } + + return SRSASN_SUCCESS; +} +void cfi_pattern_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cfi_pattern_sf_r15_present) { + j.start_array("cfi-PatternSubframe-r15"); + for (uint32_t i1 = 0; i1 < cfi_pattern_sf_r15.size(); ++i1) { + j.write_int(cfi_pattern_sf_r15[i1]); + } + j.end_array(); + } + if (cfi_pattern_slot_subslot_r15_present) { + j.start_array("cfi-PatternSlotSubslot-r15"); + for (uint32_t i1 = 0; i1 < cfi_pattern_slot_subslot_r15.size(); ++i1) { + j.write_int(cfi_pattern_slot_subslot_r15[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// CQI-ReportConfig ::= SEQUENCE +cqi_report_cfg_s::cqi_report_cfg_s() +{ + cqi_report_mode_aperiodic_present = false; + cqi_report_periodic_present = false; +} +SRSASN_CODE cqi_report_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_mode_aperiodic_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_present, 1)); + + if (cqi_report_mode_aperiodic_present) { + HANDLE_CODE(pack_enum(bref, cqi_report_mode_aperiodic)); + } + HANDLE_CODE(pack_unalign_integer(bref, nom_pdsch_rs_epre_offset, (int8_t)-1, (int8_t)6)); + if (cqi_report_periodic_present) { + HANDLE_CODE(cqi_report_periodic.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_mode_aperiodic_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_present, 1)); + + if (cqi_report_mode_aperiodic_present) { + HANDLE_CODE(unpack_enum(cqi_report_mode_aperiodic, bref)); + } + HANDLE_CODE(unpack_unalign_integer(nom_pdsch_rs_epre_offset, bref, (int8_t)-1, (int8_t)6)); + if (cqi_report_periodic_present) { + HANDLE_CODE(cqi_report_periodic.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_mode_aperiodic_present) { + j.write_str("cqi-ReportModeAperiodic", cqi_report_mode_aperiodic.to_string()); + } + j.write_int("nomPDSCH-RS-EPRE-Offset", nom_pdsch_rs_epre_offset); + if (cqi_report_periodic_present) { + j.write_fieldname("cqi-ReportPeriodic"); + cqi_report_periodic.to_json(j); + } + j.end_obj(); +} + +// CQI-ReportConfig-v1530 ::= SEQUENCE +cqi_report_cfg_v1530_s::cqi_report_cfg_v1530_s() +{ + alt_cqi_table_minus1024_qam_r15_present = false; +} +SRSASN_CODE cqi_report_cfg_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(alt_cqi_table_minus1024_qam_r15_present, 1)); + + if (alt_cqi_table_minus1024_qam_r15_present) { + HANDLE_CODE(pack_enum(bref, alt_cqi_table_minus1024_qam_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(alt_cqi_table_minus1024_qam_r15_present, 1)); + + if (alt_cqi_table_minus1024_qam_r15_present) { + HANDLE_CODE(unpack_enum(alt_cqi_table_minus1024_qam_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (alt_cqi_table_minus1024_qam_r15_present) { + j.write_str("altCQI-Table-1024QAM-r15", alt_cqi_table_minus1024_qam_r15.to_string()); + } + j.end_obj(); +} + +// CQI-ReportConfig-v920 ::= SEQUENCE +cqi_report_cfg_v920_s::cqi_report_cfg_v920_s() +{ + cqi_mask_r9_present = false; + pmi_ri_report_r9_present = false; +} +SRSASN_CODE cqi_report_cfg_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_mask_r9_present, 1)); + HANDLE_CODE(bref.pack(pmi_ri_report_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_mask_r9_present, 1)); + HANDLE_CODE(bref.unpack(pmi_ri_report_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_mask_r9_present) { + j.write_str("cqi-Mask-r9", "setup"); + } + if (pmi_ri_report_r9_present) { + j.write_str("pmi-RI-Report-r9", "setup"); + } + j.end_obj(); +} + +// CSI-RS-Config-v1480 ::= SEQUENCE +csi_rs_cfg_v1480_s::csi_rs_cfg_v1480_s() +{ + e_mimo_type_v1480_present = false; +} +SRSASN_CODE csi_rs_cfg_v1480_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_mimo_type_v1480_present, 1)); + + if (e_mimo_type_v1480_present) { + HANDLE_CODE(e_mimo_type_v1480.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_v1480_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_mimo_type_v1480_present, 1)); + + if (e_mimo_type_v1480_present) { + HANDLE_CODE(e_mimo_type_v1480.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_v1480_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (e_mimo_type_v1480_present) { + j.write_fieldname("eMIMO-Type-v1480"); + e_mimo_type_v1480.to_json(j); + } + j.end_obj(); +} + +// CSI-RS-Config-v1530 ::= SEQUENCE +csi_rs_cfg_v1530_s::csi_rs_cfg_v1530_s() +{ + e_mimo_type_v1530_present = false; +} +SRSASN_CODE csi_rs_cfg_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_mimo_type_v1530_present, 1)); + + if (e_mimo_type_v1530_present) { + HANDLE_CODE(e_mimo_type_v1530.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_cfg_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_mimo_type_v1530_present, 1)); + + if (e_mimo_type_v1530_present) { + HANDLE_CODE(e_mimo_type_v1530.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csi_rs_cfg_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (e_mimo_type_v1530_present) { + j.write_fieldname("eMIMO-Type-v1530"); + e_mimo_type_v1530.to_json(j); + } + j.end_obj(); +} + +// DRB-ToAddMod ::= SEQUENCE +drb_to_add_mod_s::drb_to_add_mod_s() +{ + ext = false; + eps_bearer_id_present = false; + pdcp_cfg_present = false; + rlc_cfg_present = false; + lc_ch_id_present = false; + lc_ch_cfg_present = false; + drb_type_change_r12_present = false; + rlc_cfg_v1250_present = false; + rlc_cfg_v1310_present = false; + drb_type_lwa_r13_present = false; + drb_type_lwip_r13_present = false; + rlc_cfg_v1430_present = false; + lwip_ul_aggregation_r14_present = false; + lwip_dl_aggregation_r14_present = false; + lwa_wlan_ac_r14_present = false; + rlc_cfg_v1510_present = false; + rlc_cfg_v1530_present = false; + rlc_bearer_cfg_dupl_r15_present = false; + lc_ch_id_r15_present = false; +} +SRSASN_CODE drb_to_add_mod_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(eps_bearer_id_present, 1)); + HANDLE_CODE(bref.pack(pdcp_cfg_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_id_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_cfg_present, 1)); + + if (eps_bearer_id_present) { + HANDLE_CODE(pack_unalign_integer(bref, eps_bearer_id, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(pack_unalign_integer(bref, drb_id, (uint8_t)1, (uint8_t)32)); + if (pdcp_cfg_present) { + HANDLE_CODE(pdcp_cfg.pack(bref)); + } + if (rlc_cfg_present) { + HANDLE_CODE(rlc_cfg.pack(bref)); + } + if (lc_ch_id_present) { + HANDLE_CODE(pack_unalign_integer(bref, lc_ch_id, (uint8_t)3, (uint8_t)10)); + } + if (lc_ch_cfg_present) { + HANDLE_CODE(lc_ch_cfg.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags[0] |= drb_type_change_r12_present; + rrc_asn1_warn_assert(rlc_cfg_v1250_present != (rlc_cfg_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= rlc_cfg_v1250_present; + rrc_asn1_warn_assert(rlc_cfg_v1310_present != (rlc_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= rlc_cfg_v1310_present; + group_flags[1] |= drb_type_lwa_r13_present; + group_flags[1] |= drb_type_lwip_r13_present; + rrc_asn1_warn_assert(rlc_cfg_v1430_present != (rlc_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= rlc_cfg_v1430_present; + group_flags[2] |= lwip_ul_aggregation_r14_present; + group_flags[2] |= lwip_dl_aggregation_r14_present; + group_flags[2] |= lwa_wlan_ac_r14_present; + rrc_asn1_warn_assert(rlc_cfg_v1510_present != (rlc_cfg_v1510.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= rlc_cfg_v1510_present; + rrc_asn1_warn_assert(rlc_cfg_v1530_present != (rlc_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= rlc_cfg_v1530_present; + rrc_asn1_warn_assert(rlc_bearer_cfg_dupl_r15_present != (rlc_bearer_cfg_dupl_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= rlc_bearer_cfg_dupl_r15_present; + group_flags[4] |= lc_ch_id_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(drb_type_change_r12_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_v1250_present, 1)); + if (rlc_cfg_v1250_present) { + HANDLE_CODE(rlc_cfg_v1250->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rlc_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(drb_type_lwa_r13_present, 1)); + HANDLE_CODE(bref.pack(drb_type_lwip_r13_present, 1)); + if (rlc_cfg_v1310_present) { + HANDLE_CODE(rlc_cfg_v1310->pack(bref)); + } + if (drb_type_lwa_r13_present) { + HANDLE_CODE(bref.pack(drb_type_lwa_r13, 1)); + } + if (drb_type_lwip_r13_present) { + HANDLE_CODE(pack_enum(bref, drb_type_lwip_r13)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rlc_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(lwip_ul_aggregation_r14_present, 1)); + HANDLE_CODE(bref.pack(lwip_dl_aggregation_r14_present, 1)); + HANDLE_CODE(bref.pack(lwa_wlan_ac_r14_present, 1)); + if (rlc_cfg_v1430_present) { + HANDLE_CODE(rlc_cfg_v1430->pack(bref)); + } + if (lwip_ul_aggregation_r14_present) { + HANDLE_CODE(bref.pack(lwip_ul_aggregation_r14, 1)); + } + if (lwip_dl_aggregation_r14_present) { + HANDLE_CODE(bref.pack(lwip_dl_aggregation_r14, 1)); + } + if (lwa_wlan_ac_r14_present) { + HANDLE_CODE(pack_enum(bref, lwa_wlan_ac_r14)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rlc_cfg_v1510_present, 1)); + if (rlc_cfg_v1510_present) { + HANDLE_CODE(rlc_cfg_v1510->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rlc_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_id_r15_present, 1)); + if (rlc_cfg_v1530_present) { + HANDLE_CODE(rlc_cfg_v1530->pack(bref)); + } + if (rlc_bearer_cfg_dupl_r15_present) { + HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref)); + } + if (lc_ch_id_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, lc_ch_id_r15, (uint8_t)32, (uint8_t)38)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_to_add_mod_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(eps_bearer_id_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_cfg_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_id_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_cfg_present, 1)); + + if (eps_bearer_id_present) { + HANDLE_CODE(unpack_unalign_integer(eps_bearer_id, bref, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(unpack_unalign_integer(drb_id, bref, (uint8_t)1, (uint8_t)32)); + if (pdcp_cfg_present) { + HANDLE_CODE(pdcp_cfg.unpack(bref)); + } + if (rlc_cfg_present) { + HANDLE_CODE(rlc_cfg.unpack(bref)); + } + if (lc_ch_id_present) { + HANDLE_CODE(unpack_unalign_integer(lc_ch_id, bref, (uint8_t)3, (uint8_t)10)); + } + if (lc_ch_cfg_present) { + HANDLE_CODE(lc_ch_cfg.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(drb_type_change_r12_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_v1250_present, 1)); + if (rlc_cfg_v1250_present) { + rlc_cfg_v1250 = make_copy_ptr(rlc_cfg_v1250_s()); + HANDLE_CODE(rlc_cfg_v1250->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rlc_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(drb_type_lwa_r13_present, 1)); + HANDLE_CODE(bref.unpack(drb_type_lwip_r13_present, 1)); + if (rlc_cfg_v1310_present) { + rlc_cfg_v1310 = make_copy_ptr(rlc_cfg_v1310_s()); + HANDLE_CODE(rlc_cfg_v1310->unpack(bref)); + } + if (drb_type_lwa_r13_present) { + HANDLE_CODE(bref.unpack(drb_type_lwa_r13, 1)); + } + if (drb_type_lwip_r13_present) { + HANDLE_CODE(unpack_enum(drb_type_lwip_r13, bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rlc_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(lwip_ul_aggregation_r14_present, 1)); + HANDLE_CODE(bref.unpack(lwip_dl_aggregation_r14_present, 1)); + HANDLE_CODE(bref.unpack(lwa_wlan_ac_r14_present, 1)); + if (rlc_cfg_v1430_present) { + rlc_cfg_v1430 = make_copy_ptr(rlc_cfg_v1430_c()); + HANDLE_CODE(rlc_cfg_v1430->unpack(bref)); + } + if (lwip_ul_aggregation_r14_present) { + HANDLE_CODE(bref.unpack(lwip_ul_aggregation_r14, 1)); + } + if (lwip_dl_aggregation_r14_present) { + HANDLE_CODE(bref.unpack(lwip_dl_aggregation_r14, 1)); + } + if (lwa_wlan_ac_r14_present) { + HANDLE_CODE(unpack_enum(lwa_wlan_ac_r14, bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rlc_cfg_v1510_present, 1)); + if (rlc_cfg_v1510_present) { + rlc_cfg_v1510 = make_copy_ptr(rlc_cfg_v1510_s()); + HANDLE_CODE(rlc_cfg_v1510->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_id_r15_present, 1)); + if (rlc_cfg_v1530_present) { + rlc_cfg_v1530 = make_copy_ptr(rlc_cfg_v1530_c()); + HANDLE_CODE(rlc_cfg_v1530->unpack(bref)); + } + if (rlc_bearer_cfg_dupl_r15_present) { + rlc_bearer_cfg_dupl_r15 = make_copy_ptr(rlc_bearer_cfg_r15_c()); + HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref)); + } + if (lc_ch_id_r15_present) { + HANDLE_CODE(unpack_unalign_integer(lc_ch_id_r15, bref, (uint8_t)32, (uint8_t)38)); + } + } + } + return SRSASN_SUCCESS; +} +void drb_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eps_bearer_id_present) { + j.write_int("eps-BearerIdentity", eps_bearer_id); + } + j.write_int("drb-Identity", drb_id); + if (pdcp_cfg_present) { + j.write_fieldname("pdcp-Config"); + pdcp_cfg.to_json(j); + } + if (rlc_cfg_present) { + j.write_fieldname("rlc-Config"); + rlc_cfg.to_json(j); + } + if (lc_ch_id_present) { + j.write_int("logicalChannelIdentity", lc_ch_id); + } + if (lc_ch_cfg_present) { + j.write_fieldname("logicalChannelConfig"); + lc_ch_cfg.to_json(j); + } + if (drb_type_change_r12_present) { + j.write_str("drb-TypeChange-r12", "toMCG"); + } + if (rlc_cfg_v1250_present) { + j.write_fieldname("rlc-Config-v1250"); + rlc_cfg_v1250->to_json(j); + } + if (rlc_cfg_v1310_present) { + j.write_fieldname("rlc-Config-v1310"); + rlc_cfg_v1310->to_json(j); + } + if (drb_type_lwa_r13_present) { + j.write_bool("drb-TypeLWA-r13", drb_type_lwa_r13); + } + if (drb_type_lwip_r13_present) { + j.write_str("drb-TypeLWIP-r13", drb_type_lwip_r13.to_string()); + } + if (rlc_cfg_v1430_present) { + j.write_fieldname("rlc-Config-v1430"); + rlc_cfg_v1430->to_json(j); + } + if (lwip_ul_aggregation_r14_present) { + j.write_bool("lwip-UL-Aggregation-r14", lwip_ul_aggregation_r14); + } + if (lwip_dl_aggregation_r14_present) { + j.write_bool("lwip-DL-Aggregation-r14", lwip_dl_aggregation_r14); + } + if (lwa_wlan_ac_r14_present) { + j.write_str("lwa-WLAN-AC-r14", lwa_wlan_ac_r14.to_string()); + } + if (rlc_cfg_v1510_present) { + j.write_fieldname("rlc-Config-v1510"); + rlc_cfg_v1510->to_json(j); + } + if (rlc_cfg_v1530_present) { + j.write_fieldname("rlc-Config-v1530"); + rlc_cfg_v1530->to_json(j); + } + if (rlc_bearer_cfg_dupl_r15_present) { + j.write_fieldname("rlc-BearerConfigDupl-r15"); + rlc_bearer_cfg_dupl_r15->to_json(j); + } + if (lc_ch_id_r15_present) { + j.write_int("logicalChannelIdentity-r15", lc_ch_id_r15); + } + j.end_obj(); +} + +// DRX-Config ::= CHOICE +void drx_cfg_c::set(types::options e) +{ + type_ = e; +} +void drx_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("onDurationTimer", c.on_dur_timer.to_string()); + j.write_str("drx-InactivityTimer", c.drx_inactivity_timer.to_string()); + j.write_str("drx-RetransmissionTimer", c.drx_retx_timer.to_string()); + j.write_fieldname("longDRX-CycleStartOffset"); + c.long_drx_cycle_start_offset.to_json(j); + if (c.short_drx_present) { + j.write_fieldname("shortDRX"); + j.start_obj(); + j.write_str("shortDRX-Cycle", c.short_drx.short_drx_cycle.to_string()); + j.write_int("drxShortCycleTimer", c.short_drx.drx_short_cycle_timer); + j.end_obj(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c"); + } + j.end_obj(); +} +SRSASN_CODE drx_cfg_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.short_drx_present, 1)); + HANDLE_CODE(pack_enum(bref, c.on_dur_timer)); + HANDLE_CODE(pack_enum(bref, c.drx_inactivity_timer)); + HANDLE_CODE(pack_enum(bref, c.drx_retx_timer)); + HANDLE_CODE(c.long_drx_cycle_start_offset.pack(bref)); + if (c.short_drx_present) { + HANDLE_CODE(pack_enum(bref, c.short_drx.short_drx_cycle)); + HANDLE_CODE(pack_unalign_integer(bref, c.short_drx.drx_short_cycle_timer, (uint8_t)1, (uint8_t)16)); + } + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.short_drx_present, 1)); + HANDLE_CODE(unpack_enum(c.on_dur_timer, bref)); + HANDLE_CODE(unpack_enum(c.drx_inactivity_timer, bref)); + HANDLE_CODE(unpack_enum(c.drx_retx_timer, bref)); + HANDLE_CODE(c.long_drx_cycle_start_offset.unpack(bref)); + if (c.short_drx_present) { + HANDLE_CODE(unpack_enum(c.short_drx.short_drx_cycle, bref)); + HANDLE_CODE(unpack_unalign_integer(c.short_drx.drx_short_cycle_timer, bref, (uint8_t)1, (uint8_t)16)); + } + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +drx_cfg_c::setup_s_::setup_s_() +{ + short_drx_present = false; +} + +void drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::destroy_() {} +void drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::long_drx_cycle_start_offset_c_( + const drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf10: + c.init(other.c.get()); + break; + case types::sf20: + c.init(other.c.get()); + break; + case types::sf32: + c.init(other.c.get()); + break; + case types::sf40: + c.init(other.c.get()); + break; + case types::sf64: + c.init(other.c.get()); + break; + case types::sf80: + c.init(other.c.get()); + break; + case types::sf128: + c.init(other.c.get()); + break; + case types::sf160: + c.init(other.c.get()); + break; + case types::sf256: + c.init(other.c.get()); + break; + case types::sf320: + c.init(other.c.get()); + break; + case types::sf512: + c.init(other.c.get()); + break; + case types::sf640: + c.init(other.c.get()); + break; + case types::sf1024: + c.init(other.c.get()); + break; + case types::sf1280: + c.init(other.c.get()); + break; + case types::sf2048: + c.init(other.c.get()); + break; + case types::sf2560: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_"); + } +} +drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_& drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_:: + operator=(const drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf10: + c.set(other.c.get()); + break; + case types::sf20: + c.set(other.c.get()); + break; + case types::sf32: + c.set(other.c.get()); + break; + case types::sf40: + c.set(other.c.get()); + break; + case types::sf64: + c.set(other.c.get()); + break; + case types::sf80: + c.set(other.c.get()); + break; + case types::sf128: + c.set(other.c.get()); + break; + case types::sf160: + c.set(other.c.get()); + break; + case types::sf256: + c.set(other.c.get()); + break; + case types::sf320: + c.set(other.c.get()); + break; + case types::sf512: + c.set(other.c.get()); + break; + case types::sf640: + c.set(other.c.get()); + break; + case types::sf1024: + c.set(other.c.get()); + break; + case types::sf1280: + c.set(other.c.get()); + break; + case types::sf2048: + c.set(other.c.get()); + break; + case types::sf2560: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_"); + } + + return *this; +} +void drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf10: + j.write_int("sf10", c.get()); + break; + case types::sf20: + j.write_int("sf20", c.get()); + break; + case types::sf32: + j.write_int("sf32", c.get()); + break; + case types::sf40: + j.write_int("sf40", c.get()); + break; + case types::sf64: + j.write_int("sf64", c.get()); + break; + case types::sf80: + j.write_int("sf80", c.get()); + break; + case types::sf128: + j.write_int("sf128", c.get()); + break; + case types::sf160: + j.write_int("sf160", c.get()); + break; + case types::sf256: + j.write_int("sf256", c.get()); + break; + case types::sf320: + j.write_int("sf320", c.get()); + break; + case types::sf512: + j.write_int("sf512", c.get()); + break; + case types::sf640: + j.write_int("sf640", c.get()); + break; + case types::sf1024: + j.write_int("sf1024", c.get()); + break; + case types::sf1280: + j.write_int("sf1280", c.get()); + break; + case types::sf2048: + j.write_int("sf2048", c.get()); + break; + case types::sf2560: + j.write_int("sf2560", c.get()); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf10: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1023)); + break; + case types::sf1280: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::sf2048: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)2047)); + break; + case types::sf2560: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)2559)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf10: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1023)); + break; + case types::sf1280: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::sf2048: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)2047)); + break; + case types::sf2560: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)2559)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DRX-Config-r13 ::= SEQUENCE +drx_cfg_r13_s::drx_cfg_r13_s() +{ + on_dur_timer_v1310_present = false; + drx_retx_timer_v1310_present = false; + drx_ul_retx_timer_r13_present = false; +} +SRSASN_CODE drx_cfg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(on_dur_timer_v1310_present, 1)); + HANDLE_CODE(bref.pack(drx_retx_timer_v1310_present, 1)); + HANDLE_CODE(bref.pack(drx_ul_retx_timer_r13_present, 1)); + + if (on_dur_timer_v1310_present) { + HANDLE_CODE(pack_enum(bref, on_dur_timer_v1310)); + } + if (drx_retx_timer_v1310_present) { + HANDLE_CODE(pack_enum(bref, drx_retx_timer_v1310)); + } + if (drx_ul_retx_timer_r13_present) { + HANDLE_CODE(pack_enum(bref, drx_ul_retx_timer_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(on_dur_timer_v1310_present, 1)); + HANDLE_CODE(bref.unpack(drx_retx_timer_v1310_present, 1)); + HANDLE_CODE(bref.unpack(drx_ul_retx_timer_r13_present, 1)); + + if (on_dur_timer_v1310_present) { + HANDLE_CODE(unpack_enum(on_dur_timer_v1310, bref)); + } + if (drx_retx_timer_v1310_present) { + HANDLE_CODE(unpack_enum(drx_retx_timer_v1310, bref)); + } + if (drx_ul_retx_timer_r13_present) { + HANDLE_CODE(unpack_enum(drx_ul_retx_timer_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void drx_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (on_dur_timer_v1310_present) { + j.write_str("onDurationTimer-v1310", on_dur_timer_v1310.to_string()); + } + if (drx_retx_timer_v1310_present) { + j.write_str("drx-RetransmissionTimer-v1310", drx_retx_timer_v1310.to_string()); + } + if (drx_ul_retx_timer_r13_present) { + j.write_str("drx-ULRetransmissionTimer-r13", drx_ul_retx_timer_r13.to_string()); + } + j.end_obj(); +} + +// DRX-Config-r15 ::= SEQUENCE +drx_cfg_r15_s::drx_cfg_r15_s() +{ + drx_retx_timer_short_tti_r15_present = false; + drx_ul_retx_timer_short_tti_r15_present = false; +} +SRSASN_CODE drx_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drx_retx_timer_short_tti_r15_present, 1)); + HANDLE_CODE(bref.pack(drx_ul_retx_timer_short_tti_r15_present, 1)); + + if (drx_retx_timer_short_tti_r15_present) { + HANDLE_CODE(pack_enum(bref, drx_retx_timer_short_tti_r15)); + } + if (drx_ul_retx_timer_short_tti_r15_present) { + HANDLE_CODE(pack_enum(bref, drx_ul_retx_timer_short_tti_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drx_retx_timer_short_tti_r15_present, 1)); + HANDLE_CODE(bref.unpack(drx_ul_retx_timer_short_tti_r15_present, 1)); + + if (drx_retx_timer_short_tti_r15_present) { + HANDLE_CODE(unpack_enum(drx_retx_timer_short_tti_r15, bref)); + } + if (drx_ul_retx_timer_short_tti_r15_present) { + HANDLE_CODE(unpack_enum(drx_ul_retx_timer_short_tti_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void drx_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drx_retx_timer_short_tti_r15_present) { + j.write_str("drx-RetransmissionTimerShortTTI-r15", drx_retx_timer_short_tti_r15.to_string()); + } + if (drx_ul_retx_timer_short_tti_r15_present) { + j.write_str("drx-UL-RetransmissionTimerShortTTI-r15", drx_ul_retx_timer_short_tti_r15.to_string()); + } + j.end_obj(); +} + +// DRX-Config-v1130 ::= SEQUENCE +drx_cfg_v1130_s::drx_cfg_v1130_s() +{ + drx_retx_timer_v1130_present = false; + long_drx_cycle_start_offset_v1130_present = false; + short_drx_cycle_v1130_present = false; +} +SRSASN_CODE drx_cfg_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drx_retx_timer_v1130_present, 1)); + HANDLE_CODE(bref.pack(long_drx_cycle_start_offset_v1130_present, 1)); + HANDLE_CODE(bref.pack(short_drx_cycle_v1130_present, 1)); + + if (long_drx_cycle_start_offset_v1130_present) { + HANDLE_CODE(long_drx_cycle_start_offset_v1130.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drx_retx_timer_v1130_present, 1)); + HANDLE_CODE(bref.unpack(long_drx_cycle_start_offset_v1130_present, 1)); + HANDLE_CODE(bref.unpack(short_drx_cycle_v1130_present, 1)); + + if (long_drx_cycle_start_offset_v1130_present) { + HANDLE_CODE(long_drx_cycle_start_offset_v1130.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void drx_cfg_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drx_retx_timer_v1130_present) { + j.write_str("drx-RetransmissionTimer-v1130", "psf0-v1130"); + } + if (long_drx_cycle_start_offset_v1130_present) { + j.write_fieldname("longDRX-CycleStartOffset-v1130"); + long_drx_cycle_start_offset_v1130.to_json(j); + } + if (short_drx_cycle_v1130_present) { + j.write_str("shortDRX-Cycle-v1130", "sf4-v1130"); + } + j.end_obj(); +} + +void drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::destroy_() {} +void drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::long_drx_cycle_start_offset_v1130_c_( + const drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf60_v1130: + c.init(other.c.get()); + break; + case types::sf70_v1130: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_"); + } +} +drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_& drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_:: + operator=(const drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf60_v1130: + c.set(other.c.get()); + break; + case types::sf70_v1130: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_"); + } + + return *this; +} +void drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf60_v1130: + j.write_int("sf60-v1130", c.get()); + break; + case types::sf70_v1130: + j.write_int("sf70-v1130", c.get()); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_"); + } + j.end_obj(); +} +SRSASN_CODE drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf60_v1130: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)59)); + break; + case types::sf70_v1130: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)69)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf60_v1130: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)59)); + break; + case types::sf70_v1130: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)69)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DRX-Config-v1310 ::= SEQUENCE +drx_cfg_v1310_s::drx_cfg_v1310_s() +{ + long_drx_cycle_start_offset_v1310_present = false; +} +SRSASN_CODE drx_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(long_drx_cycle_start_offset_v1310_present, 1)); + + if (long_drx_cycle_start_offset_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, long_drx_cycle_start_offset_v1310.sf60_v1310, (uint8_t)0, (uint8_t)59)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(long_drx_cycle_start_offset_v1310_present, 1)); + + if (long_drx_cycle_start_offset_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(long_drx_cycle_start_offset_v1310.sf60_v1310, bref, (uint8_t)0, (uint8_t)59)); + } + + return SRSASN_SUCCESS; +} +void drx_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (long_drx_cycle_start_offset_v1310_present) { + j.write_fieldname("longDRX-CycleStartOffset-v1310"); + j.start_obj(); + j.write_int("sf60-v1310", long_drx_cycle_start_offset_v1310.sf60_v1310); + j.end_obj(); + } + j.end_obj(); +} + +// EPDCCH-Config-r11 ::= SEQUENCE +SRSASN_CODE epdcch_cfg_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cfg_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_cfg_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(cfg_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void epdcch_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("config-r11"); + cfg_r11.to_json(j); + j.end_obj(); +} + +void epdcch_cfg_r11_s::cfg_r11_c_::set(types::options e) +{ + type_ = e; +} +void epdcch_cfg_r11_s::cfg_r11_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(); + if (c.sf_pattern_cfg_r11_present) { + j.write_fieldname("subframePatternConfig-r11"); + c.sf_pattern_cfg_r11.to_json(j); + } + if (c.start_symbol_r11_present) { + j.write_int("startSymbol-r11", c.start_symbol_r11); + } + if (c.set_cfg_to_release_list_r11_present) { + j.start_array("setConfigToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < c.set_cfg_to_release_list_r11.size(); ++i1) { + j.write_int(c.set_cfg_to_release_list_r11[i1]); + } + j.end_array(); + } + if (c.set_cfg_to_add_mod_list_r11_present) { + j.start_array("setConfigToAddModList-r11"); + for (uint32_t i1 = 0; i1 < c.set_cfg_to_add_mod_list_r11.size(); ++i1) { + c.set_cfg_to_add_mod_list_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "epdcch_cfg_r11_s::cfg_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE epdcch_cfg_r11_s::cfg_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.sf_pattern_cfg_r11_present, 1)); + HANDLE_CODE(bref.pack(c.start_symbol_r11_present, 1)); + HANDLE_CODE(bref.pack(c.set_cfg_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(c.set_cfg_to_add_mod_list_r11_present, 1)); + if (c.sf_pattern_cfg_r11_present) { + HANDLE_CODE(c.sf_pattern_cfg_r11.pack(bref)); + } + if (c.start_symbol_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.start_symbol_r11, (uint8_t)1, (uint8_t)4)); + } + if (c.set_cfg_to_release_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.set_cfg_to_release_list_r11, 1, 2, UnalignedIntegerPacker(0, 1))); + } + if (c.set_cfg_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.set_cfg_to_add_mod_list_r11, 1, 2)); + } + break; + default: + log_invalid_choice_id(type_, "epdcch_cfg_r11_s::cfg_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_cfg_r11_s::cfg_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.sf_pattern_cfg_r11_present, 1)); + HANDLE_CODE(bref.unpack(c.start_symbol_r11_present, 1)); + HANDLE_CODE(bref.unpack(c.set_cfg_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(c.set_cfg_to_add_mod_list_r11_present, 1)); + if (c.sf_pattern_cfg_r11_present) { + HANDLE_CODE(c.sf_pattern_cfg_r11.unpack(bref)); + } + if (c.start_symbol_r11_present) { + HANDLE_CODE(unpack_unalign_integer(c.start_symbol_r11, bref, (uint8_t)1, (uint8_t)4)); + } + if (c.set_cfg_to_release_list_r11_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.set_cfg_to_release_list_r11, bref, 1, 2, UnalignedIntegerPacker(0, 1))); + } + if (c.set_cfg_to_add_mod_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.set_cfg_to_add_mod_list_r11, bref, 1, 2)); + } + break; + default: + log_invalid_choice_id(type_, "epdcch_cfg_r11_s::cfg_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::setup_s_() +{ + sf_pattern_cfg_r11_present = false; + start_symbol_r11_present = false; + set_cfg_to_release_list_r11_present = false; + set_cfg_to_add_mod_list_r11_present = false; +} + +void epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_::set(types::options e) +{ + type_ = e; +} +void epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("subframePattern-r11"); + c.sf_pattern_r11.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.sf_pattern_r11.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.sf_pattern_r11.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "epdcch_cfg_r11_s::cfg_r11_c_::setup_s_::sf_pattern_cfg_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// FreqPriorityEUTRA ::= SEQUENCE +SRSASN_CODE freq_prio_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + + 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); + j.end_obj(); +} + +// FreqPriorityEUTRA-r12 ::= SEQUENCE +SRSASN_CODE freq_prio_eutra_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio_r12, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_eutra_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio_r12, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void freq_prio_eutra_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r12", carrier_freq_r12); + j.write_int("cellReselectionPriority-r12", cell_resel_prio_r12); + j.end_obj(); +} + +// FreqPriorityEUTRA-v1310 ::= SEQUENCE +freq_prio_eutra_v1310_s::freq_prio_eutra_v1310_s() +{ + cell_resel_sub_prio_r13_present = false; +} +SRSASN_CODE freq_prio_eutra_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_resel_sub_prio_r13_present, 1)); + + if (cell_resel_sub_prio_r13_present) { + HANDLE_CODE(pack_enum(bref, cell_resel_sub_prio_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_eutra_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_r13_present, 1)); + + if (cell_resel_sub_prio_r13_present) { + HANDLE_CODE(unpack_enum(cell_resel_sub_prio_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_eutra_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_resel_sub_prio_r13_present) { + j.write_str("cellReselectionSubPriority-r13", cell_resel_sub_prio_r13.to_string()); + } + j.end_obj(); +} + +// FreqPriorityNR-r15 ::= SEQUENCE +freq_prio_nr_r15_s::freq_prio_nr_r15_s() +{ + cell_resel_sub_prio_r15_present = false; +} +SRSASN_CODE freq_prio_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_resel_sub_prio_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio_r15, (uint8_t)0, (uint8_t)7)); + if (cell_resel_sub_prio_r15_present) { + HANDLE_CODE(pack_enum(bref, cell_resel_sub_prio_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio_r15, bref, (uint8_t)0, (uint8_t)7)); + if (cell_resel_sub_prio_r15_present) { + HANDLE_CODE(unpack_enum(cell_resel_sub_prio_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + j.write_int("cellReselectionPriority-r15", cell_resel_prio_r15); + if (cell_resel_sub_prio_r15_present) { + j.write_str("cellReselectionSubPriority-r15", cell_resel_sub_prio_r15.to_string()); + } + j.end_obj(); +} + +// FreqPriorityUTRA-FDD ::= SEQUENCE +SRSASN_CODE freq_prio_utra_fdd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_utra_fdd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void freq_prio_utra_fdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + j.write_int("cellReselectionPriority", cell_resel_prio); + j.end_obj(); +} + +// FreqPriorityUTRA-TDD ::= SEQUENCE +SRSASN_CODE freq_prio_utra_tdd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_utra_tdd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void freq_prio_utra_tdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + j.write_int("cellReselectionPriority", cell_resel_prio); + j.end_obj(); +} + +// FreqsPriorityGERAN ::= SEQUENCE +SRSASN_CODE freqs_prio_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(carrier_freqs.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_prio, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freqs_prio_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(carrier_freqs.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_prio, bref, (uint8_t)0, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void freqs_prio_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("carrierFreqs"); + carrier_freqs.to_json(j); + j.write_int("cellReselectionPriority", cell_resel_prio); + j.end_obj(); +} + +// PDCCH-CandidateReductions-r13 ::= CHOICE +void pdcch_candidate_reductions_r13_c::set(types::options e) +{ + type_ = e; +} +void pdcch_candidate_reductions_r13_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("pdcch-candidateReductionAL1-r13", c.pdcch_candidate_reduction_al1_r13.to_string()); + j.write_str("pdcch-candidateReductionAL2-r13", c.pdcch_candidate_reduction_al2_r13.to_string()); + j.write_str("pdcch-candidateReductionAL3-r13", c.pdcch_candidate_reduction_al3_r13.to_string()); + j.write_str("pdcch-candidateReductionAL4-r13", c.pdcch_candidate_reduction_al4_r13.to_string()); + j.write_str("pdcch-candidateReductionAL5-r13", c.pdcch_candidate_reduction_al5_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcch_candidate_reductions_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE pdcch_candidate_reductions_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al1_r13)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al2_r13)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al3_r13)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al4_r13)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al5_r13)); + break; + default: + log_invalid_choice_id(type_, "pdcch_candidate_reductions_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_candidate_reductions_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al1_r13, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al2_r13, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al3_r13, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al4_r13, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al5_r13, bref)); + break; + default: + log_invalid_choice_id(type_, "pdcch_candidate_reductions_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PDSCH-ConfigDedicated ::= SEQUENCE +SRSASN_CODE pdsch_cfg_ded_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, p_a)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(p_a, bref)); + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("p-a", p_a.to_string()); + j.end_obj(); +} + +// PDSCH-ConfigDedicated-v1130 ::= SEQUENCE +pdsch_cfg_ded_v1130_s::pdsch_cfg_ded_v1130_s() +{ + dmrs_cfg_pdsch_r11_present = false; + qcl_operation_present = false; + re_map_qcl_cfg_to_release_list_r11_present = false; + re_map_qcl_cfg_to_add_mod_list_r11_present = false; +} +SRSASN_CODE pdsch_cfg_ded_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dmrs_cfg_pdsch_r11_present, 1)); + HANDLE_CODE(bref.pack(qcl_operation_present, 1)); + HANDLE_CODE(bref.pack(re_map_qcl_cfg_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(re_map_qcl_cfg_to_add_mod_list_r11_present, 1)); + + if (dmrs_cfg_pdsch_r11_present) { + HANDLE_CODE(dmrs_cfg_pdsch_r11.pack(bref)); + } + if (qcl_operation_present) { + HANDLE_CODE(pack_enum(bref, qcl_operation)); + } + if (re_map_qcl_cfg_to_release_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, re_map_qcl_cfg_to_release_list_r11, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (re_map_qcl_cfg_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, re_map_qcl_cfg_to_add_mod_list_r11, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dmrs_cfg_pdsch_r11_present, 1)); + HANDLE_CODE(bref.unpack(qcl_operation_present, 1)); + HANDLE_CODE(bref.unpack(re_map_qcl_cfg_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(re_map_qcl_cfg_to_add_mod_list_r11_present, 1)); + + if (dmrs_cfg_pdsch_r11_present) { + HANDLE_CODE(dmrs_cfg_pdsch_r11.unpack(bref)); + } + if (qcl_operation_present) { + HANDLE_CODE(unpack_enum(qcl_operation, bref)); + } + if (re_map_qcl_cfg_to_release_list_r11_present) { + HANDLE_CODE( + unpack_dyn_seq_of(re_map_qcl_cfg_to_release_list_r11, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (re_map_qcl_cfg_to_add_mod_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(re_map_qcl_cfg_to_add_mod_list_r11, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dmrs_cfg_pdsch_r11_present) { + j.write_fieldname("dmrs-ConfigPDSCH-r11"); + dmrs_cfg_pdsch_r11.to_json(j); + } + if (qcl_operation_present) { + j.write_str("qcl-Operation", qcl_operation.to_string()); + } + if (re_map_qcl_cfg_to_release_list_r11_present) { + j.start_array("re-MappingQCLConfigToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < re_map_qcl_cfg_to_release_list_r11.size(); ++i1) { + j.write_int(re_map_qcl_cfg_to_release_list_r11[i1]); + } + j.end_array(); + } + if (re_map_qcl_cfg_to_add_mod_list_r11_present) { + j.start_array("re-MappingQCLConfigToAddModList-r11"); + for (uint32_t i1 = 0; i1 < re_map_qcl_cfg_to_add_mod_list_r11.size(); ++i1) { + re_map_qcl_cfg_to_add_mod_list_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// PDSCH-ConfigDedicated-v1280 ::= SEQUENCE +pdsch_cfg_ded_v1280_s::pdsch_cfg_ded_v1280_s() +{ + tbs_idx_alt_r12_present = false; +} +SRSASN_CODE pdsch_cfg_ded_v1280_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tbs_idx_alt_r12_present, 1)); + + if (tbs_idx_alt_r12_present) { + HANDLE_CODE(pack_enum(bref, tbs_idx_alt_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_v1280_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tbs_idx_alt_r12_present, 1)); + + if (tbs_idx_alt_r12_present) { + HANDLE_CODE(unpack_enum(tbs_idx_alt_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_v1280_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tbs_idx_alt_r12_present) { + j.write_str("tbsIndexAlt-r12", tbs_idx_alt_r12.to_string()); + } + j.end_obj(); +} + +// PDSCH-ConfigDedicated-v1310 ::= SEQUENCE +pdsch_cfg_ded_v1310_s::pdsch_cfg_ded_v1310_s() +{ + dmrs_cfg_pdsch_v1310_present = false; +} +SRSASN_CODE pdsch_cfg_ded_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dmrs_cfg_pdsch_v1310_present, 1)); + + if (dmrs_cfg_pdsch_v1310_present) { + HANDLE_CODE(dmrs_cfg_pdsch_v1310.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dmrs_cfg_pdsch_v1310_present, 1)); + + if (dmrs_cfg_pdsch_v1310_present) { + HANDLE_CODE(dmrs_cfg_pdsch_v1310.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dmrs_cfg_pdsch_v1310_present) { + j.write_fieldname("dmrs-ConfigPDSCH-v1310"); + dmrs_cfg_pdsch_v1310.to_json(j); + } + j.end_obj(); +} + +// PDSCH-ConfigDedicated-v1430 ::= SEQUENCE +pdsch_cfg_ded_v1430_s::pdsch_cfg_ded_v1430_s() +{ + ce_pdsch_max_bw_r14_present = false; + ce_pdsch_ten_processes_r14_present = false; + ce_harq_ack_bundling_r14_present = false; + ce_sched_enhancement_r14_present = false; + tbs_idx_alt2_r14_present = false; +} +SRSASN_CODE pdsch_cfg_ded_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_pdsch_max_bw_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_ten_processes_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_harq_ack_bundling_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_sched_enhancement_r14_present, 1)); + HANDLE_CODE(bref.pack(tbs_idx_alt2_r14_present, 1)); + + if (ce_pdsch_max_bw_r14_present) { + HANDLE_CODE(pack_enum(bref, ce_pdsch_max_bw_r14)); + } + if (ce_sched_enhancement_r14_present) { + HANDLE_CODE(pack_enum(bref, ce_sched_enhancement_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_pdsch_max_bw_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_ten_processes_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_harq_ack_bundling_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_sched_enhancement_r14_present, 1)); + HANDLE_CODE(bref.unpack(tbs_idx_alt2_r14_present, 1)); + + if (ce_pdsch_max_bw_r14_present) { + HANDLE_CODE(unpack_enum(ce_pdsch_max_bw_r14, bref)); + } + if (ce_sched_enhancement_r14_present) { + HANDLE_CODE(unpack_enum(ce_sched_enhancement_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_pdsch_max_bw_r14_present) { + j.write_str("ce-PDSCH-MaxBandwidth-r14", ce_pdsch_max_bw_r14.to_string()); + } + if (ce_pdsch_ten_processes_r14_present) { + j.write_str("ce-PDSCH-TenProcesses-r14", "on"); + } + if (ce_harq_ack_bundling_r14_present) { + j.write_str("ce-HARQ-AckBundling-r14", "on"); + } + if (ce_sched_enhancement_r14_present) { + j.write_str("ce-SchedulingEnhancement-r14", ce_sched_enhancement_r14.to_string()); + } + if (tbs_idx_alt2_r14_present) { + j.write_str("tbsIndexAlt2-r14", "b33"); + } + j.end_obj(); +} + +// PDSCH-ConfigDedicated-v1530 ::= SEQUENCE +pdsch_cfg_ded_v1530_s::pdsch_cfg_ded_v1530_s() +{ + qcl_operation_v1530_present = false; + tbs_idx_alt3_r15_present = false; + ce_cqi_alternative_table_cfg_r15_present = false; + ce_pdsch_minus64_qam_cfg_r15_present = false; + ce_pdsch_flex_start_prb_alloc_cfg_r15_present = false; + alt_mcs_table_scaling_cfg_r15_present = false; +} +SRSASN_CODE pdsch_cfg_ded_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(qcl_operation_v1530_present, 1)); + HANDLE_CODE(bref.pack(tbs_idx_alt3_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_cqi_alternative_table_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_minus64_qam_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_flex_start_prb_alloc_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(alt_mcs_table_scaling_cfg_r15_present, 1)); + + if (alt_mcs_table_scaling_cfg_r15_present) { + HANDLE_CODE(pack_enum(bref, alt_mcs_table_scaling_cfg_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(qcl_operation_v1530_present, 1)); + HANDLE_CODE(bref.unpack(tbs_idx_alt3_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_cqi_alternative_table_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_minus64_qam_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_flex_start_prb_alloc_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(alt_mcs_table_scaling_cfg_r15_present, 1)); + + if (alt_mcs_table_scaling_cfg_r15_present) { + HANDLE_CODE(unpack_enum(alt_mcs_table_scaling_cfg_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (qcl_operation_v1530_present) { + j.write_str("qcl-Operation-v1530", "typeC"); + } + if (tbs_idx_alt3_r15_present) { + j.write_str("tbs-IndexAlt3-r15", "a37"); + } + if (ce_cqi_alternative_table_cfg_r15_present) { + j.write_str("ce-CQI-AlternativeTableConfig-r15", "on"); + } + if (ce_pdsch_minus64_qam_cfg_r15_present) { + j.write_str("ce-PDSCH-64QAM-Config-r15", "on"); + } + if (ce_pdsch_flex_start_prb_alloc_cfg_r15_present) { + j.write_str("ce-PDSCH-FlexibleStartPRB-AllocConfig-r15", "on"); + } + if (alt_mcs_table_scaling_cfg_r15_present) { + j.write_str("altMCS-TableScalingConfig-r15", alt_mcs_table_scaling_cfg_r15.to_string()); + } + j.end_obj(); +} + +// PUCCH-ConfigDedicated ::= SEQUENCE +pucch_cfg_ded_s::pucch_cfg_ded_s() +{ + tdd_ack_nack_feedback_mode_present = false; +} +SRSASN_CODE pucch_cfg_ded_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tdd_ack_nack_feedback_mode_present, 1)); + + HANDLE_CODE(ack_nack_repeat.pack(bref)); + if (tdd_ack_nack_feedback_mode_present) { + HANDLE_CODE(pack_enum(bref, tdd_ack_nack_feedback_mode)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tdd_ack_nack_feedback_mode_present, 1)); + + HANDLE_CODE(ack_nack_repeat.unpack(bref)); + if (tdd_ack_nack_feedback_mode_present) { + HANDLE_CODE(unpack_enum(tdd_ack_nack_feedback_mode, bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ackNackRepetition"); + ack_nack_repeat.to_json(j); + if (tdd_ack_nack_feedback_mode_present) { + j.write_str("tdd-AckNackFeedbackMode", tdd_ack_nack_feedback_mode.to_string()); + } + j.end_obj(); +} + +void pucch_cfg_ded_s::ack_nack_repeat_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_s::ack_nack_repeat_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("repetitionFactor", c.repeat_factor.to_string()); + j.write_int("n1PUCCH-AN-Rep", c.n1_pucch_an_rep); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_s::ack_nack_repeat_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_s::ack_nack_repeat_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.repeat_factor)); + HANDLE_CODE(pack_unalign_integer(bref, c.n1_pucch_an_rep, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_s::ack_nack_repeat_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_s::ack_nack_repeat_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.repeat_factor, bref)); + HANDLE_CODE(unpack_unalign_integer(c.n1_pucch_an_rep, bref, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_s::ack_nack_repeat_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUCCH-ConfigDedicated-r13 ::= SEQUENCE +pucch_cfg_ded_r13_s::pucch_cfg_ded_r13_s() +{ + tdd_ack_nack_feedback_mode_r13_present = false; + pucch_format_r13_present = false; + two_ant_port_activ_pucch_format1a1b_r13_present = false; + simul_pucch_pusch_r13_present = false; + n1_pucch_an_rep_p1_r13_present = false; + n_pucch_param_r13_present = false; + nka_pucch_param_r13_present = false; + codebooksize_determination_r13_present = false; + maximum_payload_coderate_r13_present = false; + pucch_num_repeat_ce_r13_present = false; +} +SRSASN_CODE pucch_cfg_ded_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tdd_ack_nack_feedback_mode_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_format_r13_present, 1)); + HANDLE_CODE(bref.pack(two_ant_port_activ_pucch_format1a1b_r13_present, 1)); + HANDLE_CODE(bref.pack(simul_pucch_pusch_r13_present, 1)); + HANDLE_CODE(bref.pack(n1_pucch_an_rep_p1_r13_present, 1)); + HANDLE_CODE(bref.pack(n_pucch_param_r13_present, 1)); + HANDLE_CODE(bref.pack(nka_pucch_param_r13_present, 1)); + HANDLE_CODE(bref.pack(codebooksize_determination_r13_present, 1)); + HANDLE_CODE(bref.pack(maximum_payload_coderate_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_r13_present, 1)); + + HANDLE_CODE(ack_nack_repeat_r13.pack(bref)); + if (tdd_ack_nack_feedback_mode_r13_present) { + HANDLE_CODE(pack_enum(bref, tdd_ack_nack_feedback_mode_r13)); + } + if (pucch_format_r13_present) { + HANDLE_CODE(pucch_format_r13.pack(bref)); + } + if (n1_pucch_an_rep_p1_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, n1_pucch_an_rep_p1_r13, (uint16_t)0, (uint16_t)2047)); + } + if (n_pucch_param_r13_present) { + HANDLE_CODE(n_pucch_param_r13.pack(bref)); + } + if (nka_pucch_param_r13_present) { + HANDLE_CODE(nka_pucch_param_r13.pack(bref)); + } + HANDLE_CODE(bref.pack(spatial_bundling_pucch_r13, 1)); + HANDLE_CODE(bref.pack(spatial_bundling_pusch_r13, 1)); + HANDLE_CODE(bref.pack(harq_timing_tdd_r13, 1)); + if (codebooksize_determination_r13_present) { + HANDLE_CODE(pack_enum(bref, codebooksize_determination_r13)); + } + if (maximum_payload_coderate_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, maximum_payload_coderate_r13, (uint8_t)0, (uint8_t)7)); + } + if (pucch_num_repeat_ce_r13_present) { + HANDLE_CODE(pucch_num_repeat_ce_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tdd_ack_nack_feedback_mode_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_format_r13_present, 1)); + HANDLE_CODE(bref.unpack(two_ant_port_activ_pucch_format1a1b_r13_present, 1)); + HANDLE_CODE(bref.unpack(simul_pucch_pusch_r13_present, 1)); + HANDLE_CODE(bref.unpack(n1_pucch_an_rep_p1_r13_present, 1)); + HANDLE_CODE(bref.unpack(n_pucch_param_r13_present, 1)); + HANDLE_CODE(bref.unpack(nka_pucch_param_r13_present, 1)); + HANDLE_CODE(bref.unpack(codebooksize_determination_r13_present, 1)); + HANDLE_CODE(bref.unpack(maximum_payload_coderate_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_r13_present, 1)); + + HANDLE_CODE(ack_nack_repeat_r13.unpack(bref)); + if (tdd_ack_nack_feedback_mode_r13_present) { + HANDLE_CODE(unpack_enum(tdd_ack_nack_feedback_mode_r13, bref)); + } + if (pucch_format_r13_present) { + HANDLE_CODE(pucch_format_r13.unpack(bref)); + } + if (n1_pucch_an_rep_p1_r13_present) { + HANDLE_CODE(unpack_unalign_integer(n1_pucch_an_rep_p1_r13, bref, (uint16_t)0, (uint16_t)2047)); + } + if (n_pucch_param_r13_present) { + HANDLE_CODE(n_pucch_param_r13.unpack(bref)); + } + if (nka_pucch_param_r13_present) { + HANDLE_CODE(nka_pucch_param_r13.unpack(bref)); + } + HANDLE_CODE(bref.unpack(spatial_bundling_pucch_r13, 1)); + HANDLE_CODE(bref.unpack(spatial_bundling_pusch_r13, 1)); + HANDLE_CODE(bref.unpack(harq_timing_tdd_r13, 1)); + if (codebooksize_determination_r13_present) { + HANDLE_CODE(unpack_enum(codebooksize_determination_r13, bref)); + } + if (maximum_payload_coderate_r13_present) { + HANDLE_CODE(unpack_unalign_integer(maximum_payload_coderate_r13, bref, (uint8_t)0, (uint8_t)7)); + } + if (pucch_num_repeat_ce_r13_present) { + HANDLE_CODE(pucch_num_repeat_ce_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ackNackRepetition-r13"); + ack_nack_repeat_r13.to_json(j); + if (tdd_ack_nack_feedback_mode_r13_present) { + j.write_str("tdd-AckNackFeedbackMode-r13", tdd_ack_nack_feedback_mode_r13.to_string()); + } + if (pucch_format_r13_present) { + j.write_fieldname("pucch-Format-r13"); + pucch_format_r13.to_json(j); + } + if (two_ant_port_activ_pucch_format1a1b_r13_present) { + j.write_str("twoAntennaPortActivatedPUCCH-Format1a1b-r13", "true"); + } + if (simul_pucch_pusch_r13_present) { + j.write_str("simultaneousPUCCH-PUSCH-r13", "true"); + } + if (n1_pucch_an_rep_p1_r13_present) { + j.write_int("n1PUCCH-AN-RepP1-r13", n1_pucch_an_rep_p1_r13); + } + if (n_pucch_param_r13_present) { + j.write_fieldname("nPUCCH-Param-r13"); + n_pucch_param_r13.to_json(j); + } + if (nka_pucch_param_r13_present) { + j.write_fieldname("nkaPUCCH-Param-r13"); + nka_pucch_param_r13.to_json(j); + } + j.write_bool("spatialBundlingPUCCH-r13", spatial_bundling_pucch_r13); + j.write_bool("spatialBundlingPUSCH-r13", spatial_bundling_pusch_r13); + j.write_bool("harq-TimingTDD-r13", harq_timing_tdd_r13); + if (codebooksize_determination_r13_present) { + j.write_str("codebooksizeDetermination-r13", codebooksize_determination_r13.to_string()); + } + if (maximum_payload_coderate_r13_present) { + j.write_int("maximumPayloadCoderate-r13", maximum_payload_coderate_r13); + } + if (pucch_num_repeat_ce_r13_present) { + j.write_fieldname("pucch-NumRepetitionCE-r13"); + pucch_num_repeat_ce_r13.to_json(j); + } + j.end_obj(); +} + +void pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_r13_s::ack_nack_repeat_r13_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("repetitionFactor-r13", c.repeat_factor_r13.to_string()); + j.write_int("n1PUCCH-AN-Rep-r13", c.n1_pucch_an_rep_r13); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.repeat_factor_r13)); + HANDLE_CODE(pack_unalign_integer(bref, c.n1_pucch_an_rep_r13, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.repeat_factor_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(c.n1_pucch_an_rep_r13, bref, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::destroy_() +{ + switch (type_) { + case types::format3_r13: + c.destroy(); + break; + case types::ch_sel_r13: + c.destroy(); + break; + case types::format4_r13: + c.destroy(); + break; + case types::format5_r13: + c.destroy(); + break; + default: + break; + } +} +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::format3_r13: + c.init(); + break; + case types::ch_sel_r13: + c.init(); + break; + case types::format4_r13: + c.init(); + break; + case types::format5_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_"); + } +} +pucch_cfg_ded_r13_s::pucch_format_r13_c_::pucch_format_r13_c_(const pucch_cfg_ded_r13_s::pucch_format_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::format3_r13: + c.init(other.c.get()); + break; + case types::ch_sel_r13: + c.init(other.c.get()); + break; + case types::format4_r13: + c.init(other.c.get()); + break; + case types::format5_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_"); + } +} +pucch_cfg_ded_r13_s::pucch_format_r13_c_& pucch_cfg_ded_r13_s::pucch_format_r13_c_:: + operator=(const pucch_cfg_ded_r13_s::pucch_format_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::format3_r13: + c.set(other.c.get()); + break; + case types::ch_sel_r13: + c.set(other.c.get()); + break; + case types::format4_r13: + c.set(other.c.get()); + break; + case types::format5_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_"); + } + + return *this; +} +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::format3_r13: + j.write_fieldname("format3-r13"); + j.start_obj(); + if (c.get().n3_pucch_an_list_r13_present) { + j.start_array("n3PUCCH-AN-List-r13"); + for (uint32_t i1 = 0; i1 < c.get().n3_pucch_an_list_r13.size(); ++i1) { + j.write_int(c.get().n3_pucch_an_list_r13[i1]); + } + j.end_array(); + } + if (c.get().two_ant_port_activ_pucch_format3_r13_present) { + j.write_fieldname("twoAntennaPortActivatedPUCCH-Format3-r13"); + c.get().two_ant_port_activ_pucch_format3_r13.to_json(j); + } + j.end_obj(); + break; + case types::ch_sel_r13: + j.write_fieldname("channelSelection-r13"); + j.start_obj(); + if (c.get().n1_pucch_an_cs_r13_present) { + j.write_fieldname("n1PUCCH-AN-CS-r13"); + c.get().n1_pucch_an_cs_r13.to_json(j); + } + j.end_obj(); + break; + case types::format4_r13: + j.write_fieldname("format4-r13"); + j.start_obj(); + j.start_array("format4-resourceConfiguration-r13"); + for (uint32_t i1 = 0; i1 < c.get().format4_res_cfg_r13.size(); ++i1) { + c.get().format4_res_cfg_r13[i1].to_json(j); + } + j.end_array(); + if (c.get().format4_multi_csi_res_cfg_r13_present) { + j.start_array("format4-MultiCSI-resourceConfiguration-r13"); + for (uint32_t i1 = 0; i1 < c.get().format4_multi_csi_res_cfg_r13.size(); ++i1) { + c.get().format4_multi_csi_res_cfg_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + case types::format5_r13: + j.write_fieldname("format5-r13"); + j.start_obj(); + j.start_array("format5-resourceConfiguration-r13"); + for (uint32_t i1 = 0; i1 < c.get().format5_res_cfg_r13.size(); ++i1) { + c.get().format5_res_cfg_r13[i1].to_json(j); + } + j.end_array(); + if (c.get().format5_multi_csi_res_cfg_r13_present) { + j.write_fieldname("format5-MultiCSI-resourceConfiguration-r13"); + c.get().format5_multi_csi_res_cfg_r13.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_format_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::format3_r13: + HANDLE_CODE(bref.pack(c.get().n3_pucch_an_list_r13_present, 1)); + HANDLE_CODE(bref.pack(c.get().two_ant_port_activ_pucch_format3_r13_present, 1)); + if (c.get().n3_pucch_an_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().n3_pucch_an_list_r13, 1, 4, + UnalignedIntegerPacker(0, 549))); + } + if (c.get().two_ant_port_activ_pucch_format3_r13_present) { + HANDLE_CODE(c.get().two_ant_port_activ_pucch_format3_r13.pack(bref)); + } + break; + case types::ch_sel_r13: + HANDLE_CODE(bref.pack(c.get().n1_pucch_an_cs_r13_present, 1)); + if (c.get().n1_pucch_an_cs_r13_present) { + HANDLE_CODE(c.get().n1_pucch_an_cs_r13.pack(bref)); + } + break; + case types::format4_r13: + HANDLE_CODE(bref.pack(c.get().format4_multi_csi_res_cfg_r13_present, 1)); + HANDLE_CODE(pack_fixed_seq_of(bref, &(c.get().format4_res_cfg_r13)[0], + c.get().format4_res_cfg_r13.size())); + if (c.get().format4_multi_csi_res_cfg_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().format4_multi_csi_res_cfg_r13, 1, 2)); + } + break; + case types::format5_r13: + HANDLE_CODE(bref.pack(c.get().format5_multi_csi_res_cfg_r13_present, 1)); + HANDLE_CODE(pack_fixed_seq_of(bref, &(c.get().format5_res_cfg_r13)[0], + c.get().format5_res_cfg_r13.size())); + if (c.get().format5_multi_csi_res_cfg_r13_present) { + HANDLE_CODE(c.get().format5_multi_csi_res_cfg_r13.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_format_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::format3_r13: + HANDLE_CODE(bref.unpack(c.get().n3_pucch_an_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.get().two_ant_port_activ_pucch_format3_r13_present, 1)); + if (c.get().n3_pucch_an_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().n3_pucch_an_list_r13, bref, 1, 4, + UnalignedIntegerPacker(0, 549))); + } + if (c.get().two_ant_port_activ_pucch_format3_r13_present) { + HANDLE_CODE(c.get().two_ant_port_activ_pucch_format3_r13.unpack(bref)); + } + break; + case types::ch_sel_r13: + HANDLE_CODE(bref.unpack(c.get().n1_pucch_an_cs_r13_present, 1)); + if (c.get().n1_pucch_an_cs_r13_present) { + HANDLE_CODE(c.get().n1_pucch_an_cs_r13.unpack(bref)); + } + break; + case types::format4_r13: + HANDLE_CODE(bref.unpack(c.get().format4_multi_csi_res_cfg_r13_present, 1)); + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().format4_res_cfg_r13)[0], bref, + c.get().format4_res_cfg_r13.size())); + if (c.get().format4_multi_csi_res_cfg_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().format4_multi_csi_res_cfg_r13, bref, 1, 2)); + } + break; + case types::format5_r13: + HANDLE_CODE(bref.unpack(c.get().format5_multi_csi_res_cfg_r13_present, 1)); + HANDLE_CODE(unpack_fixed_seq_of(&(c.get().format5_res_cfg_r13)[0], bref, + c.get().format5_res_cfg_r13.size())); + if (c.get().format5_multi_csi_res_cfg_r13_present) { + HANDLE_CODE(c.get().format5_multi_csi_res_cfg_r13.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::format3_r13_s_() +{ + n3_pucch_an_list_r13_present = false; + two_ant_port_activ_pucch_format3_r13_present = false; +} + +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_c_::set( + types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_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.start_array("n3PUCCH-AN-ListP1-r13"); + for (uint32_t i1 = 0; i1 < c.n3_pucch_an_list_p1_r13.size(); ++i1) { + j.write_int(c.n3_pucch_an_list_p1_r13[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id( + type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_c_::pack( + bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.n3_pucch_an_list_p1_r13, 1, 4, UnalignedIntegerPacker(0, 549))); + break; + default: + log_invalid_choice_id( + type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.n3_pucch_an_list_p1_r13, bref, 1, 4, UnalignedIntegerPacker(0, 549))); + break; + default: + log_invalid_choice_id( + type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_activ_pucch_format3_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::ch_sel_r13_s_() +{ + n1_pucch_an_cs_r13_present = false; +} + +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_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.start_array("n1PUCCH-AN-CS-List-r13"); + for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_r13.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < c.n1_pucch_an_cs_list_r13[i1].size(); ++i2) { + j.write_int(c.n1_pucch_an_cs_list_r13[i1][i2]); + } + j.end_array(); + } + j.end_array(); + j.start_array("n1PUCCH-AN-CS-ListP1-r13"); + for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_p1_r13.size(); ++i1) { + j.write_int(c.n1_pucch_an_cs_list_p1_r13[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of( + bref, c.n1_pucch_an_cs_list_r13, 1, 2, + SeqOfPacker >(1, 4, UnalignedIntegerPacker(0, 2047)))); + HANDLE_CODE(pack_dyn_seq_of(bref, c.n1_pucch_an_cs_list_p1_r13, 2, 4, UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of( + c.n1_pucch_an_cs_list_r13, bref, 1, 2, + SeqOfPacker >(1, 4, UnalignedIntegerPacker(0, 2047)))); + HANDLE_CODE( + unpack_dyn_seq_of(c.n1_pucch_an_cs_list_p1_r13, bref, 2, 4, UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pucch_cfg_ded_r13_s::pucch_format_r13_c_::format4_r13_s_::format4_r13_s_() +{ + format4_multi_csi_res_cfg_r13_present = false; +} + +pucch_cfg_ded_r13_s::pucch_format_r13_c_::format5_r13_s_::format5_r13_s_() +{ + format5_multi_csi_res_cfg_r13_present = false; +} + +void pucch_cfg_ded_r13_s::n_pucch_param_r13_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_r13_s::n_pucch_param_r13_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_int("nPUCCH-Identity-r13", c.n_pucch_id_r13); + j.write_int("n1PUCCH-AN-r13", c.n1_pucch_an_r13); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::n_pucch_param_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::n_pucch_param_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.n_pucch_id_r13, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, c.n1_pucch_an_r13, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::n_pucch_param_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::n_pucch_param_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.n_pucch_id_r13, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(c.n1_pucch_an_r13, bref, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::n_pucch_param_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pucch_cfg_ded_r13_s::nka_pucch_param_r13_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_r13_s::nka_pucch_param_r13_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_int("nkaPUCCH-AN-r13", c.nka_pucch_an_r13); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::nka_pucch_param_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::nka_pucch_param_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.nka_pucch_an_r13, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::nka_pucch_param_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::nka_pucch_param_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.nka_pucch_an_r13, bref, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::nka_pucch_param_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::mode_a: + c.destroy(); + break; + case types::mode_b: + c.destroy(); + break; + default: + break; + } +} +void pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::mode_a: + c.init(); + break; + case types::mode_b: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_"); + } +} +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::setup_c_( + const pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::mode_a: + c.init(other.c.get()); + break; + case types::mode_b: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_"); + } +} +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_& pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_:: + operator=(const pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::mode_a: + c.set(other.c.get()); + break; + case types::mode_b: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_"); + } + + return *this; +} +void pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mode_a: + j.write_fieldname("modeA"); + j.start_obj(); + j.write_str("pucch-NumRepetitionCE-format1-r13", c.get().pucch_num_repeat_ce_format1_r13.to_string()); + j.write_str("pucch-NumRepetitionCE-format2-r13", c.get().pucch_num_repeat_ce_format2_r13.to_string()); + j.end_obj(); + break; + case types::mode_b: + j.write_fieldname("modeB"); + j.start_obj(); + j.write_str("pucch-NumRepetitionCE-format1-r13", c.get().pucch_num_repeat_ce_format1_r13.to_string()); + j.write_str("pucch-NumRepetitionCE-format2-r13", c.get().pucch_num_repeat_ce_format2_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::mode_a: + HANDLE_CODE(pack_enum(bref, c.get().pucch_num_repeat_ce_format1_r13)); + HANDLE_CODE(pack_enum(bref, c.get().pucch_num_repeat_ce_format2_r13)); + break; + case types::mode_b: + HANDLE_CODE(pack_enum(bref, c.get().pucch_num_repeat_ce_format1_r13)); + HANDLE_CODE(pack_enum(bref, c.get().pucch_num_repeat_ce_format2_r13)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::mode_a: + HANDLE_CODE(unpack_enum(c.get().pucch_num_repeat_ce_format1_r13, bref)); + HANDLE_CODE(unpack_enum(c.get().pucch_num_repeat_ce_format2_r13, bref)); + break; + case types::mode_b: + HANDLE_CODE(unpack_enum(c.get().pucch_num_repeat_ce_format1_r13, bref)); + HANDLE_CODE(unpack_enum(c.get().pucch_num_repeat_ce_format2_r13, bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUCCH-ConfigDedicated-v1020 ::= SEQUENCE +pucch_cfg_ded_v1020_s::pucch_cfg_ded_v1020_s() +{ + pucch_format_r10_present = false; + two_ant_port_activ_pucch_format1a1b_r10_present = false; + simul_pucch_pusch_r10_present = false; + n1_pucch_an_rep_p1_r10_present = false; +} +SRSASN_CODE pucch_cfg_ded_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pucch_format_r10_present, 1)); + HANDLE_CODE(bref.pack(two_ant_port_activ_pucch_format1a1b_r10_present, 1)); + HANDLE_CODE(bref.pack(simul_pucch_pusch_r10_present, 1)); + HANDLE_CODE(bref.pack(n1_pucch_an_rep_p1_r10_present, 1)); + + if (pucch_format_r10_present) { + HANDLE_CODE(pucch_format_r10.pack(bref)); + } + if (n1_pucch_an_rep_p1_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, n1_pucch_an_rep_p1_r10, (uint16_t)0, (uint16_t)2047)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pucch_format_r10_present, 1)); + HANDLE_CODE(bref.unpack(two_ant_port_activ_pucch_format1a1b_r10_present, 1)); + HANDLE_CODE(bref.unpack(simul_pucch_pusch_r10_present, 1)); + HANDLE_CODE(bref.unpack(n1_pucch_an_rep_p1_r10_present, 1)); + + if (pucch_format_r10_present) { + HANDLE_CODE(pucch_format_r10.unpack(bref)); + } + if (n1_pucch_an_rep_p1_r10_present) { + HANDLE_CODE(unpack_unalign_integer(n1_pucch_an_rep_p1_r10, bref, (uint16_t)0, (uint16_t)2047)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_format_r10_present) { + j.write_fieldname("pucch-Format-r10"); + pucch_format_r10.to_json(j); + } + if (two_ant_port_activ_pucch_format1a1b_r10_present) { + j.write_str("twoAntennaPortActivatedPUCCH-Format1a1b-r10", "true"); + } + if (simul_pucch_pusch_r10_present) { + j.write_str("simultaneousPUCCH-PUSCH-r10", "true"); + } + if (n1_pucch_an_rep_p1_r10_present) { + j.write_int("n1PUCCH-AN-RepP1-r10", n1_pucch_an_rep_p1_r10); + } + j.end_obj(); +} + +void pucch_cfg_ded_v1020_s::pucch_format_r10_c_::destroy_() +{ + switch (type_) { + case types::format3_r10: + c.destroy(); + break; + case types::ch_sel_r10: + c.destroy(); + break; + default: + break; + } +} +void pucch_cfg_ded_v1020_s::pucch_format_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::format3_r10: + c.init(); + break; + case types::ch_sel_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_"); + } +} +pucch_cfg_ded_v1020_s::pucch_format_r10_c_::pucch_format_r10_c_(const pucch_cfg_ded_v1020_s::pucch_format_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::format3_r10: + c.init(other.c.get()); + break; + case types::ch_sel_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_"); + } +} +pucch_cfg_ded_v1020_s::pucch_format_r10_c_& pucch_cfg_ded_v1020_s::pucch_format_r10_c_:: + operator=(const pucch_cfg_ded_v1020_s::pucch_format_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::format3_r10: + c.set(other.c.get()); + break; + case types::ch_sel_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_"); + } + + return *this; +} +void pucch_cfg_ded_v1020_s::pucch_format_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::format3_r10: + j.write_fieldname("format3-r10"); + c.get().to_json(j); + break; + case types::ch_sel_r10: + j.write_fieldname("channelSelection-r10"); + j.start_obj(); + if (c.get().n1_pucch_an_cs_r10_present) { + j.write_fieldname("n1PUCCH-AN-CS-r10"); + c.get().n1_pucch_an_cs_r10.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_v1020_s::pucch_format_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::format3_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ch_sel_r10: + HANDLE_CODE(bref.pack(c.get().n1_pucch_an_cs_r10_present, 1)); + if (c.get().n1_pucch_an_cs_r10_present) { + HANDLE_CODE(c.get().n1_pucch_an_cs_r10.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1020_s::pucch_format_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::format3_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ch_sel_r10: + HANDLE_CODE(bref.unpack(c.get().n1_pucch_an_cs_r10_present, 1)); + if (c.get().n1_pucch_an_cs_r10_present) { + HANDLE_CODE(c.get().n1_pucch_an_cs_r10.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::ch_sel_r10_s_() +{ + n1_pucch_an_cs_r10_present = false; +} + +void pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_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.start_array("n1PUCCH-AN-CS-List-r10"); + for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_r10.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < c.n1_pucch_an_cs_list_r10[i1].size(); ++i2) { + j.write_int(c.n1_pucch_an_cs_list_r10[i1][i2]); + } + j.end_array(); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of( + bref, c.n1_pucch_an_cs_list_r10, 1, 2, + SeqOfPacker >(1, 4, UnalignedIntegerPacker(0, 2047)))); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of( + c.n1_pucch_an_cs_list_r10, bref, 1, 2, + SeqOfPacker >(1, 4, UnalignedIntegerPacker(0, 2047)))); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUCCH-ConfigDedicated-v1130 ::= SEQUENCE +pucch_cfg_ded_v1130_s::pucch_cfg_ded_v1130_s() +{ + n1_pucch_an_cs_v1130_present = false; + n_pucch_param_r11_present = false; +} +SRSASN_CODE pucch_cfg_ded_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(n1_pucch_an_cs_v1130_present, 1)); + HANDLE_CODE(bref.pack(n_pucch_param_r11_present, 1)); + + if (n1_pucch_an_cs_v1130_present) { + HANDLE_CODE(n1_pucch_an_cs_v1130.pack(bref)); + } + if (n_pucch_param_r11_present) { + HANDLE_CODE(n_pucch_param_r11.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(n1_pucch_an_cs_v1130_present, 1)); + HANDLE_CODE(bref.unpack(n_pucch_param_r11_present, 1)); + + if (n1_pucch_an_cs_v1130_present) { + HANDLE_CODE(n1_pucch_an_cs_v1130.unpack(bref)); + } + if (n_pucch_param_r11_present) { + HANDLE_CODE(n_pucch_param_r11.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (n1_pucch_an_cs_v1130_present) { + j.write_fieldname("n1PUCCH-AN-CS-v1130"); + n1_pucch_an_cs_v1130.to_json(j); + } + if (n_pucch_param_r11_present) { + j.write_fieldname("nPUCCH-Param-r11"); + n_pucch_param_r11.to_json(j); + } + j.end_obj(); +} + +void pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_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.start_array("n1PUCCH-AN-CS-ListP1-r11"); + for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_p1_r11.size(); ++i1) { + j.write_int(c.n1_pucch_an_cs_list_p1_r11[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.n1_pucch_an_cs_list_p1_r11, 2, 4, UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE( + unpack_dyn_seq_of(c.n1_pucch_an_cs_list_p1_r11, bref, 2, 4, UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pucch_cfg_ded_v1130_s::n_pucch_param_r11_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_v1130_s::n_pucch_param_r11_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_int("nPUCCH-Identity-r11", c.n_pucch_id_r11); + j.write_int("n1PUCCH-AN-r11", c.n1_pucch_an_r11); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1130_s::n_pucch_param_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_v1130_s::n_pucch_param_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.n_pucch_id_r11, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, c.n1_pucch_an_r11, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1130_s::n_pucch_param_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1130_s::n_pucch_param_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.n_pucch_id_r11, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(c.n1_pucch_an_r11, bref, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1130_s::n_pucch_param_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUCCH-ConfigDedicated-v1250 ::= SEQUENCE +SRSASN_CODE pucch_cfg_ded_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(nka_pucch_param_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(nka_pucch_param_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("nkaPUCCH-Param-r12"); + nka_pucch_param_r12.to_json(j); + j.end_obj(); +} + +void pucch_cfg_ded_v1250_s::nka_pucch_param_r12_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_v1250_s::nka_pucch_param_r12_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_int("nkaPUCCH-AN-r12", c.nka_pucch_an_r12); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1250_s::nka_pucch_param_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_v1250_s::nka_pucch_param_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.nka_pucch_an_r12, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1250_s::nka_pucch_param_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1250_s::nka_pucch_param_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.nka_pucch_an_r12, bref, (uint16_t)0, (uint16_t)2047)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1250_s::nka_pucch_param_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUCCH-ConfigDedicated-v1430 ::= SEQUENCE +pucch_cfg_ded_v1430_s::pucch_cfg_ded_v1430_s() +{ + pucch_num_repeat_ce_format1_r14_present = false; +} +SRSASN_CODE pucch_cfg_ded_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pucch_num_repeat_ce_format1_r14_present, 1)); + + if (pucch_num_repeat_ce_format1_r14_present) { + HANDLE_CODE(pack_enum(bref, pucch_num_repeat_ce_format1_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pucch_num_repeat_ce_format1_r14_present, 1)); + + if (pucch_num_repeat_ce_format1_r14_present) { + HANDLE_CODE(unpack_enum(pucch_num_repeat_ce_format1_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_num_repeat_ce_format1_r14_present) { + j.write_str("pucch-NumRepetitionCE-format1-r14", pucch_num_repeat_ce_format1_r14.to_string()); + } + j.end_obj(); +} + +// PUSCH-ConfigDedicated ::= SEQUENCE +SRSASN_CODE pusch_cfg_ded_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_ack_idx, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_ri_idx, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_cqi_idx, (uint8_t)0, (uint8_t)15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(beta_offset_ack_idx, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_ri_idx, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_cqi_idx, bref, (uint8_t)0, (uint8_t)15)); + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("betaOffset-ACK-Index", beta_offset_ack_idx); + j.write_int("betaOffset-RI-Index", beta_offset_ri_idx); + j.write_int("betaOffset-CQI-Index", beta_offset_cqi_idx); + j.end_obj(); +} + +// PUSCH-ConfigDedicated-r13 ::= SEQUENCE +pusch_cfg_ded_r13_s::pusch_cfg_ded_r13_s() +{ + beta_offset2_ack_idx_r13_present = false; + beta_offset_mc_r13_present = false; + group_hop_disabled_r13_present = false; + dmrs_with_occ_activ_r13_present = false; + pusch_dmrs_r11_present = false; + uci_on_pusch_present = false; + pusch_hop_cfg_r13_present = false; +} +SRSASN_CODE pusch_cfg_ded_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(beta_offset2_ack_idx_r13_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_mc_r13_present, 1)); + HANDLE_CODE(bref.pack(group_hop_disabled_r13_present, 1)); + HANDLE_CODE(bref.pack(dmrs_with_occ_activ_r13_present, 1)); + HANDLE_CODE(bref.pack(pusch_dmrs_r11_present, 1)); + HANDLE_CODE(bref.pack(uci_on_pusch_present, 1)); + HANDLE_CODE(bref.pack(pusch_hop_cfg_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_ack_idx_r13, (uint8_t)0, (uint8_t)15)); + if (beta_offset2_ack_idx_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, beta_offset2_ack_idx_r13, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_ri_idx_r13, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_cqi_idx_r13, (uint8_t)0, (uint8_t)15)); + if (beta_offset_mc_r13_present) { + HANDLE_CODE(bref.pack(beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r13.beta_offset_ack_idx_mc_r13, (uint8_t)0, (uint8_t)15)); + if (beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r13.beta_offset_ri_idx_mc_r13, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r13.beta_offset_cqi_idx_mc_r13, (uint8_t)0, (uint8_t)15)); + } + if (pusch_dmrs_r11_present) { + HANDLE_CODE(pusch_dmrs_r11.pack(bref)); + } + if (uci_on_pusch_present) { + HANDLE_CODE(uci_on_pusch.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(beta_offset2_ack_idx_r13_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_mc_r13_present, 1)); + HANDLE_CODE(bref.unpack(group_hop_disabled_r13_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_with_occ_activ_r13_present, 1)); + HANDLE_CODE(bref.unpack(pusch_dmrs_r11_present, 1)); + HANDLE_CODE(bref.unpack(uci_on_pusch_present, 1)); + HANDLE_CODE(bref.unpack(pusch_hop_cfg_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(beta_offset_ack_idx_r13, bref, (uint8_t)0, (uint8_t)15)); + if (beta_offset2_ack_idx_r13_present) { + HANDLE_CODE(unpack_unalign_integer(beta_offset2_ack_idx_r13, bref, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(unpack_unalign_integer(beta_offset_ri_idx_r13, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_cqi_idx_r13, bref, (uint8_t)0, (uint8_t)15)); + if (beta_offset_mc_r13_present) { + HANDLE_CODE(bref.unpack(beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_mc_r13.beta_offset_ack_idx_mc_r13, bref, (uint8_t)0, (uint8_t)15)); + if (beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13_present) { + HANDLE_CODE( + unpack_unalign_integer(beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13, bref, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(unpack_unalign_integer(beta_offset_mc_r13.beta_offset_ri_idx_mc_r13, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_mc_r13.beta_offset_cqi_idx_mc_r13, bref, (uint8_t)0, (uint8_t)15)); + } + if (pusch_dmrs_r11_present) { + HANDLE_CODE(pusch_dmrs_r11.unpack(bref)); + } + if (uci_on_pusch_present) { + HANDLE_CODE(uci_on_pusch.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("betaOffset-ACK-Index-r13", beta_offset_ack_idx_r13); + if (beta_offset2_ack_idx_r13_present) { + j.write_int("betaOffset2-ACK-Index-r13", beta_offset2_ack_idx_r13); + } + j.write_int("betaOffset-RI-Index-r13", beta_offset_ri_idx_r13); + j.write_int("betaOffset-CQI-Index-r13", beta_offset_cqi_idx_r13); + if (beta_offset_mc_r13_present) { + j.write_fieldname("betaOffsetMC-r13"); + j.start_obj(); + j.write_int("betaOffset-ACK-Index-MC-r13", beta_offset_mc_r13.beta_offset_ack_idx_mc_r13); + if (beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13_present) { + j.write_int("betaOffset2-ACK-Index-MC-r13", beta_offset_mc_r13.beta_offset2_ack_idx_mc_r13); + } + j.write_int("betaOffset-RI-Index-MC-r13", beta_offset_mc_r13.beta_offset_ri_idx_mc_r13); + j.write_int("betaOffset-CQI-Index-MC-r13", beta_offset_mc_r13.beta_offset_cqi_idx_mc_r13); + j.end_obj(); + } + if (group_hop_disabled_r13_present) { + j.write_str("groupHoppingDisabled-r13", "true"); + } + if (dmrs_with_occ_activ_r13_present) { + j.write_str("dmrs-WithOCC-Activated-r13", "true"); + } + if (pusch_dmrs_r11_present) { + j.write_fieldname("pusch-DMRS-r11"); + pusch_dmrs_r11.to_json(j); + } + if (uci_on_pusch_present) { + j.write_fieldname("uciOnPUSCH"); + uci_on_pusch.to_json(j); + } + if (pusch_hop_cfg_r13_present) { + j.write_str("pusch-HoppingConfig-r13", "on"); + } + j.end_obj(); +} + +pusch_cfg_ded_r13_s::beta_offset_mc_r13_s_::beta_offset_mc_r13_s_() +{ + beta_offset2_ack_idx_mc_r13_present = false; +} + +void pusch_cfg_ded_r13_s::pusch_dmrs_r11_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_r13_s::pusch_dmrs_r11_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_int("nPUSCH-Identity-r13", c.n_pusch_id_r13); + j.write_int("nDMRS-CSH-Identity-r13", c.n_dmrs_csh_id_r13); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_r13_s::pusch_dmrs_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_r13_s::pusch_dmrs_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.n_pusch_id_r13, (uint16_t)0, (uint16_t)509)); + HANDLE_CODE(pack_unalign_integer(bref, c.n_dmrs_csh_id_r13, (uint16_t)0, (uint16_t)509)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_r13_s::pusch_dmrs_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_r13_s::pusch_dmrs_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.n_pusch_id_r13, bref, (uint16_t)0, (uint16_t)509)); + HANDLE_CODE(unpack_unalign_integer(c.n_dmrs_csh_id_r13, bref, (uint16_t)0, (uint16_t)509)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_r13_s::pusch_dmrs_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pusch_cfg_ded_r13_s::uci_on_pusch_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_r13_s::uci_on_pusch_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_int("betaOffset-ACK-Index-SubframeSet2-r13", c.beta_offset_ack_idx_sf_set2_r13); + if (c.beta_offset2_ack_idx_sf_set2_r13_present) { + j.write_int("betaOffset2-ACK-Index-SubframeSet2-r13", c.beta_offset2_ack_idx_sf_set2_r13); + } + j.write_int("betaOffset-RI-Index-SubframeSet2-r13", c.beta_offset_ri_idx_sf_set2_r13); + j.write_int("betaOffset-CQI-Index-SubframeSet2-r13", c.beta_offset_cqi_idx_sf_set2_r13); + if (c.beta_offset_mc_r12_present) { + j.write_fieldname("betaOffsetMC-r12"); + j.start_obj(); + j.write_int("betaOffset-ACK-Index-MC-SubframeSet2-r13", + c.beta_offset_mc_r12.beta_offset_ack_idx_mc_sf_set2_r13); + if (c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13_present) { + j.write_int("betaOffset2-ACK-Index-MC-SubframeSet2-r13", + c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13); + } + j.write_int("betaOffset-RI-Index-MC-SubframeSet2-r13", c.beta_offset_mc_r12.beta_offset_ri_idx_mc_sf_set2_r13); + j.write_int("betaOffset-CQI-Index-MC-SubframeSet2-r13", + c.beta_offset_mc_r12.beta_offset_cqi_idx_mc_sf_set2_r13); + j.end_obj(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_r13_s::uci_on_pusch_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_r13_s::uci_on_pusch_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.beta_offset2_ack_idx_sf_set2_r13_present, 1)); + HANDLE_CODE(bref.pack(c.beta_offset_mc_r12_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_ack_idx_sf_set2_r13, (uint8_t)0, (uint8_t)15)); + if (c.beta_offset2_ack_idx_sf_set2_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset2_ack_idx_sf_set2_r13, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_ri_idx_sf_set2_r13, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_cqi_idx_sf_set2_r13, (uint8_t)0, (uint8_t)15)); + if (c.beta_offset_mc_r12_present) { + HANDLE_CODE(bref.pack(c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset_ack_idx_mc_sf_set2_r13, (uint8_t)0, + (uint8_t)15)); + if (c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13, (uint8_t)0, + (uint8_t)15)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset_ri_idx_mc_sf_set2_r13, (uint8_t)0, + (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset_cqi_idx_mc_sf_set2_r13, (uint8_t)0, + (uint8_t)15)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_r13_s::uci_on_pusch_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_r13_s::uci_on_pusch_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.beta_offset2_ack_idx_sf_set2_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.beta_offset_mc_r12_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_ack_idx_sf_set2_r13, bref, (uint8_t)0, (uint8_t)15)); + if (c.beta_offset2_ack_idx_sf_set2_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset2_ack_idx_sf_set2_r13, bref, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_ri_idx_sf_set2_r13, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_cqi_idx_sf_set2_r13, bref, (uint8_t)0, (uint8_t)15)); + if (c.beta_offset_mc_r12_present) { + HANDLE_CODE(bref.unpack(c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset_ack_idx_mc_sf_set2_r13, bref, (uint8_t)0, + (uint8_t)15)); + if (c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset2_ack_idx_mc_sf_set2_r13, bref, (uint8_t)0, + (uint8_t)15)); + } + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset_ri_idx_mc_sf_set2_r13, bref, (uint8_t)0, + (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset_cqi_idx_mc_sf_set2_r13, bref, (uint8_t)0, + (uint8_t)15)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_r13_s::uci_on_pusch_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pusch_cfg_ded_r13_s::uci_on_pusch_c_::setup_s_::setup_s_() +{ + beta_offset2_ack_idx_sf_set2_r13_present = false; + beta_offset_mc_r12_present = false; +} + +pusch_cfg_ded_r13_s::uci_on_pusch_c_::setup_s_::beta_offset_mc_r12_s_::beta_offset_mc_r12_s_() +{ + beta_offset2_ack_idx_mc_sf_set2_r13_present = false; +} + +// PUSCH-ConfigDedicated-v1020 ::= SEQUENCE +pusch_cfg_ded_v1020_s::pusch_cfg_ded_v1020_s() +{ + beta_offset_mc_r10_present = false; + group_hop_disabled_r10_present = false; + dmrs_with_occ_activ_r10_present = false; +} +SRSASN_CODE pusch_cfg_ded_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(beta_offset_mc_r10_present, 1)); + HANDLE_CODE(bref.pack(group_hop_disabled_r10_present, 1)); + HANDLE_CODE(bref.pack(dmrs_with_occ_activ_r10_present, 1)); + + if (beta_offset_mc_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r10.beta_offset_ack_idx_mc_r10, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r10.beta_offset_ri_idx_mc_r10, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, beta_offset_mc_r10.beta_offset_cqi_idx_mc_r10, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(beta_offset_mc_r10_present, 1)); + HANDLE_CODE(bref.unpack(group_hop_disabled_r10_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_with_occ_activ_r10_present, 1)); + + if (beta_offset_mc_r10_present) { + HANDLE_CODE(unpack_unalign_integer(beta_offset_mc_r10.beta_offset_ack_idx_mc_r10, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_mc_r10.beta_offset_ri_idx_mc_r10, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(beta_offset_mc_r10.beta_offset_cqi_idx_mc_r10, bref, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (beta_offset_mc_r10_present) { + j.write_fieldname("betaOffsetMC-r10"); + j.start_obj(); + j.write_int("betaOffset-ACK-Index-MC-r10", beta_offset_mc_r10.beta_offset_ack_idx_mc_r10); + j.write_int("betaOffset-RI-Index-MC-r10", beta_offset_mc_r10.beta_offset_ri_idx_mc_r10); + j.write_int("betaOffset-CQI-Index-MC-r10", beta_offset_mc_r10.beta_offset_cqi_idx_mc_r10); + j.end_obj(); + } + if (group_hop_disabled_r10_present) { + j.write_str("groupHoppingDisabled-r10", "true"); + } + if (dmrs_with_occ_activ_r10_present) { + j.write_str("dmrs-WithOCC-Activated-r10", "true"); + } + j.end_obj(); +} + +// PUSCH-ConfigDedicated-v1130 ::= SEQUENCE +SRSASN_CODE pusch_cfg_ded_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pusch_dmrs_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(pusch_dmrs_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pusch-DMRS-r11"); + pusch_dmrs_r11.to_json(j); + j.end_obj(); +} + +void pusch_cfg_ded_v1130_s::pusch_dmrs_r11_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_v1130_s::pusch_dmrs_r11_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_int("nPUSCH-Identity-r11", c.n_pusch_id_r11); + j.write_int("nDMRS-CSH-Identity-r11", c.n_dmrs_csh_id_r11); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1130_s::pusch_dmrs_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_v1130_s::pusch_dmrs_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.n_pusch_id_r11, (uint16_t)0, (uint16_t)509)); + HANDLE_CODE(pack_unalign_integer(bref, c.n_dmrs_csh_id_r11, (uint16_t)0, (uint16_t)509)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1130_s::pusch_dmrs_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1130_s::pusch_dmrs_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.n_pusch_id_r11, bref, (uint16_t)0, (uint16_t)509)); + HANDLE_CODE(unpack_unalign_integer(c.n_dmrs_csh_id_r11, bref, (uint16_t)0, (uint16_t)509)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1130_s::pusch_dmrs_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUSCH-ConfigDedicated-v1250 ::= SEQUENCE +SRSASN_CODE pusch_cfg_ded_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(uci_on_pusch.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(uci_on_pusch.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("uciOnPUSCH"); + uci_on_pusch.to_json(j); + j.end_obj(); +} + +void pusch_cfg_ded_v1250_s::uci_on_pusch_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_v1250_s::uci_on_pusch_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_int("betaOffset-ACK-Index-SubframeSet2-r12", c.beta_offset_ack_idx_sf_set2_r12); + j.write_int("betaOffset-RI-Index-SubframeSet2-r12", c.beta_offset_ri_idx_sf_set2_r12); + j.write_int("betaOffset-CQI-Index-SubframeSet2-r12", c.beta_offset_cqi_idx_sf_set2_r12); + if (c.beta_offset_mc_r12_present) { + j.write_fieldname("betaOffsetMC-r12"); + j.start_obj(); + j.write_int("betaOffset-ACK-Index-MC-SubframeSet2-r12", + c.beta_offset_mc_r12.beta_offset_ack_idx_mc_sf_set2_r12); + j.write_int("betaOffset-RI-Index-MC-SubframeSet2-r12", c.beta_offset_mc_r12.beta_offset_ri_idx_mc_sf_set2_r12); + j.write_int("betaOffset-CQI-Index-MC-SubframeSet2-r12", + c.beta_offset_mc_r12.beta_offset_cqi_idx_mc_sf_set2_r12); + j.end_obj(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1250_s::uci_on_pusch_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_v1250_s::uci_on_pusch_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.beta_offset_mc_r12_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_ack_idx_sf_set2_r12, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_ri_idx_sf_set2_r12, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_cqi_idx_sf_set2_r12, (uint8_t)0, (uint8_t)15)); + if (c.beta_offset_mc_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset_ack_idx_mc_sf_set2_r12, (uint8_t)0, + (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset_ri_idx_mc_sf_set2_r12, (uint8_t)0, + (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_mc_r12.beta_offset_cqi_idx_mc_sf_set2_r12, (uint8_t)0, + (uint8_t)15)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1250_s::uci_on_pusch_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1250_s::uci_on_pusch_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.beta_offset_mc_r12_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_ack_idx_sf_set2_r12, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_ri_idx_sf_set2_r12, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_cqi_idx_sf_set2_r12, bref, (uint8_t)0, (uint8_t)15)); + if (c.beta_offset_mc_r12_present) { + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset_ack_idx_mc_sf_set2_r12, bref, (uint8_t)0, + (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset_ri_idx_mc_sf_set2_r12, bref, (uint8_t)0, + (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_mc_r12.beta_offset_cqi_idx_mc_sf_set2_r12, bref, (uint8_t)0, + (uint8_t)15)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1250_s::uci_on_pusch_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pusch_cfg_ded_v1250_s::uci_on_pusch_c_::setup_s_::setup_s_() +{ + beta_offset_mc_r12_present = false; +} + +// PUSCH-ConfigDedicated-v1430 ::= SEQUENCE +pusch_cfg_ded_v1430_s::pusch_cfg_ded_v1430_s() +{ + ce_pusch_nb_max_tbs_r14_present = false; + ce_pusch_max_bw_r14_present = false; + tdd_pusch_up_pts_r14_present = false; + enable256_qam_r14_present = false; +} +SRSASN_CODE pusch_cfg_ded_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_pusch_nb_max_tbs_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pusch_max_bw_r14_present, 1)); + HANDLE_CODE(bref.pack(tdd_pusch_up_pts_r14_present, 1)); + HANDLE_CODE(bref.pack(enable256_qam_r14_present, 1)); + + if (tdd_pusch_up_pts_r14_present) { + HANDLE_CODE(tdd_pusch_up_pts_r14.pack(bref)); + } + HANDLE_CODE(bref.pack(ul_dmrs_ifdma_r14, 1)); + if (enable256_qam_r14_present) { + HANDLE_CODE(enable256_qam_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_pusch_nb_max_tbs_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pusch_max_bw_r14_present, 1)); + HANDLE_CODE(bref.unpack(tdd_pusch_up_pts_r14_present, 1)); + HANDLE_CODE(bref.unpack(enable256_qam_r14_present, 1)); + + if (tdd_pusch_up_pts_r14_present) { + HANDLE_CODE(tdd_pusch_up_pts_r14.unpack(bref)); + } + HANDLE_CODE(bref.unpack(ul_dmrs_ifdma_r14, 1)); + if (enable256_qam_r14_present) { + HANDLE_CODE(enable256_qam_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_pusch_nb_max_tbs_r14_present) { + j.write_str("ce-PUSCH-NB-MaxTBS-r14", "on"); + } + if (ce_pusch_max_bw_r14_present) { + j.write_str("ce-PUSCH-MaxBandwidth-r14", "bw5"); + } + if (tdd_pusch_up_pts_r14_present) { + j.write_fieldname("tdd-PUSCH-UpPTS-r14"); + tdd_pusch_up_pts_r14.to_json(j); + } + j.write_bool("ul-DMRS-IFDMA-r14", ul_dmrs_ifdma_r14); + if (enable256_qam_r14_present) { + j.write_fieldname("enable256QAM-r14"); + enable256_qam_r14.to_json(j); + } + j.end_obj(); +} + +// PUSCH-ConfigDedicated-v1530 ::= SEQUENCE +pusch_cfg_ded_v1530_s::pusch_cfg_ded_v1530_s() +{ + ce_pusch_sub_prb_cfg_r15_present = false; +} +SRSASN_CODE pusch_cfg_ded_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_pusch_sub_prb_cfg_r15_present, 1)); + + HANDLE_CODE(ce_pusch_flex_start_prb_alloc_cfg_r15.pack(bref)); + if (ce_pusch_sub_prb_cfg_r15_present) { + HANDLE_CODE(ce_pusch_sub_prb_cfg_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_pusch_sub_prb_cfg_r15_present, 1)); + + HANDLE_CODE(ce_pusch_flex_start_prb_alloc_cfg_r15.unpack(bref)); + if (ce_pusch_sub_prb_cfg_r15_present) { + HANDLE_CODE(ce_pusch_sub_prb_cfg_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ce-PUSCH-FlexibleStartPRB-AllocConfig-r15"); + ce_pusch_flex_start_prb_alloc_cfg_r15.to_json(j); + if (ce_pusch_sub_prb_cfg_r15_present) { + j.write_fieldname("ce-PUSCH-SubPRB-Config-r15"); + ce_pusch_sub_prb_cfg_r15.to_json(j); + } + j.end_obj(); +} + +void pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.offset_ce_mode_b_r15_present) { + j.write_int("offsetCE-ModeB-r15", c.offset_ce_mode_b_r15); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.offset_ce_mode_b_r15_present, 1)); + if (c.offset_ce_mode_b_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.offset_ce_mode_b_r15, (int8_t)-1, (int8_t)3)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.offset_ce_mode_b_r15_present, 1)); + if (c.offset_ce_mode_b_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.offset_ce_mode_b_r15, bref, (int8_t)-1, (int8_t)3)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pusch_cfg_ded_v1530_s::ce_pusch_flex_start_prb_alloc_cfg_r15_c_::setup_s_::setup_s_() +{ + offset_ce_mode_b_r15_present = false; +} + +void pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.location_ce_mode_b_r15_present) { + j.write_int("locationCE-ModeB-r15", c.location_ce_mode_b_r15); + } + j.write_int("sixToneCyclicShift-r15", c.six_tone_cyclic_shift_r15); + j.write_int("threeToneCyclicShift-r15", c.three_tone_cyclic_shift_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.location_ce_mode_b_r15_present, 1)); + if (c.location_ce_mode_b_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.location_ce_mode_b_r15, (uint8_t)0, (uint8_t)5)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.six_tone_cyclic_shift_r15, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, c.three_tone_cyclic_shift_r15, (uint8_t)0, (uint8_t)2)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.location_ce_mode_b_r15_present, 1)); + if (c.location_ce_mode_b_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.location_ce_mode_b_r15, bref, (uint8_t)0, (uint8_t)5)); + } + HANDLE_CODE(unpack_unalign_integer(c.six_tone_cyclic_shift_r15, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(c.three_tone_cyclic_shift_r15, bref, (uint8_t)0, (uint8_t)2)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pusch_cfg_ded_v1530_s::ce_pusch_sub_prb_cfg_r15_c_::setup_s_::setup_s_() +{ + location_ce_mode_b_r15_present = false; +} + +// PUSCH-EnhancementsConfig-r14 ::= CHOICE +void pusch_enhance_cfg_r14_c::set(types::options e) +{ + type_ = e; +} +void pusch_enhance_cfg_r14_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(); + if (c.pusch_hop_offset_pusch_enh_r14_present) { + j.write_int("pusch-HoppingOffsetPUSCH-Enh-r14", c.pusch_hop_offset_pusch_enh_r14); + } + if (c.interv_ul_hop_pusch_enh_r14_present) { + j.write_fieldname("interval-ULHoppingPUSCH-Enh-r14"); + c.interv_ul_hop_pusch_enh_r14.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE pusch_enhance_cfg_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.pusch_hop_offset_pusch_enh_r14_present, 1)); + HANDLE_CODE(bref.pack(c.interv_ul_hop_pusch_enh_r14_present, 1)); + if (c.pusch_hop_offset_pusch_enh_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.pusch_hop_offset_pusch_enh_r14, (uint8_t)1, (uint8_t)100)); + } + if (c.interv_ul_hop_pusch_enh_r14_present) { + HANDLE_CODE(c.interv_ul_hop_pusch_enh_r14.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_enhance_cfg_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.pusch_hop_offset_pusch_enh_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.interv_ul_hop_pusch_enh_r14_present, 1)); + if (c.pusch_hop_offset_pusch_enh_r14_present) { + HANDLE_CODE(unpack_unalign_integer(c.pusch_hop_offset_pusch_enh_r14, bref, (uint8_t)1, (uint8_t)100)); + } + if (c.interv_ul_hop_pusch_enh_r14_present) { + HANDLE_CODE(c.interv_ul_hop_pusch_enh_r14.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +pusch_enhance_cfg_r14_c::setup_s_::setup_s_() +{ + pusch_hop_offset_pusch_enh_r14_present = false; + interv_ul_hop_pusch_enh_r14_present = false; +} + +void pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::destroy_() {} +void pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_ul_hop_pusch_enh_r14_c_( + const pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interv_fdd_pusch_enh_r14: + c.init(other.c.get()); + break; + case types::interv_tdd_pusch_enh_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_"); + } +} +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_& +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_:: +operator=(const pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interv_fdd_pusch_enh_r14: + c.set(other.c.get()); + break; + case types::interv_tdd_pusch_enh_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_"); + } + + return *this; +} +void pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interv_fdd_pusch_enh_r14: + j.write_str("interval-FDD-PUSCH-Enh-r14", c.get().to_string()); + break; + case types::interv_tdd_pusch_enh_r14: + j.write_str("interval-TDD-PUSCH-Enh-r14", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interv_fdd_pusch_enh_r14: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::interv_tdd_pusch_enh_r14: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interv_fdd_pusch_enh_r14: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::interv_tdd_pusch_enh_r14: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PhysicalConfigDedicatedSTTI-r15 ::= CHOICE +void phys_cfg_ded_stti_r15_c::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_stti_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.ant_info_ded_stti_r15_present) { + j.write_fieldname("antennaInfoDedicatedSTTI-r15"); + c.ant_info_ded_stti_r15.to_json(j); + } + if (c.ant_info_ul_stti_r15_present) { + j.write_fieldname("antennaInfoUL-STTI-r15"); + c.ant_info_ul_stti_r15.to_json(j); + } + if (c.pucch_cfg_ded_v1530_present) { + j.write_fieldname("pucch-ConfigDedicated-v1530"); + c.pucch_cfg_ded_v1530.to_json(j); + } + if (c.sched_request_cfg_v1530_present) { + j.write_fieldname("schedulingRequestConfig-v1530"); + c.sched_request_cfg_v1530.to_json(j); + } + if (c.ul_pwr_ctrl_ded_stti_r15_present) { + j.write_fieldname("uplinkPowerControlDedicatedSTTI-r15"); + c.ul_pwr_ctrl_ded_stti_r15.to_json(j); + } + if (c.cqi_report_cfg_r15_present) { + j.write_fieldname("cqi-ReportConfig-r15"); + c.cqi_report_cfg_r15.to_json(j); + } + if (c.csi_rs_cfg_r15_present) { + j.write_fieldname("csi-RS-Config-r15"); + c.csi_rs_cfg_r15.to_json(j); + } + if (c.csi_rs_cfg_nzp_to_release_list_r15_present) { + j.start_array("csi-RS-ConfigNZPToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_nzp_to_release_list_r15.size(); ++i1) { + j.write_int(c.csi_rs_cfg_nzp_to_release_list_r15[i1]); + } + j.end_array(); + } + if (c.csi_rs_cfg_nzp_to_add_mod_list_r15_present) { + j.start_array("csi-RS-ConfigNZPToAddModList-r15"); + for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_nzp_to_add_mod_list_r15.size(); ++i1) { + c.csi_rs_cfg_nzp_to_add_mod_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (c.csi_rs_cfg_zp_to_release_list_r15_present) { + j.start_array("csi-RS-ConfigZPToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_zp_to_release_list_r15.size(); ++i1) { + j.write_int(c.csi_rs_cfg_zp_to_release_list_r15[i1]); + } + j.end_array(); + } + if (c.csi_rs_cfg_zp_to_add_mod_list_r11_present) { + j.start_array("csi-RS-ConfigZPToAddModList-r11"); + for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_zp_to_add_mod_list_r11.size(); ++i1) { + c.csi_rs_cfg_zp_to_add_mod_list_r11[i1].to_json(j); + } + j.end_array(); + } + if (c.csi_rs_cfg_zp_ap_list_r15_present) { + j.write_fieldname("csi-RS-ConfigZP-ApList-r15"); + c.csi_rs_cfg_zp_ap_list_r15.to_json(j); + } + if (c.eimta_main_cfg_r12_present) { + j.write_fieldname("eimta-MainConfig-r12"); + c.eimta_main_cfg_r12.to_json(j); + } + if (c.eimta_main_cfg_serv_cell_r15_present) { + j.write_fieldname("eimta-MainConfigServCell-r15"); + c.eimta_main_cfg_serv_cell_r15.to_json(j); + } + j.write_bool("semiOpenLoopSTTI-r15", c.semi_open_loop_stti_r15); + if (c.slot_or_subslot_pdsch_cfg_r15_present) { + j.write_fieldname("slotOrSubslotPDSCH-Config-r15"); + c.slot_or_subslot_pdsch_cfg_r15.to_json(j); + } + if (c.slot_or_subslot_pusch_cfg_r15_present) { + j.write_fieldname("slotOrSubslotPUSCH-Config-r15"); + c.slot_or_subslot_pusch_cfg_r15.to_json(j); + } + if (c.spdcch_cfg_r15_present) { + j.write_fieldname("spdcch-Config-r15"); + c.spdcch_cfg_r15.to_json(j); + } + if (c.spucch_cfg_r15_present) { + j.write_fieldname("spucch-Config-r15"); + c.spucch_cfg_r15.to_json(j); + } + j.write_bool("srs-DCI7-TriggeringConfig-r15", c.srs_dci7_triggering_cfg_r15); + j.write_bool("shortProcessingTime-r15", c.short_processing_time_r15); + if (c.short_tti_r15_present) { + j.write_fieldname("shortTTI-r15"); + c.short_tti_r15.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_stti_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_stti_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ant_info_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.ant_info_ul_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.pucch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.pack(c.sched_request_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(c.ul_pwr_ctrl_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_report_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_nzp_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_nzp_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_zp_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_zp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(c.csi_rs_cfg_zp_ap_list_r15_present, 1)); + HANDLE_CODE(bref.pack(c.eimta_main_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(c.eimta_main_cfg_serv_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(c.slot_or_subslot_pdsch_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.slot_or_subslot_pusch_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.spdcch_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.spucch_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.short_tti_r15_present, 1)); + if (c.ant_info_ded_stti_r15_present) { + HANDLE_CODE(c.ant_info_ded_stti_r15.pack(bref)); + } + if (c.ant_info_ul_stti_r15_present) { + HANDLE_CODE(c.ant_info_ul_stti_r15.pack(bref)); + } + if (c.pucch_cfg_ded_v1530_present) { + HANDLE_CODE(c.pucch_cfg_ded_v1530.pack(bref)); + } + if (c.sched_request_cfg_v1530_present) { + HANDLE_CODE(c.sched_request_cfg_v1530.pack(bref)); + } + if (c.ul_pwr_ctrl_ded_stti_r15_present) { + HANDLE_CODE(c.ul_pwr_ctrl_ded_stti_r15.pack(bref)); + } + if (c.cqi_report_cfg_r15_present) { + HANDLE_CODE(c.cqi_report_cfg_r15.pack(bref)); + } + if (c.csi_rs_cfg_r15_present) { + HANDLE_CODE(c.csi_rs_cfg_r15.pack(bref)); + } + if (c.csi_rs_cfg_nzp_to_release_list_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.csi_rs_cfg_nzp_to_release_list_r15, 1, 24, UnalignedIntegerPacker(1, 24))); + } + if (c.csi_rs_cfg_nzp_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.csi_rs_cfg_nzp_to_add_mod_list_r15, 1, 24)); + } + if (c.csi_rs_cfg_zp_to_release_list_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.csi_rs_cfg_zp_to_release_list_r15, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (c.csi_rs_cfg_zp_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.csi_rs_cfg_zp_to_add_mod_list_r11, 1, 4)); + } + if (c.csi_rs_cfg_zp_ap_list_r15_present) { + HANDLE_CODE(c.csi_rs_cfg_zp_ap_list_r15.pack(bref)); + } + if (c.eimta_main_cfg_r12_present) { + HANDLE_CODE(c.eimta_main_cfg_r12.pack(bref)); + } + if (c.eimta_main_cfg_serv_cell_r15_present) { + HANDLE_CODE(c.eimta_main_cfg_serv_cell_r15.pack(bref)); + } + HANDLE_CODE(bref.pack(c.semi_open_loop_stti_r15, 1)); + if (c.slot_or_subslot_pdsch_cfg_r15_present) { + HANDLE_CODE(c.slot_or_subslot_pdsch_cfg_r15.pack(bref)); + } + if (c.slot_or_subslot_pusch_cfg_r15_present) { + HANDLE_CODE(c.slot_or_subslot_pusch_cfg_r15.pack(bref)); + } + if (c.spdcch_cfg_r15_present) { + HANDLE_CODE(c.spdcch_cfg_r15.pack(bref)); + } + if (c.spucch_cfg_r15_present) { + HANDLE_CODE(c.spucch_cfg_r15.pack(bref)); + } + HANDLE_CODE(bref.pack(c.srs_dci7_triggering_cfg_r15, 1)); + HANDLE_CODE(bref.pack(c.short_processing_time_r15, 1)); + if (c.short_tti_r15_present) { + HANDLE_CODE(c.short_tti_r15.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_stti_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_stti_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ant_info_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.ant_info_ul_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.pucch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.unpack(c.sched_request_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(c.ul_pwr_ctrl_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_report_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_nzp_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_nzp_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_zp_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_zp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_rs_cfg_zp_ap_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.eimta_main_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.eimta_main_cfg_serv_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.slot_or_subslot_pdsch_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.slot_or_subslot_pusch_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.spdcch_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.spucch_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.short_tti_r15_present, 1)); + if (c.ant_info_ded_stti_r15_present) { + HANDLE_CODE(c.ant_info_ded_stti_r15.unpack(bref)); + } + if (c.ant_info_ul_stti_r15_present) { + HANDLE_CODE(c.ant_info_ul_stti_r15.unpack(bref)); + } + if (c.pucch_cfg_ded_v1530_present) { + HANDLE_CODE(c.pucch_cfg_ded_v1530.unpack(bref)); + } + if (c.sched_request_cfg_v1530_present) { + HANDLE_CODE(c.sched_request_cfg_v1530.unpack(bref)); + } + if (c.ul_pwr_ctrl_ded_stti_r15_present) { + HANDLE_CODE(c.ul_pwr_ctrl_ded_stti_r15.unpack(bref)); + } + if (c.cqi_report_cfg_r15_present) { + HANDLE_CODE(c.cqi_report_cfg_r15.unpack(bref)); + } + if (c.csi_rs_cfg_r15_present) { + HANDLE_CODE(c.csi_rs_cfg_r15.unpack(bref)); + } + if (c.csi_rs_cfg_nzp_to_release_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.csi_rs_cfg_nzp_to_release_list_r15, bref, 1, 24, + UnalignedIntegerPacker(1, 24))); + } + if (c.csi_rs_cfg_nzp_to_add_mod_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.csi_rs_cfg_nzp_to_add_mod_list_r15, bref, 1, 24)); + } + if (c.csi_rs_cfg_zp_to_release_list_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.csi_rs_cfg_zp_to_release_list_r15, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (c.csi_rs_cfg_zp_to_add_mod_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.csi_rs_cfg_zp_to_add_mod_list_r11, bref, 1, 4)); + } + if (c.csi_rs_cfg_zp_ap_list_r15_present) { + HANDLE_CODE(c.csi_rs_cfg_zp_ap_list_r15.unpack(bref)); + } + if (c.eimta_main_cfg_r12_present) { + HANDLE_CODE(c.eimta_main_cfg_r12.unpack(bref)); + } + if (c.eimta_main_cfg_serv_cell_r15_present) { + HANDLE_CODE(c.eimta_main_cfg_serv_cell_r15.unpack(bref)); + } + HANDLE_CODE(bref.unpack(c.semi_open_loop_stti_r15, 1)); + if (c.slot_or_subslot_pdsch_cfg_r15_present) { + HANDLE_CODE(c.slot_or_subslot_pdsch_cfg_r15.unpack(bref)); + } + if (c.slot_or_subslot_pusch_cfg_r15_present) { + HANDLE_CODE(c.slot_or_subslot_pusch_cfg_r15.unpack(bref)); + } + if (c.spdcch_cfg_r15_present) { + HANDLE_CODE(c.spdcch_cfg_r15.unpack(bref)); + } + if (c.spucch_cfg_r15_present) { + HANDLE_CODE(c.spucch_cfg_r15.unpack(bref)); + } + HANDLE_CODE(bref.unpack(c.srs_dci7_triggering_cfg_r15, 1)); + HANDLE_CODE(bref.unpack(c.short_processing_time_r15, 1)); + if (c.short_tti_r15_present) { + HANDLE_CODE(c.short_tti_r15.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_stti_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_stti_r15_c::setup_s_::setup_s_() +{ + ant_info_ded_stti_r15_present = false; + ant_info_ul_stti_r15_present = false; + pucch_cfg_ded_v1530_present = false; + sched_request_cfg_v1530_present = false; + ul_pwr_ctrl_ded_stti_r15_present = false; + cqi_report_cfg_r15_present = false; + csi_rs_cfg_r15_present = false; + csi_rs_cfg_nzp_to_release_list_r15_present = false; + csi_rs_cfg_nzp_to_add_mod_list_r15_present = false; + csi_rs_cfg_zp_to_release_list_r15_present = false; + csi_rs_cfg_zp_to_add_mod_list_r11_present = false; + csi_rs_cfg_zp_ap_list_r15_present = false; + eimta_main_cfg_r12_present = false; + eimta_main_cfg_serv_cell_r15_present = false; + slot_or_subslot_pdsch_cfg_r15_present = false; + slot_or_subslot_pusch_cfg_r15_present = false; + spdcch_cfg_r15_present = false; + spucch_cfg_r15_present = false; + short_tti_r15_present = false; +} + +// RRCConnectionReject-v1130-IEs ::= SEQUENCE +rrc_conn_reject_v1130_ies_s::rrc_conn_reject_v1130_ies_s() +{ + depriorit_req_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reject_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(depriorit_req_r11_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (depriorit_req_r11_present) { + HANDLE_CODE(pack_enum(bref, depriorit_req_r11.depriorit_type_r11)); + HANDLE_CODE(pack_enum(bref, depriorit_req_r11.depriorit_timer_r11)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(depriorit_req_r11_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (depriorit_req_r11_present) { + HANDLE_CODE(unpack_enum(depriorit_req_r11.depriorit_type_r11, bref)); + HANDLE_CODE(unpack_enum(depriorit_req_r11.depriorit_timer_r11, bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reject_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (depriorit_req_r11_present) { + j.write_fieldname("deprioritisationReq-r11"); + j.start_obj(); + j.write_str("deprioritisationType-r11", depriorit_req_r11.depriorit_type_r11.to_string()); + j.write_str("deprioritisationTimer-r11", depriorit_req_r11.depriorit_timer_r11.to_string()); + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SPS-ConfigDL ::= CHOICE +void sps_cfg_dl_c::set(types::options e) +{ + type_ = e; +} +void sps_cfg_dl_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_c"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_dl_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_dl_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sps_cfg_dl_c::setup_s_::setup_s_() +{ + ext = false; + two_ant_port_activ_r10_present = false; +} +SRSASN_CODE sps_cfg_dl_c::setup_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, semi_persist_sched_interv_dl)); + HANDLE_CODE(pack_unalign_integer(bref, nof_conf_sps_processes, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_dyn_seq_of(bref, n1_pucch_an_persistent_list, 1, 4, UnalignedIntegerPacker(0, 2047))); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(two_ant_port_activ_r10_present != (two_ant_port_activ_r10.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= two_ant_port_activ_r10_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(two_ant_port_activ_r10_present, 1)); + if (two_ant_port_activ_r10_present) { + HANDLE_CODE(two_ant_port_activ_r10->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_dl_c::setup_s_::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(semi_persist_sched_interv_dl, bref)); + HANDLE_CODE(unpack_unalign_integer(nof_conf_sps_processes, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_dyn_seq_of(n1_pucch_an_persistent_list, bref, 1, 4, UnalignedIntegerPacker(0, 2047))); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(two_ant_port_activ_r10_present, 1)); + if (two_ant_port_activ_r10_present) { + two_ant_port_activ_r10 = make_copy_ptr(two_ant_port_activ_r10_c_()); + HANDLE_CODE(two_ant_port_activ_r10->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sps_cfg_dl_c::setup_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("semiPersistSchedIntervalDL", semi_persist_sched_interv_dl.to_string()); + j.write_int("numberOfConfSPS-Processes", nof_conf_sps_processes); + j.start_array("n1PUCCH-AN-PersistentList"); + for (uint32_t i1 = 0; i1 < n1_pucch_an_persistent_list.size(); ++i1) { + j.write_int(n1_pucch_an_persistent_list[i1]); + } + j.end_array(); + if (two_ant_port_activ_r10_present) { + j.write_fieldname("twoAntennaPortActivated-r10"); + two_ant_port_activ_r10->to_json(j); + } + j.end_obj(); +} + +void sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_::set(types::options e) +{ + type_ = e; +} +void sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_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.start_array("n1PUCCH-AN-PersistentListP1-r10"); + for (uint32_t i1 = 0; i1 < c.n1_pucch_an_persistent_list_p1_r10.size(); ++i1) { + j.write_int(c.n1_pucch_an_persistent_list_p1_r10[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.n1_pucch_an_persistent_list_p1_r10, 1, 4, UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.n1_pucch_an_persistent_list_p1_r10, bref, 1, 4, + UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SRB-ToAddMod ::= SEQUENCE +srb_to_add_mod_s::srb_to_add_mod_s() +{ + ext = false; + rlc_cfg_present = false; + lc_ch_cfg_present = false; + pdcp_ver_change_r15_present = false; + rlc_cfg_v1530_present = false; + rlc_bearer_cfg_dupl_r15_present = false; + srb_id_v1530_present = false; +} +SRSASN_CODE srb_to_add_mod_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rlc_cfg_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_cfg_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, srb_id, (uint8_t)1, (uint8_t)2)); + if (rlc_cfg_present) { + HANDLE_CODE(rlc_cfg.pack(bref)); + } + if (lc_ch_cfg_present) { + HANDLE_CODE(lc_ch_cfg.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= pdcp_ver_change_r15_present; + rrc_asn1_warn_assert(rlc_cfg_v1530_present != (rlc_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= rlc_cfg_v1530_present; + rrc_asn1_warn_assert(rlc_bearer_cfg_dupl_r15_present != (rlc_bearer_cfg_dupl_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= rlc_bearer_cfg_dupl_r15_present; + group_flags[0] |= srb_id_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pdcp_ver_change_r15_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15_present, 1)); + HANDLE_CODE(bref.pack(srb_id_v1530_present, 1)); + if (rlc_cfg_v1530_present) { + HANDLE_CODE(rlc_cfg_v1530->pack(bref)); + } + if (rlc_bearer_cfg_dupl_r15_present) { + HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref)); + } + if (srb_id_v1530_present) { + HANDLE_CODE(pack_unalign_integer(bref, srb_id_v1530, (uint8_t)4, (uint8_t)4)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srb_to_add_mod_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rlc_cfg_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_cfg_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(srb_id, bref, (uint8_t)1, (uint8_t)2)); + if (rlc_cfg_present) { + HANDLE_CODE(rlc_cfg.unpack(bref)); + } + if (lc_ch_cfg_present) { + HANDLE_CODE(lc_ch_cfg.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pdcp_ver_change_r15_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1)); + HANDLE_CODE(bref.unpack(srb_id_v1530_present, 1)); + if (rlc_cfg_v1530_present) { + rlc_cfg_v1530 = make_copy_ptr(rlc_cfg_v1530_c()); + HANDLE_CODE(rlc_cfg_v1530->unpack(bref)); + } + if (rlc_bearer_cfg_dupl_r15_present) { + rlc_bearer_cfg_dupl_r15 = make_copy_ptr(rlc_bearer_cfg_r15_c()); + HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref)); + } + if (srb_id_v1530_present) { + HANDLE_CODE(unpack_unalign_integer(srb_id_v1530, bref, (uint8_t)4, (uint8_t)4)); + } + } + } + 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 (rlc_cfg_present) { + j.write_fieldname("rlc-Config"); + rlc_cfg.to_json(j); + } + if (lc_ch_cfg_present) { + j.write_fieldname("logicalChannelConfig"); + lc_ch_cfg.to_json(j); + } + if (pdcp_ver_change_r15_present) { + j.write_str("pdcp-verChange-r15", "true"); + } + if (rlc_cfg_v1530_present) { + j.write_fieldname("rlc-Config-v1530"); + rlc_cfg_v1530->to_json(j); + } + if (rlc_bearer_cfg_dupl_r15_present) { + j.write_fieldname("rlc-BearerConfigDupl-r15"); + rlc_bearer_cfg_dupl_r15->to_json(j); + } + if (srb_id_v1530_present) { + j.write_int("srb-Identity-v1530", srb_id_v1530); + } + j.end_obj(); +} + +void srb_to_add_mod_s::rlc_cfg_c_::set(types::options e) +{ + type_ = e; +} +void srb_to_add_mod_s::rlc_cfg_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "srb_to_add_mod_s::rlc_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE srb_to_add_mod_s::rlc_cfg_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "srb_to_add_mod_s::rlc_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srb_to_add_mod_s::rlc_cfg_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "srb_to_add_mod_s::rlc_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void srb_to_add_mod_s::lc_ch_cfg_c_::set(types::options e) +{ + type_ = e; +} +void srb_to_add_mod_s::lc_ch_cfg_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "srb_to_add_mod_s::lc_ch_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE srb_to_add_mod_s::lc_ch_cfg_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "srb_to_add_mod_s::lc_ch_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srb_to_add_mod_s::lc_ch_cfg_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "srb_to_add_mod_s::lc_ch_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SRS-TPC-PDCCH-Config-r14 ::= CHOICE +void srs_tpc_pdcch_cfg_r14_c::set(types::options e) +{ + type_ = e; +} +void srs_tpc_pdcch_cfg_r14_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("srs-TPC-RNTI-r14", c.srs_tpc_rnti_r14.to_string()); + j.write_int("startingBitOfFormat3B-r14", c.start_bit_of_format3_b_r14); + j.write_int("fieldTypeFormat3B-r14", c.field_type_format3_b_r14); + if (c.srs_cc_set_idxlist_r14_present) { + j.start_array("srs-CC-SetIndexlist-r14"); + for (uint32_t i1 = 0; i1 < c.srs_cc_set_idxlist_r14.size(); ++i1) { + c.srs_cc_set_idxlist_r14[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_tpc_pdcch_cfg_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_tpc_pdcch_cfg_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_cc_set_idxlist_r14_present, 1)); + HANDLE_CODE(c.srs_tpc_rnti_r14.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, c.start_bit_of_format3_b_r14, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, c.field_type_format3_b_r14, (uint8_t)1, (uint8_t)4)); + if (c.srs_cc_set_idxlist_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.srs_cc_set_idxlist_r14, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "srs_tpc_pdcch_cfg_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_tpc_pdcch_cfg_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_cc_set_idxlist_r14_present, 1)); + HANDLE_CODE(c.srs_tpc_rnti_r14.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(c.start_bit_of_format3_b_r14, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(c.field_type_format3_b_r14, bref, (uint8_t)1, (uint8_t)4)); + if (c.srs_cc_set_idxlist_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.srs_cc_set_idxlist_r14, bref, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "srs_tpc_pdcch_cfg_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_tpc_pdcch_cfg_r14_c::setup_s_::setup_s_() +{ + srs_cc_set_idxlist_r14_present = false; +} + +// SchedulingRequestConfig ::= CHOICE +void sched_request_cfg_c::set(types::options e) +{ + type_ = e; +} +void sched_request_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_int("sr-PUCCH-ResourceIndex", c.sr_pucch_res_idx); + j.write_int("sr-ConfigIndex", c.sr_cfg_idx); + j.write_str("dsr-TransMax", c.dsr_trans_max.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_c"); + } + j.end_obj(); +} +SRSASN_CODE sched_request_cfg_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.sr_pucch_res_idx, (uint16_t)0, (uint16_t)2047)); + HANDLE_CODE(pack_unalign_integer(bref, c.sr_cfg_idx, (uint8_t)0, (uint8_t)157)); + HANDLE_CODE(pack_enum(bref, c.dsr_trans_max)); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_cfg_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.sr_pucch_res_idx, bref, (uint16_t)0, (uint16_t)2047)); + HANDLE_CODE(unpack_unalign_integer(c.sr_cfg_idx, bref, (uint8_t)0, (uint8_t)157)); + HANDLE_CODE(unpack_enum(c.dsr_trans_max, bref)); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SchedulingRequestConfig-v1020 ::= SEQUENCE +sched_request_cfg_v1020_s::sched_request_cfg_v1020_s() +{ + sr_pucch_res_idx_p1_r10_present = false; +} +SRSASN_CODE sched_request_cfg_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sr_pucch_res_idx_p1_r10_present, 1)); + + if (sr_pucch_res_idx_p1_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, sr_pucch_res_idx_p1_r10, (uint16_t)0, (uint16_t)2047)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_cfg_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sr_pucch_res_idx_p1_r10_present, 1)); + + if (sr_pucch_res_idx_p1_r10_present) { + HANDLE_CODE(unpack_unalign_integer(sr_pucch_res_idx_p1_r10, bref, (uint16_t)0, (uint16_t)2047)); + } + + return SRSASN_SUCCESS; +} +void sched_request_cfg_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sr_pucch_res_idx_p1_r10_present) { + j.write_int("sr-PUCCH-ResourceIndexP1-r10", sr_pucch_res_idx_p1_r10); + } + j.end_obj(); +} + +// SoundingRS-UL-ConfigDedicated ::= CHOICE +void srs_ul_cfg_ded_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_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("srs-Bandwidth", c.srs_bw.to_string()); + j.write_str("srs-HoppingBandwidth", c.srs_hop_bw.to_string()); + j.write_int("freqDomainPosition", c.freq_domain_position); + j.write_bool("duration", c.dur); + j.write_int("srs-ConfigIndex", c.srs_cfg_idx); + j.write_int("transmissionComb", c.tx_comb); + j.write_str("cyclicShift", c.cyclic_shift.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.srs_bw)); + HANDLE_CODE(pack_enum(bref, c.srs_hop_bw)); + HANDLE_CODE(pack_unalign_integer(bref, c.freq_domain_position, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(bref.pack(c.dur, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.srs_cfg_idx, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(pack_unalign_integer(bref, c.tx_comb, (uint8_t)0, (uint8_t)1)); + HANDLE_CODE(pack_enum(bref, c.cyclic_shift)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.srs_bw, bref)); + HANDLE_CODE(unpack_enum(c.srs_hop_bw, bref)); + HANDLE_CODE(unpack_unalign_integer(c.freq_domain_position, bref, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(bref.unpack(c.dur, 1)); + HANDLE_CODE(unpack_unalign_integer(c.srs_cfg_idx, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(unpack_unalign_integer(c.tx_comb, bref, (uint8_t)0, (uint8_t)1)); + HANDLE_CODE(unpack_enum(c.cyclic_shift, bref)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SoundingRS-UL-ConfigDedicated-v1020 ::= SEQUENCE +SRSASN_CODE srs_ul_cfg_ded_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, srs_ant_port_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(srs_ant_port_r10, bref)); + + return SRSASN_SUCCESS; +} +void srs_ul_cfg_ded_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("srs-AntennaPort-r10", srs_ant_port_r10.to_string()); + j.end_obj(); +} + +// SoundingRS-UL-ConfigDedicated-v1310 ::= CHOICE +void srs_ul_cfg_ded_v1310_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_v1310_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(); + if (c.tx_comb_v1310_present) { + j.write_int("transmissionComb-v1310", c.tx_comb_v1310); + } + if (c.cyclic_shift_v1310_present) { + j.write_str("cyclicShift-v1310", c.cyclic_shift_v1310.to_string()); + } + if (c.tx_comb_num_r13_present) { + j.write_str("transmissionCombNum-r13", c.tx_comb_num_r13.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_v1310_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_v1310_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.tx_comb_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.cyclic_shift_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.tx_comb_num_r13_present, 1)); + if (c.tx_comb_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.tx_comb_v1310, (uint8_t)2, (uint8_t)3)); + } + if (c.cyclic_shift_v1310_present) { + HANDLE_CODE(pack_enum(bref, c.cyclic_shift_v1310)); + } + if (c.tx_comb_num_r13_present) { + HANDLE_CODE(pack_enum(bref, c.tx_comb_num_r13)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_v1310_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_v1310_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.tx_comb_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.cyclic_shift_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.tx_comb_num_r13_present, 1)); + if (c.tx_comb_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(c.tx_comb_v1310, bref, (uint8_t)2, (uint8_t)3)); + } + if (c.cyclic_shift_v1310_present) { + HANDLE_CODE(unpack_enum(c.cyclic_shift_v1310, bref)); + } + if (c.tx_comb_num_r13_present) { + HANDLE_CODE(unpack_enum(c.tx_comb_num_r13, bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_v1310_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_v1310_c::setup_s_::setup_s_() +{ + tx_comb_v1310_present = false; + cyclic_shift_v1310_present = false; + tx_comb_num_r13_present = false; +} + +// SoundingRS-UL-ConfigDedicatedAperiodic-r10 ::= CHOICE +void srs_ul_cfg_ded_aperiodic_r10_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_r10_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_int("srs-ConfigIndexAp-r10", c.srs_cfg_idx_ap_r10); + if (c.srs_cfg_ap_dci_format4_r10_present) { + j.start_array("srs-ConfigApDCI-Format4-r10"); + for (uint32_t i1 = 0; i1 < c.srs_cfg_ap_dci_format4_r10.size(); ++i1) { + c.srs_cfg_ap_dci_format4_r10[i1].to_json(j); + } + j.end_array(); + } + if (c.srs_activ_ap_r10_present) { + j.write_fieldname("srs-ActivateAp-r10"); + c.srs_activ_ap_r10.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_cfg_ap_dci_format4_r10_present, 1)); + HANDLE_CODE(bref.pack(c.srs_activ_ap_r10_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.srs_cfg_idx_ap_r10, (uint8_t)0, (uint8_t)31)); + if (c.srs_cfg_ap_dci_format4_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.srs_cfg_ap_dci_format4_r10, 1, 3)); + } + if (c.srs_activ_ap_r10_present) { + HANDLE_CODE(c.srs_activ_ap_r10.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_cfg_ap_dci_format4_r10_present, 1)); + HANDLE_CODE(bref.unpack(c.srs_activ_ap_r10_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.srs_cfg_idx_ap_r10, bref, (uint8_t)0, (uint8_t)31)); + if (c.srs_cfg_ap_dci_format4_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.srs_cfg_ap_dci_format4_r10, bref, 1, 3)); + } + if (c.srs_activ_ap_r10_present) { + HANDLE_CODE(c.srs_activ_ap_r10.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::setup_s_() +{ + srs_cfg_ap_dci_format4_r10_present = false; + srs_activ_ap_r10_present = false; +} + +void srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("srs-ConfigApDCI-Format0-r10"); + c.srs_cfg_ap_dci_format0_r10.to_json(j); + j.write_fieldname("srs-ConfigApDCI-Format1a2b2c-r10"); + c.srs_cfg_ap_dci_format1a2b2c_r10.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(c.srs_cfg_ap_dci_format0_r10.pack(bref)); + HANDLE_CODE(c.srs_cfg_ap_dci_format1a2b2c_r10.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(c.srs_cfg_ap_dci_format0_r10.unpack(bref)); + HANDLE_CODE(c.srs_cfg_ap_dci_format1a2b2c_r10.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_aperiodic_r10_c::setup_s_::srs_activ_ap_r10_c_::setup_s_::setup_s_() +{ + ext = false; +} + +// SoundingRS-UL-ConfigDedicatedAperiodic-v1310 ::= CHOICE +void srs_ul_cfg_ded_aperiodic_v1310_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_v1310_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(); + if (c.srs_cfg_ap_dci_format4_v1310_present) { + j.start_array("srs-ConfigApDCI-Format4-v1310"); + for (uint32_t i1 = 0; i1 < c.srs_cfg_ap_dci_format4_v1310.size(); ++i1) { + c.srs_cfg_ap_dci_format4_v1310[i1].to_json(j); + } + j.end_array(); + } + if (c.srs_activ_ap_v1310_present) { + j.write_fieldname("srs-ActivateAp-v1310"); + c.srs_activ_ap_v1310.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1310_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_v1310_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_cfg_ap_dci_format4_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.srs_activ_ap_v1310_present, 1)); + if (c.srs_cfg_ap_dci_format4_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.srs_cfg_ap_dci_format4_v1310, 1, 3)); + } + if (c.srs_activ_ap_v1310_present) { + HANDLE_CODE(c.srs_activ_ap_v1310.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1310_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_v1310_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_cfg_ap_dci_format4_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.srs_activ_ap_v1310_present, 1)); + if (c.srs_cfg_ap_dci_format4_v1310_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.srs_cfg_ap_dci_format4_v1310, bref, 1, 3)); + } + if (c.srs_activ_ap_v1310_present) { + HANDLE_CODE(c.srs_activ_ap_v1310.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1310_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::setup_s_() +{ + srs_cfg_ap_dci_format4_v1310_present = false; + srs_activ_ap_v1310_present = false; +} + +void srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_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(); + if (c.srs_cfg_ap_dci_format0_v1310_present) { + j.write_fieldname("srs-ConfigApDCI-Format0-v1310"); + c.srs_cfg_ap_dci_format0_v1310.to_json(j); + } + if (c.srs_cfg_ap_dci_format1a2b2c_v1310_present) { + j.write_fieldname("srs-ConfigApDCI-Format1a2b2c-v1310"); + c.srs_cfg_ap_dci_format1a2b2c_v1310.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_cfg_ap_dci_format0_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.srs_cfg_ap_dci_format1a2b2c_v1310_present, 1)); + if (c.srs_cfg_ap_dci_format0_v1310_present) { + HANDLE_CODE(c.srs_cfg_ap_dci_format0_v1310.pack(bref)); + } + if (c.srs_cfg_ap_dci_format1a2b2c_v1310_present) { + HANDLE_CODE(c.srs_cfg_ap_dci_format1a2b2c_v1310.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_cfg_ap_dci_format0_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.srs_cfg_ap_dci_format1a2b2c_v1310_present, 1)); + if (c.srs_cfg_ap_dci_format0_v1310_present) { + HANDLE_CODE(c.srs_cfg_ap_dci_format0_v1310.unpack(bref)); + } + if (c.srs_cfg_ap_dci_format1a2b2c_v1310_present) { + HANDLE_CODE(c.srs_cfg_ap_dci_format1a2b2c_v1310.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_aperiodic_v1310_c::setup_s_::srs_activ_ap_v1310_c_::setup_s_::setup_s_() +{ + srs_cfg_ap_dci_format0_v1310_present = false; + srs_cfg_ap_dci_format1a2b2c_v1310_present = false; +} + +// SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 ::= CHOICE +void srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_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("srs-UpPtsAdd-r13", c.srs_up_pts_add_r13.to_string()); + j.write_int("srs-ConfigIndexAp-r13", c.srs_cfg_idx_ap_r13); + if (c.srs_cfg_ap_dci_format4_r13_present) { + j.start_array("srs-ConfigApDCI-Format4-r13"); + for (uint32_t i1 = 0; i1 < c.srs_cfg_ap_dci_format4_r13.size(); ++i1) { + c.srs_cfg_ap_dci_format4_r13[i1].to_json(j); + } + j.end_array(); + } + if (c.srs_activ_ap_r13_present) { + j.write_fieldname("srs-ActivateAp-r13"); + c.srs_activ_ap_r13.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_cfg_ap_dci_format4_r13_present, 1)); + HANDLE_CODE(bref.pack(c.srs_activ_ap_r13_present, 1)); + HANDLE_CODE(pack_enum(bref, c.srs_up_pts_add_r13)); + HANDLE_CODE(pack_unalign_integer(bref, c.srs_cfg_idx_ap_r13, (uint8_t)0, (uint8_t)31)); + if (c.srs_cfg_ap_dci_format4_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.srs_cfg_ap_dci_format4_r13, 1, 3)); + } + if (c.srs_activ_ap_r13_present) { + HANDLE_CODE(c.srs_activ_ap_r13.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_cfg_ap_dci_format4_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.srs_activ_ap_r13_present, 1)); + HANDLE_CODE(unpack_enum(c.srs_up_pts_add_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(c.srs_cfg_idx_ap_r13, bref, (uint8_t)0, (uint8_t)31)); + if (c.srs_cfg_ap_dci_format4_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.srs_cfg_ap_dci_format4_r13, bref, 1, 3)); + } + if (c.srs_activ_ap_r13_present) { + HANDLE_CODE(c.srs_activ_ap_r13.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::setup_s_() +{ + srs_cfg_ap_dci_format4_r13_present = false; + srs_activ_ap_r13_present = false; +} + +void srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("srs-ConfigApDCI-Format0-r13"); + c.srs_cfg_ap_dci_format0_r13.to_json(j); + j.write_fieldname("srs-ConfigApDCI-Format1a2b2c-r13"); + c.srs_cfg_ap_dci_format1a2b2c_r13.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.srs_cfg_ap_dci_format0_r13.pack(bref)); + HANDLE_CODE(c.srs_cfg_ap_dci_format1a2b2c_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.srs_cfg_ap_dci_format0_r13.unpack(bref)); + HANDLE_CODE(c.srs_cfg_ap_dci_format1a2b2c_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_activ_ap_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 ::= CHOICE +void srs_ul_cfg_ded_up_pts_ext_r13_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_up_pts_ext_r13_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("srs-UpPtsAdd-r13", c.srs_up_pts_add_r13.to_string()); + j.write_str("srs-Bandwidth-r13", c.srs_bw_r13.to_string()); + j.write_str("srs-HoppingBandwidth-r13", c.srs_hop_bw_r13.to_string()); + j.write_int("freqDomainPosition-r13", c.freq_domain_position_r13); + j.write_bool("duration-r13", c.dur_r13); + j.write_int("srs-ConfigIndex-r13", c.srs_cfg_idx_r13); + j.write_int("transmissionComb-r13", c.tx_comb_r13); + j.write_str("cyclicShift-r13", c.cyclic_shift_r13.to_string()); + j.write_str("srs-AntennaPort-r13", c.srs_ant_port_r13.to_string()); + j.write_str("transmissionCombNum-r13", c.tx_comb_num_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_up_pts_ext_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_up_pts_ext_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.srs_up_pts_add_r13)); + HANDLE_CODE(pack_enum(bref, c.srs_bw_r13)); + HANDLE_CODE(pack_enum(bref, c.srs_hop_bw_r13)); + HANDLE_CODE(pack_unalign_integer(bref, c.freq_domain_position_r13, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(bref.pack(c.dur_r13, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.srs_cfg_idx_r13, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(pack_unalign_integer(bref, c.tx_comb_r13, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_enum(bref, c.cyclic_shift_r13)); + HANDLE_CODE(pack_enum(bref, c.srs_ant_port_r13)); + HANDLE_CODE(pack_enum(bref, c.tx_comb_num_r13)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_up_pts_ext_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_up_pts_ext_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.srs_up_pts_add_r13, bref)); + HANDLE_CODE(unpack_enum(c.srs_bw_r13, bref)); + HANDLE_CODE(unpack_enum(c.srs_hop_bw_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(c.freq_domain_position_r13, bref, (uint8_t)0, (uint8_t)23)); + HANDLE_CODE(bref.unpack(c.dur_r13, 1)); + HANDLE_CODE(unpack_unalign_integer(c.srs_cfg_idx_r13, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(unpack_unalign_integer(c.tx_comb_r13, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_enum(c.cyclic_shift_r13, bref)); + HANDLE_CODE(unpack_enum(c.srs_ant_port_r13, bref)); + HANDLE_CODE(unpack_enum(c.tx_comb_num_r13, bref)); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_up_pts_ext_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UplinkPowerControlDedicated ::= SEQUENCE +ul_pwr_ctrl_ded_s::ul_pwr_ctrl_ded_s() +{ + filt_coef_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_pusch, (int8_t)-8, (int8_t)7)); + HANDLE_CODE(pack_enum(bref, delta_mcs_enabled)); + HANDLE_CODE(bref.pack(accumulation_enabled, 1)); + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_pucch, (int8_t)-8, (int8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, p_srs_offset, (uint8_t)0, (uint8_t)15)); + if (filt_coef_present) { + HANDLE_CODE(pack_enum(bref, filt_coef)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(p0_ue_pusch, bref, (int8_t)-8, (int8_t)7)); + HANDLE_CODE(unpack_enum(delta_mcs_enabled, bref)); + HANDLE_CODE(bref.unpack(accumulation_enabled, 1)); + HANDLE_CODE(unpack_unalign_integer(p0_ue_pucch, bref, (int8_t)-8, (int8_t)7)); + HANDLE_CODE(unpack_unalign_integer(p_srs_offset, bref, (uint8_t)0, (uint8_t)15)); + if (filt_coef_present) { + HANDLE_CODE(unpack_enum(filt_coef, bref)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-UE-PUSCH", p0_ue_pusch); + j.write_str("deltaMCS-Enabled", delta_mcs_enabled.to_string()); + j.write_bool("accumulationEnabled", accumulation_enabled); + j.write_int("p0-UE-PUCCH", p0_ue_pucch); + j.write_int("pSRS-Offset", p_srs_offset); + if (filt_coef_present) { + j.write_str("filterCoefficient", filt_coef.to_string()); + } + j.end_obj(); +} + +// UplinkPowerControlDedicated-v1020 ::= SEQUENCE +ul_pwr_ctrl_ded_v1020_s::ul_pwr_ctrl_ded_v1020_s() +{ + delta_tx_d_offset_list_pucch_r10_present = false; + p_srs_offset_ap_r10_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delta_tx_d_offset_list_pucch_r10_present, 1)); + HANDLE_CODE(bref.pack(p_srs_offset_ap_r10_present, 1)); + + if (delta_tx_d_offset_list_pucch_r10_present) { + HANDLE_CODE(delta_tx_d_offset_list_pucch_r10.pack(bref)); + } + if (p_srs_offset_ap_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_srs_offset_ap_r10, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delta_tx_d_offset_list_pucch_r10_present, 1)); + HANDLE_CODE(bref.unpack(p_srs_offset_ap_r10_present, 1)); + + if (delta_tx_d_offset_list_pucch_r10_present) { + HANDLE_CODE(delta_tx_d_offset_list_pucch_r10.unpack(bref)); + } + if (p_srs_offset_ap_r10_present) { + HANDLE_CODE(unpack_unalign_integer(p_srs_offset_ap_r10, bref, (uint8_t)0, (uint8_t)15)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (delta_tx_d_offset_list_pucch_r10_present) { + j.write_fieldname("deltaTxD-OffsetListPUCCH-r10"); + delta_tx_d_offset_list_pucch_r10.to_json(j); + } + if (p_srs_offset_ap_r10_present) { + j.write_int("pSRS-OffsetAp-r10", p_srs_offset_ap_r10); + } + j.end_obj(); +} + +// UplinkPowerControlDedicated-v1130 ::= SEQUENCE +ul_pwr_ctrl_ded_v1130_s::ul_pwr_ctrl_ded_v1130_s() +{ + p_srs_offset_v1130_present = false; + p_srs_offset_ap_v1130_present = false; + delta_tx_d_offset_list_pucch_v1130_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_srs_offset_v1130_present, 1)); + HANDLE_CODE(bref.pack(p_srs_offset_ap_v1130_present, 1)); + HANDLE_CODE(bref.pack(delta_tx_d_offset_list_pucch_v1130_present, 1)); + + if (p_srs_offset_v1130_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_srs_offset_v1130, (uint8_t)16, (uint8_t)31)); + } + if (p_srs_offset_ap_v1130_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_srs_offset_ap_v1130, (uint8_t)16, (uint8_t)31)); + } + if (delta_tx_d_offset_list_pucch_v1130_present) { + HANDLE_CODE(delta_tx_d_offset_list_pucch_v1130.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_srs_offset_v1130_present, 1)); + HANDLE_CODE(bref.unpack(p_srs_offset_ap_v1130_present, 1)); + HANDLE_CODE(bref.unpack(delta_tx_d_offset_list_pucch_v1130_present, 1)); + + if (p_srs_offset_v1130_present) { + HANDLE_CODE(unpack_unalign_integer(p_srs_offset_v1130, bref, (uint8_t)16, (uint8_t)31)); + } + if (p_srs_offset_ap_v1130_present) { + HANDLE_CODE(unpack_unalign_integer(p_srs_offset_ap_v1130, bref, (uint8_t)16, (uint8_t)31)); + } + if (delta_tx_d_offset_list_pucch_v1130_present) { + HANDLE_CODE(delta_tx_d_offset_list_pucch_v1130.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p_srs_offset_v1130_present) { + j.write_int("pSRS-Offset-v1130", p_srs_offset_v1130); + } + if (p_srs_offset_ap_v1130_present) { + j.write_int("pSRS-OffsetAp-v1130", p_srs_offset_ap_v1130); + } + if (delta_tx_d_offset_list_pucch_v1130_present) { + j.write_fieldname("deltaTxD-OffsetListPUCCH-v1130"); + delta_tx_d_offset_list_pucch_v1130.to_json(j); + } + j.end_obj(); +} + +// UplinkPowerControlDedicated-v1250 ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_ded_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(set2_pwr_ctrl_param.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(set2_pwr_ctrl_param.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("set2PowerControlParameter"); + set2_pwr_ctrl_param.to_json(j); + j.end_obj(); +} + +void ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_c_::set(types::options e) +{ + type_ = e; +} +void ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_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("tpc-SubframeSet-r12", c.tpc_sf_set_r12.to_string()); + j.write_int("p0-NominalPUSCH-SubframeSet2-r12", c.p0_nominal_pusch_sf_set2_r12); + j.write_str("alpha-SubframeSet2-r12", c.alpha_sf_set2_r12.to_string()); + j.write_int("p0-UE-PUSCH-SubframeSet2-r12", c.p0_ue_pusch_sf_set2_r12); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.tpc_sf_set_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, c.p0_nominal_pusch_sf_set2_r12, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_enum(bref, c.alpha_sf_set2_r12)); + HANDLE_CODE(pack_unalign_integer(bref, c.p0_ue_pusch_sf_set2_r12, (int8_t)-8, (int8_t)7)); + break; + default: + log_invalid_choice_id(type_, "ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.tpc_sf_set_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(c.p0_nominal_pusch_sf_set2_r12, bref, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(unpack_enum(c.alpha_sf_set2_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(c.p0_ue_pusch_sf_set2_r12, bref, (int8_t)-8, (int8_t)7)); + break; + default: + log_invalid_choice_id(type_, "ul_pwr_ctrl_ded_v1250_s::set2_pwr_ctrl_param_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UplinkPowerControlDedicated-v1530 ::= SEQUENCE +ul_pwr_ctrl_ded_v1530_s::ul_pwr_ctrl_ded_v1530_s() +{ + alpha_ue_r15_present = false; + p0_ue_pusch_r15_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(alpha_ue_r15_present, 1)); + HANDLE_CODE(bref.pack(p0_ue_pusch_r15_present, 1)); + + if (alpha_ue_r15_present) { + HANDLE_CODE(pack_enum(bref, alpha_ue_r15)); + } + if (p0_ue_pusch_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_pusch_r15, (int8_t)-16, (int8_t)15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(alpha_ue_r15_present, 1)); + HANDLE_CODE(bref.unpack(p0_ue_pusch_r15_present, 1)); + + if (alpha_ue_r15_present) { + HANDLE_CODE(unpack_enum(alpha_ue_r15, bref)); + } + if (p0_ue_pusch_r15_present) { + HANDLE_CODE(unpack_unalign_integer(p0_ue_pusch_r15, bref, (int8_t)-16, (int8_t)15)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (alpha_ue_r15_present) { + j.write_str("alpha-UE-r15", alpha_ue_r15.to_string()); + } + if (p0_ue_pusch_r15_present) { + j.write_int("p0-UE-PUSCH-r15", p0_ue_pusch_r15); + } + j.end_obj(); +} + +// CarrierFreqCDMA2000 ::= SEQUENCE +SRSASN_CODE carrier_freq_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, band_class)); + HANDLE_CODE(pack_unalign_integer(bref, arfcn, (uint16_t)0, (uint16_t)2047)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(band_class, bref)); + HANDLE_CODE(unpack_unalign_integer(arfcn, bref, (uint16_t)0, (uint16_t)2047)); + + return SRSASN_SUCCESS; +} +void carrier_freq_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bandClass", band_class.to_string()); + j.write_int("arfcn", arfcn); + j.end_obj(); +} + +// FreqPriorityEUTRA-v9e0 ::= SEQUENCE +freq_prio_eutra_v9e0_s::freq_prio_eutra_v9e0_s() +{ + carrier_freq_v9e0_present = false; +} +SRSASN_CODE freq_prio_eutra_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_v9e0_present, 1)); + + if (carrier_freq_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_v9e0, (uint32_t)65536, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_eutra_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_v9e0_present, 1)); + + if (carrier_freq_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_eutra_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_v9e0_present) { + j.write_int("carrierFreq-v9e0", carrier_freq_v9e0); + } + j.end_obj(); +} + +// MAC-MainConfig ::= SEQUENCE +mac_main_cfg_s::mac_main_cfg_s() +{ + ext = false; + ul_sch_cfg_present = false; + drx_cfg_present = false; + phr_cfg_present = false; + sr_prohibit_timer_r9_present = false; + mac_main_cfg_v1020_present = false; + stag_to_release_list_r11_present = false; + stag_to_add_mod_list_r11_present = false; + drx_cfg_v1130_present = false; + e_harq_pattern_r12_present = false; + dual_connect_phr_present = false; + lc_ch_sr_cfg_r12_present = false; + drx_cfg_v1310_present = false; + extended_phr2_r13_present = false; + e_drx_cfg_cycle_start_offset_r13_present = false; + drx_cfg_r13_present = false; + skip_ul_tx_r14_present = false; + data_inactivity_timer_cfg_r14_present = false; + rai_activation_r14_present = false; + short_tti_and_spt_r15_present = false; + mpdcch_ul_harq_ack_feedback_cfg_r15_present = false; + dormant_state_timers_r15_present = false; +} +SRSASN_CODE mac_main_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ul_sch_cfg_present, 1)); + HANDLE_CODE(bref.pack(drx_cfg_present, 1)); + HANDLE_CODE(bref.pack(phr_cfg_present, 1)); + + if (ul_sch_cfg_present) { + HANDLE_CODE(bref.pack(ul_sch_cfg.max_harq_tx_present, 1)); + HANDLE_CODE(bref.pack(ul_sch_cfg.periodic_bsr_timer_present, 1)); + if (ul_sch_cfg.max_harq_tx_present) { + HANDLE_CODE(pack_enum(bref, ul_sch_cfg.max_harq_tx)); + } + if (ul_sch_cfg.periodic_bsr_timer_present) { + HANDLE_CODE(pack_enum(bref, ul_sch_cfg.periodic_bsr_timer)); + } + HANDLE_CODE(pack_enum(bref, ul_sch_cfg.retx_bsr_timer)); + HANDLE_CODE(bref.pack(ul_sch_cfg.tti_bundling, 1)); + } + if (drx_cfg_present) { + HANDLE_CODE(drx_cfg.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, time_align_timer_ded)); + if (phr_cfg_present) { + HANDLE_CODE(phr_cfg.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(9); + group_flags[0] |= sr_prohibit_timer_r9_present; + rrc_asn1_warn_assert(mac_main_cfg_v1020_present != (mac_main_cfg_v1020.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= mac_main_cfg_v1020_present; + rrc_asn1_warn_assert(stag_to_release_list_r11_present != (stag_to_release_list_r11.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= stag_to_release_list_r11_present; + rrc_asn1_warn_assert(stag_to_add_mod_list_r11_present != (stag_to_add_mod_list_r11.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= stag_to_add_mod_list_r11_present; + rrc_asn1_warn_assert(drx_cfg_v1130_present != (drx_cfg_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= drx_cfg_v1130_present; + group_flags[3] |= e_harq_pattern_r12_present; + rrc_asn1_warn_assert(dual_connect_phr_present != (dual_connect_phr.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= dual_connect_phr_present; + rrc_asn1_warn_assert(lc_ch_sr_cfg_r12_present != (lc_ch_sr_cfg_r12.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= lc_ch_sr_cfg_r12_present; + rrc_asn1_warn_assert(drx_cfg_v1310_present != (drx_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= drx_cfg_v1310_present; + group_flags[4] |= extended_phr2_r13_present; + rrc_asn1_warn_assert(e_drx_cfg_cycle_start_offset_r13_present != (e_drx_cfg_cycle_start_offset_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[4] |= e_drx_cfg_cycle_start_offset_r13_present; + rrc_asn1_warn_assert(drx_cfg_r13_present != (drx_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= drx_cfg_r13_present; + rrc_asn1_warn_assert(skip_ul_tx_r14_present != (skip_ul_tx_r14.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= skip_ul_tx_r14_present; + rrc_asn1_warn_assert(data_inactivity_timer_cfg_r14_present != (data_inactivity_timer_cfg_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= data_inactivity_timer_cfg_r14_present; + group_flags[7] |= rai_activation_r14_present; + rrc_asn1_warn_assert(short_tti_and_spt_r15_present != (short_tti_and_spt_r15.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= short_tti_and_spt_r15_present; + group_flags[8] |= mpdcch_ul_harq_ack_feedback_cfg_r15_present; + rrc_asn1_warn_assert(dormant_state_timers_r15_present != (dormant_state_timers_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[8] |= dormant_state_timers_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sr_prohibit_timer_r9_present, 1)); + if (sr_prohibit_timer_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, sr_prohibit_timer_r9, (uint8_t)0, (uint8_t)7)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mac_main_cfg_v1020_present, 1)); + if (mac_main_cfg_v1020_present) { + HANDLE_CODE(bref.pack(mac_main_cfg_v1020->s_cell_deactivation_timer_r10_present, 1)); + HANDLE_CODE(bref.pack(mac_main_cfg_v1020->extended_bsr_sizes_r10_present, 1)); + HANDLE_CODE(bref.pack(mac_main_cfg_v1020->extended_phr_r10_present, 1)); + if (mac_main_cfg_v1020->s_cell_deactivation_timer_r10_present) { + HANDLE_CODE(pack_enum(bref, mac_main_cfg_v1020->s_cell_deactivation_timer_r10)); + } + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(stag_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(stag_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(drx_cfg_v1130_present, 1)); + if (stag_to_release_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *stag_to_release_list_r11, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (stag_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *stag_to_add_mod_list_r11, 1, 3)); + } + if (drx_cfg_v1130_present) { + HANDLE_CODE(drx_cfg_v1130->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(e_harq_pattern_r12_present, 1)); + HANDLE_CODE(bref.pack(dual_connect_phr_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_sr_cfg_r12_present, 1)); + if (e_harq_pattern_r12_present) { + HANDLE_CODE(bref.pack(e_harq_pattern_r12, 1)); + } + if (dual_connect_phr_present) { + HANDLE_CODE(dual_connect_phr->pack(bref)); + } + if (lc_ch_sr_cfg_r12_present) { + HANDLE_CODE(lc_ch_sr_cfg_r12->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(drx_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(extended_phr2_r13_present, 1)); + HANDLE_CODE(bref.pack(e_drx_cfg_cycle_start_offset_r13_present, 1)); + if (drx_cfg_v1310_present) { + HANDLE_CODE(drx_cfg_v1310->pack(bref)); + } + if (extended_phr2_r13_present) { + HANDLE_CODE(bref.pack(extended_phr2_r13, 1)); + } + if (e_drx_cfg_cycle_start_offset_r13_present) { + HANDLE_CODE(e_drx_cfg_cycle_start_offset_r13->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(drx_cfg_r13_present, 1)); + if (drx_cfg_r13_present) { + HANDLE_CODE(drx_cfg_r13->pack(bref)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(skip_ul_tx_r14_present, 1)); + HANDLE_CODE(bref.pack(data_inactivity_timer_cfg_r14_present, 1)); + if (skip_ul_tx_r14_present) { + HANDLE_CODE(skip_ul_tx_r14->pack(bref)); + } + if (data_inactivity_timer_cfg_r14_present) { + HANDLE_CODE(data_inactivity_timer_cfg_r14->pack(bref)); + } + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rai_activation_r14_present, 1)); + } + if (group_flags[8]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(short_tti_and_spt_r15_present, 1)); + HANDLE_CODE(bref.pack(mpdcch_ul_harq_ack_feedback_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(dormant_state_timers_r15_present, 1)); + if (short_tti_and_spt_r15_present) { + HANDLE_CODE(short_tti_and_spt_r15->pack(bref)); + } + if (mpdcch_ul_harq_ack_feedback_cfg_r15_present) { + HANDLE_CODE(bref.pack(mpdcch_ul_harq_ack_feedback_cfg_r15, 1)); + } + if (dormant_state_timers_r15_present) { + HANDLE_CODE(dormant_state_timers_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ul_sch_cfg_present, 1)); + HANDLE_CODE(bref.unpack(drx_cfg_present, 1)); + HANDLE_CODE(bref.unpack(phr_cfg_present, 1)); + + if (ul_sch_cfg_present) { + HANDLE_CODE(bref.unpack(ul_sch_cfg.max_harq_tx_present, 1)); + HANDLE_CODE(bref.unpack(ul_sch_cfg.periodic_bsr_timer_present, 1)); + if (ul_sch_cfg.max_harq_tx_present) { + HANDLE_CODE(unpack_enum(ul_sch_cfg.max_harq_tx, bref)); + } + if (ul_sch_cfg.periodic_bsr_timer_present) { + HANDLE_CODE(unpack_enum(ul_sch_cfg.periodic_bsr_timer, bref)); + } + HANDLE_CODE(unpack_enum(ul_sch_cfg.retx_bsr_timer, bref)); + HANDLE_CODE(bref.unpack(ul_sch_cfg.tti_bundling, 1)); + } + if (drx_cfg_present) { + HANDLE_CODE(drx_cfg.unpack(bref)); + } + HANDLE_CODE(unpack_enum(time_align_timer_ded, bref)); + if (phr_cfg_present) { + HANDLE_CODE(phr_cfg.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(9); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sr_prohibit_timer_r9_present, 1)); + if (sr_prohibit_timer_r9_present) { + HANDLE_CODE(unpack_unalign_integer(sr_prohibit_timer_r9, bref, (uint8_t)0, (uint8_t)7)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mac_main_cfg_v1020_present, 1)); + if (mac_main_cfg_v1020_present) { + mac_main_cfg_v1020 = make_copy_ptr(mac_main_cfg_v1020_s_()); + HANDLE_CODE(bref.unpack(mac_main_cfg_v1020->s_cell_deactivation_timer_r10_present, 1)); + HANDLE_CODE(bref.unpack(mac_main_cfg_v1020->extended_bsr_sizes_r10_present, 1)); + HANDLE_CODE(bref.unpack(mac_main_cfg_v1020->extended_phr_r10_present, 1)); + if (mac_main_cfg_v1020->s_cell_deactivation_timer_r10_present) { + HANDLE_CODE(unpack_enum(mac_main_cfg_v1020->s_cell_deactivation_timer_r10, bref)); + } + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(stag_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(stag_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(drx_cfg_v1130_present, 1)); + if (stag_to_release_list_r11_present) { + stag_to_release_list_r11 = make_copy_ptr(stag_to_release_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*stag_to_release_list_r11, bref, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (stag_to_add_mod_list_r11_present) { + stag_to_add_mod_list_r11 = make_copy_ptr(stag_to_add_mod_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*stag_to_add_mod_list_r11, bref, 1, 3)); + } + if (drx_cfg_v1130_present) { + drx_cfg_v1130 = make_copy_ptr(drx_cfg_v1130_s()); + HANDLE_CODE(drx_cfg_v1130->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(e_harq_pattern_r12_present, 1)); + HANDLE_CODE(bref.unpack(dual_connect_phr_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_sr_cfg_r12_present, 1)); + if (e_harq_pattern_r12_present) { + HANDLE_CODE(bref.unpack(e_harq_pattern_r12, 1)); + } + if (dual_connect_phr_present) { + dual_connect_phr = make_copy_ptr(dual_connect_phr_c_()); + HANDLE_CODE(dual_connect_phr->unpack(bref)); + } + if (lc_ch_sr_cfg_r12_present) { + lc_ch_sr_cfg_r12 = make_copy_ptr(lc_ch_sr_cfg_r12_c_()); + HANDLE_CODE(lc_ch_sr_cfg_r12->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(drx_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(extended_phr2_r13_present, 1)); + HANDLE_CODE(bref.unpack(e_drx_cfg_cycle_start_offset_r13_present, 1)); + if (drx_cfg_v1310_present) { + drx_cfg_v1310 = make_copy_ptr(drx_cfg_v1310_s()); + HANDLE_CODE(drx_cfg_v1310->unpack(bref)); + } + if (extended_phr2_r13_present) { + HANDLE_CODE(bref.unpack(extended_phr2_r13, 1)); + } + if (e_drx_cfg_cycle_start_offset_r13_present) { + e_drx_cfg_cycle_start_offset_r13 = make_copy_ptr(e_drx_cfg_cycle_start_offset_r13_c_()); + HANDLE_CODE(e_drx_cfg_cycle_start_offset_r13->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(drx_cfg_r13_present, 1)); + if (drx_cfg_r13_present) { + drx_cfg_r13 = make_copy_ptr(drx_cfg_r13_c_()); + HANDLE_CODE(drx_cfg_r13->unpack(bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(skip_ul_tx_r14_present, 1)); + HANDLE_CODE(bref.unpack(data_inactivity_timer_cfg_r14_present, 1)); + if (skip_ul_tx_r14_present) { + skip_ul_tx_r14 = make_copy_ptr(skip_ul_tx_r14_c_()); + HANDLE_CODE(skip_ul_tx_r14->unpack(bref)); + } + if (data_inactivity_timer_cfg_r14_present) { + data_inactivity_timer_cfg_r14 = make_copy_ptr(data_inactivity_timer_cfg_r14_c_()); + HANDLE_CODE(data_inactivity_timer_cfg_r14->unpack(bref)); + } + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rai_activation_r14_present, 1)); + } + if (group_flags[8]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(short_tti_and_spt_r15_present, 1)); + HANDLE_CODE(bref.unpack(mpdcch_ul_harq_ack_feedback_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(dormant_state_timers_r15_present, 1)); + if (short_tti_and_spt_r15_present) { + short_tti_and_spt_r15 = make_copy_ptr(short_tti_and_spt_r15_c_()); + HANDLE_CODE(short_tti_and_spt_r15->unpack(bref)); + } + if (mpdcch_ul_harq_ack_feedback_cfg_r15_present) { + HANDLE_CODE(bref.unpack(mpdcch_ul_harq_ack_feedback_cfg_r15, 1)); + } + if (dormant_state_timers_r15_present) { + dormant_state_timers_r15 = make_copy_ptr(dormant_state_timers_r15_c_()); + HANDLE_CODE(dormant_state_timers_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void mac_main_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_sch_cfg_present) { + j.write_fieldname("ul-SCH-Config"); + j.start_obj(); + if (ul_sch_cfg.max_harq_tx_present) { + j.write_str("maxHARQ-Tx", ul_sch_cfg.max_harq_tx.to_string()); + } + if (ul_sch_cfg.periodic_bsr_timer_present) { + j.write_str("periodicBSR-Timer", ul_sch_cfg.periodic_bsr_timer.to_string()); + } + j.write_str("retxBSR-Timer", ul_sch_cfg.retx_bsr_timer.to_string()); + j.write_bool("ttiBundling", ul_sch_cfg.tti_bundling); + j.end_obj(); + } + if (drx_cfg_present) { + j.write_fieldname("drx-Config"); + drx_cfg.to_json(j); + } + j.write_str("timeAlignmentTimerDedicated", time_align_timer_ded.to_string()); + if (phr_cfg_present) { + j.write_fieldname("phr-Config"); + phr_cfg.to_json(j); + } + if (sr_prohibit_timer_r9_present) { + j.write_int("sr-ProhibitTimer-r9", sr_prohibit_timer_r9); + } + if (mac_main_cfg_v1020_present) { + j.write_fieldname("mac-MainConfig-v1020"); + j.start_obj(); + if (mac_main_cfg_v1020->s_cell_deactivation_timer_r10_present) { + j.write_str("sCellDeactivationTimer-r10", mac_main_cfg_v1020->s_cell_deactivation_timer_r10.to_string()); + } + if (mac_main_cfg_v1020->extended_bsr_sizes_r10_present) { + j.write_str("extendedBSR-Sizes-r10", "setup"); + } + if (mac_main_cfg_v1020->extended_phr_r10_present) { + j.write_str("extendedPHR-r10", "setup"); + } + j.end_obj(); + } + if (stag_to_release_list_r11_present) { + j.start_array("stag-ToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < stag_to_release_list_r11->size(); ++i1) { + j.write_int(((*stag_to_release_list_r11)[i1])); + } + j.end_array(); + } + if (stag_to_add_mod_list_r11_present) { + j.start_array("stag-ToAddModList-r11"); + for (uint32_t i1 = 0; i1 < stag_to_add_mod_list_r11->size(); ++i1) { + ((*stag_to_add_mod_list_r11)[i1]).to_json(j); + } + j.end_array(); + } + if (drx_cfg_v1130_present) { + j.write_fieldname("drx-Config-v1130"); + drx_cfg_v1130->to_json(j); + } + if (e_harq_pattern_r12_present) { + j.write_bool("e-HARQ-Pattern-r12", e_harq_pattern_r12); + } + if (dual_connect_phr_present) { + j.write_fieldname("dualConnectivityPHR"); + dual_connect_phr->to_json(j); + } + if (lc_ch_sr_cfg_r12_present) { + j.write_fieldname("logicalChannelSR-Config-r12"); + lc_ch_sr_cfg_r12->to_json(j); + } + if (drx_cfg_v1310_present) { + j.write_fieldname("drx-Config-v1310"); + drx_cfg_v1310->to_json(j); + } + if (extended_phr2_r13_present) { + j.write_bool("extendedPHR2-r13", extended_phr2_r13); + } + if (e_drx_cfg_cycle_start_offset_r13_present) { + j.write_fieldname("eDRX-Config-CycleStartOffset-r13"); + e_drx_cfg_cycle_start_offset_r13->to_json(j); + } + if (drx_cfg_r13_present) { + j.write_fieldname("drx-Config-r13"); + drx_cfg_r13->to_json(j); + } + if (skip_ul_tx_r14_present) { + j.write_fieldname("skipUplinkTx-r14"); + skip_ul_tx_r14->to_json(j); + } + if (data_inactivity_timer_cfg_r14_present) { + j.write_fieldname("dataInactivityTimerConfig-r14"); + data_inactivity_timer_cfg_r14->to_json(j); + } + if (rai_activation_r14_present) { + j.write_str("rai-Activation-r14", "true"); + } + if (short_tti_and_spt_r15_present) { + j.write_fieldname("shortTTI-AndSPT-r15"); + short_tti_and_spt_r15->to_json(j); + } + if (mpdcch_ul_harq_ack_feedback_cfg_r15_present) { + j.write_bool("mpdcch-UL-HARQ-ACK-FeedbackConfig-r15", mpdcch_ul_harq_ack_feedback_cfg_r15); + } + if (dormant_state_timers_r15_present) { + j.write_fieldname("dormantStateTimers-r15"); + dormant_state_timers_r15->to_json(j); + } + j.end_obj(); +} + +mac_main_cfg_s::ul_sch_cfg_s_::ul_sch_cfg_s_() +{ + max_harq_tx_present = false; + periodic_bsr_timer_present = false; +} + +void mac_main_cfg_s::phr_cfg_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::phr_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("periodicPHR-Timer", c.periodic_phr_timer.to_string()); + j.write_str("prohibitPHR-Timer", c.prohibit_phr_timer.to_string()); + j.write_str("dl-PathlossChange", c.dl_pathloss_change.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::phr_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::phr_cfg_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.periodic_phr_timer)); + HANDLE_CODE(pack_enum(bref, c.prohibit_phr_timer)); + HANDLE_CODE(pack_enum(bref, c.dl_pathloss_change)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::phr_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::phr_cfg_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.periodic_phr_timer, bref)); + HANDLE_CODE(unpack_enum(c.prohibit_phr_timer, bref)); + HANDLE_CODE(unpack_enum(c.dl_pathloss_change, bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::phr_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +mac_main_cfg_s::mac_main_cfg_v1020_s_::mac_main_cfg_v1020_s_() +{ + s_cell_deactivation_timer_r10_present = false; + extended_bsr_sizes_r10_present = false; + extended_phr_r10_present = false; +} + +void mac_main_cfg_s::dual_connect_phr_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::dual_connect_phr_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("phr-ModeOtherCG-r12", c.phr_mode_other_cg_r12.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::dual_connect_phr_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::dual_connect_phr_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.phr_mode_other_cg_r12)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::dual_connect_phr_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::dual_connect_phr_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.phr_mode_other_cg_r12, bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::dual_connect_phr_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::lc_ch_sr_cfg_r12_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("logicalChannelSR-ProhibitTimer-r12", c.lc_ch_sr_prohibit_timer_r12.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.lc_ch_sr_prohibit_timer_r12)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.lc_ch_sr_prohibit_timer_r12, bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::destroy_() {} +void mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::setup_c_( + const mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf5120: + c.init(other.c.get()); + break; + case types::sf10240: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_"); + } +} +mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_& +mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_:: +operator=(const mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf5120: + c.set(other.c.get()); + break; + case types::sf10240: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_"); + } + + return *this; +} +void mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf5120: + j.write_int("sf5120", c.get()); + break; + case types::sf10240: + j.write_int("sf10240", c.get()); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf5120: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)1)); + break; + case types::sf10240: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)3)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf5120: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)1)); + break; + case types::sf10240: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)3)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mac_main_cfg_s::drx_cfg_r13_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::drx_cfg_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::drx_cfg_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::drx_cfg_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::drx_cfg_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::drx_cfg_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::drx_cfg_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mac_main_cfg_s::skip_ul_tx_r14_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::skip_ul_tx_r14_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(); + if (c.skip_ul_tx_sps_r14_present) { + j.write_str("skipUplinkTxSPS-r14", "true"); + } + if (c.skip_ul_tx_dynamic_r14_present) { + j.write_str("skipUplinkTxDynamic-r14", "true"); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::skip_ul_tx_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::skip_ul_tx_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.skip_ul_tx_sps_r14_present, 1)); + HANDLE_CODE(bref.pack(c.skip_ul_tx_dynamic_r14_present, 1)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::skip_ul_tx_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::skip_ul_tx_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.skip_ul_tx_sps_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.skip_ul_tx_dynamic_r14_present, 1)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::skip_ul_tx_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +mac_main_cfg_s::skip_ul_tx_r14_c_::setup_s_::setup_s_() +{ + skip_ul_tx_sps_r14_present = false; + skip_ul_tx_dynamic_r14_present = false; +} + +void mac_main_cfg_s::data_inactivity_timer_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::data_inactivity_timer_cfg_r14_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("dataInactivityTimer-r14", c.data_inactivity_timer_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::data_inactivity_timer_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::data_inactivity_timer_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.data_inactivity_timer_r14)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::data_inactivity_timer_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::data_inactivity_timer_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.data_inactivity_timer_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::data_inactivity_timer_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mac_main_cfg_s::short_tti_and_spt_r15_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::short_tti_and_spt_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.drx_cfg_r15_present) { + j.write_fieldname("drx-Config-r15"); + c.drx_cfg_r15.to_json(j); + } + if (c.periodic_bsr_timer_r15_present) { + j.write_str("periodicBSR-Timer-r15", c.periodic_bsr_timer_r15.to_string()); + } + if (c.proc_timeline_r15_present) { + j.write_str("proc-Timeline-r15", c.proc_timeline_r15.to_string()); + } + if (c.ssr_prohibit_timer_r15_present) { + j.write_int("ssr-ProhibitTimer-r15", c.ssr_prohibit_timer_r15); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::short_tti_and_spt_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::short_tti_and_spt_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.drx_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.periodic_bsr_timer_r15_present, 1)); + HANDLE_CODE(bref.pack(c.proc_timeline_r15_present, 1)); + HANDLE_CODE(bref.pack(c.ssr_prohibit_timer_r15_present, 1)); + if (c.drx_cfg_r15_present) { + HANDLE_CODE(c.drx_cfg_r15.pack(bref)); + } + if (c.periodic_bsr_timer_r15_present) { + HANDLE_CODE(pack_enum(bref, c.periodic_bsr_timer_r15)); + } + if (c.proc_timeline_r15_present) { + HANDLE_CODE(pack_enum(bref, c.proc_timeline_r15)); + } + if (c.ssr_prohibit_timer_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ssr_prohibit_timer_r15, (uint8_t)0, (uint8_t)7)); + } + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::short_tti_and_spt_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::short_tti_and_spt_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.drx_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.periodic_bsr_timer_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.proc_timeline_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.ssr_prohibit_timer_r15_present, 1)); + if (c.drx_cfg_r15_present) { + HANDLE_CODE(c.drx_cfg_r15.unpack(bref)); + } + if (c.periodic_bsr_timer_r15_present) { + HANDLE_CODE(unpack_enum(c.periodic_bsr_timer_r15, bref)); + } + if (c.proc_timeline_r15_present) { + HANDLE_CODE(unpack_enum(c.proc_timeline_r15, bref)); + } + if (c.ssr_prohibit_timer_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.ssr_prohibit_timer_r15, bref, (uint8_t)0, (uint8_t)7)); + } + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::short_tti_and_spt_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::setup_s_() +{ + drx_cfg_r15_present = false; + periodic_bsr_timer_r15_present = false; + proc_timeline_r15_present = false; + ssr_prohibit_timer_r15_present = false; +} + +void mac_main_cfg_s::dormant_state_timers_r15_c_::set(types::options e) +{ + type_ = e; +} +void mac_main_cfg_s::dormant_state_timers_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.s_cell_hibernation_timer_r15_present) { + j.write_str("sCellHibernationTimer-r15", c.s_cell_hibernation_timer_r15.to_string()); + } + if (c.dormant_scell_deactivation_timer_r15_present) { + j.write_str("dormantSCellDeactivationTimer-r15", c.dormant_scell_deactivation_timer_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::dormant_state_timers_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE mac_main_cfg_s::dormant_state_timers_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.s_cell_hibernation_timer_r15_present, 1)); + HANDLE_CODE(bref.pack(c.dormant_scell_deactivation_timer_r15_present, 1)); + if (c.s_cell_hibernation_timer_r15_present) { + HANDLE_CODE(pack_enum(bref, c.s_cell_hibernation_timer_r15)); + } + if (c.dormant_scell_deactivation_timer_r15_present) { + HANDLE_CODE(pack_enum(bref, c.dormant_scell_deactivation_timer_r15)); + } + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::dormant_state_timers_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_s::dormant_state_timers_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.s_cell_hibernation_timer_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.dormant_scell_deactivation_timer_r15_present, 1)); + if (c.s_cell_hibernation_timer_r15_present) { + HANDLE_CODE(unpack_enum(c.s_cell_hibernation_timer_r15, bref)); + } + if (c.dormant_scell_deactivation_timer_r15_present) { + HANDLE_CODE(unpack_enum(c.dormant_scell_deactivation_timer_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "mac_main_cfg_s::dormant_state_timers_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::setup_s_() +{ + s_cell_hibernation_timer_r15_present = false; + dormant_scell_deactivation_timer_r15_present = false; +} + +// MeasSubframePatternPCell-r10 ::= CHOICE +void meas_sf_pattern_pcell_r10_c::set(types::options e) +{ + type_ = e; +} +void meas_sf_pattern_pcell_r10_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_pcell_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_sf_pattern_pcell_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_pcell_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_sf_pattern_pcell_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_pcell_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// NAICS-AssistanceInfo-r12 ::= CHOICE +void naics_assist_info_r12_c::set(types::options e) +{ + type_ = e; +} +void naics_assist_info_r12_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(); + if (c.neigh_cells_to_release_list_r12_present) { + j.start_array("neighCellsToReleaseList-r12"); + for (uint32_t i1 = 0; i1 < c.neigh_cells_to_release_list_r12.size(); ++i1) { + j.write_int(c.neigh_cells_to_release_list_r12[i1]); + } + j.end_array(); + } + if (c.neigh_cells_to_add_mod_list_r12_present) { + j.start_array("neighCellsToAddModList-r12"); + for (uint32_t i1 = 0; i1 < c.neigh_cells_to_add_mod_list_r12.size(); ++i1) { + c.neigh_cells_to_add_mod_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (c.serv_cellp_a_r12_present) { + j.write_str("servCellp-a-r12", c.serv_cellp_a_r12.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "naics_assist_info_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE naics_assist_info_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.neigh_cells_to_release_list_r12_present, 1)); + HANDLE_CODE(bref.pack(c.neigh_cells_to_add_mod_list_r12_present, 1)); + HANDLE_CODE(bref.pack(c.serv_cellp_a_r12_present, 1)); + if (c.neigh_cells_to_release_list_r12_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.neigh_cells_to_release_list_r12, 1, 8, UnalignedIntegerPacker(0, 503))); + } + if (c.neigh_cells_to_add_mod_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.neigh_cells_to_add_mod_list_r12, 1, 8)); + } + if (c.serv_cellp_a_r12_present) { + HANDLE_CODE(pack_enum(bref, c.serv_cellp_a_r12)); + } + break; + default: + log_invalid_choice_id(type_, "naics_assist_info_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE naics_assist_info_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.neigh_cells_to_release_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.neigh_cells_to_add_mod_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.serv_cellp_a_r12_present, 1)); + if (c.neigh_cells_to_release_list_r12_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.neigh_cells_to_release_list_r12, bref, 1, 8, UnalignedIntegerPacker(0, 503))); + } + if (c.neigh_cells_to_add_mod_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.neigh_cells_to_add_mod_list_r12, bref, 1, 8)); + } + if (c.serv_cellp_a_r12_present) { + HANDLE_CODE(unpack_enum(c.serv_cellp_a_r12, bref)); + } + break; + default: + log_invalid_choice_id(type_, "naics_assist_info_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +naics_assist_info_r12_c::setup_s_::setup_s_() +{ + neigh_cells_to_release_list_r12_present = false; + neigh_cells_to_add_mod_list_r12_present = false; + serv_cellp_a_r12_present = false; +} + +// NeighCellsCRS-Info-r11 ::= CHOICE +void neigh_cells_crs_info_r11_c::set(types::options e) +{ + type_ = e; +} +void neigh_cells_crs_info_r11_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r11_c"); + } + j.end_obj(); +} +SRSASN_CODE neigh_cells_crs_info_r11_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r11_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_crs_info_r11_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r11_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// NeighCellsCRS-Info-r13 ::= CHOICE +void neigh_cells_crs_info_r13_c::set(types::options e) +{ + type_ = e; +} +void neigh_cells_crs_info_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE neigh_cells_crs_info_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_crs_info_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// NeighCellsCRS-Info-r15 ::= CHOICE +void neigh_cells_crs_info_r15_c::set(types::options e) +{ + type_ = e; +} +void neigh_cells_crs_info_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE neigh_cells_crs_info_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cells_crs_info_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "neigh_cells_crs_info_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PhysicalConfigDedicated ::= SEQUENCE +phys_cfg_ded_s::phys_cfg_ded_s() +{ + ext = false; + pdsch_cfg_ded_present = false; + pucch_cfg_ded_present = false; + pusch_cfg_ded_present = false; + ul_pwr_ctrl_ded_present = false; + tpc_pdcch_cfg_pucch_present = false; + tpc_pdcch_cfg_pusch_present = false; + cqi_report_cfg_present = false; + srs_ul_cfg_ded_present = false; + ant_info_present = false; + sched_request_cfg_present = false; + cqi_report_cfg_v920_present = false; + ant_info_v920_present = false; + ant_info_r10_present = false; + ant_info_ul_r10_present = false; + cif_presence_r10_present = false; + cqi_report_cfg_r10_present = false; + csi_rs_cfg_r10_present = false; + pucch_cfg_ded_v1020_present = false; + pusch_cfg_ded_v1020_present = false; + sched_request_cfg_v1020_present = false; + srs_ul_cfg_ded_v1020_present = false; + srs_ul_cfg_ded_aperiodic_r10_present = false; + ul_pwr_ctrl_ded_v1020_present = false; + add_spec_emission_ca_r10_present = false; + csi_rs_cfg_nzp_to_release_list_r11_present = false; + csi_rs_cfg_nzp_to_add_mod_list_r11_present = false; + csi_rs_cfg_zp_to_release_list_r11_present = false; + csi_rs_cfg_zp_to_add_mod_list_r11_present = false; + epdcch_cfg_r11_present = false; + pdsch_cfg_ded_v1130_present = false; + cqi_report_cfg_v1130_present = false; + pucch_cfg_ded_v1130_present = false; + pusch_cfg_ded_v1130_present = false; + ul_pwr_ctrl_ded_v1130_present = false; + ant_info_v1250_present = false; + eimta_main_cfg_r12_present = false; + eimta_main_cfg_pcell_r12_present = false; + pucch_cfg_ded_v1250_present = false; + cqi_report_cfg_pcell_v1250_present = false; + ul_pwr_ctrl_ded_v1250_present = false; + pusch_cfg_ded_v1250_present = false; + csi_rs_cfg_v1250_present = false; + pdsch_cfg_ded_v1280_present = false; + pdsch_cfg_ded_v1310_present = false; + pucch_cfg_ded_r13_present = false; + pusch_cfg_ded_r13_present = false; + pdcch_candidate_reductions_r13_present = false; + cqi_report_cfg_v1310_present = false; + srs_ul_cfg_ded_v1310_present = false; + srs_ul_cfg_ded_up_pts_ext_r13_present = false; + srs_ul_cfg_ded_aperiodic_v1310_present = false; + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present = false; + csi_rs_cfg_v1310_present = false; + ce_mode_r13_present = false; + csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present = false; + csi_rs_cfg_nzp_to_release_list_ext_r13_present = false; + cqi_report_cfg_v1320_present = false; + type_a_srs_tpc_pdcch_group_r14_present = false; + must_cfg_r14_present = false; + pusch_enhance_cfg_r14_present = false; + ce_pdsch_pusch_enhancement_cfg_r14_present = false; + ant_info_v1430_present = false; + pucch_cfg_ded_v1430_present = false; + pdsch_cfg_ded_v1430_present = false; + pusch_cfg_ded_v1430_present = false; + srs_ul_periodic_cfg_ded_list_r14_present = false; + srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present = false; + srs_ul_aperiodic_cfg_ded_list_r14_present = false; + srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present = false; + csi_rs_cfg_v1430_present = false; + csi_rs_cfg_zp_ap_list_r14_present = false; + cqi_report_cfg_v1430_present = false; + semi_open_loop_r14_present = false; + csi_rs_cfg_v1480_present = false; + phys_cfg_ded_stti_r15_present = false; + pdsch_cfg_ded_v1530_present = false; + pusch_cfg_ded_v1530_present = false; + cqi_report_cfg_v1530_present = false; + ant_info_v1530_present = false; + csi_rs_cfg_v1530_present = false; + ul_pwr_ctrl_ded_v1530_present = false; + semi_static_cfi_cfg_r15_present = false; + blind_pdsch_repeat_cfg_r15_present = false; +} +SRSASN_CODE phys_cfg_ded_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_ded_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_present, 1)); + HANDLE_CODE(bref.pack(tpc_pdcch_cfg_pucch_present, 1)); + HANDLE_CODE(bref.pack(tpc_pdcch_cfg_pusch_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_present, 1)); + HANDLE_CODE(bref.pack(ant_info_present, 1)); + HANDLE_CODE(bref.pack(sched_request_cfg_present, 1)); + + if (pdsch_cfg_ded_present) { + HANDLE_CODE(pdsch_cfg_ded.pack(bref)); + } + if (pucch_cfg_ded_present) { + HANDLE_CODE(pucch_cfg_ded.pack(bref)); + } + if (pusch_cfg_ded_present) { + HANDLE_CODE(pusch_cfg_ded.pack(bref)); + } + if (ul_pwr_ctrl_ded_present) { + HANDLE_CODE(ul_pwr_ctrl_ded.pack(bref)); + } + if (tpc_pdcch_cfg_pucch_present) { + HANDLE_CODE(tpc_pdcch_cfg_pucch.pack(bref)); + } + if (tpc_pdcch_cfg_pusch_present) { + HANDLE_CODE(tpc_pdcch_cfg_pusch.pack(bref)); + } + if (cqi_report_cfg_present) { + HANDLE_CODE(cqi_report_cfg.pack(bref)); + } + if (srs_ul_cfg_ded_present) { + HANDLE_CODE(srs_ul_cfg_ded.pack(bref)); + } + if (ant_info_present) { + HANDLE_CODE(ant_info.pack(bref)); + } + if (sched_request_cfg_present) { + HANDLE_CODE(sched_request_cfg.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(11); + rrc_asn1_warn_assert(cqi_report_cfg_v920_present != (cqi_report_cfg_v920.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= cqi_report_cfg_v920_present; + rrc_asn1_warn_assert(ant_info_v920_present != (ant_info_v920.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= ant_info_v920_present; + rrc_asn1_warn_assert(ant_info_r10_present != (ant_info_r10.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= ant_info_r10_present; + rrc_asn1_warn_assert(ant_info_ul_r10_present != (ant_info_ul_r10.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= ant_info_ul_r10_present; + group_flags[1] |= cif_presence_r10_present; + rrc_asn1_warn_assert(cqi_report_cfg_r10_present != (cqi_report_cfg_r10.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= cqi_report_cfg_r10_present; + rrc_asn1_warn_assert(csi_rs_cfg_r10_present != (csi_rs_cfg_r10.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= csi_rs_cfg_r10_present; + rrc_asn1_warn_assert(pucch_cfg_ded_v1020_present != (pucch_cfg_ded_v1020.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= pucch_cfg_ded_v1020_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1020_present != (pusch_cfg_ded_v1020.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= pusch_cfg_ded_v1020_present; + rrc_asn1_warn_assert(sched_request_cfg_v1020_present != (sched_request_cfg_v1020.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= sched_request_cfg_v1020_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_v1020_present != (srs_ul_cfg_ded_v1020.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= srs_ul_cfg_ded_v1020_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_aperiodic_r10_present != (srs_ul_cfg_ded_aperiodic_r10.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= srs_ul_cfg_ded_aperiodic_r10_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_v1020_present != (ul_pwr_ctrl_ded_v1020.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= ul_pwr_ctrl_ded_v1020_present; + rrc_asn1_warn_assert(add_spec_emission_ca_r10_present != (add_spec_emission_ca_r10.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= add_spec_emission_ca_r10_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_release_list_r11_present != + (csi_rs_cfg_nzp_to_release_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_nzp_to_release_list_r11_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_add_mod_list_r11_present != + (csi_rs_cfg_nzp_to_add_mod_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_nzp_to_add_mod_list_r11_present; + rrc_asn1_warn_assert(csi_rs_cfg_zp_to_release_list_r11_present != (csi_rs_cfg_zp_to_release_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_zp_to_release_list_r11_present; + rrc_asn1_warn_assert(csi_rs_cfg_zp_to_add_mod_list_r11_present != (csi_rs_cfg_zp_to_add_mod_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_zp_to_add_mod_list_r11_present; + rrc_asn1_warn_assert(epdcch_cfg_r11_present != (epdcch_cfg_r11.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= epdcch_cfg_r11_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1130_present != (pdsch_cfg_ded_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pdsch_cfg_ded_v1130_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1130_present != (cqi_report_cfg_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= cqi_report_cfg_v1130_present; + rrc_asn1_warn_assert(pucch_cfg_ded_v1130_present != (pucch_cfg_ded_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pucch_cfg_ded_v1130_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1130_present != (pusch_cfg_ded_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pusch_cfg_ded_v1130_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_v1130_present != (ul_pwr_ctrl_ded_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= ul_pwr_ctrl_ded_v1130_present; + rrc_asn1_warn_assert(ant_info_v1250_present != (ant_info_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= ant_info_v1250_present; + rrc_asn1_warn_assert(eimta_main_cfg_r12_present != (eimta_main_cfg_r12.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= eimta_main_cfg_r12_present; + rrc_asn1_warn_assert(eimta_main_cfg_pcell_r12_present != (eimta_main_cfg_pcell_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= eimta_main_cfg_pcell_r12_present; + rrc_asn1_warn_assert(pucch_cfg_ded_v1250_present != (pucch_cfg_ded_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= pucch_cfg_ded_v1250_present; + rrc_asn1_warn_assert(cqi_report_cfg_pcell_v1250_present != (cqi_report_cfg_pcell_v1250.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= cqi_report_cfg_pcell_v1250_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_v1250_present != (ul_pwr_ctrl_ded_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= ul_pwr_ctrl_ded_v1250_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1250_present != (pusch_cfg_ded_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= pusch_cfg_ded_v1250_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1250_present != (csi_rs_cfg_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= csi_rs_cfg_v1250_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1280_present != (pdsch_cfg_ded_v1280.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= pdsch_cfg_ded_v1280_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1310_present != (pdsch_cfg_ded_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= pdsch_cfg_ded_v1310_present; + rrc_asn1_warn_assert(pucch_cfg_ded_r13_present != (pucch_cfg_ded_r13.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= pucch_cfg_ded_r13_present; + rrc_asn1_warn_assert(pusch_cfg_ded_r13_present != (pusch_cfg_ded_r13.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= pusch_cfg_ded_r13_present; + rrc_asn1_warn_assert(pdcch_candidate_reductions_r13_present != (pdcch_candidate_reductions_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= pdcch_candidate_reductions_r13_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1310_present != (cqi_report_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= cqi_report_cfg_v1310_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_v1310_present != (srs_ul_cfg_ded_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= srs_ul_cfg_ded_v1310_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_up_pts_ext_r13_present != (srs_ul_cfg_ded_up_pts_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= srs_ul_cfg_ded_up_pts_ext_r13_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_aperiodic_v1310_present != (srs_ul_cfg_ded_aperiodic_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= srs_ul_cfg_ded_aperiodic_v1310_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present != + (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1310_present != (csi_rs_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= csi_rs_cfg_v1310_present; + rrc_asn1_warn_assert(ce_mode_r13_present != (ce_mode_r13.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= ce_mode_r13_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present != + (csi_rs_cfg_nzp_to_add_mod_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_release_list_ext_r13_present != + (csi_rs_cfg_nzp_to_release_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= csi_rs_cfg_nzp_to_release_list_ext_r13_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1320_present != (cqi_report_cfg_v1320.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= cqi_report_cfg_v1320_present; + rrc_asn1_warn_assert(type_a_srs_tpc_pdcch_group_r14_present != (type_a_srs_tpc_pdcch_group_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[8] |= type_a_srs_tpc_pdcch_group_r14_present; + rrc_asn1_warn_assert(must_cfg_r14_present != (must_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= must_cfg_r14_present; + rrc_asn1_warn_assert(pusch_enhance_cfg_r14_present != (pusch_enhance_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= pusch_enhance_cfg_r14_present; + group_flags[8] |= ce_pdsch_pusch_enhancement_cfg_r14_present; + rrc_asn1_warn_assert(ant_info_v1430_present != (ant_info_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= ant_info_v1430_present; + rrc_asn1_warn_assert(pucch_cfg_ded_v1430_present != (pucch_cfg_ded_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= pucch_cfg_ded_v1430_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1430_present != (pdsch_cfg_ded_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= pdsch_cfg_ded_v1430_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1430_present != (pusch_cfg_ded_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= pusch_cfg_ded_v1430_present; + rrc_asn1_warn_assert(srs_ul_periodic_cfg_ded_list_r14_present != (srs_ul_periodic_cfg_ded_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[8] |= srs_ul_periodic_cfg_ded_list_r14_present; + rrc_asn1_warn_assert(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present != + (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[8] |= srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present; + rrc_asn1_warn_assert(srs_ul_aperiodic_cfg_ded_list_r14_present != (srs_ul_aperiodic_cfg_ded_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[8] |= srs_ul_aperiodic_cfg_ded_list_r14_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present != + (srs_ul_cfg_ded_ap_up_pts_ext_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[8] |= srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1430_present != (csi_rs_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= csi_rs_cfg_v1430_present; + rrc_asn1_warn_assert(csi_rs_cfg_zp_ap_list_r14_present != (csi_rs_cfg_zp_ap_list_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[8] |= csi_rs_cfg_zp_ap_list_r14_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1430_present != (cqi_report_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[8] |= cqi_report_cfg_v1430_present; + group_flags[8] |= semi_open_loop_r14_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1480_present != (csi_rs_cfg_v1480.get() != NULL), __FILE__, __LINE__); + group_flags[9] |= csi_rs_cfg_v1480_present; + rrc_asn1_warn_assert(phys_cfg_ded_stti_r15_present != (phys_cfg_ded_stti_r15.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= phys_cfg_ded_stti_r15_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1530_present != (pdsch_cfg_ded_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= pdsch_cfg_ded_v1530_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1530_present != (pusch_cfg_ded_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= pusch_cfg_ded_v1530_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1530_present != (cqi_report_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= cqi_report_cfg_v1530_present; + rrc_asn1_warn_assert(ant_info_v1530_present != (ant_info_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= ant_info_v1530_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1530_present != (csi_rs_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= csi_rs_cfg_v1530_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_v1530_present != (ul_pwr_ctrl_ded_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[10] |= ul_pwr_ctrl_ded_v1530_present; + rrc_asn1_warn_assert(semi_static_cfi_cfg_r15_present != (semi_static_cfi_cfg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[10] |= semi_static_cfi_cfg_r15_present; + rrc_asn1_warn_assert(blind_pdsch_repeat_cfg_r15_present != (blind_pdsch_repeat_cfg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[10] |= blind_pdsch_repeat_cfg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cqi_report_cfg_v920_present, 1)); + HANDLE_CODE(bref.pack(ant_info_v920_present, 1)); + if (cqi_report_cfg_v920_present) { + HANDLE_CODE(cqi_report_cfg_v920->pack(bref)); + } + if (ant_info_v920_present) { + HANDLE_CODE(ant_info_v920->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ant_info_r10_present, 1)); + HANDLE_CODE(bref.pack(ant_info_ul_r10_present, 1)); + HANDLE_CODE(bref.pack(cif_presence_r10_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.pack(sched_request_cfg_v1020_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_aperiodic_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_v1020_present, 1)); + if (ant_info_r10_present) { + HANDLE_CODE(ant_info_r10->pack(bref)); + } + if (ant_info_ul_r10_present) { + HANDLE_CODE(ant_info_ul_r10->pack(bref)); + } + if (cif_presence_r10_present) { + HANDLE_CODE(bref.pack(cif_presence_r10, 1)); + } + if (cqi_report_cfg_r10_present) { + HANDLE_CODE(cqi_report_cfg_r10->pack(bref)); + } + if (csi_rs_cfg_r10_present) { + HANDLE_CODE(csi_rs_cfg_r10->pack(bref)); + } + if (pucch_cfg_ded_v1020_present) { + HANDLE_CODE(pucch_cfg_ded_v1020->pack(bref)); + } + if (pusch_cfg_ded_v1020_present) { + HANDLE_CODE(pusch_cfg_ded_v1020->pack(bref)); + } + if (sched_request_cfg_v1020_present) { + HANDLE_CODE(sched_request_cfg_v1020->pack(bref)); + } + if (srs_ul_cfg_ded_v1020_present) { + HANDLE_CODE(srs_ul_cfg_ded_v1020->pack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_r10_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_r10->pack(bref)); + } + if (ul_pwr_ctrl_ded_v1020_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_v1020->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(add_spec_emission_ca_r10_present, 1)); + if (add_spec_emission_ca_r10_present) { + HANDLE_CODE(add_spec_emission_ca_r10->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(epdcch_cfg_r11_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_v1130_present, 1)); + if (csi_rs_cfg_nzp_to_release_list_r11_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_release_list_r11, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (csi_rs_cfg_nzp_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_add_mod_list_r11, 1, 3)); + } + if (csi_rs_cfg_zp_to_release_list_r11_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *csi_rs_cfg_zp_to_release_list_r11, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (csi_rs_cfg_zp_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_zp_to_add_mod_list_r11, 1, 4)); + } + if (epdcch_cfg_r11_present) { + HANDLE_CODE(epdcch_cfg_r11->pack(bref)); + } + if (pdsch_cfg_ded_v1130_present) { + HANDLE_CODE(pdsch_cfg_ded_v1130->pack(bref)); + } + if (cqi_report_cfg_v1130_present) { + HANDLE_CODE(cqi_report_cfg_v1130->pack(bref)); + } + if (pucch_cfg_ded_v1130_present) { + HANDLE_CODE(pucch_cfg_ded_v1130->pack(bref)); + } + if (pusch_cfg_ded_v1130_present) { + HANDLE_CODE(pusch_cfg_ded_v1130->pack(bref)); + } + if (ul_pwr_ctrl_ded_v1130_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_v1130->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ant_info_v1250_present, 1)); + HANDLE_CODE(bref.pack(eimta_main_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(eimta_main_cfg_pcell_r12_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_ded_v1250_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_pcell_v1250_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_v1250_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1250_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1250_present, 1)); + if (ant_info_v1250_present) { + HANDLE_CODE(ant_info_v1250->pack(bref)); + } + if (eimta_main_cfg_r12_present) { + HANDLE_CODE(eimta_main_cfg_r12->pack(bref)); + } + if (eimta_main_cfg_pcell_r12_present) { + HANDLE_CODE(eimta_main_cfg_pcell_r12->pack(bref)); + } + if (pucch_cfg_ded_v1250_present) { + HANDLE_CODE(pucch_cfg_ded_v1250->pack(bref)); + } + if (cqi_report_cfg_pcell_v1250_present) { + HANDLE_CODE(cqi_report_cfg_pcell_v1250->pack(bref)); + } + if (ul_pwr_ctrl_ded_v1250_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_v1250->pack(bref)); + } + if (pusch_cfg_ded_v1250_present) { + HANDLE_CODE(pusch_cfg_ded_v1250->pack(bref)); + } + if (csi_rs_cfg_v1250_present) { + HANDLE_CODE(csi_rs_cfg_v1250->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1280_present, 1)); + if (pdsch_cfg_ded_v1280_present) { + HANDLE_CODE(pdsch_cfg_ded_v1280->pack(bref)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(pdcch_candidate_reductions_r13_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_aperiodic_v1310_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(ce_mode_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_release_list_ext_r13_present, 1)); + if (pdsch_cfg_ded_v1310_present) { + HANDLE_CODE(pdsch_cfg_ded_v1310->pack(bref)); + } + if (pucch_cfg_ded_r13_present) { + HANDLE_CODE(pucch_cfg_ded_r13->pack(bref)); + } + if (pusch_cfg_ded_r13_present) { + HANDLE_CODE(pusch_cfg_ded_r13->pack(bref)); + } + if (pdcch_candidate_reductions_r13_present) { + HANDLE_CODE(pdcch_candidate_reductions_r13->pack(bref)); + } + if (cqi_report_cfg_v1310_present) { + HANDLE_CODE(cqi_report_cfg_v1310->pack(bref)); + } + if (srs_ul_cfg_ded_v1310_present) { + HANDLE_CODE(srs_ul_cfg_ded_v1310->pack(bref)); + } + if (srs_ul_cfg_ded_up_pts_ext_r13_present) { + HANDLE_CODE(srs_ul_cfg_ded_up_pts_ext_r13->pack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_v1310_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_v1310->pack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13->pack(bref)); + } + if (csi_rs_cfg_v1310_present) { + HANDLE_CODE(csi_rs_cfg_v1310->pack(bref)); + } + if (ce_mode_r13_present) { + HANDLE_CODE(ce_mode_r13->pack(bref)); + } + if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_add_mod_list_ext_r13, 1, 21)); + } + if (csi_rs_cfg_nzp_to_release_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_release_list_ext_r13, 1, 21, + UnalignedIntegerPacker(4, 24))); + } + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cqi_report_cfg_v1320_present, 1)); + if (cqi_report_cfg_v1320_present) { + HANDLE_CODE(cqi_report_cfg_v1320->pack(bref)); + } + } + if (group_flags[8]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(type_a_srs_tpc_pdcch_group_r14_present, 1)); + HANDLE_CODE(bref.pack(must_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(pusch_enhance_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_pusch_enhancement_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(ant_info_v1430_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_periodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_aperiodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(semi_open_loop_r14_present, 1)); + if (type_a_srs_tpc_pdcch_group_r14_present) { + HANDLE_CODE(type_a_srs_tpc_pdcch_group_r14->pack(bref)); + } + if (must_cfg_r14_present) { + HANDLE_CODE(must_cfg_r14->pack(bref)); + } + if (pusch_enhance_cfg_r14_present) { + HANDLE_CODE(pusch_enhance_cfg_r14->pack(bref)); + } + if (ant_info_v1430_present) { + HANDLE_CODE(ant_info_v1430->pack(bref)); + } + if (pucch_cfg_ded_v1430_present) { + HANDLE_CODE(pucch_cfg_ded_v1430->pack(bref)); + } + if (pdsch_cfg_ded_v1430_present) { + HANDLE_CODE(pdsch_cfg_ded_v1430->pack(bref)); + } + if (pusch_cfg_ded_v1430_present) { + HANDLE_CODE(pusch_cfg_ded_v1430->pack(bref)); + } + if (srs_ul_periodic_cfg_ded_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_periodic_cfg_ded_list_r14, 1, 2)); + } + if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_periodic_cfg_ded_up_pts_ext_list_r14, 1, 4)); + } + if (srs_ul_aperiodic_cfg_ded_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_aperiodic_cfg_ded_list_r14, 1, 2)); + } + if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_cfg_ded_ap_up_pts_ext_list_r14, 1, 4)); + } + if (csi_rs_cfg_v1430_present) { + HANDLE_CODE(csi_rs_cfg_v1430->pack(bref)); + } + if (csi_rs_cfg_zp_ap_list_r14_present) { + HANDLE_CODE(csi_rs_cfg_zp_ap_list_r14->pack(bref)); + } + if (cqi_report_cfg_v1430_present) { + HANDLE_CODE(cqi_report_cfg_v1430->pack(bref)); + } + if (semi_open_loop_r14_present) { + HANDLE_CODE(bref.pack(semi_open_loop_r14, 1)); + } + } + if (group_flags[9]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csi_rs_cfg_v1480_present, 1)); + if (csi_rs_cfg_v1480_present) { + HANDLE_CODE(csi_rs_cfg_v1480->pack(bref)); + } + } + if (group_flags[10]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(phys_cfg_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(ant_info_v1530_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_v1530_present, 1)); + HANDLE_CODE(bref.pack(semi_static_cfi_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(blind_pdsch_repeat_cfg_r15_present, 1)); + if (phys_cfg_ded_stti_r15_present) { + HANDLE_CODE(phys_cfg_ded_stti_r15->pack(bref)); + } + if (pdsch_cfg_ded_v1530_present) { + HANDLE_CODE(pdsch_cfg_ded_v1530->pack(bref)); + } + if (pusch_cfg_ded_v1530_present) { + HANDLE_CODE(pusch_cfg_ded_v1530->pack(bref)); + } + if (cqi_report_cfg_v1530_present) { + HANDLE_CODE(cqi_report_cfg_v1530->pack(bref)); + } + if (ant_info_v1530_present) { + HANDLE_CODE(ant_info_v1530->pack(bref)); + } + if (csi_rs_cfg_v1530_present) { + HANDLE_CODE(csi_rs_cfg_v1530->pack(bref)); + } + if (ul_pwr_ctrl_ded_v1530_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_v1530->pack(bref)); + } + if (semi_static_cfi_cfg_r15_present) { + HANDLE_CODE(semi_static_cfi_cfg_r15->pack(bref)); + } + if (blind_pdsch_repeat_cfg_r15_present) { + HANDLE_CODE(blind_pdsch_repeat_cfg_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_ded_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pdcch_cfg_pucch_present, 1)); + HANDLE_CODE(bref.unpack(tpc_pdcch_cfg_pusch_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_cfg_present, 1)); + + if (pdsch_cfg_ded_present) { + HANDLE_CODE(pdsch_cfg_ded.unpack(bref)); + } + if (pucch_cfg_ded_present) { + HANDLE_CODE(pucch_cfg_ded.unpack(bref)); + } + if (pusch_cfg_ded_present) { + HANDLE_CODE(pusch_cfg_ded.unpack(bref)); + } + if (ul_pwr_ctrl_ded_present) { + HANDLE_CODE(ul_pwr_ctrl_ded.unpack(bref)); + } + if (tpc_pdcch_cfg_pucch_present) { + HANDLE_CODE(tpc_pdcch_cfg_pucch.unpack(bref)); + } + if (tpc_pdcch_cfg_pusch_present) { + HANDLE_CODE(tpc_pdcch_cfg_pusch.unpack(bref)); + } + if (cqi_report_cfg_present) { + HANDLE_CODE(cqi_report_cfg.unpack(bref)); + } + if (srs_ul_cfg_ded_present) { + HANDLE_CODE(srs_ul_cfg_ded.unpack(bref)); + } + if (ant_info_present) { + HANDLE_CODE(ant_info.unpack(bref)); + } + if (sched_request_cfg_present) { + HANDLE_CODE(sched_request_cfg.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(11); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cqi_report_cfg_v920_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_v920_present, 1)); + if (cqi_report_cfg_v920_present) { + cqi_report_cfg_v920 = make_copy_ptr(cqi_report_cfg_v920_s()); + HANDLE_CODE(cqi_report_cfg_v920->unpack(bref)); + } + if (ant_info_v920_present) { + ant_info_v920 = make_copy_ptr(ant_info_ded_v920_s()); + HANDLE_CODE(ant_info_v920->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ant_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_ul_r10_present, 1)); + HANDLE_CODE(bref.unpack(cif_presence_r10_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.unpack(sched_request_cfg_v1020_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_aperiodic_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_v1020_present, 1)); + if (ant_info_r10_present) { + ant_info_r10 = make_copy_ptr(ant_info_r10_c_()); + HANDLE_CODE(ant_info_r10->unpack(bref)); + } + if (ant_info_ul_r10_present) { + ant_info_ul_r10 = make_copy_ptr(ant_info_ul_r10_s()); + HANDLE_CODE(ant_info_ul_r10->unpack(bref)); + } + if (cif_presence_r10_present) { + HANDLE_CODE(bref.unpack(cif_presence_r10, 1)); + } + if (cqi_report_cfg_r10_present) { + cqi_report_cfg_r10 = make_copy_ptr(cqi_report_cfg_r10_s()); + HANDLE_CODE(cqi_report_cfg_r10->unpack(bref)); + } + if (csi_rs_cfg_r10_present) { + csi_rs_cfg_r10 = make_copy_ptr(csi_rs_cfg_r10_s()); + HANDLE_CODE(csi_rs_cfg_r10->unpack(bref)); + } + if (pucch_cfg_ded_v1020_present) { + pucch_cfg_ded_v1020 = make_copy_ptr(pucch_cfg_ded_v1020_s()); + HANDLE_CODE(pucch_cfg_ded_v1020->unpack(bref)); + } + if (pusch_cfg_ded_v1020_present) { + pusch_cfg_ded_v1020 = make_copy_ptr(pusch_cfg_ded_v1020_s()); + HANDLE_CODE(pusch_cfg_ded_v1020->unpack(bref)); + } + if (sched_request_cfg_v1020_present) { + sched_request_cfg_v1020 = make_copy_ptr(sched_request_cfg_v1020_s()); + HANDLE_CODE(sched_request_cfg_v1020->unpack(bref)); + } + if (srs_ul_cfg_ded_v1020_present) { + srs_ul_cfg_ded_v1020 = make_copy_ptr(srs_ul_cfg_ded_v1020_s()); + HANDLE_CODE(srs_ul_cfg_ded_v1020->unpack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_r10_present) { + srs_ul_cfg_ded_aperiodic_r10 = make_copy_ptr(srs_ul_cfg_ded_aperiodic_r10_c()); + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_r10->unpack(bref)); + } + if (ul_pwr_ctrl_ded_v1020_present) { + ul_pwr_ctrl_ded_v1020 = make_copy_ptr(ul_pwr_ctrl_ded_v1020_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_v1020->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(add_spec_emission_ca_r10_present, 1)); + if (add_spec_emission_ca_r10_present) { + add_spec_emission_ca_r10 = make_copy_ptr(add_spec_emission_ca_r10_c_()); + HANDLE_CODE(add_spec_emission_ca_r10->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(epdcch_cfg_r11_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_v1130_present, 1)); + if (csi_rs_cfg_nzp_to_release_list_r11_present) { + csi_rs_cfg_nzp_to_release_list_r11 = make_copy_ptr(csi_rs_cfg_nzp_to_release_list_r11_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_release_list_r11, bref, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (csi_rs_cfg_nzp_to_add_mod_list_r11_present) { + csi_rs_cfg_nzp_to_add_mod_list_r11 = make_copy_ptr(csi_rs_cfg_nzp_to_add_mod_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_add_mod_list_r11, bref, 1, 3)); + } + if (csi_rs_cfg_zp_to_release_list_r11_present) { + csi_rs_cfg_zp_to_release_list_r11 = make_copy_ptr(csi_rs_cfg_zp_to_release_list_r11_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*csi_rs_cfg_zp_to_release_list_r11, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (csi_rs_cfg_zp_to_add_mod_list_r11_present) { + csi_rs_cfg_zp_to_add_mod_list_r11 = make_copy_ptr(csi_rs_cfg_zp_to_add_mod_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_zp_to_add_mod_list_r11, bref, 1, 4)); + } + if (epdcch_cfg_r11_present) { + epdcch_cfg_r11 = make_copy_ptr(epdcch_cfg_r11_s()); + HANDLE_CODE(epdcch_cfg_r11->unpack(bref)); + } + if (pdsch_cfg_ded_v1130_present) { + pdsch_cfg_ded_v1130 = make_copy_ptr(pdsch_cfg_ded_v1130_s()); + HANDLE_CODE(pdsch_cfg_ded_v1130->unpack(bref)); + } + if (cqi_report_cfg_v1130_present) { + cqi_report_cfg_v1130 = make_copy_ptr(cqi_report_cfg_v1130_s()); + HANDLE_CODE(cqi_report_cfg_v1130->unpack(bref)); + } + if (pucch_cfg_ded_v1130_present) { + pucch_cfg_ded_v1130 = make_copy_ptr(pucch_cfg_ded_v1130_s()); + HANDLE_CODE(pucch_cfg_ded_v1130->unpack(bref)); + } + if (pusch_cfg_ded_v1130_present) { + pusch_cfg_ded_v1130 = make_copy_ptr(pusch_cfg_ded_v1130_s()); + HANDLE_CODE(pusch_cfg_ded_v1130->unpack(bref)); + } + if (ul_pwr_ctrl_ded_v1130_present) { + ul_pwr_ctrl_ded_v1130 = make_copy_ptr(ul_pwr_ctrl_ded_v1130_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_v1130->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ant_info_v1250_present, 1)); + HANDLE_CODE(bref.unpack(eimta_main_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(eimta_main_cfg_pcell_r12_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_ded_v1250_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_pcell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_v1250_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1250_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1250_present, 1)); + if (ant_info_v1250_present) { + ant_info_v1250 = make_copy_ptr(ant_info_ded_v1250_s()); + HANDLE_CODE(ant_info_v1250->unpack(bref)); + } + if (eimta_main_cfg_r12_present) { + eimta_main_cfg_r12 = make_copy_ptr(eimta_main_cfg_r12_c()); + HANDLE_CODE(eimta_main_cfg_r12->unpack(bref)); + } + if (eimta_main_cfg_pcell_r12_present) { + eimta_main_cfg_pcell_r12 = make_copy_ptr(eimta_main_cfg_serv_cell_r12_c()); + HANDLE_CODE(eimta_main_cfg_pcell_r12->unpack(bref)); + } + if (pucch_cfg_ded_v1250_present) { + pucch_cfg_ded_v1250 = make_copy_ptr(pucch_cfg_ded_v1250_s()); + HANDLE_CODE(pucch_cfg_ded_v1250->unpack(bref)); + } + if (cqi_report_cfg_pcell_v1250_present) { + cqi_report_cfg_pcell_v1250 = make_copy_ptr(cqi_report_cfg_v1250_s()); + HANDLE_CODE(cqi_report_cfg_pcell_v1250->unpack(bref)); + } + if (ul_pwr_ctrl_ded_v1250_present) { + ul_pwr_ctrl_ded_v1250 = make_copy_ptr(ul_pwr_ctrl_ded_v1250_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_v1250->unpack(bref)); + } + if (pusch_cfg_ded_v1250_present) { + pusch_cfg_ded_v1250 = make_copy_ptr(pusch_cfg_ded_v1250_s()); + HANDLE_CODE(pusch_cfg_ded_v1250->unpack(bref)); + } + if (csi_rs_cfg_v1250_present) { + csi_rs_cfg_v1250 = make_copy_ptr(csi_rs_cfg_v1250_s()); + HANDLE_CODE(csi_rs_cfg_v1250->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1280_present, 1)); + if (pdsch_cfg_ded_v1280_present) { + pdsch_cfg_ded_v1280 = make_copy_ptr(pdsch_cfg_ded_v1280_s()); + HANDLE_CODE(pdsch_cfg_ded_v1280->unpack(bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_candidate_reductions_r13_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_aperiodic_v1310_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(ce_mode_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_release_list_ext_r13_present, 1)); + if (pdsch_cfg_ded_v1310_present) { + pdsch_cfg_ded_v1310 = make_copy_ptr(pdsch_cfg_ded_v1310_s()); + HANDLE_CODE(pdsch_cfg_ded_v1310->unpack(bref)); + } + if (pucch_cfg_ded_r13_present) { + pucch_cfg_ded_r13 = make_copy_ptr(pucch_cfg_ded_r13_s()); + HANDLE_CODE(pucch_cfg_ded_r13->unpack(bref)); + } + if (pusch_cfg_ded_r13_present) { + pusch_cfg_ded_r13 = make_copy_ptr(pusch_cfg_ded_r13_s()); + HANDLE_CODE(pusch_cfg_ded_r13->unpack(bref)); + } + if (pdcch_candidate_reductions_r13_present) { + pdcch_candidate_reductions_r13 = make_copy_ptr(pdcch_candidate_reductions_r13_c()); + HANDLE_CODE(pdcch_candidate_reductions_r13->unpack(bref)); + } + if (cqi_report_cfg_v1310_present) { + cqi_report_cfg_v1310 = make_copy_ptr(cqi_report_cfg_v1310_s()); + HANDLE_CODE(cqi_report_cfg_v1310->unpack(bref)); + } + if (srs_ul_cfg_ded_v1310_present) { + srs_ul_cfg_ded_v1310 = make_copy_ptr(srs_ul_cfg_ded_v1310_c()); + HANDLE_CODE(srs_ul_cfg_ded_v1310->unpack(bref)); + } + if (srs_ul_cfg_ded_up_pts_ext_r13_present) { + srs_ul_cfg_ded_up_pts_ext_r13 = make_copy_ptr(srs_ul_cfg_ded_up_pts_ext_r13_c()); + HANDLE_CODE(srs_ul_cfg_ded_up_pts_ext_r13->unpack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_v1310_present) { + srs_ul_cfg_ded_aperiodic_v1310 = make_copy_ptr(srs_ul_cfg_ded_aperiodic_v1310_c()); + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_v1310->unpack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present) { + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13 = make_copy_ptr(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c()); + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13->unpack(bref)); + } + if (csi_rs_cfg_v1310_present) { + csi_rs_cfg_v1310 = make_copy_ptr(csi_rs_cfg_v1310_s()); + HANDLE_CODE(csi_rs_cfg_v1310->unpack(bref)); + } + if (ce_mode_r13_present) { + ce_mode_r13 = make_copy_ptr(ce_mode_r13_c_()); + HANDLE_CODE(ce_mode_r13->unpack(bref)); + } + if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present) { + csi_rs_cfg_nzp_to_add_mod_list_ext_r13 = make_copy_ptr(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_add_mod_list_ext_r13, bref, 1, 21)); + } + if (csi_rs_cfg_nzp_to_release_list_ext_r13_present) { + csi_rs_cfg_nzp_to_release_list_ext_r13 = make_copy_ptr(csi_rs_cfg_nzp_to_release_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_release_list_ext_r13, bref, 1, 21, + UnalignedIntegerPacker(4, 24))); + } + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1320_present, 1)); + if (cqi_report_cfg_v1320_present) { + cqi_report_cfg_v1320 = make_copy_ptr(cqi_report_cfg_v1320_s()); + HANDLE_CODE(cqi_report_cfg_v1320->unpack(bref)); + } + } + if (group_flags[8]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(type_a_srs_tpc_pdcch_group_r14_present, 1)); + HANDLE_CODE(bref.unpack(must_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(pusch_enhance_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_pusch_enhancement_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_v1430_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_periodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_aperiodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(semi_open_loop_r14_present, 1)); + if (type_a_srs_tpc_pdcch_group_r14_present) { + type_a_srs_tpc_pdcch_group_r14 = make_copy_ptr(type_a_srs_tpc_pdcch_group_r14_c_()); + HANDLE_CODE(type_a_srs_tpc_pdcch_group_r14->unpack(bref)); + } + if (must_cfg_r14_present) { + must_cfg_r14 = make_copy_ptr(must_cfg_r14_c_()); + HANDLE_CODE(must_cfg_r14->unpack(bref)); + } + if (pusch_enhance_cfg_r14_present) { + pusch_enhance_cfg_r14 = make_copy_ptr(pusch_enhance_cfg_r14_c()); + HANDLE_CODE(pusch_enhance_cfg_r14->unpack(bref)); + } + if (ant_info_v1430_present) { + ant_info_v1430 = make_copy_ptr(ant_info_ded_v1430_s()); + HANDLE_CODE(ant_info_v1430->unpack(bref)); + } + if (pucch_cfg_ded_v1430_present) { + pucch_cfg_ded_v1430 = make_copy_ptr(pucch_cfg_ded_v1430_s()); + HANDLE_CODE(pucch_cfg_ded_v1430->unpack(bref)); + } + if (pdsch_cfg_ded_v1430_present) { + pdsch_cfg_ded_v1430 = make_copy_ptr(pdsch_cfg_ded_v1430_s()); + HANDLE_CODE(pdsch_cfg_ded_v1430->unpack(bref)); + } + if (pusch_cfg_ded_v1430_present) { + pusch_cfg_ded_v1430 = make_copy_ptr(pusch_cfg_ded_v1430_s()); + HANDLE_CODE(pusch_cfg_ded_v1430->unpack(bref)); + } + if (srs_ul_periodic_cfg_ded_list_r14_present) { + srs_ul_periodic_cfg_ded_list_r14 = make_copy_ptr(srs_ul_periodic_cfg_ded_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_periodic_cfg_ded_list_r14, bref, 1, 2)); + } + if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present) { + srs_ul_periodic_cfg_ded_up_pts_ext_list_r14 = make_copy_ptr(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_periodic_cfg_ded_up_pts_ext_list_r14, bref, 1, 4)); + } + if (srs_ul_aperiodic_cfg_ded_list_r14_present) { + srs_ul_aperiodic_cfg_ded_list_r14 = make_copy_ptr(srs_ul_aperiodic_cfg_ded_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_aperiodic_cfg_ded_list_r14, bref, 1, 2)); + } + if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present) { + srs_ul_cfg_ded_ap_up_pts_ext_list_r14 = make_copy_ptr(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_cfg_ded_ap_up_pts_ext_list_r14, bref, 1, 4)); + } + if (csi_rs_cfg_v1430_present) { + csi_rs_cfg_v1430 = make_copy_ptr(csi_rs_cfg_v1430_s()); + HANDLE_CODE(csi_rs_cfg_v1430->unpack(bref)); + } + if (csi_rs_cfg_zp_ap_list_r14_present) { + csi_rs_cfg_zp_ap_list_r14 = make_copy_ptr(csi_rs_cfg_zp_ap_list_r14_c()); + HANDLE_CODE(csi_rs_cfg_zp_ap_list_r14->unpack(bref)); + } + if (cqi_report_cfg_v1430_present) { + cqi_report_cfg_v1430 = make_copy_ptr(cqi_report_cfg_v1430_s()); + HANDLE_CODE(cqi_report_cfg_v1430->unpack(bref)); + } + if (semi_open_loop_r14_present) { + HANDLE_CODE(bref.unpack(semi_open_loop_r14, 1)); + } + } + if (group_flags[9]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1480_present, 1)); + if (csi_rs_cfg_v1480_present) { + csi_rs_cfg_v1480 = make_copy_ptr(csi_rs_cfg_v1480_s()); + HANDLE_CODE(csi_rs_cfg_v1480->unpack(bref)); + } + } + if (group_flags[10]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(phys_cfg_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_v1530_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_v1530_present, 1)); + HANDLE_CODE(bref.unpack(semi_static_cfi_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(blind_pdsch_repeat_cfg_r15_present, 1)); + if (phys_cfg_ded_stti_r15_present) { + phys_cfg_ded_stti_r15 = make_copy_ptr(phys_cfg_ded_stti_r15_c()); + HANDLE_CODE(phys_cfg_ded_stti_r15->unpack(bref)); + } + if (pdsch_cfg_ded_v1530_present) { + pdsch_cfg_ded_v1530 = make_copy_ptr(pdsch_cfg_ded_v1530_s()); + HANDLE_CODE(pdsch_cfg_ded_v1530->unpack(bref)); + } + if (pusch_cfg_ded_v1530_present) { + pusch_cfg_ded_v1530 = make_copy_ptr(pusch_cfg_ded_v1530_s()); + HANDLE_CODE(pusch_cfg_ded_v1530->unpack(bref)); + } + if (cqi_report_cfg_v1530_present) { + cqi_report_cfg_v1530 = make_copy_ptr(cqi_report_cfg_v1530_s()); + HANDLE_CODE(cqi_report_cfg_v1530->unpack(bref)); + } + if (ant_info_v1530_present) { + ant_info_v1530 = make_copy_ptr(ant_info_ded_v1530_c()); + HANDLE_CODE(ant_info_v1530->unpack(bref)); + } + if (csi_rs_cfg_v1530_present) { + csi_rs_cfg_v1530 = make_copy_ptr(csi_rs_cfg_v1530_s()); + HANDLE_CODE(csi_rs_cfg_v1530->unpack(bref)); + } + if (ul_pwr_ctrl_ded_v1530_present) { + ul_pwr_ctrl_ded_v1530 = make_copy_ptr(ul_pwr_ctrl_ded_v1530_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_v1530->unpack(bref)); + } + if (semi_static_cfi_cfg_r15_present) { + semi_static_cfi_cfg_r15 = make_copy_ptr(semi_static_cfi_cfg_r15_c_()); + HANDLE_CODE(semi_static_cfi_cfg_r15->unpack(bref)); + } + if (blind_pdsch_repeat_cfg_r15_present) { + blind_pdsch_repeat_cfg_r15 = make_copy_ptr(blind_pdsch_repeat_cfg_r15_c_()); + HANDLE_CODE(blind_pdsch_repeat_cfg_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void phys_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdsch_cfg_ded_present) { + j.write_fieldname("pdsch-ConfigDedicated"); + pdsch_cfg_ded.to_json(j); + } + if (pucch_cfg_ded_present) { + j.write_fieldname("pucch-ConfigDedicated"); + pucch_cfg_ded.to_json(j); + } + if (pusch_cfg_ded_present) { + j.write_fieldname("pusch-ConfigDedicated"); + pusch_cfg_ded.to_json(j); + } + if (ul_pwr_ctrl_ded_present) { + j.write_fieldname("uplinkPowerControlDedicated"); + ul_pwr_ctrl_ded.to_json(j); + } + if (tpc_pdcch_cfg_pucch_present) { + j.write_fieldname("tpc-PDCCH-ConfigPUCCH"); + tpc_pdcch_cfg_pucch.to_json(j); + } + if (tpc_pdcch_cfg_pusch_present) { + j.write_fieldname("tpc-PDCCH-ConfigPUSCH"); + tpc_pdcch_cfg_pusch.to_json(j); + } + if (cqi_report_cfg_present) { + j.write_fieldname("cqi-ReportConfig"); + cqi_report_cfg.to_json(j); + } + if (srs_ul_cfg_ded_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicated"); + srs_ul_cfg_ded.to_json(j); + } + if (ant_info_present) { + j.write_fieldname("antennaInfo"); + ant_info.to_json(j); + } + if (sched_request_cfg_present) { + j.write_fieldname("schedulingRequestConfig"); + sched_request_cfg.to_json(j); + } + if (cqi_report_cfg_v920_present) { + j.write_fieldname("cqi-ReportConfig-v920"); + cqi_report_cfg_v920->to_json(j); + } + if (ant_info_v920_present) { + j.write_fieldname("antennaInfo-v920"); + ant_info_v920->to_json(j); + } + if (ant_info_r10_present) { + j.write_fieldname("antennaInfo-r10"); + ant_info_r10->to_json(j); + } + if (ant_info_ul_r10_present) { + j.write_fieldname("antennaInfoUL-r10"); + ant_info_ul_r10->to_json(j); + } + if (cif_presence_r10_present) { + j.write_bool("cif-Presence-r10", cif_presence_r10); + } + if (cqi_report_cfg_r10_present) { + j.write_fieldname("cqi-ReportConfig-r10"); + cqi_report_cfg_r10->to_json(j); + } + if (csi_rs_cfg_r10_present) { + j.write_fieldname("csi-RS-Config-r10"); + csi_rs_cfg_r10->to_json(j); + } + if (pucch_cfg_ded_v1020_present) { + j.write_fieldname("pucch-ConfigDedicated-v1020"); + pucch_cfg_ded_v1020->to_json(j); + } + if (pusch_cfg_ded_v1020_present) { + j.write_fieldname("pusch-ConfigDedicated-v1020"); + pusch_cfg_ded_v1020->to_json(j); + } + if (sched_request_cfg_v1020_present) { + j.write_fieldname("schedulingRequestConfig-v1020"); + sched_request_cfg_v1020->to_json(j); + } + if (srs_ul_cfg_ded_v1020_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicated-v1020"); + srs_ul_cfg_ded_v1020->to_json(j); + } + if (srs_ul_cfg_ded_aperiodic_r10_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodic-r10"); + srs_ul_cfg_ded_aperiodic_r10->to_json(j); + } + if (ul_pwr_ctrl_ded_v1020_present) { + j.write_fieldname("uplinkPowerControlDedicated-v1020"); + ul_pwr_ctrl_ded_v1020->to_json(j); + } + if (add_spec_emission_ca_r10_present) { + j.write_fieldname("additionalSpectrumEmissionCA-r10"); + add_spec_emission_ca_r10->to_json(j); + } + if (csi_rs_cfg_nzp_to_release_list_r11_present) { + j.start_array("csi-RS-ConfigNZPToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_r11->size(); ++i1) { + j.write_int(((*csi_rs_cfg_nzp_to_release_list_r11)[i1])); + } + j.end_array(); + } + if (csi_rs_cfg_nzp_to_add_mod_list_r11_present) { + j.start_array("csi-RS-ConfigNZPToAddModList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_r11->size(); ++i1) { + ((*csi_rs_cfg_nzp_to_add_mod_list_r11)[i1]).to_json(j); + } + j.end_array(); + } + if (csi_rs_cfg_zp_to_release_list_r11_present) { + j.start_array("csi-RS-ConfigZPToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_release_list_r11->size(); ++i1) { + j.write_int(((*csi_rs_cfg_zp_to_release_list_r11)[i1])); + } + j.end_array(); + } + if (csi_rs_cfg_zp_to_add_mod_list_r11_present) { + j.start_array("csi-RS-ConfigZPToAddModList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_add_mod_list_r11->size(); ++i1) { + ((*csi_rs_cfg_zp_to_add_mod_list_r11)[i1]).to_json(j); + } + j.end_array(); + } + if (epdcch_cfg_r11_present) { + j.write_fieldname("epdcch-Config-r11"); + epdcch_cfg_r11->to_json(j); + } + if (pdsch_cfg_ded_v1130_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1130"); + pdsch_cfg_ded_v1130->to_json(j); + } + if (cqi_report_cfg_v1130_present) { + j.write_fieldname("cqi-ReportConfig-v1130"); + cqi_report_cfg_v1130->to_json(j); + } + if (pucch_cfg_ded_v1130_present) { + j.write_fieldname("pucch-ConfigDedicated-v1130"); + pucch_cfg_ded_v1130->to_json(j); + } + if (pusch_cfg_ded_v1130_present) { + j.write_fieldname("pusch-ConfigDedicated-v1130"); + pusch_cfg_ded_v1130->to_json(j); + } + if (ul_pwr_ctrl_ded_v1130_present) { + j.write_fieldname("uplinkPowerControlDedicated-v1130"); + ul_pwr_ctrl_ded_v1130->to_json(j); + } + if (ant_info_v1250_present) { + j.write_fieldname("antennaInfo-v1250"); + ant_info_v1250->to_json(j); + } + if (eimta_main_cfg_r12_present) { + j.write_fieldname("eimta-MainConfig-r12"); + eimta_main_cfg_r12->to_json(j); + } + if (eimta_main_cfg_pcell_r12_present) { + j.write_fieldname("eimta-MainConfigPCell-r12"); + eimta_main_cfg_pcell_r12->to_json(j); + } + if (pucch_cfg_ded_v1250_present) { + j.write_fieldname("pucch-ConfigDedicated-v1250"); + pucch_cfg_ded_v1250->to_json(j); + } + if (cqi_report_cfg_pcell_v1250_present) { + j.write_fieldname("cqi-ReportConfigPCell-v1250"); + cqi_report_cfg_pcell_v1250->to_json(j); + } + if (ul_pwr_ctrl_ded_v1250_present) { + j.write_fieldname("uplinkPowerControlDedicated-v1250"); + ul_pwr_ctrl_ded_v1250->to_json(j); + } + if (pusch_cfg_ded_v1250_present) { + j.write_fieldname("pusch-ConfigDedicated-v1250"); + pusch_cfg_ded_v1250->to_json(j); + } + if (csi_rs_cfg_v1250_present) { + j.write_fieldname("csi-RS-Config-v1250"); + csi_rs_cfg_v1250->to_json(j); + } + if (pdsch_cfg_ded_v1280_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1280"); + pdsch_cfg_ded_v1280->to_json(j); + } + if (pdsch_cfg_ded_v1310_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1310"); + pdsch_cfg_ded_v1310->to_json(j); + } + if (pucch_cfg_ded_r13_present) { + j.write_fieldname("pucch-ConfigDedicated-r13"); + pucch_cfg_ded_r13->to_json(j); + } + if (pusch_cfg_ded_r13_present) { + j.write_fieldname("pusch-ConfigDedicated-r13"); + pusch_cfg_ded_r13->to_json(j); + } + if (pdcch_candidate_reductions_r13_present) { + j.write_fieldname("pdcch-CandidateReductions-r13"); + pdcch_candidate_reductions_r13->to_json(j); + } + if (cqi_report_cfg_v1310_present) { + j.write_fieldname("cqi-ReportConfig-v1310"); + cqi_report_cfg_v1310->to_json(j); + } + if (srs_ul_cfg_ded_v1310_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicated-v1310"); + srs_ul_cfg_ded_v1310->to_json(j); + } + if (srs_ul_cfg_ded_up_pts_ext_r13_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedUpPTsExt-r13"); + srs_ul_cfg_ded_up_pts_ext_r13->to_json(j); + } + if (srs_ul_cfg_ded_aperiodic_v1310_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodic-v1310"); + srs_ul_cfg_ded_aperiodic_v1310->to_json(j); + } + if (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13"); + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13->to_json(j); + } + if (csi_rs_cfg_v1310_present) { + j.write_fieldname("csi-RS-Config-v1310"); + csi_rs_cfg_v1310->to_json(j); + } + if (ce_mode_r13_present) { + j.write_fieldname("ce-Mode-r13"); + ce_mode_r13->to_json(j); + } + if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present) { + j.start_array("csi-RS-ConfigNZPToAddModListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_ext_r13->size(); ++i1) { + ((*csi_rs_cfg_nzp_to_add_mod_list_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (csi_rs_cfg_nzp_to_release_list_ext_r13_present) { + j.start_array("csi-RS-ConfigNZPToReleaseListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_ext_r13->size(); ++i1) { + j.write_int(((*csi_rs_cfg_nzp_to_release_list_ext_r13)[i1])); + } + j.end_array(); + } + if (cqi_report_cfg_v1320_present) { + j.write_fieldname("cqi-ReportConfig-v1320"); + cqi_report_cfg_v1320->to_json(j); + } + if (type_a_srs_tpc_pdcch_group_r14_present) { + j.write_fieldname("typeA-SRS-TPC-PDCCH-Group-r14"); + type_a_srs_tpc_pdcch_group_r14->to_json(j); + } + if (must_cfg_r14_present) { + j.write_fieldname("must-Config-r14"); + must_cfg_r14->to_json(j); + } + if (pusch_enhance_cfg_r14_present) { + j.write_fieldname("pusch-EnhancementsConfig-r14"); + pusch_enhance_cfg_r14->to_json(j); + } + if (ce_pdsch_pusch_enhancement_cfg_r14_present) { + j.write_str("ce-pdsch-pusch-EnhancementConfig-r14", "on"); + } + if (ant_info_v1430_present) { + j.write_fieldname("antennaInfo-v1430"); + ant_info_v1430->to_json(j); + } + if (pucch_cfg_ded_v1430_present) { + j.write_fieldname("pucch-ConfigDedicated-v1430"); + pucch_cfg_ded_v1430->to_json(j); + } + if (pdsch_cfg_ded_v1430_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1430"); + pdsch_cfg_ded_v1430->to_json(j); + } + if (pusch_cfg_ded_v1430_present) { + j.write_fieldname("pusch-ConfigDedicated-v1430"); + pusch_cfg_ded_v1430->to_json(j); + } + if (srs_ul_periodic_cfg_ded_list_r14_present) { + j.start_array("soundingRS-UL-PeriodicConfigDedicatedList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_list_r14->size(); ++i1) { + ((*srs_ul_periodic_cfg_ded_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present) { + j.start_array("soundingRS-UL-PeriodicConfigDedicatedUpPTsExtList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_up_pts_ext_list_r14->size(); ++i1) { + ((*srs_ul_periodic_cfg_ded_up_pts_ext_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (srs_ul_aperiodic_cfg_ded_list_r14_present) { + j.start_array("soundingRS-UL-AperiodicConfigDedicatedList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_aperiodic_cfg_ded_list_r14->size(); ++i1) { + ((*srs_ul_aperiodic_cfg_ded_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present) { + j.start_array("soundingRS-UL-ConfigDedicatedApUpPTsExtList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_cfg_ded_ap_up_pts_ext_list_r14->size(); ++i1) { + ((*srs_ul_cfg_ded_ap_up_pts_ext_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (csi_rs_cfg_v1430_present) { + j.write_fieldname("csi-RS-Config-v1430"); + csi_rs_cfg_v1430->to_json(j); + } + if (csi_rs_cfg_zp_ap_list_r14_present) { + j.write_fieldname("csi-RS-ConfigZP-ApList-r14"); + csi_rs_cfg_zp_ap_list_r14->to_json(j); + } + if (cqi_report_cfg_v1430_present) { + j.write_fieldname("cqi-ReportConfig-v1430"); + cqi_report_cfg_v1430->to_json(j); + } + if (semi_open_loop_r14_present) { + j.write_bool("semiOpenLoop-r14", semi_open_loop_r14); + } + if (csi_rs_cfg_v1480_present) { + j.write_fieldname("csi-RS-Config-v1480"); + csi_rs_cfg_v1480->to_json(j); + } + if (phys_cfg_ded_stti_r15_present) { + j.write_fieldname("physicalConfigDedicatedSTTI-r15"); + phys_cfg_ded_stti_r15->to_json(j); + } + if (pdsch_cfg_ded_v1530_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1530"); + pdsch_cfg_ded_v1530->to_json(j); + } + if (pusch_cfg_ded_v1530_present) { + j.write_fieldname("pusch-ConfigDedicated-v1530"); + pusch_cfg_ded_v1530->to_json(j); + } + if (cqi_report_cfg_v1530_present) { + j.write_fieldname("cqi-ReportConfig-v1530"); + cqi_report_cfg_v1530->to_json(j); + } + if (ant_info_v1530_present) { + j.write_fieldname("antennaInfo-v1530"); + ant_info_v1530->to_json(j); + } + if (csi_rs_cfg_v1530_present) { + j.write_fieldname("csi-RS-Config-v1530"); + csi_rs_cfg_v1530->to_json(j); + } + if (ul_pwr_ctrl_ded_v1530_present) { + j.write_fieldname("uplinkPowerControlDedicated-v1530"); + ul_pwr_ctrl_ded_v1530->to_json(j); + } + if (semi_static_cfi_cfg_r15_present) { + j.write_fieldname("semiStaticCFI-Config-r15"); + semi_static_cfi_cfg_r15->to_json(j); + } + if (blind_pdsch_repeat_cfg_r15_present) { + j.write_fieldname("blindPDSCH-Repetition-Config-r15"); + blind_pdsch_repeat_cfg_r15->to_json(j); + } + j.end_obj(); +} + +void phys_cfg_ded_s::ant_info_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::ant_info_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ant_info_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::ant_info_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ant_info_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::ant_info_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ant_info_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::ant_info_r10_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::ant_info_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value_r10: + j.write_fieldname("explicitValue-r10"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ant_info_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::ant_info_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value_r10: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ant_info_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::ant_info_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value_r10: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ant_info_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::add_spec_emission_ca_r10_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::add_spec_emission_ca_r10_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_int("additionalSpectrumEmissionPCell-r10", c.add_spec_emission_pcell_r10); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::add_spec_emission_ca_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::add_spec_emission_ca_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.add_spec_emission_pcell_r10, (uint8_t)1, (uint8_t)32)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::add_spec_emission_ca_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::add_spec_emission_ca_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.add_spec_emission_pcell_r10, bref, (uint8_t)1, (uint8_t)32)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::add_spec_emission_ca_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::ce_mode_r13_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::ce_mode_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ce_mode_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::ce_mode_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ce_mode_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::ce_mode_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::ce_mode_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 32)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 32)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::must_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::must_cfg_r14_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("k-max-r14", c.k_max_r14.to_string()); + if (c.p_a_must_r14_present) { + j.write_str("p-a-must-r14", c.p_a_must_r14.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::must_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::must_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.p_a_must_r14_present, 1)); + HANDLE_CODE(pack_enum(bref, c.k_max_r14)); + if (c.p_a_must_r14_present) { + HANDLE_CODE(pack_enum(bref, c.p_a_must_r14)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::must_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::must_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.p_a_must_r14_present, 1)); + HANDLE_CODE(unpack_enum(c.k_max_r14, bref)); + if (c.p_a_must_r14_present) { + HANDLE_CODE(unpack_enum(c.p_a_must_r14, bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::must_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::setup_s_() +{ + p_a_must_r14_present = false; +} + +void phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::cfi_cfg_r15: + c.destroy(); + break; + case types::cfi_pattern_cfg_r15: + c.destroy(); + break; + default: + break; + } +} +void phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cfi_cfg_r15: + c.init(); + break; + case types::cfi_pattern_cfg_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } +} +phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::setup_c_( + const phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cfi_cfg_r15: + c.init(other.c.get()); + break; + case types::cfi_pattern_cfg_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } +} +phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_& phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_:: + operator=(const phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cfi_cfg_r15: + c.set(other.c.get()); + break; + case types::cfi_pattern_cfg_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } + + return *this; +} +void phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cfi_cfg_r15: + j.write_fieldname("cfi-Config-r15"); + c.get().to_json(j); + break; + case types::cfi_pattern_cfg_r15: + j.write_fieldname("cfi-PatternConfig-r15"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cfi_cfg_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cfi_pattern_cfg_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cfi_cfg_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cfi_pattern_cfg_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_bool("blindSubframePDSCH-Repetitions-r15", c.blind_sf_pdsch_repeats_r15); + j.write_bool("blindSlotSubslotPDSCH-Repetitions-r15", c.blind_slot_subslot_pdsch_repeats_r15); + if (c.max_num_sf_pdsch_repeats_r15_present) { + j.write_str("maxNumber-SubframePDSCH-Repetitions-r15", c.max_num_sf_pdsch_repeats_r15.to_string()); + } + if (c.max_num_slot_subslot_pdsch_repeats_r15_present) { + j.write_str("maxNumber-SlotSubslotPDSCH-Repetitions-r15", c.max_num_slot_subslot_pdsch_repeats_r15.to_string()); + } + if (c.rv_sf_pdsch_repeats_r15_present) { + j.write_str("rv-SubframePDSCH-Repetitions-r15", c.rv_sf_pdsch_repeats_r15.to_string()); + } + if (c.rv_slotsublot_pdsch_repeats_r15_present) { + j.write_str("rv-SlotsublotPDSCH-Repetitions-r15", c.rv_slotsublot_pdsch_repeats_r15.to_string()); + } + if (c.nof_processes_sf_pdsch_repeats_r15_present) { + j.write_int("numberOfProcesses-SubframePDSCH-Repetitions-r15", c.nof_processes_sf_pdsch_repeats_r15); + } + if (c.nof_processes_slot_subslot_pdsch_repeats_r15_present) { + j.write_int("numberOfProcesses-SlotSubslotPDSCH-Repetitions-r15", + c.nof_processes_slot_subslot_pdsch_repeats_r15); + } + if (c.mcs_restrict_sf_pdsch_repeats_r15_present) { + j.write_str("mcs-restrictionSubframePDSCH-Repetitions-r15", c.mcs_restrict_sf_pdsch_repeats_r15.to_string()); + } + if (c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present) { + j.write_str("mcs-restrictionSlotSubslotPDSCH-Repetitions-r15", + c.mcs_restrict_slot_subslot_pdsch_repeats_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.max_num_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.max_num_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.rv_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.rv_slotsublot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.nof_processes_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.nof_processes_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.mcs_restrict_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.blind_sf_pdsch_repeats_r15, 1)); + HANDLE_CODE(bref.pack(c.blind_slot_subslot_pdsch_repeats_r15, 1)); + if (c.max_num_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.max_num_sf_pdsch_repeats_r15)); + } + if (c.max_num_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.max_num_slot_subslot_pdsch_repeats_r15)); + } + if (c.rv_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.rv_sf_pdsch_repeats_r15)); + } + if (c.rv_slotsublot_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.rv_slotsublot_pdsch_repeats_r15)); + } + if (c.nof_processes_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.nof_processes_sf_pdsch_repeats_r15, (uint8_t)1, (uint8_t)16)); + } + if (c.nof_processes_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, c.nof_processes_slot_subslot_pdsch_repeats_r15, (uint8_t)1, (uint8_t)16)); + } + if (c.mcs_restrict_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.mcs_restrict_sf_pdsch_repeats_r15)); + } + if (c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.mcs_restrict_slot_subslot_pdsch_repeats_r15)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.max_num_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.max_num_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.rv_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.rv_slotsublot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.nof_processes_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.nof_processes_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.mcs_restrict_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.blind_sf_pdsch_repeats_r15, 1)); + HANDLE_CODE(bref.unpack(c.blind_slot_subslot_pdsch_repeats_r15, 1)); + if (c.max_num_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.max_num_sf_pdsch_repeats_r15, bref)); + } + if (c.max_num_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.max_num_slot_subslot_pdsch_repeats_r15, bref)); + } + if (c.rv_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.rv_sf_pdsch_repeats_r15, bref)); + } + if (c.rv_slotsublot_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.rv_slotsublot_pdsch_repeats_r15, bref)); + } + if (c.nof_processes_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.nof_processes_sf_pdsch_repeats_r15, bref, (uint8_t)1, (uint8_t)16)); + } + if (c.nof_processes_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(c.nof_processes_slot_subslot_pdsch_repeats_r15, bref, (uint8_t)1, (uint8_t)16)); + } + if (c.mcs_restrict_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.mcs_restrict_sf_pdsch_repeats_r15, bref)); + } + if (c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.mcs_restrict_slot_subslot_pdsch_repeats_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::setup_s_() +{ + max_num_sf_pdsch_repeats_r15_present = false; + max_num_slot_subslot_pdsch_repeats_r15_present = false; + rv_sf_pdsch_repeats_r15_present = false; + rv_slotsublot_pdsch_repeats_r15_present = false; + nof_processes_sf_pdsch_repeats_r15_present = false; + nof_processes_slot_subslot_pdsch_repeats_r15_present = false; + mcs_restrict_sf_pdsch_repeats_r15_present = false; + mcs_restrict_slot_subslot_pdsch_repeats_r15_present = false; +} + +// RLF-TimersAndConstants-r13 ::= CHOICE +void rlf_timers_and_consts_r13_c::set(types::options e) +{ + type_ = e; +} +void rlf_timers_and_consts_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE rlf_timers_and_consts_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_timers_and_consts_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rlf_timers_and_consts_r13_c::setup_s_::setup_s_() +{ + ext = false; + t310_v1330_present = false; +} +SRSASN_CODE rlf_timers_and_consts_r13_c::setup_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, t301_v1310)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= t310_v1330_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(t310_v1330_present, 1)); + if (t310_v1330_present) { + HANDLE_CODE(pack_enum(bref, t310_v1330)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_timers_and_consts_r13_c::setup_s_::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(t301_v1310, bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(t310_v1330_present, 1)); + if (t310_v1330_present) { + HANDLE_CODE(unpack_enum(t310_v1330, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rlf_timers_and_consts_r13_c::setup_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t301-v1310", t301_v1310.to_string()); + if (t310_v1330_present) { + j.write_str("t310-v1330", t310_v1330.to_string()); + } + j.end_obj(); +} + +// RLF-TimersAndConstants-r9 ::= CHOICE +void rlf_timers_and_consts_r9_c::set(types::options e) +{ + type_ = e; +} +void rlf_timers_and_consts_r9_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("t301-r9", c.t301_r9.to_string()); + j.write_str("t310-r9", c.t310_r9.to_string()); + j.write_str("n310-r9", c.n310_r9.to_string()); + j.write_str("t311-r9", c.t311_r9.to_string()); + j.write_str("n311-r9", c.n311_r9.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_r9_c"); + } + j.end_obj(); +} +SRSASN_CODE rlf_timers_and_consts_r9_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(pack_enum(bref, c.t301_r9)); + HANDLE_CODE(pack_enum(bref, c.t310_r9)); + HANDLE_CODE(pack_enum(bref, c.n310_r9)); + HANDLE_CODE(pack_enum(bref, c.t311_r9)); + HANDLE_CODE(pack_enum(bref, c.n311_r9)); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_r9_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_timers_and_consts_r9_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(unpack_enum(c.t301_r9, bref)); + HANDLE_CODE(unpack_enum(c.t310_r9, bref)); + HANDLE_CODE(unpack_enum(c.n310_r9, bref)); + HANDLE_CODE(unpack_enum(c.t311_r9, bref)); + HANDLE_CODE(unpack_enum(c.n311_r9, bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_r9_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rlf_timers_and_consts_r9_c::setup_s_::setup_s_() +{ + ext = false; +} + +// RRCConnectionReject-v1020-IEs ::= SEQUENCE +rrc_conn_reject_v1020_ies_s::rrc_conn_reject_v1020_ies_s() +{ + extended_wait_time_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reject_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(extended_wait_time_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (extended_wait_time_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, extended_wait_time_r10, (uint16_t)1, (uint16_t)1800)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(extended_wait_time_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (extended_wait_time_r10_present) { + HANDLE_CODE(unpack_unalign_integer(extended_wait_time_r10, bref, (uint16_t)1, (uint16_t)1800)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reject_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (extended_wait_time_r10_present) { + j.write_int("extendedWaitTime-r10", extended_wait_time_r10); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SPS-Config ::= SEQUENCE +sps_cfg_s::sps_cfg_s() +{ + semi_persist_sched_c_rnti_present = false; + sps_cfg_dl_present = false; + sps_cfg_ul_present = false; +} +SRSASN_CODE sps_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(semi_persist_sched_c_rnti_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_dl_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_present, 1)); + + if (semi_persist_sched_c_rnti_present) { + HANDLE_CODE(semi_persist_sched_c_rnti.pack(bref)); + } + if (sps_cfg_dl_present) { + HANDLE_CODE(sps_cfg_dl.pack(bref)); + } + if (sps_cfg_ul_present) { + HANDLE_CODE(sps_cfg_ul.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(semi_persist_sched_c_rnti_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_dl_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_present, 1)); + + if (semi_persist_sched_c_rnti_present) { + HANDLE_CODE(semi_persist_sched_c_rnti.unpack(bref)); + } + if (sps_cfg_dl_present) { + HANDLE_CODE(sps_cfg_dl.unpack(bref)); + } + if (sps_cfg_ul_present) { + HANDLE_CODE(sps_cfg_ul.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sps_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (semi_persist_sched_c_rnti_present) { + j.write_str("semiPersistSchedC-RNTI", semi_persist_sched_c_rnti.to_string()); + } + if (sps_cfg_dl_present) { + j.write_fieldname("sps-ConfigDL"); + sps_cfg_dl.to_json(j); + } + if (sps_cfg_ul_present) { + j.write_fieldname("sps-ConfigUL"); + sps_cfg_ul.to_json(j); + } + j.end_obj(); +} + +// SPS-Config-v1430 ::= SEQUENCE +sps_cfg_v1430_s::sps_cfg_v1430_s() +{ + ul_sps_v_rnti_r14_present = false; + sl_sps_v_rnti_r14_present = false; + sps_cfg_ul_to_add_mod_list_r14_present = false; + sps_cfg_ul_to_release_list_r14_present = false; + sps_cfg_sl_to_add_mod_list_r14_present = false; + sps_cfg_sl_to_release_list_r14_present = false; +} +SRSASN_CODE sps_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_sps_v_rnti_r14_present, 1)); + HANDLE_CODE(bref.pack(sl_sps_v_rnti_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_to_add_mod_list_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_to_release_list_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_sl_to_add_mod_list_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_sl_to_release_list_r14_present, 1)); + + if (ul_sps_v_rnti_r14_present) { + HANDLE_CODE(ul_sps_v_rnti_r14.pack(bref)); + } + if (sl_sps_v_rnti_r14_present) { + HANDLE_CODE(sl_sps_v_rnti_r14.pack(bref)); + } + if (sps_cfg_ul_to_add_mod_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_ul_to_add_mod_list_r14, 1, 8)); + } + if (sps_cfg_ul_to_release_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_ul_to_release_list_r14, 1, 8, UnalignedIntegerPacker(1, 8))); + } + if (sps_cfg_sl_to_add_mod_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_sl_to_add_mod_list_r14, 1, 8)); + } + if (sps_cfg_sl_to_release_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_sl_to_release_list_r14, 1, 8, UnalignedIntegerPacker(1, 8))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_sps_v_rnti_r14_present, 1)); + HANDLE_CODE(bref.unpack(sl_sps_v_rnti_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_to_add_mod_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_to_release_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_sl_to_add_mod_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_sl_to_release_list_r14_present, 1)); + + if (ul_sps_v_rnti_r14_present) { + HANDLE_CODE(ul_sps_v_rnti_r14.unpack(bref)); + } + if (sl_sps_v_rnti_r14_present) { + HANDLE_CODE(sl_sps_v_rnti_r14.unpack(bref)); + } + if (sps_cfg_ul_to_add_mod_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_ul_to_add_mod_list_r14, bref, 1, 8)); + } + if (sps_cfg_ul_to_release_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_ul_to_release_list_r14, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + } + if (sps_cfg_sl_to_add_mod_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_sl_to_add_mod_list_r14, bref, 1, 8)); + } + if (sps_cfg_sl_to_release_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_sl_to_release_list_r14, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + } + + return SRSASN_SUCCESS; +} +void sps_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_sps_v_rnti_r14_present) { + j.write_str("ul-SPS-V-RNTI-r14", ul_sps_v_rnti_r14.to_string()); + } + if (sl_sps_v_rnti_r14_present) { + j.write_str("sl-SPS-V-RNTI-r14", sl_sps_v_rnti_r14.to_string()); + } + if (sps_cfg_ul_to_add_mod_list_r14_present) { + j.start_array("sps-ConfigUL-ToAddModList-r14"); + for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_add_mod_list_r14.size(); ++i1) { + sps_cfg_ul_to_add_mod_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (sps_cfg_ul_to_release_list_r14_present) { + j.start_array("sps-ConfigUL-ToReleaseList-r14"); + for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_release_list_r14.size(); ++i1) { + j.write_int(sps_cfg_ul_to_release_list_r14[i1]); + } + j.end_array(); + } + if (sps_cfg_sl_to_add_mod_list_r14_present) { + j.start_array("sps-ConfigSL-ToAddModList-r14"); + for (uint32_t i1 = 0; i1 < sps_cfg_sl_to_add_mod_list_r14.size(); ++i1) { + sps_cfg_sl_to_add_mod_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (sps_cfg_sl_to_release_list_r14_present) { + j.start_array("sps-ConfigSL-ToReleaseList-r14"); + for (uint32_t i1 = 0; i1 < sps_cfg_sl_to_release_list_r14.size(); ++i1) { + j.write_int(sps_cfg_sl_to_release_list_r14[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// SPS-Config-v1530 ::= SEQUENCE +sps_cfg_v1530_s::sps_cfg_v1530_s() +{ + semi_persist_sched_c_rnti_r15_present = false; + sps_cfg_dl_present = false; + sps_cfg_ul_stti_to_add_mod_list_r15_present = false; + sps_cfg_ul_stti_to_release_list_r15_present = false; + sps_cfg_ul_to_add_mod_list_r15_present = false; + sps_cfg_ul_to_release_list_r15_present = false; +} +SRSASN_CODE sps_cfg_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(semi_persist_sched_c_rnti_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_dl_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_stti_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_stti_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_ul_to_release_list_r15_present, 1)); + + if (semi_persist_sched_c_rnti_r15_present) { + HANDLE_CODE(semi_persist_sched_c_rnti_r15.pack(bref)); + } + if (sps_cfg_dl_present) { + HANDLE_CODE(sps_cfg_dl.pack(bref)); + } + if (sps_cfg_ul_stti_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_ul_stti_to_add_mod_list_r15, 1, 6)); + } + if (sps_cfg_ul_stti_to_release_list_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, sps_cfg_ul_stti_to_release_list_r15, 1, 6, UnalignedIntegerPacker(1, 6))); + } + if (sps_cfg_ul_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_ul_to_add_mod_list_r15, 1, 6)); + } + if (sps_cfg_ul_to_release_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_ul_to_release_list_r15, 1, 6, UnalignedIntegerPacker(1, 6))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(semi_persist_sched_c_rnti_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_dl_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_stti_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_stti_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_ul_to_release_list_r15_present, 1)); + + if (semi_persist_sched_c_rnti_r15_present) { + HANDLE_CODE(semi_persist_sched_c_rnti_r15.unpack(bref)); + } + if (sps_cfg_dl_present) { + HANDLE_CODE(sps_cfg_dl.unpack(bref)); + } + if (sps_cfg_ul_stti_to_add_mod_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_ul_stti_to_add_mod_list_r15, bref, 1, 6)); + } + if (sps_cfg_ul_stti_to_release_list_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(sps_cfg_ul_stti_to_release_list_r15, bref, 1, 6, UnalignedIntegerPacker(1, 6))); + } + if (sps_cfg_ul_to_add_mod_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_ul_to_add_mod_list_r15, bref, 1, 6)); + } + if (sps_cfg_ul_to_release_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_ul_to_release_list_r15, bref, 1, 6, UnalignedIntegerPacker(1, 6))); + } + + return SRSASN_SUCCESS; +} +void sps_cfg_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (semi_persist_sched_c_rnti_r15_present) { + j.write_str("semiPersistSchedC-RNTI-r15", semi_persist_sched_c_rnti_r15.to_string()); + } + if (sps_cfg_dl_present) { + j.write_fieldname("sps-ConfigDL"); + sps_cfg_dl.to_json(j); + } + if (sps_cfg_ul_stti_to_add_mod_list_r15_present) { + j.start_array("sps-ConfigUL-STTI-ToAddModList-r15"); + for (uint32_t i1 = 0; i1 < sps_cfg_ul_stti_to_add_mod_list_r15.size(); ++i1) { + sps_cfg_ul_stti_to_add_mod_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (sps_cfg_ul_stti_to_release_list_r15_present) { + j.start_array("sps-ConfigUL-STTI-ToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < sps_cfg_ul_stti_to_release_list_r15.size(); ++i1) { + j.write_int(sps_cfg_ul_stti_to_release_list_r15[i1]); + } + j.end_array(); + } + if (sps_cfg_ul_to_add_mod_list_r15_present) { + j.start_array("sps-ConfigUL-ToAddModList-r15"); + for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_add_mod_list_r15.size(); ++i1) { + sps_cfg_ul_to_add_mod_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (sps_cfg_ul_to_release_list_r15_present) { + j.start_array("sps-ConfigUL-ToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_release_list_r15.size(); ++i1) { + j.write_int(sps_cfg_ul_to_release_list_r15[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// IdleModeMobilityControlInfo ::= SEQUENCE +idle_mode_mob_ctrl_info_s::idle_mode_mob_ctrl_info_s() +{ + ext = false; + freq_prio_list_eutra_present = false; + freq_prio_list_geran_present = false; + freq_prio_list_utra_fdd_present = false; + freq_prio_list_utra_tdd_present = false; + band_class_prio_list_hrpd_present = false; + band_class_prio_list1_xrtt_present = false; + t320_present = false; + freq_prio_list_ext_eutra_r12_present = false; + freq_prio_list_eutra_v1310_present = false; + freq_prio_list_ext_eutra_v1310_present = false; + freq_prio_list_nr_r15_present = false; +} +SRSASN_CODE idle_mode_mob_ctrl_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_prio_list_eutra_present, 1)); + HANDLE_CODE(bref.pack(freq_prio_list_geran_present, 1)); + HANDLE_CODE(bref.pack(freq_prio_list_utra_fdd_present, 1)); + HANDLE_CODE(bref.pack(freq_prio_list_utra_tdd_present, 1)); + HANDLE_CODE(bref.pack(band_class_prio_list_hrpd_present, 1)); + HANDLE_CODE(bref.pack(band_class_prio_list1_xrtt_present, 1)); + HANDLE_CODE(bref.pack(t320_present, 1)); + + if (freq_prio_list_eutra_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_eutra, 1, 8)); + } + if (freq_prio_list_geran_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_geran, 1, 16)); + } + if (freq_prio_list_utra_fdd_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_utra_fdd, 1, 16)); + } + if (freq_prio_list_utra_tdd_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_utra_tdd, 1, 16)); + } + if (band_class_prio_list_hrpd_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_class_prio_list_hrpd, 1, 32)); + } + if (band_class_prio_list1_xrtt_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_class_prio_list1_xrtt, 1, 32)); + } + if (t320_present) { + HANDLE_CODE(pack_enum(bref, t320)); + } + + if (ext) { + ext_groups_header group_flags(3); + rrc_asn1_warn_assert(freq_prio_list_ext_eutra_r12_present != (freq_prio_list_ext_eutra_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= freq_prio_list_ext_eutra_r12_present; + rrc_asn1_warn_assert(freq_prio_list_eutra_v1310_present != (freq_prio_list_eutra_v1310.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= freq_prio_list_eutra_v1310_present; + rrc_asn1_warn_assert(freq_prio_list_ext_eutra_v1310_present != (freq_prio_list_ext_eutra_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= freq_prio_list_ext_eutra_v1310_present; + rrc_asn1_warn_assert(freq_prio_list_nr_r15_present != (freq_prio_list_nr_r15.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= freq_prio_list_nr_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(freq_prio_list_ext_eutra_r12_present, 1)); + if (freq_prio_list_ext_eutra_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *freq_prio_list_ext_eutra_r12, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(freq_prio_list_eutra_v1310_present, 1)); + HANDLE_CODE(bref.pack(freq_prio_list_ext_eutra_v1310_present, 1)); + if (freq_prio_list_eutra_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *freq_prio_list_eutra_v1310, 1, 8)); + } + if (freq_prio_list_ext_eutra_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *freq_prio_list_ext_eutra_v1310, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(freq_prio_list_nr_r15_present, 1)); + if (freq_prio_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *freq_prio_list_nr_r15, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE idle_mode_mob_ctrl_info_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(freq_prio_list_eutra_present, 1)); + HANDLE_CODE(bref.unpack(freq_prio_list_geran_present, 1)); + HANDLE_CODE(bref.unpack(freq_prio_list_utra_fdd_present, 1)); + HANDLE_CODE(bref.unpack(freq_prio_list_utra_tdd_present, 1)); + HANDLE_CODE(bref.unpack(band_class_prio_list_hrpd_present, 1)); + HANDLE_CODE(bref.unpack(band_class_prio_list1_xrtt_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_geran_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_geran, bref, 1, 16)); + } + if (freq_prio_list_utra_fdd_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_utra_fdd, bref, 1, 16)); + } + if (freq_prio_list_utra_tdd_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_utra_tdd, bref, 1, 16)); + } + if (band_class_prio_list_hrpd_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_class_prio_list_hrpd, bref, 1, 32)); + } + if (band_class_prio_list1_xrtt_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_class_prio_list1_xrtt, bref, 1, 32)); + } + if (t320_present) { + HANDLE_CODE(unpack_enum(t320, bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(freq_prio_list_ext_eutra_r12_present, 1)); + if (freq_prio_list_ext_eutra_r12_present) { + freq_prio_list_ext_eutra_r12 = make_copy_ptr(freq_prio_list_ext_eutra_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*freq_prio_list_ext_eutra_r12, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(freq_prio_list_eutra_v1310_present, 1)); + HANDLE_CODE(bref.unpack(freq_prio_list_ext_eutra_v1310_present, 1)); + if (freq_prio_list_eutra_v1310_present) { + freq_prio_list_eutra_v1310 = make_copy_ptr(freq_prio_list_eutra_v1310_l()); + HANDLE_CODE(unpack_dyn_seq_of(*freq_prio_list_eutra_v1310, bref, 1, 8)); + } + if (freq_prio_list_ext_eutra_v1310_present) { + freq_prio_list_ext_eutra_v1310 = make_copy_ptr(freq_prio_list_ext_eutra_v1310_l()); + HANDLE_CODE(unpack_dyn_seq_of(*freq_prio_list_ext_eutra_v1310, bref, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(freq_prio_list_nr_r15_present, 1)); + if (freq_prio_list_nr_r15_present) { + freq_prio_list_nr_r15 = make_copy_ptr(freq_prio_list_nr_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*freq_prio_list_nr_r15, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void idle_mode_mob_ctrl_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_prio_list_eutra_present) { + j.start_array("freqPriorityListEUTRA"); + for (uint32_t i1 = 0; i1 < freq_prio_list_eutra.size(); ++i1) { + freq_prio_list_eutra[i1].to_json(j); + } + j.end_array(); + } + if (freq_prio_list_geran_present) { + j.start_array("freqPriorityListGERAN"); + for (uint32_t i1 = 0; i1 < freq_prio_list_geran.size(); ++i1) { + freq_prio_list_geran[i1].to_json(j); + } + j.end_array(); + } + if (freq_prio_list_utra_fdd_present) { + j.start_array("freqPriorityListUTRA-FDD"); + for (uint32_t i1 = 0; i1 < freq_prio_list_utra_fdd.size(); ++i1) { + freq_prio_list_utra_fdd[i1].to_json(j); + } + j.end_array(); + } + if (freq_prio_list_utra_tdd_present) { + j.start_array("freqPriorityListUTRA-TDD"); + for (uint32_t i1 = 0; i1 < freq_prio_list_utra_tdd.size(); ++i1) { + freq_prio_list_utra_tdd[i1].to_json(j); + } + j.end_array(); + } + if (band_class_prio_list_hrpd_present) { + j.start_array("bandClassPriorityListHRPD"); + for (uint32_t i1 = 0; i1 < band_class_prio_list_hrpd.size(); ++i1) { + band_class_prio_list_hrpd[i1].to_json(j); + } + j.end_array(); + } + if (band_class_prio_list1_xrtt_present) { + j.start_array("bandClassPriorityList1XRTT"); + for (uint32_t i1 = 0; i1 < band_class_prio_list1_xrtt.size(); ++i1) { + band_class_prio_list1_xrtt[i1].to_json(j); + } + j.end_array(); + } + if (t320_present) { + j.write_str("t320", t320.to_string()); + } + if (freq_prio_list_ext_eutra_r12_present) { + j.start_array("freqPriorityListExtEUTRA-r12"); + for (uint32_t i1 = 0; i1 < freq_prio_list_ext_eutra_r12->size(); ++i1) { + ((*freq_prio_list_ext_eutra_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (freq_prio_list_eutra_v1310_present) { + j.start_array("freqPriorityListEUTRA-v1310"); + for (uint32_t i1 = 0; i1 < freq_prio_list_eutra_v1310->size(); ++i1) { + ((*freq_prio_list_eutra_v1310)[i1]).to_json(j); + } + j.end_array(); + } + if (freq_prio_list_ext_eutra_v1310_present) { + j.start_array("freqPriorityListExtEUTRA-v1310"); + for (uint32_t i1 = 0; i1 < freq_prio_list_ext_eutra_v1310->size(); ++i1) { + ((*freq_prio_list_ext_eutra_v1310)[i1]).to_json(j); + } + j.end_array(); + } + if (freq_prio_list_nr_r15_present) { + j.start_array("freqPriorityListNR-r15"); + for (uint32_t i1 = 0; i1 < freq_prio_list_nr_r15->size(); ++i1) { + ((*freq_prio_list_nr_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// IdleModeMobilityControlInfo-v9e0 ::= SEQUENCE +SRSASN_CODE idle_mode_mob_ctrl_info_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_eutra_v9e0, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE idle_mode_mob_ctrl_info_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_eutra_v9e0, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void idle_mode_mob_ctrl_info_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("freqPriorityListEUTRA-v9e0"); + for (uint32_t i1 = 0; i1 < freq_prio_list_eutra_v9e0.size(); ++i1) { + freq_prio_list_eutra_v9e0[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RRCConnectionReestablishment-v8a0-IEs ::= SEQUENCE +rrc_conn_reest_v8a0_ies_s::rrc_conn_reest_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentReject-v8a0-IEs ::= SEQUENCE +rrc_conn_reest_reject_v8a0_ies_s::rrc_conn_reest_reject_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_reject_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_reject_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_reject_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReject-v8a0-IEs ::= SEQUENCE +rrc_conn_reject_v8a0_ies_s::rrc_conn_reject_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reject_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reject_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetup-v8a0-IEs ::= SEQUENCE +rrc_conn_setup_v8a0_ies_s::rrc_conn_setup_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RadioResourceConfigDedicated ::= SEQUENCE +rr_cfg_ded_s::rr_cfg_ded_s() +{ + ext = false; + srb_to_add_mod_list_present = false; + drb_to_add_mod_list_present = false; + drb_to_release_list_present = false; + mac_main_cfg_present = false; + sps_cfg_present = false; + phys_cfg_ded_present = false; + rlf_timers_and_consts_r9_present = false; + meas_sf_pattern_pcell_r10_present = false; + neigh_cells_crs_info_r11_present = false; + naics_info_r12_present = false; + neigh_cells_crs_info_r13_present = false; + rlf_timers_and_consts_r13_present = false; + sps_cfg_v1430_present = false; + srb_to_add_mod_ext_list_r15_present = false; + srb_to_release_ext_list_r15_present = false; + sps_cfg_v1530_present = false; + crs_intf_mitig_cfg_r15_present = false; + neigh_cells_crs_info_r15_present = false; + drb_to_add_mod_list_r15_present = false; + drb_to_release_list_r15_present = false; + srb_to_release_list_dupl_r15_present = false; +} +SRSASN_CODE rr_cfg_ded_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(drb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(drb_to_release_list_present, 1)); + HANDLE_CODE(bref.pack(mac_main_cfg_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_present, 1)); + HANDLE_CODE(bref.pack(phys_cfg_ded_present, 1)); + + if (srb_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srb_to_add_mod_list, 1, 2)); + } + if (drb_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list, 1, 11)); + } + if (drb_to_release_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_release_list, 1, 11, UnalignedIntegerPacker(1, 32))); + } + if (mac_main_cfg_present) { + HANDLE_CODE(mac_main_cfg.pack(bref)); + } + if (sps_cfg_present) { + HANDLE_CODE(sps_cfg.pack(bref)); + } + if (phys_cfg_ded_present) { + HANDLE_CODE(phys_cfg_ded.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(7); + rrc_asn1_warn_assert(rlf_timers_and_consts_r9_present != (rlf_timers_and_consts_r9.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= rlf_timers_and_consts_r9_present; + rrc_asn1_warn_assert(meas_sf_pattern_pcell_r10_present != (meas_sf_pattern_pcell_r10.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= meas_sf_pattern_pcell_r10_present; + rrc_asn1_warn_assert(neigh_cells_crs_info_r11_present != (neigh_cells_crs_info_r11.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= neigh_cells_crs_info_r11_present; + rrc_asn1_warn_assert(naics_info_r12_present != (naics_info_r12.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= naics_info_r12_present; + rrc_asn1_warn_assert(neigh_cells_crs_info_r13_present != (neigh_cells_crs_info_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= neigh_cells_crs_info_r13_present; + rrc_asn1_warn_assert(rlf_timers_and_consts_r13_present != (rlf_timers_and_consts_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= rlf_timers_and_consts_r13_present; + rrc_asn1_warn_assert(sps_cfg_v1430_present != (sps_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= sps_cfg_v1430_present; + rrc_asn1_warn_assert(srb_to_add_mod_ext_list_r15_present != (srb_to_add_mod_ext_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= srb_to_add_mod_ext_list_r15_present; + group_flags[6] |= srb_to_release_ext_list_r15_present; + rrc_asn1_warn_assert(sps_cfg_v1530_present != (sps_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= sps_cfg_v1530_present; + rrc_asn1_warn_assert(crs_intf_mitig_cfg_r15_present != (crs_intf_mitig_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= crs_intf_mitig_cfg_r15_present; + rrc_asn1_warn_assert(neigh_cells_crs_info_r15_present != (neigh_cells_crs_info_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= neigh_cells_crs_info_r15_present; + rrc_asn1_warn_assert(drb_to_add_mod_list_r15_present != (drb_to_add_mod_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= drb_to_add_mod_list_r15_present; + rrc_asn1_warn_assert(drb_to_release_list_r15_present != (drb_to_release_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= drb_to_release_list_r15_present; + rrc_asn1_warn_assert(srb_to_release_list_dupl_r15_present != (srb_to_release_list_dupl_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= srb_to_release_list_dupl_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rlf_timers_and_consts_r9_present, 1)); + if (rlf_timers_and_consts_r9_present) { + HANDLE_CODE(rlf_timers_and_consts_r9->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_sf_pattern_pcell_r10_present, 1)); + if (meas_sf_pattern_pcell_r10_present) { + HANDLE_CODE(meas_sf_pattern_pcell_r10->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(neigh_cells_crs_info_r11_present, 1)); + if (neigh_cells_crs_info_r11_present) { + HANDLE_CODE(neigh_cells_crs_info_r11->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(naics_info_r12_present, 1)); + if (naics_info_r12_present) { + HANDLE_CODE(naics_info_r12->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(neigh_cells_crs_info_r13_present, 1)); + HANDLE_CODE(bref.pack(rlf_timers_and_consts_r13_present, 1)); + if (neigh_cells_crs_info_r13_present) { + HANDLE_CODE(neigh_cells_crs_info_r13->pack(bref)); + } + if (rlf_timers_and_consts_r13_present) { + HANDLE_CODE(rlf_timers_and_consts_r13->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sps_cfg_v1430_present, 1)); + if (sps_cfg_v1430_present) { + HANDLE_CODE(sps_cfg_v1430->pack(bref)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(srb_to_add_mod_ext_list_r15_present, 1)); + HANDLE_CODE(bref.pack(srb_to_release_ext_list_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(crs_intf_mitig_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(neigh_cells_crs_info_r15_present, 1)); + HANDLE_CODE(bref.pack(drb_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.pack(drb_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.pack(srb_to_release_list_dupl_r15_present, 1)); + if (srb_to_add_mod_ext_list_r15_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(*srb_to_add_mod_ext_list_r15)[0], srb_to_add_mod_ext_list_r15->size())); + } + if (srb_to_release_ext_list_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, srb_to_release_ext_list_r15, (uint8_t)4, (uint8_t)4)); + } + if (sps_cfg_v1530_present) { + HANDLE_CODE(sps_cfg_v1530->pack(bref)); + } + if (crs_intf_mitig_cfg_r15_present) { + HANDLE_CODE(crs_intf_mitig_cfg_r15->pack(bref)); + } + if (neigh_cells_crs_info_r15_present) { + HANDLE_CODE(neigh_cells_crs_info_r15->pack(bref)); + } + if (drb_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *drb_to_add_mod_list_r15, 1, 15)); + } + if (drb_to_release_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *drb_to_release_list_r15, 1, 15, UnalignedIntegerPacker(1, 32))); + } + if (srb_to_release_list_dupl_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srb_to_release_list_dupl_r15, 1, 2, UnalignedIntegerPacker(1, 2))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(srb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(mac_main_cfg_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_present, 1)); + HANDLE_CODE(bref.unpack(phys_cfg_ded_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, 11)); + } + if (drb_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_release_list, bref, 1, 11, UnalignedIntegerPacker(1, 32))); + } + if (mac_main_cfg_present) { + HANDLE_CODE(mac_main_cfg.unpack(bref)); + } + if (sps_cfg_present) { + HANDLE_CODE(sps_cfg.unpack(bref)); + } + if (phys_cfg_ded_present) { + HANDLE_CODE(phys_cfg_ded.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(7); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rlf_timers_and_consts_r9_present, 1)); + if (rlf_timers_and_consts_r9_present) { + rlf_timers_and_consts_r9 = make_copy_ptr(rlf_timers_and_consts_r9_c()); + HANDLE_CODE(rlf_timers_and_consts_r9->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_sf_pattern_pcell_r10_present, 1)); + if (meas_sf_pattern_pcell_r10_present) { + meas_sf_pattern_pcell_r10 = make_copy_ptr(meas_sf_pattern_pcell_r10_c()); + HANDLE_CODE(meas_sf_pattern_pcell_r10->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_r11_present, 1)); + if (neigh_cells_crs_info_r11_present) { + neigh_cells_crs_info_r11 = make_copy_ptr(neigh_cells_crs_info_r11_c()); + HANDLE_CODE(neigh_cells_crs_info_r11->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(naics_info_r12_present, 1)); + if (naics_info_r12_present) { + naics_info_r12 = make_copy_ptr(naics_assist_info_r12_c()); + HANDLE_CODE(naics_info_r12->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(rlf_timers_and_consts_r13_present, 1)); + if (neigh_cells_crs_info_r13_present) { + neigh_cells_crs_info_r13 = make_copy_ptr(neigh_cells_crs_info_r13_c()); + HANDLE_CODE(neigh_cells_crs_info_r13->unpack(bref)); + } + if (rlf_timers_and_consts_r13_present) { + rlf_timers_and_consts_r13 = make_copy_ptr(rlf_timers_and_consts_r13_c()); + HANDLE_CODE(rlf_timers_and_consts_r13->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sps_cfg_v1430_present, 1)); + if (sps_cfg_v1430_present) { + sps_cfg_v1430 = make_copy_ptr(sps_cfg_v1430_s()); + HANDLE_CODE(sps_cfg_v1430->unpack(bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(srb_to_add_mod_ext_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(srb_to_release_ext_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(crs_intf_mitig_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(srb_to_release_list_dupl_r15_present, 1)); + if (srb_to_add_mod_ext_list_r15_present) { + srb_to_add_mod_ext_list_r15 = make_copy_ptr(srb_to_add_mod_ext_list_r15_l()); + HANDLE_CODE(unpack_fixed_seq_of(&(*srb_to_add_mod_ext_list_r15)[0], bref, srb_to_add_mod_ext_list_r15->size())); + } + if (srb_to_release_ext_list_r15_present) { + HANDLE_CODE(unpack_unalign_integer(srb_to_release_ext_list_r15, bref, (uint8_t)4, (uint8_t)4)); + } + if (sps_cfg_v1530_present) { + sps_cfg_v1530 = make_copy_ptr(sps_cfg_v1530_s()); + HANDLE_CODE(sps_cfg_v1530->unpack(bref)); + } + if (crs_intf_mitig_cfg_r15_present) { + crs_intf_mitig_cfg_r15 = make_copy_ptr(crs_intf_mitig_cfg_r15_c_()); + HANDLE_CODE(crs_intf_mitig_cfg_r15->unpack(bref)); + } + if (neigh_cells_crs_info_r15_present) { + neigh_cells_crs_info_r15 = make_copy_ptr(neigh_cells_crs_info_r15_c()); + HANDLE_CODE(neigh_cells_crs_info_r15->unpack(bref)); + } + if (drb_to_add_mod_list_r15_present) { + drb_to_add_mod_list_r15 = make_copy_ptr(drb_to_add_mod_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*drb_to_add_mod_list_r15, bref, 1, 15)); + } + if (drb_to_release_list_r15_present) { + drb_to_release_list_r15 = make_copy_ptr(drb_to_release_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*drb_to_release_list_r15, bref, 1, 15, UnalignedIntegerPacker(1, 32))); + } + if (srb_to_release_list_dupl_r15_present) { + srb_to_release_list_dupl_r15 = make_copy_ptr(srb_to_release_list_dupl_r15_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*srb_to_release_list_dupl_r15, bref, 1, 2, UnalignedIntegerPacker(1, 2))); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srb_to_add_mod_list_present) { + j.start_array("srb-ToAddModList"); + for (uint32_t i1 = 0; i1 < srb_to_add_mod_list.size(); ++i1) { + srb_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (drb_to_add_mod_list_present) { + j.start_array("drb-ToAddModList"); + for (uint32_t i1 = 0; i1 < drb_to_add_mod_list.size(); ++i1) { + drb_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (drb_to_release_list_present) { + j.start_array("drb-ToReleaseList"); + for (uint32_t i1 = 0; i1 < drb_to_release_list.size(); ++i1) { + j.write_int(drb_to_release_list[i1]); + } + j.end_array(); + } + if (mac_main_cfg_present) { + j.write_fieldname("mac-MainConfig"); + mac_main_cfg.to_json(j); + } + if (sps_cfg_present) { + j.write_fieldname("sps-Config"); + sps_cfg.to_json(j); + } + if (phys_cfg_ded_present) { + j.write_fieldname("physicalConfigDedicated"); + phys_cfg_ded.to_json(j); + } + if (rlf_timers_and_consts_r9_present) { + j.write_fieldname("rlf-TimersAndConstants-r9"); + rlf_timers_and_consts_r9->to_json(j); + } + if (meas_sf_pattern_pcell_r10_present) { + j.write_fieldname("measSubframePatternPCell-r10"); + meas_sf_pattern_pcell_r10->to_json(j); + } + if (neigh_cells_crs_info_r11_present) { + j.write_fieldname("neighCellsCRS-Info-r11"); + neigh_cells_crs_info_r11->to_json(j); + } + if (naics_info_r12_present) { + j.write_fieldname("naics-Info-r12"); + naics_info_r12->to_json(j); + } + if (neigh_cells_crs_info_r13_present) { + j.write_fieldname("neighCellsCRS-Info-r13"); + neigh_cells_crs_info_r13->to_json(j); + } + if (rlf_timers_and_consts_r13_present) { + j.write_fieldname("rlf-TimersAndConstants-r13"); + rlf_timers_and_consts_r13->to_json(j); + } + if (sps_cfg_v1430_present) { + j.write_fieldname("sps-Config-v1430"); + sps_cfg_v1430->to_json(j); + } + if (srb_to_add_mod_ext_list_r15_present) { + j.start_array("srb-ToAddModExtList-r15"); + for (uint32_t i1 = 0; i1 < srb_to_add_mod_ext_list_r15->size(); ++i1) { + ((*srb_to_add_mod_ext_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (srb_to_release_ext_list_r15_present) { + j.write_int("srb-ToReleaseExtList-r15", srb_to_release_ext_list_r15); + } + if (sps_cfg_v1530_present) { + j.write_fieldname("sps-Config-v1530"); + sps_cfg_v1530->to_json(j); + } + if (crs_intf_mitig_cfg_r15_present) { + j.write_fieldname("crs-IntfMitigConfig-r15"); + crs_intf_mitig_cfg_r15->to_json(j); + } + if (neigh_cells_crs_info_r15_present) { + j.write_fieldname("neighCellsCRS-Info-r15"); + neigh_cells_crs_info_r15->to_json(j); + } + if (drb_to_add_mod_list_r15_present) { + j.start_array("drb-ToAddModList-r15"); + for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_r15->size(); ++i1) { + ((*drb_to_add_mod_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (drb_to_release_list_r15_present) { + j.start_array("drb-ToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < drb_to_release_list_r15->size(); ++i1) { + j.write_int(((*drb_to_release_list_r15)[i1])); + } + j.end_array(); + } + if (srb_to_release_list_dupl_r15_present) { + j.start_array("srb-ToReleaseListDupl-r15"); + for (uint32_t i1 = 0; i1 < srb_to_release_list_dupl_r15->size(); ++i1) { + j.write_int(((*srb_to_release_list_dupl_r15)[i1])); + } + j.end_array(); + } + j.end_obj(); +} + +void rr_cfg_ded_s::mac_main_cfg_c_::set(types::options e) +{ + type_ = e; +} +void rr_cfg_ded_s::mac_main_cfg_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.to_json(j); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::mac_main_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE rr_cfg_ded_s::mac_main_cfg_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.pack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::mac_main_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_s::mac_main_cfg_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::explicit_value: + HANDLE_CODE(c.unpack(bref)); + break; + case types::default_value: + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::mac_main_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::set(types::options e) +{ + type_ = e; +} +void rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::crs_intf_mitig_enabled_minus15: + break; + case types::crs_intf_mitig_num_prbs_r15: + j.write_str("crs-IntfMitigNumPRBs-r15", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::crs_intf_mitig_enabled_minus15: + break; + case types::crs_intf_mitig_num_prbs_r15: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::crs_intf_mitig_enabled_minus15: + break; + case types::crs_intf_mitig_num_prbs_r15: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RedirectedCarrierInfo-r15-IEs ::= CHOICE +void redirected_carrier_info_r15_ies_c::destroy_() +{ + switch (type_) { + case types::geran_r15: + c.destroy(); + break; + case types::cdma2000_hrpd_r15: + c.destroy(); + break; + case types::cdma2000_minus1x_rtt_r15: + c.destroy(); + break; + case types::utra_tdd_r15: + c.destroy(); + break; + default: + break; + } +} +void redirected_carrier_info_r15_ies_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::eutra_r15: + break; + case types::geran_r15: + c.init(); + break; + case types::utra_fdd_r15: + break; + case types::cdma2000_hrpd_r15: + c.init(); + break; + case types::cdma2000_minus1x_rtt_r15: + c.init(); + break; + case types::utra_tdd_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_r15_ies_c"); + } +} +redirected_carrier_info_r15_ies_c::redirected_carrier_info_r15_ies_c(const redirected_carrier_info_r15_ies_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::eutra_r15: + c.init(other.c.get()); + break; + case types::geran_r15: + c.init(other.c.get()); + break; + case types::utra_fdd_r15: + c.init(other.c.get()); + break; + case types::cdma2000_hrpd_r15: + c.init(other.c.get()); + break; + case types::cdma2000_minus1x_rtt_r15: + c.init(other.c.get()); + break; + case types::utra_tdd_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_r15_ies_c"); + } +} +redirected_carrier_info_r15_ies_c& redirected_carrier_info_r15_ies_c:: + operator=(const redirected_carrier_info_r15_ies_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::eutra_r15: + c.set(other.c.get()); + break; + case types::geran_r15: + c.set(other.c.get()); + break; + case types::utra_fdd_r15: + c.set(other.c.get()); + break; + case types::cdma2000_hrpd_r15: + c.set(other.c.get()); + break; + case types::cdma2000_minus1x_rtt_r15: + c.set(other.c.get()); + break; + case types::utra_tdd_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_r15_ies_c"); + } + + return *this; +} +void redirected_carrier_info_r15_ies_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::eutra_r15: + j.write_int("eutra-r15", c.get()); + break; + case types::geran_r15: + j.write_fieldname("geran-r15"); + c.get().to_json(j); + break; + case types::utra_fdd_r15: + j.write_int("utra-FDD-r15", c.get()); + break; + case types::cdma2000_hrpd_r15: + j.write_fieldname("cdma2000-HRPD-r15"); + c.get().to_json(j); + break; + case types::cdma2000_minus1x_rtt_r15: + j.write_fieldname("cdma2000-1xRTT-r15"); + c.get().to_json(j); + break; + case types::utra_tdd_r15: + j.start_array("utra-TDD-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_int(c.get()[i1]); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_r15_ies_c"); + } + j.end_obj(); +} +SRSASN_CODE redirected_carrier_info_r15_ies_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::eutra_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint32_t)0, (uint32_t)262143)); + break; + case types::geran_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::utra_fdd_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)16383)); + break; + case types::cdma2000_hrpd_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cdma2000_minus1x_rtt_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::utra_tdd_r15: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 6, + UnalignedIntegerPacker(0, 16383))); + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_r15_ies_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE redirected_carrier_info_r15_ies_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::eutra_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint32_t)0, (uint32_t)262143)); + break; + case types::geran_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::utra_fdd_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)16383)); + break; + case types::cdma2000_hrpd_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cdma2000_minus1x_rtt_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::utra_tdd_r15: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 6, + UnalignedIntegerPacker(0, 16383))); + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_r15_ies_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReestablishment-r8-IEs ::= SEQUENCE +rrc_conn_reest_r8_ies_s::rrc_conn_reest_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(rr_cfg_ded.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, next_hop_chaining_count, (uint8_t)0, (uint8_t)7)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(rr_cfg_ded.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(next_hop_chaining_count, bref, (uint8_t)0, (uint8_t)7)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("radioResourceConfigDedicated"); + rr_cfg_ded.to_json(j); + j.write_int("nextHopChainingCount", next_hop_chaining_count); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentReject-r8-IEs ::= SEQUENCE +rrc_conn_reest_reject_r8_ies_s::rrc_conn_reest_reject_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_reject_r8_ies_s::pack(bit_ref& bref) const +{ + 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_conn_reest_reject_r8_ies_s::unpack(bit_ref& bref) +{ + 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_conn_reest_reject_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReject-r8-IEs ::= SEQUENCE +rrc_conn_reject_r8_ies_s::rrc_conn_reject_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reject_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, wait_time, (uint8_t)1, (uint8_t)16)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(wait_time, bref, (uint8_t)1, (uint8_t)16)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reject_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("waitTime", wait_time); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetup-r8-IEs ::= SEQUENCE +rrc_conn_setup_r8_ies_s::rrc_conn_setup_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(rr_cfg_ded.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(rr_cfg_ded.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("radioResourceConfigDedicated"); + rr_cfg_ded.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCEarlyDataComplete-r15-IEs ::= SEQUENCE +rrc_early_data_complete_r15_ies_s::rrc_early_data_complete_r15_ies_s() +{ + ded_info_nas_r15_present = false; + extended_wait_time_r15_present = false; + idle_mode_mob_ctrl_info_r15_present = false; + idle_mode_mob_ctrl_info_ext_r15_present = false; + redirected_carrier_info_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_early_data_complete_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_info_nas_r15_present, 1)); + HANDLE_CODE(bref.pack(extended_wait_time_r15_present, 1)); + HANDLE_CODE(bref.pack(idle_mode_mob_ctrl_info_r15_present, 1)); + HANDLE_CODE(bref.pack(idle_mode_mob_ctrl_info_ext_r15_present, 1)); + HANDLE_CODE(bref.pack(redirected_carrier_info_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_info_nas_r15_present) { + HANDLE_CODE(ded_info_nas_r15.pack(bref)); + } + if (extended_wait_time_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, extended_wait_time_r15, (uint16_t)1, (uint16_t)1800)); + } + if (idle_mode_mob_ctrl_info_r15_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info_r15.pack(bref)); + } + if (idle_mode_mob_ctrl_info_ext_r15_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info_ext_r15.pack(bref)); + } + if (redirected_carrier_info_r15_present) { + HANDLE_CODE(redirected_carrier_info_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_complete_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ded_info_nas_r15_present, 1)); + HANDLE_CODE(bref.unpack(extended_wait_time_r15_present, 1)); + HANDLE_CODE(bref.unpack(idle_mode_mob_ctrl_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(idle_mode_mob_ctrl_info_ext_r15_present, 1)); + HANDLE_CODE(bref.unpack(redirected_carrier_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ded_info_nas_r15_present) { + HANDLE_CODE(ded_info_nas_r15.unpack(bref)); + } + if (extended_wait_time_r15_present) { + HANDLE_CODE(unpack_unalign_integer(extended_wait_time_r15, bref, (uint16_t)1, (uint16_t)1800)); + } + if (idle_mode_mob_ctrl_info_r15_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info_r15.unpack(bref)); + } + if (idle_mode_mob_ctrl_info_ext_r15_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info_ext_r15.unpack(bref)); + } + if (redirected_carrier_info_r15_present) { + HANDLE_CODE(redirected_carrier_info_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_early_data_complete_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_info_nas_r15_present) { + j.write_str("dedicatedInfoNAS-r15", ded_info_nas_r15.to_string()); + } + if (extended_wait_time_r15_present) { + j.write_int("extendedWaitTime-r15", extended_wait_time_r15); + } + if (idle_mode_mob_ctrl_info_r15_present) { + j.write_fieldname("idleModeMobilityControlInfo-r15"); + idle_mode_mob_ctrl_info_r15.to_json(j); + } + if (idle_mode_mob_ctrl_info_ext_r15_present) { + j.write_fieldname("idleModeMobilityControlInfoExt-r15"); + idle_mode_mob_ctrl_info_ext_r15.to_json(j); + } + if (redirected_carrier_info_r15_present) { + j.write_fieldname("redirectedCarrierInfo-r15"); + redirected_carrier_info_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReestablishment ::= SEQUENCE +SRSASN_CODE rrc_conn_reest_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_reest_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_reest_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_"); + } +} +rrc_conn_reest_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_"); + } +} +rrc_conn_reest_s::crit_exts_c_& rrc_conn_reest_s::crit_exts_c_::operator=(const rrc_conn_reest_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_reest_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reest_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_reest_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_reest_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reest_r8: + j.write_fieldname("rrcConnectionReestablishment-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reest_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reest_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reest_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReestablishmentReject ::= SEQUENCE +SRSASN_CODE rrc_conn_reest_reject_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_reject_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_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_conn_reest_reject_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_reest_reject_r8: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_reest_reject_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_reest_reject_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_reject_s::crit_exts_c_"); + } +} +rrc_conn_reest_reject_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_reject_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_reest_reject_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_reject_s::crit_exts_c_"); + } +} +rrc_conn_reest_reject_s::crit_exts_c_& rrc_conn_reest_reject_s::crit_exts_c_:: + operator=(const rrc_conn_reest_reject_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_reest_reject_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_reject_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_reest_reject_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reest_reject_r8: + j.write_fieldname("rrcConnectionReestablishmentReject-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_reject_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reest_reject_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reest_reject_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_reject_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_reject_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reest_reject_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_reject_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReject ::= SEQUENCE +SRSASN_CODE rrc_conn_reject_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_reject_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_reject_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_"); + } +} +rrc_conn_reject_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reject_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_"); + } +} +rrc_conn_reject_s::crit_exts_c_& rrc_conn_reject_s::crit_exts_c_:: + operator=(const rrc_conn_reject_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_reject_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reject_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_reject_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_reject_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reject_r8: + j.write_fieldname("rrcConnectionReject-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reject_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reject_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reject_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reject_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reject_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionSetup ::= SEQUENCE +SRSASN_CODE rrc_conn_setup_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_setup_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_setup_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_"); + } +} +rrc_conn_setup_s::crit_exts_c_::crit_exts_c_(const rrc_conn_setup_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_"); + } +} +rrc_conn_setup_s::crit_exts_c_& rrc_conn_setup_s::crit_exts_c_::operator=(const rrc_conn_setup_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_setup_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_setup_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_setup_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_setup_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_setup_r8: + j.write_fieldname("rrcConnectionSetup-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_setup_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_setup_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_setup_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCEarlyDataComplete-r15 ::= SEQUENCE +SRSASN_CODE rrc_early_data_complete_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_complete_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_early_data_complete_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_early_data_complete_r15_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_early_data_complete_r15: + c.destroy(); + break; + default: + break; + } +} +void rrc_early_data_complete_r15_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_early_data_complete_r15: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_complete_r15_s::crit_exts_c_"); + } +} +rrc_early_data_complete_r15_s::crit_exts_c_::crit_exts_c_(const rrc_early_data_complete_r15_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_early_data_complete_r15: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_complete_r15_s::crit_exts_c_"); + } +} +rrc_early_data_complete_r15_s::crit_exts_c_& rrc_early_data_complete_r15_s::crit_exts_c_:: + operator=(const rrc_early_data_complete_r15_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_early_data_complete_r15: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_complete_r15_s::crit_exts_c_"); + } + + return *this; +} +void rrc_early_data_complete_r15_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_early_data_complete_r15: + j.write_fieldname("rrcEarlyDataComplete-r15"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_complete_r15_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_early_data_complete_r15_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_early_data_complete_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_complete_r15_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_complete_r15_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_early_data_complete_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_complete_r15_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DL-CCCH-MessageType ::= CHOICE +void dl_ccch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + case types::msg_class_ext: + c.destroy(); + break; + default: + break; + } +} +void dl_ccch_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_, "dl_ccch_msg_type_c"); + } +} +dl_ccch_msg_type_c::dl_ccch_msg_type_c(const dl_ccch_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_, "dl_ccch_msg_type_c"); + } +} +dl_ccch_msg_type_c& dl_ccch_msg_type_c::operator=(const dl_ccch_msg_type_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::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_, "dl_ccch_msg_type_c"); + } + + return *this; +} +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.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_, "dl_ccch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE dl_ccch_msg_type_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + 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_, "dl_ccch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ccch_msg_type_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, 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_, "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_conn_reest: + c.destroy(); + break; + case types::rrc_conn_reest_reject: + c.destroy(); + break; + case types::rrc_conn_reject: + c.destroy(); + break; + case types::rrc_conn_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_conn_reest: + c.init(); + break; + case types::rrc_conn_reest_reject: + c.init(); + break; + case types::rrc_conn_reject: + c.init(); + break; + case types::rrc_conn_setup: + c.init(); + 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_conn_reest: + c.init(other.c.get()); + break; + case types::rrc_conn_reest_reject: + c.init(other.c.get()); + break; + case types::rrc_conn_reject: + c.init(other.c.get()); + break; + case types::rrc_conn_setup: + c.init(other.c.get()); + 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_conn_reest: + c.set(other.c.get()); + break; + case types::rrc_conn_reest_reject: + c.set(other.c.get()); + break; + case types::rrc_conn_reject: + c.set(other.c.get()); + break; + case types::rrc_conn_setup: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + } + + return *this; +} +void dl_ccch_msg_type_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reest: + j.write_fieldname("rrcConnectionReestablishment"); + c.get().to_json(j); + break; + case types::rrc_conn_reest_reject: + j.write_fieldname("rrcConnectionReestablishmentReject"); + c.get().to_json(j); + break; + case types::rrc_conn_reject: + j.write_fieldname("rrcConnectionReject"); + c.get().to_json(j); + break; + case types::rrc_conn_setup: + j.write_fieldname("rrcConnectionSetup"); + c.get().to_json(j); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reest: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_reest_reject: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_reject: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_setup: + HANDLE_CODE(c.get().pack(bref)); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reest: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_reest_reject: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_reject: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_setup: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_ccch_msg_type_c::msg_class_ext_c_::destroy_() +{ + switch (type_) { + case types::c2: + c.destroy(); + break; + default: + break; + } +} +void dl_ccch_msg_type_c::msg_class_ext_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c2: + c.init(); + break; + case types::msg_class_ext_future_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_"); + } +} +dl_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_c_(const dl_ccch_msg_type_c::msg_class_ext_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c2: + c.init(other.c.get()); + break; + case types::msg_class_ext_future_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_"); + } +} +dl_ccch_msg_type_c::msg_class_ext_c_& dl_ccch_msg_type_c::msg_class_ext_c_:: + operator=(const dl_ccch_msg_type_c::msg_class_ext_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c2: + c.set(other.c.get()); + break; + case types::msg_class_ext_future_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_"); + } + + return *this; +} +void dl_ccch_msg_type_c::msg_class_ext_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c2: + j.write_fieldname("c2"); + c.get().to_json(j); + break; + case types::msg_class_ext_future_r15: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ccch_msg_type_c::msg_class_ext_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext_future_r15: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ccch_msg_type_c::msg_class_ext_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext_future_r15: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::set(types::options e) +{ + type_ = e; +} +void dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_early_data_complete_r15: + j.write_fieldname("rrcEarlyDataComplete-r15"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_early_data_complete_r15: + 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_ccch_msg_type_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_early_data_complete_r15: + 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_ccch_msg_type_c::msg_class_ext_c_::c2_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(bit_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(); +} + +// PDCCH-CandidateReductionsLAA-UL-r14 ::= CHOICE +void pdcch_candidate_reductions_laa_ul_r14_c::set(types::options e) +{ + type_ = e; +} +void pdcch_candidate_reductions_laa_ul_r14_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("pdcch-candidateReductionAL1-r14", c.pdcch_candidate_reduction_al1_r14.to_string()); + j.write_str("pdcch-candidateReductionAL2-r14", c.pdcch_candidate_reduction_al2_r14.to_string()); + j.write_str("pdcch-candidateReductionAL3-r14", c.pdcch_candidate_reduction_al3_r14.to_string()); + j.write_str("pdcch-candidateReductionAL4-r14", c.pdcch_candidate_reduction_al4_r14.to_string()); + j.write_str("pdcch-candidateReductionAL5-r14", c.pdcch_candidate_reduction_al5_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdcch_candidate_reductions_laa_ul_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE pdcch_candidate_reductions_laa_ul_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al1_r14)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al2_r14)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al3_r14)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al4_r14)); + HANDLE_CODE(pack_enum(bref, c.pdcch_candidate_reduction_al5_r14)); + break; + default: + log_invalid_choice_id(type_, "pdcch_candidate_reductions_laa_ul_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_candidate_reductions_laa_ul_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al1_r14, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al2_r14, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al3_r14, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al4_r14, bref)); + HANDLE_CODE(unpack_enum(c.pdcch_candidate_reduction_al5_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "pdcch_candidate_reductions_laa_ul_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AUL-Config-r15 ::= CHOICE +void aul_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void aul_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("aul-CRNTI-r15", c.aul_crnti_r15.to_string()); + j.write_str("aul-Subframes-r15", c.aul_sfs_r15.to_string()); + j.write_int("aul-HARQ-Processes-r15", c.aul_harq_processes_r15); + j.write_str("transmissionModeUL-AUL-r15", c.tx_mode_ul_aul_r15.to_string()); + j.write_str("aul-StartingFullBW-InsideMCOT-r15", c.aul_start_full_bw_inside_mcot_r15.to_string()); + j.write_str("aul-StartingFullBW-OutsideMCOT-r15", c.aul_start_full_bw_outside_mcot_r15.to_string()); + j.write_str("aul-StartingPartialBW-InsideMCOT-r15", c.aul_start_partial_bw_inside_mcot_r15.to_string()); + j.write_str("aul-StartingPartialBW-OutsideMCOT-r15", c.aul_start_partial_bw_outside_mcot_r15.to_string()); + j.write_str("aul-RetransmissionTimer-r15", c.aul_retx_timer_r15.to_string()); + j.write_int("endingSymbolAUL-r15", c.ending_symbol_aul_r15); + j.write_int("subframeOffsetCOT-Sharing-r15", c.sf_offset_cot_sharing_r15); + j.write_str("contentionWindowSizeTimer-r15", c.contention_win_size_timer_r15.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "aul_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE aul_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.aul_crnti_r15.pack(bref)); + HANDLE_CODE(c.aul_sfs_r15.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, c.aul_harq_processes_r15, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_enum(bref, c.tx_mode_ul_aul_r15)); + HANDLE_CODE(c.aul_start_full_bw_inside_mcot_r15.pack(bref)); + HANDLE_CODE(c.aul_start_full_bw_outside_mcot_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, c.aul_start_partial_bw_inside_mcot_r15)); + HANDLE_CODE(pack_enum(bref, c.aul_start_partial_bw_outside_mcot_r15)); + HANDLE_CODE(pack_enum(bref, c.aul_retx_timer_r15)); + HANDLE_CODE(pack_unalign_integer(bref, c.ending_symbol_aul_r15, (uint8_t)12, (uint8_t)13)); + HANDLE_CODE(pack_unalign_integer(bref, c.sf_offset_cot_sharing_r15, (uint8_t)2, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, c.contention_win_size_timer_r15)); + break; + default: + log_invalid_choice_id(type_, "aul_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE aul_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.aul_crnti_r15.unpack(bref)); + HANDLE_CODE(c.aul_sfs_r15.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(c.aul_harq_processes_r15, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_enum(c.tx_mode_ul_aul_r15, bref)); + HANDLE_CODE(c.aul_start_full_bw_inside_mcot_r15.unpack(bref)); + HANDLE_CODE(c.aul_start_full_bw_outside_mcot_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(c.aul_start_partial_bw_inside_mcot_r15, bref)); + HANDLE_CODE(unpack_enum(c.aul_start_partial_bw_outside_mcot_r15, bref)); + HANDLE_CODE(unpack_enum(c.aul_retx_timer_r15, bref)); + HANDLE_CODE(unpack_unalign_integer(c.ending_symbol_aul_r15, bref, (uint8_t)12, (uint8_t)13)); + HANDLE_CODE(unpack_unalign_integer(c.sf_offset_cot_sharing_r15, bref, (uint8_t)2, (uint8_t)4)); + HANDLE_CODE(unpack_enum(c.contention_win_size_timer_r15, bref)); + break; + default: + log_invalid_choice_id(type_, "aul_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CQI-ReportPeriodicSCell-r15 ::= CHOICE +void cqi_report_periodic_scell_r15_c::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_scell_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_int("cqi-pmi-ConfigIndexDormant-r15", c.cqi_pmi_cfg_idx_dormant_r15); + if (c.ri_cfg_idx_dormant_r15_present) { + j.write_int("ri-ConfigIndexDormant-r15", c.ri_cfg_idx_dormant_r15); + } + if (c.csi_sf_pattern_dormant_r15_present) { + j.write_fieldname("csi-SubframePatternDormant-r15"); + c.csi_sf_pattern_dormant_r15.to_json(j); + } + if (c.cqi_format_ind_dormant_r15_present) { + j.write_fieldname("cqi-FormatIndicatorDormant-r15"); + c.cqi_format_ind_dormant_r15.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_scell_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ri_cfg_idx_dormant_r15_present, 1)); + HANDLE_CODE(bref.pack(c.csi_sf_pattern_dormant_r15_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_format_ind_dormant_r15_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pmi_cfg_idx_dormant_r15, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx_dormant_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ri_cfg_idx_dormant_r15, (uint16_t)0, (uint16_t)1023)); + } + if (c.csi_sf_pattern_dormant_r15_present) { + HANDLE_CODE(c.csi_sf_pattern_dormant_r15.pack(bref)); + } + if (c.cqi_format_ind_dormant_r15_present) { + HANDLE_CODE(c.cqi_format_ind_dormant_r15.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_scell_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ri_cfg_idx_dormant_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.csi_sf_pattern_dormant_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_format_ind_dormant_r15_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pmi_cfg_idx_dormant_r15, bref, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx_dormant_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.ri_cfg_idx_dormant_r15, bref, (uint16_t)0, (uint16_t)1023)); + } + if (c.csi_sf_pattern_dormant_r15_present) { + HANDLE_CODE(c.csi_sf_pattern_dormant_r15.unpack(bref)); + } + if (c.cqi_format_ind_dormant_r15_present) { + HANDLE_CODE(c.cqi_format_ind_dormant_r15.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_scell_r15_c::setup_s_::setup_s_() +{ + ri_cfg_idx_dormant_r15_present = false; + csi_sf_pattern_dormant_r15_present = false; + cqi_format_ind_dormant_r15_present = false; +} + +void cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_::set(types::options e) +{ + type_ = e; +} +void cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("csi-MeasSubframeSet1-r15"); + c.csi_meas_sf_set1_r15.to_json(j); + j.write_fieldname("csi-MeasSubframeSet2-r15"); + c.csi_meas_sf_set2_r15.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.csi_meas_sf_set1_r15.pack(bref)); + HANDLE_CODE(c.csi_meas_sf_set2_r15.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.csi_meas_sf_set1_r15.unpack(bref)); + HANDLE_CODE(c.csi_meas_sf_set2_r15.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::csi_sf_pattern_dormant_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::destroy_() +{ + switch (type_) { + case types::wideband_cqi_r15: + c.destroy(); + break; + case types::subband_cqi_r15: + c.destroy(); + break; + default: + break; + } +} +void cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::wideband_cqi_r15: + c.init(); + break; + case types::subband_cqi_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_"); + } +} +cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::cqi_format_ind_dormant_r15_c_( + const cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::wideband_cqi_r15: + c.init(other.c.get()); + break; + case types::subband_cqi_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_"); + } +} +cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_& +cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_:: +operator=(const cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::wideband_cqi_r15: + c.set(other.c.get()); + break; + case types::subband_cqi_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_"); + } + + return *this; +} +void cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::wideband_cqi_r15: + j.write_fieldname("widebandCQI-r15"); + j.start_obj(); + if (c.get().csi_report_mode_r15_present) { + j.write_str("csi-ReportMode-r15", c.get().csi_report_mode_r15.to_string()); + } + j.end_obj(); + break; + case types::subband_cqi_r15: + j.write_fieldname("subbandCQI-r15"); + j.start_obj(); + j.write_int("k-r15", c.get().k_r15); + j.write_str("periodicityFactor-r15", c.get().periodicity_factor_r15.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::wideband_cqi_r15: + HANDLE_CODE(bref.pack(c.get().csi_report_mode_r15_present, 1)); + if (c.get().csi_report_mode_r15_present) { + HANDLE_CODE(pack_enum(bref, c.get().csi_report_mode_r15)); + } + break; + case types::subband_cqi_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get().k_r15, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, c.get().periodicity_factor_r15)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::wideband_cqi_r15: + HANDLE_CODE(bref.unpack(c.get().csi_report_mode_r15_present, 1)); + if (c.get().csi_report_mode_r15_present) { + HANDLE_CODE(unpack_enum(c.get().csi_report_mode_r15, bref)); + } + break; + case types::subband_cqi_r15: + HANDLE_CODE(unpack_unalign_integer(c.get().k_r15, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_enum(c.get().periodicity_factor_r15, bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_::wideband_cqi_r15_s_() +{ + csi_report_mode_r15_present = false; +} + +// CrossCarrierSchedulingConfigLAA-UL-r14 ::= SEQUENCE +SRSASN_CODE cross_carrier_sched_cfg_laa_ul_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, sched_cell_id_r14, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, cif_in_sched_cell_r14, (uint8_t)1, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_laa_ul_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(sched_cell_id_r14, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(cif_in_sched_cell_r14, bref, (uint8_t)1, (uint8_t)7)); + + return SRSASN_SUCCESS; +} +void cross_carrier_sched_cfg_laa_ul_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("schedulingCellId-r14", sched_cell_id_r14); + j.write_int("cif-InSchedulingCell-r14", cif_in_sched_cell_r14); + j.end_obj(); +} + +// LBT-Config-r14 ::= CHOICE +void lbt_cfg_r14_c::destroy_() {} +void lbt_cfg_r14_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +lbt_cfg_r14_c::lbt_cfg_r14_c(const lbt_cfg_r14_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::max_energy_detection_thres_r14: + c.init(other.c.get()); + break; + case types::energy_detection_thres_offset_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "lbt_cfg_r14_c"); + } +} +lbt_cfg_r14_c& lbt_cfg_r14_c::operator=(const lbt_cfg_r14_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::max_energy_detection_thres_r14: + c.set(other.c.get()); + break; + case types::energy_detection_thres_offset_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "lbt_cfg_r14_c"); + } + + return *this; +} +void lbt_cfg_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::max_energy_detection_thres_r14: + j.write_int("maxEnergyDetectionThreshold-r14", c.get()); + break; + case types::energy_detection_thres_offset_r14: + j.write_int("energyDetectionThresholdOffset-r14", c.get()); + break; + default: + log_invalid_choice_id(type_, "lbt_cfg_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE lbt_cfg_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::max_energy_detection_thres_r14: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (int8_t)-85, (int8_t)-52)); + break; + case types::energy_detection_thres_offset_r14: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (int8_t)-13, (int8_t)20)); + break; + default: + log_invalid_choice_id(type_, "lbt_cfg_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lbt_cfg_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::max_energy_detection_thres_r14: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (int8_t)-85, (int8_t)-52)); + break; + case types::energy_detection_thres_offset_r14: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (int8_t)-13, (int8_t)20)); + break; + default: + log_invalid_choice_id(type_, "lbt_cfg_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PDCCH-ConfigLAA-r14 ::= SEQUENCE +pdcch_cfg_laa_r14_s::pdcch_cfg_laa_r14_s() +{ + max_nof_sched_sfs_format0_b_r14_present = false; + max_nof_sched_sfs_format4_b_r14_present = false; + skip_monitoring_dci_format0_a_r14_present = false; + skip_monitoring_dci_format4_a_r14_present = false; + pdcch_candidate_reductions_format0_a_r14_present = false; + pdcch_candidate_reductions_format4_a_r14_present = false; + pdcch_candidate_reductions_format0_b_r14_present = false; + pdcch_candidate_reductions_format4_b_r14_present = false; +} +SRSASN_CODE pdcch_cfg_laa_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_nof_sched_sfs_format0_b_r14_present, 1)); + HANDLE_CODE(bref.pack(max_nof_sched_sfs_format4_b_r14_present, 1)); + HANDLE_CODE(bref.pack(skip_monitoring_dci_format0_a_r14_present, 1)); + HANDLE_CODE(bref.pack(skip_monitoring_dci_format4_a_r14_present, 1)); + HANDLE_CODE(bref.pack(pdcch_candidate_reductions_format0_a_r14_present, 1)); + HANDLE_CODE(bref.pack(pdcch_candidate_reductions_format4_a_r14_present, 1)); + HANDLE_CODE(bref.pack(pdcch_candidate_reductions_format0_b_r14_present, 1)); + HANDLE_CODE(bref.pack(pdcch_candidate_reductions_format4_b_r14_present, 1)); + + if (max_nof_sched_sfs_format0_b_r14_present) { + HANDLE_CODE(pack_enum(bref, max_nof_sched_sfs_format0_b_r14)); + } + if (max_nof_sched_sfs_format4_b_r14_present) { + HANDLE_CODE(pack_enum(bref, max_nof_sched_sfs_format4_b_r14)); + } + if (pdcch_candidate_reductions_format0_a_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format0_a_r14.pack(bref)); + } + if (pdcch_candidate_reductions_format4_a_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format4_a_r14.pack(bref)); + } + if (pdcch_candidate_reductions_format0_b_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format0_b_r14.pack(bref)); + } + if (pdcch_candidate_reductions_format4_b_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format4_b_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_laa_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_nof_sched_sfs_format0_b_r14_present, 1)); + HANDLE_CODE(bref.unpack(max_nof_sched_sfs_format4_b_r14_present, 1)); + HANDLE_CODE(bref.unpack(skip_monitoring_dci_format0_a_r14_present, 1)); + HANDLE_CODE(bref.unpack(skip_monitoring_dci_format4_a_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_candidate_reductions_format0_a_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_candidate_reductions_format4_a_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_candidate_reductions_format0_b_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_candidate_reductions_format4_b_r14_present, 1)); + + if (max_nof_sched_sfs_format0_b_r14_present) { + HANDLE_CODE(unpack_enum(max_nof_sched_sfs_format0_b_r14, bref)); + } + if (max_nof_sched_sfs_format4_b_r14_present) { + HANDLE_CODE(unpack_enum(max_nof_sched_sfs_format4_b_r14, bref)); + } + if (pdcch_candidate_reductions_format0_a_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format0_a_r14.unpack(bref)); + } + if (pdcch_candidate_reductions_format4_a_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format4_a_r14.unpack(bref)); + } + if (pdcch_candidate_reductions_format0_b_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format0_b_r14.unpack(bref)); + } + if (pdcch_candidate_reductions_format4_b_r14_present) { + HANDLE_CODE(pdcch_candidate_reductions_format4_b_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdcch_cfg_laa_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (max_nof_sched_sfs_format0_b_r14_present) { + j.write_str("maxNumberOfSchedSubframes-Format0B-r14", max_nof_sched_sfs_format0_b_r14.to_string()); + } + if (max_nof_sched_sfs_format4_b_r14_present) { + j.write_str("maxNumberOfSchedSubframes-Format4B-r14", max_nof_sched_sfs_format4_b_r14.to_string()); + } + if (skip_monitoring_dci_format0_a_r14_present) { + j.write_str("skipMonitoringDCI-Format0A-r14", "true"); + } + if (skip_monitoring_dci_format4_a_r14_present) { + j.write_str("skipMonitoringDCI-Format4A-r14", "true"); + } + if (pdcch_candidate_reductions_format0_a_r14_present) { + j.write_fieldname("pdcch-CandidateReductions-Format0A-r14"); + pdcch_candidate_reductions_format0_a_r14.to_json(j); + } + if (pdcch_candidate_reductions_format4_a_r14_present) { + j.write_fieldname("pdcch-CandidateReductions-Format4A-r14"); + pdcch_candidate_reductions_format4_a_r14.to_json(j); + } + if (pdcch_candidate_reductions_format0_b_r14_present) { + j.write_fieldname("pdcch-CandidateReductions-Format0B-r14"); + pdcch_candidate_reductions_format0_b_r14.to_json(j); + } + if (pdcch_candidate_reductions_format4_b_r14_present) { + j.write_fieldname("pdcch-CandidateReductions-Format4B-r14"); + pdcch_candidate_reductions_format4_b_r14.to_json(j); + } + j.end_obj(); +} + +// PUSCH-ModeConfigLAA-r15 ::= SEQUENCE +SRSASN_CODE pusch_mode_cfg_laa_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(laa_pusch_mode1, 1)); + HANDLE_CODE(bref.pack(laa_pusch_mode2, 1)); + HANDLE_CODE(bref.pack(laa_pusch_mode3, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_mode_cfg_laa_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(laa_pusch_mode1, 1)); + HANDLE_CODE(bref.unpack(laa_pusch_mode2, 1)); + HANDLE_CODE(bref.unpack(laa_pusch_mode3, 1)); + + return SRSASN_SUCCESS; +} +void pusch_mode_cfg_laa_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("laa-PUSCH-Mode1", laa_pusch_mode1); + j.write_bool("laa-PUSCH-Mode2", laa_pusch_mode2); + j.write_bool("laa-PUSCH-Mode3", laa_pusch_mode3); + j.end_obj(); +} + +// SoundingRS-UL-ConfigDedicatedAperiodic-v1430 ::= CHOICE +void srs_ul_cfg_ded_aperiodic_v1430_c::set(types::options e) +{ + type_ = e; +} +void srs_ul_cfg_ded_aperiodic_v1430_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(); + if (c.srs_sf_ind_r14_present) { + j.write_int("srs-SubframeIndication-r14", c.srs_sf_ind_r14); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1430_c"); + } + j.end_obj(); +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_v1430_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.srs_sf_ind_r14_present, 1)); + if (c.srs_sf_ind_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.srs_sf_ind_r14, (uint8_t)1, (uint8_t)4)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1430_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_ul_cfg_ded_aperiodic_v1430_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.srs_sf_ind_r14_present, 1)); + if (c.srs_sf_ind_r14_present) { + HANDLE_CODE(unpack_unalign_integer(c.srs_sf_ind_r14, bref, (uint8_t)1, (uint8_t)4)); + } + break; + default: + log_invalid_choice_id(type_, "srs_ul_cfg_ded_aperiodic_v1430_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +srs_ul_cfg_ded_aperiodic_v1430_c::setup_s_::setup_s_() +{ + srs_sf_ind_r14_present = false; +} + +// CQI-ReportConfigSCell-r10 ::= SEQUENCE +cqi_report_cfg_scell_r10_s::cqi_report_cfg_scell_r10_s() +{ + cqi_report_mode_aperiodic_r10_present = false; + cqi_report_periodic_scell_r10_present = false; + pmi_ri_report_r10_present = false; +} +SRSASN_CODE cqi_report_cfg_scell_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_mode_aperiodic_r10_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_periodic_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(pmi_ri_report_r10_present, 1)); + + if (cqi_report_mode_aperiodic_r10_present) { + HANDLE_CODE(pack_enum(bref, cqi_report_mode_aperiodic_r10)); + } + HANDLE_CODE(pack_unalign_integer(bref, nom_pdsch_rs_epre_offset_r10, (int8_t)-1, (int8_t)6)); + if (cqi_report_periodic_scell_r10_present) { + HANDLE_CODE(cqi_report_periodic_scell_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_scell_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_mode_aperiodic_r10_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_periodic_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(pmi_ri_report_r10_present, 1)); + + if (cqi_report_mode_aperiodic_r10_present) { + HANDLE_CODE(unpack_enum(cqi_report_mode_aperiodic_r10, bref)); + } + HANDLE_CODE(unpack_unalign_integer(nom_pdsch_rs_epre_offset_r10, bref, (int8_t)-1, (int8_t)6)); + if (cqi_report_periodic_scell_r10_present) { + HANDLE_CODE(cqi_report_periodic_scell_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_mode_aperiodic_r10_present) { + j.write_str("cqi-ReportModeAperiodic-r10", cqi_report_mode_aperiodic_r10.to_string()); + } + j.write_int("nomPDSCH-RS-EPRE-Offset-r10", nom_pdsch_rs_epre_offset_r10); + if (cqi_report_periodic_scell_r10_present) { + j.write_fieldname("cqi-ReportPeriodicSCell-r10"); + cqi_report_periodic_scell_r10.to_json(j); + } + if (pmi_ri_report_r10_present) { + j.write_str("pmi-RI-Report-r10", "setup"); + } + j.end_obj(); +} + +// CQI-ReportConfigSCell-r15 ::= SEQUENCE +cqi_report_cfg_scell_r15_s::cqi_report_cfg_scell_r15_s() +{ + cqi_report_periodic_scell_r15_present = false; + alt_cqi_table_minus1024_qam_r15_present = false; +} +SRSASN_CODE cqi_report_cfg_scell_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cqi_report_periodic_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(alt_cqi_table_minus1024_qam_r15_present, 1)); + + if (cqi_report_periodic_scell_r15_present) { + HANDLE_CODE(cqi_report_periodic_scell_r15.pack(bref)); + } + if (alt_cqi_table_minus1024_qam_r15_present) { + HANDLE_CODE(pack_enum(bref, alt_cqi_table_minus1024_qam_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_report_cfg_scell_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cqi_report_periodic_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(alt_cqi_table_minus1024_qam_r15_present, 1)); + + if (cqi_report_periodic_scell_r15_present) { + HANDLE_CODE(cqi_report_periodic_scell_r15.unpack(bref)); + } + if (alt_cqi_table_minus1024_qam_r15_present) { + HANDLE_CODE(unpack_enum(alt_cqi_table_minus1024_qam_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void cqi_report_cfg_scell_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cqi_report_periodic_scell_r15_present) { + j.write_fieldname("cqi-ReportPeriodicSCell-r15"); + cqi_report_periodic_scell_r15.to_json(j); + } + if (alt_cqi_table_minus1024_qam_r15_present) { + j.write_str("altCQI-Table-1024QAM-r15", alt_cqi_table_minus1024_qam_r15.to_string()); + } + j.end_obj(); +} + +// CQI-ShortConfigSCell-r15 ::= CHOICE +void cqi_short_cfg_scell_r15_c::set(types::options e) +{ + type_ = e; +} +void cqi_short_cfg_scell_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_int("cqi-pmi-ConfigIndexShort-r15", c.cqi_pmi_cfg_idx_short_r15); + if (c.ri_cfg_idx_short_r15_present) { + j.write_int("ri-ConfigIndexShort-r15", c.ri_cfg_idx_short_r15); + } + if (c.cqi_format_ind_short_r15_present) { + j.write_fieldname("cqi-FormatIndicatorShort-r15"); + c.cqi_format_ind_short_r15.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE cqi_short_cfg_scell_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.ri_cfg_idx_short_r15_present, 1)); + HANDLE_CODE(bref.pack(c.cqi_format_ind_short_r15_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.cqi_pmi_cfg_idx_short_r15, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx_short_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.ri_cfg_idx_short_r15, (uint16_t)0, (uint16_t)1023)); + } + if (c.cqi_format_ind_short_r15_present) { + HANDLE_CODE(c.cqi_format_ind_short_r15.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_short_cfg_scell_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.ri_cfg_idx_short_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.cqi_format_ind_short_r15_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.cqi_pmi_cfg_idx_short_r15, bref, (uint16_t)0, (uint16_t)1023)); + if (c.ri_cfg_idx_short_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.ri_cfg_idx_short_r15, bref, (uint16_t)0, (uint16_t)1023)); + } + if (c.cqi_format_ind_short_r15_present) { + HANDLE_CODE(c.cqi_format_ind_short_r15.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_short_cfg_scell_r15_c::setup_s_::setup_s_() +{ + ri_cfg_idx_short_r15_present = false; + cqi_format_ind_short_r15_present = false; +} + +void cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::destroy_() +{ + switch (type_) { + case types::wideband_cqi_short_r15: + c.destroy(); + break; + case types::subband_cqi_short_r15: + c.destroy(); + break; + default: + break; + } +} +void cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::wideband_cqi_short_r15: + c.init(); + break; + case types::subband_cqi_short_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_"); + } +} +cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::cqi_format_ind_short_r15_c_( + const cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::wideband_cqi_short_r15: + c.init(other.c.get()); + break; + case types::subband_cqi_short_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_"); + } +} +cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_& +cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_:: +operator=(const cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::wideband_cqi_short_r15: + c.set(other.c.get()); + break; + case types::subband_cqi_short_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_"); + } + + return *this; +} +void cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::wideband_cqi_short_r15: + j.write_fieldname("widebandCQI-Short-r15"); + j.start_obj(); + if (c.get().csi_report_mode_short_r15_present) { + j.write_str("csi-ReportModeShort-r15", + c.get().csi_report_mode_short_r15.to_string()); + } + j.end_obj(); + break; + case types::subband_cqi_short_r15: + j.write_fieldname("subbandCQI-Short-r15"); + j.start_obj(); + j.write_int("k-r15", c.get().k_r15); + j.write_str("periodicityFactor-r15", c.get().periodicity_factor_r15.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::wideband_cqi_short_r15: + HANDLE_CODE(bref.pack(c.get().csi_report_mode_short_r15_present, 1)); + if (c.get().csi_report_mode_short_r15_present) { + HANDLE_CODE(pack_enum(bref, c.get().csi_report_mode_short_r15)); + } + break; + case types::subband_cqi_short_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get().k_r15, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, c.get().periodicity_factor_r15)); + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::wideband_cqi_short_r15: + HANDLE_CODE(bref.unpack(c.get().csi_report_mode_short_r15_present, 1)); + if (c.get().csi_report_mode_short_r15_present) { + HANDLE_CODE(unpack_enum(c.get().csi_report_mode_short_r15, bref)); + } + break; + case types::subband_cqi_short_r15: + HANDLE_CODE(unpack_unalign_integer(c.get().k_r15, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_enum(c.get().periodicity_factor_r15, bref)); + break; + default: + log_invalid_choice_id(type_, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_::wideband_cqi_short_r15_s_() +{ + csi_report_mode_short_r15_present = false; +} + +// CrossCarrierSchedulingConfig-r10 ::= SEQUENCE +SRSASN_CODE cross_carrier_sched_cfg_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sched_cell_info_r10.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(sched_cell_info_r10.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cross_carrier_sched_cfg_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("schedulingCellInfo-r10"); + sched_cell_info_r10.to_json(j); + j.end_obj(); +} + +void cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::destroy_() +{ + switch (type_) { + case types::own_r10: + c.destroy(); + break; + case types::other_r10: + c.destroy(); + break; + default: + break; + } +} +void cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::own_r10: + c.init(); + break; + case types::other_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_"); + } +} +cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::sched_cell_info_r10_c_( + const cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::own_r10: + c.init(other.c.get()); + break; + case types::other_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_"); + } +} +cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_& cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_:: + operator=(const cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::own_r10: + c.set(other.c.get()); + break; + case types::other_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_"); + } + + return *this; +} +void cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::own_r10: + j.write_fieldname("own-r10"); + j.start_obj(); + j.write_bool("cif-Presence-r10", c.get().cif_presence_r10); + j.end_obj(); + break; + case types::other_r10: + j.write_fieldname("other-r10"); + j.start_obj(); + j.write_int("schedulingCellId-r10", c.get().sched_cell_id_r10); + j.write_int("pdsch-Start-r10", c.get().pdsch_start_r10); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::own_r10: + HANDLE_CODE(bref.pack(c.get().cif_presence_r10, 1)); + break; + case types::other_r10: + HANDLE_CODE(pack_unalign_integer(bref, c.get().sched_cell_id_r10, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().pdsch_start_r10, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::own_r10: + HANDLE_CODE(bref.unpack(c.get().cif_presence_r10, 1)); + break; + case types::other_r10: + HANDLE_CODE(unpack_unalign_integer(c.get().sched_cell_id_r10, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(c.get().pdsch_start_r10, bref, (uint8_t)1, (uint8_t)4)); + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CrossCarrierSchedulingConfig-r13 ::= SEQUENCE +SRSASN_CODE cross_carrier_sched_cfg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sched_cell_info_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(sched_cell_info_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cross_carrier_sched_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("schedulingCellInfo-r13"); + sched_cell_info_r13.to_json(j); + j.end_obj(); +} + +void cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::destroy_() +{ + switch (type_) { + case types::own_r13: + c.destroy(); + break; + case types::other_r13: + c.destroy(); + break; + default: + break; + } +} +void cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::own_r13: + c.init(); + break; + case types::other_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_"); + } +} +cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::sched_cell_info_r13_c_( + const cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::own_r13: + c.init(other.c.get()); + break; + case types::other_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_"); + } +} +cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_& cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_:: + operator=(const cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::own_r13: + c.set(other.c.get()); + break; + case types::other_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_"); + } + + return *this; +} +void cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::own_r13: + j.write_fieldname("own-r13"); + j.start_obj(); + j.write_bool("cif-Presence-r13", c.get().cif_presence_r13); + j.end_obj(); + break; + case types::other_r13: + j.write_fieldname("other-r13"); + j.start_obj(); + j.write_int("schedulingCellId-r13", c.get().sched_cell_id_r13); + j.write_int("pdsch-Start-r13", c.get().pdsch_start_r13); + j.write_int("cif-InSchedulingCell-r13", c.get().cif_in_sched_cell_r13); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::own_r13: + HANDLE_CODE(bref.pack(c.get().cif_presence_r13, 1)); + break; + case types::other_r13: + HANDLE_CODE(pack_unalign_integer(bref, c.get().sched_cell_id_r13, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().pdsch_start_r13, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().cif_in_sched_cell_r13, (uint8_t)1, (uint8_t)7)); + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::own_r13: + HANDLE_CODE(bref.unpack(c.get().cif_presence_r13, 1)); + break; + case types::other_r13: + HANDLE_CODE(unpack_unalign_integer(c.get().sched_cell_id_r13, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(c.get().pdsch_start_r13, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(unpack_unalign_integer(c.get().cif_in_sched_cell_r13, bref, (uint8_t)1, (uint8_t)7)); + break; + default: + log_invalid_choice_id(type_, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DeltaFList-SPUCCH-r15 ::= CHOICE +void delta_flist_spucch_r15_c::set(types::options e) +{ + type_ = e; +} +void delta_flist_spucch_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + if (c.delta_f_slot_spucch_format1_r15_present) { + j.write_str("deltaF-slotSPUCCH-Format1-r15", c.delta_f_slot_spucch_format1_r15.to_string()); + } + if (c.delta_f_slot_spucch_format1a_r15_present) { + j.write_str("deltaF-slotSPUCCH-Format1a-r15", c.delta_f_slot_spucch_format1a_r15.to_string()); + } + if (c.delta_f_slot_spucch_format1b_r15_present) { + j.write_str("deltaF-slotSPUCCH-Format1b-r15", c.delta_f_slot_spucch_format1b_r15.to_string()); + } + if (c.delta_f_slot_spucch_format3_r15_present) { + j.write_str("deltaF-slotSPUCCH-Format3-r15", c.delta_f_slot_spucch_format3_r15.to_string()); + } + if (c.delta_f_slot_spucch_rm_format4_r15_present) { + j.write_str("deltaF-slotSPUCCH-RM-Format4-r15", c.delta_f_slot_spucch_rm_format4_r15.to_string()); + } + if (c.delta_f_slot_spucch_tbcc_format4_r15_present) { + j.write_str("deltaF-slotSPUCCH-TBCC-Format4-r15", c.delta_f_slot_spucch_tbcc_format4_r15.to_string()); + } + if (c.delta_f_subslot_spucch_format1and1a_r15_present) { + j.write_str("deltaF-subslotSPUCCH-Format1and1a-r15", c.delta_f_subslot_spucch_format1and1a_r15.to_string()); + } + if (c.delta_f_subslot_spucch_format1b_r15_present) { + j.write_str("deltaF-subslotSPUCCH-Format1b-r15", c.delta_f_subslot_spucch_format1b_r15.to_string()); + } + if (c.delta_f_subslot_spucch_rm_format4_r15_present) { + j.write_str("deltaF-subslotSPUCCH-RM-Format4-r15", c.delta_f_subslot_spucch_rm_format4_r15.to_string()); + } + if (c.delta_f_subslot_spucch_tbcc_format4_r15_present) { + j.write_str("deltaF-subslotSPUCCH-TBCC-Format4-r15", c.delta_f_subslot_spucch_tbcc_format4_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "delta_flist_spucch_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE delta_flist_spucch_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.delta_f_slot_spucch_format1_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_slot_spucch_format1a_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_slot_spucch_format1b_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_slot_spucch_format3_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_slot_spucch_rm_format4_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_slot_spucch_tbcc_format4_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_subslot_spucch_format1and1a_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_subslot_spucch_format1b_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_subslot_spucch_rm_format4_r15_present, 1)); + HANDLE_CODE(bref.pack(c.delta_f_subslot_spucch_tbcc_format4_r15_present, 1)); + if (c.delta_f_slot_spucch_format1_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_slot_spucch_format1_r15)); + } + if (c.delta_f_slot_spucch_format1a_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_slot_spucch_format1a_r15)); + } + if (c.delta_f_slot_spucch_format1b_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_slot_spucch_format1b_r15)); + } + if (c.delta_f_slot_spucch_format3_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_slot_spucch_format3_r15)); + } + if (c.delta_f_slot_spucch_rm_format4_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_slot_spucch_rm_format4_r15)); + } + if (c.delta_f_slot_spucch_tbcc_format4_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_slot_spucch_tbcc_format4_r15)); + } + if (c.delta_f_subslot_spucch_format1and1a_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_subslot_spucch_format1and1a_r15)); + } + if (c.delta_f_subslot_spucch_format1b_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_subslot_spucch_format1b_r15)); + } + if (c.delta_f_subslot_spucch_rm_format4_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_subslot_spucch_rm_format4_r15)); + } + if (c.delta_f_subslot_spucch_tbcc_format4_r15_present) { + HANDLE_CODE(pack_enum(bref, c.delta_f_subslot_spucch_tbcc_format4_r15)); + } + break; + default: + log_invalid_choice_id(type_, "delta_flist_spucch_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE delta_flist_spucch_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.delta_f_slot_spucch_format1_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_slot_spucch_format1a_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_slot_spucch_format1b_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_slot_spucch_format3_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_slot_spucch_rm_format4_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_slot_spucch_tbcc_format4_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_subslot_spucch_format1and1a_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_subslot_spucch_format1b_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_subslot_spucch_rm_format4_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.delta_f_subslot_spucch_tbcc_format4_r15_present, 1)); + if (c.delta_f_slot_spucch_format1_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_slot_spucch_format1_r15, bref)); + } + if (c.delta_f_slot_spucch_format1a_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_slot_spucch_format1a_r15, bref)); + } + if (c.delta_f_slot_spucch_format1b_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_slot_spucch_format1b_r15, bref)); + } + if (c.delta_f_slot_spucch_format3_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_slot_spucch_format3_r15, bref)); + } + if (c.delta_f_slot_spucch_rm_format4_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_slot_spucch_rm_format4_r15, bref)); + } + if (c.delta_f_slot_spucch_tbcc_format4_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_slot_spucch_tbcc_format4_r15, bref)); + } + if (c.delta_f_subslot_spucch_format1and1a_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_subslot_spucch_format1and1a_r15, bref)); + } + if (c.delta_f_subslot_spucch_format1b_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_subslot_spucch_format1b_r15, bref)); + } + if (c.delta_f_subslot_spucch_rm_format4_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_subslot_spucch_rm_format4_r15, bref)); + } + if (c.delta_f_subslot_spucch_tbcc_format4_r15_present) { + HANDLE_CODE(unpack_enum(c.delta_f_subslot_spucch_tbcc_format4_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "delta_flist_spucch_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +delta_flist_spucch_r15_c::setup_s_::setup_s_() +{ + ext = false; + delta_f_slot_spucch_format1_r15_present = false; + delta_f_slot_spucch_format1a_r15_present = false; + delta_f_slot_spucch_format1b_r15_present = false; + delta_f_slot_spucch_format3_r15_present = false; + delta_f_slot_spucch_rm_format4_r15_present = false; + delta_f_slot_spucch_tbcc_format4_r15_present = false; + delta_f_subslot_spucch_format1and1a_r15_present = false; + delta_f_subslot_spucch_format1b_r15_present = false; + delta_f_subslot_spucch_rm_format4_r15_present = false; + delta_f_subslot_spucch_tbcc_format4_r15_present = false; +} + +// LAA-SCellConfiguration-r13 ::= SEQUENCE +SRSASN_CODE laa_scell_cfg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sf_start_position_r13)); + HANDLE_CODE(laa_scell_sf_cfg_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_scell_cfg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sf_start_position_r13, bref)); + HANDLE_CODE(laa_scell_sf_cfg_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void laa_scell_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("subframeStartPosition-r13", sf_start_position_r13.to_string()); + j.write_str("laa-SCellSubframeConfig-r13", laa_scell_sf_cfg_r13.to_string()); + j.end_obj(); +} + +// LAA-SCellConfiguration-v1430 ::= SEQUENCE +laa_scell_cfg_v1430_s::laa_scell_cfg_v1430_s() +{ + cross_carrier_sched_cfg_ul_r14_present = false; + lbt_cfg_r14_present = false; + pdcch_cfg_laa_r14_present = false; + absence_of_any_other_technology_r14_present = false; + srs_ul_cfg_ded_aperiodic_v1430_present = false; +} +SRSASN_CODE laa_scell_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cross_carrier_sched_cfg_ul_r14_present, 1)); + HANDLE_CODE(bref.pack(lbt_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(pdcch_cfg_laa_r14_present, 1)); + HANDLE_CODE(bref.pack(absence_of_any_other_technology_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_aperiodic_v1430_present, 1)); + + if (cross_carrier_sched_cfg_ul_r14_present) { + HANDLE_CODE(cross_carrier_sched_cfg_ul_r14.pack(bref)); + } + if (lbt_cfg_r14_present) { + HANDLE_CODE(lbt_cfg_r14.pack(bref)); + } + if (pdcch_cfg_laa_r14_present) { + HANDLE_CODE(pdcch_cfg_laa_r14.pack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_v1430_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_v1430.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_scell_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cross_carrier_sched_cfg_ul_r14_present, 1)); + HANDLE_CODE(bref.unpack(lbt_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_cfg_laa_r14_present, 1)); + HANDLE_CODE(bref.unpack(absence_of_any_other_technology_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_aperiodic_v1430_present, 1)); + + if (cross_carrier_sched_cfg_ul_r14_present) { + HANDLE_CODE(cross_carrier_sched_cfg_ul_r14.unpack(bref)); + } + if (lbt_cfg_r14_present) { + HANDLE_CODE(lbt_cfg_r14.unpack(bref)); + } + if (pdcch_cfg_laa_r14_present) { + HANDLE_CODE(pdcch_cfg_laa_r14.unpack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_v1430_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_v1430.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void laa_scell_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cross_carrier_sched_cfg_ul_r14_present) { + j.write_fieldname("crossCarrierSchedulingConfig-UL-r14"); + cross_carrier_sched_cfg_ul_r14.to_json(j); + } + if (lbt_cfg_r14_present) { + j.write_fieldname("lbt-Config-r14"); + lbt_cfg_r14.to_json(j); + } + if (pdcch_cfg_laa_r14_present) { + j.write_fieldname("pdcch-ConfigLAA-r14"); + pdcch_cfg_laa_r14.to_json(j); + } + if (absence_of_any_other_technology_r14_present) { + j.write_str("absenceOfAnyOtherTechnology-r14", "true"); + } + if (srs_ul_cfg_ded_aperiodic_v1430_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodic-v1430"); + srs_ul_cfg_ded_aperiodic_v1430.to_json(j); + } + j.end_obj(); +} + +void laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_::set(types::options e) +{ + type_ = e; +} +void laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("crossCarrierSchedulingConfigLAA-UL-r14"); + c.cross_carrier_sched_cfg_laa_ul_r14.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.cross_carrier_sched_cfg_laa_ul_r14.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.cross_carrier_sched_cfg_laa_ul_r14.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "laa_scell_cfg_v1430_s::cross_carrier_sched_cfg_ul_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// LAA-SCellConfiguration-v1530 ::= SEQUENCE +laa_scell_cfg_v1530_s::laa_scell_cfg_v1530_s() +{ + aul_cfg_r15_present = false; + pusch_mode_cfg_laa_r15_present = false; +} +SRSASN_CODE laa_scell_cfg_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(aul_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(pusch_mode_cfg_laa_r15_present, 1)); + + if (aul_cfg_r15_present) { + HANDLE_CODE(aul_cfg_r15.pack(bref)); + } + if (pusch_mode_cfg_laa_r15_present) { + HANDLE_CODE(pusch_mode_cfg_laa_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_scell_cfg_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(aul_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(pusch_mode_cfg_laa_r15_present, 1)); + + if (aul_cfg_r15_present) { + HANDLE_CODE(aul_cfg_r15.unpack(bref)); + } + if (pusch_mode_cfg_laa_r15_present) { + HANDLE_CODE(pusch_mode_cfg_laa_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void laa_scell_cfg_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (aul_cfg_r15_present) { + j.write_fieldname("aul-Config-r15"); + aul_cfg_r15.to_json(j); + } + if (pusch_mode_cfg_laa_r15_present) { + j.write_fieldname("pusch-ModeConfigLAA-r15"); + pusch_mode_cfg_laa_r15.to_json(j); + } + j.end_obj(); +} + +// PDCCH-ConfigSCell-r13 ::= SEQUENCE +pdcch_cfg_scell_r13_s::pdcch_cfg_scell_r13_s() +{ + skip_monitoring_dci_format0_minus1_a_r13_present = false; +} +SRSASN_CODE pdcch_cfg_scell_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(skip_monitoring_dci_format0_minus1_a_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_scell_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(skip_monitoring_dci_format0_minus1_a_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void pdcch_cfg_scell_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (skip_monitoring_dci_format0_minus1_a_r13_present) { + j.write_str("skipMonitoringDCI-format0-1A-r13", "true"); + } + j.end_obj(); +} + +// PDSCH-ConfigDedicatedSCell-v1430 ::= SEQUENCE +pdsch_cfg_ded_scell_v1430_s::pdsch_cfg_ded_scell_v1430_s() +{ + tbs_idx_alt2_r14_present = false; +} +SRSASN_CODE pdsch_cfg_ded_scell_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tbs_idx_alt2_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ded_scell_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tbs_idx_alt2_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ded_scell_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tbs_idx_alt2_r14_present) { + j.write_str("tbsIndexAlt2-r14", "b33"); + } + j.end_obj(); +} + +// PUCCH-ConfigDedicated-v1370 ::= SEQUENCE +SRSASN_CODE pucch_cfg_ded_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pucch_format_v1370.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(pucch_format_v1370.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pucch_cfg_ded_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pucch-Format-v1370"); + pucch_format_v1370.to_json(j); + j.end_obj(); +} + +void pucch_cfg_ded_v1370_s::pucch_format_v1370_c_::set(types::options e) +{ + type_ = e; +} +void pucch_cfg_ded_v1370_s::pucch_format_v1370_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1370_s::pucch_format_v1370_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_ded_v1370_s::pucch_format_v1370_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1370_s::pucch_format_v1370_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_ded_v1370_s::pucch_format_v1370_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_ded_v1370_s::pucch_format_v1370_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PUSCH-ConfigDedicatedSCell-r10 ::= SEQUENCE +pusch_cfg_ded_scell_r10_s::pusch_cfg_ded_scell_r10_s() +{ + group_hop_disabled_r10_present = false; + dmrs_with_occ_activ_r10_present = false; +} +SRSASN_CODE pusch_cfg_ded_scell_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(group_hop_disabled_r10_present, 1)); + HANDLE_CODE(bref.pack(dmrs_with_occ_activ_r10_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_scell_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(group_hop_disabled_r10_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_with_occ_activ_r10_present, 1)); + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (group_hop_disabled_r10_present) { + j.write_str("groupHoppingDisabled-r10", "true"); + } + if (dmrs_with_occ_activ_r10_present) { + j.write_str("dmrs-WithOCC-Activated-r10", "true"); + } + j.end_obj(); +} + +// PUSCH-ConfigDedicatedSCell-v1430 ::= SEQUENCE +pusch_cfg_ded_scell_v1430_s::pusch_cfg_ded_scell_v1430_s() +{ + enable256_qam_r14_present = false; +} +SRSASN_CODE pusch_cfg_ded_scell_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(enable256_qam_r14_present, 1)); + + if (enable256_qam_r14_present) { + HANDLE_CODE(enable256_qam_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_scell_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(enable256_qam_r14_present, 1)); + + if (enable256_qam_r14_present) { + HANDLE_CODE(enable256_qam_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_scell_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (enable256_qam_r14_present) { + j.write_fieldname("enable256QAM-r14"); + enable256_qam_r14.to_json(j); + } + j.end_obj(); +} + +// PUSCH-ConfigDedicatedScell-v1530 ::= SEQUENCE +SRSASN_CODE pusch_cfg_ded_scell_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(uci_on_pusch_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_scell_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(uci_on_pusch_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_cfg_ded_scell_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("uci-OnPUSCH-r15"); + uci_on_pusch_r15.to_json(j); + j.end_obj(); +} + +void pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_::set(types::options e) +{ + type_ = e; +} +void pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_int("betaOffsetAUL-r15", c.beta_offset_aul_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c.beta_offset_aul_r15, (uint8_t)0, (uint8_t)15)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c.beta_offset_aul_r15, bref, (uint8_t)0, (uint8_t)15)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_ded_scell_v1530_s::uci_on_pusch_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SchedulingRequestConfigSCell-r13 ::= CHOICE +void sched_request_cfg_scell_r13_c::set(types::options e) +{ + type_ = e; +} +void sched_request_cfg_scell_r13_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_int("sr-PUCCH-ResourceIndex-r13", c.sr_pucch_res_idx_r13); + if (c.sr_pucch_res_idx_p1_r13_present) { + j.write_int("sr-PUCCH-ResourceIndexP1-r13", c.sr_pucch_res_idx_p1_r13); + } + j.write_int("sr-ConfigIndex-r13", c.sr_cfg_idx_r13); + j.write_str("dsr-TransMax-r13", c.dsr_trans_max_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_scell_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE sched_request_cfg_scell_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.sr_pucch_res_idx_p1_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.sr_pucch_res_idx_r13, (uint16_t)0, (uint16_t)2047)); + if (c.sr_pucch_res_idx_p1_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.sr_pucch_res_idx_p1_r13, (uint16_t)0, (uint16_t)2047)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.sr_cfg_idx_r13, (uint8_t)0, (uint8_t)157)); + HANDLE_CODE(pack_enum(bref, c.dsr_trans_max_r13)); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_scell_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_cfg_scell_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.sr_pucch_res_idx_p1_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.sr_pucch_res_idx_r13, bref, (uint16_t)0, (uint16_t)2047)); + if (c.sr_pucch_res_idx_p1_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.sr_pucch_res_idx_p1_r13, bref, (uint16_t)0, (uint16_t)2047)); + } + HANDLE_CODE(unpack_unalign_integer(c.sr_cfg_idx_r13, bref, (uint8_t)0, (uint8_t)157)); + HANDLE_CODE(unpack_enum(c.dsr_trans_max_r13, bref)); + break; + default: + log_invalid_choice_id(type_, "sched_request_cfg_scell_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sched_request_cfg_scell_r13_c::setup_s_::setup_s_() +{ + sr_pucch_res_idx_p1_r13_present = false; +} + +// SoundingRS-AperiodicSet-r14 ::= SEQUENCE +srs_aperiodic_set_r14_s::srs_aperiodic_set_r14_s() +{ + srs_cc_set_idx_list_r14_present = false; +} +SRSASN_CODE srs_aperiodic_set_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(srs_cc_set_idx_list_r14_present, 1)); + + if (srs_cc_set_idx_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_cc_set_idx_list_r14, 1, 4)); + } + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_aperiodic_set_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(srs_cc_set_idx_list_r14_present, 1)); + + if (srs_cc_set_idx_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_cc_set_idx_list_r14, bref, 1, 4)); + } + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void srs_aperiodic_set_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_cc_set_idx_list_r14_present) { + j.start_array("srs-CC-SetIndexList-r14"); + for (uint32_t i1 = 0; i1 < srs_cc_set_idx_list_r14.size(); ++i1) { + srs_cc_set_idx_list_r14[i1].to_json(j); + } + j.end_array(); + } + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodic-r14"); + srs_ul_cfg_ded_aperiodic_r14.to_json(j); + j.end_obj(); +} + +// SoundingRS-AperiodicSetUpPTsExt-r14 ::= SEQUENCE +srs_aperiodic_set_up_pts_ext_r14_s::srs_aperiodic_set_up_pts_ext_r14_s() +{ + srs_cc_set_idx_list_r14_present = false; +} +SRSASN_CODE srs_aperiodic_set_up_pts_ext_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(srs_cc_set_idx_list_r14_present, 1)); + + if (srs_cc_set_idx_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_cc_set_idx_list_r14, 1, 4)); + } + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_up_pts_ext_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_aperiodic_set_up_pts_ext_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(srs_cc_set_idx_list_r14_present, 1)); + + if (srs_cc_set_idx_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_cc_set_idx_list_r14, bref, 1, 4)); + } + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_up_pts_ext_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void srs_aperiodic_set_up_pts_ext_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_cc_set_idx_list_r14_present) { + j.start_array("srs-CC-SetIndexList-r14"); + for (uint32_t i1 = 0; i1 < srs_cc_set_idx_list_r14.size(); ++i1) { + srs_cc_set_idx_list_r14[i1].to_json(j); + } + j.end_array(); + } + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r14"); + srs_ul_cfg_ded_aperiodic_up_pts_ext_r14.to_json(j); + j.end_obj(); +} + +// TPC-PDCCH-ConfigSCell-r13 ::= CHOICE +void tpc_pdcch_cfg_scell_r13_c::set(types::options e) +{ + type_ = e; +} +void tpc_pdcch_cfg_scell_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("tpc-Index-PUCCH-SCell-r13"); + c.tpc_idx_pucch_scell_r13.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "tpc_pdcch_cfg_scell_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE tpc_pdcch_cfg_scell_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.tpc_idx_pucch_scell_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "tpc_pdcch_cfg_scell_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tpc_pdcch_cfg_scell_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.tpc_idx_pucch_scell_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "tpc_pdcch_cfg_scell_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UplinkPUSCH-LessPowerControlDedicated-v1430 ::= SEQUENCE +ul_pusch_less_pwr_ctrl_ded_v1430_s::ul_pusch_less_pwr_ctrl_ded_v1430_s() +{ + p0_ue_periodic_srs_r14_present = false; + p0_ue_aperiodic_srs_r14_present = false; +} +SRSASN_CODE ul_pusch_less_pwr_ctrl_ded_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p0_ue_periodic_srs_r14_present, 1)); + HANDLE_CODE(bref.pack(p0_ue_aperiodic_srs_r14_present, 1)); + + if (p0_ue_periodic_srs_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_periodic_srs_r14, (int8_t)-8, (int8_t)7)); + } + if (p0_ue_aperiodic_srs_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_aperiodic_srs_r14, (int8_t)-8, (int8_t)7)); + } + HANDLE_CODE(bref.pack(accumulation_enabled_r14, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pusch_less_pwr_ctrl_ded_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p0_ue_periodic_srs_r14_present, 1)); + HANDLE_CODE(bref.unpack(p0_ue_aperiodic_srs_r14_present, 1)); + + if (p0_ue_periodic_srs_r14_present) { + HANDLE_CODE(unpack_unalign_integer(p0_ue_periodic_srs_r14, bref, (int8_t)-8, (int8_t)7)); + } + if (p0_ue_aperiodic_srs_r14_present) { + HANDLE_CODE(unpack_unalign_integer(p0_ue_aperiodic_srs_r14, bref, (int8_t)-8, (int8_t)7)); + } + HANDLE_CODE(bref.unpack(accumulation_enabled_r14, 1)); + + return SRSASN_SUCCESS; +} +void ul_pusch_less_pwr_ctrl_ded_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p0_ue_periodic_srs_r14_present) { + j.write_int("p0-UE-PeriodicSRS-r14", p0_ue_periodic_srs_r14); + } + if (p0_ue_aperiodic_srs_r14_present) { + j.write_int("p0-UE-AperiodicSRS-r14", p0_ue_aperiodic_srs_r14); + } + j.write_bool("accumulationEnabled-r14", accumulation_enabled_r14); + j.end_obj(); +} + +// UplinkPowerControlDedicatedSCell-r10 ::= SEQUENCE +ul_pwr_ctrl_ded_scell_r10_s::ul_pwr_ctrl_ded_scell_r10_s() +{ + p_srs_offset_ap_r10_present = false; + filt_coef_r10_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_scell_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_srs_offset_ap_r10_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_r10_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_pusch_r10, (int8_t)-8, (int8_t)7)); + HANDLE_CODE(pack_enum(bref, delta_mcs_enabled_r10)); + HANDLE_CODE(bref.pack(accumulation_enabled_r10, 1)); + HANDLE_CODE(pack_unalign_integer(bref, p_srs_offset_r10, (uint8_t)0, (uint8_t)15)); + if (p_srs_offset_ap_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_srs_offset_ap_r10, (uint8_t)0, (uint8_t)15)); + } + if (filt_coef_r10_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_r10)); + } + HANDLE_CODE(pack_enum(bref, pathloss_ref_linking_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_scell_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_srs_offset_ap_r10_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_r10_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(p0_ue_pusch_r10, bref, (int8_t)-8, (int8_t)7)); + HANDLE_CODE(unpack_enum(delta_mcs_enabled_r10, bref)); + HANDLE_CODE(bref.unpack(accumulation_enabled_r10, 1)); + HANDLE_CODE(unpack_unalign_integer(p_srs_offset_r10, bref, (uint8_t)0, (uint8_t)15)); + if (p_srs_offset_ap_r10_present) { + HANDLE_CODE(unpack_unalign_integer(p_srs_offset_ap_r10, bref, (uint8_t)0, (uint8_t)15)); + } + if (filt_coef_r10_present) { + HANDLE_CODE(unpack_enum(filt_coef_r10, bref)); + } + HANDLE_CODE(unpack_enum(pathloss_ref_linking_r10, bref)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-UE-PUSCH-r10", p0_ue_pusch_r10); + j.write_str("deltaMCS-Enabled-r10", delta_mcs_enabled_r10.to_string()); + j.write_bool("accumulationEnabled-r10", accumulation_enabled_r10); + j.write_int("pSRS-Offset-r10", p_srs_offset_r10); + if (p_srs_offset_ap_r10_present) { + j.write_int("pSRS-OffsetAp-r10", p_srs_offset_ap_r10); + } + if (filt_coef_r10_present) { + j.write_str("filterCoefficient-r10", filt_coef_r10.to_string()); + } + j.write_str("pathlossReferenceLinking-r10", pathloss_ref_linking_r10.to_string()); + j.end_obj(); +} + +// UplinkPowerControlDedicatedSCell-v1310 ::= SEQUENCE +ul_pwr_ctrl_ded_scell_v1310_s::ul_pwr_ctrl_ded_scell_v1310_s() +{ + delta_tx_d_offset_list_pucch_r10_present = false; +} +SRSASN_CODE ul_pwr_ctrl_ded_scell_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delta_tx_d_offset_list_pucch_r10_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, p0_ue_pucch, (int8_t)-8, (int8_t)7)); + if (delta_tx_d_offset_list_pucch_r10_present) { + HANDLE_CODE(delta_tx_d_offset_list_pucch_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_ded_scell_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delta_tx_d_offset_list_pucch_r10_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(p0_ue_pucch, bref, (int8_t)-8, (int8_t)7)); + if (delta_tx_d_offset_list_pucch_r10_present) { + HANDLE_CODE(delta_tx_d_offset_list_pucch_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_ded_scell_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-UE-PUCCH", p0_ue_pucch); + if (delta_tx_d_offset_list_pucch_r10_present) { + j.write_fieldname("deltaTxD-OffsetListPUCCH-r10"); + delta_tx_d_offset_list_pucch_r10.to_json(j); + } + j.end_obj(); +} + +// AntennaInfoCommon ::= SEQUENCE +SRSASN_CODE ant_info_common_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, ant_ports_count)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_common_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(ant_ports_count, bref)); + + return SRSASN_SUCCESS; +} +void ant_info_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("antennaPortsCount", ant_ports_count.to_string()); + j.end_obj(); +} + +// HighSpeedConfigSCell-r14 ::= SEQUENCE +high_speed_cfg_scell_r14_s::high_speed_cfg_scell_r14_s() +{ + high_speed_enhanced_demod_flag_r14_present = false; +} +SRSASN_CODE high_speed_cfg_scell_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(high_speed_enhanced_demod_flag_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE high_speed_cfg_scell_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(high_speed_enhanced_demod_flag_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void high_speed_cfg_scell_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (high_speed_enhanced_demod_flag_r14_present) { + j.write_str("highSpeedEnhancedDemodulationFlag-r14", "true"); + } + j.end_obj(); +} + +// MAC-MainConfigSCell-r11 ::= SEQUENCE +mac_main_cfg_scell_r11_s::mac_main_cfg_scell_r11_s() +{ + ext = false; + stag_id_r11_present = false; +} +SRSASN_CODE mac_main_cfg_scell_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(stag_id_r11_present, 1)); + + if (stag_id_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, stag_id_r11, (uint8_t)1, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_scell_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(stag_id_r11_present, 1)); + + if (stag_id_r11_present) { + HANDLE_CODE(unpack_unalign_integer(stag_id_r11, bref, (uint8_t)1, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +void mac_main_cfg_scell_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (stag_id_r11_present) { + j.write_int("stag-Id-r11", stag_id_r11); + } + j.end_obj(); +} + +// PRACH-Config ::= SEQUENCE +prach_cfg_s::prach_cfg_s() +{ + prach_cfg_info_present = false; +} +SRSASN_CODE prach_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(prach_cfg_info_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, root_seq_idx, (uint16_t)0, (uint16_t)837)); + if (prach_cfg_info_present) { + HANDLE_CODE(prach_cfg_info.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(prach_cfg_info_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(root_seq_idx, bref, (uint16_t)0, (uint16_t)837)); + if (prach_cfg_info_present) { + HANDLE_CODE(prach_cfg_info.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void prach_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rootSequenceIndex", root_seq_idx); + if (prach_cfg_info_present) { + j.write_fieldname("prach-ConfigInfo"); + prach_cfg_info.to_json(j); + } + j.end_obj(); +} + +// PRACH-ConfigSCell-r10 ::= SEQUENCE +SRSASN_CODE prach_cfg_scell_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, prach_cfg_idx_r10, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_scell_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(prach_cfg_idx_r10, bref, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +void prach_cfg_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("prach-ConfigIndex-r10", prach_cfg_idx_r10); + j.end_obj(); +} + +// PhysicalConfigDedicatedSCell-r10 ::= SEQUENCE +phys_cfg_ded_scell_r10_s::phys_cfg_ded_scell_r10_s() +{ + ext = false; + non_ul_cfg_r10_present = false; + ul_cfg_r10_present = false; + csi_rs_cfg_nzp_to_release_list_r11_present = false; + csi_rs_cfg_nzp_to_add_mod_list_r11_present = false; + csi_rs_cfg_zp_to_release_list_r11_present = false; + csi_rs_cfg_zp_to_add_mod_list_r11_present = false; + epdcch_cfg_r11_present = false; + pdsch_cfg_ded_v1130_present = false; + cqi_report_cfg_v1130_present = false; + pusch_cfg_ded_v1130_present = false; + ul_pwr_ctrl_ded_scell_v1130_present = false; + ant_info_v1250_present = false; + eimta_main_cfg_scell_r12_present = false; + cqi_report_cfg_scell_v1250_present = false; + ul_pwr_ctrl_ded_scell_v1250_present = false; + csi_rs_cfg_v1250_present = false; + pdsch_cfg_ded_v1280_present = false; + pucch_cell_r13_present = false; + pucch_scell_present = false; + cross_carrier_sched_cfg_r13_present = false; + pdcch_cfg_scell_r13_present = false; + cqi_report_cfg_v1310_present = false; + pdsch_cfg_ded_v1310_present = false; + srs_ul_cfg_ded_v1310_present = false; + srs_ul_cfg_ded_up_pts_ext_r13_present = false; + srs_ul_cfg_ded_aperiodic_v1310_present = false; + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present = false; + csi_rs_cfg_v1310_present = false; + laa_scell_cfg_r13_present = false; + csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present = false; + csi_rs_cfg_nzp_to_release_list_ext_r13_present = false; + cqi_report_cfg_v1320_present = false; + laa_scell_cfg_v1430_present = false; + type_b_srs_tpc_pdcch_cfg_r14_present = false; + ul_pusch_less_pwr_ctrl_ded_v1430_present = false; + srs_ul_periodic_cfg_ded_list_r14_present = false; + srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present = false; + srs_ul_aperiodic_cfg_ded_list_r14_present = false; + srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present = false; + must_cfg_r14_present = false; + pusch_cfg_ded_v1430_present = false; + csi_rs_cfg_v1430_present = false; + csi_rs_cfg_zp_ap_list_r14_present = false; + cqi_report_cfg_v1430_present = false; + semi_open_loop_r14_present = false; + pdsch_cfg_ded_scell_v1430_present = false; + csi_rs_cfg_v1480_present = false; + phys_cfg_ded_stti_r15_present = false; + pdsch_cfg_ded_v1530_present = false; + cqi_report_cfg_v1530_present = false; + cqi_report_cfg_scell_r15_present = false; + cqi_short_cfg_scell_r15_present = false; + csi_rs_cfg_v1530_present = false; + ul_pwr_ctrl_ded_scell_v1530_present = false; + laa_scell_cfg_v1530_present = false; + pusch_cfg_ded_v1530_present = false; + semi_static_cfi_cfg_r15_present = false; + blind_pdsch_repeat_cfg_r15_present = false; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(non_ul_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10_present, 1)); + + if (non_ul_cfg_r10_present) { + HANDLE_CODE(bref.pack(non_ul_cfg_r10.ant_info_r10_present, 1)); + HANDLE_CODE(bref.pack(non_ul_cfg_r10.cross_carrier_sched_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(non_ul_cfg_r10.csi_rs_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(non_ul_cfg_r10.pdsch_cfg_ded_r10_present, 1)); + if (non_ul_cfg_r10.ant_info_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.ant_info_r10.pack(bref)); + } + if (non_ul_cfg_r10.cross_carrier_sched_cfg_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.cross_carrier_sched_cfg_r10.pack(bref)); + } + if (non_ul_cfg_r10.csi_rs_cfg_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.csi_rs_cfg_r10.pack(bref)); + } + if (non_ul_cfg_r10.pdsch_cfg_ded_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.pdsch_cfg_ded_r10.pack(bref)); + } + } + if (ul_cfg_r10_present) { + HANDLE_CODE(bref.pack(ul_cfg_r10.ant_info_ul_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.pusch_cfg_ded_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.cqi_report_cfg_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.srs_ul_cfg_ded_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.srs_ul_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10_present, 1)); + if (ul_cfg_r10.ant_info_ul_r10_present) { + HANDLE_CODE(ul_cfg_r10.ant_info_ul_r10.pack(bref)); + } + if (ul_cfg_r10.pusch_cfg_ded_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.pusch_cfg_ded_scell_r10.pack(bref)); + } + if (ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10.pack(bref)); + } + if (ul_cfg_r10.cqi_report_cfg_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.cqi_report_cfg_scell_r10.pack(bref)); + } + if (ul_cfg_r10.srs_ul_cfg_ded_r10_present) { + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_ded_r10.pack(bref)); + } + if (ul_cfg_r10.srs_ul_cfg_ded_v1020_present) { + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_ded_v1020.pack(bref)); + } + if (ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10_present) { + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10.pack(bref)); + } + } + + if (ext) { + ext_groups_header group_flags(8); + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_release_list_r11_present != + (csi_rs_cfg_nzp_to_release_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= csi_rs_cfg_nzp_to_release_list_r11_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_add_mod_list_r11_present != + (csi_rs_cfg_nzp_to_add_mod_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= csi_rs_cfg_nzp_to_add_mod_list_r11_present; + rrc_asn1_warn_assert(csi_rs_cfg_zp_to_release_list_r11_present != (csi_rs_cfg_zp_to_release_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= csi_rs_cfg_zp_to_release_list_r11_present; + rrc_asn1_warn_assert(csi_rs_cfg_zp_to_add_mod_list_r11_present != (csi_rs_cfg_zp_to_add_mod_list_r11.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= csi_rs_cfg_zp_to_add_mod_list_r11_present; + rrc_asn1_warn_assert(epdcch_cfg_r11_present != (epdcch_cfg_r11.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= epdcch_cfg_r11_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1130_present != (pdsch_cfg_ded_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= pdsch_cfg_ded_v1130_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1130_present != (cqi_report_cfg_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= cqi_report_cfg_v1130_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1130_present != (pusch_cfg_ded_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= pusch_cfg_ded_v1130_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_scell_v1130_present != (ul_pwr_ctrl_ded_scell_v1130.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= ul_pwr_ctrl_ded_scell_v1130_present; + rrc_asn1_warn_assert(ant_info_v1250_present != (ant_info_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= ant_info_v1250_present; + rrc_asn1_warn_assert(eimta_main_cfg_scell_r12_present != (eimta_main_cfg_scell_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= eimta_main_cfg_scell_r12_present; + rrc_asn1_warn_assert(cqi_report_cfg_scell_v1250_present != (cqi_report_cfg_scell_v1250.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= cqi_report_cfg_scell_v1250_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_scell_v1250_present != (ul_pwr_ctrl_ded_scell_v1250.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= ul_pwr_ctrl_ded_scell_v1250_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1250_present != (csi_rs_cfg_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= csi_rs_cfg_v1250_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1280_present != (pdsch_cfg_ded_v1280.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= pdsch_cfg_ded_v1280_present; + group_flags[3] |= pucch_cell_r13_present; + rrc_asn1_warn_assert(pucch_scell_present != (pucch_scell.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pucch_scell_present; + rrc_asn1_warn_assert(cross_carrier_sched_cfg_r13_present != (cross_carrier_sched_cfg_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= cross_carrier_sched_cfg_r13_present; + rrc_asn1_warn_assert(pdcch_cfg_scell_r13_present != (pdcch_cfg_scell_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pdcch_cfg_scell_r13_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1310_present != (cqi_report_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= cqi_report_cfg_v1310_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1310_present != (pdsch_cfg_ded_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pdsch_cfg_ded_v1310_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_v1310_present != (srs_ul_cfg_ded_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= srs_ul_cfg_ded_v1310_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_up_pts_ext_r13_present != (srs_ul_cfg_ded_up_pts_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= srs_ul_cfg_ded_up_pts_ext_r13_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_aperiodic_v1310_present != (srs_ul_cfg_ded_aperiodic_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= srs_ul_cfg_ded_aperiodic_v1310_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present != + (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1310_present != (csi_rs_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_v1310_present; + rrc_asn1_warn_assert(laa_scell_cfg_r13_present != (laa_scell_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= laa_scell_cfg_r13_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present != + (csi_rs_cfg_nzp_to_add_mod_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present; + rrc_asn1_warn_assert(csi_rs_cfg_nzp_to_release_list_ext_r13_present != + (csi_rs_cfg_nzp_to_release_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= csi_rs_cfg_nzp_to_release_list_ext_r13_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1320_present != (cqi_report_cfg_v1320.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= cqi_report_cfg_v1320_present; + rrc_asn1_warn_assert(laa_scell_cfg_v1430_present != (laa_scell_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= laa_scell_cfg_v1430_present; + rrc_asn1_warn_assert(type_b_srs_tpc_pdcch_cfg_r14_present != (type_b_srs_tpc_pdcch_cfg_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= type_b_srs_tpc_pdcch_cfg_r14_present; + rrc_asn1_warn_assert(ul_pusch_less_pwr_ctrl_ded_v1430_present != (ul_pusch_less_pwr_ctrl_ded_v1430.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= ul_pusch_less_pwr_ctrl_ded_v1430_present; + rrc_asn1_warn_assert(srs_ul_periodic_cfg_ded_list_r14_present != (srs_ul_periodic_cfg_ded_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= srs_ul_periodic_cfg_ded_list_r14_present; + rrc_asn1_warn_assert(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present != + (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present; + rrc_asn1_warn_assert(srs_ul_aperiodic_cfg_ded_list_r14_present != (srs_ul_aperiodic_cfg_ded_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= srs_ul_aperiodic_cfg_ded_list_r14_present; + rrc_asn1_warn_assert(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present != + (srs_ul_cfg_ded_ap_up_pts_ext_list_r14.get() != NULL), + __FILE__, __LINE__); + group_flags[5] |= srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present; + rrc_asn1_warn_assert(must_cfg_r14_present != (must_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= must_cfg_r14_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1430_present != (pusch_cfg_ded_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= pusch_cfg_ded_v1430_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1430_present != (csi_rs_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= csi_rs_cfg_v1430_present; + rrc_asn1_warn_assert(csi_rs_cfg_zp_ap_list_r14_present != (csi_rs_cfg_zp_ap_list_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= csi_rs_cfg_zp_ap_list_r14_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1430_present != (cqi_report_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= cqi_report_cfg_v1430_present; + group_flags[5] |= semi_open_loop_r14_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_scell_v1430_present != (pdsch_cfg_ded_scell_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= pdsch_cfg_ded_scell_v1430_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1480_present != (csi_rs_cfg_v1480.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= csi_rs_cfg_v1480_present; + rrc_asn1_warn_assert(phys_cfg_ded_stti_r15_present != (phys_cfg_ded_stti_r15.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= phys_cfg_ded_stti_r15_present; + rrc_asn1_warn_assert(pdsch_cfg_ded_v1530_present != (pdsch_cfg_ded_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= pdsch_cfg_ded_v1530_present; + rrc_asn1_warn_assert(cqi_report_cfg_v1530_present != (cqi_report_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= cqi_report_cfg_v1530_present; + rrc_asn1_warn_assert(cqi_report_cfg_scell_r15_present != (cqi_report_cfg_scell_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= cqi_report_cfg_scell_r15_present; + rrc_asn1_warn_assert(cqi_short_cfg_scell_r15_present != (cqi_short_cfg_scell_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= cqi_short_cfg_scell_r15_present; + rrc_asn1_warn_assert(csi_rs_cfg_v1530_present != (csi_rs_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= csi_rs_cfg_v1530_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_ded_scell_v1530_present != (ul_pwr_ctrl_ded_scell_v1530.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= ul_pwr_ctrl_ded_scell_v1530_present; + rrc_asn1_warn_assert(laa_scell_cfg_v1530_present != (laa_scell_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= laa_scell_cfg_v1530_present; + rrc_asn1_warn_assert(pusch_cfg_ded_v1530_present != (pusch_cfg_ded_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= pusch_cfg_ded_v1530_present; + rrc_asn1_warn_assert(semi_static_cfi_cfg_r15_present != (semi_static_cfi_cfg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= semi_static_cfi_cfg_r15_present; + rrc_asn1_warn_assert(blind_pdsch_repeat_cfg_r15_present != (blind_pdsch_repeat_cfg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= blind_pdsch_repeat_cfg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.pack(epdcch_cfg_r11_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_scell_v1130_present, 1)); + if (csi_rs_cfg_nzp_to_release_list_r11_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_release_list_r11, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (csi_rs_cfg_nzp_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_add_mod_list_r11, 1, 3)); + } + if (csi_rs_cfg_zp_to_release_list_r11_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *csi_rs_cfg_zp_to_release_list_r11, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (csi_rs_cfg_zp_to_add_mod_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_zp_to_add_mod_list_r11, 1, 4)); + } + if (epdcch_cfg_r11_present) { + HANDLE_CODE(epdcch_cfg_r11->pack(bref)); + } + if (pdsch_cfg_ded_v1130_present) { + HANDLE_CODE(pdsch_cfg_ded_v1130->pack(bref)); + } + if (cqi_report_cfg_v1130_present) { + HANDLE_CODE(cqi_report_cfg_v1130->pack(bref)); + } + if (pusch_cfg_ded_v1130_present) { + HANDLE_CODE(pusch_cfg_ded_v1130->pack(bref)); + } + if (ul_pwr_ctrl_ded_scell_v1130_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_scell_v1130->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ant_info_v1250_present, 1)); + HANDLE_CODE(bref.pack(eimta_main_cfg_scell_r12_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_scell_v1250_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_scell_v1250_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1250_present, 1)); + if (ant_info_v1250_present) { + HANDLE_CODE(ant_info_v1250->pack(bref)); + } + if (eimta_main_cfg_scell_r12_present) { + HANDLE_CODE(eimta_main_cfg_scell_r12->pack(bref)); + } + if (cqi_report_cfg_scell_v1250_present) { + HANDLE_CODE(cqi_report_cfg_scell_v1250->pack(bref)); + } + if (ul_pwr_ctrl_ded_scell_v1250_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_scell_v1250->pack(bref)); + } + if (csi_rs_cfg_v1250_present) { + HANDLE_CODE(csi_rs_cfg_v1250->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1280_present, 1)); + if (pdsch_cfg_ded_v1280_present) { + HANDLE_CODE(pdsch_cfg_ded_v1280->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pucch_cell_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_scell_present, 1)); + HANDLE_CODE(bref.pack(cross_carrier_sched_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(pdcch_cfg_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_aperiodic_v1310_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(laa_scell_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_nzp_to_release_list_ext_r13_present, 1)); + if (pucch_scell_present) { + HANDLE_CODE(pucch_scell->pack(bref)); + } + if (cross_carrier_sched_cfg_r13_present) { + HANDLE_CODE(cross_carrier_sched_cfg_r13->pack(bref)); + } + if (pdcch_cfg_scell_r13_present) { + HANDLE_CODE(pdcch_cfg_scell_r13->pack(bref)); + } + if (cqi_report_cfg_v1310_present) { + HANDLE_CODE(cqi_report_cfg_v1310->pack(bref)); + } + if (pdsch_cfg_ded_v1310_present) { + HANDLE_CODE(pdsch_cfg_ded_v1310->pack(bref)); + } + if (srs_ul_cfg_ded_v1310_present) { + HANDLE_CODE(srs_ul_cfg_ded_v1310->pack(bref)); + } + if (srs_ul_cfg_ded_up_pts_ext_r13_present) { + HANDLE_CODE(srs_ul_cfg_ded_up_pts_ext_r13->pack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_v1310_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_v1310->pack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present) { + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13->pack(bref)); + } + if (csi_rs_cfg_v1310_present) { + HANDLE_CODE(csi_rs_cfg_v1310->pack(bref)); + } + if (laa_scell_cfg_r13_present) { + HANDLE_CODE(laa_scell_cfg_r13->pack(bref)); + } + if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_add_mod_list_ext_r13, 1, 21)); + } + if (csi_rs_cfg_nzp_to_release_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *csi_rs_cfg_nzp_to_release_list_ext_r13, 1, 21, + UnalignedIntegerPacker(4, 24))); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cqi_report_cfg_v1320_present, 1)); + if (cqi_report_cfg_v1320_present) { + HANDLE_CODE(cqi_report_cfg_v1320->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(laa_scell_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(type_b_srs_tpc_pdcch_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_pusch_less_pwr_ctrl_ded_v1430_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_periodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_aperiodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.pack(must_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_zp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(semi_open_loop_r14_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_scell_v1430_present, 1)); + if (laa_scell_cfg_v1430_present) { + HANDLE_CODE(laa_scell_cfg_v1430->pack(bref)); + } + if (type_b_srs_tpc_pdcch_cfg_r14_present) { + HANDLE_CODE(type_b_srs_tpc_pdcch_cfg_r14->pack(bref)); + } + if (ul_pusch_less_pwr_ctrl_ded_v1430_present) { + HANDLE_CODE(ul_pusch_less_pwr_ctrl_ded_v1430->pack(bref)); + } + if (srs_ul_periodic_cfg_ded_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_periodic_cfg_ded_list_r14, 1, 2)); + } + if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_periodic_cfg_ded_up_pts_ext_list_r14, 1, 4)); + } + if (srs_ul_aperiodic_cfg_ded_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_aperiodic_cfg_ded_list_r14, 1, 2)); + } + if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_ul_cfg_ded_ap_up_pts_ext_list_r14, 1, 4)); + } + if (must_cfg_r14_present) { + HANDLE_CODE(must_cfg_r14->pack(bref)); + } + if (pusch_cfg_ded_v1430_present) { + HANDLE_CODE(pusch_cfg_ded_v1430->pack(bref)); + } + if (csi_rs_cfg_v1430_present) { + HANDLE_CODE(csi_rs_cfg_v1430->pack(bref)); + } + if (csi_rs_cfg_zp_ap_list_r14_present) { + HANDLE_CODE(csi_rs_cfg_zp_ap_list_r14->pack(bref)); + } + if (cqi_report_cfg_v1430_present) { + HANDLE_CODE(cqi_report_cfg_v1430->pack(bref)); + } + if (semi_open_loop_r14_present) { + HANDLE_CODE(bref.pack(semi_open_loop_r14, 1)); + } + if (pdsch_cfg_ded_scell_v1430_present) { + HANDLE_CODE(pdsch_cfg_ded_scell_v1430->pack(bref)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csi_rs_cfg_v1480_present, 1)); + if (csi_rs_cfg_v1480_present) { + HANDLE_CODE(csi_rs_cfg_v1480->pack(bref)); + } + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(phys_cfg_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(cqi_report_cfg_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(cqi_short_cfg_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_ded_scell_v1530_present, 1)); + HANDLE_CODE(bref.pack(laa_scell_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.pack(semi_static_cfi_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(blind_pdsch_repeat_cfg_r15_present, 1)); + if (phys_cfg_ded_stti_r15_present) { + HANDLE_CODE(phys_cfg_ded_stti_r15->pack(bref)); + } + if (pdsch_cfg_ded_v1530_present) { + HANDLE_CODE(pdsch_cfg_ded_v1530->pack(bref)); + } + if (cqi_report_cfg_v1530_present) { + HANDLE_CODE(cqi_report_cfg_v1530->pack(bref)); + } + if (cqi_report_cfg_scell_r15_present) { + HANDLE_CODE(cqi_report_cfg_scell_r15->pack(bref)); + } + if (cqi_short_cfg_scell_r15_present) { + HANDLE_CODE(cqi_short_cfg_scell_r15->pack(bref)); + } + if (csi_rs_cfg_v1530_present) { + HANDLE_CODE(csi_rs_cfg_v1530->pack(bref)); + } + if (ul_pwr_ctrl_ded_scell_v1530_present) { + HANDLE_CODE(ul_pwr_ctrl_ded_scell_v1530->pack(bref)); + } + if (laa_scell_cfg_v1530_present) { + HANDLE_CODE(laa_scell_cfg_v1530->pack(bref)); + } + if (pusch_cfg_ded_v1530_present) { + HANDLE_CODE(pusch_cfg_ded_v1530->pack(bref)); + } + if (semi_static_cfi_cfg_r15_present) { + HANDLE_CODE(semi_static_cfi_cfg_r15->pack(bref)); + } + if (blind_pdsch_repeat_cfg_r15_present) { + HANDLE_CODE(blind_pdsch_repeat_cfg_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(non_ul_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10_present, 1)); + + if (non_ul_cfg_r10_present) { + HANDLE_CODE(bref.unpack(non_ul_cfg_r10.ant_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_ul_cfg_r10.cross_carrier_sched_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_ul_cfg_r10.csi_rs_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_ul_cfg_r10.pdsch_cfg_ded_r10_present, 1)); + if (non_ul_cfg_r10.ant_info_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.ant_info_r10.unpack(bref)); + } + if (non_ul_cfg_r10.cross_carrier_sched_cfg_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.cross_carrier_sched_cfg_r10.unpack(bref)); + } + if (non_ul_cfg_r10.csi_rs_cfg_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.csi_rs_cfg_r10.unpack(bref)); + } + if (non_ul_cfg_r10.pdsch_cfg_ded_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.pdsch_cfg_ded_r10.unpack(bref)); + } + } + if (ul_cfg_r10_present) { + HANDLE_CODE(bref.unpack(ul_cfg_r10.ant_info_ul_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.pusch_cfg_ded_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.cqi_report_cfg_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.srs_ul_cfg_ded_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.srs_ul_cfg_ded_v1020_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10_present, 1)); + if (ul_cfg_r10.ant_info_ul_r10_present) { + HANDLE_CODE(ul_cfg_r10.ant_info_ul_r10.unpack(bref)); + } + if (ul_cfg_r10.pusch_cfg_ded_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.pusch_cfg_ded_scell_r10.unpack(bref)); + } + if (ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10.unpack(bref)); + } + if (ul_cfg_r10.cqi_report_cfg_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.cqi_report_cfg_scell_r10.unpack(bref)); + } + if (ul_cfg_r10.srs_ul_cfg_ded_r10_present) { + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_ded_r10.unpack(bref)); + } + if (ul_cfg_r10.srs_ul_cfg_ded_v1020_present) { + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_ded_v1020.unpack(bref)); + } + if (ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10_present) { + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10.unpack(bref)); + } + } + + if (ext) { + ext_groups_header group_flags(8); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_to_release_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_to_add_mod_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(epdcch_cfg_r11_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1130_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_scell_v1130_present, 1)); + if (csi_rs_cfg_nzp_to_release_list_r11_present) { + csi_rs_cfg_nzp_to_release_list_r11 = make_copy_ptr(csi_rs_cfg_nzp_to_release_list_r11_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_release_list_r11, bref, 1, 3, UnalignedIntegerPacker(1, 3))); + } + if (csi_rs_cfg_nzp_to_add_mod_list_r11_present) { + csi_rs_cfg_nzp_to_add_mod_list_r11 = make_copy_ptr(csi_rs_cfg_nzp_to_add_mod_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_add_mod_list_r11, bref, 1, 3)); + } + if (csi_rs_cfg_zp_to_release_list_r11_present) { + csi_rs_cfg_zp_to_release_list_r11 = make_copy_ptr(csi_rs_cfg_zp_to_release_list_r11_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*csi_rs_cfg_zp_to_release_list_r11, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (csi_rs_cfg_zp_to_add_mod_list_r11_present) { + csi_rs_cfg_zp_to_add_mod_list_r11 = make_copy_ptr(csi_rs_cfg_zp_to_add_mod_list_r11_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_zp_to_add_mod_list_r11, bref, 1, 4)); + } + if (epdcch_cfg_r11_present) { + epdcch_cfg_r11 = make_copy_ptr(epdcch_cfg_r11_s()); + HANDLE_CODE(epdcch_cfg_r11->unpack(bref)); + } + if (pdsch_cfg_ded_v1130_present) { + pdsch_cfg_ded_v1130 = make_copy_ptr(pdsch_cfg_ded_v1130_s()); + HANDLE_CODE(pdsch_cfg_ded_v1130->unpack(bref)); + } + if (cqi_report_cfg_v1130_present) { + cqi_report_cfg_v1130 = make_copy_ptr(cqi_report_cfg_v1130_s()); + HANDLE_CODE(cqi_report_cfg_v1130->unpack(bref)); + } + if (pusch_cfg_ded_v1130_present) { + pusch_cfg_ded_v1130 = make_copy_ptr(pusch_cfg_ded_v1130_s()); + HANDLE_CODE(pusch_cfg_ded_v1130->unpack(bref)); + } + if (ul_pwr_ctrl_ded_scell_v1130_present) { + ul_pwr_ctrl_ded_scell_v1130 = make_copy_ptr(ul_pwr_ctrl_ded_v1130_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_scell_v1130->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ant_info_v1250_present, 1)); + HANDLE_CODE(bref.unpack(eimta_main_cfg_scell_r12_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_scell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_scell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1250_present, 1)); + if (ant_info_v1250_present) { + ant_info_v1250 = make_copy_ptr(ant_info_ded_v1250_s()); + HANDLE_CODE(ant_info_v1250->unpack(bref)); + } + if (eimta_main_cfg_scell_r12_present) { + eimta_main_cfg_scell_r12 = make_copy_ptr(eimta_main_cfg_serv_cell_r12_c()); + HANDLE_CODE(eimta_main_cfg_scell_r12->unpack(bref)); + } + if (cqi_report_cfg_scell_v1250_present) { + cqi_report_cfg_scell_v1250 = make_copy_ptr(cqi_report_cfg_v1250_s()); + HANDLE_CODE(cqi_report_cfg_scell_v1250->unpack(bref)); + } + if (ul_pwr_ctrl_ded_scell_v1250_present) { + ul_pwr_ctrl_ded_scell_v1250 = make_copy_ptr(ul_pwr_ctrl_ded_v1250_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_scell_v1250->unpack(bref)); + } + if (csi_rs_cfg_v1250_present) { + csi_rs_cfg_v1250 = make_copy_ptr(csi_rs_cfg_v1250_s()); + HANDLE_CODE(csi_rs_cfg_v1250->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1280_present, 1)); + if (pdsch_cfg_ded_v1280_present) { + pdsch_cfg_ded_v1280 = make_copy_ptr(pdsch_cfg_ded_v1280_s()); + HANDLE_CODE(pdsch_cfg_ded_v1280->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pucch_cell_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_scell_present, 1)); + HANDLE_CODE(bref.unpack(cross_carrier_sched_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_cfg_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_v1310_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_aperiodic_v1310_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(laa_scell_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_nzp_to_release_list_ext_r13_present, 1)); + if (pucch_scell_present) { + pucch_scell = make_copy_ptr(pucch_scell_c_()); + HANDLE_CODE(pucch_scell->unpack(bref)); + } + if (cross_carrier_sched_cfg_r13_present) { + cross_carrier_sched_cfg_r13 = make_copy_ptr(cross_carrier_sched_cfg_r13_s()); + HANDLE_CODE(cross_carrier_sched_cfg_r13->unpack(bref)); + } + if (pdcch_cfg_scell_r13_present) { + pdcch_cfg_scell_r13 = make_copy_ptr(pdcch_cfg_scell_r13_s()); + HANDLE_CODE(pdcch_cfg_scell_r13->unpack(bref)); + } + if (cqi_report_cfg_v1310_present) { + cqi_report_cfg_v1310 = make_copy_ptr(cqi_report_cfg_v1310_s()); + HANDLE_CODE(cqi_report_cfg_v1310->unpack(bref)); + } + if (pdsch_cfg_ded_v1310_present) { + pdsch_cfg_ded_v1310 = make_copy_ptr(pdsch_cfg_ded_v1310_s()); + HANDLE_CODE(pdsch_cfg_ded_v1310->unpack(bref)); + } + if (srs_ul_cfg_ded_v1310_present) { + srs_ul_cfg_ded_v1310 = make_copy_ptr(srs_ul_cfg_ded_v1310_c()); + HANDLE_CODE(srs_ul_cfg_ded_v1310->unpack(bref)); + } + if (srs_ul_cfg_ded_up_pts_ext_r13_present) { + srs_ul_cfg_ded_up_pts_ext_r13 = make_copy_ptr(srs_ul_cfg_ded_up_pts_ext_r13_c()); + HANDLE_CODE(srs_ul_cfg_ded_up_pts_ext_r13->unpack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_v1310_present) { + srs_ul_cfg_ded_aperiodic_v1310 = make_copy_ptr(srs_ul_cfg_ded_aperiodic_v1310_c()); + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_v1310->unpack(bref)); + } + if (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present) { + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13 = make_copy_ptr(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c()); + HANDLE_CODE(srs_ul_cfg_ded_aperiodic_up_pts_ext_r13->unpack(bref)); + } + if (csi_rs_cfg_v1310_present) { + csi_rs_cfg_v1310 = make_copy_ptr(csi_rs_cfg_v1310_s()); + HANDLE_CODE(csi_rs_cfg_v1310->unpack(bref)); + } + if (laa_scell_cfg_r13_present) { + laa_scell_cfg_r13 = make_copy_ptr(laa_scell_cfg_r13_s()); + HANDLE_CODE(laa_scell_cfg_r13->unpack(bref)); + } + if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present) { + csi_rs_cfg_nzp_to_add_mod_list_ext_r13 = make_copy_ptr(csi_rs_cfg_nzp_to_add_mod_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_add_mod_list_ext_r13, bref, 1, 21)); + } + if (csi_rs_cfg_nzp_to_release_list_ext_r13_present) { + csi_rs_cfg_nzp_to_release_list_ext_r13 = make_copy_ptr(csi_rs_cfg_nzp_to_release_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*csi_rs_cfg_nzp_to_release_list_ext_r13, bref, 1, 21, + UnalignedIntegerPacker(4, 24))); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1320_present, 1)); + if (cqi_report_cfg_v1320_present) { + cqi_report_cfg_v1320 = make_copy_ptr(cqi_report_cfg_v1320_s()); + HANDLE_CODE(cqi_report_cfg_v1320->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(laa_scell_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(type_b_srs_tpc_pdcch_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_pusch_less_pwr_ctrl_ded_v1430_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_periodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_aperiodic_cfg_ded_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(must_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1430_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_zp_ap_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(semi_open_loop_r14_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_scell_v1430_present, 1)); + if (laa_scell_cfg_v1430_present) { + laa_scell_cfg_v1430 = make_copy_ptr(laa_scell_cfg_v1430_s()); + HANDLE_CODE(laa_scell_cfg_v1430->unpack(bref)); + } + if (type_b_srs_tpc_pdcch_cfg_r14_present) { + type_b_srs_tpc_pdcch_cfg_r14 = make_copy_ptr(srs_tpc_pdcch_cfg_r14_c()); + HANDLE_CODE(type_b_srs_tpc_pdcch_cfg_r14->unpack(bref)); + } + if (ul_pusch_less_pwr_ctrl_ded_v1430_present) { + ul_pusch_less_pwr_ctrl_ded_v1430 = make_copy_ptr(ul_pusch_less_pwr_ctrl_ded_v1430_s()); + HANDLE_CODE(ul_pusch_less_pwr_ctrl_ded_v1430->unpack(bref)); + } + if (srs_ul_periodic_cfg_ded_list_r14_present) { + srs_ul_periodic_cfg_ded_list_r14 = make_copy_ptr(srs_ul_periodic_cfg_ded_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_periodic_cfg_ded_list_r14, bref, 1, 2)); + } + if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present) { + srs_ul_periodic_cfg_ded_up_pts_ext_list_r14 = make_copy_ptr(srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_periodic_cfg_ded_up_pts_ext_list_r14, bref, 1, 4)); + } + if (srs_ul_aperiodic_cfg_ded_list_r14_present) { + srs_ul_aperiodic_cfg_ded_list_r14 = make_copy_ptr(srs_ul_aperiodic_cfg_ded_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_aperiodic_cfg_ded_list_r14, bref, 1, 2)); + } + if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present) { + srs_ul_cfg_ded_ap_up_pts_ext_list_r14 = make_copy_ptr(srs_ul_cfg_ded_ap_up_pts_ext_list_r14_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*srs_ul_cfg_ded_ap_up_pts_ext_list_r14, bref, 1, 4)); + } + if (must_cfg_r14_present) { + must_cfg_r14 = make_copy_ptr(must_cfg_r14_c_()); + HANDLE_CODE(must_cfg_r14->unpack(bref)); + } + if (pusch_cfg_ded_v1430_present) { + pusch_cfg_ded_v1430 = make_copy_ptr(pusch_cfg_ded_scell_v1430_s()); + HANDLE_CODE(pusch_cfg_ded_v1430->unpack(bref)); + } + if (csi_rs_cfg_v1430_present) { + csi_rs_cfg_v1430 = make_copy_ptr(csi_rs_cfg_v1430_s()); + HANDLE_CODE(csi_rs_cfg_v1430->unpack(bref)); + } + if (csi_rs_cfg_zp_ap_list_r14_present) { + csi_rs_cfg_zp_ap_list_r14 = make_copy_ptr(csi_rs_cfg_zp_ap_list_r14_c()); + HANDLE_CODE(csi_rs_cfg_zp_ap_list_r14->unpack(bref)); + } + if (cqi_report_cfg_v1430_present) { + cqi_report_cfg_v1430 = make_copy_ptr(cqi_report_cfg_v1430_s()); + HANDLE_CODE(cqi_report_cfg_v1430->unpack(bref)); + } + if (semi_open_loop_r14_present) { + HANDLE_CODE(bref.unpack(semi_open_loop_r14, 1)); + } + if (pdsch_cfg_ded_scell_v1430_present) { + pdsch_cfg_ded_scell_v1430 = make_copy_ptr(pdsch_cfg_ded_scell_v1430_s()); + HANDLE_CODE(pdsch_cfg_ded_scell_v1430->unpack(bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1480_present, 1)); + if (csi_rs_cfg_v1480_present) { + csi_rs_cfg_v1480 = make_copy_ptr(csi_rs_cfg_v1480_s()); + HANDLE_CODE(csi_rs_cfg_v1480->unpack(bref)); + } + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(phys_cfg_ded_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(cqi_report_cfg_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(cqi_short_cfg_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_ded_scell_v1530_present, 1)); + HANDLE_CODE(bref.unpack(laa_scell_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_ded_v1530_present, 1)); + HANDLE_CODE(bref.unpack(semi_static_cfi_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(blind_pdsch_repeat_cfg_r15_present, 1)); + if (phys_cfg_ded_stti_r15_present) { + phys_cfg_ded_stti_r15 = make_copy_ptr(phys_cfg_ded_stti_r15_c()); + HANDLE_CODE(phys_cfg_ded_stti_r15->unpack(bref)); + } + if (pdsch_cfg_ded_v1530_present) { + pdsch_cfg_ded_v1530 = make_copy_ptr(pdsch_cfg_ded_v1530_s()); + HANDLE_CODE(pdsch_cfg_ded_v1530->unpack(bref)); + } + if (cqi_report_cfg_v1530_present) { + cqi_report_cfg_v1530 = make_copy_ptr(cqi_report_cfg_v1530_s()); + HANDLE_CODE(cqi_report_cfg_v1530->unpack(bref)); + } + if (cqi_report_cfg_scell_r15_present) { + cqi_report_cfg_scell_r15 = make_copy_ptr(cqi_report_cfg_scell_r15_s()); + HANDLE_CODE(cqi_report_cfg_scell_r15->unpack(bref)); + } + if (cqi_short_cfg_scell_r15_present) { + cqi_short_cfg_scell_r15 = make_copy_ptr(cqi_short_cfg_scell_r15_c()); + HANDLE_CODE(cqi_short_cfg_scell_r15->unpack(bref)); + } + if (csi_rs_cfg_v1530_present) { + csi_rs_cfg_v1530 = make_copy_ptr(csi_rs_cfg_v1530_s()); + HANDLE_CODE(csi_rs_cfg_v1530->unpack(bref)); + } + if (ul_pwr_ctrl_ded_scell_v1530_present) { + ul_pwr_ctrl_ded_scell_v1530 = make_copy_ptr(ul_pwr_ctrl_ded_v1530_s()); + HANDLE_CODE(ul_pwr_ctrl_ded_scell_v1530->unpack(bref)); + } + if (laa_scell_cfg_v1530_present) { + laa_scell_cfg_v1530 = make_copy_ptr(laa_scell_cfg_v1530_s()); + HANDLE_CODE(laa_scell_cfg_v1530->unpack(bref)); + } + if (pusch_cfg_ded_v1530_present) { + pusch_cfg_ded_v1530 = make_copy_ptr(pusch_cfg_ded_scell_v1530_s()); + HANDLE_CODE(pusch_cfg_ded_v1530->unpack(bref)); + } + if (semi_static_cfi_cfg_r15_present) { + semi_static_cfi_cfg_r15 = make_copy_ptr(semi_static_cfi_cfg_r15_c_()); + HANDLE_CODE(semi_static_cfi_cfg_r15->unpack(bref)); + } + if (blind_pdsch_repeat_cfg_r15_present) { + blind_pdsch_repeat_cfg_r15 = make_copy_ptr(blind_pdsch_repeat_cfg_r15_c_()); + HANDLE_CODE(blind_pdsch_repeat_cfg_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_ul_cfg_r10_present) { + j.write_fieldname("nonUL-Configuration-r10"); + j.start_obj(); + if (non_ul_cfg_r10.ant_info_r10_present) { + j.write_fieldname("antennaInfo-r10"); + non_ul_cfg_r10.ant_info_r10.to_json(j); + } + if (non_ul_cfg_r10.cross_carrier_sched_cfg_r10_present) { + j.write_fieldname("crossCarrierSchedulingConfig-r10"); + non_ul_cfg_r10.cross_carrier_sched_cfg_r10.to_json(j); + } + if (non_ul_cfg_r10.csi_rs_cfg_r10_present) { + j.write_fieldname("csi-RS-Config-r10"); + non_ul_cfg_r10.csi_rs_cfg_r10.to_json(j); + } + if (non_ul_cfg_r10.pdsch_cfg_ded_r10_present) { + j.write_fieldname("pdsch-ConfigDedicated-r10"); + non_ul_cfg_r10.pdsch_cfg_ded_r10.to_json(j); + } + j.end_obj(); + } + if (ul_cfg_r10_present) { + j.write_fieldname("ul-Configuration-r10"); + j.start_obj(); + if (ul_cfg_r10.ant_info_ul_r10_present) { + j.write_fieldname("antennaInfoUL-r10"); + ul_cfg_r10.ant_info_ul_r10.to_json(j); + } + if (ul_cfg_r10.pusch_cfg_ded_scell_r10_present) { + j.write_fieldname("pusch-ConfigDedicatedSCell-r10"); + ul_cfg_r10.pusch_cfg_ded_scell_r10.to_json(j); + } + if (ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10_present) { + j.write_fieldname("uplinkPowerControlDedicatedSCell-r10"); + ul_cfg_r10.ul_pwr_ctrl_ded_scell_r10.to_json(j); + } + if (ul_cfg_r10.cqi_report_cfg_scell_r10_present) { + j.write_fieldname("cqi-ReportConfigSCell-r10"); + ul_cfg_r10.cqi_report_cfg_scell_r10.to_json(j); + } + if (ul_cfg_r10.srs_ul_cfg_ded_r10_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicated-r10"); + ul_cfg_r10.srs_ul_cfg_ded_r10.to_json(j); + } + if (ul_cfg_r10.srs_ul_cfg_ded_v1020_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicated-v1020"); + ul_cfg_r10.srs_ul_cfg_ded_v1020.to_json(j); + } + if (ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodic-r10"); + ul_cfg_r10.srs_ul_cfg_ded_aperiodic_r10.to_json(j); + } + j.end_obj(); + } + if (csi_rs_cfg_nzp_to_release_list_r11_present) { + j.start_array("csi-RS-ConfigNZPToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_r11->size(); ++i1) { + j.write_int(((*csi_rs_cfg_nzp_to_release_list_r11)[i1])); + } + j.end_array(); + } + if (csi_rs_cfg_nzp_to_add_mod_list_r11_present) { + j.start_array("csi-RS-ConfigNZPToAddModList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_r11->size(); ++i1) { + ((*csi_rs_cfg_nzp_to_add_mod_list_r11)[i1]).to_json(j); + } + j.end_array(); + } + if (csi_rs_cfg_zp_to_release_list_r11_present) { + j.start_array("csi-RS-ConfigZPToReleaseList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_release_list_r11->size(); ++i1) { + j.write_int(((*csi_rs_cfg_zp_to_release_list_r11)[i1])); + } + j.end_array(); + } + if (csi_rs_cfg_zp_to_add_mod_list_r11_present) { + j.start_array("csi-RS-ConfigZPToAddModList-r11"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_add_mod_list_r11->size(); ++i1) { + ((*csi_rs_cfg_zp_to_add_mod_list_r11)[i1]).to_json(j); + } + j.end_array(); + } + if (epdcch_cfg_r11_present) { + j.write_fieldname("epdcch-Config-r11"); + epdcch_cfg_r11->to_json(j); + } + if (pdsch_cfg_ded_v1130_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1130"); + pdsch_cfg_ded_v1130->to_json(j); + } + if (cqi_report_cfg_v1130_present) { + j.write_fieldname("cqi-ReportConfig-v1130"); + cqi_report_cfg_v1130->to_json(j); + } + if (pusch_cfg_ded_v1130_present) { + j.write_fieldname("pusch-ConfigDedicated-v1130"); + pusch_cfg_ded_v1130->to_json(j); + } + if (ul_pwr_ctrl_ded_scell_v1130_present) { + j.write_fieldname("uplinkPowerControlDedicatedSCell-v1130"); + ul_pwr_ctrl_ded_scell_v1130->to_json(j); + } + if (ant_info_v1250_present) { + j.write_fieldname("antennaInfo-v1250"); + ant_info_v1250->to_json(j); + } + if (eimta_main_cfg_scell_r12_present) { + j.write_fieldname("eimta-MainConfigSCell-r12"); + eimta_main_cfg_scell_r12->to_json(j); + } + if (cqi_report_cfg_scell_v1250_present) { + j.write_fieldname("cqi-ReportConfigSCell-v1250"); + cqi_report_cfg_scell_v1250->to_json(j); + } + if (ul_pwr_ctrl_ded_scell_v1250_present) { + j.write_fieldname("uplinkPowerControlDedicatedSCell-v1250"); + ul_pwr_ctrl_ded_scell_v1250->to_json(j); + } + if (csi_rs_cfg_v1250_present) { + j.write_fieldname("csi-RS-Config-v1250"); + csi_rs_cfg_v1250->to_json(j); + } + if (pdsch_cfg_ded_v1280_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1280"); + pdsch_cfg_ded_v1280->to_json(j); + } + if (pucch_cell_r13_present) { + j.write_str("pucch-Cell-r13", "true"); + } + if (pucch_scell_present) { + j.write_fieldname("pucch-SCell"); + pucch_scell->to_json(j); + } + if (cross_carrier_sched_cfg_r13_present) { + j.write_fieldname("crossCarrierSchedulingConfig-r13"); + cross_carrier_sched_cfg_r13->to_json(j); + } + if (pdcch_cfg_scell_r13_present) { + j.write_fieldname("pdcch-ConfigSCell-r13"); + pdcch_cfg_scell_r13->to_json(j); + } + if (cqi_report_cfg_v1310_present) { + j.write_fieldname("cqi-ReportConfig-v1310"); + cqi_report_cfg_v1310->to_json(j); + } + if (pdsch_cfg_ded_v1310_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1310"); + pdsch_cfg_ded_v1310->to_json(j); + } + if (srs_ul_cfg_ded_v1310_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicated-v1310"); + srs_ul_cfg_ded_v1310->to_json(j); + } + if (srs_ul_cfg_ded_up_pts_ext_r13_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedUpPTsExt-r13"); + srs_ul_cfg_ded_up_pts_ext_r13->to_json(j); + } + if (srs_ul_cfg_ded_aperiodic_v1310_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodic-v1310"); + srs_ul_cfg_ded_aperiodic_v1310->to_json(j); + } + if (srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_present) { + j.write_fieldname("soundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13"); + srs_ul_cfg_ded_aperiodic_up_pts_ext_r13->to_json(j); + } + if (csi_rs_cfg_v1310_present) { + j.write_fieldname("csi-RS-Config-v1310"); + csi_rs_cfg_v1310->to_json(j); + } + if (laa_scell_cfg_r13_present) { + j.write_fieldname("laa-SCellConfiguration-r13"); + laa_scell_cfg_r13->to_json(j); + } + if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13_present) { + j.start_array("csi-RS-ConfigNZPToAddModListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_ext_r13->size(); ++i1) { + ((*csi_rs_cfg_nzp_to_add_mod_list_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (csi_rs_cfg_nzp_to_release_list_ext_r13_present) { + j.start_array("csi-RS-ConfigNZPToReleaseListExt-r13"); + for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_ext_r13->size(); ++i1) { + j.write_int(((*csi_rs_cfg_nzp_to_release_list_ext_r13)[i1])); + } + j.end_array(); + } + if (cqi_report_cfg_v1320_present) { + j.write_fieldname("cqi-ReportConfig-v1320"); + cqi_report_cfg_v1320->to_json(j); + } + if (laa_scell_cfg_v1430_present) { + j.write_fieldname("laa-SCellConfiguration-v1430"); + laa_scell_cfg_v1430->to_json(j); + } + if (type_b_srs_tpc_pdcch_cfg_r14_present) { + j.write_fieldname("typeB-SRS-TPC-PDCCH-Config-r14"); + type_b_srs_tpc_pdcch_cfg_r14->to_json(j); + } + if (ul_pusch_less_pwr_ctrl_ded_v1430_present) { + j.write_fieldname("uplinkPUSCH-LessPowerControlDedicated-v1430"); + ul_pusch_less_pwr_ctrl_ded_v1430->to_json(j); + } + if (srs_ul_periodic_cfg_ded_list_r14_present) { + j.start_array("soundingRS-UL-PeriodicConfigDedicatedList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_list_r14->size(); ++i1) { + ((*srs_ul_periodic_cfg_ded_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14_present) { + j.start_array("soundingRS-UL-PeriodicConfigDedicatedUpPTsExtList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_up_pts_ext_list_r14->size(); ++i1) { + ((*srs_ul_periodic_cfg_ded_up_pts_ext_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (srs_ul_aperiodic_cfg_ded_list_r14_present) { + j.start_array("soundingRS-UL-AperiodicConfigDedicatedList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_aperiodic_cfg_ded_list_r14->size(); ++i1) { + ((*srs_ul_aperiodic_cfg_ded_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14_present) { + j.start_array("soundingRS-UL-ConfigDedicatedApUpPTsExtList-r14"); + for (uint32_t i1 = 0; i1 < srs_ul_cfg_ded_ap_up_pts_ext_list_r14->size(); ++i1) { + ((*srs_ul_cfg_ded_ap_up_pts_ext_list_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (must_cfg_r14_present) { + j.write_fieldname("must-Config-r14"); + must_cfg_r14->to_json(j); + } + if (pusch_cfg_ded_v1430_present) { + j.write_fieldname("pusch-ConfigDedicated-v1430"); + pusch_cfg_ded_v1430->to_json(j); + } + if (csi_rs_cfg_v1430_present) { + j.write_fieldname("csi-RS-Config-v1430"); + csi_rs_cfg_v1430->to_json(j); + } + if (csi_rs_cfg_zp_ap_list_r14_present) { + j.write_fieldname("csi-RS-ConfigZP-ApList-r14"); + csi_rs_cfg_zp_ap_list_r14->to_json(j); + } + if (cqi_report_cfg_v1430_present) { + j.write_fieldname("cqi-ReportConfig-v1430"); + cqi_report_cfg_v1430->to_json(j); + } + if (semi_open_loop_r14_present) { + j.write_bool("semiOpenLoop-r14", semi_open_loop_r14); + } + if (pdsch_cfg_ded_scell_v1430_present) { + j.write_fieldname("pdsch-ConfigDedicatedSCell-v1430"); + pdsch_cfg_ded_scell_v1430->to_json(j); + } + if (csi_rs_cfg_v1480_present) { + j.write_fieldname("csi-RS-Config-v1480"); + csi_rs_cfg_v1480->to_json(j); + } + if (phys_cfg_ded_stti_r15_present) { + j.write_fieldname("physicalConfigDedicatedSTTI-r15"); + phys_cfg_ded_stti_r15->to_json(j); + } + if (pdsch_cfg_ded_v1530_present) { + j.write_fieldname("pdsch-ConfigDedicated-v1530"); + pdsch_cfg_ded_v1530->to_json(j); + } + if (cqi_report_cfg_v1530_present) { + j.write_fieldname("cqi-ReportConfig-v1530"); + cqi_report_cfg_v1530->to_json(j); + } + if (cqi_report_cfg_scell_r15_present) { + j.write_fieldname("cqi-ReportConfigSCell-r15"); + cqi_report_cfg_scell_r15->to_json(j); + } + if (cqi_short_cfg_scell_r15_present) { + j.write_fieldname("cqi-ShortConfigSCell-r15"); + cqi_short_cfg_scell_r15->to_json(j); + } + if (csi_rs_cfg_v1530_present) { + j.write_fieldname("csi-RS-Config-v1530"); + csi_rs_cfg_v1530->to_json(j); + } + if (ul_pwr_ctrl_ded_scell_v1530_present) { + j.write_fieldname("uplinkPowerControlDedicatedSCell-v1530"); + ul_pwr_ctrl_ded_scell_v1530->to_json(j); + } + if (laa_scell_cfg_v1530_present) { + j.write_fieldname("laa-SCellConfiguration-v1530"); + laa_scell_cfg_v1530->to_json(j); + } + if (pusch_cfg_ded_v1530_present) { + j.write_fieldname("pusch-ConfigDedicated-v1530"); + pusch_cfg_ded_v1530->to_json(j); + } + if (semi_static_cfi_cfg_r15_present) { + j.write_fieldname("semiStaticCFI-Config-r15"); + semi_static_cfi_cfg_r15->to_json(j); + } + if (blind_pdsch_repeat_cfg_r15_present) { + j.write_fieldname("blindPDSCH-Repetition-Config-r15"); + blind_pdsch_repeat_cfg_r15->to_json(j); + } + j.end_obj(); +} + +phys_cfg_ded_scell_r10_s::non_ul_cfg_r10_s_::non_ul_cfg_r10_s_() +{ + ant_info_r10_present = false; + cross_carrier_sched_cfg_r10_present = false; + csi_rs_cfg_r10_present = false; + pdsch_cfg_ded_r10_present = false; +} + +phys_cfg_ded_scell_r10_s::ul_cfg_r10_s_::ul_cfg_r10_s_() +{ + ant_info_ul_r10_present = false; + pusch_cfg_ded_scell_r10_present = false; + ul_pwr_ctrl_ded_scell_r10_present = false; + cqi_report_cfg_scell_r10_present = false; + srs_ul_cfg_ded_r10_present = false; + srs_ul_cfg_ded_v1020_present = false; + srs_ul_cfg_ded_aperiodic_r10_present = false; +} + +void phys_cfg_ded_scell_r10_s::pucch_scell_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_scell_r10_s::pucch_scell_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(); + if (c.pucch_cfg_ded_r13_present) { + j.write_fieldname("pucch-ConfigDedicated-r13"); + c.pucch_cfg_ded_r13.to_json(j); + } + if (c.sched_request_cfg_r13_present) { + j.write_fieldname("schedulingRequestConfig-r13"); + c.sched_request_cfg_r13.to_json(j); + } + if (c.tpc_pdcch_cfg_pucch_scell_r13_present) { + j.write_fieldname("tpc-PDCCH-ConfigPUCCH-SCell-r13"); + c.tpc_pdcch_cfg_pucch_scell_r13.to_json(j); + } + if (c.pusch_cfg_ded_r13_present) { + j.write_fieldname("pusch-ConfigDedicated-r13"); + c.pusch_cfg_ded_r13.to_json(j); + } + if (c.ul_pwr_ctrl_ded_r13_present) { + j.write_fieldname("uplinkPowerControlDedicated-r13"); + c.ul_pwr_ctrl_ded_r13.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::pucch_scell_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::pucch_scell_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.pucch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(c.sched_request_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(c.tpc_pdcch_cfg_pucch_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(c.pusch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(c.ul_pwr_ctrl_ded_r13_present, 1)); + if (c.pucch_cfg_ded_r13_present) { + HANDLE_CODE(c.pucch_cfg_ded_r13.pack(bref)); + } + if (c.sched_request_cfg_r13_present) { + HANDLE_CODE(c.sched_request_cfg_r13.pack(bref)); + } + if (c.tpc_pdcch_cfg_pucch_scell_r13_present) { + HANDLE_CODE(c.tpc_pdcch_cfg_pucch_scell_r13.pack(bref)); + } + if (c.pusch_cfg_ded_r13_present) { + HANDLE_CODE(c.pusch_cfg_ded_r13.pack(bref)); + } + if (c.ul_pwr_ctrl_ded_r13_present) { + HANDLE_CODE(c.ul_pwr_ctrl_ded_r13.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::pucch_scell_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::pucch_scell_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.pucch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.sched_request_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.tpc_pdcch_cfg_pucch_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.pusch_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.ul_pwr_ctrl_ded_r13_present, 1)); + if (c.pucch_cfg_ded_r13_present) { + HANDLE_CODE(c.pucch_cfg_ded_r13.unpack(bref)); + } + if (c.sched_request_cfg_r13_present) { + HANDLE_CODE(c.sched_request_cfg_r13.unpack(bref)); + } + if (c.tpc_pdcch_cfg_pucch_scell_r13_present) { + HANDLE_CODE(c.tpc_pdcch_cfg_pucch_scell_r13.unpack(bref)); + } + if (c.pusch_cfg_ded_r13_present) { + HANDLE_CODE(c.pusch_cfg_ded_r13.unpack(bref)); + } + if (c.ul_pwr_ctrl_ded_r13_present) { + HANDLE_CODE(c.ul_pwr_ctrl_ded_r13.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::pucch_scell_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_scell_r10_s::pucch_scell_c_::setup_s_::setup_s_() +{ + pucch_cfg_ded_r13_present = false; + sched_request_cfg_r13_present = false; + tpc_pdcch_cfg_pucch_scell_r13_present = false; + pusch_cfg_ded_r13_present = false; + ul_pwr_ctrl_ded_r13_present = false; +} + +void phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_scell_r10_s::must_cfg_r14_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("k-max-r14", c.k_max_r14.to_string()); + if (c.p_a_must_r14_present) { + j.write_str("p-a-must-r14", c.p_a_must_r14.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.p_a_must_r14_present, 1)); + HANDLE_CODE(pack_enum(bref, c.k_max_r14)); + if (c.p_a_must_r14_present) { + HANDLE_CODE(pack_enum(bref, c.p_a_must_r14)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.p_a_must_r14_present, 1)); + HANDLE_CODE(unpack_enum(c.k_max_r14, bref)); + if (c.p_a_must_r14_present) { + HANDLE_CODE(unpack_enum(c.p_a_must_r14, bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::setup_s_() +{ + p_a_must_r14_present = false; +} + +void phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::cfi_cfg_r15: + c.destroy(); + break; + case types::cfi_pattern_cfg_r15: + c.destroy(); + break; + default: + break; + } +} +void phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cfi_cfg_r15: + c.init(); + break; + case types::cfi_pattern_cfg_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } +} +phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::setup_c_( + const phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cfi_cfg_r15: + c.init(other.c.get()); + break; + case types::cfi_pattern_cfg_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } +} +phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_& +phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_:: +operator=(const phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cfi_cfg_r15: + c.set(other.c.get()); + break; + case types::cfi_pattern_cfg_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } + + return *this; +} +void phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cfi_cfg_r15: + j.write_fieldname("cfi-Config-r15"); + c.get().to_json(j); + break; + case types::cfi_pattern_cfg_r15: + j.write_fieldname("cfi-PatternConfig-r15"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cfi_cfg_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cfi_pattern_cfg_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cfi_cfg_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cfi_pattern_cfg_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_bool("blindSubframePDSCH-Repetitions-r15", c.blind_sf_pdsch_repeats_r15); + j.write_bool("blindSlotSubslotPDSCH-Repetitions-r15", c.blind_slot_subslot_pdsch_repeats_r15); + if (c.max_num_sf_pdsch_repeats_r15_present) { + j.write_str("maxNumber-SubframePDSCH-Repetitions-r15", c.max_num_sf_pdsch_repeats_r15.to_string()); + } + if (c.max_num_slot_subslot_pdsch_repeats_r15_present) { + j.write_str("maxNumber-SlotSubslotPDSCH-Repetitions-r15", c.max_num_slot_subslot_pdsch_repeats_r15.to_string()); + } + if (c.rv_sf_pdsch_repeats_r15_present) { + j.write_str("rv-SubframePDSCH-Repetitions-r15", c.rv_sf_pdsch_repeats_r15.to_string()); + } + if (c.rv_slotsublot_pdsch_repeats_r15_present) { + j.write_str("rv-SlotsublotPDSCH-Repetitions-r15", c.rv_slotsublot_pdsch_repeats_r15.to_string()); + } + if (c.nof_processes_sf_pdsch_repeats_r15_present) { + j.write_int("numberOfProcesses-SubframePDSCH-Repetitions-r15", c.nof_processes_sf_pdsch_repeats_r15); + } + if (c.nof_processes_slot_subslot_pdsch_repeats_r15_present) { + j.write_int("numberOfProcesses-SlotSubslotPDSCH-Repetitions-r15", + c.nof_processes_slot_subslot_pdsch_repeats_r15); + } + if (c.mcs_restrict_sf_pdsch_repeats_r15_present) { + j.write_str("mcs-restrictionSubframePDSCH-Repetitions-r15", c.mcs_restrict_sf_pdsch_repeats_r15.to_string()); + } + if (c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present) { + j.write_str("mcs-restrictionSlotSubslotPDSCH-Repetitions-r15", + c.mcs_restrict_slot_subslot_pdsch_repeats_r15.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.max_num_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.max_num_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.rv_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.rv_slotsublot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.nof_processes_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.nof_processes_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.mcs_restrict_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.pack(c.blind_sf_pdsch_repeats_r15, 1)); + HANDLE_CODE(bref.pack(c.blind_slot_subslot_pdsch_repeats_r15, 1)); + if (c.max_num_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.max_num_sf_pdsch_repeats_r15)); + } + if (c.max_num_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.max_num_slot_subslot_pdsch_repeats_r15)); + } + if (c.rv_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.rv_sf_pdsch_repeats_r15)); + } + if (c.rv_slotsublot_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.rv_slotsublot_pdsch_repeats_r15)); + } + if (c.nof_processes_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.nof_processes_sf_pdsch_repeats_r15, (uint8_t)1, (uint8_t)16)); + } + if (c.nof_processes_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, c.nof_processes_slot_subslot_pdsch_repeats_r15, (uint8_t)1, (uint8_t)16)); + } + if (c.mcs_restrict_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.mcs_restrict_sf_pdsch_repeats_r15)); + } + if (c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(pack_enum(bref, c.mcs_restrict_slot_subslot_pdsch_repeats_r15)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.max_num_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.max_num_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.rv_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.rv_slotsublot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.nof_processes_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.nof_processes_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.mcs_restrict_sf_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.blind_sf_pdsch_repeats_r15, 1)); + HANDLE_CODE(bref.unpack(c.blind_slot_subslot_pdsch_repeats_r15, 1)); + if (c.max_num_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.max_num_sf_pdsch_repeats_r15, bref)); + } + if (c.max_num_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.max_num_slot_subslot_pdsch_repeats_r15, bref)); + } + if (c.rv_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.rv_sf_pdsch_repeats_r15, bref)); + } + if (c.rv_slotsublot_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.rv_slotsublot_pdsch_repeats_r15, bref)); + } + if (c.nof_processes_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.nof_processes_sf_pdsch_repeats_r15, bref, (uint8_t)1, (uint8_t)16)); + } + if (c.nof_processes_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(c.nof_processes_slot_subslot_pdsch_repeats_r15, bref, (uint8_t)1, (uint8_t)16)); + } + if (c.mcs_restrict_sf_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.mcs_restrict_sf_pdsch_repeats_r15, bref)); + } + if (c.mcs_restrict_slot_subslot_pdsch_repeats_r15_present) { + HANDLE_CODE(unpack_enum(c.mcs_restrict_slot_subslot_pdsch_repeats_r15, bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::setup_s_() +{ + max_num_sf_pdsch_repeats_r15_present = false; + max_num_slot_subslot_pdsch_repeats_r15_present = false; + rv_sf_pdsch_repeats_r15_present = false; + rv_slotsublot_pdsch_repeats_r15_present = false; + nof_processes_sf_pdsch_repeats_r15_present = false; + nof_processes_slot_subslot_pdsch_repeats_r15_present = false; + mcs_restrict_sf_pdsch_repeats_r15_present = false; + mcs_restrict_slot_subslot_pdsch_repeats_r15_present = false; +} + +// PhysicalConfigDedicatedSCell-v1370 ::= SEQUENCE +SRSASN_CODE phys_cfg_ded_scell_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pucch_scell_v1370.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(pucch_scell_v1370.unpack(bref)); + + return SRSASN_SUCCESS; +} +void phys_cfg_ded_scell_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pucch-SCell-v1370"); + pucch_scell_v1370.to_json(j); + j.end_obj(); +} + +void phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_::set(types::options e) +{ + type_ = e; +} +void phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_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(); + if (c.pucch_cfg_ded_v1370_present) { + j.write_fieldname("pucch-ConfigDedicated-v1370"); + c.pucch_cfg_ded_v1370.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_"); + } + j.end_obj(); +} +SRSASN_CODE phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.pucch_cfg_ded_v1370_present, 1)); + if (c.pucch_cfg_ded_v1370_present) { + HANDLE_CODE(c.pucch_cfg_ded_v1370.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.pucch_cfg_ded_v1370_present, 1)); + if (c.pucch_cfg_ded_v1370_present) { + HANDLE_CODE(c.pucch_cfg_ded_v1370.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +phys_cfg_ded_scell_v1370_s::pucch_scell_v1370_c_::setup_s_::setup_s_() +{ + pucch_cfg_ded_v1370_present = false; +} + +// RACH-ConfigCommonSCell-r11 ::= SEQUENCE +rach_cfg_common_scell_r11_s::rach_cfg_common_scell_r11_s() +{ + ext = false; +} +SRSASN_CODE rach_cfg_common_scell_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pwr_ramp_params_r11.pack(bref)); + HANDLE_CODE(pack_enum(bref, ra_supervision_info_r11.preamb_trans_max_r11)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_scell_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(pwr_ramp_params_r11.unpack(bref)); + HANDLE_CODE(unpack_enum(ra_supervision_info_r11.preamb_trans_max_r11, bref)); + + return SRSASN_SUCCESS; +} +void rach_cfg_common_scell_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("powerRampingParameters-r11"); + pwr_ramp_params_r11.to_json(j); + j.write_fieldname("ra-SupervisionInfo-r11"); + j.start_obj(); + j.write_str("preambleTransMax-r11", ra_supervision_info_r11.preamb_trans_max_r11.to_string()); + j.end_obj(); + j.end_obj(); +} + +// UplinkPowerControlCommon-v1530 ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_common_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(delta_flist_spucch_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(delta_flist_spucch_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("deltaFList-SPUCCH-r15"); + delta_flist_spucch_r15.to_json(j); + j.end_obj(); +} + +// UplinkPowerControlCommonPUSCH-LessCell-v1430 ::= SEQUENCE +ul_pwr_ctrl_common_pusch_less_cell_v1430_s::ul_pwr_ctrl_common_pusch_less_cell_v1430_s() +{ + p0_nominal_periodic_srs_r14_present = false; + p0_nominal_aperiodic_srs_r14_present = false; + alpha_srs_r14_present = false; +} +SRSASN_CODE ul_pwr_ctrl_common_pusch_less_cell_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p0_nominal_periodic_srs_r14_present, 1)); + HANDLE_CODE(bref.pack(p0_nominal_aperiodic_srs_r14_present, 1)); + HANDLE_CODE(bref.pack(alpha_srs_r14_present, 1)); + + if (p0_nominal_periodic_srs_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_periodic_srs_r14, (int8_t)-126, (int8_t)24)); + } + if (p0_nominal_aperiodic_srs_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_aperiodic_srs_r14, (int8_t)-126, (int8_t)24)); + } + if (alpha_srs_r14_present) { + HANDLE_CODE(pack_enum(bref, alpha_srs_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_pusch_less_cell_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p0_nominal_periodic_srs_r14_present, 1)); + HANDLE_CODE(bref.unpack(p0_nominal_aperiodic_srs_r14_present, 1)); + HANDLE_CODE(bref.unpack(alpha_srs_r14_present, 1)); + + if (p0_nominal_periodic_srs_r14_present) { + HANDLE_CODE(unpack_unalign_integer(p0_nominal_periodic_srs_r14, bref, (int8_t)-126, (int8_t)24)); + } + if (p0_nominal_aperiodic_srs_r14_present) { + HANDLE_CODE(unpack_unalign_integer(p0_nominal_aperiodic_srs_r14, bref, (int8_t)-126, (int8_t)24)); + } + if (alpha_srs_r14_present) { + HANDLE_CODE(unpack_enum(alpha_srs_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_pusch_less_cell_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p0_nominal_periodic_srs_r14_present) { + j.write_int("p0-Nominal-PeriodicSRS-r14", p0_nominal_periodic_srs_r14); + } + if (p0_nominal_aperiodic_srs_r14_present) { + j.write_int("p0-Nominal-AperiodicSRS-r14", p0_nominal_aperiodic_srs_r14); + } + if (alpha_srs_r14_present) { + j.write_str("alpha-SRS-r14", alpha_srs_r14.to_string()); + } + j.end_obj(); +} + +// UplinkPowerControlCommonSCell-r10 ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_common_scell_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_pusch_r10, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(pack_enum(bref, alpha_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_scell_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(p0_nominal_pusch_r10, bref, (int8_t)-126, (int8_t)24)); + HANDLE_CODE(unpack_enum(alpha_r10, bref)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-NominalPUSCH-r10", p0_nominal_pusch_r10); + j.write_str("alpha-r10", alpha_r10.to_string()); + j.end_obj(); +} + +// UplinkPowerControlCommonSCell-v1130 ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_common_scell_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, delta_preamb_msg3_r11, (int8_t)-1, (int8_t)6)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_scell_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(delta_preamb_msg3_r11, bref, (int8_t)-1, (int8_t)6)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_scell_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("deltaPreambleMsg3-r11", delta_preamb_msg3_r11); + j.end_obj(); +} + +// UplinkPowerControlCommonSCell-v1310 ::= SEQUENCE +ul_pwr_ctrl_common_scell_v1310_s::ul_pwr_ctrl_common_scell_v1310_s() +{ + delta_f_pucch_format3_r12_present = false; + delta_f_pucch_format1b_cs_r12_present = false; + delta_f_pucch_format4_r13_present = false; + delta_f_pucch_format5_minus13_present = false; +} +SRSASN_CODE ul_pwr_ctrl_common_scell_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delta_f_pucch_format3_r12_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_format1b_cs_r12_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_format4_r13_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_format5_minus13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_pucch, (int8_t)-127, (int8_t)-96)); + HANDLE_CODE(delta_flist_pucch.pack(bref)); + if (delta_f_pucch_format3_r12_present) { + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format3_r12)); + } + if (delta_f_pucch_format1b_cs_r12_present) { + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format1b_cs_r12)); + } + if (delta_f_pucch_format4_r13_present) { + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format4_r13)); + } + if (delta_f_pucch_format5_minus13_present) { + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format5_minus13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_scell_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delta_f_pucch_format3_r12_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_format1b_cs_r12_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_format4_r13_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_format5_minus13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(p0_nominal_pucch, bref, (int8_t)-127, (int8_t)-96)); + HANDLE_CODE(delta_flist_pucch.unpack(bref)); + if (delta_f_pucch_format3_r12_present) { + HANDLE_CODE(unpack_enum(delta_f_pucch_format3_r12, bref)); + } + if (delta_f_pucch_format1b_cs_r12_present) { + HANDLE_CODE(unpack_enum(delta_f_pucch_format1b_cs_r12, bref)); + } + if (delta_f_pucch_format4_r13_present) { + HANDLE_CODE(unpack_enum(delta_f_pucch_format4_r13, bref)); + } + if (delta_f_pucch_format5_minus13_present) { + HANDLE_CODE(unpack_enum(delta_f_pucch_format5_minus13, bref)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_scell_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-NominalPUCCH", p0_nominal_pucch); + j.write_fieldname("deltaFList-PUCCH"); + delta_flist_pucch.to_json(j); + if (delta_f_pucch_format3_r12_present) { + j.write_str("deltaF-PUCCH-Format3-r12", delta_f_pucch_format3_r12.to_string()); + } + if (delta_f_pucch_format1b_cs_r12_present) { + j.write_str("deltaF-PUCCH-Format1bCS-r12", delta_f_pucch_format1b_cs_r12.to_string()); + } + if (delta_f_pucch_format4_r13_present) { + j.write_str("deltaF-PUCCH-Format4-r13", delta_f_pucch_format4_r13.to_string()); + } + if (delta_f_pucch_format5_minus13_present) { + j.write_str("deltaF-PUCCH-Format5-13", delta_f_pucch_format5_minus13.to_string()); + } + j.end_obj(); +} + +// AntennaInfoDedicated-v10i0 ::= SEQUENCE +ant_info_ded_v10i0_s::ant_info_ded_v10i0_s() +{ + max_layers_mimo_r10_present = false; +} +SRSASN_CODE ant_info_ded_v10i0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_layers_mimo_r10_present, 1)); + + if (max_layers_mimo_r10_present) { + HANDLE_CODE(pack_enum(bref, max_layers_mimo_r10)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ant_info_ded_v10i0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_layers_mimo_r10_present, 1)); + + if (max_layers_mimo_r10_present) { + HANDLE_CODE(unpack_enum(max_layers_mimo_r10, bref)); + } + + return SRSASN_SUCCESS; +} +void ant_info_ded_v10i0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (max_layers_mimo_r10_present) { + j.write_str("maxLayersMIMO-r10", max_layers_mimo_r10.to_string()); + } + j.end_obj(); +} + +// RadioResourceConfigCommonSCell-r10 ::= SEQUENCE +rr_cfg_common_scell_r10_s::rr_cfg_common_scell_r10_s() +{ + ext = false; + ul_cfg_r10_present = false; + ul_carrier_freq_v1090_present = false; + rach_cfg_common_scell_r11_present = false; + prach_cfg_scell_r11_present = false; + tdd_cfg_v1130_present = false; + ul_pwr_ctrl_common_scell_v1130_present = false; + pusch_cfg_common_v1270_present = false; + pucch_cfg_common_r13_present = false; + ul_pwr_ctrl_common_scell_v1310_present = false; + high_speed_cfg_scell_r14_present = false; + prach_cfg_v1430_present = false; + ul_cfg_r14_present = false; + harq_ref_cfg_r14_present = false; + srs_flex_timing_r14_present = false; + mbsfn_sf_cfg_list_v1430_present = false; + ul_pwr_ctrl_common_scell_v1530_present = false; +} +SRSASN_CODE rr_cfg_common_scell_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ul_cfg_r10_present, 1)); + + HANDLE_CODE(bref.pack(non_ul_cfg_r10.mbsfn_sf_cfg_list_r10_present, 1)); + HANDLE_CODE(bref.pack(non_ul_cfg_r10.tdd_cfg_r10_present, 1)); + HANDLE_CODE(pack_enum(bref, non_ul_cfg_r10.dl_bw_r10)); + HANDLE_CODE(non_ul_cfg_r10.ant_info_common_r10.pack(bref)); + if (non_ul_cfg_r10.mbsfn_sf_cfg_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, non_ul_cfg_r10.mbsfn_sf_cfg_list_r10, 1, 8)); + } + HANDLE_CODE(non_ul_cfg_r10.phich_cfg_r10.pack(bref)); + HANDLE_CODE(non_ul_cfg_r10.pdsch_cfg_common_r10.pack(bref)); + if (non_ul_cfg_r10.tdd_cfg_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.tdd_cfg_r10.pack(bref)); + } + if (ul_cfg_r10_present) { + HANDLE_CODE(bref.pack(ul_cfg_r10.p_max_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.prach_cfg_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r10.ul_freq_info_r10.ul_bw_r10_present, 1)); + if (ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10_present) { + HANDLE_CODE( + pack_unalign_integer(bref, ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10, (uint16_t)0, (uint16_t)65535)); + } + if (ul_cfg_r10.ul_freq_info_r10.ul_bw_r10_present) { + HANDLE_CODE(pack_enum(bref, ul_cfg_r10.ul_freq_info_r10.ul_bw_r10)); + } + HANDLE_CODE( + pack_unalign_integer(bref, ul_cfg_r10.ul_freq_info_r10.add_spec_emission_scell_r10, (uint8_t)1, (uint8_t)32)); + if (ul_cfg_r10.p_max_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_r10.p_max_r10, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(ul_cfg_r10.ul_pwr_ctrl_common_scell_r10.pack(bref)); + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_common_r10.pack(bref)); + HANDLE_CODE(pack_enum(bref, ul_cfg_r10.ul_cp_len_r10)); + if (ul_cfg_r10.prach_cfg_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.prach_cfg_scell_r10.pack(bref)); + } + HANDLE_CODE(ul_cfg_r10.pusch_cfg_common_r10.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(7); + group_flags[0] |= ul_carrier_freq_v1090_present; + rrc_asn1_warn_assert(rach_cfg_common_scell_r11_present != (rach_cfg_common_scell_r11.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= rach_cfg_common_scell_r11_present; + rrc_asn1_warn_assert(prach_cfg_scell_r11_present != (prach_cfg_scell_r11.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= prach_cfg_scell_r11_present; + rrc_asn1_warn_assert(tdd_cfg_v1130_present != (tdd_cfg_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= tdd_cfg_v1130_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_common_scell_v1130_present != (ul_pwr_ctrl_common_scell_v1130.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= ul_pwr_ctrl_common_scell_v1130_present; + rrc_asn1_warn_assert(pusch_cfg_common_v1270_present != (pusch_cfg_common_v1270.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= pusch_cfg_common_v1270_present; + rrc_asn1_warn_assert(pucch_cfg_common_r13_present != (pucch_cfg_common_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pucch_cfg_common_r13_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_common_scell_v1310_present != (ul_pwr_ctrl_common_scell_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= ul_pwr_ctrl_common_scell_v1310_present; + rrc_asn1_warn_assert(high_speed_cfg_scell_r14_present != (high_speed_cfg_scell_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= high_speed_cfg_scell_r14_present; + rrc_asn1_warn_assert(prach_cfg_v1430_present != (prach_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= prach_cfg_v1430_present; + rrc_asn1_warn_assert(ul_cfg_r14_present != (ul_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= ul_cfg_r14_present; + group_flags[4] |= harq_ref_cfg_r14_present; + group_flags[4] |= srs_flex_timing_r14_present; + rrc_asn1_warn_assert(mbsfn_sf_cfg_list_v1430_present != (mbsfn_sf_cfg_list_v1430.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= mbsfn_sf_cfg_list_v1430_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_common_scell_v1530_present != (ul_pwr_ctrl_common_scell_v1530.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= ul_pwr_ctrl_common_scell_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_carrier_freq_v1090_present, 1)); + if (ul_carrier_freq_v1090_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_carrier_freq_v1090, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rach_cfg_common_scell_r11_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_scell_r11_present, 1)); + HANDLE_CODE(bref.pack(tdd_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_scell_v1130_present, 1)); + if (rach_cfg_common_scell_r11_present) { + HANDLE_CODE(rach_cfg_common_scell_r11->pack(bref)); + } + if (prach_cfg_scell_r11_present) { + HANDLE_CODE(prach_cfg_scell_r11->pack(bref)); + } + if (tdd_cfg_v1130_present) { + HANDLE_CODE(tdd_cfg_v1130->pack(bref)); + } + if (ul_pwr_ctrl_common_scell_v1130_present) { + HANDLE_CODE(ul_pwr_ctrl_common_scell_v1130->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pusch_cfg_common_v1270_present, 1)); + if (pusch_cfg_common_v1270_present) { + HANDLE_CODE(pusch_cfg_common_v1270->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pucch_cfg_common_r13_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_scell_v1310_present, 1)); + if (pucch_cfg_common_r13_present) { + HANDLE_CODE(pucch_cfg_common_r13->pack(bref)); + } + if (ul_pwr_ctrl_common_scell_v1310_present) { + HANDLE_CODE(ul_pwr_ctrl_common_scell_v1310->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(high_speed_cfg_scell_r14_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(harq_ref_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(srs_flex_timing_r14_present, 1)); + if (high_speed_cfg_scell_r14_present) { + HANDLE_CODE(high_speed_cfg_scell_r14->pack(bref)); + } + if (prach_cfg_v1430_present) { + HANDLE_CODE(prach_cfg_v1430->pack(bref)); + } + if (ul_cfg_r14_present) { + HANDLE_CODE(bref.pack(ul_cfg_r14->p_max_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r14->prach_cfg_scell_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_cfg_r14->ul_freq_info_r14.ul_bw_r14_present, 1)); + if (ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14, (uint32_t)0, + (uint32_t)262143)); + } + if (ul_cfg_r14->ul_freq_info_r14.ul_bw_r14_present) { + HANDLE_CODE(pack_enum(bref, ul_cfg_r14->ul_freq_info_r14.ul_bw_r14)); + } + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_r14->ul_freq_info_r14.add_spec_emission_scell_r14, (uint8_t)1, + (uint8_t)32)); + if (ul_cfg_r14->p_max_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_r14->p_max_r14, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(ul_cfg_r14->srs_ul_cfg_common_r14.pack(bref)); + HANDLE_CODE(pack_enum(bref, ul_cfg_r14->ul_cp_len_r14)); + if (ul_cfg_r14->prach_cfg_scell_r14_present) { + HANDLE_CODE(ul_cfg_r14->prach_cfg_scell_r14.pack(bref)); + } + if (ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430_present) { + HANDLE_CODE(ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430.pack(bref)); + } + } + if (harq_ref_cfg_r14_present) { + HANDLE_CODE(pack_enum(bref, harq_ref_cfg_r14)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mbsfn_sf_cfg_list_v1430, 1, 8)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_scell_v1530_present, 1)); + if (ul_pwr_ctrl_common_scell_v1530_present) { + HANDLE_CODE(ul_pwr_ctrl_common_scell_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_scell_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ul_cfg_r10_present, 1)); + + HANDLE_CODE(bref.unpack(non_ul_cfg_r10.mbsfn_sf_cfg_list_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_ul_cfg_r10.tdd_cfg_r10_present, 1)); + HANDLE_CODE(unpack_enum(non_ul_cfg_r10.dl_bw_r10, bref)); + HANDLE_CODE(non_ul_cfg_r10.ant_info_common_r10.unpack(bref)); + if (non_ul_cfg_r10.mbsfn_sf_cfg_list_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(non_ul_cfg_r10.mbsfn_sf_cfg_list_r10, bref, 1, 8)); + } + HANDLE_CODE(non_ul_cfg_r10.phich_cfg_r10.unpack(bref)); + HANDLE_CODE(non_ul_cfg_r10.pdsch_cfg_common_r10.unpack(bref)); + if (non_ul_cfg_r10.tdd_cfg_r10_present) { + HANDLE_CODE(non_ul_cfg_r10.tdd_cfg_r10.unpack(bref)); + } + if (ul_cfg_r10_present) { + HANDLE_CODE(bref.unpack(ul_cfg_r10.p_max_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.prach_cfg_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r10.ul_freq_info_r10.ul_bw_r10_present, 1)); + if (ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10_present) { + HANDLE_CODE( + unpack_unalign_integer(ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10, bref, (uint16_t)0, (uint16_t)65535)); + } + if (ul_cfg_r10.ul_freq_info_r10.ul_bw_r10_present) { + HANDLE_CODE(unpack_enum(ul_cfg_r10.ul_freq_info_r10.ul_bw_r10, bref)); + } + HANDLE_CODE( + unpack_unalign_integer(ul_cfg_r10.ul_freq_info_r10.add_spec_emission_scell_r10, bref, (uint8_t)1, (uint8_t)32)); + if (ul_cfg_r10.p_max_r10_present) { + HANDLE_CODE(unpack_unalign_integer(ul_cfg_r10.p_max_r10, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(ul_cfg_r10.ul_pwr_ctrl_common_scell_r10.unpack(bref)); + HANDLE_CODE(ul_cfg_r10.srs_ul_cfg_common_r10.unpack(bref)); + HANDLE_CODE(unpack_enum(ul_cfg_r10.ul_cp_len_r10, bref)); + if (ul_cfg_r10.prach_cfg_scell_r10_present) { + HANDLE_CODE(ul_cfg_r10.prach_cfg_scell_r10.unpack(bref)); + } + HANDLE_CODE(ul_cfg_r10.pusch_cfg_common_r10.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(7); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_carrier_freq_v1090_present, 1)); + if (ul_carrier_freq_v1090_present) { + HANDLE_CODE(unpack_unalign_integer(ul_carrier_freq_v1090, bref, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rach_cfg_common_scell_r11_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_scell_r11_present, 1)); + HANDLE_CODE(bref.unpack(tdd_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_scell_v1130_present, 1)); + if (rach_cfg_common_scell_r11_present) { + rach_cfg_common_scell_r11 = make_copy_ptr(rach_cfg_common_scell_r11_s()); + HANDLE_CODE(rach_cfg_common_scell_r11->unpack(bref)); + } + if (prach_cfg_scell_r11_present) { + prach_cfg_scell_r11 = make_copy_ptr(prach_cfg_s()); + HANDLE_CODE(prach_cfg_scell_r11->unpack(bref)); + } + if (tdd_cfg_v1130_present) { + tdd_cfg_v1130 = make_copy_ptr(tdd_cfg_v1130_s()); + HANDLE_CODE(tdd_cfg_v1130->unpack(bref)); + } + if (ul_pwr_ctrl_common_scell_v1130_present) { + ul_pwr_ctrl_common_scell_v1130 = make_copy_ptr(ul_pwr_ctrl_common_scell_v1130_s()); + HANDLE_CODE(ul_pwr_ctrl_common_scell_v1130->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pusch_cfg_common_v1270_present, 1)); + if (pusch_cfg_common_v1270_present) { + pusch_cfg_common_v1270 = make_copy_ptr(pusch_cfg_common_v1270_s()); + HANDLE_CODE(pusch_cfg_common_v1270->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pucch_cfg_common_r13_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_scell_v1310_present, 1)); + if (pucch_cfg_common_r13_present) { + pucch_cfg_common_r13 = make_copy_ptr(pucch_cfg_common_s()); + HANDLE_CODE(pucch_cfg_common_r13->unpack(bref)); + } + if (ul_pwr_ctrl_common_scell_v1310_present) { + ul_pwr_ctrl_common_scell_v1310 = make_copy_ptr(ul_pwr_ctrl_common_scell_v1310_s()); + HANDLE_CODE(ul_pwr_ctrl_common_scell_v1310->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(high_speed_cfg_scell_r14_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(harq_ref_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(srs_flex_timing_r14_present, 1)); + if (high_speed_cfg_scell_r14_present) { + high_speed_cfg_scell_r14 = make_copy_ptr(high_speed_cfg_scell_r14_s()); + HANDLE_CODE(high_speed_cfg_scell_r14->unpack(bref)); + } + if (prach_cfg_v1430_present) { + prach_cfg_v1430 = make_copy_ptr(prach_cfg_v1430_s()); + HANDLE_CODE(prach_cfg_v1430->unpack(bref)); + } + if (ul_cfg_r14_present) { + ul_cfg_r14 = make_copy_ptr(ul_cfg_r14_s_()); + HANDLE_CODE(bref.unpack(ul_cfg_r14->p_max_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r14->prach_cfg_scell_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_cfg_r14->ul_freq_info_r14.ul_bw_r14_present, 1)); + if (ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14_present) { + HANDLE_CODE(unpack_unalign_integer(ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14, bref, (uint32_t)0, + (uint32_t)262143)); + } + if (ul_cfg_r14->ul_freq_info_r14.ul_bw_r14_present) { + HANDLE_CODE(unpack_enum(ul_cfg_r14->ul_freq_info_r14.ul_bw_r14, bref)); + } + HANDLE_CODE(unpack_unalign_integer(ul_cfg_r14->ul_freq_info_r14.add_spec_emission_scell_r14, bref, (uint8_t)1, + (uint8_t)32)); + if (ul_cfg_r14->p_max_r14_present) { + HANDLE_CODE(unpack_unalign_integer(ul_cfg_r14->p_max_r14, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(ul_cfg_r14->srs_ul_cfg_common_r14.unpack(bref)); + HANDLE_CODE(unpack_enum(ul_cfg_r14->ul_cp_len_r14, bref)); + if (ul_cfg_r14->prach_cfg_scell_r14_present) { + HANDLE_CODE(ul_cfg_r14->prach_cfg_scell_r14.unpack(bref)); + } + if (ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430_present) { + HANDLE_CODE(ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430.unpack(bref)); + } + } + if (harq_ref_cfg_r14_present) { + HANDLE_CODE(unpack_enum(harq_ref_cfg_r14, bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mbsfn_sf_cfg_list_v1430_present, 1)); + if (mbsfn_sf_cfg_list_v1430_present) { + mbsfn_sf_cfg_list_v1430 = make_copy_ptr(mbsfn_sf_cfg_list_v1430_l()); + HANDLE_CODE(unpack_dyn_seq_of(*mbsfn_sf_cfg_list_v1430, bref, 1, 8)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_scell_v1530_present, 1)); + if (ul_pwr_ctrl_common_scell_v1530_present) { + ul_pwr_ctrl_common_scell_v1530 = make_copy_ptr(ul_pwr_ctrl_common_v1530_s()); + HANDLE_CODE(ul_pwr_ctrl_common_scell_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_common_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("nonUL-Configuration-r10"); + j.start_obj(); + j.write_str("dl-Bandwidth-r10", non_ul_cfg_r10.dl_bw_r10.to_string()); + j.write_fieldname("antennaInfoCommon-r10"); + non_ul_cfg_r10.ant_info_common_r10.to_json(j); + if (non_ul_cfg_r10.mbsfn_sf_cfg_list_r10_present) { + j.start_array("mbsfn-SubframeConfigList-r10"); + for (uint32_t i1 = 0; i1 < non_ul_cfg_r10.mbsfn_sf_cfg_list_r10.size(); ++i1) { + non_ul_cfg_r10.mbsfn_sf_cfg_list_r10[i1].to_json(j); + } + j.end_array(); + } + j.write_fieldname("phich-Config-r10"); + non_ul_cfg_r10.phich_cfg_r10.to_json(j); + j.write_fieldname("pdsch-ConfigCommon-r10"); + non_ul_cfg_r10.pdsch_cfg_common_r10.to_json(j); + if (non_ul_cfg_r10.tdd_cfg_r10_present) { + j.write_fieldname("tdd-Config-r10"); + non_ul_cfg_r10.tdd_cfg_r10.to_json(j); + } + j.end_obj(); + if (ul_cfg_r10_present) { + j.write_fieldname("ul-Configuration-r10"); + j.start_obj(); + j.write_fieldname("ul-FreqInfo-r10"); + j.start_obj(); + if (ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10_present) { + j.write_int("ul-CarrierFreq-r10", ul_cfg_r10.ul_freq_info_r10.ul_carrier_freq_r10); + } + if (ul_cfg_r10.ul_freq_info_r10.ul_bw_r10_present) { + j.write_str("ul-Bandwidth-r10", ul_cfg_r10.ul_freq_info_r10.ul_bw_r10.to_string()); + } + j.write_int("additionalSpectrumEmissionSCell-r10", ul_cfg_r10.ul_freq_info_r10.add_spec_emission_scell_r10); + j.end_obj(); + if (ul_cfg_r10.p_max_r10_present) { + j.write_int("p-Max-r10", ul_cfg_r10.p_max_r10); + } + j.write_fieldname("uplinkPowerControlCommonSCell-r10"); + ul_cfg_r10.ul_pwr_ctrl_common_scell_r10.to_json(j); + j.write_fieldname("soundingRS-UL-ConfigCommon-r10"); + ul_cfg_r10.srs_ul_cfg_common_r10.to_json(j); + j.write_str("ul-CyclicPrefixLength-r10", ul_cfg_r10.ul_cp_len_r10.to_string()); + if (ul_cfg_r10.prach_cfg_scell_r10_present) { + j.write_fieldname("prach-ConfigSCell-r10"); + ul_cfg_r10.prach_cfg_scell_r10.to_json(j); + } + j.write_fieldname("pusch-ConfigCommon-r10"); + ul_cfg_r10.pusch_cfg_common_r10.to_json(j); + j.end_obj(); + } + if (ul_carrier_freq_v1090_present) { + j.write_int("ul-CarrierFreq-v1090", ul_carrier_freq_v1090); + } + if (rach_cfg_common_scell_r11_present) { + j.write_fieldname("rach-ConfigCommonSCell-r11"); + rach_cfg_common_scell_r11->to_json(j); + } + if (prach_cfg_scell_r11_present) { + j.write_fieldname("prach-ConfigSCell-r11"); + prach_cfg_scell_r11->to_json(j); + } + if (tdd_cfg_v1130_present) { + j.write_fieldname("tdd-Config-v1130"); + tdd_cfg_v1130->to_json(j); + } + if (ul_pwr_ctrl_common_scell_v1130_present) { + j.write_fieldname("uplinkPowerControlCommonSCell-v1130"); + ul_pwr_ctrl_common_scell_v1130->to_json(j); + } + if (pusch_cfg_common_v1270_present) { + j.write_fieldname("pusch-ConfigCommon-v1270"); + pusch_cfg_common_v1270->to_json(j); + } + if (pucch_cfg_common_r13_present) { + j.write_fieldname("pucch-ConfigCommon-r13"); + pucch_cfg_common_r13->to_json(j); + } + if (ul_pwr_ctrl_common_scell_v1310_present) { + j.write_fieldname("uplinkPowerControlCommonSCell-v1310"); + ul_pwr_ctrl_common_scell_v1310->to_json(j); + } + if (high_speed_cfg_scell_r14_present) { + j.write_fieldname("highSpeedConfigSCell-r14"); + high_speed_cfg_scell_r14->to_json(j); + } + if (prach_cfg_v1430_present) { + j.write_fieldname("prach-Config-v1430"); + prach_cfg_v1430->to_json(j); + } + if (ul_cfg_r14_present) { + j.write_fieldname("ul-Configuration-r14"); + j.start_obj(); + j.write_fieldname("ul-FreqInfo-r14"); + j.start_obj(); + if (ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14_present) { + j.write_int("ul-CarrierFreq-r14", ul_cfg_r14->ul_freq_info_r14.ul_carrier_freq_r14); + } + if (ul_cfg_r14->ul_freq_info_r14.ul_bw_r14_present) { + j.write_str("ul-Bandwidth-r14", ul_cfg_r14->ul_freq_info_r14.ul_bw_r14.to_string()); + } + j.write_int("additionalSpectrumEmissionSCell-r14", ul_cfg_r14->ul_freq_info_r14.add_spec_emission_scell_r14); + j.end_obj(); + if (ul_cfg_r14->p_max_r14_present) { + j.write_int("p-Max-r14", ul_cfg_r14->p_max_r14); + } + j.write_fieldname("soundingRS-UL-ConfigCommon-r14"); + ul_cfg_r14->srs_ul_cfg_common_r14.to_json(j); + j.write_str("ul-CyclicPrefixLength-r14", ul_cfg_r14->ul_cp_len_r14.to_string()); + if (ul_cfg_r14->prach_cfg_scell_r14_present) { + j.write_fieldname("prach-ConfigSCell-r14"); + ul_cfg_r14->prach_cfg_scell_r14.to_json(j); + } + if (ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430_present) { + j.write_fieldname("uplinkPowerControlCommonPUSCH-LessCell-v1430"); + ul_cfg_r14->ul_pwr_ctrl_common_pusch_less_cell_v1430.to_json(j); + } + j.end_obj(); + } + if (harq_ref_cfg_r14_present) { + j.write_str("harq-ReferenceConfig-r14", harq_ref_cfg_r14.to_string()); + } + if (srs_flex_timing_r14_present) { + j.write_str("soundingRS-FlexibleTiming-r14", "true"); + } + if (mbsfn_sf_cfg_list_v1430_present) { + j.start_array("mbsfn-SubframeConfigList-v1430"); + for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { + ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + } + j.end_array(); + } + if (ul_pwr_ctrl_common_scell_v1530_present) { + j.write_fieldname("uplinkPowerControlCommonSCell-v1530"); + ul_pwr_ctrl_common_scell_v1530->to_json(j); + } + j.end_obj(); +} + +rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::non_ul_cfg_r10_s_() +{ + mbsfn_sf_cfg_list_r10_present = false; + tdd_cfg_r10_present = false; +} + +rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_cfg_r10_s_() +{ + p_max_r10_present = false; + prach_cfg_scell_r10_present = false; +} + +rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_freq_info_r10_s_() +{ + ul_carrier_freq_r10_present = false; + ul_bw_r10_present = false; +} + +rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_cfg_r14_s_() +{ + p_max_r14_present = false; + prach_cfg_scell_r14_present = false; + ul_pwr_ctrl_common_pusch_less_cell_v1430_present = false; +} + +rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_freq_info_r14_s_() +{ + ul_carrier_freq_r14_present = false; + ul_bw_r14_present = false; +} + +// RadioResourceConfigDedicatedSCell-r10 ::= SEQUENCE +rr_cfg_ded_scell_r10_s::rr_cfg_ded_scell_r10_s() +{ + ext = false; + phys_cfg_ded_scell_r10_present = false; + mac_main_cfg_scell_r11_present = false; + naics_info_r12_present = false; + neigh_cells_crs_info_scell_r13_present = false; + phys_cfg_ded_scell_v1370_present = false; + crs_intf_mitig_enabled_r15_present = false; + neigh_cells_crs_info_r15_present = false; + sps_cfg_v1530_present = false; +} +SRSASN_CODE rr_cfg_ded_scell_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(phys_cfg_ded_scell_r10_present, 1)); + + if (phys_cfg_ded_scell_r10_present) { + HANDLE_CODE(phys_cfg_ded_scell_r10.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(5); + rrc_asn1_warn_assert(mac_main_cfg_scell_r11_present != (mac_main_cfg_scell_r11.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= mac_main_cfg_scell_r11_present; + rrc_asn1_warn_assert(naics_info_r12_present != (naics_info_r12.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= naics_info_r12_present; + rrc_asn1_warn_assert(neigh_cells_crs_info_scell_r13_present != (neigh_cells_crs_info_scell_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= neigh_cells_crs_info_scell_r13_present; + rrc_asn1_warn_assert(phys_cfg_ded_scell_v1370_present != (phys_cfg_ded_scell_v1370.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= phys_cfg_ded_scell_v1370_present; + group_flags[4] |= crs_intf_mitig_enabled_r15_present; + rrc_asn1_warn_assert(neigh_cells_crs_info_r15_present != (neigh_cells_crs_info_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= neigh_cells_crs_info_r15_present; + rrc_asn1_warn_assert(sps_cfg_v1530_present != (sps_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= sps_cfg_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mac_main_cfg_scell_r11_present, 1)); + if (mac_main_cfg_scell_r11_present) { + HANDLE_CODE(mac_main_cfg_scell_r11->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(naics_info_r12_present, 1)); + if (naics_info_r12_present) { + HANDLE_CODE(naics_info_r12->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(neigh_cells_crs_info_scell_r13_present, 1)); + if (neigh_cells_crs_info_scell_r13_present) { + HANDLE_CODE(neigh_cells_crs_info_scell_r13->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(phys_cfg_ded_scell_v1370_present, 1)); + if (phys_cfg_ded_scell_v1370_present) { + HANDLE_CODE(phys_cfg_ded_scell_v1370->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_r15_present, 1)); + HANDLE_CODE(bref.pack(neigh_cells_crs_info_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_v1530_present, 1)); + if (crs_intf_mitig_enabled_r15_present) { + HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_r15, 1)); + } + if (neigh_cells_crs_info_r15_present) { + HANDLE_CODE(neigh_cells_crs_info_r15->pack(bref)); + } + if (sps_cfg_v1530_present) { + HANDLE_CODE(sps_cfg_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_scell_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(phys_cfg_ded_scell_r10_present, 1)); + + if (phys_cfg_ded_scell_r10_present) { + HANDLE_CODE(phys_cfg_ded_scell_r10.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mac_main_cfg_scell_r11_present, 1)); + if (mac_main_cfg_scell_r11_present) { + mac_main_cfg_scell_r11 = make_copy_ptr(mac_main_cfg_scell_r11_s()); + HANDLE_CODE(mac_main_cfg_scell_r11->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(naics_info_r12_present, 1)); + if (naics_info_r12_present) { + naics_info_r12 = make_copy_ptr(naics_assist_info_r12_c()); + HANDLE_CODE(naics_info_r12->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_scell_r13_present, 1)); + if (neigh_cells_crs_info_scell_r13_present) { + neigh_cells_crs_info_scell_r13 = make_copy_ptr(neigh_cells_crs_info_r13_c()); + HANDLE_CODE(neigh_cells_crs_info_scell_r13->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(phys_cfg_ded_scell_v1370_present, 1)); + if (phys_cfg_ded_scell_v1370_present) { + phys_cfg_ded_scell_v1370 = make_copy_ptr(phys_cfg_ded_scell_v1370_s()); + HANDLE_CODE(phys_cfg_ded_scell_v1370->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_r15_present, 1)); + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_v1530_present, 1)); + if (crs_intf_mitig_enabled_r15_present) { + HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_r15, 1)); + } + if (neigh_cells_crs_info_r15_present) { + neigh_cells_crs_info_r15 = make_copy_ptr(neigh_cells_crs_info_r15_c()); + HANDLE_CODE(neigh_cells_crs_info_r15->unpack(bref)); + } + if (sps_cfg_v1530_present) { + sps_cfg_v1530 = make_copy_ptr(sps_cfg_v1530_s()); + HANDLE_CODE(sps_cfg_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_ded_scell_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phys_cfg_ded_scell_r10_present) { + j.write_fieldname("physicalConfigDedicatedSCell-r10"); + phys_cfg_ded_scell_r10.to_json(j); + } + if (mac_main_cfg_scell_r11_present) { + j.write_fieldname("mac-MainConfigSCell-r11"); + mac_main_cfg_scell_r11->to_json(j); + } + if (naics_info_r12_present) { + j.write_fieldname("naics-Info-r12"); + naics_info_r12->to_json(j); + } + if (neigh_cells_crs_info_scell_r13_present) { + j.write_fieldname("neighCellsCRS-InfoSCell-r13"); + neigh_cells_crs_info_scell_r13->to_json(j); + } + if (phys_cfg_ded_scell_v1370_present) { + j.write_fieldname("physicalConfigDedicatedSCell-v1370"); + phys_cfg_ded_scell_v1370->to_json(j); + } + if (crs_intf_mitig_enabled_r15_present) { + j.write_bool("crs-IntfMitigEnabled-r15", crs_intf_mitig_enabled_r15); + } + if (neigh_cells_crs_info_r15_present) { + j.write_fieldname("neighCellsCRS-Info-r15"); + neigh_cells_crs_info_r15->to_json(j); + } + if (sps_cfg_v1530_present) { + j.write_fieldname("sps-Config-v1530"); + sps_cfg_v1530->to_json(j); + } + j.end_obj(); +} + +// SCellToAddModExt-r13 ::= SEQUENCE +scell_to_add_mod_ext_r13_s::scell_to_add_mod_ext_r13_s() +{ + cell_identif_r13_present = false; + rr_cfg_common_scell_r13_present = false; + rr_cfg_ded_scell_r13_present = false; + ant_info_ded_scell_r13_present = false; +} +SRSASN_CODE scell_to_add_mod_ext_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_identif_r13_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_common_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_ded_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(ant_info_ded_scell_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, s_cell_idx_r13, (uint8_t)1, (uint8_t)31)); + if (cell_identif_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r13.pci_r13, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r13.dl_carrier_freq_r13, (uint32_t)0, (uint32_t)262143)); + } + if (rr_cfg_common_scell_r13_present) { + HANDLE_CODE(rr_cfg_common_scell_r13.pack(bref)); + } + if (rr_cfg_ded_scell_r13_present) { + HANDLE_CODE(rr_cfg_ded_scell_r13.pack(bref)); + } + if (ant_info_ded_scell_r13_present) { + HANDLE_CODE(ant_info_ded_scell_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_to_add_mod_ext_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_identif_r13_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_common_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_ded_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_ded_scell_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(s_cell_idx_r13, bref, (uint8_t)1, (uint8_t)31)); + if (cell_identif_r13_present) { + HANDLE_CODE(unpack_unalign_integer(cell_identif_r13.pci_r13, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(cell_identif_r13.dl_carrier_freq_r13, bref, (uint32_t)0, (uint32_t)262143)); + } + if (rr_cfg_common_scell_r13_present) { + HANDLE_CODE(rr_cfg_common_scell_r13.unpack(bref)); + } + if (rr_cfg_ded_scell_r13_present) { + HANDLE_CODE(rr_cfg_ded_scell_r13.unpack(bref)); + } + if (ant_info_ded_scell_r13_present) { + HANDLE_CODE(ant_info_ded_scell_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scell_to_add_mod_ext_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sCellIndex-r13", s_cell_idx_r13); + if (cell_identif_r13_present) { + j.write_fieldname("cellIdentification-r13"); + j.start_obj(); + j.write_int("physCellId-r13", cell_identif_r13.pci_r13); + j.write_int("dl-CarrierFreq-r13", cell_identif_r13.dl_carrier_freq_r13); + j.end_obj(); + } + if (rr_cfg_common_scell_r13_present) { + j.write_fieldname("radioResourceConfigCommonSCell-r13"); + rr_cfg_common_scell_r13.to_json(j); + } + if (rr_cfg_ded_scell_r13_present) { + j.write_fieldname("radioResourceConfigDedicatedSCell-r13"); + rr_cfg_ded_scell_r13.to_json(j); + } + if (ant_info_ded_scell_r13_present) { + j.write_fieldname("antennaInfoDedicatedSCell-r13"); + ant_info_ded_scell_r13.to_json(j); + } + j.end_obj(); +} + +// SCellConfigCommon-r15 ::= SEQUENCE +scell_cfg_common_r15_s::scell_cfg_common_r15_s() +{ + rr_cfg_common_scell_r15_present = false; + rr_cfg_ded_scell_r15_present = false; + ant_info_ded_scell_r15_present = false; +} +SRSASN_CODE scell_cfg_common_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_common_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_ded_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(ant_info_ded_scell_r15_present, 1)); + + if (rr_cfg_common_scell_r15_present) { + HANDLE_CODE(rr_cfg_common_scell_r15.pack(bref)); + } + if (rr_cfg_ded_scell_r15_present) { + HANDLE_CODE(rr_cfg_ded_scell_r15.pack(bref)); + } + if (ant_info_ded_scell_r15_present) { + HANDLE_CODE(ant_info_ded_scell_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_cfg_common_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_common_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_ded_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_ded_scell_r15_present, 1)); + + if (rr_cfg_common_scell_r15_present) { + HANDLE_CODE(rr_cfg_common_scell_r15.unpack(bref)); + } + if (rr_cfg_ded_scell_r15_present) { + HANDLE_CODE(rr_cfg_ded_scell_r15.unpack(bref)); + } + if (ant_info_ded_scell_r15_present) { + HANDLE_CODE(ant_info_ded_scell_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scell_cfg_common_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_common_scell_r15_present) { + j.write_fieldname("radioResourceConfigCommonSCell-r15"); + rr_cfg_common_scell_r15.to_json(j); + } + if (rr_cfg_ded_scell_r15_present) { + j.write_fieldname("radioResourceConfigDedicatedSCell-r15"); + rr_cfg_ded_scell_r15.to_json(j); + } + if (ant_info_ded_scell_r15_present) { + j.write_fieldname("antennaInfoDedicatedSCell-r15"); + ant_info_ded_scell_r15.to_json(j); + } + j.end_obj(); +} + +// SL-DiscTxPoolToAddMod-r12 ::= SEQUENCE +SRSASN_CODE sl_disc_tx_pool_to_add_mod_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pool_id_r12, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pool_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_pool_to_add_mod_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pool_id_r12, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pool_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_disc_tx_pool_to_add_mod_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("poolIdentity-r12", pool_id_r12); + j.write_fieldname("pool-r12"); + pool_r12.to_json(j); + j.end_obj(); +} + +// SL-TF-IndexPair-r12b ::= SEQUENCE +sl_tf_idx_pair_r12b_s::sl_tf_idx_pair_r12b_s() +{ + disc_sf_idx_r12b_present = false; + disc_prb_idx_r12b_present = false; +} +SRSASN_CODE sl_tf_idx_pair_r12b_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(disc_sf_idx_r12b_present, 1)); + HANDLE_CODE(bref.pack(disc_prb_idx_r12b_present, 1)); + + if (disc_sf_idx_r12b_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_sf_idx_r12b, (uint8_t)0, (uint8_t)209)); + } + if (disc_prb_idx_r12b_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_prb_idx_r12b, (uint8_t)0, (uint8_t)49)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tf_idx_pair_r12b_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(disc_sf_idx_r12b_present, 1)); + HANDLE_CODE(bref.unpack(disc_prb_idx_r12b_present, 1)); + + if (disc_sf_idx_r12b_present) { + HANDLE_CODE(unpack_unalign_integer(disc_sf_idx_r12b, bref, (uint8_t)0, (uint8_t)209)); + } + if (disc_prb_idx_r12b_present) { + HANDLE_CODE(unpack_unalign_integer(disc_prb_idx_r12b, bref, (uint8_t)0, (uint8_t)49)); + } + + return SRSASN_SUCCESS; +} +void sl_tf_idx_pair_r12b_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_sf_idx_r12b_present) { + j.write_int("discSF-Index-r12b", disc_sf_idx_r12b); + } + if (disc_prb_idx_r12b_present) { + j.write_int("discPRB-Index-r12b", disc_prb_idx_r12b); + } + j.end_obj(); +} + +// SCellGroupToAddMod-r15 ::= SEQUENCE +scell_group_to_add_mod_r15_s::scell_group_to_add_mod_r15_s() +{ + s_cell_cfg_common_r15_present = false; + s_cell_to_release_list_r15_present = false; + s_cell_to_add_mod_list_r15_present = false; +} +SRSASN_CODE scell_group_to_add_mod_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(s_cell_cfg_common_r15_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, s_cell_group_idx_r15, (uint8_t)1, (uint8_t)4)); + if (s_cell_cfg_common_r15_present) { + HANDLE_CODE(s_cell_cfg_common_r15.pack(bref)); + } + if (s_cell_to_release_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_release_list_r15, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (s_cell_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_r15, 1, 31)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_group_to_add_mod_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(s_cell_cfg_common_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(s_cell_group_idx_r15, bref, (uint8_t)1, (uint8_t)4)); + if (s_cell_cfg_common_r15_present) { + HANDLE_CODE(s_cell_cfg_common_r15.unpack(bref)); + } + if (s_cell_to_release_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_release_list_r15, bref, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (s_cell_to_add_mod_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_r15, bref, 1, 31)); + } + + return SRSASN_SUCCESS; +} +void scell_group_to_add_mod_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sCellGroupIndex-r15", s_cell_group_idx_r15); + if (s_cell_cfg_common_r15_present) { + j.write_fieldname("sCellConfigCommon-r15"); + s_cell_cfg_common_r15.to_json(j); + } + if (s_cell_to_release_list_r15_present) { + j.start_array("sCellToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_r15.size(); ++i1) { + j.write_int(s_cell_to_release_list_r15[i1]); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_r15_present) { + j.start_array("sCellToAddModList-r15"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_r15.size(); ++i1) { + s_cell_to_add_mod_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-HoppingConfigDisc-r12 ::= SEQUENCE +SRSASN_CODE sl_hop_cfg_disc_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, a_r12, (uint8_t)1, (uint8_t)200)); + HANDLE_CODE(pack_unalign_integer(bref, b_r12, (uint8_t)1, (uint8_t)10)); + HANDLE_CODE(pack_enum(bref, c_r12)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_hop_cfg_disc_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(a_r12, bref, (uint8_t)1, (uint8_t)200)); + HANDLE_CODE(unpack_unalign_integer(b_r12, bref, (uint8_t)1, (uint8_t)10)); + HANDLE_CODE(unpack_enum(c_r12, bref)); + + return SRSASN_SUCCESS; +} +void sl_hop_cfg_disc_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("a-r12", a_r12); + j.write_int("b-r12", b_r12); + j.write_str("c-r12", c_r12.to_string()); + j.end_obj(); +} + +// SecurityAlgorithmConfig ::= SEQUENCE +SRSASN_CODE security_algorithm_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, ciphering_algorithm)); + HANDLE_CODE(pack_enum(bref, integrity_prot_algorithm)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_algorithm_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(ciphering_algorithm, bref)); + HANDLE_CODE(unpack_enum(integrity_prot_algorithm, 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()); + j.write_str("integrityProtAlgorithm", integrity_prot_algorithm.to_string()); + j.end_obj(); +} + +// DRB-ToAddModSCG-r12 ::= SEQUENCE +drb_to_add_mod_scg_r12_s::drb_to_add_mod_scg_r12_s() +{ + ext = false; + drb_type_r12_present = false; + rlc_cfg_scg_r12_present = false; + rlc_cfg_v1250_present = false; + lc_ch_id_scg_r12_present = false; + lc_ch_cfg_scg_r12_present = false; + rlc_cfg_v1430_present = false; + lc_ch_id_scg_r15_present = false; + rlc_cfg_v1530_present = false; + rlc_bearer_cfg_dupl_r15_present = false; +} +SRSASN_CODE drb_to_add_mod_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(drb_type_r12_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_v1250_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_id_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_cfg_scg_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, drb_id_r12, (uint8_t)1, (uint8_t)32)); + if (drb_type_r12_present) { + HANDLE_CODE(drb_type_r12.pack(bref)); + } + if (rlc_cfg_scg_r12_present) { + HANDLE_CODE(rlc_cfg_scg_r12.pack(bref)); + } + if (rlc_cfg_v1250_present) { + HANDLE_CODE(rlc_cfg_v1250.pack(bref)); + } + if (lc_ch_id_scg_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, lc_ch_id_scg_r12, (uint8_t)3, (uint8_t)10)); + } + if (lc_ch_cfg_scg_r12_present) { + HANDLE_CODE(lc_ch_cfg_scg_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(rlc_cfg_v1430_present != (rlc_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= rlc_cfg_v1430_present; + group_flags[1] |= lc_ch_id_scg_r15_present; + rrc_asn1_warn_assert(rlc_cfg_v1530_present != (rlc_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= rlc_cfg_v1530_present; + rrc_asn1_warn_assert(rlc_bearer_cfg_dupl_r15_present != (rlc_bearer_cfg_dupl_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= rlc_bearer_cfg_dupl_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rlc_cfg_v1430_present, 1)); + if (rlc_cfg_v1430_present) { + HANDLE_CODE(rlc_cfg_v1430->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(lc_ch_id_scg_r15_present, 1)); + HANDLE_CODE(bref.pack(rlc_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(rlc_bearer_cfg_dupl_r15_present, 1)); + if (lc_ch_id_scg_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, lc_ch_id_scg_r15, (uint8_t)32, (uint8_t)38)); + } + if (rlc_cfg_v1530_present) { + HANDLE_CODE(rlc_cfg_v1530->pack(bref)); + } + if (rlc_bearer_cfg_dupl_r15_present) { + HANDLE_CODE(rlc_bearer_cfg_dupl_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_to_add_mod_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(drb_type_r12_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_v1250_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_id_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_cfg_scg_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(drb_id_r12, bref, (uint8_t)1, (uint8_t)32)); + if (drb_type_r12_present) { + HANDLE_CODE(drb_type_r12.unpack(bref)); + } + if (rlc_cfg_scg_r12_present) { + HANDLE_CODE(rlc_cfg_scg_r12.unpack(bref)); + } + if (rlc_cfg_v1250_present) { + HANDLE_CODE(rlc_cfg_v1250.unpack(bref)); + } + if (lc_ch_id_scg_r12_present) { + HANDLE_CODE(unpack_unalign_integer(lc_ch_id_scg_r12, bref, (uint8_t)3, (uint8_t)10)); + } + if (lc_ch_cfg_scg_r12_present) { + HANDLE_CODE(lc_ch_cfg_scg_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rlc_cfg_v1430_present, 1)); + if (rlc_cfg_v1430_present) { + rlc_cfg_v1430 = make_copy_ptr(rlc_cfg_v1430_c()); + HANDLE_CODE(rlc_cfg_v1430->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(lc_ch_id_scg_r15_present, 1)); + HANDLE_CODE(bref.unpack(rlc_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(rlc_bearer_cfg_dupl_r15_present, 1)); + if (lc_ch_id_scg_r15_present) { + HANDLE_CODE(unpack_unalign_integer(lc_ch_id_scg_r15, bref, (uint8_t)32, (uint8_t)38)); + } + if (rlc_cfg_v1530_present) { + rlc_cfg_v1530 = make_copy_ptr(rlc_cfg_v1530_c()); + HANDLE_CODE(rlc_cfg_v1530->unpack(bref)); + } + if (rlc_bearer_cfg_dupl_r15_present) { + rlc_bearer_cfg_dupl_r15 = make_copy_ptr(rlc_bearer_cfg_r15_c()); + HANDLE_CODE(rlc_bearer_cfg_dupl_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void drb_to_add_mod_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("drb-Identity-r12", drb_id_r12); + if (drb_type_r12_present) { + j.write_fieldname("drb-Type-r12"); + drb_type_r12.to_json(j); + } + if (rlc_cfg_scg_r12_present) { + j.write_fieldname("rlc-ConfigSCG-r12"); + rlc_cfg_scg_r12.to_json(j); + } + if (rlc_cfg_v1250_present) { + j.write_fieldname("rlc-Config-v1250"); + rlc_cfg_v1250.to_json(j); + } + if (lc_ch_id_scg_r12_present) { + j.write_int("logicalChannelIdentitySCG-r12", lc_ch_id_scg_r12); + } + if (lc_ch_cfg_scg_r12_present) { + j.write_fieldname("logicalChannelConfigSCG-r12"); + lc_ch_cfg_scg_r12.to_json(j); + } + if (rlc_cfg_v1430_present) { + j.write_fieldname("rlc-Config-v1430"); + rlc_cfg_v1430->to_json(j); + } + if (lc_ch_id_scg_r15_present) { + j.write_int("logicalChannelIdentitySCG-r15", lc_ch_id_scg_r15); + } + if (rlc_cfg_v1530_present) { + j.write_fieldname("rlc-Config-v1530"); + rlc_cfg_v1530->to_json(j); + } + if (rlc_bearer_cfg_dupl_r15_present) { + j.write_fieldname("rlc-BearerConfigDupl-r15"); + rlc_bearer_cfg_dupl_r15->to_json(j); + } + j.end_obj(); +} + +void drb_to_add_mod_scg_r12_s::drb_type_r12_c_::set(types::options e) +{ + type_ = e; +} +void drb_to_add_mod_scg_r12_s::drb_type_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::split_r12: + break; + case types::scg_r12: + j.write_fieldname("scg-r12"); + j.start_obj(); + if (c.eps_bearer_id_r12_present) { + j.write_int("eps-BearerIdentity-r12", c.eps_bearer_id_r12); + } + if (c.pdcp_cfg_r12_present) { + j.write_fieldname("pdcp-Config-r12"); + c.pdcp_cfg_r12.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE drb_to_add_mod_scg_r12_s::drb_type_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::split_r12: + break; + case types::scg_r12: + HANDLE_CODE(bref.pack(c.eps_bearer_id_r12_present, 1)); + HANDLE_CODE(bref.pack(c.pdcp_cfg_r12_present, 1)); + if (c.eps_bearer_id_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.eps_bearer_id_r12, (uint8_t)0, (uint8_t)15)); + } + if (c.pdcp_cfg_r12_present) { + HANDLE_CODE(c.pdcp_cfg_r12.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_to_add_mod_scg_r12_s::drb_type_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::split_r12: + break; + case types::scg_r12: + HANDLE_CODE(bref.unpack(c.eps_bearer_id_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.pdcp_cfg_r12_present, 1)); + if (c.eps_bearer_id_r12_present) { + HANDLE_CODE(unpack_unalign_integer(c.eps_bearer_id_r12, bref, (uint8_t)0, (uint8_t)15)); + } + if (c.pdcp_cfg_r12_present) { + HANDLE_CODE(c.pdcp_cfg_r12.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +drb_to_add_mod_scg_r12_s::drb_type_r12_c_::scg_r12_s_::scg_r12_s_() +{ + eps_bearer_id_r12_present = false; + pdcp_cfg_r12_present = false; +} + +// IKE-Identity-r13 ::= SEQUENCE +SRSASN_CODE ike_id_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(id_i_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ike_id_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(id_i_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ike_id_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("idI-r13", id_i_r13.to_string()); + j.end_obj(); +} + +// IP-Address-r13 ::= CHOICE +void ip_address_r13_c::destroy_() +{ + switch (type_) { + case types::ipv4_r13: + c.destroy >(); + break; + case types::ipv6_r13: + c.destroy >(); + break; + default: + break; + } +} +void ip_address_r13_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ipv4_r13: + c.init >(); + break; + case types::ipv6_r13: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ip_address_r13_c"); + } +} +ip_address_r13_c::ip_address_r13_c(const ip_address_r13_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::ipv4_r13: + c.init(other.c.get >()); + break; + case types::ipv6_r13: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ip_address_r13_c"); + } +} +ip_address_r13_c& ip_address_r13_c::operator=(const ip_address_r13_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ipv4_r13: + c.set(other.c.get >()); + break; + case types::ipv6_r13: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ip_address_r13_c"); + } + + return *this; +} +void ip_address_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ipv4_r13: + j.write_str("ipv4-r13", c.get >().to_string()); + break; + case types::ipv6_r13: + j.write_str("ipv6-r13", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "ip_address_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE ip_address_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ipv4_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::ipv6_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ip_address_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ip_address_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ipv4_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::ipv6_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ip_address_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PhysicalConfigDedicated-v1370 ::= SEQUENCE +phys_cfg_ded_v1370_s::phys_cfg_ded_v1370_s() +{ + pucch_cfg_ded_v1370_present = false; +} +SRSASN_CODE phys_cfg_ded_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pucch_cfg_ded_v1370_present, 1)); + + if (pucch_cfg_ded_v1370_present) { + HANDLE_CODE(pucch_cfg_ded_v1370.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phys_cfg_ded_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pucch_cfg_ded_v1370_present, 1)); + + if (pucch_cfg_ded_v1370_present) { + HANDLE_CODE(pucch_cfg_ded_v1370.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void phys_cfg_ded_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_cfg_ded_v1370_present) { + j.write_fieldname("pucch-ConfigDedicated-v1370"); + pucch_cfg_ded_v1370.to_json(j); + } + j.end_obj(); +} + +// RAN-AreaConfig-r15 ::= SEQUENCE +ran_area_cfg_r15_s::ran_area_cfg_r15_s() +{ + ran_area_code_list_r15_present = false; +} +SRSASN_CODE ran_area_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ran_area_code_list_r15_present, 1)); + + HANDLE_CODE(tac_minus5_gc_r15.pack(bref)); + if (ran_area_code_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_code_list_r15, 1, 32, UnalignedIntegerPacker(0, 255))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ran_area_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ran_area_code_list_r15_present, 1)); + + HANDLE_CODE(tac_minus5_gc_r15.unpack(bref)); + if (ran_area_code_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(ran_area_code_list_r15, bref, 1, 32, UnalignedIntegerPacker(0, 255))); + } + + return SRSASN_SUCCESS; +} +void ran_area_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("trackingAreaCode-5GC-r15", tac_minus5_gc_r15.to_string()); + if (ran_area_code_list_r15_present) { + j.start_array("ran-AreaCodeList-r15"); + for (uint32_t i1 = 0; i1 < ran_area_code_list_r15.size(); ++i1) { + j.write_int(ran_area_code_list_r15[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// RadioResourceConfigCommonSCell-v10l0 ::= SEQUENCE +SRSASN_CODE rr_cfg_common_scell_v10l0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_v10l0.add_spec_emission_scell_v10l0, (uint16_t)33, (uint16_t)288)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_scell_v10l0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ul_cfg_v10l0.add_spec_emission_scell_v10l0, bref, (uint16_t)33, (uint16_t)288)); + + return SRSASN_SUCCESS; +} +void rr_cfg_common_scell_v10l0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ul-Configuration-v10l0"); + j.start_obj(); + j.write_int("additionalSpectrumEmissionSCell-v10l0", ul_cfg_v10l0.add_spec_emission_scell_v10l0); + j.end_obj(); + j.end_obj(); +} + +// RadioResourceConfigCommonSCell-v1440 ::= SEQUENCE +SRSASN_CODE rr_cfg_common_scell_v1440_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_v1440.ul_freq_info_v1440.add_spec_emission_scell_v1440, (uint16_t)33, + (uint16_t)288)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_scell_v1440_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ul_cfg_v1440.ul_freq_info_v1440.add_spec_emission_scell_v1440, bref, (uint16_t)33, + (uint16_t)288)); + + return SRSASN_SUCCESS; +} +void rr_cfg_common_scell_v1440_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ul-Configuration-v1440"); + j.start_obj(); + j.write_fieldname("ul-FreqInfo-v1440"); + j.start_obj(); + j.write_int("additionalSpectrumEmissionSCell-v1440", ul_cfg_v1440.ul_freq_info_v1440.add_spec_emission_scell_v1440); + j.end_obj(); + j.end_obj(); + j.end_obj(); +} + +// SL-DiscTxConfigScheduled-r13 ::= SEQUENCE +sl_disc_tx_cfg_sched_r13_s::sl_disc_tx_cfg_sched_r13_s() +{ + ext = false; + disc_tx_cfg_r13_present = false; + disc_tf_idx_list_r13_present = false; + disc_hop_cfg_r13_present = false; +} +SRSASN_CODE sl_disc_tx_cfg_sched_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(disc_tx_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tf_idx_list_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_hop_cfg_r13_present, 1)); + + if (disc_tx_cfg_r13_present) { + HANDLE_CODE(disc_tx_cfg_r13.pack(bref)); + } + if (disc_tf_idx_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_tf_idx_list_r13, 1, 64)); + } + if (disc_hop_cfg_r13_present) { + HANDLE_CODE(disc_hop_cfg_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_cfg_sched_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(disc_tx_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tf_idx_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_hop_cfg_r13_present, 1)); + + if (disc_tx_cfg_r13_present) { + HANDLE_CODE(disc_tx_cfg_r13.unpack(bref)); + } + if (disc_tf_idx_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_tf_idx_list_r13, bref, 1, 64)); + } + if (disc_hop_cfg_r13_present) { + HANDLE_CODE(disc_hop_cfg_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_disc_tx_cfg_sched_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_tx_cfg_r13_present) { + j.write_fieldname("discTxConfig-r13"); + disc_tx_cfg_r13.to_json(j); + } + if (disc_tf_idx_list_r13_present) { + j.start_array("discTF-IndexList-r13"); + for (uint32_t i1 = 0; i1 < disc_tf_idx_list_r13.size(); ++i1) { + disc_tf_idx_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_hop_cfg_r13_present) { + j.write_fieldname("discHoppingConfig-r13"); + disc_hop_cfg_r13.to_json(j); + } + j.end_obj(); +} + +// SL-DiscTxPoolDedicated-r13 ::= SEQUENCE +sl_disc_tx_pool_ded_r13_s::sl_disc_tx_pool_ded_r13_s() +{ + pool_to_release_list_r13_present = false; + pool_to_add_mod_list_r13_present = false; +} +SRSASN_CODE sl_disc_tx_pool_ded_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pool_to_release_list_r13_present, 1)); + HANDLE_CODE(bref.pack(pool_to_add_mod_list_r13_present, 1)); + + if (pool_to_release_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pool_to_release_list_r13, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (pool_to_add_mod_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pool_to_add_mod_list_r13, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_pool_ded_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pool_to_release_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(pool_to_add_mod_list_r13_present, 1)); + + if (pool_to_release_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(pool_to_release_list_r13, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (pool_to_add_mod_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(pool_to_add_mod_list_r13, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void sl_disc_tx_pool_ded_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pool_to_release_list_r13_present) { + j.start_array("poolToReleaseList-r13"); + for (uint32_t i1 = 0; i1 < pool_to_release_list_r13.size(); ++i1) { + j.write_int(pool_to_release_list_r13[i1]); + } + j.end_array(); + } + if (pool_to_add_mod_list_r13_present) { + j.start_array("poolToAddModList-r13"); + for (uint32_t i1 = 0; i1 < pool_to_add_mod_list_r13.size(); ++i1) { + pool_to_add_mod_list_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-TxPoolToAddMod-r14 ::= SEQUENCE +SRSASN_CODE sl_tx_pool_to_add_mod_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pool_id_r14, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pool_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_pool_to_add_mod_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pool_id_r14, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pool_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_tx_pool_to_add_mod_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("poolIdentity-r14", pool_id_r14); + j.write_fieldname("pool-r14"); + pool_r14.to_json(j); + j.end_obj(); +} + +// SecurityConfigHO-v1530 ::= SEQUENCE +security_cfg_ho_v1530_s::security_cfg_ho_v1530_s() +{ + ext = false; +} +SRSASN_CODE security_cfg_ho_v1530_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(ho_type_v1530.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_cfg_ho_v1530_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(ho_type_v1530.unpack(bref)); + + return SRSASN_SUCCESS; +} +void security_cfg_ho_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("handoverType-v1530"); + ho_type_v1530.to_json(j); + j.end_obj(); +} + +void security_cfg_ho_v1530_s::ho_type_v1530_c_::destroy_() +{ + switch (type_) { + case types::intra5_gc_r15: + c.destroy(); + break; + case types::ngc_to_epc_r15: + c.destroy(); + break; + case types::epc_to_ngc_r15: + c.destroy(); + break; + default: + break; + } +} +void security_cfg_ho_v1530_s::ho_type_v1530_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::intra5_gc_r15: + c.init(); + break; + case types::ngc_to_epc_r15: + c.init(); + break; + case types::epc_to_ngc_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_v1530_s::ho_type_v1530_c_"); + } +} +security_cfg_ho_v1530_s::ho_type_v1530_c_::ho_type_v1530_c_(const security_cfg_ho_v1530_s::ho_type_v1530_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::intra5_gc_r15: + c.init(other.c.get()); + break; + case types::ngc_to_epc_r15: + c.init(other.c.get()); + break; + case types::epc_to_ngc_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_v1530_s::ho_type_v1530_c_"); + } +} +security_cfg_ho_v1530_s::ho_type_v1530_c_& security_cfg_ho_v1530_s::ho_type_v1530_c_:: + operator=(const security_cfg_ho_v1530_s::ho_type_v1530_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::intra5_gc_r15: + c.set(other.c.get()); + break; + case types::ngc_to_epc_r15: + c.set(other.c.get()); + break; + case types::epc_to_ngc_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_v1530_s::ho_type_v1530_c_"); + } + + return *this; +} +void security_cfg_ho_v1530_s::ho_type_v1530_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::intra5_gc_r15: + j.write_fieldname("intra5GC-r15"); + j.start_obj(); + if (c.get().security_algorithm_cfg_r15_present) { + j.write_fieldname("securityAlgorithmConfig-r15"); + c.get().security_algorithm_cfg_r15.to_json(j); + } + j.write_bool("keyChangeIndicator-r15", c.get().key_change_ind_r15); + j.write_int("nextHopChainingCount-r15", c.get().next_hop_chaining_count_r15); + if (c.get().nas_container_r15_present) { + j.write_str("nas-Container-r15", c.get().nas_container_r15.to_string()); + } + j.end_obj(); + break; + case types::ngc_to_epc_r15: + j.write_fieldname("ngc-ToEPC-r15"); + j.start_obj(); + j.write_fieldname("securityAlgorithmConfig-r15"); + c.get().security_algorithm_cfg_r15.to_json(j); + j.write_int("nextHopChainingCount-r15", c.get().next_hop_chaining_count_r15); + j.end_obj(); + break; + case types::epc_to_ngc_r15: + j.write_fieldname("epc-ToNGC-r15"); + j.start_obj(); + j.write_fieldname("securityAlgorithmConfig-r15"); + c.get().security_algorithm_cfg_r15.to_json(j); + j.write_str("nas-Container-r15", c.get().nas_container_r15.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_v1530_s::ho_type_v1530_c_"); + } + j.end_obj(); +} +SRSASN_CODE security_cfg_ho_v1530_s::ho_type_v1530_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::intra5_gc_r15: + HANDLE_CODE(bref.pack(c.get().security_algorithm_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.get().nas_container_r15_present, 1)); + if (c.get().security_algorithm_cfg_r15_present) { + HANDLE_CODE(c.get().security_algorithm_cfg_r15.pack(bref)); + } + HANDLE_CODE(bref.pack(c.get().key_change_ind_r15, 1)); + HANDLE_CODE( + pack_unalign_integer(bref, c.get().next_hop_chaining_count_r15, (uint8_t)0, (uint8_t)7)); + if (c.get().nas_container_r15_present) { + HANDLE_CODE(c.get().nas_container_r15.pack(bref)); + } + break; + case types::ngc_to_epc_r15: + HANDLE_CODE(c.get().security_algorithm_cfg_r15.pack(bref)); + HANDLE_CODE( + pack_unalign_integer(bref, c.get().next_hop_chaining_count_r15, (uint8_t)0, (uint8_t)7)); + break; + case types::epc_to_ngc_r15: + HANDLE_CODE(c.get().security_algorithm_cfg_r15.pack(bref)); + HANDLE_CODE(c.get().nas_container_r15.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_v1530_s::ho_type_v1530_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_cfg_ho_v1530_s::ho_type_v1530_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::intra5_gc_r15: + HANDLE_CODE(bref.unpack(c.get().security_algorithm_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.get().nas_container_r15_present, 1)); + if (c.get().security_algorithm_cfg_r15_present) { + HANDLE_CODE(c.get().security_algorithm_cfg_r15.unpack(bref)); + } + HANDLE_CODE(bref.unpack(c.get().key_change_ind_r15, 1)); + HANDLE_CODE( + unpack_unalign_integer(c.get().next_hop_chaining_count_r15, bref, (uint8_t)0, (uint8_t)7)); + if (c.get().nas_container_r15_present) { + HANDLE_CODE(c.get().nas_container_r15.unpack(bref)); + } + break; + case types::ngc_to_epc_r15: + HANDLE_CODE(c.get().security_algorithm_cfg_r15.unpack(bref)); + HANDLE_CODE( + unpack_unalign_integer(c.get().next_hop_chaining_count_r15, bref, (uint8_t)0, (uint8_t)7)); + break; + case types::epc_to_ngc_r15: + HANDLE_CODE(c.get().security_algorithm_cfg_r15.unpack(bref)); + HANDLE_CODE(c.get().nas_container_r15.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_v1530_s::ho_type_v1530_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +security_cfg_ho_v1530_s::ho_type_v1530_c_::intra5_gc_r15_s_::intra5_gc_r15_s_() +{ + security_algorithm_cfg_r15_present = false; + nas_container_r15_present = false; +} + +// UplinkPowerControlCommon-v1310 ::= SEQUENCE +ul_pwr_ctrl_common_v1310_s::ul_pwr_ctrl_common_v1310_s() +{ + delta_f_pucch_format4_r13_present = false; + delta_f_pucch_format5_minus13_present = false; +} +SRSASN_CODE ul_pwr_ctrl_common_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delta_f_pucch_format4_r13_present, 1)); + HANDLE_CODE(bref.pack(delta_f_pucch_format5_minus13_present, 1)); + + if (delta_f_pucch_format4_r13_present) { + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format4_r13)); + } + if (delta_f_pucch_format5_minus13_present) { + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format5_minus13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delta_f_pucch_format4_r13_present, 1)); + HANDLE_CODE(bref.unpack(delta_f_pucch_format5_minus13_present, 1)); + + if (delta_f_pucch_format4_r13_present) { + HANDLE_CODE(unpack_enum(delta_f_pucch_format4_r13, bref)); + } + if (delta_f_pucch_format5_minus13_present) { + HANDLE_CODE(unpack_enum(delta_f_pucch_format5_minus13, bref)); + } + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (delta_f_pucch_format4_r13_present) { + j.write_str("deltaF-PUCCH-Format4-r13", delta_f_pucch_format4_r13.to_string()); + } + if (delta_f_pucch_format5_minus13_present) { + j.write_str("deltaF-PUCCH-Format5-13", delta_f_pucch_format5_minus13.to_string()); + } + j.end_obj(); +} + +// UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE +SRSASN_CODE ul_pwr_ctrl_common_ps_cell_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format3_r12)); + HANDLE_CODE(pack_enum(bref, delta_f_pucch_format1b_cs_r12)); + HANDLE_CODE(pack_unalign_integer(bref, p0_nominal_pucch_r12, (int8_t)-127, (int8_t)-96)); + HANDLE_CODE(delta_flist_pucch_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pwr_ctrl_common_ps_cell_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(delta_f_pucch_format3_r12, bref)); + HANDLE_CODE(unpack_enum(delta_f_pucch_format1b_cs_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(p0_nominal_pucch_r12, bref, (int8_t)-127, (int8_t)-96)); + HANDLE_CODE(delta_flist_pucch_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_pwr_ctrl_common_ps_cell_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("deltaF-PUCCH-Format3-r12", delta_f_pucch_format3_r12.to_string()); + j.write_str("deltaF-PUCCH-Format1bCS-r12", delta_f_pucch_format1b_cs_r12.to_string()); + j.write_int("p0-NominalPUCCH-r12", p0_nominal_pucch_r12); + j.write_fieldname("deltaFList-PUCCH-r12"); + delta_flist_pucch_r12.to_json(j); + j.end_obj(); +} + +// WLAN-SuspendConfig-r14 ::= SEQUENCE +wlan_suspend_cfg_r14_s::wlan_suspend_cfg_r14_s() +{ + wlan_suspend_resume_allowed_r14_present = false; + wlan_suspend_triggers_status_report_r14_present = false; +} +SRSASN_CODE wlan_suspend_cfg_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(wlan_suspend_resume_allowed_r14_present, 1)); + HANDLE_CODE(bref.pack(wlan_suspend_triggers_status_report_r14_present, 1)); + + if (wlan_suspend_resume_allowed_r14_present) { + HANDLE_CODE(bref.pack(wlan_suspend_resume_allowed_r14, 1)); + } + if (wlan_suspend_triggers_status_report_r14_present) { + HANDLE_CODE(bref.pack(wlan_suspend_triggers_status_report_r14, 1)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_suspend_cfg_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(wlan_suspend_resume_allowed_r14_present, 1)); + HANDLE_CODE(bref.unpack(wlan_suspend_triggers_status_report_r14_present, 1)); + + if (wlan_suspend_resume_allowed_r14_present) { + HANDLE_CODE(bref.unpack(wlan_suspend_resume_allowed_r14, 1)); + } + if (wlan_suspend_triggers_status_report_r14_present) { + HANDLE_CODE(bref.unpack(wlan_suspend_triggers_status_report_r14, 1)); + } + + return SRSASN_SUCCESS; +} +void wlan_suspend_cfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_suspend_resume_allowed_r14_present) { + j.write_bool("wlan-SuspendResumeAllowed-r14", wlan_suspend_resume_allowed_r14); + } + if (wlan_suspend_triggers_status_report_r14_present) { + j.write_bool("wlan-SuspendTriggersStatusReport-r14", wlan_suspend_triggers_status_report_r14); + } + j.end_obj(); +} + +// MAC-MainConfigSL-r12 ::= SEQUENCE +mac_main_cfg_sl_r12_s::mac_main_cfg_sl_r12_s() +{ + periodic_bsr_timer_sl_present = false; +} +SRSASN_CODE mac_main_cfg_sl_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(periodic_bsr_timer_sl_present, 1)); + + if (periodic_bsr_timer_sl_present) { + HANDLE_CODE(pack_enum(bref, periodic_bsr_timer_sl)); + } + HANDLE_CODE(pack_enum(bref, retx_bsr_timer_sl)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_main_cfg_sl_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(periodic_bsr_timer_sl_present, 1)); + + if (periodic_bsr_timer_sl_present) { + HANDLE_CODE(unpack_enum(periodic_bsr_timer_sl, bref)); + } + HANDLE_CODE(unpack_enum(retx_bsr_timer_sl, bref)); + + return SRSASN_SUCCESS; +} +void mac_main_cfg_sl_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (periodic_bsr_timer_sl_present) { + j.write_str("periodic-BSR-TimerSL", periodic_bsr_timer_sl.to_string()); + } + j.write_str("retx-BSR-TimerSL", retx_bsr_timer_sl.to_string()); + j.end_obj(); +} + +// PLMN-RAN-AreaCell-r15 ::= SEQUENCE +plmn_ran_area_cell_r15_s::plmn_ran_area_cell_r15_s() +{ + plmn_id_r15_present = false; +} +SRSASN_CODE plmn_ran_area_cell_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_r15_present, 1)); + + if (plmn_id_r15_present) { + HANDLE_CODE(plmn_id_r15.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_cells_r15, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_ran_area_cell_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_r15_present, 1)); + + if (plmn_id_r15_present) { + HANDLE_CODE(plmn_id_r15.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(ran_area_cells_r15, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void plmn_ran_area_cell_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_r15_present) { + j.write_fieldname("plmn-Identity-r15"); + plmn_id_r15.to_json(j); + } + j.start_array("ran-AreaCells-r15"); + for (uint32_t i1 = 0; i1 < ran_area_cells_r15.size(); ++i1) { + j.write_str(ran_area_cells_r15[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// PLMN-RAN-AreaConfig-r15 ::= SEQUENCE +plmn_ran_area_cfg_r15_s::plmn_ran_area_cfg_r15_s() +{ + plmn_id_r15_present = false; +} +SRSASN_CODE plmn_ran_area_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_r15_present, 1)); + + if (plmn_id_r15_present) { + HANDLE_CODE(plmn_id_r15.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_r15, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_ran_area_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_r15_present, 1)); + + if (plmn_id_r15_present) { + HANDLE_CODE(plmn_id_r15.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(ran_area_r15, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void plmn_ran_area_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_r15_present) { + j.write_fieldname("plmn-Identity-r15"); + plmn_id_r15.to_json(j); + } + j.start_array("ran-Area-r15"); + for (uint32_t i1 = 0; i1 < ran_area_r15.size(); ++i1) { + ran_area_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RACH-ConfigDedicated ::= SEQUENCE +SRSASN_CODE rach_cfg_ded_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ra_preamb_idx, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(pack_unalign_integer(bref, ra_prach_mask_idx, (uint8_t)0, (uint8_t)15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_ded_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ra_preamb_idx, bref, (uint8_t)0, (uint8_t)63)); + HANDLE_CODE(unpack_unalign_integer(ra_prach_mask_idx, bref, (uint8_t)0, (uint8_t)15)); + + return SRSASN_SUCCESS; +} +void rach_cfg_ded_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ra-PreambleIndex", ra_preamb_idx); + j.write_int("ra-PRACH-MaskIndex", ra_prach_mask_idx); + j.end_obj(); +} + +// RACH-Skip-r14 ::= SEQUENCE +rach_skip_r14_s::rach_skip_r14_s() +{ + ul_cfg_info_r14_present = false; +} +SRSASN_CODE rach_skip_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_cfg_info_r14_present, 1)); + + HANDLE_CODE(target_ta_r14.pack(bref)); + if (ul_cfg_info_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_info_r14.nof_conf_ul_processes_r14, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_enum(bref, ul_cfg_info_r14.ul_sched_interv_r14)); + HANDLE_CODE(pack_unalign_integer(bref, ul_cfg_info_r14.ul_start_sf_r14, (uint8_t)0, (uint8_t)9)); + HANDLE_CODE(ul_cfg_info_r14.ul_grant_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_skip_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_cfg_info_r14_present, 1)); + + HANDLE_CODE(target_ta_r14.unpack(bref)); + if (ul_cfg_info_r14_present) { + HANDLE_CODE(unpack_unalign_integer(ul_cfg_info_r14.nof_conf_ul_processes_r14, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_enum(ul_cfg_info_r14.ul_sched_interv_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(ul_cfg_info_r14.ul_start_sf_r14, bref, (uint8_t)0, (uint8_t)9)); + HANDLE_CODE(ul_cfg_info_r14.ul_grant_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rach_skip_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("targetTA-r14"); + target_ta_r14.to_json(j); + if (ul_cfg_info_r14_present) { + j.write_fieldname("ul-ConfigInfo-r14"); + j.start_obj(); + j.write_int("numberOfConfUL-Processes-r14", ul_cfg_info_r14.nof_conf_ul_processes_r14); + j.write_str("ul-SchedInterval-r14", ul_cfg_info_r14.ul_sched_interv_r14.to_string()); + j.write_int("ul-StartSubframe-r14", ul_cfg_info_r14.ul_start_sf_r14); + j.write_str("ul-Grant-r14", ul_cfg_info_r14.ul_grant_r14.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +void rach_skip_r14_s::target_ta_r14_c_::destroy_() {} +void rach_skip_r14_s::target_ta_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_skip_r14_s::target_ta_r14_c_::target_ta_r14_c_(const rach_skip_r14_s::target_ta_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + c.init(other.c.get()); + break; + case types::scg_stag_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + } +} +rach_skip_r14_s::target_ta_r14_c_& rach_skip_r14_s::target_ta_r14_c_:: + operator=(const rach_skip_r14_s::target_ta_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + c.set(other.c.get()); + break; + case types::scg_stag_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + } + + return *this; +} +void rach_skip_r14_s::target_ta_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + j.write_int("mcg-STAG-r14", c.get()); + break; + case types::scg_stag_r14: + j.write_int("scg-STAG-r14", c.get()); + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE rach_skip_r14_s::target_ta_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)3)); + break; + case types::scg_stag_r14: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)3)); + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_skip_r14_s::target_ta_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ta0_r14: + break; + case types::mcg_ptag_r14: + break; + case types::scg_ptag_r14: + break; + case types::mcg_stag_r14: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)3)); + break; + case types::scg_stag_r14: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)3)); + break; + default: + log_invalid_choice_id(type_, "rach_skip_r14_s::target_ta_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RLF-TimersAndConstantsSCG-r12 ::= CHOICE +void rlf_timers_and_consts_scg_r12_c::set(types::options e) +{ + type_ = e; +} +void rlf_timers_and_consts_scg_r12_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("t313-r12", c.t313_r12.to_string()); + j.write_str("n313-r12", c.n313_r12.to_string()); + j.write_str("n314-r12", c.n314_r12.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_scg_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE rlf_timers_and_consts_scg_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(pack_enum(bref, c.t313_r12)); + HANDLE_CODE(pack_enum(bref, c.n313_r12)); + HANDLE_CODE(pack_enum(bref, c.n314_r12)); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_scg_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_timers_and_consts_scg_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(unpack_enum(c.t313_r12, bref)); + HANDLE_CODE(unpack_enum(c.n313_r12, bref)); + HANDLE_CODE(unpack_enum(c.n314_r12, bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_timers_and_consts_scg_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rlf_timers_and_consts_scg_r12_c::setup_s_::setup_s_() +{ + ext = false; +} + +// RRCConnectionReconfiguration-v1530-IEs ::= SEQUENCE +rrc_conn_recfg_v1530_ies_s::rrc_conn_recfg_v1530_ies_s() +{ + security_cfg_ho_v1530_present = false; + s_cell_group_to_release_list_r15_present = false; + s_cell_group_to_add_mod_list_r15_present = false; + ded_info_nas_list_r15_present = false; + p_max_ue_fr1_r15_present = false; + smtc_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(security_cfg_ho_v1530_present, 1)); + HANDLE_CODE(bref.pack(s_cell_group_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.pack(s_cell_group_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.pack(ded_info_nas_list_r15_present, 1)); + HANDLE_CODE(bref.pack(p_max_ue_fr1_r15_present, 1)); + HANDLE_CODE(bref.pack(smtc_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (security_cfg_ho_v1530_present) { + HANDLE_CODE(security_cfg_ho_v1530.pack(bref)); + } + if (s_cell_group_to_release_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_group_to_release_list_r15, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (s_cell_group_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_group_to_add_mod_list_r15, 1, 4)); + } + if (ded_info_nas_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ded_info_nas_list_r15, 1, 15)); + } + if (p_max_ue_fr1_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max_ue_fr1_r15, (int8_t)-30, (int8_t)33)); + } + if (smtc_r15_present) { + HANDLE_CODE(smtc_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(security_cfg_ho_v1530_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_group_to_release_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_group_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(ded_info_nas_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(p_max_ue_fr1_r15_present, 1)); + HANDLE_CODE(bref.unpack(smtc_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (security_cfg_ho_v1530_present) { + HANDLE_CODE(security_cfg_ho_v1530.unpack(bref)); + } + if (s_cell_group_to_release_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_group_to_release_list_r15, bref, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (s_cell_group_to_add_mod_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_group_to_add_mod_list_r15, bref, 1, 4)); + } + if (ded_info_nas_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(ded_info_nas_list_r15, bref, 1, 15)); + } + if (p_max_ue_fr1_r15_present) { + HANDLE_CODE(unpack_unalign_integer(p_max_ue_fr1_r15, bref, (int8_t)-30, (int8_t)33)); + } + if (smtc_r15_present) { + HANDLE_CODE(smtc_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (security_cfg_ho_v1530_present) { + j.write_fieldname("securityConfigHO-v1530"); + security_cfg_ho_v1530.to_json(j); + } + if (s_cell_group_to_release_list_r15_present) { + j.start_array("sCellGroupToReleaseList-r15"); + for (uint32_t i1 = 0; i1 < s_cell_group_to_release_list_r15.size(); ++i1) { + j.write_int(s_cell_group_to_release_list_r15[i1]); + } + j.end_array(); + } + if (s_cell_group_to_add_mod_list_r15_present) { + j.start_array("sCellGroupToAddModList-r15"); + for (uint32_t i1 = 0; i1 < s_cell_group_to_add_mod_list_r15.size(); ++i1) { + s_cell_group_to_add_mod_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (ded_info_nas_list_r15_present) { + j.start_array("dedicatedInfoNASList-r15"); + for (uint32_t i1 = 0; i1 < ded_info_nas_list_r15.size(); ++i1) { + j.write_str(ded_info_nas_list_r15[i1].to_string()); + } + j.end_array(); + } + if (p_max_ue_fr1_r15_present) { + j.write_int("p-MaxUE-FR1-r15", p_max_ue_fr1_r15); + } + if (smtc_r15_present) { + j.write_fieldname("smtc-r15"); + smtc_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RadioResourceConfigCommonPSCell-r12 ::= SEQUENCE +rr_cfg_common_ps_cell_r12_s::rr_cfg_common_ps_cell_r12_s() +{ + ext = false; + ul_pwr_ctrl_common_ps_cell_v1310_present = false; + ul_pwr_ctrl_common_ps_cell_v1530_present = false; +} +SRSASN_CODE rr_cfg_common_ps_cell_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(basic_fields_r12.pack(bref)); + HANDLE_CODE(pucch_cfg_common_r12.pack(bref)); + HANDLE_CODE(rach_cfg_common_r12.pack(bref)); + HANDLE_CODE(ul_pwr_ctrl_common_ps_cell_r12.pack(bref)); + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(ul_pwr_ctrl_common_ps_cell_v1310_present != (ul_pwr_ctrl_common_ps_cell_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= ul_pwr_ctrl_common_ps_cell_v1310_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_common_ps_cell_v1530_present != (ul_pwr_ctrl_common_ps_cell_v1530.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= ul_pwr_ctrl_common_ps_cell_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_ps_cell_v1310_present, 1)); + if (ul_pwr_ctrl_common_ps_cell_v1310_present) { + HANDLE_CODE(ul_pwr_ctrl_common_ps_cell_v1310->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_ps_cell_v1530_present, 1)); + if (ul_pwr_ctrl_common_ps_cell_v1530_present) { + HANDLE_CODE(ul_pwr_ctrl_common_ps_cell_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_ps_cell_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(basic_fields_r12.unpack(bref)); + HANDLE_CODE(pucch_cfg_common_r12.unpack(bref)); + HANDLE_CODE(rach_cfg_common_r12.unpack(bref)); + HANDLE_CODE(ul_pwr_ctrl_common_ps_cell_r12.unpack(bref)); + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_ps_cell_v1310_present, 1)); + if (ul_pwr_ctrl_common_ps_cell_v1310_present) { + ul_pwr_ctrl_common_ps_cell_v1310 = make_copy_ptr(ul_pwr_ctrl_common_v1310_s()); + HANDLE_CODE(ul_pwr_ctrl_common_ps_cell_v1310->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_ps_cell_v1530_present, 1)); + if (ul_pwr_ctrl_common_ps_cell_v1530_present) { + ul_pwr_ctrl_common_ps_cell_v1530 = make_copy_ptr(ul_pwr_ctrl_common_v1530_s()); + HANDLE_CODE(ul_pwr_ctrl_common_ps_cell_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_common_ps_cell_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("basicFields-r12"); + basic_fields_r12.to_json(j); + j.write_fieldname("pucch-ConfigCommon-r12"); + pucch_cfg_common_r12.to_json(j); + j.write_fieldname("rach-ConfigCommon-r12"); + rach_cfg_common_r12.to_json(j); + j.write_fieldname("uplinkPowerControlCommonPSCell-r12"); + ul_pwr_ctrl_common_ps_cell_r12.to_json(j); + if (ul_pwr_ctrl_common_ps_cell_v1310_present) { + j.write_fieldname("uplinkPowerControlCommonPSCell-v1310"); + ul_pwr_ctrl_common_ps_cell_v1310->to_json(j); + } + if (ul_pwr_ctrl_common_ps_cell_v1530_present) { + j.write_fieldname("uplinkPowerControlCommonPSCell-v1530"); + ul_pwr_ctrl_common_ps_cell_v1530->to_json(j); + } + j.end_obj(); +} + +// RadioResourceConfigCommonPSCell-v12f0 ::= SEQUENCE +SRSASN_CODE rr_cfg_common_ps_cell_v12f0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(basic_fields_v12f0.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_ps_cell_v12f0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(basic_fields_v12f0.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rr_cfg_common_ps_cell_v12f0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("basicFields-v12f0"); + basic_fields_v12f0.to_json(j); + j.end_obj(); +} + +// RadioResourceConfigCommonPSCell-v1440 ::= SEQUENCE +SRSASN_CODE rr_cfg_common_ps_cell_v1440_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(basic_fields_v1440.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_ps_cell_v1440_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(basic_fields_v1440.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rr_cfg_common_ps_cell_v1440_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("basicFields-v1440"); + basic_fields_v1440.to_json(j); + j.end_obj(); +} + +// RadioResourceConfigDedicatedPSCell-r12 ::= SEQUENCE +rr_cfg_ded_ps_cell_r12_s::rr_cfg_ded_ps_cell_r12_s() +{ + ext = false; + phys_cfg_ded_ps_cell_r12_present = false; + sps_cfg_r12_present = false; + naics_info_r12_present = false; + neigh_cells_crs_info_ps_cell_r13_present = false; + sps_cfg_v1430_present = false; + sps_cfg_v1530_present = false; + crs_intf_mitig_enabled_r15_present = false; + neigh_cells_crs_info_r15_present = false; +} +SRSASN_CODE rr_cfg_ded_ps_cell_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(phys_cfg_ded_ps_cell_r12_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(naics_info_r12_present, 1)); + + if (phys_cfg_ded_ps_cell_r12_present) { + HANDLE_CODE(phys_cfg_ded_ps_cell_r12.pack(bref)); + } + if (sps_cfg_r12_present) { + HANDLE_CODE(sps_cfg_r12.pack(bref)); + } + if (naics_info_r12_present) { + HANDLE_CODE(naics_info_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + rrc_asn1_warn_assert(neigh_cells_crs_info_ps_cell_r13_present != (neigh_cells_crs_info_ps_cell_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= neigh_cells_crs_info_ps_cell_r13_present; + rrc_asn1_warn_assert(sps_cfg_v1430_present != (sps_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= sps_cfg_v1430_present; + rrc_asn1_warn_assert(sps_cfg_v1530_present != (sps_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= sps_cfg_v1530_present; + group_flags[2] |= crs_intf_mitig_enabled_r15_present; + rrc_asn1_warn_assert(neigh_cells_crs_info_r15_present != (neigh_cells_crs_info_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= neigh_cells_crs_info_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(neigh_cells_crs_info_ps_cell_r13_present, 1)); + if (neigh_cells_crs_info_ps_cell_r13_present) { + HANDLE_CODE(neigh_cells_crs_info_ps_cell_r13->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sps_cfg_v1430_present, 1)); + if (sps_cfg_v1430_present) { + HANDLE_CODE(sps_cfg_v1430->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sps_cfg_v1530_present, 1)); + HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_r15_present, 1)); + HANDLE_CODE(bref.pack(neigh_cells_crs_info_r15_present, 1)); + if (sps_cfg_v1530_present) { + HANDLE_CODE(sps_cfg_v1530->pack(bref)); + } + if (crs_intf_mitig_enabled_r15_present) { + HANDLE_CODE(bref.pack(crs_intf_mitig_enabled_r15, 1)); + } + if (neigh_cells_crs_info_r15_present) { + HANDLE_CODE(neigh_cells_crs_info_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_ps_cell_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(phys_cfg_ded_ps_cell_r12_present, 1)); + HANDLE_CODE(bref.unpack(sps_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(naics_info_r12_present, 1)); + + if (phys_cfg_ded_ps_cell_r12_present) { + HANDLE_CODE(phys_cfg_ded_ps_cell_r12.unpack(bref)); + } + if (sps_cfg_r12_present) { + HANDLE_CODE(sps_cfg_r12.unpack(bref)); + } + if (naics_info_r12_present) { + HANDLE_CODE(naics_info_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_ps_cell_r13_present, 1)); + if (neigh_cells_crs_info_ps_cell_r13_present) { + neigh_cells_crs_info_ps_cell_r13 = make_copy_ptr(neigh_cells_crs_info_r13_c()); + HANDLE_CODE(neigh_cells_crs_info_ps_cell_r13->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sps_cfg_v1430_present, 1)); + if (sps_cfg_v1430_present) { + sps_cfg_v1430 = make_copy_ptr(sps_cfg_v1430_s()); + HANDLE_CODE(sps_cfg_v1430->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sps_cfg_v1530_present, 1)); + HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_r15_present, 1)); + HANDLE_CODE(bref.unpack(neigh_cells_crs_info_r15_present, 1)); + if (sps_cfg_v1530_present) { + sps_cfg_v1530 = make_copy_ptr(sps_cfg_v1530_s()); + HANDLE_CODE(sps_cfg_v1530->unpack(bref)); + } + if (crs_intf_mitig_enabled_r15_present) { + HANDLE_CODE(bref.unpack(crs_intf_mitig_enabled_r15, 1)); + } + if (neigh_cells_crs_info_r15_present) { + neigh_cells_crs_info_r15 = make_copy_ptr(neigh_cells_crs_info_r15_c()); + HANDLE_CODE(neigh_cells_crs_info_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_ded_ps_cell_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phys_cfg_ded_ps_cell_r12_present) { + j.write_fieldname("physicalConfigDedicatedPSCell-r12"); + phys_cfg_ded_ps_cell_r12.to_json(j); + } + if (sps_cfg_r12_present) { + j.write_fieldname("sps-Config-r12"); + sps_cfg_r12.to_json(j); + } + if (naics_info_r12_present) { + j.write_fieldname("naics-Info-r12"); + naics_info_r12.to_json(j); + } + if (neigh_cells_crs_info_ps_cell_r13_present) { + j.write_fieldname("neighCellsCRS-InfoPSCell-r13"); + neigh_cells_crs_info_ps_cell_r13->to_json(j); + } + if (sps_cfg_v1430_present) { + j.write_fieldname("sps-Config-v1430"); + sps_cfg_v1430->to_json(j); + } + if (sps_cfg_v1530_present) { + j.write_fieldname("sps-Config-v1530"); + sps_cfg_v1530->to_json(j); + } + if (crs_intf_mitig_enabled_r15_present) { + j.write_bool("crs-IntfMitigEnabled-r15", crs_intf_mitig_enabled_r15); + } + if (neigh_cells_crs_info_r15_present) { + j.write_fieldname("neighCellsCRS-Info-r15"); + neigh_cells_crs_info_r15->to_json(j); + } + j.end_obj(); +} + +// RadioResourceConfigDedicatedPSCell-v1370 ::= SEQUENCE +rr_cfg_ded_ps_cell_v1370_s::rr_cfg_ded_ps_cell_v1370_s() +{ + phys_cfg_ded_ps_cell_v1370_present = false; +} +SRSASN_CODE rr_cfg_ded_ps_cell_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phys_cfg_ded_ps_cell_v1370_present, 1)); + + if (phys_cfg_ded_ps_cell_v1370_present) { + HANDLE_CODE(phys_cfg_ded_ps_cell_v1370.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_ps_cell_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phys_cfg_ded_ps_cell_v1370_present, 1)); + + if (phys_cfg_ded_ps_cell_v1370_present) { + HANDLE_CODE(phys_cfg_ded_ps_cell_v1370.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rr_cfg_ded_ps_cell_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phys_cfg_ded_ps_cell_v1370_present) { + j.write_fieldname("physicalConfigDedicatedPSCell-v1370"); + phys_cfg_ded_ps_cell_v1370.to_json(j); + } + j.end_obj(); +} + +// SCellToAddMod-r10 ::= SEQUENCE +scell_to_add_mod_r10_s::scell_to_add_mod_r10_s() +{ + ext = false; + cell_identif_r10_present = false; + rr_cfg_common_scell_r10_present = false; + rr_cfg_ded_scell_r10_present = false; + dl_carrier_freq_v1090_present = false; + ant_info_ded_scell_v10i0_present = false; + srs_switch_from_serv_cell_idx_r14_present = false; + s_cell_state_r15_present = false; +} +SRSASN_CODE scell_to_add_mod_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_identif_r10_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_common_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_ded_scell_r10_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, s_cell_idx_r10, (uint8_t)1, (uint8_t)7)); + if (cell_identif_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r10.pci_r10, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r10.dl_carrier_freq_r10, (uint16_t)0, (uint16_t)65535)); + } + if (rr_cfg_common_scell_r10_present) { + HANDLE_CODE(rr_cfg_common_scell_r10.pack(bref)); + } + if (rr_cfg_ded_scell_r10_present) { + HANDLE_CODE(rr_cfg_ded_scell_r10.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags[0] |= dl_carrier_freq_v1090_present; + rrc_asn1_warn_assert(ant_info_ded_scell_v10i0_present != (ant_info_ded_scell_v10i0.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= ant_info_ded_scell_v10i0_present; + group_flags[2] |= srs_switch_from_serv_cell_idx_r14_present; + group_flags[3] |= s_cell_state_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(dl_carrier_freq_v1090_present, 1)); + if (dl_carrier_freq_v1090_present) { + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_v1090, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ant_info_ded_scell_v10i0_present, 1)); + if (ant_info_ded_scell_v10i0_present) { + HANDLE_CODE(ant_info_ded_scell_v10i0->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(srs_switch_from_serv_cell_idx_r14_present, 1)); + if (srs_switch_from_serv_cell_idx_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, srs_switch_from_serv_cell_idx_r14, (uint8_t)0, (uint8_t)31)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_state_r15_present, 1)); + if (s_cell_state_r15_present) { + HANDLE_CODE(pack_enum(bref, s_cell_state_r15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_to_add_mod_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_identif_r10_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_common_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_ded_scell_r10_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(s_cell_idx_r10, bref, (uint8_t)1, (uint8_t)7)); + if (cell_identif_r10_present) { + HANDLE_CODE(unpack_unalign_integer(cell_identif_r10.pci_r10, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(cell_identif_r10.dl_carrier_freq_r10, bref, (uint16_t)0, (uint16_t)65535)); + } + if (rr_cfg_common_scell_r10_present) { + HANDLE_CODE(rr_cfg_common_scell_r10.unpack(bref)); + } + if (rr_cfg_ded_scell_r10_present) { + HANDLE_CODE(rr_cfg_ded_scell_r10.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(dl_carrier_freq_v1090_present, 1)); + if (dl_carrier_freq_v1090_present) { + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_v1090, bref, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ant_info_ded_scell_v10i0_present, 1)); + if (ant_info_ded_scell_v10i0_present) { + ant_info_ded_scell_v10i0 = make_copy_ptr(ant_info_ded_v10i0_s()); + HANDLE_CODE(ant_info_ded_scell_v10i0->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(srs_switch_from_serv_cell_idx_r14_present, 1)); + if (srs_switch_from_serv_cell_idx_r14_present) { + HANDLE_CODE(unpack_unalign_integer(srs_switch_from_serv_cell_idx_r14, bref, (uint8_t)0, (uint8_t)31)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_state_r15_present, 1)); + if (s_cell_state_r15_present) { + HANDLE_CODE(unpack_enum(s_cell_state_r15, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void scell_to_add_mod_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sCellIndex-r10", s_cell_idx_r10); + if (cell_identif_r10_present) { + j.write_fieldname("cellIdentification-r10"); + j.start_obj(); + j.write_int("physCellId-r10", cell_identif_r10.pci_r10); + j.write_int("dl-CarrierFreq-r10", cell_identif_r10.dl_carrier_freq_r10); + j.end_obj(); + } + if (rr_cfg_common_scell_r10_present) { + j.write_fieldname("radioResourceConfigCommonSCell-r10"); + rr_cfg_common_scell_r10.to_json(j); + } + if (rr_cfg_ded_scell_r10_present) { + j.write_fieldname("radioResourceConfigDedicatedSCell-r10"); + rr_cfg_ded_scell_r10.to_json(j); + } + if (dl_carrier_freq_v1090_present) { + j.write_int("dl-CarrierFreq-v1090", dl_carrier_freq_v1090); + } + if (ant_info_ded_scell_v10i0_present) { + j.write_fieldname("antennaInfoDedicatedSCell-v10i0"); + ant_info_ded_scell_v10i0->to_json(j); + } + if (srs_switch_from_serv_cell_idx_r14_present) { + j.write_int("srs-SwitchFromServCellIndex-r14", srs_switch_from_serv_cell_idx_r14); + } + if (s_cell_state_r15_present) { + j.write_str("sCellState-r15", s_cell_state_r15.to_string()); + } + j.end_obj(); +} + +// SCellToAddMod-v10l0 ::= SEQUENCE +scell_to_add_mod_v10l0_s::scell_to_add_mod_v10l0_s() +{ + rr_cfg_common_scell_v10l0_present = false; +} +SRSASN_CODE scell_to_add_mod_v10l0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_common_scell_v10l0_present, 1)); + + if (rr_cfg_common_scell_v10l0_present) { + HANDLE_CODE(rr_cfg_common_scell_v10l0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_to_add_mod_v10l0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_common_scell_v10l0_present, 1)); + + if (rr_cfg_common_scell_v10l0_present) { + HANDLE_CODE(rr_cfg_common_scell_v10l0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scell_to_add_mod_v10l0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_common_scell_v10l0_present) { + j.write_fieldname("radioResourceConfigCommonSCell-v10l0"); + rr_cfg_common_scell_v10l0.to_json(j); + } + j.end_obj(); +} + +// SCellToAddModExt-v1370 ::= SEQUENCE +scell_to_add_mod_ext_v1370_s::scell_to_add_mod_ext_v1370_s() +{ + rr_cfg_common_scell_v1370_present = false; +} +SRSASN_CODE scell_to_add_mod_ext_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_common_scell_v1370_present, 1)); + + if (rr_cfg_common_scell_v1370_present) { + HANDLE_CODE(rr_cfg_common_scell_v1370.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_to_add_mod_ext_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_common_scell_v1370_present, 1)); + + if (rr_cfg_common_scell_v1370_present) { + HANDLE_CODE(rr_cfg_common_scell_v1370.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scell_to_add_mod_ext_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_common_scell_v1370_present) { + j.write_fieldname("radioResourceConfigCommonSCell-v1370"); + rr_cfg_common_scell_v1370.to_json(j); + } + j.end_obj(); +} + +// SCellToAddModExt-v1430 ::= SEQUENCE +scell_to_add_mod_ext_v1430_s::scell_to_add_mod_ext_v1430_s() +{ + ext = false; + srs_switch_from_serv_cell_idx_r14_present = false; + s_cell_state_r15_present = false; +} +SRSASN_CODE scell_to_add_mod_ext_v1430_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srs_switch_from_serv_cell_idx_r14_present, 1)); + + if (srs_switch_from_serv_cell_idx_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, srs_switch_from_serv_cell_idx_r14, (uint8_t)0, (uint8_t)31)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= s_cell_state_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_state_r15_present, 1)); + if (s_cell_state_r15_present) { + HANDLE_CODE(pack_enum(bref, s_cell_state_r15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scell_to_add_mod_ext_v1430_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(srs_switch_from_serv_cell_idx_r14_present, 1)); + + if (srs_switch_from_serv_cell_idx_r14_present) { + HANDLE_CODE(unpack_unalign_integer(srs_switch_from_serv_cell_idx_r14, bref, (uint8_t)0, (uint8_t)31)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_state_r15_present, 1)); + if (s_cell_state_r15_present) { + HANDLE_CODE(unpack_enum(s_cell_state_r15, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void scell_to_add_mod_ext_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_switch_from_serv_cell_idx_r14_present) { + j.write_int("srs-SwitchFromServCellIndex-r14", srs_switch_from_serv_cell_idx_r14); + } + if (s_cell_state_r15_present) { + j.write_str("sCellState-r15", s_cell_state_r15.to_string()); + } + j.end_obj(); +} + +// SL-DiscTxRefCarrierDedicated-r13 ::= CHOICE +void sl_disc_tx_ref_carrier_ded_r13_c::set(types::options e) +{ + type_ = e; +} +void sl_disc_tx_ref_carrier_ded_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::p_cell: + break; + case types::s_cell: + j.write_int("sCell", c); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_ref_carrier_ded_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_tx_ref_carrier_ded_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::p_cell: + break; + case types::s_cell: + HANDLE_CODE(pack_unalign_integer(bref, c, (uint8_t)1, (uint8_t)7)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_ref_carrier_ded_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_ref_carrier_ded_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::p_cell: + break; + case types::s_cell: + HANDLE_CODE(unpack_unalign_integer(c, bref, (uint8_t)1, (uint8_t)7)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_ref_carrier_ded_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-DiscTxResource-r13 ::= CHOICE +void sl_disc_tx_res_r13_c::set(types::options e) +{ + type_ = e; +} +void sl_disc_tx_res_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_tx_res_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_res_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_tx_res_r13_c::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_r13: + c.destroy(); + break; + case types::ue_sel_r13: + c.destroy(); + break; + default: + break; + } +} +void sl_disc_tx_res_r13_c::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_r13: + c.init(); + break; + case types::ue_sel_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c::setup_c_"); + } +} +sl_disc_tx_res_r13_c::setup_c_::setup_c_(const sl_disc_tx_res_r13_c::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_r13: + c.init(other.c.get()); + break; + case types::ue_sel_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c::setup_c_"); + } +} +sl_disc_tx_res_r13_c::setup_c_& sl_disc_tx_res_r13_c::setup_c_::operator=(const sl_disc_tx_res_r13_c::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_r13: + c.set(other.c.get()); + break; + case types::ue_sel_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c::setup_c_"); + } + + return *this; +} +void sl_disc_tx_res_r13_c::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_r13: + j.write_fieldname("scheduled-r13"); + c.get().to_json(j); + break; + case types::ue_sel_r13: + j.write_fieldname("ue-Selected-r13"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_tx_res_r13_c::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_sel_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_res_r13_c::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_sel_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_tx_res_r13_c::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-GapPattern-r13 ::= SEQUENCE +sl_gap_pattern_r13_s::sl_gap_pattern_r13_s() +{ + ext = false; +} +SRSASN_CODE sl_gap_pattern_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, gap_period_r13)); + HANDLE_CODE(gap_offset_r12.pack(bref)); + HANDLE_CODE(gap_sf_bitmap_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_gap_pattern_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(gap_period_r13, bref)); + HANDLE_CODE(gap_offset_r12.unpack(bref)); + HANDLE_CODE(gap_sf_bitmap_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_gap_pattern_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("gapPeriod-r13", gap_period_r13.to_string()); + j.write_fieldname("gapOffset-r12"); + gap_offset_r12.to_json(j); + j.write_str("gapSubframeBitmap-r13", gap_sf_bitmap_r13.to_string()); + j.end_obj(); +} + +// TunnelConfigLWIP-r13 ::= SEQUENCE +tunnel_cfg_lwip_r13_s::tunnel_cfg_lwip_r13_s() +{ + ext = false; + lwip_counter_r13_present = false; +} +SRSASN_CODE tunnel_cfg_lwip_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(ip_address_r13.pack(bref)); + HANDLE_CODE(ike_id_r13.pack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= lwip_counter_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(lwip_counter_r13_present, 1)); + if (lwip_counter_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, lwip_counter_r13, (uint16_t)0, (uint16_t)65535)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tunnel_cfg_lwip_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(ip_address_r13.unpack(bref)); + HANDLE_CODE(ike_id_r13.unpack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(lwip_counter_r13_present, 1)); + if (lwip_counter_r13_present) { + HANDLE_CODE(unpack_unalign_integer(lwip_counter_r13, bref, (uint16_t)0, (uint16_t)65535)); + } + } + } + return SRSASN_SUCCESS; +} +void tunnel_cfg_lwip_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ip-Address-r13"); + ip_address_r13.to_json(j); + j.write_fieldname("ike-Identity-r13"); + ike_id_r13.to_json(j); + if (lwip_counter_r13_present) { + j.write_int("lwip-Counter-r13", lwip_counter_r13); + } + j.end_obj(); +} + +// WLAN-MobilityConfig-r13 ::= SEQUENCE +wlan_mob_cfg_r13_s::wlan_mob_cfg_r13_s() +{ + ext = false; + wlan_to_release_list_r13_present = false; + wlan_to_add_list_r13_present = false; + association_timer_r13_present = false; + success_report_requested_r13_present = false; + wlan_suspend_cfg_r14_present = false; +} +SRSASN_CODE wlan_mob_cfg_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(wlan_to_release_list_r13_present, 1)); + HANDLE_CODE(bref.pack(wlan_to_add_list_r13_present, 1)); + HANDLE_CODE(bref.pack(association_timer_r13_present, 1)); + HANDLE_CODE(bref.pack(success_report_requested_r13_present, 1)); + + if (wlan_to_release_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_to_release_list_r13, 1, 32)); + } + if (wlan_to_add_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_to_add_list_r13, 1, 32)); + } + if (association_timer_r13_present) { + HANDLE_CODE(pack_enum(bref, association_timer_r13)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(wlan_suspend_cfg_r14_present != (wlan_suspend_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= wlan_suspend_cfg_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(wlan_suspend_cfg_r14_present, 1)); + if (wlan_suspend_cfg_r14_present) { + HANDLE_CODE(wlan_suspend_cfg_r14->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_mob_cfg_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(wlan_to_release_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(wlan_to_add_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(association_timer_r13_present, 1)); + HANDLE_CODE(bref.unpack(success_report_requested_r13_present, 1)); + + if (wlan_to_release_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_to_release_list_r13, bref, 1, 32)); + } + if (wlan_to_add_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_to_add_list_r13, bref, 1, 32)); + } + if (association_timer_r13_present) { + HANDLE_CODE(unpack_enum(association_timer_r13, bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(wlan_suspend_cfg_r14_present, 1)); + if (wlan_suspend_cfg_r14_present) { + wlan_suspend_cfg_r14 = make_copy_ptr(wlan_suspend_cfg_r14_s()); + HANDLE_CODE(wlan_suspend_cfg_r14->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void wlan_mob_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_to_release_list_r13_present) { + j.start_array("wlan-ToReleaseList-r13"); + for (uint32_t i1 = 0; i1 < wlan_to_release_list_r13.size(); ++i1) { + wlan_to_release_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (wlan_to_add_list_r13_present) { + j.start_array("wlan-ToAddList-r13"); + for (uint32_t i1 = 0; i1 < wlan_to_add_list_r13.size(); ++i1) { + wlan_to_add_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (association_timer_r13_present) { + j.write_str("associationTimer-r13", association_timer_r13.to_string()); + } + if (success_report_requested_r13_present) { + j.write_str("successReportRequested-r13", "true"); + } + if (wlan_suspend_cfg_r14_present) { + j.write_fieldname("wlan-SuspendConfig-r14"); + wlan_suspend_cfg_r14->to_json(j); + } + j.end_obj(); +} + +// LWA-Config-r13 ::= SEQUENCE +lwa_cfg_r13_s::lwa_cfg_r13_s() +{ + ext = false; + lwa_mob_cfg_r13_present = false; + lwa_wt_counter_r13_present = false; + wt_mac_address_r14_present = false; +} +SRSASN_CODE lwa_cfg_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(lwa_mob_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(lwa_wt_counter_r13_present, 1)); + + if (lwa_mob_cfg_r13_present) { + HANDLE_CODE(lwa_mob_cfg_r13.pack(bref)); + } + if (lwa_wt_counter_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, lwa_wt_counter_r13, (uint16_t)0, (uint16_t)65535)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= wt_mac_address_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(wt_mac_address_r14_present, 1)); + if (wt_mac_address_r14_present) { + HANDLE_CODE(wt_mac_address_r14.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lwa_cfg_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(lwa_mob_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(lwa_wt_counter_r13_present, 1)); + + if (lwa_mob_cfg_r13_present) { + HANDLE_CODE(lwa_mob_cfg_r13.unpack(bref)); + } + if (lwa_wt_counter_r13_present) { + HANDLE_CODE(unpack_unalign_integer(lwa_wt_counter_r13, bref, (uint16_t)0, (uint16_t)65535)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(wt_mac_address_r14_present, 1)); + if (wt_mac_address_r14_present) { + HANDLE_CODE(wt_mac_address_r14.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void lwa_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwa_mob_cfg_r13_present) { + j.write_fieldname("lwa-MobilityConfig-r13"); + lwa_mob_cfg_r13.to_json(j); + } + if (lwa_wt_counter_r13_present) { + j.write_int("lwa-WT-Counter-r13", lwa_wt_counter_r13); + } + if (wt_mac_address_r14_present) { + j.write_str("wt-MAC-Address-r14", wt_mac_address_r14.to_string()); + } + j.end_obj(); +} + +// LWIP-Config-r13 ::= SEQUENCE +lwip_cfg_r13_s::lwip_cfg_r13_s() +{ + ext = false; + lwip_mob_cfg_r13_present = false; + tunnel_cfg_lwip_r13_present = false; +} +SRSASN_CODE lwip_cfg_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(lwip_mob_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(tunnel_cfg_lwip_r13_present, 1)); + + if (lwip_mob_cfg_r13_present) { + HANDLE_CODE(lwip_mob_cfg_r13.pack(bref)); + } + if (tunnel_cfg_lwip_r13_present) { + HANDLE_CODE(tunnel_cfg_lwip_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE lwip_cfg_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(lwip_mob_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(tunnel_cfg_lwip_r13_present, 1)); + + if (lwip_mob_cfg_r13_present) { + HANDLE_CODE(lwip_mob_cfg_r13.unpack(bref)); + } + if (tunnel_cfg_lwip_r13_present) { + HANDLE_CODE(tunnel_cfg_lwip_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void lwip_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwip_mob_cfg_r13_present) { + j.write_fieldname("lwip-MobilityConfig-r13"); + lwip_mob_cfg_r13.to_json(j); + } + if (tunnel_cfg_lwip_r13_present) { + j.write_fieldname("tunnelConfigLWIP-r13"); + tunnel_cfg_lwip_r13.to_json(j); + } + j.end_obj(); +} + +// MobilityControlInfoSCG-r12 ::= SEQUENCE +mob_ctrl_info_scg_r12_s::mob_ctrl_info_scg_r12_s() +{ + ext = false; + ue_id_scg_r12_present = false; + rach_cfg_ded_r12_present = false; + ciphering_algorithm_scg_r12_present = false; + make_before_break_scg_r14_present = false; + rach_skip_scg_r14_present = false; +} +SRSASN_CODE mob_ctrl_info_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ue_id_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(rach_cfg_ded_r12_present, 1)); + HANDLE_CODE(bref.pack(ciphering_algorithm_scg_r12_present, 1)); + + HANDLE_CODE(pack_enum(bref, t307_r12)); + if (ue_id_scg_r12_present) { + HANDLE_CODE(ue_id_scg_r12.pack(bref)); + } + if (rach_cfg_ded_r12_present) { + HANDLE_CODE(rach_cfg_ded_r12.pack(bref)); + } + if (ciphering_algorithm_scg_r12_present) { + HANDLE_CODE(pack_enum(bref, ciphering_algorithm_scg_r12)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= make_before_break_scg_r14_present; + rrc_asn1_warn_assert(rach_skip_scg_r14_present != (rach_skip_scg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= rach_skip_scg_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(make_before_break_scg_r14_present, 1)); + HANDLE_CODE(bref.pack(rach_skip_scg_r14_present, 1)); + if (rach_skip_scg_r14_present) { + HANDLE_CODE(rach_skip_scg_r14->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_ctrl_info_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ue_id_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(rach_cfg_ded_r12_present, 1)); + HANDLE_CODE(bref.unpack(ciphering_algorithm_scg_r12_present, 1)); + + HANDLE_CODE(unpack_enum(t307_r12, bref)); + if (ue_id_scg_r12_present) { + HANDLE_CODE(ue_id_scg_r12.unpack(bref)); + } + if (rach_cfg_ded_r12_present) { + HANDLE_CODE(rach_cfg_ded_r12.unpack(bref)); + } + if (ciphering_algorithm_scg_r12_present) { + HANDLE_CODE(unpack_enum(ciphering_algorithm_scg_r12, bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(make_before_break_scg_r14_present, 1)); + HANDLE_CODE(bref.unpack(rach_skip_scg_r14_present, 1)); + if (rach_skip_scg_r14_present) { + rach_skip_scg_r14 = make_copy_ptr(rach_skip_r14_s()); + HANDLE_CODE(rach_skip_scg_r14->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void mob_ctrl_info_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t307-r12", t307_r12.to_string()); + if (ue_id_scg_r12_present) { + j.write_str("ue-IdentitySCG-r12", ue_id_scg_r12.to_string()); + } + if (rach_cfg_ded_r12_present) { + j.write_fieldname("rach-ConfigDedicated-r12"); + rach_cfg_ded_r12.to_json(j); + } + if (ciphering_algorithm_scg_r12_present) { + j.write_str("cipheringAlgorithmSCG-r12", ciphering_algorithm_scg_r12.to_string()); + } + if (make_before_break_scg_r14_present) { + j.write_str("makeBeforeBreakSCG-r14", "true"); + } + if (rach_skip_scg_r14_present) { + j.write_fieldname("rach-SkipSCG-r14"); + rach_skip_scg_r14->to_json(j); + } + j.end_obj(); +} + +// PSCellToAddMod-r12 ::= SEQUENCE +ps_cell_to_add_mod_r12_s::ps_cell_to_add_mod_r12_s() +{ + ext = false; + cell_identif_r12_present = false; + rr_cfg_common_ps_cell_r12_present = false; + rr_cfg_ded_ps_cell_r12_present = false; + ant_info_ded_ps_cell_v1280_present = false; + s_cell_idx_r13_present = false; + rr_cfg_ded_ps_cell_v1370_present = false; +} +SRSASN_CODE ps_cell_to_add_mod_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_identif_r12_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_common_ps_cell_r12_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_ded_ps_cell_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, s_cell_idx_r12, (uint8_t)1, (uint8_t)7)); + if (cell_identif_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r12.pci_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r12.dl_carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + } + if (rr_cfg_common_ps_cell_r12_present) { + HANDLE_CODE(rr_cfg_common_ps_cell_r12.pack(bref)); + } + if (rr_cfg_ded_ps_cell_r12_present) { + HANDLE_CODE(rr_cfg_ded_ps_cell_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + rrc_asn1_warn_assert(ant_info_ded_ps_cell_v1280_present != (ant_info_ded_ps_cell_v1280.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= ant_info_ded_ps_cell_v1280_present; + group_flags[1] |= s_cell_idx_r13_present; + rrc_asn1_warn_assert(rr_cfg_ded_ps_cell_v1370_present != (rr_cfg_ded_ps_cell_v1370.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= rr_cfg_ded_ps_cell_v1370_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ant_info_ded_ps_cell_v1280_present, 1)); + if (ant_info_ded_ps_cell_v1280_present) { + HANDLE_CODE(ant_info_ded_ps_cell_v1280->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_idx_r13_present, 1)); + if (s_cell_idx_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, s_cell_idx_r13, (uint8_t)1, (uint8_t)31)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rr_cfg_ded_ps_cell_v1370_present, 1)); + if (rr_cfg_ded_ps_cell_v1370_present) { + HANDLE_CODE(rr_cfg_ded_ps_cell_v1370->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ps_cell_to_add_mod_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_identif_r12_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_common_ps_cell_r12_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_ded_ps_cell_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(s_cell_idx_r12, bref, (uint8_t)1, (uint8_t)7)); + if (cell_identif_r12_present) { + HANDLE_CODE(unpack_unalign_integer(cell_identif_r12.pci_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(cell_identif_r12.dl_carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + } + if (rr_cfg_common_ps_cell_r12_present) { + HANDLE_CODE(rr_cfg_common_ps_cell_r12.unpack(bref)); + } + if (rr_cfg_ded_ps_cell_r12_present) { + HANDLE_CODE(rr_cfg_ded_ps_cell_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ant_info_ded_ps_cell_v1280_present, 1)); + if (ant_info_ded_ps_cell_v1280_present) { + ant_info_ded_ps_cell_v1280 = make_copy_ptr(ant_info_ded_v10i0_s()); + HANDLE_CODE(ant_info_ded_ps_cell_v1280->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_idx_r13_present, 1)); + if (s_cell_idx_r13_present) { + HANDLE_CODE(unpack_unalign_integer(s_cell_idx_r13, bref, (uint8_t)1, (uint8_t)31)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rr_cfg_ded_ps_cell_v1370_present, 1)); + if (rr_cfg_ded_ps_cell_v1370_present) { + rr_cfg_ded_ps_cell_v1370 = make_copy_ptr(rr_cfg_ded_ps_cell_v1370_s()); + HANDLE_CODE(rr_cfg_ded_ps_cell_v1370->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void ps_cell_to_add_mod_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sCellIndex-r12", s_cell_idx_r12); + if (cell_identif_r12_present) { + j.write_fieldname("cellIdentification-r12"); + j.start_obj(); + j.write_int("physCellId-r12", cell_identif_r12.pci_r12); + j.write_int("dl-CarrierFreq-r12", cell_identif_r12.dl_carrier_freq_r12); + j.end_obj(); + } + if (rr_cfg_common_ps_cell_r12_present) { + j.write_fieldname("radioResourceConfigCommonPSCell-r12"); + rr_cfg_common_ps_cell_r12.to_json(j); + } + if (rr_cfg_ded_ps_cell_r12_present) { + j.write_fieldname("radioResourceConfigDedicatedPSCell-r12"); + rr_cfg_ded_ps_cell_r12.to_json(j); + } + if (ant_info_ded_ps_cell_v1280_present) { + j.write_fieldname("antennaInfoDedicatedPSCell-v1280"); + ant_info_ded_ps_cell_v1280->to_json(j); + } + if (s_cell_idx_r13_present) { + j.write_int("sCellIndex-r13", s_cell_idx_r13); + } + if (rr_cfg_ded_ps_cell_v1370_present) { + j.write_fieldname("radioResourceConfigDedicatedPSCell-v1370"); + rr_cfg_ded_ps_cell_v1370->to_json(j); + } + j.end_obj(); +} + +// PSCellToAddMod-v12f0 ::= SEQUENCE +ps_cell_to_add_mod_v12f0_s::ps_cell_to_add_mod_v12f0_s() +{ + rr_cfg_common_ps_cell_r12_present = false; +} +SRSASN_CODE ps_cell_to_add_mod_v12f0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_common_ps_cell_r12_present, 1)); + + if (rr_cfg_common_ps_cell_r12_present) { + HANDLE_CODE(rr_cfg_common_ps_cell_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ps_cell_to_add_mod_v12f0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_common_ps_cell_r12_present, 1)); + + if (rr_cfg_common_ps_cell_r12_present) { + HANDLE_CODE(rr_cfg_common_ps_cell_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ps_cell_to_add_mod_v12f0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_common_ps_cell_r12_present) { + j.write_fieldname("radioResourceConfigCommonPSCell-r12"); + rr_cfg_common_ps_cell_r12.to_json(j); + } + j.end_obj(); +} + +// PSCellToAddMod-v1440 ::= SEQUENCE +ps_cell_to_add_mod_v1440_s::ps_cell_to_add_mod_v1440_s() +{ + rr_cfg_common_ps_cell_r14_present = false; +} +SRSASN_CODE ps_cell_to_add_mod_v1440_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_common_ps_cell_r14_present, 1)); + + if (rr_cfg_common_ps_cell_r14_present) { + HANDLE_CODE(rr_cfg_common_ps_cell_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ps_cell_to_add_mod_v1440_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_common_ps_cell_r14_present, 1)); + + if (rr_cfg_common_ps_cell_r14_present) { + HANDLE_CODE(rr_cfg_common_ps_cell_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ps_cell_to_add_mod_v1440_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_common_ps_cell_r14_present) { + j.write_fieldname("radioResourceConfigCommonPSCell-r14"); + rr_cfg_common_ps_cell_r14.to_json(j); + } + j.end_obj(); +} + +// RCLWI-Config-r13 ::= SEQUENCE +rclwi_cfg_r13_s::rclwi_cfg_r13_s() +{ + ext = false; +} +SRSASN_CODE rclwi_cfg_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(cmd.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rclwi_cfg_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(cmd.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rclwi_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("command"); + cmd.to_json(j); + j.end_obj(); +} + +void rclwi_cfg_r13_s::cmd_c_::set(types::options e) +{ + type_ = e; +} +void rclwi_cfg_r13_s::cmd_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::steer_to_wlan_r13: + j.write_fieldname("steerToWLAN-r13"); + j.start_obj(); + j.start_array("mobilityConfig-r13"); + for (uint32_t i1 = 0; i1 < c.mob_cfg_r13.size(); ++i1) { + c.mob_cfg_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + case types::steer_to_lte_r13: + break; + default: + log_invalid_choice_id(type_, "rclwi_cfg_r13_s::cmd_c_"); + } + j.end_obj(); +} +SRSASN_CODE rclwi_cfg_r13_s::cmd_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::steer_to_wlan_r13: + HANDLE_CODE(pack_dyn_seq_of(bref, c.mob_cfg_r13, 1, 16)); + break; + case types::steer_to_lte_r13: + break; + default: + log_invalid_choice_id(type_, "rclwi_cfg_r13_s::cmd_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rclwi_cfg_r13_s::cmd_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::steer_to_wlan_r13: + HANDLE_CODE(unpack_dyn_seq_of(c.mob_cfg_r13, bref, 1, 16)); + break; + case types::steer_to_lte_r13: + break; + default: + log_invalid_choice_id(type_, "rclwi_cfg_r13_s::cmd_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReconfiguration-v1510-IEs ::= SEQUENCE +rrc_conn_recfg_v1510_ies_s::rrc_conn_recfg_v1510_ies_s() +{ + nr_cfg_r15_present = false; + sk_counter_r15_present = false; + nr_radio_bearer_cfg1_r15_present = false; + nr_radio_bearer_cfg2_r15_present = false; + tdm_pattern_cfg_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1510_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nr_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(sk_counter_r15_present, 1)); + HANDLE_CODE(bref.pack(nr_radio_bearer_cfg1_r15_present, 1)); + HANDLE_CODE(bref.pack(nr_radio_bearer_cfg2_r15_present, 1)); + HANDLE_CODE(bref.pack(tdm_pattern_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (nr_cfg_r15_present) { + HANDLE_CODE(nr_cfg_r15.pack(bref)); + } + if (sk_counter_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, sk_counter_r15, (uint16_t)0, (uint16_t)65535)); + } + if (nr_radio_bearer_cfg1_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg1_r15.pack(bref)); + } + if (nr_radio_bearer_cfg2_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg2_r15.pack(bref)); + } + if (tdm_pattern_cfg_r15_present) { + HANDLE_CODE(tdm_pattern_cfg_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1510_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nr_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(sk_counter_r15_present, 1)); + HANDLE_CODE(bref.unpack(nr_radio_bearer_cfg1_r15_present, 1)); + HANDLE_CODE(bref.unpack(nr_radio_bearer_cfg2_r15_present, 1)); + HANDLE_CODE(bref.unpack(tdm_pattern_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (nr_cfg_r15_present) { + HANDLE_CODE(nr_cfg_r15.unpack(bref)); + } + if (sk_counter_r15_present) { + HANDLE_CODE(unpack_unalign_integer(sk_counter_r15, bref, (uint16_t)0, (uint16_t)65535)); + } + if (nr_radio_bearer_cfg1_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg1_r15.unpack(bref)); + } + if (nr_radio_bearer_cfg2_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg2_r15.unpack(bref)); + } + if (tdm_pattern_cfg_r15_present) { + HANDLE_CODE(tdm_pattern_cfg_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1510_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (nr_cfg_r15_present) { + j.write_fieldname("nr-Config-r15"); + nr_cfg_r15.to_json(j); + } + if (sk_counter_r15_present) { + j.write_int("sk-Counter-r15", sk_counter_r15); + } + if (nr_radio_bearer_cfg1_r15_present) { + j.write_str("nr-RadioBearerConfig1-r15", nr_radio_bearer_cfg1_r15.to_string()); + } + if (nr_radio_bearer_cfg2_r15_present) { + j.write_str("nr-RadioBearerConfig2-r15", nr_radio_bearer_cfg2_r15.to_string()); + } + if (tdm_pattern_cfg_r15_present) { + j.write_fieldname("tdm-PatternConfig-r15"); + tdm_pattern_cfg_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_bool("endc-ReleaseAndAdd-r15", c.endc_release_and_add_r15); + if (c.nr_secondary_cell_group_cfg_r15_present) { + j.write_str("nr-SecondaryCellGroupConfig-r15", c.nr_secondary_cell_group_cfg_r15.to_string()); + } + if (c.p_max_eutra_r15_present) { + j.write_int("p-MaxEUTRA-r15", c.p_max_eutra_r15); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.nr_secondary_cell_group_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(c.p_max_eutra_r15_present, 1)); + HANDLE_CODE(bref.pack(c.endc_release_and_add_r15, 1)); + if (c.nr_secondary_cell_group_cfg_r15_present) { + HANDLE_CODE(c.nr_secondary_cell_group_cfg_r15.pack(bref)); + } + if (c.p_max_eutra_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.p_max_eutra_r15, (int8_t)-30, (int8_t)33)); + } + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.nr_secondary_cell_group_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.p_max_eutra_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.endc_release_and_add_r15, 1)); + if (c.nr_secondary_cell_group_cfg_r15_present) { + HANDLE_CODE(c.nr_secondary_cell_group_cfg_r15.unpack(bref)); + } + if (c.p_max_eutra_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.p_max_eutra_r15, bref, (int8_t)-30, (int8_t)33)); + } + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rrc_conn_recfg_v1510_ies_s::nr_cfg_r15_c_::setup_s_::setup_s_() +{ + nr_secondary_cell_group_cfg_r15_present = false; + p_max_eutra_r15_present = false; +} + +void rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("subframeAssignment-r15", c.sf_assign_r15.to_string()); + j.write_int("harq-Offset-r15", c.harq_offset_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.sf_assign_r15)); + HANDLE_CODE(pack_unalign_integer(bref, c.harq_offset_r15, (uint8_t)0, (uint8_t)9)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.sf_assign_r15, bref)); + HANDLE_CODE(unpack_unalign_integer(c.harq_offset_r15, bref, (uint8_t)0, (uint8_t)9)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1510_ies_s::tdm_pattern_cfg_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RadioResourceConfigDedicatedSCG-r12 ::= SEQUENCE +rr_cfg_ded_scg_r12_s::rr_cfg_ded_scg_r12_s() +{ + ext = false; + drb_to_add_mod_list_scg_r12_present = false; + mac_main_cfg_scg_r12_present = false; + rlf_timers_and_consts_scg_r12_present = false; + drb_to_add_mod_list_scg_r15_present = false; +} +SRSASN_CODE rr_cfg_ded_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(drb_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(mac_main_cfg_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(rlf_timers_and_consts_scg_r12_present, 1)); + + if (drb_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list_scg_r12, 1, 11)); + } + if (mac_main_cfg_scg_r12_present) { + HANDLE_CODE(mac_main_cfg_scg_r12.pack(bref)); + } + if (rlf_timers_and_consts_scg_r12_present) { + HANDLE_CODE(rlf_timers_and_consts_scg_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(drb_to_add_mod_list_scg_r15_present != (drb_to_add_mod_list_scg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= drb_to_add_mod_list_scg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(drb_to_add_mod_list_scg_r15_present, 1)); + if (drb_to_add_mod_list_scg_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *drb_to_add_mod_list_scg_r15, 1, 15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(mac_main_cfg_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(rlf_timers_and_consts_scg_r12_present, 1)); + + if (drb_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_add_mod_list_scg_r12, bref, 1, 11)); + } + if (mac_main_cfg_scg_r12_present) { + HANDLE_CODE(mac_main_cfg_scg_r12.unpack(bref)); + } + if (rlf_timers_and_consts_scg_r12_present) { + HANDLE_CODE(rlf_timers_and_consts_scg_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_scg_r15_present, 1)); + if (drb_to_add_mod_list_scg_r15_present) { + drb_to_add_mod_list_scg_r15 = make_copy_ptr(drb_to_add_mod_list_scg_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*drb_to_add_mod_list_scg_r15, bref, 1, 15)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_ded_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drb_to_add_mod_list_scg_r12_present) { + j.start_array("drb-ToAddModListSCG-r12"); + for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r12.size(); ++i1) { + drb_to_add_mod_list_scg_r12[i1].to_json(j); + } + j.end_array(); + } + if (mac_main_cfg_scg_r12_present) { + j.write_fieldname("mac-MainConfigSCG-r12"); + mac_main_cfg_scg_r12.to_json(j); + } + if (rlf_timers_and_consts_scg_r12_present) { + j.write_fieldname("rlf-TimersAndConstantsSCG-r12"); + rlf_timers_and_consts_scg_r12.to_json(j); + } + if (drb_to_add_mod_list_scg_r15_present) { + j.start_array("drb-ToAddModListSCG-r15"); + for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r15->size(); ++i1) { + ((*drb_to_add_mod_list_scg_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-CommTxPoolToAddMod-r12 ::= SEQUENCE +SRSASN_CODE sl_comm_tx_pool_to_add_mod_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pool_id_r12, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pool_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_tx_pool_to_add_mod_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pool_id_r12, bref, (uint8_t)1, (uint8_t)4)); + HANDLE_CODE(pool_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_comm_tx_pool_to_add_mod_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("poolIdentity-r12", pool_id_r12); + j.write_fieldname("pool-r12"); + pool_r12.to_json(j); + j.end_obj(); +} + +// SL-CommTxPoolToAddModExt-r13 ::= SEQUENCE +SRSASN_CODE sl_comm_tx_pool_to_add_mod_ext_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pool_id_v1310, (uint8_t)5, (uint8_t)8)); + HANDLE_CODE(pool_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_tx_pool_to_add_mod_ext_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pool_id_v1310, bref, (uint8_t)5, (uint8_t)8)); + HANDLE_CODE(pool_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_comm_tx_pool_to_add_mod_ext_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("poolIdentity-v1310", pool_id_v1310); + j.write_fieldname("pool-r13"); + pool_r13.to_json(j); + j.end_obj(); +} + +// SL-DiscTxResourceInfoPerFreq-r13 ::= SEQUENCE +sl_disc_tx_res_info_per_freq_r13_s::sl_disc_tx_res_info_per_freq_r13_s() +{ + ext = false; + disc_tx_res_r13_present = false; + disc_tx_res_ps_r13_present = false; + disc_tx_ref_carrier_ded_r13_present = false; + disc_cell_sel_info_r13_present = false; +} +SRSASN_CODE sl_disc_tx_res_info_per_freq_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(disc_tx_res_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_res_ps_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_ref_carrier_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_cell_sel_info_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, disc_tx_carrier_freq_r13, (uint32_t)0, (uint32_t)262143)); + if (disc_tx_res_r13_present) { + HANDLE_CODE(disc_tx_res_r13.pack(bref)); + } + if (disc_tx_res_ps_r13_present) { + HANDLE_CODE(disc_tx_res_ps_r13.pack(bref)); + } + if (disc_tx_ref_carrier_ded_r13_present) { + HANDLE_CODE(disc_tx_ref_carrier_ded_r13.pack(bref)); + } + if (disc_cell_sel_info_r13_present) { + HANDLE_CODE(disc_cell_sel_info_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_res_info_per_freq_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(disc_tx_res_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_res_ps_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_ref_carrier_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_cell_sel_info_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(disc_tx_carrier_freq_r13, bref, (uint32_t)0, (uint32_t)262143)); + if (disc_tx_res_r13_present) { + HANDLE_CODE(disc_tx_res_r13.unpack(bref)); + } + if (disc_tx_res_ps_r13_present) { + HANDLE_CODE(disc_tx_res_ps_r13.unpack(bref)); + } + if (disc_tx_ref_carrier_ded_r13_present) { + HANDLE_CODE(disc_tx_ref_carrier_ded_r13.unpack(bref)); + } + if (disc_cell_sel_info_r13_present) { + HANDLE_CODE(disc_cell_sel_info_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_disc_tx_res_info_per_freq_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("discTxCarrierFreq-r13", disc_tx_carrier_freq_r13); + if (disc_tx_res_r13_present) { + j.write_fieldname("discTxResources-r13"); + disc_tx_res_r13.to_json(j); + } + if (disc_tx_res_ps_r13_present) { + j.write_fieldname("discTxResourcesPS-r13"); + disc_tx_res_ps_r13.to_json(j); + } + if (disc_tx_ref_carrier_ded_r13_present) { + j.write_fieldname("discTxRefCarrierDedicated-r13"); + disc_tx_ref_carrier_ded_r13.to_json(j); + } + if (disc_cell_sel_info_r13_present) { + j.write_fieldname("discCellSelectionInfo-r13"); + disc_cell_sel_info_r13.to_json(j); + } + j.end_obj(); +} + +// SL-TF-IndexPair-r12 ::= SEQUENCE +sl_tf_idx_pair_r12_s::sl_tf_idx_pair_r12_s() +{ + disc_sf_idx_r12_present = false; + disc_prb_idx_r12_present = false; +} +SRSASN_CODE sl_tf_idx_pair_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(disc_sf_idx_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_prb_idx_r12_present, 1)); + + if (disc_sf_idx_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_sf_idx_r12, (uint8_t)1, (uint8_t)200)); + } + if (disc_prb_idx_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_prb_idx_r12, (uint8_t)1, (uint8_t)50)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tf_idx_pair_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(disc_sf_idx_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_prb_idx_r12_present, 1)); + + if (disc_sf_idx_r12_present) { + HANDLE_CODE(unpack_unalign_integer(disc_sf_idx_r12, bref, (uint8_t)1, (uint8_t)200)); + } + if (disc_prb_idx_r12_present) { + HANDLE_CODE(unpack_unalign_integer(disc_prb_idx_r12, bref, (uint8_t)1, (uint8_t)50)); + } + + return SRSASN_SUCCESS; +} +void sl_tf_idx_pair_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_sf_idx_r12_present) { + j.write_int("discSF-Index-r12", disc_sf_idx_r12); + } + if (disc_prb_idx_r12_present) { + j.write_int("discPRB-Index-r12", disc_prb_idx_r12); + } + j.end_obj(); +} + +// SL-V2X-ConfigDedicated-r14 ::= SEQUENCE +sl_v2x_cfg_ded_r14_s::sl_v2x_cfg_ded_r14_s() +{ + ext = false; + comm_tx_res_r14_present = false; + v2x_inter_freq_info_list_r14_present = false; + thres_sl_tx_prioritization_r14_present = false; + type_tx_sync_r14_present = false; + cbr_ded_tx_cfg_list_r14_present = false; + comm_tx_res_v1530_present = false; + v2x_packet_dupl_cfg_r15_present = false; + sync_freq_list_r15_present = false; + slss_tx_multi_freq_r15_present = false; +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(comm_tx_res_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_inter_freq_info_list_r14_present, 1)); + HANDLE_CODE(bref.pack(thres_sl_tx_prioritization_r14_present, 1)); + HANDLE_CODE(bref.pack(type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_ded_tx_cfg_list_r14_present, 1)); + + if (comm_tx_res_r14_present) { + HANDLE_CODE(comm_tx_res_r14.pack(bref)); + } + if (v2x_inter_freq_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_inter_freq_info_list_r14, 0, 7)); + } + if (thres_sl_tx_prioritization_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_sl_tx_prioritization_r14, (uint8_t)1, (uint8_t)8)); + } + if (type_tx_sync_r14_present) { + HANDLE_CODE(pack_enum(bref, type_tx_sync_r14)); + } + if (cbr_ded_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_ded_tx_cfg_list_r14.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(comm_tx_res_v1530_present != (comm_tx_res_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= comm_tx_res_v1530_present; + rrc_asn1_warn_assert(v2x_packet_dupl_cfg_r15_present != (v2x_packet_dupl_cfg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= v2x_packet_dupl_cfg_r15_present; + rrc_asn1_warn_assert(sync_freq_list_r15_present != (sync_freq_list_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= sync_freq_list_r15_present; + group_flags[0] |= slss_tx_multi_freq_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(comm_tx_res_v1530_present, 1)); + HANDLE_CODE(bref.pack(v2x_packet_dupl_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(sync_freq_list_r15_present, 1)); + HANDLE_CODE(bref.pack(slss_tx_multi_freq_r15_present, 1)); + if (comm_tx_res_v1530_present) { + HANDLE_CODE(comm_tx_res_v1530->pack(bref)); + } + if (v2x_packet_dupl_cfg_r15_present) { + HANDLE_CODE(v2x_packet_dupl_cfg_r15->pack(bref)); + } + if (sync_freq_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sync_freq_list_r15, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(comm_tx_res_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_inter_freq_info_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(thres_sl_tx_prioritization_r14_present, 1)); + HANDLE_CODE(bref.unpack(type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_ded_tx_cfg_list_r14_present, 1)); + + if (comm_tx_res_r14_present) { + HANDLE_CODE(comm_tx_res_r14.unpack(bref)); + } + if (v2x_inter_freq_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_inter_freq_info_list_r14, bref, 0, 7)); + } + if (thres_sl_tx_prioritization_r14_present) { + HANDLE_CODE(unpack_unalign_integer(thres_sl_tx_prioritization_r14, bref, (uint8_t)1, (uint8_t)8)); + } + if (type_tx_sync_r14_present) { + HANDLE_CODE(unpack_enum(type_tx_sync_r14, bref)); + } + if (cbr_ded_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_ded_tx_cfg_list_r14.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(comm_tx_res_v1530_present, 1)); + HANDLE_CODE(bref.unpack(v2x_packet_dupl_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(sync_freq_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(slss_tx_multi_freq_r15_present, 1)); + if (comm_tx_res_v1530_present) { + comm_tx_res_v1530 = make_copy_ptr(comm_tx_res_v1530_c_()); + HANDLE_CODE(comm_tx_res_v1530->unpack(bref)); + } + if (v2x_packet_dupl_cfg_r15_present) { + v2x_packet_dupl_cfg_r15 = make_copy_ptr(sl_v2x_packet_dupl_cfg_r15_s()); + HANDLE_CODE(v2x_packet_dupl_cfg_r15->unpack(bref)); + } + if (sync_freq_list_r15_present) { + sync_freq_list_r15 = make_copy_ptr(sl_v2x_sync_freq_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*sync_freq_list_r15, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + } + } + return SRSASN_SUCCESS; +} +void sl_v2x_cfg_ded_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (comm_tx_res_r14_present) { + j.write_fieldname("commTxResources-r14"); + comm_tx_res_r14.to_json(j); + } + if (v2x_inter_freq_info_list_r14_present) { + j.start_array("v2x-InterFreqInfoList-r14"); + for (uint32_t i1 = 0; i1 < v2x_inter_freq_info_list_r14.size(); ++i1) { + v2x_inter_freq_info_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (thres_sl_tx_prioritization_r14_present) { + j.write_int("thresSL-TxPrioritization-r14", thres_sl_tx_prioritization_r14); + } + if (type_tx_sync_r14_present) { + j.write_str("typeTxSync-r14", type_tx_sync_r14.to_string()); + } + if (cbr_ded_tx_cfg_list_r14_present) { + j.write_fieldname("cbr-DedicatedTxConfigList-r14"); + cbr_ded_tx_cfg_list_r14.to_json(j); + } + if (comm_tx_res_v1530_present) { + j.write_fieldname("commTxResources-v1530"); + comm_tx_res_v1530->to_json(j); + } + if (v2x_packet_dupl_cfg_r15_present) { + j.write_fieldname("v2x-PacketDuplicationConfig-r15"); + v2x_packet_dupl_cfg_r15->to_json(j); + } + if (sync_freq_list_r15_present) { + j.start_array("syncFreqList-r15"); + for (uint32_t i1 = 0; i1 < sync_freq_list_r15->size(); ++i1) { + j.write_int(((*sync_freq_list_r15)[i1])); + } + j.end_array(); + } + if (slss_tx_multi_freq_r15_present) { + j.write_str("slss-TxMultiFreq-r15", "true"); + } + j.end_obj(); +} + +void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::set(types::options e) +{ + type_ = e; +} +void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_r14: + c.destroy(); + break; + case types::ue_sel_r14: + c.destroy(); + break; + default: + break; + } +} +void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_r14: + c.init(); + break; + case types::ue_sel_r14: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_"); + } +} +sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::setup_c_( + const sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_r14: + c.init(other.c.get()); + break; + case types::ue_sel_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_"); + } +} +sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_& sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_:: + operator=(const sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_r14: + c.set(other.c.get()); + break; + case types::ue_sel_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_"); + } + + return *this; +} +void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_r14: + j.write_fieldname("scheduled-r14"); + j.start_obj(); + j.write_str("sl-V-RNTI-r14", c.get().sl_v_rnti_r14.to_string()); + j.write_fieldname("mac-MainConfig-r14"); + c.get().mac_main_cfg_r14.to_json(j); + if (c.get().v2x_sched_pool_r14_present) { + j.write_fieldname("v2x-SchedulingPool-r14"); + c.get().v2x_sched_pool_r14.to_json(j); + } + if (c.get().mcs_r14_present) { + j.write_int("mcs-r14", c.get().mcs_r14); + } + j.start_array("logicalChGroupInfoList-r14"); + for (uint32_t i1 = 0; i1 < c.get().lc_ch_group_info_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < c.get().lc_ch_group_info_list_r14[i1].size(); ++i2) { + j.write_int(c.get().lc_ch_group_info_list_r14[i1][i2]); + } + j.end_array(); + } + j.end_array(); + j.end_obj(); + break; + case types::ue_sel_r14: + j.write_fieldname("ue-Selected-r14"); + j.start_obj(); + j.write_fieldname("v2x-CommTxPoolNormalDedicated-r14"); + j.start_obj(); + if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14_present) { + j.start_array("poolToReleaseList-r14"); + for (uint32_t i1 = 0; + i1 < c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14.size(); ++i1) { + j.write_int(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14[i1]); + } + j.end_array(); + } + if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14_present) { + j.start_array("poolToAddModList-r14"); + for (uint32_t i1 = 0; + i1 < c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14.size(); ++i1) { + c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14_present) { + j.write_fieldname("v2x-CommTxPoolSensingConfig-r14"); + c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14.to_json(j); + } + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_r14: + HANDLE_CODE(bref.pack(c.get().v2x_sched_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(c.get().mcs_r14_present, 1)); + HANDLE_CODE(c.get().sl_v_rnti_r14.pack(bref)); + HANDLE_CODE(c.get().mac_main_cfg_r14.pack(bref)); + if (c.get().v2x_sched_pool_r14_present) { + HANDLE_CODE(c.get().v2x_sched_pool_r14.pack(bref)); + } + if (c.get().mcs_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.get().mcs_r14, (uint8_t)0, (uint8_t)31)); + } + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get().lc_ch_group_info_list_r14, 1, 4, + SeqOfPacker >(1, 8, UnalignedIntegerPacker(1, 8)))); + break; + case types::ue_sel_r14: + HANDLE_CODE( + bref.pack(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14_present, 1)); + HANDLE_CODE( + bref.pack(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14_present, 1)); + HANDLE_CODE(bref.pack( + c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14_present, 1)); + if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14, 1, + 8, UnalignedIntegerPacker(1, 8))); + } + if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14, 1, 8)); + } + if (c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14_present) { + HANDLE_CODE(c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_r14: + HANDLE_CODE(bref.unpack(c.get().v2x_sched_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.get().mcs_r14_present, 1)); + HANDLE_CODE(c.get().sl_v_rnti_r14.unpack(bref)); + HANDLE_CODE(c.get().mac_main_cfg_r14.unpack(bref)); + if (c.get().v2x_sched_pool_r14_present) { + HANDLE_CODE(c.get().v2x_sched_pool_r14.unpack(bref)); + } + if (c.get().mcs_r14_present) { + HANDLE_CODE(unpack_unalign_integer(c.get().mcs_r14, bref, (uint8_t)0, (uint8_t)31)); + } + HANDLE_CODE(unpack_dyn_seq_of( + c.get().lc_ch_group_info_list_r14, bref, 1, 4, + SeqOfPacker >(1, 8, UnalignedIntegerPacker(1, 8)))); + break; + case types::ue_sel_r14: + HANDLE_CODE( + bref.unpack(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14_present, 1)); + HANDLE_CODE( + bref.unpack(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14_present, 1)); + HANDLE_CODE(bref.unpack( + c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14_present, 1)); + if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14, + bref, 1, 8, UnalignedIntegerPacker(1, 8))); + } + if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14, + bref, 1, 8)); + } + if (c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14_present) { + HANDLE_CODE( + c.get().v2x_comm_tx_pool_normal_ded_r14.v2x_comm_tx_pool_sensing_cfg_r14.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::sched_r14_s_::sched_r14_s_() +{ + v2x_sched_pool_r14_present = false; + mcs_r14_present = false; +} + +sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::ue_sel_r14_s_::v2x_comm_tx_pool_normal_ded_r14_s_:: + v2x_comm_tx_pool_normal_ded_r14_s_() +{ + pool_to_release_list_r14_present = false; + pool_to_add_mod_list_r14_present = false; + v2x_comm_tx_pool_sensing_cfg_r14_present = false; +} + +void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::set(types::options e) +{ + type_ = e; +} +void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_v1530: + c.destroy(); + break; + case types::ue_sel_v1530: + c.destroy(); + break; + default: + break; + } +} +void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_v1530: + c.init(); + break; + case types::ue_sel_v1530: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_"); + } +} +sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::setup_c_( + const sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_v1530: + c.init(other.c.get()); + break; + case types::ue_sel_v1530: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_"); + } +} +sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_& sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_:: + operator=(const sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_v1530: + c.set(other.c.get()); + break; + case types::ue_sel_v1530: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_"); + } + + return *this; +} +void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_v1530: + j.write_fieldname("scheduled-v1530"); + j.start_obj(); + if (c.get().lc_ch_group_info_list_v1530_present) { + j.start_array("logicalChGroupInfoList-v1530"); + for (uint32_t i1 = 0; i1 < c.get().lc_ch_group_info_list_v1530.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < c.get().lc_ch_group_info_list_v1530[i1].size(); ++i2) { + j.write_int(c.get().lc_ch_group_info_list_v1530[i1][i2]); + } + j.end_array(); + } + j.end_array(); + } + if (c.get().mcs_r15_present) { + j.write_int("mcs-r15", c.get().mcs_r15); + } + j.end_obj(); + break; + case types::ue_sel_v1530: + j.write_fieldname("ue-Selected-v1530"); + j.start_obj(); + if (c.get().v2x_freq_sel_cfg_list_r15_present) { + j.start_array("v2x-FreqSelectionConfigList-r15"); + for (uint32_t i1 = 0; i1 < c.get().v2x_freq_sel_cfg_list_r15.size(); ++i1) { + c.get().v2x_freq_sel_cfg_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_v1530: + HANDLE_CODE(bref.pack(c.get().lc_ch_group_info_list_v1530_present, 1)); + HANDLE_CODE(bref.pack(c.get().mcs_r15_present, 1)); + if (c.get().lc_ch_group_info_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().lc_ch_group_info_list_v1530, 1, 4, + SeqOfPacker >(1, 8, UnalignedIntegerPacker(1, 8)))); + } + if (c.get().mcs_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.get().mcs_r15, (uint8_t)0, (uint8_t)31)); + } + break; + case types::ue_sel_v1530: + HANDLE_CODE(bref.pack(c.get().v2x_freq_sel_cfg_list_r15_present, 1)); + if (c.get().v2x_freq_sel_cfg_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().v2x_freq_sel_cfg_list_r15, 1, 8)); + } + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_v1530: + HANDLE_CODE(bref.unpack(c.get().lc_ch_group_info_list_v1530_present, 1)); + HANDLE_CODE(bref.unpack(c.get().mcs_r15_present, 1)); + if (c.get().lc_ch_group_info_list_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of( + c.get().lc_ch_group_info_list_v1530, bref, 1, 4, + SeqOfPacker >(1, 8, UnalignedIntegerPacker(1, 8)))); + } + if (c.get().mcs_r15_present) { + HANDLE_CODE(unpack_unalign_integer(c.get().mcs_r15, bref, (uint8_t)0, (uint8_t)31)); + } + break; + case types::ue_sel_v1530: + HANDLE_CODE(bref.unpack(c.get().v2x_freq_sel_cfg_list_r15_present, 1)); + if (c.get().v2x_freq_sel_cfg_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().v2x_freq_sel_cfg_list_r15, bref, 1, 8)); + } + break; + default: + log_invalid_choice_id(type_, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::sched_v1530_s_::sched_v1530_s_() +{ + lc_ch_group_info_list_v1530_present = false; + mcs_r15_present = false; +} + +sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::ue_sel_v1530_s_::ue_sel_v1530_s_() +{ + v2x_freq_sel_cfg_list_r15_present = false; +} + +// BandIndication-r14 ::= SEQUENCE +band_ind_r14_s::band_ind_r14_s() +{ + ca_bw_class_ul_r14_present = false; +} +SRSASN_CODE band_ind_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ca_bw_class_ul_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, band_eutra_r14, (uint16_t)1, (uint16_t)256)); + HANDLE_CODE(pack_enum(bref, ca_bw_class_dl_r14)); + if (ca_bw_class_ul_r14_present) { + HANDLE_CODE(pack_enum(bref, ca_bw_class_ul_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_ind_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ca_bw_class_ul_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(band_eutra_r14, bref, (uint16_t)1, (uint16_t)256)); + HANDLE_CODE(unpack_enum(ca_bw_class_dl_r14, bref)); + if (ca_bw_class_ul_r14_present) { + HANDLE_CODE(unpack_enum(ca_bw_class_ul_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void band_ind_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandEUTRA-r14", band_eutra_r14); + j.write_str("ca-BandwidthClassDL-r14", ca_bw_class_dl_r14.to_string()); + if (ca_bw_class_ul_r14_present) { + j.write_str("ca-BandwidthClassUL-r14", ca_bw_class_ul_r14.to_string()); + } + j.end_obj(); +} + +// LWA-Configuration-r13 ::= CHOICE +void lwa_cfg_r13_c::set(types::options e) +{ + type_ = e; +} +void lwa_cfg_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("lwa-Config-r13"); + c.lwa_cfg_r13.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "lwa_cfg_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE lwa_cfg_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.lwa_cfg_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "lwa_cfg_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lwa_cfg_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.lwa_cfg_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "lwa_cfg_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// LWIP-Configuration-r13 ::= CHOICE +void lwip_cfg_r13_c::set(types::options e) +{ + type_ = e; +} +void lwip_cfg_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("lwip-Config-r13"); + c.lwip_cfg_r13.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "lwip_cfg_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE lwip_cfg_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.lwip_cfg_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "lwip_cfg_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE lwip_cfg_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.lwip_cfg_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "lwip_cfg_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasCSI-RS-Config-r12 ::= SEQUENCE +meas_csi_rs_cfg_r12_s::meas_csi_rs_cfg_r12_s() +{ + ext = false; +} +SRSASN_CODE meas_csi_rs_cfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, meas_csi_rs_id_r12, (uint8_t)1, (uint8_t)96)); + HANDLE_CODE(pack_unalign_integer(bref, pci_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, scrambling_id_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, res_cfg_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, sf_offset_r12, (uint8_t)0, (uint8_t)4)); + HANDLE_CODE(pack_enum(bref, csi_rs_individual_offset_r12)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_csi_rs_cfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(meas_csi_rs_id_r12, bref, (uint8_t)1, (uint8_t)96)); + HANDLE_CODE(unpack_unalign_integer(pci_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(scrambling_id_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(res_cfg_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(sf_offset_r12, bref, (uint8_t)0, (uint8_t)4)); + HANDLE_CODE(unpack_enum(csi_rs_individual_offset_r12, bref)); + + return SRSASN_SUCCESS; +} +void meas_csi_rs_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measCSI-RS-Id-r12", meas_csi_rs_id_r12); + j.write_int("physCellId-r12", pci_r12); + j.write_int("scramblingIdentity-r12", scrambling_id_r12); + j.write_int("resourceConfig-r12", res_cfg_r12); + j.write_int("subframeOffset-r12", sf_offset_r12); + j.write_str("csi-RS-IndividualOffset-r12", csi_rs_individual_offset_r12.to_string()); + j.end_obj(); +} + +// PhysCellIdRangeUTRA-FDD-r9 ::= SEQUENCE +pci_range_utra_fdd_r9_s::pci_range_utra_fdd_r9_s() +{ + range_r9_present = false; +} +SRSASN_CODE pci_range_utra_fdd_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(range_r9_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, start_r9, (uint16_t)0, (uint16_t)511)); + if (range_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, range_r9, (uint16_t)2, (uint16_t)512)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_range_utra_fdd_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(range_r9_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(start_r9, bref, (uint16_t)0, (uint16_t)511)); + if (range_r9_present) { + HANDLE_CODE(unpack_unalign_integer(range_r9, bref, (uint16_t)2, (uint16_t)512)); + } + + return SRSASN_SUCCESS; +} +void pci_range_utra_fdd_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("start-r9", start_r9); + if (range_r9_present) { + j.write_int("range-r9", range_r9); + } + j.end_obj(); +} + +// PowerCoordinationInfo-r12 ::= SEQUENCE +SRSASN_CODE pwr_coordination_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, p_me_nb_r12, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_unalign_integer(bref, p_se_nb_r12, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_unalign_integer(bref, pwr_ctrl_mode_r12, (uint8_t)1, (uint8_t)2)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pwr_coordination_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(p_me_nb_r12, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_unalign_integer(p_se_nb_r12, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_unalign_integer(pwr_ctrl_mode_r12, bref, (uint8_t)1, (uint8_t)2)); + + return SRSASN_SUCCESS; +} +void pwr_coordination_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p-MeNB-r12", p_me_nb_r12); + j.write_int("p-SeNB-r12", p_se_nb_r12); + j.write_int("powerControlMode-r12", pwr_ctrl_mode_r12); + j.end_obj(); +} + +// RAN-NotificationAreaInfo-r15 ::= CHOICE +void ran_notif_area_info_r15_c::destroy_() +{ + switch (type_) { + case types::cell_list_r15: + c.destroy(); + break; + case types::ran_area_cfg_list_r15: + c.destroy(); + break; + default: + break; + } +} +void ran_notif_area_info_r15_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_list_r15: + c.init(); + break; + case types::ran_area_cfg_list_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_r15_c"); + } +} +ran_notif_area_info_r15_c::ran_notif_area_info_r15_c(const ran_notif_area_info_r15_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_list_r15: + c.init(other.c.get()); + break; + case types::ran_area_cfg_list_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_r15_c"); + } +} +ran_notif_area_info_r15_c& ran_notif_area_info_r15_c::operator=(const ran_notif_area_info_r15_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_list_r15: + c.set(other.c.get()); + break; + case types::ran_area_cfg_list_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_r15_c"); + } + + return *this; +} +void ran_notif_area_info_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_list_r15: + j.start_array("cellList-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::ran_area_cfg_list_r15: + j.start_array("ran-AreaConfigList-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE ran_notif_area_info_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cell_list_r15: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + case types::ran_area_cfg_list_r15: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ran_notif_area_info_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cell_list_r15: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + case types::ran_area_cfg_list_r15: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RCLWI-Configuration-r13 ::= CHOICE +void rclwi_cfg_r13_c::set(types::options e) +{ + type_ = e; +} +void rclwi_cfg_r13_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("rclwi-Config-r13"); + c.rclwi_cfg_r13.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rclwi_cfg_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE rclwi_cfg_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.rclwi_cfg_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rclwi_cfg_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rclwi_cfg_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.rclwi_cfg_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rclwi_cfg_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReconfiguration-v1430-IEs ::= SEQUENCE +rrc_conn_recfg_v1430_ies_s::rrc_conn_recfg_v1430_ies_s() +{ + sl_v2x_cfg_ded_r14_present = false; + s_cell_to_add_mod_list_ext_v1430_present = false; + per_cc_gap_ind_request_r14_present = false; + sib_type2_ded_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_v2x_cfg_ded_r14_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_ext_v1430_present, 1)); + HANDLE_CODE(bref.pack(per_cc_gap_ind_request_r14_present, 1)); + HANDLE_CODE(bref.pack(sib_type2_ded_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sl_v2x_cfg_ded_r14_present) { + HANDLE_CODE(sl_v2x_cfg_ded_r14.pack(bref)); + } + if (s_cell_to_add_mod_list_ext_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_ext_v1430, 1, 31)); + } + if (sib_type2_ded_r14_present) { + HANDLE_CODE(sib_type2_ded_r14.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sl_v2x_cfg_ded_r14_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_ext_v1430_present, 1)); + HANDLE_CODE(bref.unpack(per_cc_gap_ind_request_r14_present, 1)); + HANDLE_CODE(bref.unpack(sib_type2_ded_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sl_v2x_cfg_ded_r14_present) { + HANDLE_CODE(sl_v2x_cfg_ded_r14.unpack(bref)); + } + if (s_cell_to_add_mod_list_ext_v1430_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_ext_v1430, bref, 1, 31)); + } + if (sib_type2_ded_r14_present) { + HANDLE_CODE(sib_type2_ded_r14.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_v2x_cfg_ded_r14_present) { + j.write_fieldname("sl-V2X-ConfigDedicated-r14"); + sl_v2x_cfg_ded_r14.to_json(j); + } + if (s_cell_to_add_mod_list_ext_v1430_present) { + j.start_array("sCellToAddModListExt-v1430"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_ext_v1430.size(); ++i1) { + s_cell_to_add_mod_list_ext_v1430[i1].to_json(j); + } + j.end_array(); + } + if (per_cc_gap_ind_request_r14_present) { + j.write_str("perCC-GapIndicationRequest-r14", "true"); + } + if (sib_type2_ded_r14_present) { + j.write_str("systemInformationBlockType2Dedicated-r14", sib_type2_ded_r14.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RadioResourceConfigDedicated-v1370 ::= SEQUENCE +rr_cfg_ded_v1370_s::rr_cfg_ded_v1370_s() +{ + phys_cfg_ded_v1370_present = false; +} +SRSASN_CODE rr_cfg_ded_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phys_cfg_ded_v1370_present, 1)); + + if (phys_cfg_ded_v1370_present) { + HANDLE_CODE(phys_cfg_ded_v1370.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_ded_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phys_cfg_ded_v1370_present, 1)); + + if (phys_cfg_ded_v1370_present) { + HANDLE_CODE(phys_cfg_ded_v1370.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rr_cfg_ded_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phys_cfg_ded_v1370_present) { + j.write_fieldname("physicalConfigDedicated-v1370"); + phys_cfg_ded_v1370.to_json(j); + } + j.end_obj(); +} + +// SCG-ConfigPartSCG-r12 ::= SEQUENCE +scg_cfg_part_scg_r12_s::scg_cfg_part_scg_r12_s() +{ + ext = false; + rr_cfg_ded_scg_r12_present = false; + s_cell_to_release_list_scg_r12_present = false; + p_scell_to_add_mod_r12_present = false; + s_cell_to_add_mod_list_scg_r12_present = false; + mob_ctrl_info_scg_r12_present = false; + s_cell_to_release_list_scg_ext_r13_present = false; + s_cell_to_add_mod_list_scg_ext_r13_present = false; + s_cell_to_add_mod_list_scg_ext_v1370_present = false; + p_scell_to_add_mod_v1440_present = false; + s_cell_group_to_release_list_scg_r15_present = false; + s_cell_group_to_add_mod_list_scg_r15_present = false; +} +SRSASN_CODE scg_cfg_part_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rr_cfg_ded_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_release_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(p_scell_to_add_mod_r12_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(mob_ctrl_info_scg_r12_present, 1)); + + if (rr_cfg_ded_scg_r12_present) { + HANDLE_CODE(rr_cfg_ded_scg_r12.pack(bref)); + } + if (s_cell_to_release_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_release_list_scg_r12, 1, 4, UnalignedIntegerPacker(1, 7))); + } + if (p_scell_to_add_mod_r12_present) { + HANDLE_CODE(p_scell_to_add_mod_r12.pack(bref)); + } + if (s_cell_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_scg_r12, 1, 4)); + } + if (mob_ctrl_info_scg_r12_present) { + HANDLE_CODE(mob_ctrl_info_scg_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + rrc_asn1_warn_assert(s_cell_to_release_list_scg_ext_r13_present != + (s_cell_to_release_list_scg_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= s_cell_to_release_list_scg_ext_r13_present; + rrc_asn1_warn_assert(s_cell_to_add_mod_list_scg_ext_r13_present != + (s_cell_to_add_mod_list_scg_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= s_cell_to_add_mod_list_scg_ext_r13_present; + rrc_asn1_warn_assert(s_cell_to_add_mod_list_scg_ext_v1370_present != + (s_cell_to_add_mod_list_scg_ext_v1370.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= s_cell_to_add_mod_list_scg_ext_v1370_present; + rrc_asn1_warn_assert(p_scell_to_add_mod_v1440_present != (p_scell_to_add_mod_v1440.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= p_scell_to_add_mod_v1440_present; + rrc_asn1_warn_assert(s_cell_group_to_release_list_scg_r15_present != + (s_cell_group_to_release_list_scg_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= s_cell_group_to_release_list_scg_r15_present; + rrc_asn1_warn_assert(s_cell_group_to_add_mod_list_scg_r15_present != + (s_cell_group_to_add_mod_list_scg_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= s_cell_group_to_add_mod_list_scg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_to_release_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_scg_ext_r13_present, 1)); + if (s_cell_to_release_list_scg_ext_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *s_cell_to_release_list_scg_ext_r13, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (s_cell_to_add_mod_list_scg_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *s_cell_to_add_mod_list_scg_ext_r13, 1, 31)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_scg_ext_v1370_present, 1)); + if (s_cell_to_add_mod_list_scg_ext_v1370_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *s_cell_to_add_mod_list_scg_ext_v1370, 1, 31)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(p_scell_to_add_mod_v1440_present, 1)); + if (p_scell_to_add_mod_v1440_present) { + HANDLE_CODE(p_scell_to_add_mod_v1440->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_group_to_release_list_scg_r15_present, 1)); + HANDLE_CODE(bref.pack(s_cell_group_to_add_mod_list_scg_r15_present, 1)); + if (s_cell_group_to_release_list_scg_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *s_cell_group_to_release_list_scg_r15, 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (s_cell_group_to_add_mod_list_scg_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *s_cell_group_to_add_mod_list_scg_r15, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_part_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rr_cfg_ded_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_release_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(p_scell_to_add_mod_r12_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(mob_ctrl_info_scg_r12_present, 1)); + + if (rr_cfg_ded_scg_r12_present) { + HANDLE_CODE(rr_cfg_ded_scg_r12.unpack(bref)); + } + if (s_cell_to_release_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_release_list_scg_r12, bref, 1, 4, UnalignedIntegerPacker(1, 7))); + } + if (p_scell_to_add_mod_r12_present) { + HANDLE_CODE(p_scell_to_add_mod_r12.unpack(bref)); + } + if (s_cell_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_scg_r12, bref, 1, 4)); + } + if (mob_ctrl_info_scg_r12_present) { + HANDLE_CODE(mob_ctrl_info_scg_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_to_release_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_scg_ext_r13_present, 1)); + if (s_cell_to_release_list_scg_ext_r13_present) { + s_cell_to_release_list_scg_ext_r13 = make_copy_ptr(scell_to_release_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*s_cell_to_release_list_scg_ext_r13, bref, 1, 31, + UnalignedIntegerPacker(1, 31))); + } + if (s_cell_to_add_mod_list_scg_ext_r13_present) { + s_cell_to_add_mod_list_scg_ext_r13 = make_copy_ptr(scell_to_add_mod_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*s_cell_to_add_mod_list_scg_ext_r13, bref, 1, 31)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_scg_ext_v1370_present, 1)); + if (s_cell_to_add_mod_list_scg_ext_v1370_present) { + s_cell_to_add_mod_list_scg_ext_v1370 = make_copy_ptr(scell_to_add_mod_list_ext_v1370_l()); + HANDLE_CODE(unpack_dyn_seq_of(*s_cell_to_add_mod_list_scg_ext_v1370, bref, 1, 31)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(p_scell_to_add_mod_v1440_present, 1)); + if (p_scell_to_add_mod_v1440_present) { + p_scell_to_add_mod_v1440 = make_copy_ptr(ps_cell_to_add_mod_v1440_s()); + HANDLE_CODE(p_scell_to_add_mod_v1440->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_group_to_release_list_scg_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_group_to_add_mod_list_scg_r15_present, 1)); + if (s_cell_group_to_release_list_scg_r15_present) { + s_cell_group_to_release_list_scg_r15 = make_copy_ptr(scell_group_to_release_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*s_cell_group_to_release_list_scg_r15, bref, 1, 4, + UnalignedIntegerPacker(1, 4))); + } + if (s_cell_group_to_add_mod_list_scg_r15_present) { + s_cell_group_to_add_mod_list_scg_r15 = make_copy_ptr(scell_group_to_add_mod_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*s_cell_group_to_add_mod_list_scg_r15, bref, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_ded_scg_r12_present) { + j.write_fieldname("radioResourceConfigDedicatedSCG-r12"); + rr_cfg_ded_scg_r12.to_json(j); + } + if (s_cell_to_release_list_scg_r12_present) { + j.start_array("sCellToReleaseListSCG-r12"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_scg_r12.size(); ++i1) { + j.write_int(s_cell_to_release_list_scg_r12[i1]); + } + j.end_array(); + } + if (p_scell_to_add_mod_r12_present) { + j.write_fieldname("pSCellToAddMod-r12"); + p_scell_to_add_mod_r12.to_json(j); + } + if (s_cell_to_add_mod_list_scg_r12_present) { + j.start_array("sCellToAddModListSCG-r12"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_scg_r12.size(); ++i1) { + s_cell_to_add_mod_list_scg_r12[i1].to_json(j); + } + j.end_array(); + } + if (mob_ctrl_info_scg_r12_present) { + j.write_fieldname("mobilityControlInfoSCG-r12"); + mob_ctrl_info_scg_r12.to_json(j); + } + if (s_cell_to_release_list_scg_ext_r13_present) { + j.start_array("sCellToReleaseListSCG-Ext-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_scg_ext_r13->size(); ++i1) { + j.write_int(((*s_cell_to_release_list_scg_ext_r13)[i1])); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_scg_ext_r13_present) { + j.start_array("sCellToAddModListSCG-Ext-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_scg_ext_r13->size(); ++i1) { + ((*s_cell_to_add_mod_list_scg_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_scg_ext_v1370_present) { + j.start_array("sCellToAddModListSCG-Ext-v1370"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_scg_ext_v1370->size(); ++i1) { + ((*s_cell_to_add_mod_list_scg_ext_v1370)[i1]).to_json(j); + } + j.end_array(); + } + if (p_scell_to_add_mod_v1440_present) { + j.write_fieldname("pSCellToAddMod-v1440"); + p_scell_to_add_mod_v1440->to_json(j); + } + if (s_cell_group_to_release_list_scg_r15_present) { + j.start_array("sCellGroupToReleaseListSCG-r15"); + for (uint32_t i1 = 0; i1 < s_cell_group_to_release_list_scg_r15->size(); ++i1) { + j.write_int(((*s_cell_group_to_release_list_scg_r15)[i1])); + } + j.end_array(); + } + if (s_cell_group_to_add_mod_list_scg_r15_present) { + j.start_array("sCellGroupToAddModListSCG-r15"); + for (uint32_t i1 = 0; i1 < s_cell_group_to_add_mod_list_scg_r15->size(); ++i1) { + ((*s_cell_group_to_add_mod_list_scg_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SCG-ConfigPartSCG-v12f0 ::= SEQUENCE +scg_cfg_part_scg_v12f0_s::scg_cfg_part_scg_v12f0_s() +{ + p_scell_to_add_mod_v12f0_present = false; + s_cell_to_add_mod_list_scg_v12f0_present = false; +} +SRSASN_CODE scg_cfg_part_scg_v12f0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_scell_to_add_mod_v12f0_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_scg_v12f0_present, 1)); + + if (p_scell_to_add_mod_v12f0_present) { + HANDLE_CODE(p_scell_to_add_mod_v12f0.pack(bref)); + } + if (s_cell_to_add_mod_list_scg_v12f0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_scg_v12f0, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_part_scg_v12f0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_scell_to_add_mod_v12f0_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_scg_v12f0_present, 1)); + + if (p_scell_to_add_mod_v12f0_present) { + HANDLE_CODE(p_scell_to_add_mod_v12f0.unpack(bref)); + } + if (s_cell_to_add_mod_list_scg_v12f0_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_scg_v12f0, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_part_scg_v12f0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p_scell_to_add_mod_v12f0_present) { + j.write_fieldname("pSCellToAddMod-v12f0"); + p_scell_to_add_mod_v12f0.to_json(j); + } + if (s_cell_to_add_mod_list_scg_v12f0_present) { + j.start_array("sCellToAddModListSCG-v12f0"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_scg_v12f0.size(); ++i1) { + s_cell_to_add_mod_list_scg_v12f0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-DiscTxInfoInterFreqListAdd-r13 ::= SEQUENCE +sl_disc_tx_info_inter_freq_list_add_r13_s::sl_disc_tx_info_inter_freq_list_add_r13_s() +{ + ext = false; + disc_tx_freq_to_add_mod_list_r13_present = false; + disc_tx_freq_to_release_list_r13_present = false; +} +SRSASN_CODE sl_disc_tx_info_inter_freq_list_add_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(disc_tx_freq_to_add_mod_list_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_freq_to_release_list_r13_present, 1)); + + if (disc_tx_freq_to_add_mod_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_tx_freq_to_add_mod_list_r13, 1, 8)); + } + if (disc_tx_freq_to_release_list_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, disc_tx_freq_to_release_list_r13, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_info_inter_freq_list_add_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(disc_tx_freq_to_add_mod_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_freq_to_release_list_r13_present, 1)); + + if (disc_tx_freq_to_add_mod_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_tx_freq_to_add_mod_list_r13, bref, 1, 8)); + } + if (disc_tx_freq_to_release_list_r13_present) { + HANDLE_CODE( + unpack_dyn_seq_of(disc_tx_freq_to_release_list_r13, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + + return SRSASN_SUCCESS; +} +void sl_disc_tx_info_inter_freq_list_add_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_tx_freq_to_add_mod_list_r13_present) { + j.start_array("discTxFreqToAddModList-r13"); + for (uint32_t i1 = 0; i1 < disc_tx_freq_to_add_mod_list_r13.size(); ++i1) { + disc_tx_freq_to_add_mod_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_tx_freq_to_release_list_r13_present) { + j.start_array("discTxFreqToReleaseList-r13"); + for (uint32_t i1 = 0; i1 < disc_tx_freq_to_release_list_r13.size(); ++i1) { + j.write_int(disc_tx_freq_to_release_list_r13[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-GapConfig-r13 ::= SEQUENCE +SRSASN_CODE sl_gap_cfg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, gap_pattern_list_r13, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_gap_cfg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(gap_pattern_list_r13, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void sl_gap_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("gapPatternList-r13"); + for (uint32_t i1 = 0; i1 < gap_pattern_list_r13.size(); ++i1) { + gap_pattern_list_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// AltTTT-CellsToAddMod-r12 ::= SEQUENCE +SRSASN_CODE alt_ttt_cells_to_add_mod_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx_r12, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pci_range_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE alt_ttt_cells_to_add_mod_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx_r12, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pci_range_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void alt_ttt_cells_to_add_mod_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex-r12", cell_idx_r12); + j.write_fieldname("physCellIdRange-r12"); + pci_range_r12.to_json(j); + j.end_obj(); +} + +// BlackCellsToAddMod ::= SEQUENCE +SRSASN_CODE black_cells_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pci_range.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE black_cells_to_add_mod_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pci_range.unpack(bref)); + + return SRSASN_SUCCESS; +} +void black_cells_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex", cell_idx); + j.write_fieldname("physCellIdRange"); + pci_range.to_json(j); + j.end_obj(); +} + +// CellsToAddMod ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_enum(bref, cell_individual_offset)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_enum(cell_individual_offset, bref)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex", cell_idx); + j.write_int("physCellId", pci); + j.write_str("cellIndividualOffset", cell_individual_offset.to_string()); + j.end_obj(); +} + +// CellsToAddModCDMA2000 ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)511)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)511)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex", cell_idx); + j.write_int("physCellId", pci); + j.end_obj(); +} + +// CellsToAddModNR-r15 ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx_r15, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, pci_r15, (uint16_t)0, (uint16_t)1007)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx_r15, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(pci_r15, bref, (uint16_t)0, (uint16_t)1007)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex-r15", cell_idx_r15); + j.write_int("physCellId-r15", pci_r15); + j.end_obj(); +} + +// CellsToAddModUTRA-FDD ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_utra_fdd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)511)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_utra_fdd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)511)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_utra_fdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex", cell_idx); + j.write_int("physCellId", pci); + j.end_obj(); +} + +// CellsToAddModUTRA-TDD ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_utra_tdd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint8_t)0, (uint8_t)127)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_utra_tdd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint8_t)0, (uint8_t)127)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_utra_tdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex", cell_idx); + j.write_int("physCellId", pci); + j.end_obj(); +} + +// FlightPathInfoReportConfig-r15 ::= SEQUENCE +flight_path_info_report_cfg_r15_s::flight_path_info_report_cfg_r15_s() +{ + include_time_stamp_r15_present = false; +} +SRSASN_CODE flight_path_info_report_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(include_time_stamp_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, max_way_point_num_r15, (uint8_t)1, (uint8_t)20)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE flight_path_info_report_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(include_time_stamp_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(max_way_point_num_r15, bref, (uint8_t)1, (uint8_t)20)); + + return SRSASN_SUCCESS; +} +void flight_path_info_report_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("maxWayPointNumber-r15", max_way_point_num_r15); + if (include_time_stamp_r15_present) { + j.write_str("includeTimeStamp-r15", "true"); + } + j.end_obj(); +} + +// MeasIdleConfigDedicated-r15 ::= SEQUENCE +meas_idle_cfg_ded_r15_s::meas_idle_cfg_ded_r15_s() +{ + ext = false; + meas_idle_carrier_list_eutra_r15_present = false; +} +SRSASN_CODE meas_idle_cfg_ded_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_idle_carrier_list_eutra_r15_present, 1)); + + if (meas_idle_carrier_list_eutra_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r15, 1, 8)); + } + HANDLE_CODE(pack_enum(bref, meas_idle_dur_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_cfg_ded_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_idle_carrier_list_eutra_r15_present, 1)); + + if (meas_idle_carrier_list_eutra_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r15, bref, 1, 8)); + } + HANDLE_CODE(unpack_enum(meas_idle_dur_r15, bref)); + + return SRSASN_SUCCESS; +} +void meas_idle_cfg_ded_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_idle_carrier_list_eutra_r15_present) { + j.start_array("measIdleCarrierListEUTRA-r15"); + for (uint32_t i1 = 0; i1 < meas_idle_carrier_list_eutra_r15.size(); ++i1) { + meas_idle_carrier_list_eutra_r15[i1].to_json(j); + } + j.end_array(); + } + j.write_str("measIdleDuration-r15", meas_idle_dur_r15.to_string()); + j.end_obj(); +} + +// RRC-InactiveConfig-r15 ::= SEQUENCE +rrc_inactive_cfg_r15_s::rrc_inactive_cfg_r15_s() +{ + ran_paging_cycle_r15_present = false; + ran_notif_area_info_r15_present = false; + periodic_rnau_timer_r15_present = false; + next_hop_chaining_count_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_inactive_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ran_paging_cycle_r15_present, 1)); + HANDLE_CODE(bref.pack(ran_notif_area_info_r15_present, 1)); + HANDLE_CODE(bref.pack(periodic_rnau_timer_r15_present, 1)); + HANDLE_CODE(bref.pack(next_hop_chaining_count_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(full_i_rnti_r15.pack(bref)); + HANDLE_CODE(short_i_rnti_r15.pack(bref)); + if (ran_paging_cycle_r15_present) { + HANDLE_CODE(pack_enum(bref, ran_paging_cycle_r15)); + } + if (ran_notif_area_info_r15_present) { + HANDLE_CODE(ran_notif_area_info_r15.pack(bref)); + } + if (periodic_rnau_timer_r15_present) { + HANDLE_CODE(pack_enum(bref, periodic_rnau_timer_r15)); + } + if (next_hop_chaining_count_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, next_hop_chaining_count_r15, (uint8_t)0, (uint8_t)7)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_inactive_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ran_paging_cycle_r15_present, 1)); + HANDLE_CODE(bref.unpack(ran_notif_area_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(periodic_rnau_timer_r15_present, 1)); + HANDLE_CODE(bref.unpack(next_hop_chaining_count_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(full_i_rnti_r15.unpack(bref)); + HANDLE_CODE(short_i_rnti_r15.unpack(bref)); + if (ran_paging_cycle_r15_present) { + HANDLE_CODE(unpack_enum(ran_paging_cycle_r15, bref)); + } + if (ran_notif_area_info_r15_present) { + HANDLE_CODE(ran_notif_area_info_r15.unpack(bref)); + } + if (periodic_rnau_timer_r15_present) { + HANDLE_CODE(unpack_enum(periodic_rnau_timer_r15, bref)); + } + if (next_hop_chaining_count_r15_present) { + HANDLE_CODE(unpack_unalign_integer(next_hop_chaining_count_r15, bref, (uint8_t)0, (uint8_t)7)); + } + + return SRSASN_SUCCESS; +} +void rrc_inactive_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("fullI-RNTI-r15", full_i_rnti_r15.to_string()); + j.write_str("shortI-RNTI-r15", short_i_rnti_r15.to_string()); + if (ran_paging_cycle_r15_present) { + j.write_str("ran-PagingCycle-r15", ran_paging_cycle_r15.to_string()); + } + if (ran_notif_area_info_r15_present) { + j.write_fieldname("ran-NotificationAreaInfo-r15"); + ran_notif_area_info_r15.to_json(j); + } + if (periodic_rnau_timer_r15_present) { + j.write_str("periodic-RNAU-timer-r15", periodic_rnau_timer_r15.to_string()); + } + if (next_hop_chaining_count_r15_present) { + j.write_int("nextHopChainingCount-r15", next_hop_chaining_count_r15); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v1310-IEs ::= SEQUENCE +rrc_conn_recfg_v1310_ies_s::rrc_conn_recfg_v1310_ies_s() +{ + s_cell_to_release_list_ext_r13_present = false; + s_cell_to_add_mod_list_ext_r13_present = false; + lwa_cfg_r13_present = false; + lwip_cfg_r13_present = false; + rclwi_cfg_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(s_cell_to_release_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(lwa_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(lwip_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(rclwi_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (s_cell_to_release_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_release_list_ext_r13, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (s_cell_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_ext_r13, 1, 31)); + } + if (lwa_cfg_r13_present) { + HANDLE_CODE(lwa_cfg_r13.pack(bref)); + } + if (lwip_cfg_r13_present) { + HANDLE_CODE(lwip_cfg_r13.pack(bref)); + } + if (rclwi_cfg_r13_present) { + HANDLE_CODE(rclwi_cfg_r13.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(s_cell_to_release_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(lwa_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(lwip_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(rclwi_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (s_cell_to_release_list_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_release_list_ext_r13, bref, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (s_cell_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_ext_r13, bref, 1, 31)); + } + if (lwa_cfg_r13_present) { + HANDLE_CODE(lwa_cfg_r13.unpack(bref)); + } + if (lwip_cfg_r13_present) { + HANDLE_CODE(lwip_cfg_r13.unpack(bref)); + } + if (rclwi_cfg_r13_present) { + HANDLE_CODE(rclwi_cfg_r13.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (s_cell_to_release_list_ext_r13_present) { + j.start_array("sCellToReleaseListExt-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_ext_r13.size(); ++i1) { + j.write_int(s_cell_to_release_list_ext_r13[i1]); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_ext_r13_present) { + j.start_array("sCellToAddModListExt-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_ext_r13.size(); ++i1) { + s_cell_to_add_mod_list_ext_r13[i1].to_json(j); + } + j.end_array(); + } + if (lwa_cfg_r13_present) { + j.write_fieldname("lwa-Configuration-r13"); + lwa_cfg_r13.to_json(j); + } + if (lwip_cfg_r13_present) { + j.write_fieldname("lwip-Configuration-r13"); + lwip_cfg_r13.to_json(j); + } + if (rclwi_cfg_r13_present) { + j.write_fieldname("rclwi-Configuration-r13"); + rclwi_cfg_r13.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v1370-IEs ::= SEQUENCE +rrc_conn_recfg_v1370_ies_s::rrc_conn_recfg_v1370_ies_s() +{ + rr_cfg_ded_v1370_present = false; + s_cell_to_add_mod_list_ext_v1370_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1370_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_ded_v1370_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_ext_v1370_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rr_cfg_ded_v1370_present) { + HANDLE_CODE(rr_cfg_ded_v1370.pack(bref)); + } + if (s_cell_to_add_mod_list_ext_v1370_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_ext_v1370, 1, 31)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1370_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_ded_v1370_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_ext_v1370_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rr_cfg_ded_v1370_present) { + HANDLE_CODE(rr_cfg_ded_v1370.unpack(bref)); + } + if (s_cell_to_add_mod_list_ext_v1370_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_ext_v1370, bref, 1, 31)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1370_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_ded_v1370_present) { + j.write_fieldname("radioResourceConfigDedicated-v1370"); + rr_cfg_ded_v1370.to_json(j); + } + if (s_cell_to_add_mod_list_ext_v1370_present) { + j.start_array("sCellToAddModListExt-v1370"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_ext_v1370.size(); ++i1) { + s_cell_to_add_mod_list_ext_v1370[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SCG-Configuration-r12 ::= CHOICE +void scg_cfg_r12_c::set(types::options e) +{ + type_ = e; +} +void scg_cfg_r12_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(); + if (c.scg_cfg_part_mcg_r12_present) { + j.write_fieldname("scg-ConfigPartMCG-r12"); + j.start_obj(); + if (c.scg_cfg_part_mcg_r12.scg_counter_r12_present) { + j.write_int("scg-Counter-r12", c.scg_cfg_part_mcg_r12.scg_counter_r12); + } + if (c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12_present) { + j.write_fieldname("powerCoordinationInfo-r12"); + c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12.to_json(j); + } + j.end_obj(); + } + if (c.scg_cfg_part_scg_r12_present) { + j.write_fieldname("scg-ConfigPartSCG-r12"); + c.scg_cfg_part_scg_r12.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE scg_cfg_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.scg_cfg_part_mcg_r12_present, 1)); + HANDLE_CODE(bref.pack(c.scg_cfg_part_scg_r12_present, 1)); + if (c.scg_cfg_part_mcg_r12_present) { + bref.pack(c.scg_cfg_part_mcg_r12.ext, 1); + HANDLE_CODE(bref.pack(c.scg_cfg_part_mcg_r12.scg_counter_r12_present, 1)); + HANDLE_CODE(bref.pack(c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12_present, 1)); + if (c.scg_cfg_part_mcg_r12.scg_counter_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.scg_cfg_part_mcg_r12.scg_counter_r12, (uint16_t)0, (uint16_t)65535)); + } + if (c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12_present) { + HANDLE_CODE(c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12.pack(bref)); + } + } + if (c.scg_cfg_part_scg_r12_present) { + HANDLE_CODE(c.scg_cfg_part_scg_r12.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.scg_cfg_part_mcg_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.scg_cfg_part_scg_r12_present, 1)); + if (c.scg_cfg_part_mcg_r12_present) { + bref.unpack(c.scg_cfg_part_mcg_r12.ext, 1); + HANDLE_CODE(bref.unpack(c.scg_cfg_part_mcg_r12.scg_counter_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12_present, 1)); + if (c.scg_cfg_part_mcg_r12.scg_counter_r12_present) { + HANDLE_CODE( + unpack_unalign_integer(c.scg_cfg_part_mcg_r12.scg_counter_r12, bref, (uint16_t)0, (uint16_t)65535)); + } + if (c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12_present) { + HANDLE_CODE(c.scg_cfg_part_mcg_r12.pwr_coordination_info_r12.unpack(bref)); + } + } + if (c.scg_cfg_part_scg_r12_present) { + HANDLE_CODE(c.scg_cfg_part_scg_r12.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +scg_cfg_r12_c::setup_s_::setup_s_() +{ + scg_cfg_part_mcg_r12_present = false; + scg_cfg_part_scg_r12_present = false; +} + +scg_cfg_r12_c::setup_s_::scg_cfg_part_mcg_r12_s_::scg_cfg_part_mcg_r12_s_() +{ + ext = false; + scg_counter_r12_present = false; + pwr_coordination_info_r12_present = false; +} + +// SCG-Configuration-v12f0 ::= CHOICE +void scg_cfg_v12f0_c::set(types::options e) +{ + type_ = e; +} +void scg_cfg_v12f0_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(); + if (c.scg_cfg_part_scg_v12f0_present) { + j.write_fieldname("scg-ConfigPartSCG-v12f0"); + c.scg_cfg_part_scg_v12f0.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "scg_cfg_v12f0_c"); + } + j.end_obj(); +} +SRSASN_CODE scg_cfg_v12f0_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.scg_cfg_part_scg_v12f0_present, 1)); + if (c.scg_cfg_part_scg_v12f0_present) { + HANDLE_CODE(c.scg_cfg_part_scg_v12f0.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "scg_cfg_v12f0_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_v12f0_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.scg_cfg_part_scg_v12f0_present, 1)); + if (c.scg_cfg_part_scg_v12f0_present) { + HANDLE_CODE(c.scg_cfg_part_scg_v12f0.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "scg_cfg_v12f0_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +scg_cfg_v12f0_c::setup_s_::setup_s_() +{ + scg_cfg_part_scg_v12f0_present = false; +} + +// SL-CommConfig-r12 ::= SEQUENCE +sl_comm_cfg_r12_s::sl_comm_cfg_r12_s() +{ + ext = false; + comm_tx_res_r12_present = false; + comm_tx_res_v1310_present = false; + comm_tx_allow_relay_ded_r13_present = false; +} +SRSASN_CODE sl_comm_cfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(comm_tx_res_r12_present, 1)); + + if (comm_tx_res_r12_present) { + HANDLE_CODE(comm_tx_res_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(comm_tx_res_v1310_present != (comm_tx_res_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= comm_tx_res_v1310_present; + group_flags[0] |= comm_tx_allow_relay_ded_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(comm_tx_res_v1310_present, 1)); + HANDLE_CODE(bref.pack(comm_tx_allow_relay_ded_r13_present, 1)); + if (comm_tx_res_v1310_present) { + HANDLE_CODE(comm_tx_res_v1310->pack(bref)); + } + if (comm_tx_allow_relay_ded_r13_present) { + HANDLE_CODE(bref.pack(comm_tx_allow_relay_ded_r13, 1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_cfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(comm_tx_res_r12_present, 1)); + + if (comm_tx_res_r12_present) { + HANDLE_CODE(comm_tx_res_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(comm_tx_res_v1310_present, 1)); + HANDLE_CODE(bref.unpack(comm_tx_allow_relay_ded_r13_present, 1)); + if (comm_tx_res_v1310_present) { + comm_tx_res_v1310 = make_copy_ptr(comm_tx_res_v1310_c_()); + HANDLE_CODE(comm_tx_res_v1310->unpack(bref)); + } + if (comm_tx_allow_relay_ded_r13_present) { + HANDLE_CODE(bref.unpack(comm_tx_allow_relay_ded_r13, 1)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_comm_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (comm_tx_res_r12_present) { + j.write_fieldname("commTxResources-r12"); + comm_tx_res_r12.to_json(j); + } + if (comm_tx_res_v1310_present) { + j.write_fieldname("commTxResources-v1310"); + comm_tx_res_v1310->to_json(j); + } + if (comm_tx_allow_relay_ded_r13_present) { + j.write_bool("commTxAllowRelayDedicated-r13", comm_tx_allow_relay_ded_r13); + } + j.end_obj(); +} + +void sl_comm_cfg_r12_s::comm_tx_res_r12_c_::set(types::options e) +{ + type_ = e; +} +void sl_comm_cfg_r12_s::comm_tx_res_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_r12: + c.destroy(); + break; + case types::ue_sel_r12: + c.destroy(); + break; + default: + break; + } +} +void sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_r12: + c.init(); + break; + case types::ue_sel_r12: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_"); + } +} +sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::setup_c_(const sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_r12: + c.init(other.c.get()); + break; + case types::ue_sel_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_"); + } +} +sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_& sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_:: + operator=(const sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_r12: + c.set(other.c.get()); + break; + case types::ue_sel_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_"); + } + + return *this; +} +void sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_r12: + j.write_fieldname("scheduled-r12"); + j.start_obj(); + j.write_str("sl-RNTI-r12", c.get().sl_rnti_r12.to_string()); + j.write_fieldname("mac-MainConfig-r12"); + c.get().mac_main_cfg_r12.to_json(j); + j.write_fieldname("sc-CommTxConfig-r12"); + c.get().sc_comm_tx_cfg_r12.to_json(j); + if (c.get().mcs_r12_present) { + j.write_int("mcs-r12", c.get().mcs_r12); + } + j.end_obj(); + break; + case types::ue_sel_r12: + j.write_fieldname("ue-Selected-r12"); + j.start_obj(); + j.write_fieldname("commTxPoolNormalDedicated-r12"); + j.start_obj(); + if (c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12_present) { + j.start_array("poolToReleaseList-r12"); + for (uint32_t i1 = 0; i1 < c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12.size(); + ++i1) { + j.write_int(c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12[i1]); + } + j.end_array(); + } + if (c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12_present) { + j.start_array("poolToAddModList-r12"); + for (uint32_t i1 = 0; i1 < c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12.size(); + ++i1) { + c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_r12: + HANDLE_CODE(bref.pack(c.get().mcs_r12_present, 1)); + HANDLE_CODE(c.get().sl_rnti_r12.pack(bref)); + HANDLE_CODE(c.get().mac_main_cfg_r12.pack(bref)); + HANDLE_CODE(c.get().sc_comm_tx_cfg_r12.pack(bref)); + if (c.get().mcs_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.get().mcs_r12, (uint8_t)0, (uint8_t)28)); + } + break; + case types::ue_sel_r12: + HANDLE_CODE(bref.pack(c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12_present, 1)); + HANDLE_CODE(bref.pack(c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12_present, 1)); + if (c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12, + 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_r12: + HANDLE_CODE(bref.unpack(c.get().mcs_r12_present, 1)); + HANDLE_CODE(c.get().sl_rnti_r12.unpack(bref)); + HANDLE_CODE(c.get().mac_main_cfg_r12.unpack(bref)); + HANDLE_CODE(c.get().sc_comm_tx_cfg_r12.unpack(bref)); + if (c.get().mcs_r12_present) { + HANDLE_CODE(unpack_unalign_integer(c.get().mcs_r12, bref, (uint8_t)0, (uint8_t)28)); + } + break; + case types::ue_sel_r12: + HANDLE_CODE(bref.unpack(c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12_present, 1)); + if (c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12, bref, + 1, 4, UnalignedIntegerPacker(1, 4))); + } + if (c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12, bref, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::sched_r12_s_::sched_r12_s_() +{ + mcs_r12_present = false; +} + +sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::ue_sel_r12_s_::comm_tx_pool_normal_ded_r12_s_:: + comm_tx_pool_normal_ded_r12_s_() +{ + pool_to_release_list_r12_present = false; + pool_to_add_mod_list_r12_present = false; +} + +void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::set(types::options e) +{ + type_ = e; +} +void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_v1310: + c.destroy(); + break; + case types::ue_sel_v1310: + c.destroy(); + break; + default: + break; + } +} +void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_v1310: + c.init(); + break; + case types::ue_sel_v1310: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_"); + } +} +sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::setup_c_( + const sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_v1310: + c.init(other.c.get()); + break; + case types::ue_sel_v1310: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_"); + } +} +sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_& sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_:: + operator=(const sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_v1310: + c.set(other.c.get()); + break; + case types::ue_sel_v1310: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_"); + } + + return *this; +} +void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_v1310: + j.write_fieldname("scheduled-v1310"); + j.start_obj(); + j.start_array("logicalChGroupInfoList-r13"); + for (uint32_t i1 = 0; i1 < c.get().lc_ch_group_info_list_r13.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < c.get().lc_ch_group_info_list_r13[i1].size(); ++i2) { + j.write_int(c.get().lc_ch_group_info_list_r13[i1][i2]); + } + j.end_array(); + } + j.end_array(); + j.write_bool("multipleTx-r13", c.get().multiple_tx_r13); + j.end_obj(); + break; + case types::ue_sel_v1310: + j.write_fieldname("ue-Selected-v1310"); + j.start_obj(); + j.write_fieldname("commTxPoolNormalDedicatedExt-r13"); + j.start_obj(); + if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13_present) { + j.start_array("poolToReleaseListExt-r13"); + for (uint32_t i1 = 0; + i1 < c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13.size(); ++i1) { + j.write_int(c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13[i1]); + } + j.end_array(); + } + if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13_present) { + j.start_array("poolToAddModListExt-r13"); + for (uint32_t i1 = 0; + i1 < c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13.size(); ++i1) { + c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_v1310: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get().lc_ch_group_info_list_r13, 1, 4, + SeqOfPacker >(1, 8, UnalignedIntegerPacker(1, 8)))); + HANDLE_CODE(bref.pack(c.get().multiple_tx_r13, 1)); + break; + case types::ue_sel_v1310: + HANDLE_CODE( + bref.pack(c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13_present, 1)); + HANDLE_CODE( + bref.pack(c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13_present, 1)); + if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13, + 1, 4, UnalignedIntegerPacker(5, 8))); + } + if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_v1310: + HANDLE_CODE(unpack_dyn_seq_of( + c.get().lc_ch_group_info_list_r13, bref, 1, 4, + SeqOfPacker >(1, 8, UnalignedIntegerPacker(1, 8)))); + HANDLE_CODE(bref.unpack(c.get().multiple_tx_r13, 1)); + break; + case types::ue_sel_v1310: + HANDLE_CODE(bref.unpack( + c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack( + c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13_present, 1)); + if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13, + bref, 1, 4, UnalignedIntegerPacker(5, 8))); + } + if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of( + c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13, bref, 1, 4)); + } + break; + default: + log_invalid_choice_id(type_, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::ue_sel_v1310_s_::comm_tx_pool_normal_ded_ext_r13_s_:: + comm_tx_pool_normal_ded_ext_r13_s_() +{ + pool_to_release_list_ext_r13_present = false; + pool_to_add_mod_list_ext_r13_present = false; +} + +// SL-DiscConfig-r12 ::= SEQUENCE +sl_disc_cfg_r12_s::sl_disc_cfg_r12_s() +{ + ext = false; + disc_tx_res_r12_present = false; + disc_tf_idx_list_v1260_present = false; + disc_tx_res_ps_r13_present = false; + disc_tx_inter_freq_info_r13_present = false; + gap_requests_allowed_ded_r13_present = false; + disc_rx_gap_cfg_r13_present = false; + disc_tx_gap_cfg_r13_present = false; + disc_sys_info_to_report_cfg_r13_present = false; +} +SRSASN_CODE sl_disc_cfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(disc_tx_res_r12_present, 1)); + + if (disc_tx_res_r12_present) { + HANDLE_CODE(disc_tx_res_r12.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(disc_tf_idx_list_v1260_present != (disc_tf_idx_list_v1260.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= disc_tf_idx_list_v1260_present; + rrc_asn1_warn_assert(disc_tx_res_ps_r13_present != (disc_tx_res_ps_r13.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= disc_tx_res_ps_r13_present; + rrc_asn1_warn_assert(disc_tx_inter_freq_info_r13_present != (disc_tx_inter_freq_info_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= disc_tx_inter_freq_info_r13_present; + group_flags[1] |= gap_requests_allowed_ded_r13_present; + rrc_asn1_warn_assert(disc_rx_gap_cfg_r13_present != (disc_rx_gap_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= disc_rx_gap_cfg_r13_present; + rrc_asn1_warn_assert(disc_tx_gap_cfg_r13_present != (disc_tx_gap_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= disc_tx_gap_cfg_r13_present; + rrc_asn1_warn_assert(disc_sys_info_to_report_cfg_r13_present != (disc_sys_info_to_report_cfg_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= disc_sys_info_to_report_cfg_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(disc_tf_idx_list_v1260_present, 1)); + if (disc_tf_idx_list_v1260_present) { + HANDLE_CODE(disc_tf_idx_list_v1260->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(disc_tx_res_ps_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_inter_freq_info_r13_present, 1)); + HANDLE_CODE(bref.pack(gap_requests_allowed_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_rx_gap_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_gap_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_sys_info_to_report_cfg_r13_present, 1)); + if (disc_tx_res_ps_r13_present) { + HANDLE_CODE(disc_tx_res_ps_r13->pack(bref)); + } + if (disc_tx_inter_freq_info_r13_present) { + HANDLE_CODE(disc_tx_inter_freq_info_r13->pack(bref)); + } + if (gap_requests_allowed_ded_r13_present) { + HANDLE_CODE(bref.pack(gap_requests_allowed_ded_r13, 1)); + } + if (disc_rx_gap_cfg_r13_present) { + HANDLE_CODE(disc_rx_gap_cfg_r13->pack(bref)); + } + if (disc_tx_gap_cfg_r13_present) { + HANDLE_CODE(disc_tx_gap_cfg_r13->pack(bref)); + } + if (disc_sys_info_to_report_cfg_r13_present) { + HANDLE_CODE(disc_sys_info_to_report_cfg_r13->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(disc_tx_res_r12_present, 1)); + + if (disc_tx_res_r12_present) { + HANDLE_CODE(disc_tx_res_r12.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(disc_tf_idx_list_v1260_present, 1)); + if (disc_tf_idx_list_v1260_present) { + disc_tf_idx_list_v1260 = make_copy_ptr(disc_tf_idx_list_v1260_c_()); + HANDLE_CODE(disc_tf_idx_list_v1260->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(disc_tx_res_ps_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_inter_freq_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(gap_requests_allowed_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_rx_gap_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_gap_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_sys_info_to_report_cfg_r13_present, 1)); + if (disc_tx_res_ps_r13_present) { + disc_tx_res_ps_r13 = make_copy_ptr(disc_tx_res_ps_r13_c_()); + HANDLE_CODE(disc_tx_res_ps_r13->unpack(bref)); + } + if (disc_tx_inter_freq_info_r13_present) { + disc_tx_inter_freq_info_r13 = make_copy_ptr(disc_tx_inter_freq_info_r13_c_()); + HANDLE_CODE(disc_tx_inter_freq_info_r13->unpack(bref)); + } + if (gap_requests_allowed_ded_r13_present) { + HANDLE_CODE(bref.unpack(gap_requests_allowed_ded_r13, 1)); + } + if (disc_rx_gap_cfg_r13_present) { + disc_rx_gap_cfg_r13 = make_copy_ptr(disc_rx_gap_cfg_r13_c_()); + HANDLE_CODE(disc_rx_gap_cfg_r13->unpack(bref)); + } + if (disc_tx_gap_cfg_r13_present) { + disc_tx_gap_cfg_r13 = make_copy_ptr(disc_tx_gap_cfg_r13_c_()); + HANDLE_CODE(disc_tx_gap_cfg_r13->unpack(bref)); + } + if (disc_sys_info_to_report_cfg_r13_present) { + disc_sys_info_to_report_cfg_r13 = make_copy_ptr(disc_sys_info_to_report_cfg_r13_c_()); + HANDLE_CODE(disc_sys_info_to_report_cfg_r13->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_disc_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_tx_res_r12_present) { + j.write_fieldname("discTxResources-r12"); + disc_tx_res_r12.to_json(j); + } + if (disc_tf_idx_list_v1260_present) { + j.write_fieldname("discTF-IndexList-v1260"); + disc_tf_idx_list_v1260->to_json(j); + } + if (disc_tx_res_ps_r13_present) { + j.write_fieldname("discTxResourcesPS-r13"); + disc_tx_res_ps_r13->to_json(j); + } + if (disc_tx_inter_freq_info_r13_present) { + j.write_fieldname("discTxInterFreqInfo-r13"); + disc_tx_inter_freq_info_r13->to_json(j); + } + if (gap_requests_allowed_ded_r13_present) { + j.write_bool("gapRequestsAllowedDedicated-r13", gap_requests_allowed_ded_r13); + } + if (disc_rx_gap_cfg_r13_present) { + j.write_fieldname("discRxGapConfig-r13"); + disc_rx_gap_cfg_r13->to_json(j); + } + if (disc_tx_gap_cfg_r13_present) { + j.write_fieldname("discTxGapConfig-r13"); + disc_tx_gap_cfg_r13->to_json(j); + } + if (disc_sys_info_to_report_cfg_r13_present) { + j.write_fieldname("discSysInfoToReportConfig-r13"); + disc_sys_info_to_report_cfg_r13->to_json(j); + } + j.end_obj(); +} + +void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_r12: + c.destroy(); + break; + case types::ue_sel_r12: + c.destroy(); + break; + default: + break; + } +} +void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_r12: + c.init(); + break; + case types::ue_sel_r12: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_"); + } +} +sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::setup_c_(const sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_r12: + c.init(other.c.get()); + break; + case types::ue_sel_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_"); + } +} +sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_& sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_:: + operator=(const sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_r12: + c.set(other.c.get()); + break; + case types::ue_sel_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_"); + } + + return *this; +} +void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_r12: + j.write_fieldname("scheduled-r12"); + j.start_obj(); + if (c.get().disc_tx_cfg_r12_present) { + j.write_fieldname("discTxConfig-r12"); + c.get().disc_tx_cfg_r12.to_json(j); + } + if (c.get().disc_tf_idx_list_r12_present) { + j.start_array("discTF-IndexList-r12"); + for (uint32_t i1 = 0; i1 < c.get().disc_tf_idx_list_r12.size(); ++i1) { + c.get().disc_tf_idx_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (c.get().disc_hop_cfg_r12_present) { + j.write_fieldname("discHoppingConfig-r12"); + c.get().disc_hop_cfg_r12.to_json(j); + } + j.end_obj(); + break; + case types::ue_sel_r12: + j.write_fieldname("ue-Selected-r12"); + j.start_obj(); + if (c.get().disc_tx_pool_ded_r12_present) { + j.write_fieldname("discTxPoolDedicated-r12"); + j.start_obj(); + if (c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12_present) { + j.start_array("poolToReleaseList-r12"); + for (uint32_t i1 = 0; i1 < c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12.size(); + ++i1) { + j.write_int(c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12[i1]); + } + j.end_array(); + } + if (c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12_present) { + j.start_array("poolToAddModList-r12"); + for (uint32_t i1 = 0; i1 < c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12.size(); + ++i1) { + c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_r12: + HANDLE_CODE(bref.pack(c.get().disc_tx_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(c.get().disc_tf_idx_list_r12_present, 1)); + HANDLE_CODE(bref.pack(c.get().disc_hop_cfg_r12_present, 1)); + if (c.get().disc_tx_cfg_r12_present) { + HANDLE_CODE(c.get().disc_tx_cfg_r12.pack(bref)); + } + if (c.get().disc_tf_idx_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().disc_tf_idx_list_r12, 1, 64)); + } + if (c.get().disc_hop_cfg_r12_present) { + HANDLE_CODE(c.get().disc_hop_cfg_r12.pack(bref)); + } + break; + case types::ue_sel_r12: + HANDLE_CODE(bref.pack(c.get().disc_tx_pool_ded_r12_present, 1)); + if (c.get().disc_tx_pool_ded_r12_present) { + HANDLE_CODE(bref.pack(c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12_present, 1)); + HANDLE_CODE(bref.pack(c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12_present, 1)); + if (c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12, 1, 4, + UnalignedIntegerPacker(1, 4))); + } + if (c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12, 1, 4)); + } + } + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_r12: + HANDLE_CODE(bref.unpack(c.get().disc_tx_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.get().disc_tf_idx_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.get().disc_hop_cfg_r12_present, 1)); + if (c.get().disc_tx_cfg_r12_present) { + HANDLE_CODE(c.get().disc_tx_cfg_r12.unpack(bref)); + } + if (c.get().disc_tf_idx_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().disc_tf_idx_list_r12, bref, 1, 64)); + } + if (c.get().disc_hop_cfg_r12_present) { + HANDLE_CODE(c.get().disc_hop_cfg_r12.unpack(bref)); + } + break; + case types::ue_sel_r12: + HANDLE_CODE(bref.unpack(c.get().disc_tx_pool_ded_r12_present, 1)); + if (c.get().disc_tx_pool_ded_r12_present) { + HANDLE_CODE(bref.unpack(c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12_present, 1)); + if (c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12, bref, 1, + 4, UnalignedIntegerPacker(1, 4))); + } + if (c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12, bref, 1, 4)); + } + } + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::sched_r12_s_::sched_r12_s_() +{ + disc_tx_cfg_r12_present = false; + disc_tf_idx_list_r12_present = false; + disc_hop_cfg_r12_present = false; +} + +sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::ue_sel_r12_s_::ue_sel_r12_s_() +{ + disc_tx_pool_ded_r12_present = false; +} + +sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::ue_sel_r12_s_::disc_tx_pool_ded_r12_s_::disc_tx_pool_ded_r12_s_() +{ + pool_to_release_list_r12_present = false; + pool_to_add_mod_list_r12_present = false; +} + +void sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_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.start_array("discTF-IndexList-r12b"); + for (uint32_t i1 = 0; i1 < c.disc_tf_idx_list_r12b.size(); ++i1) { + c.disc_tf_idx_list_r12b[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.disc_tf_idx_list_r12b, 1, 64)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.disc_tf_idx_list_r12b, bref, 1, 64)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::destroy_() +{ + switch (type_) { + case types::sched_r13: + c.destroy(); + break; + case types::ue_sel_r13: + c.destroy(); + break; + default: + break; + } +} +void sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sched_r13: + c.init(); + break; + case types::ue_sel_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_"); + } +} +sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::setup_c_( + const sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sched_r13: + c.init(other.c.get()); + break; + case types::ue_sel_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_"); + } +} +sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_& sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_:: + operator=(const sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sched_r13: + c.set(other.c.get()); + break; + case types::ue_sel_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_"); + } + + return *this; +} +void sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sched_r13: + j.write_fieldname("scheduled-r13"); + c.get().to_json(j); + break; + case types::ue_sel_r13: + j.write_fieldname("ue-Selected-r13"); + j.start_obj(); + j.write_fieldname("discTxPoolPS-Dedicated-r13"); + c.get().disc_tx_pool_ps_ded_r13.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sched_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_sel_r13: + HANDLE_CODE(c.get().disc_tx_pool_ps_ded_r13.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sched_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_sel_r13: + HANDLE_CODE(c.get().disc_tx_pool_ps_ded_r13.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_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(); + if (c.disc_tx_carrier_freq_r13_present) { + j.write_int("discTxCarrierFreq-r13", c.disc_tx_carrier_freq_r13); + } + if (c.disc_tx_ref_carrier_ded_r13_present) { + j.write_fieldname("discTxRefCarrierDedicated-r13"); + c.disc_tx_ref_carrier_ded_r13.to_json(j); + } + if (c.disc_tx_info_inter_freq_list_add_r13_present) { + j.write_fieldname("discTxInfoInterFreqListAdd-r13"); + c.disc_tx_info_inter_freq_list_add_r13.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.disc_tx_carrier_freq_r13_present, 1)); + HANDLE_CODE(bref.pack(c.disc_tx_ref_carrier_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(c.disc_tx_info_inter_freq_list_add_r13_present, 1)); + if (c.disc_tx_carrier_freq_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.disc_tx_carrier_freq_r13, (uint32_t)0, (uint32_t)262143)); + } + if (c.disc_tx_ref_carrier_ded_r13_present) { + HANDLE_CODE(c.disc_tx_ref_carrier_ded_r13.pack(bref)); + } + if (c.disc_tx_info_inter_freq_list_add_r13_present) { + HANDLE_CODE(c.disc_tx_info_inter_freq_list_add_r13.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.disc_tx_carrier_freq_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.disc_tx_ref_carrier_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.disc_tx_info_inter_freq_list_add_r13_present, 1)); + if (c.disc_tx_carrier_freq_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.disc_tx_carrier_freq_r13, bref, (uint32_t)0, (uint32_t)262143)); + } + if (c.disc_tx_ref_carrier_ded_r13_present) { + HANDLE_CODE(c.disc_tx_ref_carrier_ded_r13.unpack(bref)); + } + if (c.disc_tx_info_inter_freq_list_add_r13_present) { + HANDLE_CODE(c.disc_tx_info_inter_freq_list_add_r13.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sl_disc_cfg_r12_s::disc_tx_inter_freq_info_r13_c_::setup_s_::setup_s_() +{ + disc_tx_carrier_freq_r13_present = false; + disc_tx_ref_carrier_ded_r13_present = false; + disc_tx_info_inter_freq_list_add_r13_present = false; +} + +void sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_rx_gap_cfg_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_tx_gap_cfg_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_::set(types::options e) +{ + type_ = e; +} +void sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + j.write_int(c[i1]); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 8, UnalignedIntegerPacker(0, 262143))); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + break; + default: + log_invalid_choice_id(type_, "sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-SyncTxControl-r12 ::= SEQUENCE +sl_sync_tx_ctrl_r12_s::sl_sync_tx_ctrl_r12_s() +{ + network_ctrl_sync_tx_r12_present = false; +} +SRSASN_CODE sl_sync_tx_ctrl_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(network_ctrl_sync_tx_r12_present, 1)); + + if (network_ctrl_sync_tx_r12_present) { + HANDLE_CODE(pack_enum(bref, network_ctrl_sync_tx_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_sync_tx_ctrl_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(network_ctrl_sync_tx_r12_present, 1)); + + if (network_ctrl_sync_tx_r12_present) { + HANDLE_CODE(unpack_enum(network_ctrl_sync_tx_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void sl_sync_tx_ctrl_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (network_ctrl_sync_tx_r12_present) { + j.write_str("networkControlledSyncTx-r12", network_ctrl_sync_tx_r12.to_string()); + } + j.end_obj(); +} + +// UECapabilityEnquiry-v1530-IEs ::= SEQUENCE +ue_cap_enquiry_v1530_ies_s::ue_cap_enquiry_v1530_ies_s() +{ + request_stti_spt_cap_r15_present = false; + eutra_nr_only_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(request_stti_spt_cap_r15_present, 1)); + HANDLE_CODE(bref.pack(eutra_nr_only_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(request_stti_spt_cap_r15_present, 1)); + HANDLE_CODE(bref.unpack(eutra_nr_only_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (request_stti_spt_cap_r15_present) { + j.write_str("requestSTTI-SPT-Capability-r15", "true"); + } + if (eutra_nr_only_r15_present) { + j.write_str("eutra-nr-only-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// WhiteCellsToAddMod-r13 ::= SEQUENCE +SRSASN_CODE white_cells_to_add_mod_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, cell_idx_r13, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pci_range_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE white_cells_to_add_mod_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(cell_idx_r13, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pci_range_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void white_cells_to_add_mod_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndex-r13", cell_idx_r13); + j.write_fieldname("physCellIdRange-r13"); + pci_range_r13.to_json(j); + j.end_obj(); +} + +// BT-NameListConfig-r15 ::= CHOICE +void bt_name_list_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void bt_name_list_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + j.write_str(c[i1].to_string()); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "bt_name_list_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE bt_name_list_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 4)); + break; + default: + log_invalid_choice_id(type_, "bt_name_list_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bt_name_list_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 4)); + break; + default: + log_invalid_choice_id(type_, "bt_name_list_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSG-AllowedReportingCells-r9 ::= SEQUENCE +csg_allowed_report_cells_r9_s::csg_allowed_report_cells_r9_s() +{ + pci_range_utra_fdd_list_r9_present = false; +} +SRSASN_CODE csg_allowed_report_cells_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pci_range_utra_fdd_list_r9_present, 1)); + + if (pci_range_utra_fdd_list_r9_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pci_range_utra_fdd_list_r9, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csg_allowed_report_cells_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pci_range_utra_fdd_list_r9_present, 1)); + + if (pci_range_utra_fdd_list_r9_present) { + HANDLE_CODE(unpack_dyn_seq_of(pci_range_utra_fdd_list_r9, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void csg_allowed_report_cells_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pci_range_utra_fdd_list_r9_present) { + j.start_array("physCellIdRangeUTRA-FDDList-r9"); + for (uint32_t i1 = 0; i1 < pci_range_utra_fdd_list_r9.size(); ++i1) { + pci_range_utra_fdd_list_r9[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CarrierFreqGERAN ::= SEQUENCE +SRSASN_CODE carrier_freq_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, arfcn, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(pack_enum(bref, band_ind)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(arfcn, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(unpack_enum(band_ind, bref)); + + return SRSASN_SUCCESS; +} +void carrier_freq_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("arfcn", arfcn); + j.write_str("bandIndicator", band_ind.to_string()); + j.end_obj(); +} + +// MeasDS-Config-r12 ::= CHOICE +void meas_ds_cfg_r12_c::set(types::options e) +{ + type_ = e; +} +void meas_ds_cfg_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("dmtc-PeriodOffset-r12"); + c.dmtc_period_offset_r12.to_json(j); + j.write_fieldname("ds-OccasionDuration-r12"); + c.ds_occasion_dur_r12.to_json(j); + if (c.meas_csi_rs_to_rem_list_r12_present) { + j.start_array("measCSI-RS-ToRemoveList-r12"); + for (uint32_t i1 = 0; i1 < c.meas_csi_rs_to_rem_list_r12.size(); ++i1) { + j.write_int(c.meas_csi_rs_to_rem_list_r12[i1]); + } + j.end_array(); + } + if (c.meas_csi_rs_to_add_mod_list_r12_present) { + j.start_array("measCSI-RS-ToAddModList-r12"); + for (uint32_t i1 = 0; i1 < c.meas_csi_rs_to_add_mod_list_r12.size(); ++i1) { + c.meas_csi_rs_to_add_mod_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_ds_cfg_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.meas_csi_rs_to_rem_list_r12_present, 1)); + HANDLE_CODE(bref.pack(c.meas_csi_rs_to_add_mod_list_r12_present, 1)); + HANDLE_CODE(c.dmtc_period_offset_r12.pack(bref)); + HANDLE_CODE(c.ds_occasion_dur_r12.pack(bref)); + if (c.meas_csi_rs_to_rem_list_r12_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.meas_csi_rs_to_rem_list_r12, 1, 96, UnalignedIntegerPacker(1, 96))); + } + if (c.meas_csi_rs_to_add_mod_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.meas_csi_rs_to_add_mod_list_r12, 1, 96)); + } + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_ds_cfg_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.meas_csi_rs_to_rem_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(c.meas_csi_rs_to_add_mod_list_r12_present, 1)); + HANDLE_CODE(c.dmtc_period_offset_r12.unpack(bref)); + HANDLE_CODE(c.ds_occasion_dur_r12.unpack(bref)); + if (c.meas_csi_rs_to_rem_list_r12_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.meas_csi_rs_to_rem_list_r12, bref, 1, 96, UnalignedIntegerPacker(1, 96))); + } + if (c.meas_csi_rs_to_add_mod_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.meas_csi_rs_to_add_mod_list_r12, bref, 1, 96)); + } + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +meas_ds_cfg_r12_c::setup_s_::setup_s_() +{ + ext = false; + meas_csi_rs_to_rem_list_r12_present = false; + meas_csi_rs_to_add_mod_list_r12_present = false; +} + +void meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::destroy_() {} +void meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::dmtc_period_offset_r12_c_( + const meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ms40_r12: + c.init(other.c.get()); + break; + case types::ms80_r12: + c.init(other.c.get()); + break; + case types::ms160_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_"); + } +} +meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_& meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_:: + operator=(const meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ms40_r12: + c.set(other.c.get()); + break; + case types::ms80_r12: + c.set(other.c.get()); + break; + case types::ms160_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_"); + } + + return *this; +} +void meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ms40_r12: + j.write_int("ms40-r12", c.get()); + break; + case types::ms80_r12: + j.write_int("ms80-r12", c.get()); + break; + case types::ms160_r12: + j.write_int("ms160-r12", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ms40_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::ms80_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::ms160_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ms40_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::ms80_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::ms160_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::destroy_() {} +void meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::ds_occasion_dur_r12_c_( + const meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::dur_fdd_r12: + c.init(other.c.get()); + break; + case types::dur_tdd_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_"); + } +} +meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_& meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_:: + operator=(const meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dur_fdd_r12: + c.set(other.c.get()); + break; + case types::dur_tdd_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_"); + } + + return *this; +} +void meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dur_fdd_r12: + j.write_int("durationFDD-r12", c.get()); + break; + case types::dur_tdd_r12: + j.write_int("durationTDD-r12", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::dur_fdd_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)5)); + break; + case types::dur_tdd_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)2, (uint8_t)5)); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::dur_fdd_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)5)); + break; + case types::dur_tdd_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)2, (uint8_t)5)); + break; + default: + log_invalid_choice_id(type_, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasGapConfig ::= CHOICE +void meas_gap_cfg_c::set(types::options e) +{ + type_ = e; +} +void meas_gap_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_fieldname("gapOffset"); + c.gap_offset.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_gap_cfg_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.gap_offset.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.gap_offset.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_gap_cfg_c::setup_s_::gap_offset_c_::destroy_() {} +void meas_gap_cfg_c::setup_s_::gap_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_gap_cfg_c::setup_s_::gap_offset_c_::gap_offset_c_(const meas_gap_cfg_c::setup_s_::gap_offset_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::gp0: + c.init(other.c.get()); + break; + case types::gp1: + c.init(other.c.get()); + break; + case types::gp2_r14: + c.init(other.c.get()); + break; + case types::gp3_r14: + c.init(other.c.get()); + break; + case types::gp_ncsg0_r14: + c.init(other.c.get()); + break; + case types::gp_ncsg1_r14: + c.init(other.c.get()); + break; + case types::gp_ncsg2_r14: + c.init(other.c.get()); + break; + case types::gp_ncsg3_r14: + c.init(other.c.get()); + break; + case types::gp_non_uniform1_r14: + c.init(other.c.get()); + break; + case types::gp_non_uniform2_r14: + c.init(other.c.get()); + break; + case types::gp_non_uniform3_r14: + c.init(other.c.get()); + break; + case types::gp_non_uniform4_r14: + c.init(other.c.get()); + break; + case types::gp4_r15: + c.init(other.c.get()); + break; + case types::gp5_r15: + c.init(other.c.get()); + break; + case types::gp6_r15: + c.init(other.c.get()); + break; + case types::gp7_r15: + c.init(other.c.get()); + break; + case types::gp8_r15: + c.init(other.c.get()); + break; + case types::gp9_r15: + c.init(other.c.get()); + break; + case types::gp10_r15: + c.init(other.c.get()); + break; + case types::gp11_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c::setup_s_::gap_offset_c_"); + } +} +meas_gap_cfg_c::setup_s_::gap_offset_c_& meas_gap_cfg_c::setup_s_::gap_offset_c_:: + operator=(const meas_gap_cfg_c::setup_s_::gap_offset_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::gp0: + c.set(other.c.get()); + break; + case types::gp1: + c.set(other.c.get()); + break; + case types::gp2_r14: + c.set(other.c.get()); + break; + case types::gp3_r14: + c.set(other.c.get()); + break; + case types::gp_ncsg0_r14: + c.set(other.c.get()); + break; + case types::gp_ncsg1_r14: + c.set(other.c.get()); + break; + case types::gp_ncsg2_r14: + c.set(other.c.get()); + break; + case types::gp_ncsg3_r14: + c.set(other.c.get()); + break; + case types::gp_non_uniform1_r14: + c.set(other.c.get()); + break; + case types::gp_non_uniform2_r14: + c.set(other.c.get()); + break; + case types::gp_non_uniform3_r14: + c.set(other.c.get()); + break; + case types::gp_non_uniform4_r14: + c.set(other.c.get()); + break; + case types::gp4_r15: + c.set(other.c.get()); + break; + case types::gp5_r15: + c.set(other.c.get()); + break; + case types::gp6_r15: + c.set(other.c.get()); + break; + case types::gp7_r15: + c.set(other.c.get()); + break; + case types::gp8_r15: + c.set(other.c.get()); + break; + case types::gp9_r15: + c.set(other.c.get()); + break; + case types::gp10_r15: + c.set(other.c.get()); + break; + case types::gp11_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c::setup_s_::gap_offset_c_"); + } + + return *this; +} +void meas_gap_cfg_c::setup_s_::gap_offset_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::gp0: + j.write_int("gp0", c.get()); + break; + case types::gp1: + j.write_int("gp1", c.get()); + break; + case types::gp2_r14: + j.write_int("gp2-r14", c.get()); + break; + case types::gp3_r14: + j.write_int("gp3-r14", c.get()); + break; + case types::gp_ncsg0_r14: + j.write_int("gp-ncsg0-r14", c.get()); + break; + case types::gp_ncsg1_r14: + j.write_int("gp-ncsg1-r14", c.get()); + break; + case types::gp_ncsg2_r14: + j.write_int("gp-ncsg2-r14", c.get()); + break; + case types::gp_ncsg3_r14: + j.write_int("gp-ncsg3-r14", c.get()); + break; + case types::gp_non_uniform1_r14: + j.write_int("gp-nonUniform1-r14", c.get()); + break; + case types::gp_non_uniform2_r14: + j.write_int("gp-nonUniform2-r14", c.get()); + break; + case types::gp_non_uniform3_r14: + j.write_int("gp-nonUniform3-r14", c.get()); + break; + case types::gp_non_uniform4_r14: + j.write_int("gp-nonUniform4-r14", c.get()); + break; + case types::gp4_r15: + j.write_int("gp4-r15", c.get()); + break; + case types::gp5_r15: + j.write_int("gp5-r15", c.get()); + break; + case types::gp6_r15: + j.write_int("gp6-r15", c.get()); + break; + case types::gp7_r15: + j.write_int("gp7-r15", c.get()); + break; + case types::gp8_r15: + j.write_int("gp8-r15", c.get()); + break; + case types::gp9_r15: + j.write_int("gp9-r15", c.get()); + break; + case types::gp10_r15: + j.write_int("gp10-r15", c.get()); + break; + case types::gp11_r15: + j.write_int("gp11-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c::setup_s_::gap_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_gap_cfg_c::setup_s_::gap_offset_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::gp0: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::gp1: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::gp2_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + } break; + case types::gp3_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + } break; + case types::gp_ncsg0_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + } break; + case types::gp_ncsg1_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + } break; + case types::gp_ncsg2_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + } break; + case types::gp_ncsg3_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + } break; + case types::gp_non_uniform1_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + } break; + case types::gp_non_uniform2_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)2559)); + } break; + case types::gp_non_uniform3_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)5119)); + } break; + case types::gp_non_uniform4_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)10239)); + } break; + case types::gp4_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + } break; + case types::gp5_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + } break; + case types::gp6_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + } break; + case types::gp7_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + } break; + case types::gp8_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + } break; + case types::gp9_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + } break; + case types::gp10_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + } break; + case types::gp11_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + } break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c::setup_s_::gap_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_c::setup_s_::gap_offset_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::gp0: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::gp1: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::gp2_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + } break; + case types::gp3_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + } break; + case types::gp_ncsg0_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + } break; + case types::gp_ncsg1_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + } break; + case types::gp_ncsg2_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + } break; + case types::gp_ncsg3_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + } break; + case types::gp_non_uniform1_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + } break; + case types::gp_non_uniform2_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)2559)); + } break; + case types::gp_non_uniform3_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)5119)); + } break; + case types::gp_non_uniform4_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)10239)); + } break; + case types::gp4_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + } break; + case types::gp5_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + } break; + case types::gp6_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + } break; + case types::gp7_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + } break; + case types::gp8_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + } break; + case types::gp9_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + } break; + case types::gp10_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + } break; + case types::gp11_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + } break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_c::setup_s_::gap_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasRSSI-ReportConfig-r13 ::= SEQUENCE +meas_rssi_report_cfg_r13_s::meas_rssi_report_cfg_r13_s() +{ + ch_occupancy_thres_r13_present = false; +} +SRSASN_CODE meas_rssi_report_cfg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ch_occupancy_thres_r13_present, 1)); + + if (ch_occupancy_thres_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, ch_occupancy_thres_r13, (uint8_t)0, (uint8_t)76)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_rssi_report_cfg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ch_occupancy_thres_r13_present, 1)); + + if (ch_occupancy_thres_r13_present) { + HANDLE_CODE(unpack_unalign_integer(ch_occupancy_thres_r13, bref, (uint8_t)0, (uint8_t)76)); + } + + return SRSASN_SUCCESS; +} +void meas_rssi_report_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ch_occupancy_thres_r13_present) { + j.write_int("channelOccupancyThreshold-r13", ch_occupancy_thres_r13); + } + j.end_obj(); +} + +// MeasSensing-Config-r15 ::= SEQUENCE +SRSASN_CODE meas_sensing_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, sensing_subch_num_r15, (uint8_t)1, (uint8_t)20)); + HANDLE_CODE(pack_enum(bref, sensing_periodicity_r15)); + HANDLE_CODE(pack_unalign_integer(bref, sensing_resel_counter_r15, (uint8_t)5, (uint8_t)75)); + HANDLE_CODE(pack_unalign_integer(bref, sensing_prio_r15, (uint8_t)1, (uint8_t)8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_sensing_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(sensing_subch_num_r15, bref, (uint8_t)1, (uint8_t)20)); + HANDLE_CODE(unpack_enum(sensing_periodicity_r15, bref)); + HANDLE_CODE(unpack_unalign_integer(sensing_resel_counter_r15, bref, (uint8_t)5, (uint8_t)75)); + HANDLE_CODE(unpack_unalign_integer(sensing_prio_r15, bref, (uint8_t)1, (uint8_t)8)); + + return SRSASN_SUCCESS; +} +void meas_sensing_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sensingSubchannelNumber-r15", sensing_subch_num_r15); + j.write_str("sensingPeriodicity-r15", sensing_periodicity_r15.to_string()); + j.write_int("sensingReselectionCounter-r15", sensing_resel_counter_r15); + j.write_int("sensingPriority-r15", sensing_prio_r15); + j.end_obj(); +} + +// MeasSubframePatternConfigNeigh-r10 ::= CHOICE +void meas_sf_pattern_cfg_neigh_r10_c::set(types::options e) +{ + type_ = e; +} +void meas_sf_pattern_cfg_neigh_r10_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("measSubframePatternNeigh-r10"); + c.meas_sf_pattern_neigh_r10.to_json(j); + if (c.meas_sf_cell_list_r10_present) { + j.start_array("measSubframeCellList-r10"); + for (uint32_t i1 = 0; i1 < c.meas_sf_cell_list_r10.size(); ++i1) { + c.meas_sf_cell_list_r10[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_cfg_neigh_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_sf_pattern_cfg_neigh_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.meas_sf_cell_list_r10_present, 1)); + HANDLE_CODE(c.meas_sf_pattern_neigh_r10.pack(bref)); + if (c.meas_sf_cell_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.meas_sf_cell_list_r10, 1, 32)); + } + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_cfg_neigh_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_sf_pattern_cfg_neigh_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.meas_sf_cell_list_r10_present, 1)); + HANDLE_CODE(c.meas_sf_pattern_neigh_r10.unpack(bref)); + if (c.meas_sf_cell_list_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.meas_sf_cell_list_r10, bref, 1, 32)); + } + break; + default: + log_invalid_choice_id(type_, "meas_sf_pattern_cfg_neigh_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +meas_sf_pattern_cfg_neigh_r10_c::setup_s_::setup_s_() +{ + meas_sf_cell_list_r10_present = false; +} + +// MobilityControlInfo-v10l0 ::= SEQUENCE +mob_ctrl_info_v10l0_s::mob_ctrl_info_v10l0_s() +{ + add_spec_emission_v10l0_present = false; +} +SRSASN_CODE mob_ctrl_info_v10l0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_spec_emission_v10l0_present, 1)); + + if (add_spec_emission_v10l0_present) { + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission_v10l0, (uint16_t)33, (uint16_t)288)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_ctrl_info_v10l0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_spec_emission_v10l0_present, 1)); + + if (add_spec_emission_v10l0_present) { + HANDLE_CODE(unpack_unalign_integer(add_spec_emission_v10l0, bref, (uint16_t)33, (uint16_t)288)); + } + + return SRSASN_SUCCESS; +} +void mob_ctrl_info_v10l0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_spec_emission_v10l0_present) { + j.write_int("additionalSpectrumEmission-v10l0", add_spec_emission_v10l0); + } + j.end_obj(); +} + +// PhysCellIdGERAN ::= SEQUENCE +SRSASN_CODE pci_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(network_colour_code.pack(bref)); + HANDLE_CODE(base_station_colour_code.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(network_colour_code.unpack(bref)); + HANDLE_CODE(base_station_colour_code.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pci_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("networkColourCode", network_colour_code.to_string()); + j.write_str("baseStationColourCode", base_station_colour_code.to_string()); + j.end_obj(); +} + +// QuantityConfigRS-NR-r15 ::= SEQUENCE +quant_cfg_rs_nr_r15_s::quant_cfg_rs_nr_r15_s() +{ + filt_coeff_rsrp_r15_present = false; + filt_coeff_rsrq_r15_present = false; + filt_coef_sinr_r13_present = false; +} +SRSASN_CODE quant_cfg_rs_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coeff_rsrp_r15_present, 1)); + HANDLE_CODE(bref.pack(filt_coeff_rsrq_r15_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_sinr_r13_present, 1)); + + if (filt_coeff_rsrp_r15_present) { + HANDLE_CODE(pack_enum(bref, filt_coeff_rsrp_r15)); + } + if (filt_coeff_rsrq_r15_present) { + HANDLE_CODE(pack_enum(bref, filt_coeff_rsrq_r15)); + } + if (filt_coef_sinr_r13_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_sinr_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_rs_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coeff_rsrp_r15_present, 1)); + HANDLE_CODE(bref.unpack(filt_coeff_rsrq_r15_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_sinr_r13_present, 1)); + + if (filt_coeff_rsrp_r15_present) { + HANDLE_CODE(unpack_enum(filt_coeff_rsrp_r15, bref)); + } + if (filt_coeff_rsrq_r15_present) { + HANDLE_CODE(unpack_enum(filt_coeff_rsrq_r15, bref)); + } + if (filt_coef_sinr_r13_present) { + HANDLE_CODE(unpack_enum(filt_coef_sinr_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_rs_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (filt_coeff_rsrp_r15_present) { + j.write_str("filterCoeff-RSRP-r15", filt_coeff_rsrp_r15.to_string()); + } + if (filt_coeff_rsrq_r15_present) { + j.write_str("filterCoeff-RSRQ-r15", filt_coeff_rsrq_r15.to_string()); + } + if (filt_coef_sinr_r13_present) { + j.write_str("filterCoefficient-SINR-r13", filt_coef_sinr_r13.to_string()); + } + j.end_obj(); +} + +// RMTC-Config-r13 ::= CHOICE +void rmtc_cfg_r13_c::set(types::options e) +{ + type_ = e; +} +void rmtc_cfg_r13_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("rmtc-Period-r13", c.rmtc_period_r13.to_string()); + if (c.rmtc_sf_offset_r13_present) { + j.write_int("rmtc-SubframeOffset-r13", c.rmtc_sf_offset_r13); + } + j.write_str("measDuration-r13", c.meas_dur_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rmtc_cfg_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE rmtc_cfg_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.rmtc_sf_offset_r13_present, 1)); + HANDLE_CODE(pack_enum(bref, c.rmtc_period_r13)); + if (c.rmtc_sf_offset_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.rmtc_sf_offset_r13, (uint16_t)0, (uint16_t)639)); + } + HANDLE_CODE(pack_enum(bref, c.meas_dur_r13)); + break; + default: + log_invalid_choice_id(type_, "rmtc_cfg_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rmtc_cfg_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.rmtc_sf_offset_r13_present, 1)); + HANDLE_CODE(unpack_enum(c.rmtc_period_r13, bref)); + if (c.rmtc_sf_offset_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.rmtc_sf_offset_r13, bref, (uint16_t)0, (uint16_t)639)); + } + HANDLE_CODE(unpack_enum(c.meas_dur_r13, bref)); + break; + default: + log_invalid_choice_id(type_, "rmtc_cfg_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rmtc_cfg_r13_c::setup_s_::setup_s_() +{ + ext = false; + rmtc_sf_offset_r13_present = false; +} + +// RRCConnectionReconfiguration-v1250-IEs ::= SEQUENCE +rrc_conn_recfg_v1250_ies_s::rrc_conn_recfg_v1250_ies_s() +{ + wlan_offload_info_r12_present = false; + scg_cfg_r12_present = false; + sl_sync_tx_ctrl_r12_present = false; + sl_disc_cfg_r12_present = false; + sl_comm_cfg_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(wlan_offload_info_r12_present, 1)); + HANDLE_CODE(bref.pack(scg_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(sl_sync_tx_ctrl_r12_present, 1)); + HANDLE_CODE(bref.pack(sl_disc_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(sl_comm_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (wlan_offload_info_r12_present) { + HANDLE_CODE(wlan_offload_info_r12.pack(bref)); + } + if (scg_cfg_r12_present) { + HANDLE_CODE(scg_cfg_r12.pack(bref)); + } + if (sl_sync_tx_ctrl_r12_present) { + HANDLE_CODE(sl_sync_tx_ctrl_r12.pack(bref)); + } + if (sl_disc_cfg_r12_present) { + HANDLE_CODE(sl_disc_cfg_r12.pack(bref)); + } + if (sl_comm_cfg_r12_present) { + HANDLE_CODE(sl_comm_cfg_r12.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(wlan_offload_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(scg_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(sl_sync_tx_ctrl_r12_present, 1)); + HANDLE_CODE(bref.unpack(sl_disc_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(sl_comm_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (wlan_offload_info_r12_present) { + HANDLE_CODE(wlan_offload_info_r12.unpack(bref)); + } + if (scg_cfg_r12_present) { + HANDLE_CODE(scg_cfg_r12.unpack(bref)); + } + if (sl_sync_tx_ctrl_r12_present) { + HANDLE_CODE(sl_sync_tx_ctrl_r12.unpack(bref)); + } + if (sl_disc_cfg_r12_present) { + HANDLE_CODE(sl_disc_cfg_r12.unpack(bref)); + } + if (sl_comm_cfg_r12_present) { + HANDLE_CODE(sl_comm_cfg_r12.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_offload_info_r12_present) { + j.write_fieldname("wlan-OffloadInfo-r12"); + wlan_offload_info_r12.to_json(j); + } + if (scg_cfg_r12_present) { + j.write_fieldname("scg-Configuration-r12"); + scg_cfg_r12.to_json(j); + } + if (sl_sync_tx_ctrl_r12_present) { + j.write_fieldname("sl-SyncTxControl-r12"); + sl_sync_tx_ctrl_r12.to_json(j); + } + if (sl_disc_cfg_r12_present) { + j.write_fieldname("sl-DiscConfig-r12"); + sl_disc_cfg_r12.to_json(j); + } + if (sl_comm_cfg_r12_present) { + j.write_fieldname("sl-CommConfig-r12"); + sl_comm_cfg_r12.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("wlan-OffloadConfigDedicated-r12"); + c.wlan_offload_cfg_ded_r12.to_json(j); + if (c.t350_r12_present) { + j.write_str("t350-r12", c.t350_r12.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.t350_r12_present, 1)); + HANDLE_CODE(c.wlan_offload_cfg_ded_r12.pack(bref)); + if (c.t350_r12_present) { + HANDLE_CODE(pack_enum(bref, c.t350_r12)); + } + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.t350_r12_present, 1)); + HANDLE_CODE(c.wlan_offload_cfg_ded_r12.unpack(bref)); + if (c.t350_r12_present) { + HANDLE_CODE(unpack_enum(c.t350_r12, bref)); + } + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::setup_s_() +{ + t350_r12_present = false; +} + +// RRCConnectionReconfiguration-v12f0-IEs ::= SEQUENCE +rrc_conn_recfg_v12f0_ies_s::rrc_conn_recfg_v12f0_ies_s() +{ + scg_cfg_v12f0_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v12f0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scg_cfg_v12f0_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (scg_cfg_v12f0_present) { + HANDLE_CODE(scg_cfg_v12f0.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v12f0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scg_cfg_v12f0_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (scg_cfg_v12f0_present) { + HANDLE_CODE(scg_cfg_v12f0.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_conn_recfg_v12f0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scg_cfg_v12f0_present) { + j.write_fieldname("scg-Configuration-v12f0"); + scg_cfg_v12f0.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionRelease-v1530-IEs ::= SEQUENCE +rrc_conn_release_v1530_ies_s::rrc_conn_release_v1530_ies_s() +{ + drb_continue_rohc_r15_present = false; + next_hop_chaining_count_r15_present = false; + meas_idle_cfg_r15_present = false; + rrc_inactive_cfg_r15_present = false; + cn_type_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drb_continue_rohc_r15_present, 1)); + HANDLE_CODE(bref.pack(next_hop_chaining_count_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_idle_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(rrc_inactive_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(cn_type_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (next_hop_chaining_count_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, next_hop_chaining_count_r15, (uint8_t)0, (uint8_t)7)); + } + if (meas_idle_cfg_r15_present) { + HANDLE_CODE(meas_idle_cfg_r15.pack(bref)); + } + if (rrc_inactive_cfg_r15_present) { + HANDLE_CODE(rrc_inactive_cfg_r15.pack(bref)); + } + if (cn_type_r15_present) { + HANDLE_CODE(pack_enum(bref, cn_type_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drb_continue_rohc_r15_present, 1)); + HANDLE_CODE(bref.unpack(next_hop_chaining_count_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_idle_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(rrc_inactive_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(cn_type_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (next_hop_chaining_count_r15_present) { + HANDLE_CODE(unpack_unalign_integer(next_hop_chaining_count_r15, bref, (uint8_t)0, (uint8_t)7)); + } + if (meas_idle_cfg_r15_present) { + HANDLE_CODE(meas_idle_cfg_r15.unpack(bref)); + } + if (rrc_inactive_cfg_r15_present) { + HANDLE_CODE(rrc_inactive_cfg_r15.unpack(bref)); + } + if (cn_type_r15_present) { + HANDLE_CODE(unpack_enum(cn_type_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drb_continue_rohc_r15_present) { + j.write_str("drb-ContinueROHC-r15", "true"); + } + if (next_hop_chaining_count_r15_present) { + j.write_int("nextHopChainingCount-r15", next_hop_chaining_count_r15); + } + if (meas_idle_cfg_r15_present) { + j.write_fieldname("measIdleConfig-r15"); + meas_idle_cfg_r15.to_json(j); + } + if (rrc_inactive_cfg_r15_present) { + j.write_fieldname("rrc-InactiveConfig-r15"); + rrc_inactive_cfg_r15.to_json(j); + } + if (cn_type_r15_present) { + j.write_str("cn-Type-r15", cn_type_r15.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RS-ConfigSSB-NR-r15 ::= SEQUENCE +rs_cfg_ssb_nr_r15_s::rs_cfg_ssb_nr_r15_s() +{ + ext = false; +} +SRSASN_CODE rs_cfg_ssb_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(meas_timing_cfg_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, subcarrier_spacing_ssb_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rs_cfg_ssb_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(meas_timing_cfg_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(subcarrier_spacing_ssb_r15, bref)); + + return SRSASN_SUCCESS; +} +void rs_cfg_ssb_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measTimingConfig-r15"); + meas_timing_cfg_r15.to_json(j); + j.write_str("subcarrierSpacingSSB-r15", subcarrier_spacing_ssb_r15.to_string()); + j.end_obj(); +} + +// RSRQ-RangeConfig-r12 ::= CHOICE +void rsrq_range_cfg_r12_c::set(types::options e) +{ + type_ = e; +} +void rsrq_range_cfg_r12_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + } + j.end_obj(); +} +SRSASN_CODE rsrq_range_cfg_r12_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c, (int8_t)-30, (int8_t)46)); + break; + default: + log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rsrq_range_cfg_r12_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c, bref, (int8_t)-30, (int8_t)46)); + break; + default: + log_invalid_choice_id(type_, "rsrq_range_cfg_r12_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ReportQuantityNR-r15 ::= SEQUENCE +SRSASN_CODE report_quant_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ss_rsrp, 1)); + HANDLE_CODE(bref.pack(ss_rsrq, 1)); + HANDLE_CODE(bref.pack(ss_sinr, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_quant_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ss_rsrp, 1)); + HANDLE_CODE(bref.unpack(ss_rsrq, 1)); + HANDLE_CODE(bref.unpack(ss_sinr, 1)); + + return SRSASN_SUCCESS; +} +void report_quant_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("ss-rsrp", ss_rsrp); + j.write_bool("ss-rsrq", ss_rsrq); + j.write_bool("ss-sinr", ss_sinr); + j.end_obj(); +} + +// ReportQuantityWLAN-r13 ::= SEQUENCE +report_quant_wlan_r13_s::report_quant_wlan_r13_s() +{ + ext = false; + band_request_wlan_r13_present = false; + carrier_info_request_wlan_r13_present = false; + available_admission_capacity_request_wlan_r13_present = false; + backhaul_dl_bw_request_wlan_r13_present = false; + backhaul_ul_bw_request_wlan_r13_present = false; + ch_utilization_request_wlan_r13_present = false; + station_count_request_wlan_r13_present = false; +} +SRSASN_CODE report_quant_wlan_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(band_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(carrier_info_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(available_admission_capacity_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(backhaul_dl_bw_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(backhaul_ul_bw_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(ch_utilization_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(station_count_request_wlan_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_quant_wlan_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(band_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(carrier_info_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(available_admission_capacity_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(backhaul_dl_bw_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(backhaul_ul_bw_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(ch_utilization_request_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(station_count_request_wlan_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void report_quant_wlan_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_request_wlan_r13_present) { + j.write_str("bandRequestWLAN-r13", "true"); + } + if (carrier_info_request_wlan_r13_present) { + j.write_str("carrierInfoRequestWLAN-r13", "true"); + } + if (available_admission_capacity_request_wlan_r13_present) { + j.write_str("availableAdmissionCapacityRequestWLAN-r13", "true"); + } + if (backhaul_dl_bw_request_wlan_r13_present) { + j.write_str("backhaulDL-BandwidthRequestWLAN-r13", "true"); + } + if (backhaul_ul_bw_request_wlan_r13_present) { + j.write_str("backhaulUL-BandwidthRequestWLAN-r13", "true"); + } + if (ch_utilization_request_wlan_r13_present) { + j.write_str("channelUtilizationRequestWLAN-r13", "true"); + } + if (station_count_request_wlan_r13_present) { + j.write_str("stationCountRequestWLAN-r13", "true"); + } + j.end_obj(); +} + +// TargetMBSFN-Area-r12 ::= SEQUENCE +target_mbsfn_area_r12_s::target_mbsfn_area_r12_s() +{ + ext = false; + mbsfn_area_id_r12_present = false; +} +SRSASN_CODE target_mbsfn_area_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mbsfn_area_id_r12_present, 1)); + + if (mbsfn_area_id_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, mbsfn_area_id_r12, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE target_mbsfn_area_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(mbsfn_area_id_r12_present, 1)); + + if (mbsfn_area_id_r12_present) { + HANDLE_CODE(unpack_unalign_integer(mbsfn_area_id_r12, bref, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +void target_mbsfn_area_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbsfn_area_id_r12_present) { + j.write_int("mbsfn-AreaId-r12", mbsfn_area_id_r12); + } + j.write_int("carrierFreq-r12", carrier_freq_r12); + j.end_obj(); +} + +// ThresholdEUTRA ::= CHOICE +void thres_eutra_c::destroy_() {} +void thres_eutra_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +thres_eutra_c::thres_eutra_c(const thres_eutra_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::thres_rsrp: + c.init(other.c.get()); + break; + case types::thres_rsrq: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "thres_eutra_c"); + } +} +thres_eutra_c& thres_eutra_c::operator=(const thres_eutra_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::thres_rsrp: + c.set(other.c.get()); + break; + case types::thres_rsrq: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "thres_eutra_c"); + } + + return *this; +} +void thres_eutra_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::thres_rsrp: + j.write_int("threshold-RSRP", c.get()); + break; + case types::thres_rsrq: + j.write_int("threshold-RSRQ", c.get()); + break; + default: + log_invalid_choice_id(type_, "thres_eutra_c"); + } + j.end_obj(); +} +SRSASN_CODE thres_eutra_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::thres_rsrp: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)97)); + break; + case types::thres_rsrq: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)34)); + break; + default: + log_invalid_choice_id(type_, "thres_eutra_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE thres_eutra_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::thres_rsrp: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)97)); + break; + case types::thres_rsrq: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)34)); + break; + default: + log_invalid_choice_id(type_, "thres_eutra_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ThresholdNR-r15 ::= CHOICE +void thres_nr_r15_c::destroy_() {} +void thres_nr_r15_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +thres_nr_r15_c::thres_nr_r15_c(const thres_nr_r15_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_rsrp_r15: + c.init(other.c.get()); + break; + case types::nr_rsrq_r15: + c.init(other.c.get()); + break; + case types::nr_sinr_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "thres_nr_r15_c"); + } +} +thres_nr_r15_c& thres_nr_r15_c::operator=(const thres_nr_r15_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_rsrp_r15: + c.set(other.c.get()); + break; + case types::nr_rsrq_r15: + c.set(other.c.get()); + break; + case types::nr_sinr_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "thres_nr_r15_c"); + } + + return *this; +} +void thres_nr_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_rsrp_r15: + j.write_int("nr-RSRP-r15", c.get()); + break; + case types::nr_rsrq_r15: + j.write_int("nr-RSRQ-r15", c.get()); + break; + case types::nr_sinr_r15: + j.write_int("nr-SINR-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "thres_nr_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE thres_nr_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::nr_rsrp_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + case types::nr_rsrq_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + case types::nr_sinr_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "thres_nr_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE thres_nr_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::nr_rsrp_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + case types::nr_rsrq_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + case types::nr_sinr_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "thres_nr_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ThresholdUTRA ::= CHOICE +void thres_utra_c::destroy_() {} +void thres_utra_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +thres_utra_c::thres_utra_c(const thres_utra_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::utra_rscp: + c.init(other.c.get()); + break; + case types::utra_ec_n0: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "thres_utra_c"); + } +} +thres_utra_c& thres_utra_c::operator=(const thres_utra_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::utra_rscp: + c.set(other.c.get()); + break; + case types::utra_ec_n0: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "thres_utra_c"); + } + + return *this; +} +void thres_utra_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::utra_rscp: + j.write_int("utra-RSCP", c.get()); + break; + case types::utra_ec_n0: + j.write_int("utra-EcN0", c.get()); + break; + default: + log_invalid_choice_id(type_, "thres_utra_c"); + } + j.end_obj(); +} +SRSASN_CODE thres_utra_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::utra_rscp: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (int8_t)-5, (int8_t)91)); + break; + case types::utra_ec_n0: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)49)); + break; + default: + log_invalid_choice_id(type_, "thres_utra_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE thres_utra_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::utra_rscp: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (int8_t)-5, (int8_t)91)); + break; + case types::utra_ec_n0: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)49)); + break; + default: + log_invalid_choice_id(type_, "thres_utra_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UECapabilityEnquiry-v1510-IEs ::= SEQUENCE +ue_cap_enquiry_v1510_ies_s::ue_cap_enquiry_v1510_ies_s() +{ + requested_freq_bands_nr_mrdc_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_v1510_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_freq_bands_nr_mrdc_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (requested_freq_bands_nr_mrdc_r15_present) { + HANDLE_CODE(requested_freq_bands_nr_mrdc_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1510_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(requested_freq_bands_nr_mrdc_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (requested_freq_bands_nr_mrdc_r15_present) { + HANDLE_CODE(requested_freq_bands_nr_mrdc_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1510_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_freq_bands_nr_mrdc_r15_present) { + j.write_str("requestedFreqBandsNR-MRDC-r15", requested_freq_bands_nr_mrdc_r15.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationRequest-v1530-IEs ::= SEQUENCE +ue_info_request_v1530_ies_s::ue_info_request_v1530_ies_s() +{ + idle_mode_meas_req_r15_present = false; + flight_path_info_req_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_request_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idle_mode_meas_req_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_info_req_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (flight_path_info_req_r15_present) { + HANDLE_CODE(flight_path_info_req_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idle_mode_meas_req_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_info_req_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (flight_path_info_req_r15_present) { + HANDLE_CODE(flight_path_info_req_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_request_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idle_mode_meas_req_r15_present) { + j.write_str("idleModeMeasurementReq-r15", "true"); + } + if (flight_path_info_req_r15_present) { + j.write_fieldname("flightPathInfoReq-r15"); + flight_path_info_req_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UL-DelayConfig-r13 ::= CHOICE +void ul_delay_cfg_r13_c::set(types::options e) +{ + type_ = e; +} +void ul_delay_cfg_r13_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("delayThreshold-r13", c.delay_thres_r13.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "ul_delay_cfg_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE ul_delay_cfg_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.delay_thres_r13)); + break; + default: + log_invalid_choice_id(type_, "ul_delay_cfg_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_delay_cfg_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.delay_thres_r13, bref)); + break; + default: + log_invalid_choice_id(type_, "ul_delay_cfg_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// WLAN-CarrierInfo-r13 ::= SEQUENCE +wlan_carrier_info_r13_s::wlan_carrier_info_r13_s() +{ + ext = false; + operating_class_r13_present = false; + country_code_r13_present = false; + ch_nums_r13_present = false; +} +SRSASN_CODE wlan_carrier_info_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(operating_class_r13_present, 1)); + HANDLE_CODE(bref.pack(country_code_r13_present, 1)); + HANDLE_CODE(bref.pack(ch_nums_r13_present, 1)); + + if (operating_class_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, operating_class_r13, (uint8_t)0, (uint8_t)255)); + } + if (country_code_r13_present) { + HANDLE_CODE(pack_enum(bref, country_code_r13)); + } + if (ch_nums_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ch_nums_r13, 1, 16, UnalignedIntegerPacker(0, 255))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_carrier_info_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(operating_class_r13_present, 1)); + HANDLE_CODE(bref.unpack(country_code_r13_present, 1)); + HANDLE_CODE(bref.unpack(ch_nums_r13_present, 1)); + + if (operating_class_r13_present) { + HANDLE_CODE(unpack_unalign_integer(operating_class_r13, bref, (uint8_t)0, (uint8_t)255)); + } + if (country_code_r13_present) { + HANDLE_CODE(unpack_enum(country_code_r13, bref)); + } + if (ch_nums_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(ch_nums_r13, bref, 1, 16, UnalignedIntegerPacker(0, 255))); + } + + return SRSASN_SUCCESS; +} +void wlan_carrier_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (operating_class_r13_present) { + j.write_int("operatingClass-r13", operating_class_r13); + } + if (country_code_r13_present) { + j.write_str("countryCode-r13", country_code_r13.to_string()); + } + if (ch_nums_r13_present) { + j.start_array("channelNumbers-r13"); + for (uint32_t i1 = 0; i1 < ch_nums_r13.size(); ++i1) { + j.write_int(ch_nums_r13[i1]); + } + j.end_array(); + } + j.end_obj(); +} + +// WLAN-NameListConfig-r15 ::= CHOICE +void wlan_name_list_cfg_r15_c::set(types::options e) +{ + type_ = e; +} +void wlan_name_list_cfg_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + j.write_str(c[i1].to_string()); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "wlan_name_list_cfg_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE wlan_name_list_cfg_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 4)); + break; + default: + log_invalid_choice_id(type_, "wlan_name_list_cfg_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_name_list_cfg_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 4)); + break; + default: + log_invalid_choice_id(type_, "wlan_name_list_cfg_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CellInfoGERAN-r9 ::= SEQUENCE +SRSASN_CODE cell_info_geran_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pci_r9.pack(bref)); + HANDLE_CODE(carrier_freq_r9.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, sys_info_r9, 1, 10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_info_geran_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(pci_r9.unpack(bref)); + HANDLE_CODE(carrier_freq_r9.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(sys_info_r9, bref, 1, 10)); + + return SRSASN_SUCCESS; +} +void cell_info_geran_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("physCellId-r9"); + pci_r9.to_json(j); + j.write_fieldname("carrierFreq-r9"); + carrier_freq_r9.to_json(j); + j.start_array("systemInformation-r9"); + for (uint32_t i1 = 0; i1 < sys_info_r9.size(); ++i1) { + j.write_str(sys_info_r9[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// CellInfoUTRA-FDD-r9 ::= SEQUENCE +SRSASN_CODE cell_info_utra_fdd_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pci_r9, (uint16_t)0, (uint16_t)511)); + HANDLE_CODE(utra_bcch_container_r9.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_info_utra_fdd_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pci_r9, bref, (uint16_t)0, (uint16_t)511)); + HANDLE_CODE(utra_bcch_container_r9.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_info_utra_fdd_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r9", pci_r9); + j.write_str("utra-BCCH-Container-r9", utra_bcch_container_r9.to_string()); + j.end_obj(); +} + +// CellInfoUTRA-TDD-r10 ::= SEQUENCE +SRSASN_CODE cell_info_utra_tdd_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pci_r10, (uint8_t)0, (uint8_t)127)); + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r10, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(utra_bcch_container_r10.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_info_utra_tdd_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pci_r10, bref, (uint8_t)0, (uint8_t)127)); + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r10, bref, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(utra_bcch_container_r10.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_info_utra_tdd_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r10", pci_r10); + j.write_int("carrierFreq-r10", carrier_freq_r10); + j.write_str("utra-BCCH-Container-r10", utra_bcch_container_r10.to_string()); + j.end_obj(); +} + +// CellInfoUTRA-TDD-r9 ::= SEQUENCE +SRSASN_CODE cell_info_utra_tdd_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, pci_r9, (uint8_t)0, (uint8_t)127)); + HANDLE_CODE(utra_bcch_container_r9.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_info_utra_tdd_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(pci_r9, bref, (uint8_t)0, (uint8_t)127)); + HANDLE_CODE(utra_bcch_container_r9.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_info_utra_tdd_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r9", pci_r9); + j.write_str("utra-BCCH-Container-r9", utra_bcch_container_r9.to_string()); + j.end_obj(); +} + +// DRB-CountMSB-Info ::= SEQUENCE +SRSASN_CODE drb_count_msb_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, drb_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, count_msb_ul, (uint32_t)0, (uint32_t)33554431)); + HANDLE_CODE(pack_unalign_integer(bref, count_msb_dl, (uint32_t)0, (uint32_t)33554431)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_count_msb_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(drb_id, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(count_msb_ul, bref, (uint32_t)0, (uint32_t)33554431)); + HANDLE_CODE(unpack_unalign_integer(count_msb_dl, bref, (uint32_t)0, (uint32_t)33554431)); + + 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(); +} + +// IDC-Config-r11 ::= SEQUENCE +idc_cfg_r11_s::idc_cfg_r11_s() +{ + ext = false; + idc_ind_r11_present = false; + autonomous_denial_params_r11_present = false; + idc_ind_ul_ca_r11_present = false; + idc_hardware_sharing_ind_r13_present = false; + idc_ind_mrdc_r15_present = false; +} +SRSASN_CODE idc_cfg_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(idc_ind_r11_present, 1)); + HANDLE_CODE(bref.pack(autonomous_denial_params_r11_present, 1)); + + if (autonomous_denial_params_r11_present) { + HANDLE_CODE(pack_enum(bref, autonomous_denial_params_r11.autonomous_denial_sfs_r11)); + HANDLE_CODE(pack_enum(bref, autonomous_denial_params_r11.autonomous_denial_validity_r11)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags[0] |= idc_ind_ul_ca_r11_present; + group_flags[1] |= idc_hardware_sharing_ind_r13_present; + rrc_asn1_warn_assert(idc_ind_mrdc_r15_present != (idc_ind_mrdc_r15.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= idc_ind_mrdc_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(idc_ind_ul_ca_r11_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(idc_hardware_sharing_ind_r13_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(idc_ind_mrdc_r15_present, 1)); + if (idc_ind_mrdc_r15_present) { + HANDLE_CODE(idc_ind_mrdc_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE idc_cfg_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(idc_ind_r11_present, 1)); + HANDLE_CODE(bref.unpack(autonomous_denial_params_r11_present, 1)); + + if (autonomous_denial_params_r11_present) { + HANDLE_CODE(unpack_enum(autonomous_denial_params_r11.autonomous_denial_sfs_r11, bref)); + HANDLE_CODE(unpack_enum(autonomous_denial_params_r11.autonomous_denial_validity_r11, bref)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(idc_ind_ul_ca_r11_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(idc_hardware_sharing_ind_r13_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(idc_ind_mrdc_r15_present, 1)); + if (idc_ind_mrdc_r15_present) { + idc_ind_mrdc_r15 = make_copy_ptr(idc_ind_mrdc_r15_c_()); + HANDLE_CODE(idc_ind_mrdc_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void idc_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idc_ind_r11_present) { + j.write_str("idc-Indication-r11", "setup"); + } + if (autonomous_denial_params_r11_present) { + j.write_fieldname("autonomousDenialParameters-r11"); + j.start_obj(); + j.write_str("autonomousDenialSubframes-r11", autonomous_denial_params_r11.autonomous_denial_sfs_r11.to_string()); + j.write_str("autonomousDenialValidity-r11", + autonomous_denial_params_r11.autonomous_denial_validity_r11.to_string()); + j.end_obj(); + } + if (idc_ind_ul_ca_r11_present) { + j.write_str("idc-Indication-UL-CA-r11", "setup"); + } + if (idc_hardware_sharing_ind_r13_present) { + j.write_str("idc-HardwareSharingIndication-r13", "setup"); + } + if (idc_ind_mrdc_r15_present) { + j.write_fieldname("idc-Indication-MRDC-r15"); + idc_ind_mrdc_r15->to_json(j); + } + j.end_obj(); +} + +void idc_cfg_r11_s::idc_ind_mrdc_r15_c_::set(types::options e) +{ + type_ = e; +} +void idc_cfg_r11_s::idc_ind_mrdc_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.start_array("setup"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + j.write_int(c[i1]); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "idc_cfg_r11_s::idc_ind_mrdc_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE idc_cfg_r11_s::idc_ind_mrdc_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 32, UnalignedIntegerPacker(0, 3279165))); + break; + default: + log_invalid_choice_id(type_, "idc_cfg_r11_s::idc_ind_mrdc_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE idc_cfg_r11_s::idc_ind_mrdc_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 32, UnalignedIntegerPacker(0, 3279165))); + break; + default: + log_invalid_choice_id(type_, "idc_cfg_r11_s::idc_ind_mrdc_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE +logged_meas_cfg_v1530_ies_s::logged_meas_cfg_v1530_ies_s() +{ + bt_name_list_r15_present = false; + wlan_name_list_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE logged_meas_cfg_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(bt_name_list_r15_present, 1)); + HANDLE_CODE(bref.pack(wlan_name_list_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (bt_name_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, bt_name_list_r15, 1, 4)); + } + if (wlan_name_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_name_list_r15, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(bt_name_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(wlan_name_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (bt_name_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(bt_name_list_r15, bref, 1, 4)); + } + if (wlan_name_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_name_list_r15, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (bt_name_list_r15_present) { + j.start_array("bt-NameList-r15"); + for (uint32_t i1 = 0; i1 < bt_name_list_r15.size(); ++i1) { + j.write_str(bt_name_list_r15[i1].to_string()); + } + j.end_array(); + } + if (wlan_name_list_r15_present) { + j.start_array("wlan-NameList-r15"); + for (uint32_t i1 = 0; i1 < wlan_name_list_r15.size(); ++i1) { + j.write_str(wlan_name_list_r15[i1].to_string()); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// MeasGapConfigPerCC-r14 ::= SEQUENCE +SRSASN_CODE meas_gap_cfg_per_cc_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, serv_cell_id_r14, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(meas_gap_cfg_cc_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_per_cc_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(serv_cell_id_r14, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(meas_gap_cfg_cc_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_gap_cfg_per_cc_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellId-r14", serv_cell_id_r14); + j.write_fieldname("measGapConfigCC-r14"); + meas_gap_cfg_cc_r14.to_json(j); + j.end_obj(); +} + +// MeasObjectCDMA2000 ::= SEQUENCE +meas_obj_cdma2000_s::meas_obj_cdma2000_s() +{ + ext = false; + search_win_size_present = false; + offset_freq_present = false; + cells_to_rem_list_present = false; + cells_to_add_mod_list_present = false; + cell_for_which_to_report_cgi_present = false; +} +SRSASN_CODE meas_obj_cdma2000_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(search_win_size_present, 1)); + HANDLE_CODE(bref.pack(offset_freq_present, 1)); + HANDLE_CODE(bref.pack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(pack_enum(bref, cdma2000_type)); + HANDLE_CODE(carrier_freq.pack(bref)); + if (search_win_size_present) { + HANDLE_CODE(pack_unalign_integer(bref, search_win_size, (uint8_t)0, (uint8_t)15)); + } + if (offset_freq_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_freq, (int8_t)-15, (int8_t)15)); + } + if (cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list, 1, 32)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_for_which_to_report_cgi, (uint16_t)0, (uint16_t)511)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_cdma2000_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(search_win_size_present, 1)); + HANDLE_CODE(bref.unpack(offset_freq_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(unpack_enum(cdma2000_type, bref)); + HANDLE_CODE(carrier_freq.unpack(bref)); + if (search_win_size_present) { + HANDLE_CODE(unpack_unalign_integer(search_win_size, bref, (uint8_t)0, (uint8_t)15)); + } + if (offset_freq_present) { + HANDLE_CODE(unpack_unalign_integer(offset_freq, bref, (int8_t)-15, (int8_t)15)); + } + if (cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list, bref, 1, 32)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(unpack_unalign_integer(cell_for_which_to_report_cgi, bref, (uint16_t)0, (uint16_t)511)); + } + + return SRSASN_SUCCESS; +} +void meas_obj_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cdma2000-Type", cdma2000_type.to_string()); + j.write_fieldname("carrierFreq"); + carrier_freq.to_json(j); + if (search_win_size_present) { + j.write_int("searchWindowSize", search_win_size); + } + if (offset_freq_present) { + j.write_int("offsetFreq", offset_freq); + } + if (cells_to_rem_list_present) { + j.start_array("cellsToRemoveList"); + for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { + j.write_int(cells_to_rem_list[i1]); + } + j.end_array(); + } + if (cells_to_add_mod_list_present) { + j.start_array("cellsToAddModList"); + for (uint32_t i1 = 0; i1 < cells_to_add_mod_list.size(); ++i1) { + cells_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (cell_for_which_to_report_cgi_present) { + j.write_int("cellForWhichToReportCGI", cell_for_which_to_report_cgi); + } + j.end_obj(); +} + +// MeasObjectEUTRA ::= SEQUENCE +meas_obj_eutra_s::meas_obj_eutra_s() +{ + ext = false; + offset_freq_present = false; + cells_to_rem_list_present = false; + cells_to_add_mod_list_present = false; + black_cells_to_rem_list_present = false; + black_cells_to_add_mod_list_present = false; + cell_for_which_to_report_cgi_present = false; + meas_cycle_scell_r10_present = false; + meas_sf_pattern_cfg_neigh_r10_present = false; + wideband_rsrq_meas_r11_present = false; + alt_ttt_cells_to_rem_list_r12_present = false; + alt_ttt_cells_to_add_mod_list_r12_present = false; + t312_r12_present = false; + reduced_meas_performance_r12_present = false; + meas_ds_cfg_r12_present = false; + white_cells_to_rem_list_r13_present = false; + white_cells_to_add_mod_list_r13_present = false; + rmtc_cfg_r13_present = false; + carrier_freq_r13_present = false; + tx_res_pool_to_rem_list_r14_present = false; + tx_res_pool_to_add_list_r14_present = false; + fembms_mixed_carrier_r14_present = false; + meas_sensing_cfg_r15_present = false; +} +SRSASN_CODE meas_obj_eutra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(offset_freq_present, 1)); + HANDLE_CODE(bref.pack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(pack_enum(bref, allowed_meas_bw)); + HANDLE_CODE(bref.pack(presence_ant_port1, 1)); + HANDLE_CODE(neigh_cell_cfg.pack(bref)); + if (offset_freq_present) { + HANDLE_CODE(pack_enum(bref, offset_freq)); + } + if (cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list, 1, 32)); + } + if (black_cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (black_cells_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_add_mod_list, 1, 32)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_for_which_to_report_cgi, (uint16_t)0, (uint16_t)503)); + } + + if (ext) { + ext_groups_header group_flags(6); + group_flags[0] |= meas_cycle_scell_r10_present; + rrc_asn1_warn_assert(meas_sf_pattern_cfg_neigh_r10_present != (meas_sf_pattern_cfg_neigh_r10.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= meas_sf_pattern_cfg_neigh_r10_present; + group_flags[1] |= wideband_rsrq_meas_r11_present; + rrc_asn1_warn_assert(alt_ttt_cells_to_rem_list_r12_present != (alt_ttt_cells_to_rem_list_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= alt_ttt_cells_to_rem_list_r12_present; + rrc_asn1_warn_assert(alt_ttt_cells_to_add_mod_list_r12_present != (alt_ttt_cells_to_add_mod_list_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= alt_ttt_cells_to_add_mod_list_r12_present; + rrc_asn1_warn_assert(t312_r12_present != (t312_r12.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= t312_r12_present; + group_flags[2] |= reduced_meas_performance_r12_present; + rrc_asn1_warn_assert(meas_ds_cfg_r12_present != (meas_ds_cfg_r12.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= meas_ds_cfg_r12_present; + rrc_asn1_warn_assert(white_cells_to_rem_list_r13_present != (white_cells_to_rem_list_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= white_cells_to_rem_list_r13_present; + rrc_asn1_warn_assert(white_cells_to_add_mod_list_r13_present != (white_cells_to_add_mod_list_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= white_cells_to_add_mod_list_r13_present; + rrc_asn1_warn_assert(rmtc_cfg_r13_present != (rmtc_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= rmtc_cfg_r13_present; + group_flags[3] |= carrier_freq_r13_present; + rrc_asn1_warn_assert(tx_res_pool_to_rem_list_r14_present != (tx_res_pool_to_rem_list_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= tx_res_pool_to_rem_list_r14_present; + rrc_asn1_warn_assert(tx_res_pool_to_add_list_r14_present != (tx_res_pool_to_add_list_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= tx_res_pool_to_add_list_r14_present; + group_flags[4] |= fembms_mixed_carrier_r14_present; + rrc_asn1_warn_assert(meas_sensing_cfg_r15_present != (meas_sensing_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= meas_sensing_cfg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_cycle_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_sf_pattern_cfg_neigh_r10_present, 1)); + if (meas_cycle_scell_r10_present) { + HANDLE_CODE(pack_enum(bref, meas_cycle_scell_r10)); + } + if (meas_sf_pattern_cfg_neigh_r10_present) { + HANDLE_CODE(meas_sf_pattern_cfg_neigh_r10->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(wideband_rsrq_meas_r11_present, 1)); + if (wideband_rsrq_meas_r11_present) { + HANDLE_CODE(bref.pack(wideband_rsrq_meas_r11, 1)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(alt_ttt_cells_to_rem_list_r12_present, 1)); + HANDLE_CODE(bref.pack(alt_ttt_cells_to_add_mod_list_r12_present, 1)); + HANDLE_CODE(bref.pack(t312_r12_present, 1)); + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_ds_cfg_r12_present, 1)); + if (alt_ttt_cells_to_rem_list_r12_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *alt_ttt_cells_to_rem_list_r12, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (alt_ttt_cells_to_add_mod_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *alt_ttt_cells_to_add_mod_list_r12, 1, 32)); + } + if (t312_r12_present) { + HANDLE_CODE(t312_r12->pack(bref)); + } + if (reduced_meas_performance_r12_present) { + HANDLE_CODE(bref.pack(reduced_meas_performance_r12, 1)); + } + if (meas_ds_cfg_r12_present) { + HANDLE_CODE(meas_ds_cfg_r12->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(white_cells_to_rem_list_r13_present, 1)); + HANDLE_CODE(bref.pack(white_cells_to_add_mod_list_r13_present, 1)); + HANDLE_CODE(bref.pack(rmtc_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_r13_present, 1)); + if (white_cells_to_rem_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *white_cells_to_rem_list_r13, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (white_cells_to_add_mod_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *white_cells_to_add_mod_list_r13, 1, 32)); + } + if (rmtc_cfg_r13_present) { + HANDLE_CODE(rmtc_cfg_r13->pack(bref)); + } + if (carrier_freq_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r13, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(tx_res_pool_to_rem_list_r14_present, 1)); + HANDLE_CODE(bref.pack(tx_res_pool_to_add_list_r14_present, 1)); + HANDLE_CODE(bref.pack(fembms_mixed_carrier_r14_present, 1)); + if (tx_res_pool_to_rem_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *tx_res_pool_to_rem_list_r14, 1, 72, UnalignedIntegerPacker(1, 72))); + } + if (tx_res_pool_to_add_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *tx_res_pool_to_add_list_r14, 1, 72, UnalignedIntegerPacker(1, 72))); + } + if (fembms_mixed_carrier_r14_present) { + HANDLE_CODE(bref.pack(fembms_mixed_carrier_r14, 1)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_sensing_cfg_r15_present, 1)); + if (meas_sensing_cfg_r15_present) { + HANDLE_CODE(meas_sensing_cfg_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_eutra_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(offset_freq_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(unpack_enum(allowed_meas_bw, bref)); + HANDLE_CODE(bref.unpack(presence_ant_port1, 1)); + HANDLE_CODE(neigh_cell_cfg.unpack(bref)); + if (offset_freq_present) { + HANDLE_CODE(unpack_enum(offset_freq, bref)); + } + if (cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list, bref, 1, 32)); + } + if (black_cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (black_cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_add_mod_list, bref, 1, 32)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(unpack_unalign_integer(cell_for_which_to_report_cgi, bref, (uint16_t)0, (uint16_t)503)); + } + + if (ext) { + ext_groups_header group_flags(6); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_cycle_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_sf_pattern_cfg_neigh_r10_present, 1)); + if (meas_cycle_scell_r10_present) { + HANDLE_CODE(unpack_enum(meas_cycle_scell_r10, bref)); + } + if (meas_sf_pattern_cfg_neigh_r10_present) { + meas_sf_pattern_cfg_neigh_r10 = make_copy_ptr(meas_sf_pattern_cfg_neigh_r10_c()); + HANDLE_CODE(meas_sf_pattern_cfg_neigh_r10->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(wideband_rsrq_meas_r11_present, 1)); + if (wideband_rsrq_meas_r11_present) { + HANDLE_CODE(bref.unpack(wideband_rsrq_meas_r11, 1)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(alt_ttt_cells_to_rem_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(alt_ttt_cells_to_add_mod_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(t312_r12_present, 1)); + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_ds_cfg_r12_present, 1)); + if (alt_ttt_cells_to_rem_list_r12_present) { + alt_ttt_cells_to_rem_list_r12 = make_copy_ptr(cell_idx_list_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*alt_ttt_cells_to_rem_list_r12, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (alt_ttt_cells_to_add_mod_list_r12_present) { + alt_ttt_cells_to_add_mod_list_r12 = make_copy_ptr(alt_ttt_cells_to_add_mod_list_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*alt_ttt_cells_to_add_mod_list_r12, bref, 1, 32)); + } + if (t312_r12_present) { + t312_r12 = make_copy_ptr(t312_r12_c_()); + HANDLE_CODE(t312_r12->unpack(bref)); + } + if (reduced_meas_performance_r12_present) { + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12, 1)); + } + if (meas_ds_cfg_r12_present) { + meas_ds_cfg_r12 = make_copy_ptr(meas_ds_cfg_r12_c()); + HANDLE_CODE(meas_ds_cfg_r12->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(white_cells_to_rem_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(white_cells_to_add_mod_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(rmtc_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_r13_present, 1)); + if (white_cells_to_rem_list_r13_present) { + white_cells_to_rem_list_r13 = make_copy_ptr(cell_idx_list_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*white_cells_to_rem_list_r13, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (white_cells_to_add_mod_list_r13_present) { + white_cells_to_add_mod_list_r13 = make_copy_ptr(white_cells_to_add_mod_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*white_cells_to_add_mod_list_r13, bref, 1, 32)); + } + if (rmtc_cfg_r13_present) { + rmtc_cfg_r13 = make_copy_ptr(rmtc_cfg_r13_c()); + HANDLE_CODE(rmtc_cfg_r13->unpack(bref)); + } + if (carrier_freq_r13_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r13, bref, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(tx_res_pool_to_rem_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(tx_res_pool_to_add_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(fembms_mixed_carrier_r14_present, 1)); + if (tx_res_pool_to_rem_list_r14_present) { + tx_res_pool_to_rem_list_r14 = make_copy_ptr(tx_res_pool_meas_list_r14_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*tx_res_pool_to_rem_list_r14, bref, 1, 72, UnalignedIntegerPacker(1, 72))); + } + if (tx_res_pool_to_add_list_r14_present) { + tx_res_pool_to_add_list_r14 = make_copy_ptr(tx_res_pool_meas_list_r14_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*tx_res_pool_to_add_list_r14, bref, 1, 72, UnalignedIntegerPacker(1, 72))); + } + if (fembms_mixed_carrier_r14_present) { + HANDLE_CODE(bref.unpack(fembms_mixed_carrier_r14, 1)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_sensing_cfg_r15_present, 1)); + if (meas_sensing_cfg_r15_present) { + meas_sensing_cfg_r15 = make_copy_ptr(meas_sensing_cfg_r15_s()); + HANDLE_CODE(meas_sensing_cfg_r15->unpack(bref)); + } + } + } + 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()); + j.write_bool("presenceAntennaPort1", presence_ant_port1); + j.write_str("neighCellConfig", neigh_cell_cfg.to_string()); + if (offset_freq_present) { + j.write_str("offsetFreq", offset_freq.to_string()); + } + if (cells_to_rem_list_present) { + j.start_array("cellsToRemoveList"); + for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { + j.write_int(cells_to_rem_list[i1]); + } + j.end_array(); + } + if (cells_to_add_mod_list_present) { + j.start_array("cellsToAddModList"); + for (uint32_t i1 = 0; i1 < cells_to_add_mod_list.size(); ++i1) { + cells_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (black_cells_to_rem_list_present) { + j.start_array("blackCellsToRemoveList"); + for (uint32_t i1 = 0; i1 < black_cells_to_rem_list.size(); ++i1) { + j.write_int(black_cells_to_rem_list[i1]); + } + j.end_array(); + } + if (black_cells_to_add_mod_list_present) { + j.start_array("blackCellsToAddModList"); + for (uint32_t i1 = 0; i1 < black_cells_to_add_mod_list.size(); ++i1) { + black_cells_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (cell_for_which_to_report_cgi_present) { + j.write_int("cellForWhichToReportCGI", cell_for_which_to_report_cgi); + } + if (meas_cycle_scell_r10_present) { + j.write_str("measCycleSCell-r10", meas_cycle_scell_r10.to_string()); + } + if (meas_sf_pattern_cfg_neigh_r10_present) { + j.write_fieldname("measSubframePatternConfigNeigh-r10"); + meas_sf_pattern_cfg_neigh_r10->to_json(j); + } + if (wideband_rsrq_meas_r11_present) { + j.write_bool("widebandRSRQ-Meas-r11", wideband_rsrq_meas_r11); + } + if (alt_ttt_cells_to_rem_list_r12_present) { + j.start_array("altTTT-CellsToRemoveList-r12"); + for (uint32_t i1 = 0; i1 < alt_ttt_cells_to_rem_list_r12->size(); ++i1) { + j.write_int(((*alt_ttt_cells_to_rem_list_r12)[i1])); + } + j.end_array(); + } + if (alt_ttt_cells_to_add_mod_list_r12_present) { + j.start_array("altTTT-CellsToAddModList-r12"); + for (uint32_t i1 = 0; i1 < alt_ttt_cells_to_add_mod_list_r12->size(); ++i1) { + ((*alt_ttt_cells_to_add_mod_list_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (t312_r12_present) { + j.write_fieldname("t312-r12"); + t312_r12->to_json(j); + } + if (reduced_meas_performance_r12_present) { + j.write_bool("reducedMeasPerformance-r12", reduced_meas_performance_r12); + } + if (meas_ds_cfg_r12_present) { + j.write_fieldname("measDS-Config-r12"); + meas_ds_cfg_r12->to_json(j); + } + if (white_cells_to_rem_list_r13_present) { + j.start_array("whiteCellsToRemoveList-r13"); + for (uint32_t i1 = 0; i1 < white_cells_to_rem_list_r13->size(); ++i1) { + j.write_int(((*white_cells_to_rem_list_r13)[i1])); + } + j.end_array(); + } + if (white_cells_to_add_mod_list_r13_present) { + j.start_array("whiteCellsToAddModList-r13"); + for (uint32_t i1 = 0; i1 < white_cells_to_add_mod_list_r13->size(); ++i1) { + ((*white_cells_to_add_mod_list_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (rmtc_cfg_r13_present) { + j.write_fieldname("rmtc-Config-r13"); + rmtc_cfg_r13->to_json(j); + } + if (carrier_freq_r13_present) { + j.write_int("carrierFreq-r13", carrier_freq_r13); + } + if (tx_res_pool_to_rem_list_r14_present) { + j.start_array("tx-ResourcePoolToRemoveList-r14"); + for (uint32_t i1 = 0; i1 < tx_res_pool_to_rem_list_r14->size(); ++i1) { + j.write_int(((*tx_res_pool_to_rem_list_r14)[i1])); + } + j.end_array(); + } + if (tx_res_pool_to_add_list_r14_present) { + j.start_array("tx-ResourcePoolToAddList-r14"); + for (uint32_t i1 = 0; i1 < tx_res_pool_to_add_list_r14->size(); ++i1) { + j.write_int(((*tx_res_pool_to_add_list_r14)[i1])); + } + j.end_array(); + } + if (fembms_mixed_carrier_r14_present) { + j.write_bool("fembms-MixedCarrier-r14", fembms_mixed_carrier_r14); + } + if (meas_sensing_cfg_r15_present) { + j.write_fieldname("measSensing-Config-r15"); + meas_sensing_cfg_r15->to_json(j); + } + j.end_obj(); +} + +void meas_obj_eutra_s::t312_r12_c_::set(types::options e) +{ + type_ = e; +} +void meas_obj_eutra_s::t312_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "meas_obj_eutra_s::t312_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_eutra_s::t312_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_eutra_s::t312_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_eutra_s::t312_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_eutra_s::t312_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasObjectEUTRA-v9e0 ::= SEQUENCE +SRSASN_CODE meas_obj_eutra_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_v9e0, (uint32_t)65536, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_eutra_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +void meas_obj_eutra_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-v9e0", carrier_freq_v9e0); + j.end_obj(); +} + +// MeasObjectGERAN ::= SEQUENCE +meas_obj_geran_s::meas_obj_geran_s() +{ + ext = false; + offset_freq_present = false; + ncc_permitted_present = false; + cell_for_which_to_report_cgi_present = false; +} +SRSASN_CODE meas_obj_geran_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(offset_freq_present, 1)); + HANDLE_CODE(bref.pack(ncc_permitted_present, 1)); + HANDLE_CODE(bref.pack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(carrier_freqs.pack(bref)); + if (offset_freq_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_freq, (int8_t)-15, (int8_t)15)); + } + if (ncc_permitted_present) { + HANDLE_CODE(ncc_permitted.pack(bref)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(cell_for_which_to_report_cgi.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_geran_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(offset_freq_present, 1)); + HANDLE_CODE(bref.unpack(ncc_permitted_present, 1)); + HANDLE_CODE(bref.unpack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(carrier_freqs.unpack(bref)); + if (offset_freq_present) { + HANDLE_CODE(unpack_unalign_integer(offset_freq, bref, (int8_t)-15, (int8_t)15)); + } + if (ncc_permitted_present) { + HANDLE_CODE(ncc_permitted.unpack(bref)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(cell_for_which_to_report_cgi.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_obj_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("carrierFreqs"); + carrier_freqs.to_json(j); + if (offset_freq_present) { + j.write_int("offsetFreq", offset_freq); + } + if (ncc_permitted_present) { + j.write_str("ncc-Permitted", ncc_permitted.to_string()); + } + if (cell_for_which_to_report_cgi_present) { + j.write_fieldname("cellForWhichToReportCGI"); + cell_for_which_to_report_cgi.to_json(j); + } + j.end_obj(); +} + +// MeasObjectNR-r15 ::= SEQUENCE +meas_obj_nr_r15_s::meas_obj_nr_r15_s() +{ + ext = false; + thresh_rs_idx_r15_present = false; + max_rs_idx_cell_qual_r15_present = false; + offset_freq_r15_present = false; + black_cells_to_rem_list_r15_present = false; + black_cells_to_add_mod_list_r15_present = false; + cells_for_which_to_report_sftd_r15_present = false; + cell_for_which_to_report_cgi_r15_present = false; + derive_ssb_idx_from_cell_r15_present = false; + ss_rssi_meas_r15_present = false; + band_nr_r15_present = false; +} +SRSASN_CODE meas_obj_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(thresh_rs_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(max_rs_idx_cell_qual_r15_present, 1)); + HANDLE_CODE(bref.pack(offset_freq_r15_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_rem_list_r15_present, 1)); + HANDLE_CODE(bref.pack(black_cells_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.pack(cells_for_which_to_report_sftd_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(rs_cfg_ssb_r15.pack(bref)); + if (thresh_rs_idx_r15_present) { + HANDLE_CODE(thresh_rs_idx_r15.pack(bref)); + } + if (max_rs_idx_cell_qual_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_rs_idx_cell_qual_r15, (uint8_t)1, (uint8_t)16)); + } + if (offset_freq_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_freq_r15, (int8_t)-15, (int8_t)15)); + } + if (black_cells_to_rem_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_rem_list_r15, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (black_cells_to_add_mod_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, black_cells_to_add_mod_list_r15, 1, 32)); + } + HANDLE_CODE(pack_unalign_integer(bref, quant_cfg_set_r15, (uint8_t)1, (uint8_t)2)); + if (cells_for_which_to_report_sftd_r15_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, cells_for_which_to_report_sftd_r15, 1, 3, UnalignedIntegerPacker(0, 1007))); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= cell_for_which_to_report_cgi_r15_present; + group_flags[0] |= derive_ssb_idx_from_cell_r15_present; + rrc_asn1_warn_assert(ss_rssi_meas_r15_present != (ss_rssi_meas_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= ss_rssi_meas_r15_present; + rrc_asn1_warn_assert(band_nr_r15_present != (band_nr_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= band_nr_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cell_for_which_to_report_cgi_r15_present, 1)); + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(ss_rssi_meas_r15_present, 1)); + HANDLE_CODE(bref.pack(band_nr_r15_present, 1)); + if (cell_for_which_to_report_cgi_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_for_which_to_report_cgi_r15, (uint16_t)0, (uint16_t)1007)); + } + if (derive_ssb_idx_from_cell_r15_present) { + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_r15, 1)); + } + if (ss_rssi_meas_r15_present) { + HANDLE_CODE(ss_rssi_meas_r15->pack(bref)); + } + if (band_nr_r15_present) { + HANDLE_CODE(band_nr_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(thresh_rs_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(max_rs_idx_cell_qual_r15_present, 1)); + HANDLE_CODE(bref.unpack(offset_freq_r15_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_rem_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(black_cells_to_add_mod_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(cells_for_which_to_report_sftd_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(rs_cfg_ssb_r15.unpack(bref)); + if (thresh_rs_idx_r15_present) { + HANDLE_CODE(thresh_rs_idx_r15.unpack(bref)); + } + if (max_rs_idx_cell_qual_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_rs_idx_cell_qual_r15, bref, (uint8_t)1, (uint8_t)16)); + } + if (offset_freq_r15_present) { + HANDLE_CODE(unpack_unalign_integer(offset_freq_r15, bref, (int8_t)-15, (int8_t)15)); + } + if (black_cells_to_rem_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_rem_list_r15, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (black_cells_to_add_mod_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(black_cells_to_add_mod_list_r15, bref, 1, 32)); + } + HANDLE_CODE(unpack_unalign_integer(quant_cfg_set_r15, bref, (uint8_t)1, (uint8_t)2)); + if (cells_for_which_to_report_sftd_r15_present) { + HANDLE_CODE( + unpack_dyn_seq_of(cells_for_which_to_report_sftd_r15, bref, 1, 3, UnalignedIntegerPacker(0, 1007))); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cell_for_which_to_report_cgi_r15_present, 1)); + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(ss_rssi_meas_r15_present, 1)); + HANDLE_CODE(bref.unpack(band_nr_r15_present, 1)); + if (cell_for_which_to_report_cgi_r15_present) { + HANDLE_CODE(unpack_unalign_integer(cell_for_which_to_report_cgi_r15, bref, (uint16_t)0, (uint16_t)1007)); + } + if (derive_ssb_idx_from_cell_r15_present) { + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_r15, 1)); + } + if (ss_rssi_meas_r15_present) { + ss_rssi_meas_r15 = make_copy_ptr(ss_rssi_meas_r15_s()); + HANDLE_CODE(ss_rssi_meas_r15->unpack(bref)); + } + if (band_nr_r15_present) { + band_nr_r15 = make_copy_ptr(band_nr_r15_c_()); + HANDLE_CODE(band_nr_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_obj_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + j.write_fieldname("rs-ConfigSSB-r15"); + rs_cfg_ssb_r15.to_json(j); + if (thresh_rs_idx_r15_present) { + j.write_fieldname("threshRS-Index-r15"); + thresh_rs_idx_r15.to_json(j); + } + if (max_rs_idx_cell_qual_r15_present) { + j.write_int("maxRS-IndexCellQual-r15", max_rs_idx_cell_qual_r15); + } + if (offset_freq_r15_present) { + j.write_int("offsetFreq-r15", offset_freq_r15); + } + if (black_cells_to_rem_list_r15_present) { + j.start_array("blackCellsToRemoveList-r15"); + for (uint32_t i1 = 0; i1 < black_cells_to_rem_list_r15.size(); ++i1) { + j.write_int(black_cells_to_rem_list_r15[i1]); + } + j.end_array(); + } + if (black_cells_to_add_mod_list_r15_present) { + j.start_array("blackCellsToAddModList-r15"); + for (uint32_t i1 = 0; i1 < black_cells_to_add_mod_list_r15.size(); ++i1) { + black_cells_to_add_mod_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.write_int("quantityConfigSet-r15", quant_cfg_set_r15); + if (cells_for_which_to_report_sftd_r15_present) { + j.start_array("cellsForWhichToReportSFTD-r15"); + for (uint32_t i1 = 0; i1 < cells_for_which_to_report_sftd_r15.size(); ++i1) { + j.write_int(cells_for_which_to_report_sftd_r15[i1]); + } + j.end_array(); + } + if (cell_for_which_to_report_cgi_r15_present) { + j.write_int("cellForWhichToReportCGI-r15", cell_for_which_to_report_cgi_r15); + } + if (derive_ssb_idx_from_cell_r15_present) { + j.write_bool("deriveSSB-IndexFromCell-r15", derive_ssb_idx_from_cell_r15); + } + if (ss_rssi_meas_r15_present) { + j.write_fieldname("ss-RSSI-Measurement-r15"); + ss_rssi_meas_r15->to_json(j); + } + if (band_nr_r15_present) { + j.write_fieldname("bandNR-r15"); + band_nr_r15->to_json(j); + } + j.end_obj(); +} + +void meas_obj_nr_r15_s::band_nr_r15_c_::set(types::options e) +{ + type_ = e; +} +void meas_obj_nr_r15_s::band_nr_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "meas_obj_nr_r15_s::band_nr_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_nr_r15_s::band_nr_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c, (uint16_t)1, (uint16_t)1024)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_nr_r15_s::band_nr_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_nr_r15_s::band_nr_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c, bref, (uint16_t)1, (uint16_t)1024)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_nr_r15_s::band_nr_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasObjectUTRA ::= SEQUENCE +meas_obj_utra_s::meas_obj_utra_s() +{ + ext = false; + offset_freq_present = false; + cells_to_rem_list_present = false; + cells_to_add_mod_list_present = false; + cell_for_which_to_report_cgi_present = false; + csg_allowed_report_cells_v930_present = false; + reduced_meas_performance_r12_present = false; +} +SRSASN_CODE meas_obj_utra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(offset_freq_present, 1)); + HANDLE_CODE(bref.pack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq, (uint16_t)0, (uint16_t)16383)); + if (offset_freq_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_freq, (int8_t)-15, (int8_t)15)); + } + if (cells_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(cells_to_add_mod_list.pack(bref)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(cell_for_which_to_report_cgi.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(csg_allowed_report_cells_v930_present != (csg_allowed_report_cells_v930.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= csg_allowed_report_cells_v930_present; + group_flags[1] |= reduced_meas_performance_r12_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(csg_allowed_report_cells_v930_present, 1)); + if (csg_allowed_report_cells_v930_present) { + HANDLE_CODE(csg_allowed_report_cells_v930->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(reduced_meas_performance_r12_present, 1)); + if (reduced_meas_performance_r12_present) { + HANDLE_CODE(bref.pack(reduced_meas_performance_r12, 1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_utra_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(offset_freq_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(cell_for_which_to_report_cgi_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq, bref, (uint16_t)0, (uint16_t)16383)); + if (offset_freq_present) { + HANDLE_CODE(unpack_unalign_integer(offset_freq, bref, (int8_t)-15, (int8_t)15)); + } + if (cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (cells_to_add_mod_list_present) { + HANDLE_CODE(cells_to_add_mod_list.unpack(bref)); + } + if (cell_for_which_to_report_cgi_present) { + HANDLE_CODE(cell_for_which_to_report_cgi.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(csg_allowed_report_cells_v930_present, 1)); + if (csg_allowed_report_cells_v930_present) { + csg_allowed_report_cells_v930 = make_copy_ptr(csg_allowed_report_cells_r9_s()); + HANDLE_CODE(csg_allowed_report_cells_v930->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12_present, 1)); + if (reduced_meas_performance_r12_present) { + HANDLE_CODE(bref.unpack(reduced_meas_performance_r12, 1)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_obj_utra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + if (offset_freq_present) { + j.write_int("offsetFreq", offset_freq); + } + if (cells_to_rem_list_present) { + j.start_array("cellsToRemoveList"); + for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { + j.write_int(cells_to_rem_list[i1]); + } + j.end_array(); + } + if (cells_to_add_mod_list_present) { + j.write_fieldname("cellsToAddModList"); + cells_to_add_mod_list.to_json(j); + } + if (cell_for_which_to_report_cgi_present) { + j.write_fieldname("cellForWhichToReportCGI"); + cell_for_which_to_report_cgi.to_json(j); + } + if (csg_allowed_report_cells_v930_present) { + j.write_fieldname("csg-allowedReportingCells-v930"); + csg_allowed_report_cells_v930->to_json(j); + } + if (reduced_meas_performance_r12_present) { + j.write_bool("reducedMeasPerformance-r12", reduced_meas_performance_r12); + } + j.end_obj(); +} + +void meas_obj_utra_s::cells_to_add_mod_list_c_::destroy_() +{ + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + c.destroy(); + break; + case types::cells_to_add_mod_list_utra_tdd: + c.destroy(); + break; + default: + break; + } +} +void meas_obj_utra_s::cells_to_add_mod_list_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + c.init(); + break; + case types::cells_to_add_mod_list_utra_tdd: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cells_to_add_mod_list_c_"); + } +} +meas_obj_utra_s::cells_to_add_mod_list_c_::cells_to_add_mod_list_c_( + const meas_obj_utra_s::cells_to_add_mod_list_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + c.init(other.c.get()); + break; + case types::cells_to_add_mod_list_utra_tdd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cells_to_add_mod_list_c_"); + } +} +meas_obj_utra_s::cells_to_add_mod_list_c_& meas_obj_utra_s::cells_to_add_mod_list_c_:: + operator=(const meas_obj_utra_s::cells_to_add_mod_list_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + c.set(other.c.get()); + break; + case types::cells_to_add_mod_list_utra_tdd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cells_to_add_mod_list_c_"); + } + + return *this; +} +void meas_obj_utra_s::cells_to_add_mod_list_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + j.start_array("cellsToAddModListUTRA-FDD"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::cells_to_add_mod_list_utra_tdd: + j.start_array("cellsToAddModListUTRA-TDD"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cells_to_add_mod_list_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_utra_s::cells_to_add_mod_list_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); + break; + case types::cells_to_add_mod_list_utra_tdd: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cells_to_add_mod_list_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_utra_s::cells_to_add_mod_list_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cells_to_add_mod_list_utra_fdd: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); + break; + case types::cells_to_add_mod_list_utra_tdd: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cells_to_add_mod_list_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_obj_utra_s::cell_for_which_to_report_cgi_c_::destroy_() {} +void meas_obj_utra_s::cell_for_which_to_report_cgi_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_obj_utra_s::cell_for_which_to_report_cgi_c_::cell_for_which_to_report_cgi_c_( + const meas_obj_utra_s::cell_for_which_to_report_cgi_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::utra_fdd: + c.init(other.c.get()); + break; + case types::utra_tdd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_"); + } +} +meas_obj_utra_s::cell_for_which_to_report_cgi_c_& meas_obj_utra_s::cell_for_which_to_report_cgi_c_:: + operator=(const meas_obj_utra_s::cell_for_which_to_report_cgi_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::utra_fdd: + c.set(other.c.get()); + break; + case types::utra_tdd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_"); + } + + return *this; +} +void meas_obj_utra_s::cell_for_which_to_report_cgi_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::utra_fdd: + j.write_int("utra-FDD", c.get()); + break; + case types::utra_tdd: + j.write_int("utra-TDD", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_utra_s::cell_for_which_to_report_cgi_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::utra_fdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::utra_tdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_utra_s::cell_for_which_to_report_cgi_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::utra_fdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::utra_tdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasObjectWLAN-r13 ::= SEQUENCE +meas_obj_wlan_r13_s::meas_obj_wlan_r13_s() +{ + ext = false; + carrier_freq_r13_present = false; + wlan_to_add_mod_list_r13_present = false; + wlan_to_rem_list_r13_present = false; +} +SRSASN_CODE meas_obj_wlan_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_freq_r13_present, 1)); + HANDLE_CODE(bref.pack(wlan_to_add_mod_list_r13_present, 1)); + HANDLE_CODE(bref.pack(wlan_to_rem_list_r13_present, 1)); + + if (carrier_freq_r13_present) { + HANDLE_CODE(carrier_freq_r13.pack(bref)); + } + if (wlan_to_add_mod_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_to_add_mod_list_r13, 1, 32)); + } + if (wlan_to_rem_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_to_rem_list_r13, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_wlan_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(carrier_freq_r13_present, 1)); + HANDLE_CODE(bref.unpack(wlan_to_add_mod_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(wlan_to_rem_list_r13_present, 1)); + + if (carrier_freq_r13_present) { + HANDLE_CODE(carrier_freq_r13.unpack(bref)); + } + if (wlan_to_add_mod_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_to_add_mod_list_r13, bref, 1, 32)); + } + if (wlan_to_rem_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_to_rem_list_r13, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void meas_obj_wlan_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_r13_present) { + j.write_fieldname("carrierFreq-r13"); + carrier_freq_r13.to_json(j); + } + if (wlan_to_add_mod_list_r13_present) { + j.start_array("wlan-ToAddModList-r13"); + for (uint32_t i1 = 0; i1 < wlan_to_add_mod_list_r13.size(); ++i1) { + wlan_to_add_mod_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (wlan_to_rem_list_r13_present) { + j.start_array("wlan-ToRemoveList-r13"); + for (uint32_t i1 = 0; i1 < wlan_to_rem_list_r13.size(); ++i1) { + wlan_to_rem_list_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +void meas_obj_wlan_r13_s::carrier_freq_r13_c_::destroy_() +{ + switch (type_) { + case types::band_ind_list_wlan_r13: + c.destroy(); + break; + case types::carrier_info_list_wlan_r13: + c.destroy(); + break; + default: + break; + } +} +void meas_obj_wlan_r13_s::carrier_freq_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::band_ind_list_wlan_r13: + c.init(); + break; + case types::carrier_info_list_wlan_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_wlan_r13_s::carrier_freq_r13_c_"); + } +} +meas_obj_wlan_r13_s::carrier_freq_r13_c_::carrier_freq_r13_c_(const meas_obj_wlan_r13_s::carrier_freq_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::band_ind_list_wlan_r13: + c.init(other.c.get()); + break; + case types::carrier_info_list_wlan_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_wlan_r13_s::carrier_freq_r13_c_"); + } +} +meas_obj_wlan_r13_s::carrier_freq_r13_c_& meas_obj_wlan_r13_s::carrier_freq_r13_c_:: + operator=(const meas_obj_wlan_r13_s::carrier_freq_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::band_ind_list_wlan_r13: + c.set(other.c.get()); + break; + case types::carrier_info_list_wlan_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_wlan_r13_s::carrier_freq_r13_c_"); + } + + return *this; +} +void meas_obj_wlan_r13_s::carrier_freq_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::band_ind_list_wlan_r13: + j.start_array("bandIndicatorListWLAN-r13"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_str(c.get()[i1].to_string()); + } + j.end_array(); + break; + case types::carrier_info_list_wlan_r13: + j.start_array("carrierInfoListWLAN-r13"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "meas_obj_wlan_r13_s::carrier_freq_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_wlan_r13_s::carrier_freq_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::band_ind_list_wlan_r13: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8, EnumPacker())); + break; + case types::carrier_info_list_wlan_r13: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_wlan_r13_s::carrier_freq_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_wlan_r13_s::carrier_freq_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::band_ind_list_wlan_r13: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8, EnumPacker())); + break; + case types::carrier_info_list_wlan_r13: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "meas_obj_wlan_r13_s::carrier_freq_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ObtainLocationConfig-r11 ::= SEQUENCE +obtain_location_cfg_r11_s::obtain_location_cfg_r11_s() +{ + obtain_location_r11_present = false; +} +SRSASN_CODE obtain_location_cfg_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(obtain_location_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE obtain_location_cfg_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(obtain_location_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void obtain_location_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (obtain_location_r11_present) { + j.write_str("obtainLocation-r11", "setup"); + } + j.end_obj(); +} + +// PowerPrefIndicationConfig-r11 ::= CHOICE +void pwr_pref_ind_cfg_r11_c::set(types::options e) +{ + type_ = e; +} +void pwr_pref_ind_cfg_r11_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("powerPrefIndicationTimer-r11", c.pwr_pref_ind_timer_r11.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pwr_pref_ind_cfg_r11_c"); + } + j.end_obj(); +} +SRSASN_CODE pwr_pref_ind_cfg_r11_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.pwr_pref_ind_timer_r11)); + break; + default: + log_invalid_choice_id(type_, "pwr_pref_ind_cfg_r11_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pwr_pref_ind_cfg_r11_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.pwr_pref_ind_timer_r11, bref)); + break; + default: + log_invalid_choice_id(type_, "pwr_pref_ind_cfg_r11_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// QuantityConfigNR-r15 ::= SEQUENCE +quant_cfg_nr_r15_s::quant_cfg_nr_r15_s() +{ + meas_quant_rs_idx_nr_r15_present = false; +} +SRSASN_CODE quant_cfg_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_quant_rs_idx_nr_r15_present, 1)); + + HANDLE_CODE(meas_quant_cell_nr_r15.pack(bref)); + if (meas_quant_rs_idx_nr_r15_present) { + HANDLE_CODE(meas_quant_rs_idx_nr_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_quant_rs_idx_nr_r15_present, 1)); + + HANDLE_CODE(meas_quant_cell_nr_r15.unpack(bref)); + if (meas_quant_rs_idx_nr_r15_present) { + HANDLE_CODE(meas_quant_rs_idx_nr_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measQuantityCellNR-r15"); + meas_quant_cell_nr_r15.to_json(j); + if (meas_quant_rs_idx_nr_r15_present) { + j.write_fieldname("measQuantityRS-IndexNR-r15"); + meas_quant_rs_idx_nr_r15.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v10l0-IEs ::= SEQUENCE +rrc_conn_recfg_v10l0_ies_s::rrc_conn_recfg_v10l0_ies_s() +{ + mob_ctrl_info_v10l0_present = false; + s_cell_to_add_mod_list_v10l0_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v10l0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mob_ctrl_info_v10l0_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_v10l0_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mob_ctrl_info_v10l0_present) { + HANDLE_CODE(mob_ctrl_info_v10l0.pack(bref)); + } + if (s_cell_to_add_mod_list_v10l0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_v10l0, 1, 4)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v10l0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mob_ctrl_info_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_v10l0_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mob_ctrl_info_v10l0_present) { + HANDLE_CODE(mob_ctrl_info_v10l0.unpack(bref)); + } + if (s_cell_to_add_mod_list_v10l0_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_v10l0, bref, 1, 4)); + } + 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_conn_recfg_v10l0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mob_ctrl_info_v10l0_present) { + j.write_fieldname("mobilityControlInfo-v10l0"); + mob_ctrl_info_v10l0.to_json(j); + } + if (s_cell_to_add_mod_list_v10l0_present) { + j.start_array("sCellToAddModList-v10l0"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_v10l0.size(); ++i1) { + s_cell_to_add_mod_list_v10l0[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v1130-IEs ::= SEQUENCE +rrc_conn_recfg_v1130_ies_s::rrc_conn_recfg_v1130_ies_s() +{ + sib_type1_ded_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sib_type1_ded_r11_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sib_type1_ded_r11_present) { + HANDLE_CODE(sib_type1_ded_r11.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sib_type1_ded_r11_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sib_type1_ded_r11_present) { + HANDLE_CODE(sib_type1_ded_r11.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sib_type1_ded_r11_present) { + j.write_str("systemInformationBlockType1Dedicated-r11", sib_type1_ded_r11.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionRelease-v1320-IEs ::= SEQUENCE +rrc_conn_release_v1320_ies_s::rrc_conn_release_v1320_ies_s() +{ + resume_id_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_v1320_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(resume_id_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (resume_id_r13_present) { + HANDLE_CODE(resume_id_r13.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v1320_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(resume_id_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (resume_id_r13_present) { + HANDLE_CODE(resume_id_r13.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v1320_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (resume_id_r13_present) { + j.write_str("resumeIdentity-r13", resume_id_r13.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +SRSASN_CODE eutra_event_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(event_id.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, hysteresis, (uint8_t)0, (uint8_t)30)); + HANDLE_CODE(pack_enum(bref, time_to_trigger)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_event_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(event_id.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(hysteresis, bref, (uint8_t)0, (uint8_t)30)); + HANDLE_CODE(unpack_enum(time_to_trigger, bref)); + + return SRSASN_SUCCESS; +} +void eutra_event_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("eventId"); + event_id.to_json(j); + j.write_int("hysteresis", hysteresis); + j.write_str("timeToTrigger", time_to_trigger.to_string()); + j.end_obj(); +} + +void report_cfg_eutra_s::trigger_type_c_::event_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_r10: + c.destroy(); + break; + case types::event_c1_r12: + c.destroy(); + break; + case types::event_c2_r12: + c.destroy(); + break; + case types::event_v1_r14: + c.destroy(); + break; + case types::event_v2_r14: + c.destroy(); + break; + case types::event_h1_r15: + c.destroy(); + break; + case types::event_h2_r15: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_eutra_s::trigger_type_c_::event_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_r10: + c.init(); + break; + case types::event_c1_r12: + c.init(); + break; + case types::event_c2_r12: + c.init(); + break; + case types::event_v1_r14: + c.init(); + break; + case types::event_v2_r14: + c.init(); + break; + case types::event_h1_r15: + c.init(); + break; + case types::event_h2_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_"); + } +} +report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_::event_id_c_( + const report_cfg_eutra_s::trigger_type_c_::event_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_r10: + c.init(other.c.get()); + break; + case types::event_c1_r12: + c.init(other.c.get()); + break; + case types::event_c2_r12: + c.init(other.c.get()); + break; + case types::event_v1_r14: + c.init(other.c.get()); + break; + case types::event_v2_r14: + c.init(other.c.get()); + break; + case types::event_h1_r15: + c.init(other.c.get()); + break; + case types::event_h2_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_"); + } +} +report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_& report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_:: + operator=(const report_cfg_eutra_s::trigger_type_c_::event_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_r10: + c.set(other.c.get()); + break; + case types::event_c1_r12: + c.set(other.c.get()); + break; + case types::event_c2_r12: + c.set(other.c.get()); + break; + case types::event_v1_r14: + c.set(other.c.get()); + break; + case types::event_v2_r14: + c.set(other.c.get()); + break; + case types::event_h1_r15: + c.set(other.c.get()); + break; + case types::event_h2_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_"); + } + + return *this; +} +void report_cfg_eutra_s::trigger_type_c_::event_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.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.end_obj(); + break; + case types::event_a3: + j.write_fieldname("eventA3"); + j.start_obj(); + j.write_int("a3-Offset", c.get().a3_offset); + j.write_bool("reportOnLeave", c.get().report_on_leave); + 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.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.end_obj(); + break; + case types::event_a6_r10: + j.write_fieldname("eventA6-r10"); + j.start_obj(); + j.write_int("a6-Offset-r10", c.get().a6_offset_r10); + j.write_bool("a6-ReportOnLeave-r10", c.get().a6_report_on_leave_r10); + j.end_obj(); + break; + case types::event_c1_r12: + j.write_fieldname("eventC1-r12"); + j.start_obj(); + j.write_int("c1-Threshold-r12", c.get().c1_thres_r12); + j.write_bool("c1-ReportOnLeave-r12", c.get().c1_report_on_leave_r12); + j.end_obj(); + break; + case types::event_c2_r12: + j.write_fieldname("eventC2-r12"); + j.start_obj(); + j.write_int("c2-RefCSI-RS-r12", c.get().c2_ref_csi_rs_r12); + j.write_int("c2-Offset-r12", c.get().c2_offset_r12); + j.write_bool("c2-ReportOnLeave-r12", c.get().c2_report_on_leave_r12); + j.end_obj(); + break; + case types::event_v1_r14: + j.write_fieldname("eventV1-r14"); + j.start_obj(); + j.write_int("v1-Threshold-r14", c.get().v1_thres_r14); + j.end_obj(); + break; + case types::event_v2_r14: + j.write_fieldname("eventV2-r14"); + j.start_obj(); + j.write_int("v2-Threshold-r14", c.get().v2_thres_r14); + j.end_obj(); + break; + case types::event_h1_r15: + j.write_fieldname("eventH1-r15"); + j.start_obj(); + j.write_int("h1-ThresholdOffset-r15", c.get().h1_thres_offset_r15); + j.write_int("h1-Hysteresis-15", c.get().h1_hysteresis_minus15); + j.end_obj(); + break; + case types::event_h2_r15: + j.write_fieldname("eventH2-r15"); + j.start_obj(); + j.write_int("h2-ThresholdOffset-r15", c.get().h2_thres_offset_r15); + j.write_int("h2-Hysteresis-15", c.get().h2_hysteresis_minus15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::event_a1: + HANDLE_CODE(c.get().a1_thres.pack(bref)); + break; + case types::event_a2: + HANDLE_CODE(c.get().a2_thres.pack(bref)); + break; + case types::event_a3: + HANDLE_CODE(pack_unalign_integer(bref, c.get().a3_offset, (int8_t)-30, (int8_t)30)); + HANDLE_CODE(bref.pack(c.get().report_on_leave, 1)); + break; + case types::event_a4: + HANDLE_CODE(c.get().a4_thres.pack(bref)); + break; + case types::event_a5: + HANDLE_CODE(c.get().a5_thres1.pack(bref)); + HANDLE_CODE(c.get().a5_thres2.pack(bref)); + break; + case types::event_a6_r10: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().a6_offset_r10, (int8_t)-30, (int8_t)30)); + HANDLE_CODE(bref.pack(c.get().a6_report_on_leave_r10, 1)); + } break; + case types::event_c1_r12: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().c1_thres_r12, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(bref.pack(c.get().c1_report_on_leave_r12, 1)); + } break; + case types::event_c2_r12: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().c2_ref_csi_rs_r12, (uint8_t)1, (uint8_t)96)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().c2_offset_r12, (int8_t)-30, (int8_t)30)); + HANDLE_CODE(bref.pack(c.get().c2_report_on_leave_r12, 1)); + } break; + case types::event_v1_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().v1_thres_r14, (uint8_t)0, (uint8_t)100)); + } break; + case types::event_v2_r14: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().v2_thres_r14, (uint8_t)0, (uint8_t)100)); + } break; + case types::event_h1_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().h1_thres_offset_r15, (uint16_t)0, (uint16_t)300)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().h1_hysteresis_minus15, (uint8_t)1, (uint8_t)16)); + } break; + case types::event_h2_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().h2_thres_offset_r15, (uint16_t)0, (uint16_t)300)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().h2_hysteresis_minus15, (uint8_t)1, (uint8_t)16)); + } break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::event_a1: + HANDLE_CODE(c.get().a1_thres.unpack(bref)); + break; + case types::event_a2: + HANDLE_CODE(c.get().a2_thres.unpack(bref)); + break; + case types::event_a3: + HANDLE_CODE(unpack_unalign_integer(c.get().a3_offset, bref, (int8_t)-30, (int8_t)30)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave, 1)); + break; + case types::event_a4: + HANDLE_CODE(c.get().a4_thres.unpack(bref)); + break; + case types::event_a5: + HANDLE_CODE(c.get().a5_thres1.unpack(bref)); + HANDLE_CODE(c.get().a5_thres2.unpack(bref)); + break; + case types::event_a6_r10: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().a6_offset_r10, bref, (int8_t)-30, (int8_t)30)); + HANDLE_CODE(bref.unpack(c.get().a6_report_on_leave_r10, 1)); + } break; + case types::event_c1_r12: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().c1_thres_r12, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(bref.unpack(c.get().c1_report_on_leave_r12, 1)); + } break; + case types::event_c2_r12: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().c2_ref_csi_rs_r12, bref, (uint8_t)1, (uint8_t)96)); + HANDLE_CODE(unpack_unalign_integer(c.get().c2_offset_r12, bref, (int8_t)-30, (int8_t)30)); + HANDLE_CODE(bref.unpack(c.get().c2_report_on_leave_r12, 1)); + } break; + case types::event_v1_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().v1_thres_r14, bref, (uint8_t)0, (uint8_t)100)); + } break; + case types::event_v2_r14: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().v2_thres_r14, bref, (uint8_t)0, (uint8_t)100)); + } break; + case types::event_h1_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE( + unpack_unalign_integer(c.get().h1_thres_offset_r15, bref, (uint16_t)0, (uint16_t)300)); + HANDLE_CODE( + unpack_unalign_integer(c.get().h1_hysteresis_minus15, bref, (uint8_t)1, (uint8_t)16)); + } break; + case types::event_h2_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE( + unpack_unalign_integer(c.get().h2_thres_offset_r15, bref, (uint16_t)0, (uint16_t)300)); + HANDLE_CODE( + unpack_unalign_integer(c.get().h2_hysteresis_minus15, bref, (uint8_t)1, (uint8_t)16)); + } break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ReportConfigEUTRA ::= SEQUENCE +report_cfg_eutra_s::report_cfg_eutra_s() +{ + ext = false; + si_request_for_ho_r9_present = false; + ue_rx_tx_time_diff_periodical_r9_present = false; + include_location_info_r10_present = false; + report_add_neigh_meas_r10_present = false; + alternative_time_to_trigger_r12_present = false; + use_t312_r12_present = false; + use_ps_cell_r12_present = false; + a_n_thres1_v1250_present = false; + a5_thres2_v1250_present = false; + report_strongest_csi_rss_r12_present = false; + report_crs_meas_r12_present = false; + trigger_quant_csi_rs_r12_present = false; + report_sstd_meas_r13_present = false; + rs_sinr_cfg_r13_present = false; + use_white_cell_list_r13_present = false; + meas_rssi_report_cfg_r13_present = false; + include_multi_band_info_r13_present = false; + ul_delay_cfg_r13_present = false; + ue_rx_tx_time_diff_periodical_tdd_r13_present = false; + purpose_v1430_present = false; + max_report_rs_idx_r15_present = false; + include_bt_meas_r15_present = false; + include_wlan_meas_r15_present = false; + purpose_r15_present = false; + nof_triggering_cells_r15_present = false; + a4_a5_report_on_leave_r15_present = false; +} +SRSASN_CODE report_cfg_eutra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(trigger_type.pack(bref)); + HANDLE_CODE(pack_enum(bref, trigger_quant)); + HANDLE_CODE(pack_enum(bref, report_quant)); + HANDLE_CODE(pack_unalign_integer(bref, max_report_cells, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_enum(bref, report_interv)); + HANDLE_CODE(pack_enum(bref, report_amount)); + + if (ext) { + ext_groups_header group_flags(8); + group_flags[0] |= si_request_for_ho_r9_present; + group_flags[0] |= ue_rx_tx_time_diff_periodical_r9_present; + group_flags[1] |= include_location_info_r10_present; + group_flags[1] |= report_add_neigh_meas_r10_present; + rrc_asn1_warn_assert(alternative_time_to_trigger_r12_present != (alternative_time_to_trigger_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= alternative_time_to_trigger_r12_present; + group_flags[2] |= use_t312_r12_present; + group_flags[2] |= use_ps_cell_r12_present; + rrc_asn1_warn_assert(a_n_thres1_v1250_present != (a_n_thres1_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= a_n_thres1_v1250_present; + rrc_asn1_warn_assert(a5_thres2_v1250_present != (a5_thres2_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= a5_thres2_v1250_present; + group_flags[2] |= report_strongest_csi_rss_r12_present; + group_flags[2] |= report_crs_meas_r12_present; + group_flags[2] |= trigger_quant_csi_rs_r12_present; + group_flags[3] |= report_sstd_meas_r13_present; + rrc_asn1_warn_assert(rs_sinr_cfg_r13_present != (rs_sinr_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= rs_sinr_cfg_r13_present; + group_flags[3] |= use_white_cell_list_r13_present; + rrc_asn1_warn_assert(meas_rssi_report_cfg_r13_present != (meas_rssi_report_cfg_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= meas_rssi_report_cfg_r13_present; + group_flags[3] |= include_multi_band_info_r13_present; + rrc_asn1_warn_assert(ul_delay_cfg_r13_present != (ul_delay_cfg_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= ul_delay_cfg_r13_present; + group_flags[4] |= ue_rx_tx_time_diff_periodical_tdd_r13_present; + group_flags[5] |= purpose_v1430_present; + group_flags[6] |= max_report_rs_idx_r15_present; + rrc_asn1_warn_assert(include_bt_meas_r15_present != (include_bt_meas_r15.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= include_bt_meas_r15_present; + rrc_asn1_warn_assert(include_wlan_meas_r15_present != (include_wlan_meas_r15.get() != NULL), __FILE__, __LINE__); + group_flags[7] |= include_wlan_meas_r15_present; + group_flags[7] |= purpose_r15_present; + group_flags[7] |= nof_triggering_cells_r15_present; + group_flags[7] |= a4_a5_report_on_leave_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(si_request_for_ho_r9_present, 1)); + HANDLE_CODE(bref.pack(ue_rx_tx_time_diff_periodical_r9_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(include_location_info_r10_present, 1)); + HANDLE_CODE(bref.pack(report_add_neigh_meas_r10_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(alternative_time_to_trigger_r12_present, 1)); + HANDLE_CODE(bref.pack(use_t312_r12_present, 1)); + HANDLE_CODE(bref.pack(use_ps_cell_r12_present, 1)); + HANDLE_CODE(bref.pack(a_n_thres1_v1250_present, 1)); + HANDLE_CODE(bref.pack(a5_thres2_v1250_present, 1)); + HANDLE_CODE(bref.pack(report_strongest_csi_rss_r12_present, 1)); + HANDLE_CODE(bref.pack(report_crs_meas_r12_present, 1)); + HANDLE_CODE(bref.pack(trigger_quant_csi_rs_r12_present, 1)); + if (alternative_time_to_trigger_r12_present) { + HANDLE_CODE(alternative_time_to_trigger_r12->pack(bref)); + } + if (use_t312_r12_present) { + HANDLE_CODE(bref.pack(use_t312_r12, 1)); + } + if (use_ps_cell_r12_present) { + HANDLE_CODE(bref.pack(use_ps_cell_r12, 1)); + } + if (a_n_thres1_v1250_present) { + HANDLE_CODE(a_n_thres1_v1250->pack(bref)); + } + if (a5_thres2_v1250_present) { + HANDLE_CODE(a5_thres2_v1250->pack(bref)); + } + if (report_strongest_csi_rss_r12_present) { + HANDLE_CODE(bref.pack(report_strongest_csi_rss_r12, 1)); + } + if (report_crs_meas_r12_present) { + HANDLE_CODE(bref.pack(report_crs_meas_r12, 1)); + } + if (trigger_quant_csi_rs_r12_present) { + HANDLE_CODE(bref.pack(trigger_quant_csi_rs_r12, 1)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(report_sstd_meas_r13_present, 1)); + HANDLE_CODE(bref.pack(rs_sinr_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(use_white_cell_list_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_rssi_report_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(include_multi_band_info_r13_present, 1)); + HANDLE_CODE(bref.pack(ul_delay_cfg_r13_present, 1)); + if (report_sstd_meas_r13_present) { + HANDLE_CODE(bref.pack(report_sstd_meas_r13, 1)); + } + if (rs_sinr_cfg_r13_present) { + HANDLE_CODE(rs_sinr_cfg_r13->pack(bref)); + } + if (use_white_cell_list_r13_present) { + HANDLE_CODE(bref.pack(use_white_cell_list_r13, 1)); + } + if (meas_rssi_report_cfg_r13_present) { + HANDLE_CODE(meas_rssi_report_cfg_r13->pack(bref)); + } + if (ul_delay_cfg_r13_present) { + HANDLE_CODE(ul_delay_cfg_r13->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ue_rx_tx_time_diff_periodical_tdd_r13_present, 1)); + if (ue_rx_tx_time_diff_periodical_tdd_r13_present) { + HANDLE_CODE(bref.pack(ue_rx_tx_time_diff_periodical_tdd_r13, 1)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(purpose_v1430_present, 1)); + if (purpose_v1430_present) { + HANDLE_CODE(pack_enum(bref, purpose_v1430)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(max_report_rs_idx_r15_present, 1)); + if (max_report_rs_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_report_rs_idx_r15, (uint8_t)0, (uint8_t)32)); + } + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(include_bt_meas_r15_present, 1)); + HANDLE_CODE(bref.pack(include_wlan_meas_r15_present, 1)); + HANDLE_CODE(bref.pack(purpose_r15_present, 1)); + HANDLE_CODE(bref.pack(nof_triggering_cells_r15_present, 1)); + HANDLE_CODE(bref.pack(a4_a5_report_on_leave_r15_present, 1)); + if (include_bt_meas_r15_present) { + HANDLE_CODE(include_bt_meas_r15->pack(bref)); + } + if (include_wlan_meas_r15_present) { + HANDLE_CODE(include_wlan_meas_r15->pack(bref)); + } + if (nof_triggering_cells_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, nof_triggering_cells_r15, (uint8_t)2, (uint8_t)8)); + } + if (a4_a5_report_on_leave_r15_present) { + HANDLE_CODE(bref.pack(a4_a5_report_on_leave_r15, 1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_eutra_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(trigger_type.unpack(bref)); + HANDLE_CODE(unpack_enum(trigger_quant, bref)); + HANDLE_CODE(unpack_enum(report_quant, bref)); + HANDLE_CODE(unpack_unalign_integer(max_report_cells, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_enum(report_interv, bref)); + HANDLE_CODE(unpack_enum(report_amount, bref)); + + if (ext) { + ext_groups_header group_flags(8); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(si_request_for_ho_r9_present, 1)); + HANDLE_CODE(bref.unpack(ue_rx_tx_time_diff_periodical_r9_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(include_location_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(report_add_neigh_meas_r10_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(alternative_time_to_trigger_r12_present, 1)); + HANDLE_CODE(bref.unpack(use_t312_r12_present, 1)); + HANDLE_CODE(bref.unpack(use_ps_cell_r12_present, 1)); + HANDLE_CODE(bref.unpack(a_n_thres1_v1250_present, 1)); + HANDLE_CODE(bref.unpack(a5_thres2_v1250_present, 1)); + HANDLE_CODE(bref.unpack(report_strongest_csi_rss_r12_present, 1)); + HANDLE_CODE(bref.unpack(report_crs_meas_r12_present, 1)); + HANDLE_CODE(bref.unpack(trigger_quant_csi_rs_r12_present, 1)); + if (alternative_time_to_trigger_r12_present) { + alternative_time_to_trigger_r12 = make_copy_ptr(alternative_time_to_trigger_r12_c_()); + HANDLE_CODE(alternative_time_to_trigger_r12->unpack(bref)); + } + if (use_t312_r12_present) { + HANDLE_CODE(bref.unpack(use_t312_r12, 1)); + } + if (use_ps_cell_r12_present) { + HANDLE_CODE(bref.unpack(use_ps_cell_r12, 1)); + } + if (a_n_thres1_v1250_present) { + a_n_thres1_v1250 = make_copy_ptr(rsrq_range_cfg_r12_c()); + HANDLE_CODE(a_n_thres1_v1250->unpack(bref)); + } + if (a5_thres2_v1250_present) { + a5_thres2_v1250 = make_copy_ptr(rsrq_range_cfg_r12_c()); + HANDLE_CODE(a5_thres2_v1250->unpack(bref)); + } + if (report_strongest_csi_rss_r12_present) { + HANDLE_CODE(bref.unpack(report_strongest_csi_rss_r12, 1)); + } + if (report_crs_meas_r12_present) { + HANDLE_CODE(bref.unpack(report_crs_meas_r12, 1)); + } + if (trigger_quant_csi_rs_r12_present) { + HANDLE_CODE(bref.unpack(trigger_quant_csi_rs_r12, 1)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(report_sstd_meas_r13_present, 1)); + HANDLE_CODE(bref.unpack(rs_sinr_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(use_white_cell_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_rssi_report_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(include_multi_band_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(ul_delay_cfg_r13_present, 1)); + if (report_sstd_meas_r13_present) { + HANDLE_CODE(bref.unpack(report_sstd_meas_r13, 1)); + } + if (rs_sinr_cfg_r13_present) { + rs_sinr_cfg_r13 = make_copy_ptr(rs_sinr_cfg_r13_c_()); + HANDLE_CODE(rs_sinr_cfg_r13->unpack(bref)); + } + if (use_white_cell_list_r13_present) { + HANDLE_CODE(bref.unpack(use_white_cell_list_r13, 1)); + } + if (meas_rssi_report_cfg_r13_present) { + meas_rssi_report_cfg_r13 = make_copy_ptr(meas_rssi_report_cfg_r13_s()); + HANDLE_CODE(meas_rssi_report_cfg_r13->unpack(bref)); + } + if (ul_delay_cfg_r13_present) { + ul_delay_cfg_r13 = make_copy_ptr(ul_delay_cfg_r13_c()); + HANDLE_CODE(ul_delay_cfg_r13->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ue_rx_tx_time_diff_periodical_tdd_r13_present, 1)); + if (ue_rx_tx_time_diff_periodical_tdd_r13_present) { + HANDLE_CODE(bref.unpack(ue_rx_tx_time_diff_periodical_tdd_r13, 1)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(purpose_v1430_present, 1)); + if (purpose_v1430_present) { + HANDLE_CODE(unpack_enum(purpose_v1430, bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(max_report_rs_idx_r15_present, 1)); + if (max_report_rs_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_report_rs_idx_r15, bref, (uint8_t)0, (uint8_t)32)); + } + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(include_bt_meas_r15_present, 1)); + HANDLE_CODE(bref.unpack(include_wlan_meas_r15_present, 1)); + HANDLE_CODE(bref.unpack(purpose_r15_present, 1)); + HANDLE_CODE(bref.unpack(nof_triggering_cells_r15_present, 1)); + HANDLE_CODE(bref.unpack(a4_a5_report_on_leave_r15_present, 1)); + if (include_bt_meas_r15_present) { + include_bt_meas_r15 = make_copy_ptr(bt_name_list_cfg_r15_c()); + HANDLE_CODE(include_bt_meas_r15->unpack(bref)); + } + if (include_wlan_meas_r15_present) { + include_wlan_meas_r15 = make_copy_ptr(wlan_name_list_cfg_r15_c()); + HANDLE_CODE(include_wlan_meas_r15->unpack(bref)); + } + if (nof_triggering_cells_r15_present) { + HANDLE_CODE(unpack_unalign_integer(nof_triggering_cells_r15, bref, (uint8_t)2, (uint8_t)8)); + } + if (a4_a5_report_on_leave_r15_present) { + HANDLE_CODE(bref.unpack(a4_a5_report_on_leave_r15, 1)); + } + } + } + return SRSASN_SUCCESS; +} +void report_cfg_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("triggerType"); + trigger_type.to_json(j); + j.write_str("triggerQuantity", trigger_quant.to_string()); + j.write_str("reportQuantity", report_quant.to_string()); + j.write_int("maxReportCells", max_report_cells); + j.write_str("reportInterval", report_interv.to_string()); + j.write_str("reportAmount", report_amount.to_string()); + if (si_request_for_ho_r9_present) { + j.write_str("si-RequestForHO-r9", "setup"); + } + if (ue_rx_tx_time_diff_periodical_r9_present) { + j.write_str("ue-RxTxTimeDiffPeriodical-r9", "setup"); + } + if (include_location_info_r10_present) { + j.write_str("includeLocationInfo-r10", "true"); + } + if (report_add_neigh_meas_r10_present) { + j.write_str("reportAddNeighMeas-r10", "setup"); + } + if (alternative_time_to_trigger_r12_present) { + j.write_fieldname("alternativeTimeToTrigger-r12"); + alternative_time_to_trigger_r12->to_json(j); + } + if (use_t312_r12_present) { + j.write_bool("useT312-r12", use_t312_r12); + } + if (use_ps_cell_r12_present) { + j.write_bool("usePSCell-r12", use_ps_cell_r12); + } + if (a_n_thres1_v1250_present) { + j.write_fieldname("aN-Threshold1-v1250"); + a_n_thres1_v1250->to_json(j); + } + if (a5_thres2_v1250_present) { + j.write_fieldname("a5-Threshold2-v1250"); + a5_thres2_v1250->to_json(j); + } + if (report_strongest_csi_rss_r12_present) { + j.write_bool("reportStrongestCSI-RSs-r12", report_strongest_csi_rss_r12); + } + if (report_crs_meas_r12_present) { + j.write_bool("reportCRS-Meas-r12", report_crs_meas_r12); + } + if (trigger_quant_csi_rs_r12_present) { + j.write_bool("triggerQuantityCSI-RS-r12", trigger_quant_csi_rs_r12); + } + if (report_sstd_meas_r13_present) { + j.write_bool("reportSSTD-Meas-r13", report_sstd_meas_r13); + } + if (rs_sinr_cfg_r13_present) { + j.write_fieldname("rs-sinr-Config-r13"); + rs_sinr_cfg_r13->to_json(j); + } + if (use_white_cell_list_r13_present) { + j.write_bool("useWhiteCellList-r13", use_white_cell_list_r13); + } + if (meas_rssi_report_cfg_r13_present) { + j.write_fieldname("measRSSI-ReportConfig-r13"); + meas_rssi_report_cfg_r13->to_json(j); + } + if (include_multi_band_info_r13_present) { + j.write_str("includeMultiBandInfo-r13", "true"); + } + if (ul_delay_cfg_r13_present) { + j.write_fieldname("ul-DelayConfig-r13"); + ul_delay_cfg_r13->to_json(j); + } + if (ue_rx_tx_time_diff_periodical_tdd_r13_present) { + j.write_bool("ue-RxTxTimeDiffPeriodicalTDD-r13", ue_rx_tx_time_diff_periodical_tdd_r13); + } + if (purpose_v1430_present) { + j.write_str("purpose-v1430", purpose_v1430.to_string()); + } + if (max_report_rs_idx_r15_present) { + j.write_int("maxReportRS-Index-r15", max_report_rs_idx_r15); + } + if (include_bt_meas_r15_present) { + j.write_fieldname("includeBT-Meas-r15"); + include_bt_meas_r15->to_json(j); + } + if (include_wlan_meas_r15_present) { + j.write_fieldname("includeWLAN-Meas-r15"); + include_wlan_meas_r15->to_json(j); + } + if (purpose_r15_present) { + j.write_str("purpose-r15", "sensing"); + } + if (nof_triggering_cells_r15_present) { + j.write_int("numberOfTriggeringCells-r15", nof_triggering_cells_r15); + } + if (a4_a5_report_on_leave_r15_present) { + j.write_bool("a4-a5-ReportOnLeave-r15", a4_a5_report_on_leave_r15); + } + j.end_obj(); +} + +void report_cfg_eutra_s::trigger_type_c_::destroy_() +{ + switch (type_) { + case types::event: + c.destroy(); + break; + case types::periodical: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_eutra_s::trigger_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::event: + c.init(); + break; + case types::periodical: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_"); + } +} +report_cfg_eutra_s::trigger_type_c_::trigger_type_c_(const report_cfg_eutra_s::trigger_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::event: + c.init(other.c.get()); + break; + case types::periodical: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_"); + } +} +report_cfg_eutra_s::trigger_type_c_& report_cfg_eutra_s::trigger_type_c_:: + operator=(const report_cfg_eutra_s::trigger_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::event: + c.set(other.c.get()); + break; + case types::periodical: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_"); + } + + return *this; +} +void report_cfg_eutra_s::trigger_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::event: + j.write_fieldname("event"); + c.get().to_json(j); + break; + case types::periodical: + j.write_fieldname("periodical"); + j.start_obj(); + j.write_str("purpose", c.get().purpose.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_eutra_s::trigger_type_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::event: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::periodical: + HANDLE_CODE(pack_enum(bref, c.get().purpose)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_eutra_s::trigger_type_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::event: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::periodical: + HANDLE_CODE(unpack_enum(c.get().purpose, bref)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::trigger_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void report_cfg_eutra_s::alternative_time_to_trigger_r12_c_::set(types::options e) +{ + type_ = e; +} +void report_cfg_eutra_s::alternative_time_to_trigger_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::alternative_time_to_trigger_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_eutra_s::alternative_time_to_trigger_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::alternative_time_to_trigger_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_eutra_s::alternative_time_to_trigger_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::alternative_time_to_trigger_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void report_cfg_eutra_s::rs_sinr_cfg_r13_c_::set(types::options e) +{ + type_ = e; +} +void report_cfg_eutra_s::rs_sinr_cfg_r13_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(); + if (c.trigger_quant_v1310_present) { + j.write_str("triggerQuantity-v1310", "sinr"); + } + if (c.a_n_thres1_r13_present) { + j.write_int("aN-Threshold1-r13", c.a_n_thres1_r13); + } + if (c.a5_thres2_r13_present) { + j.write_int("a5-Threshold2-r13", c.a5_thres2_r13); + } + j.write_str("reportQuantity-v1310", c.report_quant_v1310.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::rs_sinr_cfg_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_eutra_s::rs_sinr_cfg_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.trigger_quant_v1310_present, 1)); + HANDLE_CODE(bref.pack(c.a_n_thres1_r13_present, 1)); + HANDLE_CODE(bref.pack(c.a5_thres2_r13_present, 1)); + if (c.a_n_thres1_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.a_n_thres1_r13, (uint8_t)0, (uint8_t)127)); + } + if (c.a5_thres2_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.a5_thres2_r13, (uint8_t)0, (uint8_t)127)); + } + HANDLE_CODE(pack_enum(bref, c.report_quant_v1310)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::rs_sinr_cfg_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_eutra_s::rs_sinr_cfg_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.trigger_quant_v1310_present, 1)); + HANDLE_CODE(bref.unpack(c.a_n_thres1_r13_present, 1)); + HANDLE_CODE(bref.unpack(c.a5_thres2_r13_present, 1)); + if (c.a_n_thres1_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.a_n_thres1_r13, bref, (uint8_t)0, (uint8_t)127)); + } + if (c.a5_thres2_r13_present) { + HANDLE_CODE(unpack_unalign_integer(c.a5_thres2_r13, bref, (uint8_t)0, (uint8_t)127)); + } + HANDLE_CODE(unpack_enum(c.report_quant_v1310, bref)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_eutra_s::rs_sinr_cfg_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +report_cfg_eutra_s::rs_sinr_cfg_r13_c_::setup_s_::setup_s_() +{ + trigger_quant_v1310_present = false; + a_n_thres1_r13_present = false; + a5_thres2_r13_present = false; +} + +// ReportConfigInterRAT ::= SEQUENCE +report_cfg_inter_rat_s::report_cfg_inter_rat_s() +{ + ext = false; + si_request_for_ho_r9_present = false; + report_quant_utra_fdd_r10_present = false; + include_location_info_r11_present = false; + b2_thres1_v1250_present = false; + report_quant_wlan_r13_present = false; + report_any_wlan_r14_present = false; + report_quant_cell_nr_r15_present = false; + max_report_rs_idx_r15_present = false; + report_quant_rs_idx_nr_r15_present = false; + report_rs_idx_results_nr_present = false; + report_sftd_meas_r15_present = false; +} +SRSASN_CODE report_cfg_inter_rat_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(trigger_type.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, max_report_cells, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_enum(bref, report_interv)); + HANDLE_CODE(pack_enum(bref, report_amount)); + + if (ext) { + ext_groups_header group_flags(7); + group_flags[0] |= si_request_for_ho_r9_present; + group_flags[1] |= report_quant_utra_fdd_r10_present; + group_flags[2] |= include_location_info_r11_present; + rrc_asn1_warn_assert(b2_thres1_v1250_present != (b2_thres1_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= b2_thres1_v1250_present; + rrc_asn1_warn_assert(report_quant_wlan_r13_present != (report_quant_wlan_r13.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= report_quant_wlan_r13_present; + group_flags[5] |= report_any_wlan_r14_present; + rrc_asn1_warn_assert(report_quant_cell_nr_r15_present != (report_quant_cell_nr_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= report_quant_cell_nr_r15_present; + group_flags[6] |= max_report_rs_idx_r15_present; + rrc_asn1_warn_assert(report_quant_rs_idx_nr_r15_present != (report_quant_rs_idx_nr_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= report_quant_rs_idx_nr_r15_present; + group_flags[6] |= report_rs_idx_results_nr_present; + group_flags[6] |= report_sftd_meas_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(si_request_for_ho_r9_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(report_quant_utra_fdd_r10_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(include_location_info_r11_present, 1)); + if (include_location_info_r11_present) { + HANDLE_CODE(bref.pack(include_location_info_r11, 1)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(b2_thres1_v1250_present, 1)); + if (b2_thres1_v1250_present) { + HANDLE_CODE(b2_thres1_v1250->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(report_quant_wlan_r13_present, 1)); + if (report_quant_wlan_r13_present) { + HANDLE_CODE(report_quant_wlan_r13->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(report_any_wlan_r14_present, 1)); + if (report_any_wlan_r14_present) { + HANDLE_CODE(bref.pack(report_any_wlan_r14, 1)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(report_quant_cell_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(max_report_rs_idx_r15_present, 1)); + HANDLE_CODE(bref.pack(report_quant_rs_idx_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(report_rs_idx_results_nr_present, 1)); + HANDLE_CODE(bref.pack(report_sftd_meas_r15_present, 1)); + if (report_quant_cell_nr_r15_present) { + HANDLE_CODE(report_quant_cell_nr_r15->pack(bref)); + } + if (max_report_rs_idx_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_report_rs_idx_r15, (uint8_t)0, (uint8_t)32)); + } + if (report_quant_rs_idx_nr_r15_present) { + HANDLE_CODE(report_quant_rs_idx_nr_r15->pack(bref)); + } + if (report_rs_idx_results_nr_present) { + HANDLE_CODE(bref.pack(report_rs_idx_results_nr, 1)); + } + if (report_sftd_meas_r15_present) { + HANDLE_CODE(pack_enum(bref, report_sftd_meas_r15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_inter_rat_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(trigger_type.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(max_report_cells, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_enum(report_interv, bref)); + HANDLE_CODE(unpack_enum(report_amount, bref)); + + if (ext) { + ext_groups_header group_flags(7); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(si_request_for_ho_r9_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(report_quant_utra_fdd_r10_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(include_location_info_r11_present, 1)); + if (include_location_info_r11_present) { + HANDLE_CODE(bref.unpack(include_location_info_r11, 1)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(b2_thres1_v1250_present, 1)); + if (b2_thres1_v1250_present) { + b2_thres1_v1250 = make_copy_ptr(b2_thres1_v1250_c_()); + HANDLE_CODE(b2_thres1_v1250->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(report_quant_wlan_r13_present, 1)); + if (report_quant_wlan_r13_present) { + report_quant_wlan_r13 = make_copy_ptr(report_quant_wlan_r13_s()); + HANDLE_CODE(report_quant_wlan_r13->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(report_any_wlan_r14_present, 1)); + if (report_any_wlan_r14_present) { + HANDLE_CODE(bref.unpack(report_any_wlan_r14, 1)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(report_quant_cell_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(max_report_rs_idx_r15_present, 1)); + HANDLE_CODE(bref.unpack(report_quant_rs_idx_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(report_rs_idx_results_nr_present, 1)); + HANDLE_CODE(bref.unpack(report_sftd_meas_r15_present, 1)); + if (report_quant_cell_nr_r15_present) { + report_quant_cell_nr_r15 = make_copy_ptr(report_quant_nr_r15_s()); + HANDLE_CODE(report_quant_cell_nr_r15->unpack(bref)); + } + if (max_report_rs_idx_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_report_rs_idx_r15, bref, (uint8_t)0, (uint8_t)32)); + } + if (report_quant_rs_idx_nr_r15_present) { + report_quant_rs_idx_nr_r15 = make_copy_ptr(report_quant_nr_r15_s()); + HANDLE_CODE(report_quant_rs_idx_nr_r15->unpack(bref)); + } + if (report_rs_idx_results_nr_present) { + HANDLE_CODE(bref.unpack(report_rs_idx_results_nr, 1)); + } + if (report_sftd_meas_r15_present) { + HANDLE_CODE(unpack_enum(report_sftd_meas_r15, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void report_cfg_inter_rat_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("triggerType"); + trigger_type.to_json(j); + j.write_int("maxReportCells", max_report_cells); + j.write_str("reportInterval", report_interv.to_string()); + j.write_str("reportAmount", report_amount.to_string()); + if (si_request_for_ho_r9_present) { + j.write_str("si-RequestForHO-r9", "setup"); + } + if (report_quant_utra_fdd_r10_present) { + j.write_str("reportQuantityUTRA-FDD-r10", "both"); + } + if (include_location_info_r11_present) { + j.write_bool("includeLocationInfo-r11", include_location_info_r11); + } + if (b2_thres1_v1250_present) { + j.write_fieldname("b2-Threshold1-v1250"); + b2_thres1_v1250->to_json(j); + } + if (report_quant_wlan_r13_present) { + j.write_fieldname("reportQuantityWLAN-r13"); + report_quant_wlan_r13->to_json(j); + } + if (report_any_wlan_r14_present) { + j.write_bool("reportAnyWLAN-r14", report_any_wlan_r14); + } + if (report_quant_cell_nr_r15_present) { + j.write_fieldname("reportQuantityCellNR-r15"); + report_quant_cell_nr_r15->to_json(j); + } + if (max_report_rs_idx_r15_present) { + j.write_int("maxReportRS-Index-r15", max_report_rs_idx_r15); + } + if (report_quant_rs_idx_nr_r15_present) { + j.write_fieldname("reportQuantityRS-IndexNR-r15"); + report_quant_rs_idx_nr_r15->to_json(j); + } + if (report_rs_idx_results_nr_present) { + j.write_bool("reportRS-IndexResultsNR", report_rs_idx_results_nr); + } + if (report_sftd_meas_r15_present) { + j.write_str("reportSFTD-Meas-r15", report_sftd_meas_r15.to_string()); + } + j.end_obj(); +} + +void report_cfg_inter_rat_s::trigger_type_c_::destroy_() +{ + switch (type_) { + case types::event: + c.destroy(); + break; + case types::periodical: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_inter_rat_s::trigger_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::event: + c.init(); + break; + case types::periodical: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::trigger_type_c_(const report_cfg_inter_rat_s::trigger_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::event: + c.init(other.c.get()); + break; + case types::periodical: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_& report_cfg_inter_rat_s::trigger_type_c_:: + operator=(const report_cfg_inter_rat_s::trigger_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::event: + c.set(other.c.get()); + break; + case types::periodical: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_"); + } + + return *this; +} +void report_cfg_inter_rat_s::trigger_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::event: + j.write_fieldname("event"); + j.start_obj(); + j.write_fieldname("eventId"); + c.get().event_id.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::periodical: + j.write_fieldname("periodical"); + j.start_obj(); + j.write_str("purpose", c.get().purpose.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_inter_rat_s::trigger_type_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::event: + HANDLE_CODE(c.get().event_id.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().hysteresis, (uint8_t)0, (uint8_t)30)); + HANDLE_CODE(pack_enum(bref, c.get().time_to_trigger)); + break; + case types::periodical: + HANDLE_CODE(pack_enum(bref, c.get().purpose)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_inter_rat_s::trigger_type_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::event: + HANDLE_CODE(c.get().event_id.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(c.get().hysteresis, bref, (uint8_t)0, (uint8_t)30)); + HANDLE_CODE(unpack_enum(c.get().time_to_trigger, bref)); + break; + case types::periodical: + HANDLE_CODE(unpack_enum(c.get().purpose, bref)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::destroy_() +{ + switch (type_) { + case types::event_b1: + c.destroy(); + break; + case types::event_b2: + c.destroy(); + break; + case types::event_w1_r13: + c.destroy(); + break; + case types::event_w2_r13: + c.destroy(); + break; + case types::event_w3_r13: + c.destroy(); + break; + case types::event_b1_nr_r15: + c.destroy(); + break; + case types::event_b2_nr_r15: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_inter_rat_s::trigger_type_c_::event_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_w1_r13: + c.init(); + break; + case types::event_w2_r13: + c.init(); + break; + case types::event_w3_r13: + c.init(); + break; + case types::event_b1_nr_r15: + c.init(); + break; + case types::event_b2_nr_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_id_c_( + const report_cfg_inter_rat_s::trigger_type_c_::event_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_w1_r13: + c.init(other.c.get()); + break; + case types::event_w2_r13: + c.init(other.c.get()); + break; + case types::event_w3_r13: + c.init(other.c.get()); + break; + case types::event_b1_nr_r15: + c.init(other.c.get()); + break; + case types::event_b2_nr_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_& +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_:: +operator=(const report_cfg_inter_rat_s::trigger_type_c_::event_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_w1_r13: + c.set(other.c.get()); + break; + case types::event_w2_r13: + c.set(other.c.get()); + break; + case types::event_w3_r13: + c.set(other.c.get()); + break; + case types::event_b1_nr_r15: + c.set(other.c.get()); + break; + case types::event_b2_nr_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_"); + } + + return *this; +} +void report_cfg_inter_rat_s::trigger_type_c_::event_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-Threshold"); + c.get().b1_thres.to_json(j); + 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-Threshold2"); + c.get().b2_thres2.to_json(j); + j.end_obj(); + break; + case types::event_w1_r13: + j.write_fieldname("eventW1-r13"); + j.start_obj(); + j.write_int("w1-Threshold-r13", c.get().w1_thres_r13); + j.end_obj(); + break; + case types::event_w2_r13: + j.write_fieldname("eventW2-r13"); + j.start_obj(); + j.write_int("w2-Threshold1-r13", c.get().w2_thres1_r13); + j.write_int("w2-Threshold2-r13", c.get().w2_thres2_r13); + j.end_obj(); + break; + case types::event_w3_r13: + j.write_fieldname("eventW3-r13"); + j.start_obj(); + j.write_int("w3-Threshold-r13", c.get().w3_thres_r13); + j.end_obj(); + break; + case types::event_b1_nr_r15: + j.write_fieldname("eventB1-NR-r15"); + j.start_obj(); + j.write_fieldname("b1-ThresholdNR-r15"); + c.get().b1_thres_nr_r15.to_json(j); + j.write_bool("reportOnLeave-r15", c.get().report_on_leave_r15); + j.end_obj(); + break; + case types::event_b2_nr_r15: + j.write_fieldname("eventB2-NR-r15"); + j.start_obj(); + j.write_fieldname("b2-Threshold1-r15"); + c.get().b2_thres1_r15.to_json(j); + j.write_fieldname("b2-Threshold2NR-r15"); + c.get().b2_thres2_nr_r15.to_json(j); + j.write_bool("reportOnLeave-r15", c.get().report_on_leave_r15); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::event_b1: + HANDLE_CODE(c.get().b1_thres.pack(bref)); + break; + case types::event_b2: + HANDLE_CODE(c.get().b2_thres1.pack(bref)); + HANDLE_CODE(c.get().b2_thres2.pack(bref)); + break; + case types::event_w1_r13: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().w1_thres_r13, (uint8_t)0, (uint8_t)141)); + } break; + case types::event_w2_r13: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().w2_thres1_r13, (uint8_t)0, (uint8_t)141)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().w2_thres2_r13, (uint8_t)0, (uint8_t)141)); + } break; + case types::event_w3_r13: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get().w3_thres_r13, (uint8_t)0, (uint8_t)141)); + } break; + case types::event_b1_nr_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().b1_thres_nr_r15.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r15, 1)); + } break; + case types::event_b2_nr_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().b2_thres1_r15.pack(bref)); + HANDLE_CODE(c.get().b2_thres2_nr_r15.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r15, 1)); + } break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::event_b1: + HANDLE_CODE(c.get().b1_thres.unpack(bref)); + break; + case types::event_b2: + HANDLE_CODE(c.get().b2_thres1.unpack(bref)); + HANDLE_CODE(c.get().b2_thres2.unpack(bref)); + break; + case types::event_w1_r13: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().w1_thres_r13, bref, (uint8_t)0, (uint8_t)141)); + } break; + case types::event_w2_r13: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().w2_thres1_r13, bref, (uint8_t)0, (uint8_t)141)); + HANDLE_CODE(unpack_unalign_integer(c.get().w2_thres2_r13, bref, (uint8_t)0, (uint8_t)141)); + } break; + case types::event_w3_r13: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get().w3_thres_r13, bref, (uint8_t)0, (uint8_t)141)); + } break; + case types::event_b1_nr_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().b1_thres_nr_r15.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r15, 1)); + } break; + case types::event_b2_nr_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().b2_thres1_r15.unpack(bref)); + HANDLE_CODE(c.get().b2_thres2_nr_r15.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r15, 1)); + } break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::destroy_() +{ + switch (type_) { + case types::b1_thres_utra: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::b1_thres_utra: + c.init(); + break; + case types::b1_thres_geran: + break; + case types::b1_thres_cdma2000: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::b1_thres_c_( + const report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::b1_thres_utra: + c.init(other.c.get()); + break; + case types::b1_thres_geran: + c.init(other.c.get()); + break; + case types::b1_thres_cdma2000: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_& +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_:: +operator=(const report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::b1_thres_utra: + c.set(other.c.get()); + break; + case types::b1_thres_geran: + c.set(other.c.get()); + break; + case types::b1_thres_cdma2000: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_"); + } + + return *this; +} +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::b1_thres_utra: + j.write_fieldname("b1-ThresholdUTRA"); + c.get().to_json(j); + break; + case types::b1_thres_geran: + j.write_int("b1-ThresholdGERAN", c.get()); + break; + case types::b1_thres_cdma2000: + j.write_int("b1-ThresholdCDMA2000", c.get()); + break; + default: + log_invalid_choice_id(type_, + "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_"); + } + j.end_obj(); +} +SRSASN_CODE +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::b1_thres_utra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::b1_thres_geran: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + case types::b1_thres_cdma2000: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + default: + log_invalid_choice_id(type_, + "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::b1_thres_utra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::b1_thres_geran: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + case types::b1_thres_cdma2000: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + default: + log_invalid_choice_id(type_, + "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::destroy_() +{ + switch (type_) { + case types::b2_thres2_utra: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::b2_thres2_utra: + c.init(); + break; + case types::b2_thres2_geran: + break; + case types::b2_thres2_cdma2000: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::b2_thres2_c_( + const report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::b2_thres2_utra: + c.init(other.c.get()); + break; + case types::b2_thres2_geran: + c.init(other.c.get()); + break; + case types::b2_thres2_cdma2000: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_"); + } +} +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_& +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_:: +operator=(const report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::b2_thres2_utra: + c.set(other.c.get()); + break; + case types::b2_thres2_geran: + c.set(other.c.get()); + break; + case types::b2_thres2_cdma2000: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_"); + } + + return *this; +} +void report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::b2_thres2_utra: + j.write_fieldname("b2-Threshold2UTRA"); + c.get().to_json(j); + break; + case types::b2_thres2_geran: + j.write_int("b2-Threshold2GERAN", c.get()); + break; + case types::b2_thres2_cdma2000: + j.write_int("b2-Threshold2CDMA2000", c.get()); + break; + default: + log_invalid_choice_id( + type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_"); + } + j.end_obj(); +} +SRSASN_CODE +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::b2_thres2_utra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::b2_thres2_geran: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + case types::b2_thres2_cdma2000: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + default: + log_invalid_choice_id( + type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::b2_thres2_utra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::b2_thres2_geran: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + case types::b2_thres2_cdma2000: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + default: + log_invalid_choice_id( + type_, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void report_cfg_inter_rat_s::b2_thres1_v1250_c_::set(types::options e) +{ + type_ = e; +} +void report_cfg_inter_rat_s::b2_thres1_v1250_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::b2_thres1_v1250_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_inter_rat_s::b2_thres1_v1250_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c, (int8_t)-30, (int8_t)46)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::b2_thres1_v1250_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_inter_rat_s::b2_thres1_v1250_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c, bref, (int8_t)-30, (int8_t)46)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_inter_rat_s::b2_thres1_v1250_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ReportProximityConfig-r9 ::= SEQUENCE +report_proximity_cfg_r9_s::report_proximity_cfg_r9_s() +{ + proximity_ind_eutra_r9_present = false; + proximity_ind_utra_r9_present = false; +} +SRSASN_CODE report_proximity_cfg_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(proximity_ind_eutra_r9_present, 1)); + HANDLE_CODE(bref.pack(proximity_ind_utra_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_proximity_cfg_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(proximity_ind_eutra_r9_present, 1)); + HANDLE_CODE(bref.unpack(proximity_ind_utra_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void report_proximity_cfg_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (proximity_ind_eutra_r9_present) { + j.write_str("proximityIndicationEUTRA-r9", "enabled"); + } + if (proximity_ind_utra_r9_present) { + j.write_str("proximityIndicationUTRA-r9", "enabled"); + } + j.end_obj(); +} + +// TrackingAreaCodeList-v1130 ::= SEQUENCE +SRSASN_CODE tac_list_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_per_tac_list_r11, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tac_list_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_per_tac_list_r11, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void tac_list_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmn-Identity-perTAC-List-r11"); + for (uint32_t i1 = 0; i1 < plmn_id_per_tac_list_r11.size(); ++i1) { + plmn_id_per_tac_list_r11[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// UECapabilityEnquiry-v1430-IEs ::= SEQUENCE +ue_cap_enquiry_v1430_ies_s::ue_cap_enquiry_v1430_ies_s() +{ + request_diff_fallback_comb_list_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(request_diff_fallback_comb_list_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (request_diff_fallback_comb_list_r14_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, request_diff_fallback_comb_list_r14, 1, 384, SeqOfPacker(1, 64, Packer()))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(request_diff_fallback_comb_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (request_diff_fallback_comb_list_r14_present) { + HANDLE_CODE( + unpack_dyn_seq_of(request_diff_fallback_comb_list_r14, bref, 1, 384, SeqOfPacker(1, 64, Packer()))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (request_diff_fallback_comb_list_r14_present) { + j.start_array("requestDiffFallbackCombList-r14"); + for (uint32_t i1 = 0; i1 < request_diff_fallback_comb_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < request_diff_fallback_comb_list_r14[i1].size(); ++i2) { + request_diff_fallback_comb_list_r14[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationRequest-v1250-IEs ::= SEQUENCE +ue_info_request_v1250_ies_s::ue_info_request_v1250_ies_s() +{ + mob_history_report_req_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_request_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mob_history_report_req_r12_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_info_request_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mob_history_report_req_r12_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_info_request_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mob_history_report_req_r12_present) { + j.write_str("mobilityHistoryReportReq-r12", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// AreaConfiguration-v1130 ::= SEQUENCE +SRSASN_CODE area_cfg_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(tac_list_v1130.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE area_cfg_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(tac_list_v1130.unpack(bref)); + + return SRSASN_SUCCESS; +} +void area_cfg_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("trackingAreaCodeList-v1130"); + tac_list_v1130.to_json(j); + j.end_obj(); +} + +// CellGlobalIdEUTRA ::= SEQUENCE +SRSASN_CODE cell_global_id_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(cell_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_global_id_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(cell_id.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_global_id_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + j.write_str("cellIdentity", cell_id.to_string()); + j.end_obj(); +} + +// HandoverFromEUTRAPreparationRequest-v1020-IEs ::= SEQUENCE +ho_from_eutra_prep_request_v1020_ies_s::ho_from_eutra_prep_request_v1020_ies_s() +{ + dual_rx_tx_redirect_ind_r10_present = false; + redirect_carrier_cdma2000_minus1_xrtt_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_from_eutra_prep_request_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dual_rx_tx_redirect_ind_r10_present, 1)); + HANDLE_CODE(bref.pack(redirect_carrier_cdma2000_minus1_xrtt_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (redirect_carrier_cdma2000_minus1_xrtt_r10_present) { + HANDLE_CODE(redirect_carrier_cdma2000_minus1_xrtt_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dual_rx_tx_redirect_ind_r10_present, 1)); + HANDLE_CODE(bref.unpack(redirect_carrier_cdma2000_minus1_xrtt_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (redirect_carrier_cdma2000_minus1_xrtt_r10_present) { + HANDLE_CODE(redirect_carrier_cdma2000_minus1_xrtt_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_from_eutra_prep_request_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dual_rx_tx_redirect_ind_r10_present) { + j.write_str("dualRxTxRedirectIndicator-r10", "true"); + } + if (redirect_carrier_cdma2000_minus1_xrtt_r10_present) { + j.write_fieldname("redirectCarrierCDMA2000-1XRTT-r10"); + redirect_carrier_cdma2000_minus1_xrtt_r10.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// LoggedMeasurementConfiguration-v1250-IEs ::= SEQUENCE +logged_meas_cfg_v1250_ies_s::logged_meas_cfg_v1250_ies_s() +{ + target_mbsfn_area_list_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE logged_meas_cfg_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(target_mbsfn_area_list_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (target_mbsfn_area_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, target_mbsfn_area_list_r12, 0, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(target_mbsfn_area_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (target_mbsfn_area_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(target_mbsfn_area_list_r12, bref, 0, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (target_mbsfn_area_list_r12_present) { + j.start_array("targetMBSFN-AreaList-r12"); + for (uint32_t i1 = 0; i1 < target_mbsfn_area_list_r12.size(); ++i1) { + target_mbsfn_area_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MeasIdToAddMod ::= SEQUENCE +SRSASN_CODE meas_id_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, meas_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, meas_obj_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, report_cfg_id, (uint8_t)1, (uint8_t)32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_id_to_add_mod_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(meas_id, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(meas_obj_id, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(report_cfg_id, bref, (uint8_t)1, (uint8_t)32)); + + 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(); +} + +// MeasIdToAddMod-v1310 ::= SEQUENCE +meas_id_to_add_mod_v1310_s::meas_id_to_add_mod_v1310_s() +{ + meas_obj_id_v1310_present = false; +} +SRSASN_CODE meas_id_to_add_mod_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_obj_id_v1310_present, 1)); + + if (meas_obj_id_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_obj_id_v1310, (uint8_t)33, (uint8_t)64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_id_to_add_mod_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_obj_id_v1310_present, 1)); + + if (meas_obj_id_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(meas_obj_id_v1310, bref, (uint8_t)33, (uint8_t)64)); + } + + return SRSASN_SUCCESS; +} +void meas_id_to_add_mod_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_obj_id_v1310_present) { + j.write_int("measObjectId-v1310", meas_obj_id_v1310); + } + j.end_obj(); +} + +// MeasIdToAddModExt-r12 ::= SEQUENCE +SRSASN_CODE meas_id_to_add_mod_ext_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, meas_id_v1250, (uint8_t)33, (uint8_t)64)); + HANDLE_CODE(pack_unalign_integer(bref, meas_obj_id_r12, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, report_cfg_id_r12, (uint8_t)1, (uint8_t)32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_id_to_add_mod_ext_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(meas_id_v1250, bref, (uint8_t)33, (uint8_t)64)); + HANDLE_CODE(unpack_unalign_integer(meas_obj_id_r12, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(report_cfg_id_r12, bref, (uint8_t)1, (uint8_t)32)); + + return SRSASN_SUCCESS; +} +void meas_id_to_add_mod_ext_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measId-v1250", meas_id_v1250); + j.write_int("measObjectId-r12", meas_obj_id_r12); + j.write_int("reportConfigId-r12", report_cfg_id_r12); + j.end_obj(); +} + +// MeasObjectToAddMod ::= SEQUENCE +SRSASN_CODE meas_obj_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, meas_obj_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(meas_obj.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_to_add_mod_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(meas_obj_id, bref, (uint8_t)1, (uint8_t)32)); + 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_eutra: + c.destroy(); + break; + case types::meas_obj_utra: + c.destroy(); + break; + case types::meas_obj_geran: + c.destroy(); + break; + case types::meas_obj_cdma2000: + c.destroy(); + break; + case types::meas_obj_wlan_r13: + c.destroy(); + break; + case types::meas_obj_nr_r15: + 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_eutra: + c.init(); + break; + case types::meas_obj_utra: + c.init(); + break; + case types::meas_obj_geran: + c.init(); + break; + case types::meas_obj_cdma2000: + c.init(); + break; + case types::meas_obj_wlan_r13: + c.init(); + break; + case types::meas_obj_nr_r15: + 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_eutra: + c.init(other.c.get()); + break; + case types::meas_obj_utra: + c.init(other.c.get()); + break; + case types::meas_obj_geran: + c.init(other.c.get()); + break; + case types::meas_obj_cdma2000: + c.init(other.c.get()); + break; + case types::meas_obj_wlan_r13: + c.init(other.c.get()); + break; + case types::meas_obj_nr_r15: + 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_eutra: + c.set(other.c.get()); + break; + case types::meas_obj_utra: + c.set(other.c.get()); + break; + case types::meas_obj_geran: + c.set(other.c.get()); + break; + case types::meas_obj_cdma2000: + c.set(other.c.get()); + break; + case types::meas_obj_wlan_r13: + c.set(other.c.get()); + break; + case types::meas_obj_nr_r15: + 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; +} +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_eutra: + j.write_fieldname("measObjectEUTRA"); + c.get().to_json(j); + break; + case types::meas_obj_utra: + j.write_fieldname("measObjectUTRA"); + c.get().to_json(j); + break; + case types::meas_obj_geran: + j.write_fieldname("measObjectGERAN"); + c.get().to_json(j); + break; + case types::meas_obj_cdma2000: + j.write_fieldname("measObjectCDMA2000"); + c.get().to_json(j); + break; + case types::meas_obj_wlan_r13: + j.write_fieldname("measObjectWLAN-r13"); + c.get().to_json(j); + break; + case types::meas_obj_nr_r15: + j.write_fieldname("measObjectNR-r15"); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::meas_obj_eutra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_utra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_geran: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_cdma2000: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_wlan_r13: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::meas_obj_nr_r15: { + varlength_field_pack_guard scope(bref); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::meas_obj_eutra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_utra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_geran: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_cdma2000: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_wlan_r13: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::meas_obj_nr_r15: { + varlength_field_unpack_guard scope(bref); + 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; +} + +// MeasObjectToAddMod-v9e0 ::= SEQUENCE +meas_obj_to_add_mod_v9e0_s::meas_obj_to_add_mod_v9e0_s() +{ + meas_obj_eutra_v9e0_present = false; +} +SRSASN_CODE meas_obj_to_add_mod_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_obj_eutra_v9e0_present, 1)); + + if (meas_obj_eutra_v9e0_present) { + HANDLE_CODE(meas_obj_eutra_v9e0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_to_add_mod_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_obj_eutra_v9e0_present, 1)); + + if (meas_obj_eutra_v9e0_present) { + HANDLE_CODE(meas_obj_eutra_v9e0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_obj_to_add_mod_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_obj_eutra_v9e0_present) { + j.write_fieldname("measObjectEUTRA-v9e0"); + meas_obj_eutra_v9e0.to_json(j); + } + j.end_obj(); +} + +// MeasObjectToAddModExt-r13 ::= SEQUENCE +SRSASN_CODE meas_obj_to_add_mod_ext_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, meas_obj_id_r13, (uint8_t)33, (uint8_t)64)); + HANDLE_CODE(meas_obj_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_to_add_mod_ext_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(meas_obj_id_r13, bref, (uint8_t)33, (uint8_t)64)); + HANDLE_CODE(meas_obj_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_obj_to_add_mod_ext_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measObjectId-r13", meas_obj_id_r13); + j.write_fieldname("measObject-r13"); + meas_obj_r13.to_json(j); + j.end_obj(); +} + +void meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::destroy_() +{ + switch (type_) { + case types::meas_obj_eutra_r13: + c.destroy(); + break; + case types::meas_obj_utra_r13: + c.destroy(); + break; + case types::meas_obj_geran_r13: + c.destroy(); + break; + case types::meas_obj_cdma2000_r13: + c.destroy(); + break; + case types::meas_obj_wlan_v1320: + c.destroy(); + break; + case types::meas_obj_nr_r15: + c.destroy(); + break; + default: + break; + } +} +void meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::meas_obj_eutra_r13: + c.init(); + break; + case types::meas_obj_utra_r13: + c.init(); + break; + case types::meas_obj_geran_r13: + c.init(); + break; + case types::meas_obj_cdma2000_r13: + c.init(); + break; + case types::meas_obj_wlan_v1320: + c.init(); + break; + case types::meas_obj_nr_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_"); + } +} +meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::meas_obj_r13_c_( + const meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::meas_obj_eutra_r13: + c.init(other.c.get()); + break; + case types::meas_obj_utra_r13: + c.init(other.c.get()); + break; + case types::meas_obj_geran_r13: + c.init(other.c.get()); + break; + case types::meas_obj_cdma2000_r13: + c.init(other.c.get()); + break; + case types::meas_obj_wlan_v1320: + c.init(other.c.get()); + break; + case types::meas_obj_nr_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_"); + } +} +meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_& meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_:: + operator=(const meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::meas_obj_eutra_r13: + c.set(other.c.get()); + break; + case types::meas_obj_utra_r13: + c.set(other.c.get()); + break; + case types::meas_obj_geran_r13: + c.set(other.c.get()); + break; + case types::meas_obj_cdma2000_r13: + c.set(other.c.get()); + break; + case types::meas_obj_wlan_v1320: + c.set(other.c.get()); + break; + case types::meas_obj_nr_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_"); + } + + return *this; +} +void meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::meas_obj_eutra_r13: + j.write_fieldname("measObjectEUTRA-r13"); + c.get().to_json(j); + break; + case types::meas_obj_utra_r13: + j.write_fieldname("measObjectUTRA-r13"); + c.get().to_json(j); + break; + case types::meas_obj_geran_r13: + j.write_fieldname("measObjectGERAN-r13"); + c.get().to_json(j); + break; + case types::meas_obj_cdma2000_r13: + j.write_fieldname("measObjectCDMA2000-r13"); + c.get().to_json(j); + break; + case types::meas_obj_wlan_v1320: + j.write_fieldname("measObjectWLAN-v1320"); + c.get().to_json(j); + break; + case types::meas_obj_nr_r15: + j.write_fieldname("measObjectNR-r15"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::meas_obj_eutra_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_utra_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_geran_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_cdma2000_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_obj_wlan_v1320: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::meas_obj_nr_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::meas_obj_eutra_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_utra_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_geran_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_cdma2000_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_obj_wlan_v1320: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::meas_obj_nr_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MobilityFromEUTRACommand-v1530-IEs ::= SEQUENCE +mob_from_eutra_cmd_v1530_ies_s::mob_from_eutra_cmd_v1530_ies_s() +{ + smtc_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(smtc_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (smtc_r15_present) { + HANDLE_CODE(smtc_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(smtc_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (smtc_r15_present) { + HANDLE_CODE(smtc_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (smtc_r15_present) { + j.write_fieldname("smtc-r15"); + smtc_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// OtherConfig-r9 ::= SEQUENCE +other_cfg_r9_s::other_cfg_r9_s() +{ + ext = false; + report_proximity_cfg_r9_present = false; + idc_cfg_r11_present = false; + pwr_pref_ind_cfg_r11_present = false; + obtain_location_cfg_r11_present = false; + bw_pref_ind_timer_r14_present = false; + sps_assist_info_report_r14_present = false; + delay_budget_report_cfg_r14_present = false; + rlm_report_cfg_r14_present = false; + overheat_assist_cfg_r14_present = false; + meas_cfg_app_layer_r15_present = false; + ailc_bit_cfg_r15_present = false; + bt_name_list_cfg_r15_present = false; + wlan_name_list_cfg_r15_present = false; +} +SRSASN_CODE other_cfg_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(report_proximity_cfg_r9_present, 1)); + + if (report_proximity_cfg_r9_present) { + HANDLE_CODE(report_proximity_cfg_r9.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + rrc_asn1_warn_assert(idc_cfg_r11_present != (idc_cfg_r11.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= idc_cfg_r11_present; + rrc_asn1_warn_assert(pwr_pref_ind_cfg_r11_present != (pwr_pref_ind_cfg_r11.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= pwr_pref_ind_cfg_r11_present; + rrc_asn1_warn_assert(obtain_location_cfg_r11_present != (obtain_location_cfg_r11.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= obtain_location_cfg_r11_present; + group_flags[1] |= bw_pref_ind_timer_r14_present; + group_flags[1] |= sps_assist_info_report_r14_present; + rrc_asn1_warn_assert(delay_budget_report_cfg_r14_present != (delay_budget_report_cfg_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= delay_budget_report_cfg_r14_present; + rrc_asn1_warn_assert(rlm_report_cfg_r14_present != (rlm_report_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= rlm_report_cfg_r14_present; + rrc_asn1_warn_assert(overheat_assist_cfg_r14_present != (overheat_assist_cfg_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= overheat_assist_cfg_r14_present; + rrc_asn1_warn_assert(meas_cfg_app_layer_r15_present != (meas_cfg_app_layer_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= meas_cfg_app_layer_r15_present; + group_flags[3] |= ailc_bit_cfg_r15_present; + rrc_asn1_warn_assert(bt_name_list_cfg_r15_present != (bt_name_list_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= bt_name_list_cfg_r15_present; + rrc_asn1_warn_assert(wlan_name_list_cfg_r15_present != (wlan_name_list_cfg_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= wlan_name_list_cfg_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(idc_cfg_r11_present, 1)); + HANDLE_CODE(bref.pack(pwr_pref_ind_cfg_r11_present, 1)); + HANDLE_CODE(bref.pack(obtain_location_cfg_r11_present, 1)); + if (idc_cfg_r11_present) { + HANDLE_CODE(idc_cfg_r11->pack(bref)); + } + if (pwr_pref_ind_cfg_r11_present) { + HANDLE_CODE(pwr_pref_ind_cfg_r11->pack(bref)); + } + if (obtain_location_cfg_r11_present) { + HANDLE_CODE(obtain_location_cfg_r11->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(bw_pref_ind_timer_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_assist_info_report_r14_present, 1)); + HANDLE_CODE(bref.pack(delay_budget_report_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(rlm_report_cfg_r14_present, 1)); + if (bw_pref_ind_timer_r14_present) { + HANDLE_CODE(pack_enum(bref, bw_pref_ind_timer_r14)); + } + if (sps_assist_info_report_r14_present) { + HANDLE_CODE(bref.pack(sps_assist_info_report_r14, 1)); + } + if (delay_budget_report_cfg_r14_present) { + HANDLE_CODE(delay_budget_report_cfg_r14->pack(bref)); + } + if (rlm_report_cfg_r14_present) { + HANDLE_CODE(rlm_report_cfg_r14->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(overheat_assist_cfg_r14_present, 1)); + if (overheat_assist_cfg_r14_present) { + HANDLE_CODE(overheat_assist_cfg_r14->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_cfg_app_layer_r15_present, 1)); + HANDLE_CODE(bref.pack(ailc_bit_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(bt_name_list_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(wlan_name_list_cfg_r15_present, 1)); + if (meas_cfg_app_layer_r15_present) { + HANDLE_CODE(meas_cfg_app_layer_r15->pack(bref)); + } + if (ailc_bit_cfg_r15_present) { + HANDLE_CODE(bref.pack(ailc_bit_cfg_r15, 1)); + } + if (bt_name_list_cfg_r15_present) { + HANDLE_CODE(bt_name_list_cfg_r15->pack(bref)); + } + if (wlan_name_list_cfg_r15_present) { + HANDLE_CODE(wlan_name_list_cfg_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(report_proximity_cfg_r9_present, 1)); + + if (report_proximity_cfg_r9_present) { + HANDLE_CODE(report_proximity_cfg_r9.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(idc_cfg_r11_present, 1)); + HANDLE_CODE(bref.unpack(pwr_pref_ind_cfg_r11_present, 1)); + HANDLE_CODE(bref.unpack(obtain_location_cfg_r11_present, 1)); + if (idc_cfg_r11_present) { + idc_cfg_r11 = make_copy_ptr(idc_cfg_r11_s()); + HANDLE_CODE(idc_cfg_r11->unpack(bref)); + } + if (pwr_pref_ind_cfg_r11_present) { + pwr_pref_ind_cfg_r11 = make_copy_ptr(pwr_pref_ind_cfg_r11_c()); + HANDLE_CODE(pwr_pref_ind_cfg_r11->unpack(bref)); + } + if (obtain_location_cfg_r11_present) { + obtain_location_cfg_r11 = make_copy_ptr(obtain_location_cfg_r11_s()); + HANDLE_CODE(obtain_location_cfg_r11->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(bw_pref_ind_timer_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_assist_info_report_r14_present, 1)); + HANDLE_CODE(bref.unpack(delay_budget_report_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(rlm_report_cfg_r14_present, 1)); + if (bw_pref_ind_timer_r14_present) { + HANDLE_CODE(unpack_enum(bw_pref_ind_timer_r14, bref)); + } + if (sps_assist_info_report_r14_present) { + HANDLE_CODE(bref.unpack(sps_assist_info_report_r14, 1)); + } + if (delay_budget_report_cfg_r14_present) { + delay_budget_report_cfg_r14 = make_copy_ptr(delay_budget_report_cfg_r14_c_()); + HANDLE_CODE(delay_budget_report_cfg_r14->unpack(bref)); + } + if (rlm_report_cfg_r14_present) { + rlm_report_cfg_r14 = make_copy_ptr(rlm_report_cfg_r14_c_()); + HANDLE_CODE(rlm_report_cfg_r14->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(overheat_assist_cfg_r14_present, 1)); + if (overheat_assist_cfg_r14_present) { + overheat_assist_cfg_r14 = make_copy_ptr(overheat_assist_cfg_r14_c_()); + HANDLE_CODE(overheat_assist_cfg_r14->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_cfg_app_layer_r15_present, 1)); + HANDLE_CODE(bref.unpack(ailc_bit_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(bt_name_list_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(wlan_name_list_cfg_r15_present, 1)); + if (meas_cfg_app_layer_r15_present) { + meas_cfg_app_layer_r15 = make_copy_ptr(meas_cfg_app_layer_r15_c_()); + HANDLE_CODE(meas_cfg_app_layer_r15->unpack(bref)); + } + if (ailc_bit_cfg_r15_present) { + HANDLE_CODE(bref.unpack(ailc_bit_cfg_r15, 1)); + } + if (bt_name_list_cfg_r15_present) { + bt_name_list_cfg_r15 = make_copy_ptr(bt_name_list_cfg_r15_c()); + HANDLE_CODE(bt_name_list_cfg_r15->unpack(bref)); + } + if (wlan_name_list_cfg_r15_present) { + wlan_name_list_cfg_r15 = make_copy_ptr(wlan_name_list_cfg_r15_c()); + HANDLE_CODE(wlan_name_list_cfg_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void other_cfg_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (report_proximity_cfg_r9_present) { + j.write_fieldname("reportProximityConfig-r9"); + report_proximity_cfg_r9.to_json(j); + } + if (idc_cfg_r11_present) { + j.write_fieldname("idc-Config-r11"); + idc_cfg_r11->to_json(j); + } + if (pwr_pref_ind_cfg_r11_present) { + j.write_fieldname("powerPrefIndicationConfig-r11"); + pwr_pref_ind_cfg_r11->to_json(j); + } + if (obtain_location_cfg_r11_present) { + j.write_fieldname("obtainLocationConfig-r11"); + obtain_location_cfg_r11->to_json(j); + } + if (bw_pref_ind_timer_r14_present) { + j.write_str("bw-PreferenceIndicationTimer-r14", bw_pref_ind_timer_r14.to_string()); + } + if (sps_assist_info_report_r14_present) { + j.write_bool("sps-AssistanceInfoReport-r14", sps_assist_info_report_r14); + } + if (delay_budget_report_cfg_r14_present) { + j.write_fieldname("delayBudgetReportingConfig-r14"); + delay_budget_report_cfg_r14->to_json(j); + } + if (rlm_report_cfg_r14_present) { + j.write_fieldname("rlm-ReportConfig-r14"); + rlm_report_cfg_r14->to_json(j); + } + if (overheat_assist_cfg_r14_present) { + j.write_fieldname("overheatingAssistanceConfig-r14"); + overheat_assist_cfg_r14->to_json(j); + } + if (meas_cfg_app_layer_r15_present) { + j.write_fieldname("measConfigAppLayer-r15"); + meas_cfg_app_layer_r15->to_json(j); + } + if (ailc_bit_cfg_r15_present) { + j.write_bool("ailc-BitConfig-r15", ailc_bit_cfg_r15); + } + if (bt_name_list_cfg_r15_present) { + j.write_fieldname("bt-NameListConfig-r15"); + bt_name_list_cfg_r15->to_json(j); + } + if (wlan_name_list_cfg_r15_present) { + j.write_fieldname("wlan-NameListConfig-r15"); + wlan_name_list_cfg_r15->to_json(j); + } + j.end_obj(); +} + +void other_cfg_r9_s::delay_budget_report_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void other_cfg_r9_s::delay_budget_report_cfg_r14_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-r14", c.delay_budget_report_prohibit_timer_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::delay_budget_report_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE other_cfg_r9_s::delay_budget_report_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.delay_budget_report_prohibit_timer_r14)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::delay_budget_report_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_r9_s::delay_budget_report_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.delay_budget_report_prohibit_timer_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::delay_budget_report_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void other_cfg_r9_s::rlm_report_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void other_cfg_r9_s::rlm_report_cfg_r14_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("rlmReportTimer-r14", c.rlm_report_timer_r14.to_string()); + if (c.rlm_report_rep_mpdcch_r14_present) { + j.write_str("rlmReportRep-MPDCCH-r14", "setup"); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::rlm_report_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE other_cfg_r9_s::rlm_report_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.rlm_report_rep_mpdcch_r14_present, 1)); + HANDLE_CODE(pack_enum(bref, c.rlm_report_timer_r14)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::rlm_report_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_r9_s::rlm_report_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.rlm_report_rep_mpdcch_r14_present, 1)); + HANDLE_CODE(unpack_enum(c.rlm_report_timer_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::rlm_report_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::setup_s_() +{ + rlm_report_rep_mpdcch_r14_present = false; +} + +void other_cfg_r9_s::overheat_assist_cfg_r14_c_::set(types::options e) +{ + type_ = e; +} +void other_cfg_r9_s::overheat_assist_cfg_r14_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("overheatingIndicationProhibitTimer-r14", c.overheat_ind_prohibit_timer_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::overheat_assist_cfg_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE other_cfg_r9_s::overheat_assist_cfg_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.overheat_ind_prohibit_timer_r14)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::overheat_assist_cfg_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_r9_s::overheat_assist_cfg_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.overheat_ind_prohibit_timer_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::overheat_assist_cfg_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void other_cfg_r9_s::meas_cfg_app_layer_r15_c_::set(types::options e) +{ + type_ = e; +} +void other_cfg_r9_s::meas_cfg_app_layer_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("measConfigAppLayerContainer-r15", c.meas_cfg_app_layer_container_r15.to_string()); + j.write_str("serviceType", c.service_type.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.meas_cfg_app_layer_container_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, c.service_type)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_r9_s::meas_cfg_app_layer_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.meas_cfg_app_layer_container_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(c.service_type, bref)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PRACH-Config-v1310 ::= SEQUENCE +prach_cfg_v1310_s::prach_cfg_v1310_s() +{ + rsrp_thress_prach_info_list_r13_present = false; + mpdcch_start_sf_css_ra_r13_present = false; + prach_hop_offset_r13_present = false; + prach_params_list_ce_r13_present = false; + init_ce_level_r13_present = false; +} +SRSASN_CODE prach_cfg_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rsrp_thress_prach_info_list_r13_present, 1)); + HANDLE_CODE(bref.pack(mpdcch_start_sf_css_ra_r13_present, 1)); + HANDLE_CODE(bref.pack(prach_hop_offset_r13_present, 1)); + HANDLE_CODE(bref.pack(prach_params_list_ce_r13_present, 1)); + HANDLE_CODE(bref.pack(init_ce_level_r13_present, 1)); + + if (rsrp_thress_prach_info_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, rsrp_thress_prach_info_list_r13, 1, 3, UnalignedIntegerPacker(0, 97))); + } + if (mpdcch_start_sf_css_ra_r13_present) { + HANDLE_CODE(mpdcch_start_sf_css_ra_r13.pack(bref)); + } + if (prach_hop_offset_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, prach_hop_offset_r13, (uint8_t)0, (uint8_t)94)); + } + if (prach_params_list_ce_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, prach_params_list_ce_r13, 1, 4)); + } + if (init_ce_level_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, init_ce_level_r13, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rsrp_thress_prach_info_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(mpdcch_start_sf_css_ra_r13_present, 1)); + HANDLE_CODE(bref.unpack(prach_hop_offset_r13_present, 1)); + HANDLE_CODE(bref.unpack(prach_params_list_ce_r13_present, 1)); + HANDLE_CODE(bref.unpack(init_ce_level_r13_present, 1)); + + if (rsrp_thress_prach_info_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(rsrp_thress_prach_info_list_r13, bref, 1, 3, UnalignedIntegerPacker(0, 97))); + } + if (mpdcch_start_sf_css_ra_r13_present) { + HANDLE_CODE(mpdcch_start_sf_css_ra_r13.unpack(bref)); + } + if (prach_hop_offset_r13_present) { + HANDLE_CODE(unpack_unalign_integer(prach_hop_offset_r13, bref, (uint8_t)0, (uint8_t)94)); + } + if (prach_params_list_ce_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(prach_params_list_ce_r13, bref, 1, 4)); + } + if (init_ce_level_r13_present) { + HANDLE_CODE(unpack_unalign_integer(init_ce_level_r13, bref, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +void prach_cfg_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrp_thress_prach_info_list_r13_present) { + j.start_array("rsrp-ThresholdsPrachInfoList-r13"); + for (uint32_t i1 = 0; i1 < rsrp_thress_prach_info_list_r13.size(); ++i1) { + j.write_int(rsrp_thress_prach_info_list_r13[i1]); + } + j.end_array(); + } + if (mpdcch_start_sf_css_ra_r13_present) { + j.write_fieldname("mpdcch-startSF-CSS-RA-r13"); + mpdcch_start_sf_css_ra_r13.to_json(j); + } + if (prach_hop_offset_r13_present) { + j.write_int("prach-HoppingOffset-r13", prach_hop_offset_r13); + } + if (prach_params_list_ce_r13_present) { + j.start_array("prach-ParametersListCE-r13"); + for (uint32_t i1 = 0; i1 < prach_params_list_ce_r13.size(); ++i1) { + prach_params_list_ce_r13[i1].to_json(j); + } + j.end_array(); + } + if (init_ce_level_r13_present) { + j.write_int("initial-CE-level-r13", init_ce_level_r13); + } + j.end_obj(); +} + +void prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::destroy_() {} +void prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::mpdcch_start_sf_css_ra_r13_c_( + const prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r13: + c.init(other.c.get()); + break; + case types::tdd_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + } +} +prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_& prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_:: + operator=(const prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r13: + c.set(other.c.get()); + break; + case types::tdd_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + } + + return *this; +} +void prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r13: + j.write_str("fdd-r13", c.get().to_string()); + break; + case types::tdd_r13: + j.write_str("tdd-r13", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::tdd_r13: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::tdd_r13: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// QuantityConfigCDMA2000 ::= SEQUENCE +SRSASN_CODE quant_cfg_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, meas_quant_cdma2000)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(meas_quant_cdma2000, bref)); + + return SRSASN_SUCCESS; +} +void quant_cfg_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("measQuantityCDMA2000", meas_quant_cdma2000.to_string()); + j.end_obj(); +} + +// QuantityConfigEUTRA ::= SEQUENCE +quant_cfg_eutra_s::quant_cfg_eutra_s() +{ + filt_coef_rsrp_present = false; + filt_coef_rsrq_present = false; +} +SRSASN_CODE quant_cfg_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_rsrp_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_rsrq_present, 1)); + + if (filt_coef_rsrp_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_rsrp)); + } + if (filt_coef_rsrq_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_rsrq)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_rsrp_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_rsrq_present, 1)); + + if (filt_coef_rsrp_present) { + HANDLE_CODE(unpack_enum(filt_coef_rsrp, bref)); + } + if (filt_coef_rsrq_present) { + HANDLE_CODE(unpack_enum(filt_coef_rsrq, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_eutra_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()); + } + j.end_obj(); +} + +// QuantityConfigEUTRA-v1250 ::= SEQUENCE +quant_cfg_eutra_v1250_s::quant_cfg_eutra_v1250_s() +{ + filt_coef_csi_rsrp_r12_present = false; +} +SRSASN_CODE quant_cfg_eutra_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_csi_rsrp_r12_present, 1)); + + if (filt_coef_csi_rsrp_r12_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_csi_rsrp_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_eutra_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_csi_rsrp_r12_present, 1)); + + if (filt_coef_csi_rsrp_r12_present) { + HANDLE_CODE(unpack_enum(filt_coef_csi_rsrp_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_eutra_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (filt_coef_csi_rsrp_r12_present) { + j.write_str("filterCoefficientCSI-RSRP-r12", filt_coef_csi_rsrp_r12.to_string()); + } + j.end_obj(); +} + +// QuantityConfigEUTRA-v1310 ::= SEQUENCE +quant_cfg_eutra_v1310_s::quant_cfg_eutra_v1310_s() +{ + filt_coef_rs_sinr_r13_present = false; +} +SRSASN_CODE quant_cfg_eutra_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_rs_sinr_r13_present, 1)); + + if (filt_coef_rs_sinr_r13_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_rs_sinr_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_eutra_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_rs_sinr_r13_present, 1)); + + if (filt_coef_rs_sinr_r13_present) { + HANDLE_CODE(unpack_enum(filt_coef_rs_sinr_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_eutra_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (filt_coef_rs_sinr_r13_present) { + j.write_str("filterCoefficientRS-SINR-r13", filt_coef_rs_sinr_r13.to_string()); + } + j.end_obj(); +} + +// QuantityConfigGERAN ::= SEQUENCE +quant_cfg_geran_s::quant_cfg_geran_s() +{ + filt_coef_present = false; +} +SRSASN_CODE quant_cfg_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_present, 1)); + + if (filt_coef_present) { + HANDLE_CODE(pack_enum(bref, filt_coef)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_present, 1)); + + if (filt_coef_present) { + HANDLE_CODE(unpack_enum(filt_coef, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("measQuantityGERAN", "rssi"); + if (filt_coef_present) { + j.write_str("filterCoefficient", filt_coef.to_string()); + } + j.end_obj(); +} + +// QuantityConfigUTRA ::= SEQUENCE +quant_cfg_utra_s::quant_cfg_utra_s() +{ + filt_coef_present = false; +} +SRSASN_CODE quant_cfg_utra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_present, 1)); + + HANDLE_CODE(pack_enum(bref, meas_quant_utra_fdd)); + if (filt_coef_present) { + HANDLE_CODE(pack_enum(bref, filt_coef)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_utra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_present, 1)); + + HANDLE_CODE(unpack_enum(meas_quant_utra_fdd, bref)); + if (filt_coef_present) { + HANDLE_CODE(unpack_enum(filt_coef, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_utra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("measQuantityUTRA-FDD", meas_quant_utra_fdd.to_string()); + j.write_str("measQuantityUTRA-TDD", "pccpch-RSCP"); + if (filt_coef_present) { + j.write_str("filterCoefficient", filt_coef.to_string()); + } + j.end_obj(); +} + +// QuantityConfigUTRA-v1020 ::= SEQUENCE +quant_cfg_utra_v1020_s::quant_cfg_utra_v1020_s() +{ + filt_coef2_fdd_r10_present = false; +} +SRSASN_CODE quant_cfg_utra_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef2_fdd_r10_present, 1)); + + if (filt_coef2_fdd_r10_present) { + HANDLE_CODE(pack_enum(bref, filt_coef2_fdd_r10)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_utra_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef2_fdd_r10_present, 1)); + + if (filt_coef2_fdd_r10_present) { + HANDLE_CODE(unpack_enum(filt_coef2_fdd_r10, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_utra_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (filt_coef2_fdd_r10_present) { + j.write_str("filterCoefficient2-FDD-r10", filt_coef2_fdd_r10.to_string()); + } + j.end_obj(); +} + +// QuantityConfigWLAN-r13 ::= SEQUENCE +quant_cfg_wlan_r13_s::quant_cfg_wlan_r13_s() +{ + filt_coef_r13_present = false; +} +SRSASN_CODE quant_cfg_wlan_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_r13_present, 1)); + + if (filt_coef_r13_present) { + HANDLE_CODE(pack_enum(bref, filt_coef_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_wlan_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_r13_present, 1)); + + if (filt_coef_r13_present) { + HANDLE_CODE(unpack_enum(filt_coef_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_wlan_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("measQuantityWLAN-r13", "rssiWLAN"); + if (filt_coef_r13_present) { + j.write_str("filterCoefficient-r13", filt_coef_r13.to_string()); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v1020-IEs ::= SEQUENCE +rrc_conn_recfg_v1020_ies_s::rrc_conn_recfg_v1020_ies_s() +{ + s_cell_to_release_list_r10_present = false; + s_cell_to_add_mod_list_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(s_cell_to_release_list_r10_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (s_cell_to_release_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_release_list_r10, 1, 4, UnalignedIntegerPacker(1, 7))); + } + if (s_cell_to_add_mod_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_r10, 1, 4)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(s_cell_to_release_list_r10_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (s_cell_to_release_list_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_release_list_r10, bref, 1, 4, UnalignedIntegerPacker(1, 7))); + } + if (s_cell_to_add_mod_list_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_r10, bref, 1, 4)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (s_cell_to_release_list_r10_present) { + j.start_array("sCellToReleaseList-r10"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_r10.size(); ++i1) { + j.write_int(s_cell_to_release_list_r10[i1]); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_r10_present) { + j.start_array("sCellToAddModList-r10"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_r10.size(); ++i1) { + s_cell_to_add_mod_list_r10[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v10i0-IEs ::= SEQUENCE +rrc_conn_recfg_v10i0_ies_s::rrc_conn_recfg_v10i0_ies_s() +{ + ant_info_ded_pcell_v10i0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v10i0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ant_info_ded_pcell_v10i0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ant_info_ded_pcell_v10i0_present) { + HANDLE_CODE(ant_info_ded_pcell_v10i0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v10i0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ant_info_ded_pcell_v10i0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ant_info_ded_pcell_v10i0_present) { + HANDLE_CODE(ant_info_ded_pcell_v10i0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v10i0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ant_info_ded_pcell_v10i0_present) { + j.write_fieldname("antennaInfoDedicatedPCell-v10i0"); + ant_info_ded_pcell_v10i0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionRelease-v1020-IEs ::= SEQUENCE +rrc_conn_release_v1020_ies_s::rrc_conn_release_v1020_ies_s() +{ + extended_wait_time_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(extended_wait_time_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (extended_wait_time_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, extended_wait_time_r10, (uint16_t)1, (uint16_t)1800)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(extended_wait_time_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (extended_wait_time_r10_present) { + HANDLE_CODE(unpack_unalign_integer(extended_wait_time_r10, bref, (uint16_t)1, (uint16_t)1800)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (extended_wait_time_r10_present) { + j.write_int("extendedWaitTime-r10", extended_wait_time_r10); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionResume-v1530-IEs ::= SEQUENCE +rrc_conn_resume_v1530_ies_s::rrc_conn_resume_v1530_ies_s() +{ + full_cfg_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_resume_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(full_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(full_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (full_cfg_r15_present) { + j.write_str("fullConfig-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RedirectedCarrierInfo-v9e0 ::= SEQUENCE +SRSASN_CODE redirected_carrier_info_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, eutra_v9e0, (uint32_t)65536, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE redirected_carrier_info_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(eutra_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +void redirected_carrier_info_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("eutra-v9e0", eutra_v9e0); + j.end_obj(); +} + +// ReportConfigToAddMod ::= SEQUENCE +SRSASN_CODE report_cfg_to_add_mod_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, report_cfg_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(report_cfg.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_to_add_mod_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(report_cfg_id, bref, (uint8_t)1, (uint8_t)32)); + 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_eutra: + c.destroy(); + break; + case types::report_cfg_inter_rat: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_to_add_mod_s::report_cfg_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::report_cfg_eutra: + c.init(); + break; + case types::report_cfg_inter_rat: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + } +} +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_eutra: + c.init(other.c.get()); + break; + case types::report_cfg_inter_rat: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + } +} +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_eutra: + c.set(other.c.get()); + break; + case types::report_cfg_inter_rat: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + } + + return *this; +} +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_eutra: + j.write_fieldname("reportConfigEUTRA"); + c.get().to_json(j); + break; + case types::report_cfg_inter_rat: + j.write_fieldname("reportConfigInterRAT"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::report_cfg_eutra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::report_cfg_inter_rat: + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::report_cfg_eutra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::report_cfg_inter_rat: + 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; +} + +// UECapabilityEnquiry-v1310-IEs ::= SEQUENCE +ue_cap_enquiry_v1310_ies_s::ue_cap_enquiry_v1310_ies_s() +{ + request_reduced_format_r13_present = false; + request_skip_fallback_comb_r13_present = false; + requested_max_ccs_dl_r13_present = false; + requested_max_ccs_ul_r13_present = false; + request_reduced_int_non_cont_comb_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(request_reduced_format_r13_present, 1)); + HANDLE_CODE(bref.pack(request_skip_fallback_comb_r13_present, 1)); + HANDLE_CODE(bref.pack(requested_max_ccs_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(requested_max_ccs_ul_r13_present, 1)); + HANDLE_CODE(bref.pack(request_reduced_int_non_cont_comb_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (requested_max_ccs_dl_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, requested_max_ccs_dl_r13, (uint8_t)2, (uint8_t)32)); + } + if (requested_max_ccs_ul_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, requested_max_ccs_ul_r13, (uint8_t)2, (uint8_t)32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(request_reduced_format_r13_present, 1)); + HANDLE_CODE(bref.unpack(request_skip_fallback_comb_r13_present, 1)); + HANDLE_CODE(bref.unpack(requested_max_ccs_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(requested_max_ccs_ul_r13_present, 1)); + HANDLE_CODE(bref.unpack(request_reduced_int_non_cont_comb_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (requested_max_ccs_dl_r13_present) { + HANDLE_CODE(unpack_unalign_integer(requested_max_ccs_dl_r13, bref, (uint8_t)2, (uint8_t)32)); + } + if (requested_max_ccs_ul_r13_present) { + HANDLE_CODE(unpack_unalign_integer(requested_max_ccs_ul_r13, bref, (uint8_t)2, (uint8_t)32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (request_reduced_format_r13_present) { + j.write_str("requestReducedFormat-r13", "true"); + } + if (request_skip_fallback_comb_r13_present) { + j.write_str("requestSkipFallbackComb-r13", "true"); + } + if (requested_max_ccs_dl_r13_present) { + j.write_int("requestedMaxCCsDL-r13", requested_max_ccs_dl_r13); + } + if (requested_max_ccs_ul_r13_present) { + j.write_int("requestedMaxCCsUL-r13", requested_max_ccs_ul_r13); + } + if (request_reduced_int_non_cont_comb_r13_present) { + j.write_str("requestReducedIntNonContComb-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationRequest-v1130-IEs ::= SEQUENCE +ue_info_request_v1130_ies_s::ue_info_request_v1130_ies_s() +{ + conn_est_fail_report_req_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_request_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(conn_est_fail_report_req_r11_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_info_request_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(conn_est_fail_report_req_r11_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_info_request_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (conn_est_fail_report_req_r11_present) { + j.write_str("connEstFailReportReq-r11", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CarrierBandwidthEUTRA ::= SEQUENCE +carrier_bw_eutra_s::carrier_bw_eutra_s() +{ + ul_bw_present = false; +} +SRSASN_CODE carrier_bw_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_bw_present, 1)); + + HANDLE_CODE(pack_enum(bref, dl_bw)); + if (ul_bw_present) { + HANDLE_CODE(pack_enum(bref, ul_bw)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_bw_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_bw_present, 1)); + + HANDLE_CODE(unpack_enum(dl_bw, bref)); + if (ul_bw_present) { + HANDLE_CODE(unpack_enum(ul_bw, bref)); + } + + return SRSASN_SUCCESS; +} +void carrier_bw_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("dl-Bandwidth", dl_bw.to_string()); + if (ul_bw_present) { + j.write_str("ul-Bandwidth", ul_bw.to_string()); + } + j.end_obj(); +} + +// CarrierFreqEUTRA ::= SEQUENCE +carrier_freq_eutra_s::carrier_freq_eutra_s() +{ + ul_carrier_freq_present = false; +} +SRSASN_CODE carrier_freq_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_carrier_freq_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq, (uint16_t)0, (uint16_t)65535)); + if (ul_carrier_freq_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_carrier_freq, (uint16_t)0, (uint16_t)65535)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_carrier_freq_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + if (ul_carrier_freq_present) { + HANDLE_CODE(unpack_unalign_integer(ul_carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq", dl_carrier_freq); + if (ul_carrier_freq_present) { + j.write_int("ul-CarrierFreq", ul_carrier_freq); + } + j.end_obj(); +} + +// CarrierFreqEUTRA-v9e0 ::= SEQUENCE +carrier_freq_eutra_v9e0_s::carrier_freq_eutra_v9e0_s() +{ + ul_carrier_freq_v9e0_present = false; +} +SRSASN_CODE carrier_freq_eutra_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_carrier_freq_v9e0_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_v9e0, (uint32_t)0, (uint32_t)262143)); + if (ul_carrier_freq_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, ul_carrier_freq_v9e0, (uint32_t)0, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_carrier_freq_v9e0_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_v9e0, bref, (uint32_t)0, (uint32_t)262143)); + if (ul_carrier_freq_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(ul_carrier_freq_v9e0, bref, (uint32_t)0, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq-v9e0", dl_carrier_freq_v9e0); + if (ul_carrier_freq_v9e0_present) { + j.write_int("ul-CarrierFreq-v9e0", ul_carrier_freq_v9e0); + } + j.end_obj(); +} + +// CarrierInfoNR-r15 ::= SEQUENCE +carrier_info_nr_r15_s::carrier_info_nr_r15_s() +{ + smtc_r15_present = false; +} +SRSASN_CODE carrier_info_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(smtc_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(pack_enum(bref, subcarrier_spacing_ssb_r15)); + if (smtc_r15_present) { + HANDLE_CODE(smtc_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_info_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(smtc_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(unpack_enum(subcarrier_spacing_ssb_r15, bref)); + if (smtc_r15_present) { + HANDLE_CODE(smtc_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void carrier_info_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + j.write_str("subcarrierSpacingSSB-r15", subcarrier_spacing_ssb_r15.to_string()); + if (smtc_r15_present) { + j.write_fieldname("smtc-r15"); + smtc_r15.to_json(j); + } + j.end_obj(); +} + +// CounterCheck-v1530-IEs ::= SEQUENCE +counter_check_v1530_ies_s::counter_check_v1530_ies_s() +{ + drb_count_msb_info_list_ext_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE counter_check_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drb_count_msb_info_list_ext_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (drb_count_msb_info_list_ext_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_msb_info_list_ext_r15, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drb_count_msb_info_list_ext_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (drb_count_msb_info_list_ext_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_count_msb_info_list_ext_r15, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void counter_check_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drb_count_msb_info_list_ext_r15_present) { + j.start_array("drb-CountMSB-InfoListExt-r15"); + for (uint32_t i1 = 0; i1 < drb_count_msb_info_list_ext_r15.size(); ++i1) { + drb_count_msb_info_list_ext_r15[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// HandoverFromEUTRAPreparationRequest-v920-IEs ::= SEQUENCE +ho_from_eutra_prep_request_v920_ies_s::ho_from_eutra_prep_request_v920_ies_s() +{ + concurr_prep_cdma2000_hrpd_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_from_eutra_prep_request_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(concurr_prep_cdma2000_hrpd_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (concurr_prep_cdma2000_hrpd_r9_present) { + HANDLE_CODE(bref.pack(concurr_prep_cdma2000_hrpd_r9, 1)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(concurr_prep_cdma2000_hrpd_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (concurr_prep_cdma2000_hrpd_r9_present) { + HANDLE_CODE(bref.unpack(concurr_prep_cdma2000_hrpd_r9, 1)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_from_eutra_prep_request_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (concurr_prep_cdma2000_hrpd_r9_present) { + j.write_bool("concurrPrepCDMA2000-HRPD-r9", concurr_prep_cdma2000_hrpd_r9); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LoggedMeasurementConfiguration-v1130-IEs ::= SEQUENCE +logged_meas_cfg_v1130_ies_s::logged_meas_cfg_v1130_ies_s() +{ + plmn_id_list_r11_present = false; + area_cfg_v1130_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE logged_meas_cfg_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_list_r11_present, 1)); + HANDLE_CODE(bref.pack(area_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (plmn_id_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r11, 1, 16)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(area_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (plmn_id_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r11, bref, 1, 16)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_list_r11_present) { + j.start_array("plmn-IdentityList-r11"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r11.size(); ++i1) { + plmn_id_list_r11[i1].to_json(j); + } + j.end_array(); + } + if (area_cfg_v1130_present) { + j.write_fieldname("areaConfiguration-v1130"); + area_cfg_v1130.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MeasGapConfigDensePRS-r15 ::= CHOICE +void meas_gap_cfg_dense_prs_r15_c::set(types::options e) +{ + type_ = e; +} +void meas_gap_cfg_dense_prs_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("gapOffsetDensePRS-r15"); + c.gap_offset_dense_prs_r15.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.gap_offset_dense_prs_r15.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.gap_offset_dense_prs_r15.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::destroy_() {} +void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::gap_offset_dense_prs_r15_c_( + const meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rstd0_r15: + c.init(other.c.get()); + break; + case types::rstd1_r15: + c.init(other.c.get()); + break; + case types::rstd2_r15: + c.init(other.c.get()); + break; + case types::rstd3_r15: + c.init(other.c.get()); + break; + case types::rstd4_r15: + c.init(other.c.get()); + break; + case types::rstd5_r15: + c.init(other.c.get()); + break; + case types::rstd6_r15: + c.init(other.c.get()); + break; + case types::rstd7_r15: + c.init(other.c.get()); + break; + case types::rstd8_r15: + c.init(other.c.get()); + break; + case types::rstd9_r15: + c.init(other.c.get()); + break; + case types::rstd10_r15: + c.init(other.c.get()); + break; + case types::rstd11_r15: + c.init(other.c.get()); + break; + case types::rstd12_r15: + c.init(other.c.get()); + break; + case types::rstd13_r15: + c.init(other.c.get()); + break; + case types::rstd14_r15: + c.init(other.c.get()); + break; + case types::rstd15_r15: + c.init(other.c.get()); + break; + case types::rstd16_r15: + c.init(other.c.get()); + break; + case types::rstd17_r15: + c.init(other.c.get()); + break; + case types::rstd18_r15: + c.init(other.c.get()); + break; + case types::rstd19_r15: + c.init(other.c.get()); + break; + case types::rstd20_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_"); + } +} +meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_& +meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_:: +operator=(const meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rstd0_r15: + c.set(other.c.get()); + break; + case types::rstd1_r15: + c.set(other.c.get()); + break; + case types::rstd2_r15: + c.set(other.c.get()); + break; + case types::rstd3_r15: + c.set(other.c.get()); + break; + case types::rstd4_r15: + c.set(other.c.get()); + break; + case types::rstd5_r15: + c.set(other.c.get()); + break; + case types::rstd6_r15: + c.set(other.c.get()); + break; + case types::rstd7_r15: + c.set(other.c.get()); + break; + case types::rstd8_r15: + c.set(other.c.get()); + break; + case types::rstd9_r15: + c.set(other.c.get()); + break; + case types::rstd10_r15: + c.set(other.c.get()); + break; + case types::rstd11_r15: + c.set(other.c.get()); + break; + case types::rstd12_r15: + c.set(other.c.get()); + break; + case types::rstd13_r15: + c.set(other.c.get()); + break; + case types::rstd14_r15: + c.set(other.c.get()); + break; + case types::rstd15_r15: + c.set(other.c.get()); + break; + case types::rstd16_r15: + c.set(other.c.get()); + break; + case types::rstd17_r15: + c.set(other.c.get()); + break; + case types::rstd18_r15: + c.set(other.c.get()); + break; + case types::rstd19_r15: + c.set(other.c.get()); + break; + case types::rstd20_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_"); + } + + return *this; +} +void meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rstd0_r15: + j.write_int("rstd0-r15", c.get()); + break; + case types::rstd1_r15: + j.write_int("rstd1-r15", c.get()); + break; + case types::rstd2_r15: + j.write_int("rstd2-r15", c.get()); + break; + case types::rstd3_r15: + j.write_int("rstd3-r15", c.get()); + break; + case types::rstd4_r15: + j.write_int("rstd4-r15", c.get()); + break; + case types::rstd5_r15: + j.write_int("rstd5-r15", c.get()); + break; + case types::rstd6_r15: + j.write_int("rstd6-r15", c.get()); + break; + case types::rstd7_r15: + j.write_int("rstd7-r15", c.get()); + break; + case types::rstd8_r15: + j.write_int("rstd8-r15", c.get()); + break; + case types::rstd9_r15: + j.write_int("rstd9-r15", c.get()); + break; + case types::rstd10_r15: + j.write_int("rstd10-r15", c.get()); + break; + case types::rstd11_r15: + j.write_int("rstd11-r15", c.get()); + break; + case types::rstd12_r15: + j.write_int("rstd12-r15", c.get()); + break; + case types::rstd13_r15: + j.write_int("rstd13-r15", c.get()); + break; + case types::rstd14_r15: + j.write_int("rstd14-r15", c.get()); + break; + case types::rstd15_r15: + j.write_int("rstd15-r15", c.get()); + break; + case types::rstd16_r15: + j.write_int("rstd16-r15", c.get()); + break; + case types::rstd17_r15: + j.write_int("rstd17-r15", c.get()); + break; + case types::rstd18_r15: + j.write_int("rstd18-r15", c.get()); + break; + case types::rstd19_r15: + j.write_int("rstd19-r15", c.get()); + break; + case types::rstd20_r15: + j.write_int("rstd20-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rstd0_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::rstd1_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::rstd2_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd3_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd4_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd5_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::rstd6_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd7_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd8_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd9_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd10_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd11_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd12_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd13_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd14_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd15_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd16_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd17_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd18_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd19_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd20_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rstd0_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::rstd1_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::rstd2_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd3_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd4_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd5_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::rstd6_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd7_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd8_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd9_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd10_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd11_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd12_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd13_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd14_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd15_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd16_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd17_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd18_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd19_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd20_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasGapConfigPerCC-List-r14 ::= CHOICE +void meas_gap_cfg_per_cc_list_r14_c::set(types::options e) +{ + type_ = e; +} +void meas_gap_cfg_per_cc_list_r14_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(); + if (c.meas_gap_cfg_to_rem_list_r14_present) { + j.start_array("measGapConfigToRemoveList-r14"); + for (uint32_t i1 = 0; i1 < c.meas_gap_cfg_to_rem_list_r14.size(); ++i1) { + j.write_int(c.meas_gap_cfg_to_rem_list_r14[i1]); + } + j.end_array(); + } + if (c.meas_gap_cfg_to_add_mod_list_r14_present) { + j.start_array("measGapConfigToAddModList-r14"); + for (uint32_t i1 = 0; i1 < c.meas_gap_cfg_to_add_mod_list_r14.size(); ++i1) { + c.meas_gap_cfg_to_add_mod_list_r14[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_per_cc_list_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_gap_cfg_per_cc_list_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.pack(c.meas_gap_cfg_to_rem_list_r14_present, 1)); + HANDLE_CODE(bref.pack(c.meas_gap_cfg_to_add_mod_list_r14_present, 1)); + if (c.meas_gap_cfg_to_rem_list_r14_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, c.meas_gap_cfg_to_rem_list_r14, 1, 32, UnalignedIntegerPacker(0, 31))); + } + if (c.meas_gap_cfg_to_add_mod_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.meas_gap_cfg_to_add_mod_list_r14, 1, 32)); + } + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_per_cc_list_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_per_cc_list_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(bref.unpack(c.meas_gap_cfg_to_rem_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(c.meas_gap_cfg_to_add_mod_list_r14_present, 1)); + if (c.meas_gap_cfg_to_rem_list_r14_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.meas_gap_cfg_to_rem_list_r14, bref, 1, 32, UnalignedIntegerPacker(0, 31))); + } + if (c.meas_gap_cfg_to_add_mod_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.meas_gap_cfg_to_add_mod_list_r14, bref, 1, 32)); + } + break; + default: + log_invalid_choice_id(type_, "meas_gap_cfg_per_cc_list_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +meas_gap_cfg_per_cc_list_r14_c::setup_s_::setup_s_() +{ + meas_gap_cfg_to_rem_list_r14_present = false; + meas_gap_cfg_to_add_mod_list_r14_present = false; +} + +// MeasGapSharingConfig-r14 ::= CHOICE +void meas_gap_sharing_cfg_r14_c::set(types::options e) +{ + type_ = e; +} +void meas_gap_sharing_cfg_r14_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("measGapSharingScheme-r14", c.meas_gap_sharing_scheme_r14.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_gap_sharing_cfg_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_gap_sharing_cfg_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c.meas_gap_sharing_scheme_r14)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_sharing_cfg_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_sharing_cfg_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c.meas_gap_sharing_scheme_r14, bref)); + break; + default: + log_invalid_choice_id(type_, "meas_gap_sharing_cfg_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MobilityControlInfoV2X-r14 ::= SEQUENCE +mob_ctrl_info_v2x_r14_s::mob_ctrl_info_v2x_r14_s() +{ + v2x_comm_tx_pool_exceptional_r14_present = false; + v2x_comm_rx_pool_r14_present = false; + v2x_comm_sync_cfg_r14_present = false; + cbr_mob_tx_cfg_list_r14_present = false; +} +SRSASN_CODE mob_ctrl_info_v2x_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_mob_tx_cfg_list_r14_present, 1)); + + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.pack(bref)); + } + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_rx_pool_r14, 1, 16)); + } + if (v2x_comm_sync_cfg_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_sync_cfg_r14, 1, 16)); + } + if (cbr_mob_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_mob_tx_cfg_list_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_ctrl_info_v2x_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_comm_tx_pool_exceptional_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_rx_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_sync_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_mob_tx_cfg_list_r14_present, 1)); + + if (v2x_comm_tx_pool_exceptional_r14_present) { + HANDLE_CODE(v2x_comm_tx_pool_exceptional_r14.unpack(bref)); + } + if (v2x_comm_rx_pool_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_rx_pool_r14, bref, 1, 16)); + } + if (v2x_comm_sync_cfg_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_sync_cfg_r14, bref, 1, 16)); + } + if (cbr_mob_tx_cfg_list_r14_present) { + HANDLE_CODE(cbr_mob_tx_cfg_list_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_ctrl_info_v2x_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (v2x_comm_tx_pool_exceptional_r14_present) { + j.write_fieldname("v2x-CommTxPoolExceptional-r14"); + v2x_comm_tx_pool_exceptional_r14.to_json(j); + } + if (v2x_comm_rx_pool_r14_present) { + j.start_array("v2x-CommRxPool-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_r14.size(); ++i1) { + v2x_comm_rx_pool_r14[i1].to_json(j); + } + j.end_array(); + } + if (v2x_comm_sync_cfg_r14_present) { + j.start_array("v2x-CommSyncConfig-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_sync_cfg_r14.size(); ++i1) { + v2x_comm_sync_cfg_r14[i1].to_json(j); + } + j.end_array(); + } + if (cbr_mob_tx_cfg_list_r14_present) { + j.write_fieldname("cbr-MobilityTxConfigList-r14"); + cbr_mob_tx_cfg_list_r14.to_json(j); + } + j.end_obj(); +} + +// MobilityFromEUTRACommand-v8d0-IEs ::= SEQUENCE +mob_from_eutra_cmd_v8d0_ies_s::mob_from_eutra_cmd_v8d0_ies_s() +{ + band_ind_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_v8d0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_ind_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (band_ind_present) { + HANDLE_CODE(pack_enum(bref, band_ind)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_v8d0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_ind_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (band_ind_present) { + HANDLE_CODE(unpack_enum(band_ind, bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_v8d0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_ind_present) { + j.write_str("bandIndicator", band_ind.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// MobilityFromEUTRACommand-v960-IEs ::= SEQUENCE +mob_from_eutra_cmd_v960_ies_s::mob_from_eutra_cmd_v960_ies_s() +{ + band_ind_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_v960_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_ind_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (band_ind_present) { + HANDLE_CODE(pack_enum(bref, band_ind)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_v960_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_ind_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (band_ind_present) { + HANDLE_CODE(unpack_enum(band_ind, bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_v960_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_ind_present) { + j.write_str("bandIndicator", band_ind.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// QuantityConfig ::= SEQUENCE +quant_cfg_s::quant_cfg_s() +{ + ext = false; + quant_cfg_eutra_present = false; + quant_cfg_utra_present = false; + quant_cfg_geran_present = false; + quant_cfg_cdma2000_present = false; + quant_cfg_utra_v1020_present = false; + quant_cfg_eutra_v1250_present = false; + quant_cfg_eutra_v1310_present = false; + quant_cfg_wlan_r13_present = false; + quant_cfg_nr_list_r15_present = false; +} +SRSASN_CODE quant_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(quant_cfg_eutra_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_utra_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_geran_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_cdma2000_present, 1)); + + if (quant_cfg_eutra_present) { + HANDLE_CODE(quant_cfg_eutra.pack(bref)); + } + if (quant_cfg_utra_present) { + HANDLE_CODE(quant_cfg_utra.pack(bref)); + } + if (quant_cfg_geran_present) { + HANDLE_CODE(quant_cfg_geran.pack(bref)); + } + if (quant_cfg_cdma2000_present) { + HANDLE_CODE(quant_cfg_cdma2000.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + rrc_asn1_warn_assert(quant_cfg_utra_v1020_present != (quant_cfg_utra_v1020.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= quant_cfg_utra_v1020_present; + rrc_asn1_warn_assert(quant_cfg_eutra_v1250_present != (quant_cfg_eutra_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= quant_cfg_eutra_v1250_present; + rrc_asn1_warn_assert(quant_cfg_eutra_v1310_present != (quant_cfg_eutra_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= quant_cfg_eutra_v1310_present; + rrc_asn1_warn_assert(quant_cfg_wlan_r13_present != (quant_cfg_wlan_r13.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= quant_cfg_wlan_r13_present; + rrc_asn1_warn_assert(quant_cfg_nr_list_r15_present != (quant_cfg_nr_list_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= quant_cfg_nr_list_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(quant_cfg_utra_v1020_present, 1)); + if (quant_cfg_utra_v1020_present) { + HANDLE_CODE(quant_cfg_utra_v1020->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(quant_cfg_eutra_v1250_present, 1)); + if (quant_cfg_eutra_v1250_present) { + HANDLE_CODE(quant_cfg_eutra_v1250->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(quant_cfg_eutra_v1310_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_wlan_r13_present, 1)); + if (quant_cfg_eutra_v1310_present) { + HANDLE_CODE(quant_cfg_eutra_v1310->pack(bref)); + } + if (quant_cfg_wlan_r13_present) { + HANDLE_CODE(quant_cfg_wlan_r13->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(quant_cfg_nr_list_r15_present, 1)); + if (quant_cfg_nr_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *quant_cfg_nr_list_r15, 1, 2)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(quant_cfg_eutra_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_utra_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_geran_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_cdma2000_present, 1)); + + if (quant_cfg_eutra_present) { + HANDLE_CODE(quant_cfg_eutra.unpack(bref)); + } + if (quant_cfg_utra_present) { + HANDLE_CODE(quant_cfg_utra.unpack(bref)); + } + if (quant_cfg_geran_present) { + HANDLE_CODE(quant_cfg_geran.unpack(bref)); + } + if (quant_cfg_cdma2000_present) { + HANDLE_CODE(quant_cfg_cdma2000.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(quant_cfg_utra_v1020_present, 1)); + if (quant_cfg_utra_v1020_present) { + quant_cfg_utra_v1020 = make_copy_ptr(quant_cfg_utra_v1020_s()); + HANDLE_CODE(quant_cfg_utra_v1020->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(quant_cfg_eutra_v1250_present, 1)); + if (quant_cfg_eutra_v1250_present) { + quant_cfg_eutra_v1250 = make_copy_ptr(quant_cfg_eutra_v1250_s()); + HANDLE_CODE(quant_cfg_eutra_v1250->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(quant_cfg_eutra_v1310_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_wlan_r13_present, 1)); + if (quant_cfg_eutra_v1310_present) { + quant_cfg_eutra_v1310 = make_copy_ptr(quant_cfg_eutra_v1310_s()); + HANDLE_CODE(quant_cfg_eutra_v1310->unpack(bref)); + } + if (quant_cfg_wlan_r13_present) { + quant_cfg_wlan_r13 = make_copy_ptr(quant_cfg_wlan_r13_s()); + HANDLE_CODE(quant_cfg_wlan_r13->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(quant_cfg_nr_list_r15_present, 1)); + if (quant_cfg_nr_list_r15_present) { + quant_cfg_nr_list_r15 = make_copy_ptr(quant_cfg_nr_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*quant_cfg_nr_list_r15, bref, 1, 2)); + } + } + } + return SRSASN_SUCCESS; +} +void quant_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (quant_cfg_eutra_present) { + j.write_fieldname("quantityConfigEUTRA"); + quant_cfg_eutra.to_json(j); + } + if (quant_cfg_utra_present) { + j.write_fieldname("quantityConfigUTRA"); + quant_cfg_utra.to_json(j); + } + if (quant_cfg_geran_present) { + j.write_fieldname("quantityConfigGERAN"); + quant_cfg_geran.to_json(j); + } + if (quant_cfg_cdma2000_present) { + j.write_fieldname("quantityConfigCDMA2000"); + quant_cfg_cdma2000.to_json(j); + } + if (quant_cfg_utra_v1020_present) { + j.write_fieldname("quantityConfigUTRA-v1020"); + quant_cfg_utra_v1020->to_json(j); + } + if (quant_cfg_eutra_v1250_present) { + j.write_fieldname("quantityConfigEUTRA-v1250"); + quant_cfg_eutra_v1250->to_json(j); + } + if (quant_cfg_eutra_v1310_present) { + j.write_fieldname("quantityConfigEUTRA-v1310"); + quant_cfg_eutra_v1310->to_json(j); + } + if (quant_cfg_wlan_r13_present) { + j.write_fieldname("quantityConfigWLAN-r13"); + quant_cfg_wlan_r13->to_json(j); + } + if (quant_cfg_nr_list_r15_present) { + j.start_array("quantityConfigNRList-r15"); + for (uint32_t i1 = 0; i1 < quant_cfg_nr_list_r15->size(); ++i1) { + ((*quant_cfg_nr_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v8m0-IEs ::= SEQUENCE +rrc_conn_recfg_v8m0_ies_s::rrc_conn_recfg_v8m0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v8m0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v8m0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v8m0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v920-IEs ::= SEQUENCE +rrc_conn_recfg_v920_ies_s::rrc_conn_recfg_v920_ies_s() +{ + other_cfg_r9_present = false; + full_cfg_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(other_cfg_r9_present, 1)); + HANDLE_CODE(bref.pack(full_cfg_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (other_cfg_r9_present) { + HANDLE_CODE(other_cfg_r9.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(other_cfg_r9_present, 1)); + HANDLE_CODE(bref.unpack(full_cfg_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (other_cfg_r9_present) { + HANDLE_CODE(other_cfg_r9.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (other_cfg_r9_present) { + j.write_fieldname("otherConfig-r9"); + other_cfg_r9.to_json(j); + } + if (full_cfg_r9_present) { + j.write_str("fullConfig-r9", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionRelease-v920-IEs ::= SEQUENCE +rrc_conn_release_v920_ies_s::rrc_conn_release_v920_ies_s() +{ + cell_info_list_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_info_list_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cell_info_list_r9_present) { + HANDLE_CODE(cell_info_list_r9.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_info_list_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cell_info_list_r9_present) { + HANDLE_CODE(cell_info_list_r9.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_info_list_r9_present) { + j.write_fieldname("cellInfoList-r9"); + cell_info_list_r9.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::destroy_() +{ + switch (type_) { + case types::geran_r9: + c.destroy(); + break; + case types::utra_fdd_r9: + c.destroy(); + break; + case types::utra_tdd_r9: + c.destroy(); + break; + case types::utra_tdd_r10: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::geran_r9: + c.init(); + break; + case types::utra_fdd_r9: + c.init(); + break; + case types::utra_tdd_r9: + c.init(); + break; + case types::utra_tdd_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_"); + } +} +rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::cell_info_list_r9_c_( + const rrc_conn_release_v920_ies_s::cell_info_list_r9_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::geran_r9: + c.init(other.c.get()); + break; + case types::utra_fdd_r9: + c.init(other.c.get()); + break; + case types::utra_tdd_r9: + c.init(other.c.get()); + break; + case types::utra_tdd_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_"); + } +} +rrc_conn_release_v920_ies_s::cell_info_list_r9_c_& rrc_conn_release_v920_ies_s::cell_info_list_r9_c_:: + operator=(const rrc_conn_release_v920_ies_s::cell_info_list_r9_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::geran_r9: + c.set(other.c.get()); + break; + case types::utra_fdd_r9: + c.set(other.c.get()); + break; + case types::utra_tdd_r9: + c.set(other.c.get()); + break; + case types::utra_tdd_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_"); + } + + return *this; +} +void rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::geran_r9: + j.start_array("geran-r9"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::utra_fdd_r9: + j.start_array("utra-FDD-r9"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::utra_tdd_r9: + j.start_array("utra-TDD-r9"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::utra_tdd_r10: + j.start_array("utra-TDD-r10"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::geran_r9: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); + break; + case types::utra_fdd_r9: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + break; + case types::utra_tdd_r9: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + break; + case types::utra_tdd_r10: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + } break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::geran_r9: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); + break; + case types::utra_fdd_r9: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + break; + case types::utra_tdd_r9: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + break; + case types::utra_tdd_r10: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + } break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionRelease-v9e0-IEs ::= SEQUENCE +rrc_conn_release_v9e0_ies_s::rrc_conn_release_v9e0_ies_s() +{ + redirected_carrier_info_v9e0_present = false; + idle_mode_mob_ctrl_info_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(redirected_carrier_info_v9e0_present, 1)); + HANDLE_CODE(bref.pack(idle_mode_mob_ctrl_info_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (redirected_carrier_info_v9e0_present) { + HANDLE_CODE(redirected_carrier_info_v9e0.pack(bref)); + } + if (idle_mode_mob_ctrl_info_v9e0_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info_v9e0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(redirected_carrier_info_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(idle_mode_mob_ctrl_info_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (redirected_carrier_info_v9e0_present) { + HANDLE_CODE(redirected_carrier_info_v9e0.unpack(bref)); + } + if (idle_mode_mob_ctrl_info_v9e0_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info_v9e0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (redirected_carrier_info_v9e0_present) { + j.write_fieldname("redirectedCarrierInfo-v9e0"); + redirected_carrier_info_v9e0.to_json(j); + } + if (idle_mode_mob_ctrl_info_v9e0_present) { + j.write_fieldname("idleModeMobilityControlInfo-v9e0"); + idle_mode_mob_ctrl_info_v9e0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionResume-v1510-IEs ::= SEQUENCE +rrc_conn_resume_v1510_ies_s::rrc_conn_resume_v1510_ies_s() +{ + sk_counter_r15_present = false; + nr_radio_bearer_cfg1_r15_present = false; + nr_radio_bearer_cfg2_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_resume_v1510_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sk_counter_r15_present, 1)); + HANDLE_CODE(bref.pack(nr_radio_bearer_cfg1_r15_present, 1)); + HANDLE_CODE(bref.pack(nr_radio_bearer_cfg2_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sk_counter_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, sk_counter_r15, (uint16_t)0, (uint16_t)65535)); + } + if (nr_radio_bearer_cfg1_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg1_r15.pack(bref)); + } + if (nr_radio_bearer_cfg2_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg2_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_v1510_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sk_counter_r15_present, 1)); + HANDLE_CODE(bref.unpack(nr_radio_bearer_cfg1_r15_present, 1)); + HANDLE_CODE(bref.unpack(nr_radio_bearer_cfg2_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sk_counter_r15_present) { + HANDLE_CODE(unpack_unalign_integer(sk_counter_r15, bref, (uint16_t)0, (uint16_t)65535)); + } + if (nr_radio_bearer_cfg1_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg1_r15.unpack(bref)); + } + if (nr_radio_bearer_cfg2_r15_present) { + HANDLE_CODE(nr_radio_bearer_cfg2_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_v1510_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sk_counter_r15_present) { + j.write_int("sk-Counter-r15", sk_counter_r15); + } + if (nr_radio_bearer_cfg1_r15_present) { + j.write_str("nr-RadioBearerConfig1-r15", nr_radio_bearer_cfg1_r15.to_string()); + } + if (nr_radio_bearer_cfg2_r15_present) { + j.write_str("nr-RadioBearerConfig2-r15", nr_radio_bearer_cfg2_r15.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RadioResourceConfigCommon ::= SEQUENCE +rr_cfg_common_s::rr_cfg_common_s() +{ + ext = false; + rach_cfg_common_present = false; + pdsch_cfg_common_present = false; + phich_cfg_present = false; + pucch_cfg_common_present = false; + srs_ul_cfg_common_present = false; + ul_pwr_ctrl_common_present = false; + ant_info_common_present = false; + p_max_present = false; + tdd_cfg_present = false; + ul_pwr_ctrl_common_v1020_present = false; + tdd_cfg_v1130_present = false; + pusch_cfg_common_v1270_present = false; + prach_cfg_v1310_present = false; + freq_hop_params_r13_present = false; + pdsch_cfg_common_v1310_present = false; + pucch_cfg_common_v1310_present = false; + pusch_cfg_common_v1310_present = false; + ul_pwr_ctrl_common_v1310_present = false; + high_speed_cfg_r14_present = false; + prach_cfg_v1430_present = false; + pucch_cfg_common_v1430_present = false; + tdd_cfg_v1430_present = false; + tdd_cfg_v1450_present = false; + ul_pwr_ctrl_common_v1530_present = false; + high_speed_cfg_v1530_present = false; +} +SRSASN_CODE rr_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rach_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(phich_cfg_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(srs_ul_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_present, 1)); + HANDLE_CODE(bref.pack(ant_info_common_present, 1)); + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(tdd_cfg_present, 1)); + + if (rach_cfg_common_present) { + HANDLE_CODE(rach_cfg_common.pack(bref)); + } + HANDLE_CODE(prach_cfg.pack(bref)); + if (pdsch_cfg_common_present) { + HANDLE_CODE(pdsch_cfg_common.pack(bref)); + } + HANDLE_CODE(pusch_cfg_common.pack(bref)); + if (phich_cfg_present) { + HANDLE_CODE(phich_cfg.pack(bref)); + } + if (pucch_cfg_common_present) { + HANDLE_CODE(pucch_cfg_common.pack(bref)); + } + if (srs_ul_cfg_common_present) { + HANDLE_CODE(srs_ul_cfg_common.pack(bref)); + } + if (ul_pwr_ctrl_common_present) { + HANDLE_CODE(ul_pwr_ctrl_common.pack(bref)); + } + if (ant_info_common_present) { + HANDLE_CODE(ant_info_common.pack(bref)); + } + if (p_max_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max, (int8_t)-30, (int8_t)33)); + } + if (tdd_cfg_present) { + HANDLE_CODE(tdd_cfg.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, ul_cp_len)); + + if (ext) { + ext_groups_header group_flags(7); + rrc_asn1_warn_assert(ul_pwr_ctrl_common_v1020_present != (ul_pwr_ctrl_common_v1020.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= ul_pwr_ctrl_common_v1020_present; + rrc_asn1_warn_assert(tdd_cfg_v1130_present != (tdd_cfg_v1130.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= tdd_cfg_v1130_present; + rrc_asn1_warn_assert(pusch_cfg_common_v1270_present != (pusch_cfg_common_v1270.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= pusch_cfg_common_v1270_present; + rrc_asn1_warn_assert(prach_cfg_v1310_present != (prach_cfg_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= prach_cfg_v1310_present; + rrc_asn1_warn_assert(freq_hop_params_r13_present != (freq_hop_params_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= freq_hop_params_r13_present; + rrc_asn1_warn_assert(pdsch_cfg_common_v1310_present != (pdsch_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pdsch_cfg_common_v1310_present; + rrc_asn1_warn_assert(pucch_cfg_common_v1310_present != (pucch_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pucch_cfg_common_v1310_present; + rrc_asn1_warn_assert(pusch_cfg_common_v1310_present != (pusch_cfg_common_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= pusch_cfg_common_v1310_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_common_v1310_present != (ul_pwr_ctrl_common_v1310.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= ul_pwr_ctrl_common_v1310_present; + rrc_asn1_warn_assert(high_speed_cfg_r14_present != (high_speed_cfg_r14.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= high_speed_cfg_r14_present; + rrc_asn1_warn_assert(prach_cfg_v1430_present != (prach_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= prach_cfg_v1430_present; + rrc_asn1_warn_assert(pucch_cfg_common_v1430_present != (pucch_cfg_common_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= pucch_cfg_common_v1430_present; + rrc_asn1_warn_assert(tdd_cfg_v1430_present != (tdd_cfg_v1430.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= tdd_cfg_v1430_present; + rrc_asn1_warn_assert(tdd_cfg_v1450_present != (tdd_cfg_v1450.get() != NULL), __FILE__, __LINE__); + group_flags[5] |= tdd_cfg_v1450_present; + rrc_asn1_warn_assert(ul_pwr_ctrl_common_v1530_present != (ul_pwr_ctrl_common_v1530.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= ul_pwr_ctrl_common_v1530_present; + rrc_asn1_warn_assert(high_speed_cfg_v1530_present != (high_speed_cfg_v1530.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= high_speed_cfg_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_v1020_present, 1)); + if (ul_pwr_ctrl_common_v1020_present) { + HANDLE_CODE(ul_pwr_ctrl_common_v1020->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(tdd_cfg_v1130_present, 1)); + if (tdd_cfg_v1130_present) { + HANDLE_CODE(tdd_cfg_v1130->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(pusch_cfg_common_v1270_present, 1)); + if (pusch_cfg_common_v1270_present) { + HANDLE_CODE(pusch_cfg_common_v1270->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(prach_cfg_v1310_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_params_r13_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_v1310_present, 1)); + if (prach_cfg_v1310_present) { + HANDLE_CODE(prach_cfg_v1310->pack(bref)); + } + if (freq_hop_params_r13_present) { + HANDLE_CODE(freq_hop_params_r13->pack(bref)); + } + if (pdsch_cfg_common_v1310_present) { + HANDLE_CODE(pdsch_cfg_common_v1310->pack(bref)); + } + if (pucch_cfg_common_v1310_present) { + HANDLE_CODE(pucch_cfg_common_v1310->pack(bref)); + } + if (pusch_cfg_common_v1310_present) { + HANDLE_CODE(pusch_cfg_common_v1310->pack(bref)); + } + if (ul_pwr_ctrl_common_v1310_present) { + HANDLE_CODE(ul_pwr_ctrl_common_v1310->pack(bref)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(high_speed_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_common_v1430_present, 1)); + HANDLE_CODE(bref.pack(tdd_cfg_v1430_present, 1)); + if (high_speed_cfg_r14_present) { + HANDLE_CODE(high_speed_cfg_r14->pack(bref)); + } + if (prach_cfg_v1430_present) { + HANDLE_CODE(prach_cfg_v1430->pack(bref)); + } + if (pucch_cfg_common_v1430_present) { + HANDLE_CODE(pucch_cfg_common_v1430->pack(bref)); + } + if (tdd_cfg_v1430_present) { + HANDLE_CODE(tdd_cfg_v1430->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(tdd_cfg_v1450_present, 1)); + if (tdd_cfg_v1450_present) { + HANDLE_CODE(tdd_cfg_v1450->pack(bref)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ul_pwr_ctrl_common_v1530_present, 1)); + HANDLE_CODE(bref.pack(high_speed_cfg_v1530_present, 1)); + if (ul_pwr_ctrl_common_v1530_present) { + HANDLE_CODE(ul_pwr_ctrl_common_v1530->pack(bref)); + } + if (high_speed_cfg_v1530_present) { + HANDLE_CODE(high_speed_cfg_v1530->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rr_cfg_common_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rach_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(phich_cfg_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(srs_ul_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_common_present, 1)); + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(tdd_cfg_present, 1)); + + if (rach_cfg_common_present) { + HANDLE_CODE(rach_cfg_common.unpack(bref)); + } + HANDLE_CODE(prach_cfg.unpack(bref)); + if (pdsch_cfg_common_present) { + HANDLE_CODE(pdsch_cfg_common.unpack(bref)); + } + HANDLE_CODE(pusch_cfg_common.unpack(bref)); + if (phich_cfg_present) { + HANDLE_CODE(phich_cfg.unpack(bref)); + } + if (pucch_cfg_common_present) { + HANDLE_CODE(pucch_cfg_common.unpack(bref)); + } + if (srs_ul_cfg_common_present) { + HANDLE_CODE(srs_ul_cfg_common.unpack(bref)); + } + if (ul_pwr_ctrl_common_present) { + HANDLE_CODE(ul_pwr_ctrl_common.unpack(bref)); + } + if (ant_info_common_present) { + HANDLE_CODE(ant_info_common.unpack(bref)); + } + if (p_max_present) { + HANDLE_CODE(unpack_unalign_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + } + if (tdd_cfg_present) { + HANDLE_CODE(tdd_cfg.unpack(bref)); + } + HANDLE_CODE(unpack_enum(ul_cp_len, bref)); + + if (ext) { + ext_groups_header group_flags(7); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_v1020_present, 1)); + if (ul_pwr_ctrl_common_v1020_present) { + ul_pwr_ctrl_common_v1020 = make_copy_ptr(ul_pwr_ctrl_common_v1020_s()); + HANDLE_CODE(ul_pwr_ctrl_common_v1020->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(tdd_cfg_v1130_present, 1)); + if (tdd_cfg_v1130_present) { + tdd_cfg_v1130 = make_copy_ptr(tdd_cfg_v1130_s()); + HANDLE_CODE(tdd_cfg_v1130->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(pusch_cfg_common_v1270_present, 1)); + if (pusch_cfg_common_v1270_present) { + pusch_cfg_common_v1270 = make_copy_ptr(pusch_cfg_common_v1270_s()); + HANDLE_CODE(pusch_cfg_common_v1270->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(prach_cfg_v1310_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_common_v1310_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_v1310_present, 1)); + if (prach_cfg_v1310_present) { + prach_cfg_v1310 = make_copy_ptr(prach_cfg_v1310_s()); + HANDLE_CODE(prach_cfg_v1310->unpack(bref)); + } + if (freq_hop_params_r13_present) { + freq_hop_params_r13 = make_copy_ptr(freq_hop_params_r13_s()); + HANDLE_CODE(freq_hop_params_r13->unpack(bref)); + } + if (pdsch_cfg_common_v1310_present) { + pdsch_cfg_common_v1310 = make_copy_ptr(pdsch_cfg_common_v1310_s()); + HANDLE_CODE(pdsch_cfg_common_v1310->unpack(bref)); + } + if (pucch_cfg_common_v1310_present) { + pucch_cfg_common_v1310 = make_copy_ptr(pucch_cfg_common_v1310_s()); + HANDLE_CODE(pucch_cfg_common_v1310->unpack(bref)); + } + if (pusch_cfg_common_v1310_present) { + pusch_cfg_common_v1310 = make_copy_ptr(pusch_cfg_common_v1310_s()); + HANDLE_CODE(pusch_cfg_common_v1310->unpack(bref)); + } + if (ul_pwr_ctrl_common_v1310_present) { + ul_pwr_ctrl_common_v1310 = make_copy_ptr(ul_pwr_ctrl_common_v1310_s()); + HANDLE_CODE(ul_pwr_ctrl_common_v1310->unpack(bref)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(high_speed_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_common_v1430_present, 1)); + HANDLE_CODE(bref.unpack(tdd_cfg_v1430_present, 1)); + if (high_speed_cfg_r14_present) { + high_speed_cfg_r14 = make_copy_ptr(high_speed_cfg_r14_s()); + HANDLE_CODE(high_speed_cfg_r14->unpack(bref)); + } + if (prach_cfg_v1430_present) { + prach_cfg_v1430 = make_copy_ptr(prach_cfg_v1430_s()); + HANDLE_CODE(prach_cfg_v1430->unpack(bref)); + } + if (pucch_cfg_common_v1430_present) { + pucch_cfg_common_v1430 = make_copy_ptr(pucch_cfg_common_v1430_s()); + HANDLE_CODE(pucch_cfg_common_v1430->unpack(bref)); + } + if (tdd_cfg_v1430_present) { + tdd_cfg_v1430 = make_copy_ptr(tdd_cfg_v1430_s()); + HANDLE_CODE(tdd_cfg_v1430->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(tdd_cfg_v1450_present, 1)); + if (tdd_cfg_v1450_present) { + tdd_cfg_v1450 = make_copy_ptr(tdd_cfg_v1450_s()); + HANDLE_CODE(tdd_cfg_v1450->unpack(bref)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_common_v1530_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_cfg_v1530_present, 1)); + if (ul_pwr_ctrl_common_v1530_present) { + ul_pwr_ctrl_common_v1530 = make_copy_ptr(ul_pwr_ctrl_common_v1530_s()); + HANDLE_CODE(ul_pwr_ctrl_common_v1530->unpack(bref)); + } + if (high_speed_cfg_v1530_present) { + high_speed_cfg_v1530 = make_copy_ptr(high_speed_cfg_v1530_s()); + HANDLE_CODE(high_speed_cfg_v1530->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rr_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rach_cfg_common_present) { + j.write_fieldname("rach-ConfigCommon"); + rach_cfg_common.to_json(j); + } + j.write_fieldname("prach-Config"); + prach_cfg.to_json(j); + if (pdsch_cfg_common_present) { + j.write_fieldname("pdsch-ConfigCommon"); + pdsch_cfg_common.to_json(j); + } + j.write_fieldname("pusch-ConfigCommon"); + pusch_cfg_common.to_json(j); + if (phich_cfg_present) { + j.write_fieldname("phich-Config"); + phich_cfg.to_json(j); + } + if (pucch_cfg_common_present) { + j.write_fieldname("pucch-ConfigCommon"); + pucch_cfg_common.to_json(j); + } + if (srs_ul_cfg_common_present) { + j.write_fieldname("soundingRS-UL-ConfigCommon"); + srs_ul_cfg_common.to_json(j); + } + if (ul_pwr_ctrl_common_present) { + j.write_fieldname("uplinkPowerControlCommon"); + ul_pwr_ctrl_common.to_json(j); + } + if (ant_info_common_present) { + j.write_fieldname("antennaInfoCommon"); + ant_info_common.to_json(j); + } + if (p_max_present) { + j.write_int("p-Max", p_max); + } + if (tdd_cfg_present) { + j.write_fieldname("tdd-Config"); + tdd_cfg.to_json(j); + } + j.write_str("ul-CyclicPrefixLength", ul_cp_len.to_string()); + if (ul_pwr_ctrl_common_v1020_present) { + j.write_fieldname("uplinkPowerControlCommon-v1020"); + ul_pwr_ctrl_common_v1020->to_json(j); + } + if (tdd_cfg_v1130_present) { + j.write_fieldname("tdd-Config-v1130"); + tdd_cfg_v1130->to_json(j); + } + if (pusch_cfg_common_v1270_present) { + j.write_fieldname("pusch-ConfigCommon-v1270"); + pusch_cfg_common_v1270->to_json(j); + } + if (prach_cfg_v1310_present) { + j.write_fieldname("prach-Config-v1310"); + prach_cfg_v1310->to_json(j); + } + if (freq_hop_params_r13_present) { + j.write_fieldname("freqHoppingParameters-r13"); + freq_hop_params_r13->to_json(j); + } + if (pdsch_cfg_common_v1310_present) { + j.write_fieldname("pdsch-ConfigCommon-v1310"); + pdsch_cfg_common_v1310->to_json(j); + } + if (pucch_cfg_common_v1310_present) { + j.write_fieldname("pucch-ConfigCommon-v1310"); + pucch_cfg_common_v1310->to_json(j); + } + if (pusch_cfg_common_v1310_present) { + j.write_fieldname("pusch-ConfigCommon-v1310"); + pusch_cfg_common_v1310->to_json(j); + } + if (ul_pwr_ctrl_common_v1310_present) { + j.write_fieldname("uplinkPowerControlCommon-v1310"); + ul_pwr_ctrl_common_v1310->to_json(j); + } + if (high_speed_cfg_r14_present) { + j.write_fieldname("highSpeedConfig-r14"); + high_speed_cfg_r14->to_json(j); + } + if (prach_cfg_v1430_present) { + j.write_fieldname("prach-Config-v1430"); + prach_cfg_v1430->to_json(j); + } + if (pucch_cfg_common_v1430_present) { + j.write_fieldname("pucch-ConfigCommon-v1430"); + pucch_cfg_common_v1430->to_json(j); + } + if (tdd_cfg_v1430_present) { + j.write_fieldname("tdd-Config-v1430"); + tdd_cfg_v1430->to_json(j); + } + if (tdd_cfg_v1450_present) { + j.write_fieldname("tdd-Config-v1450"); + tdd_cfg_v1450->to_json(j); + } + if (ul_pwr_ctrl_common_v1530_present) { + j.write_fieldname("uplinkPowerControlCommon-v1530"); + ul_pwr_ctrl_common_v1530->to_json(j); + } + if (high_speed_cfg_v1530_present) { + j.write_fieldname("highSpeedConfig-v1530"); + high_speed_cfg_v1530->to_json(j); + } + j.end_obj(); +} + +// SI-OrPSI-GERAN ::= CHOICE +void si_or_psi_geran_c::destroy_() +{ + switch (type_) { + case types::si: + c.destroy(); + break; + case types::psi: + c.destroy(); + break; + default: + break; + } +} +void si_or_psi_geran_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::si: + c.init(); + break; + case types::psi: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "si_or_psi_geran_c"); + } +} +si_or_psi_geran_c::si_or_psi_geran_c(const si_or_psi_geran_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::si: + c.init(other.c.get()); + break; + case types::psi: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "si_or_psi_geran_c"); + } +} +si_or_psi_geran_c& si_or_psi_geran_c::operator=(const si_or_psi_geran_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::si: + c.set(other.c.get()); + break; + case types::psi: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "si_or_psi_geran_c"); + } + + return *this; +} +void si_or_psi_geran_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::si: + j.start_array("si"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_str(c.get()[i1].to_string()); + } + j.end_array(); + break; + case types::psi: + j.start_array("psi"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_str(c.get()[i1].to_string()); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "si_or_psi_geran_c"); + } + j.end_obj(); +} +SRSASN_CODE si_or_psi_geran_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::si: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 10)); + break; + case types::psi: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 10)); + break; + default: + log_invalid_choice_id(type_, "si_or_psi_geran_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE si_or_psi_geran_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::si: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 10)); + break; + case types::psi: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 10)); + break; + default: + log_invalid_choice_id(type_, "si_or_psi_geran_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UECapabilityEnquiry-v1180-IEs ::= SEQUENCE +ue_cap_enquiry_v1180_ies_s::ue_cap_enquiry_v1180_ies_s() +{ + requested_freq_bands_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_v1180_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_freq_bands_r11_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (requested_freq_bands_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, requested_freq_bands_r11, 1, 16, UnalignedIntegerPacker(1, 256))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v1180_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(requested_freq_bands_r11_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (requested_freq_bands_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(requested_freq_bands_r11, bref, 1, 16, UnalignedIntegerPacker(1, 256))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v1180_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_freq_bands_r11_present) { + j.start_array("requestedFrequencyBands-r11"); + for (uint32_t i1 = 0; i1 < requested_freq_bands_r11.size(); ++i1) { + j.write_int(requested_freq_bands_r11[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationRequest-v1020-IEs ::= SEQUENCE +ue_info_request_v1020_ies_s::ue_info_request_v1020_ies_s() +{ + log_meas_report_req_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_request_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_report_req_r10_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_info_request_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_report_req_r10_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_info_request_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_report_req_r10_present) { + j.write_str("logMeasReportReq-r10", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// AreaConfiguration-r10 ::= CHOICE +void area_cfg_r10_c::destroy_() +{ + switch (type_) { + case types::cell_global_id_list_r10: + c.destroy(); + break; + case types::tac_list_r10: + c.destroy(); + break; + default: + break; + } +} +void area_cfg_r10_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_list_r10: + c.init(); + break; + case types::tac_list_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_cfg_r10_c"); + } +} +area_cfg_r10_c::area_cfg_r10_c(const area_cfg_r10_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_list_r10: + c.init(other.c.get()); + break; + case types::tac_list_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_cfg_r10_c"); + } +} +area_cfg_r10_c& area_cfg_r10_c::operator=(const area_cfg_r10_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_list_r10: + c.set(other.c.get()); + break; + case types::tac_list_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_cfg_r10_c"); + } + + return *this; +} +void area_cfg_r10_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_list_r10: + j.start_array("cellGlobalIdList-r10"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::tac_list_r10: + j.start_array("trackingAreaCodeList-r10"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_str(c.get()[i1].to_string()); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "area_cfg_r10_c"); + } + j.end_obj(); +} +SRSASN_CODE area_cfg_r10_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cell_global_id_list_r10: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); + break; + case types::tac_list_r10: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + default: + log_invalid_choice_id(type_, "area_cfg_r10_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE area_cfg_r10_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cell_global_id_list_r10: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); + break; + case types::tac_list_r10: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "area_cfg_r10_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CSFBParametersResponseCDMA2000-v8a0-IEs ::= SEQUENCE +csfb_params_resp_cdma2000_v8a0_ies_s::csfb_params_resp_cdma2000_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE csfb_params_resp_cdma2000_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_resp_cdma2000_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csfb_params_resp_cdma2000_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CellChangeOrder ::= SEQUENCE +SRSASN_CODE cell_change_order_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, t304)); + HANDLE_CODE(target_rat_type.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_change_order_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(t304, bref)); + HANDLE_CODE(target_rat_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_change_order_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t304", t304.to_string()); + j.write_fieldname("targetRAT-Type"); + target_rat_type.to_json(j); + j.end_obj(); +} + +void cell_change_order_s::target_rat_type_c_::set(types::options e) +{ + type_ = e; +} +void cell_change_order_s::target_rat_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::geran: + j.write_fieldname("geran"); + j.start_obj(); + j.write_fieldname("physCellId"); + c.pci.to_json(j); + j.write_fieldname("carrierFreq"); + c.carrier_freq.to_json(j); + if (c.network_ctrl_order_present) { + j.write_str("networkControlOrder", c.network_ctrl_order.to_string()); + } + if (c.sys_info_present) { + j.write_fieldname("systemInformation"); + c.sys_info.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cell_change_order_s::target_rat_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE cell_change_order_s::target_rat_type_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::geran: + HANDLE_CODE(bref.pack(c.network_ctrl_order_present, 1)); + HANDLE_CODE(bref.pack(c.sys_info_present, 1)); + HANDLE_CODE(c.pci.pack(bref)); + HANDLE_CODE(c.carrier_freq.pack(bref)); + if (c.network_ctrl_order_present) { + HANDLE_CODE(c.network_ctrl_order.pack(bref)); + } + if (c.sys_info_present) { + HANDLE_CODE(c.sys_info.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cell_change_order_s::target_rat_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_change_order_s::target_rat_type_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::geran: + HANDLE_CODE(bref.unpack(c.network_ctrl_order_present, 1)); + HANDLE_CODE(bref.unpack(c.sys_info_present, 1)); + HANDLE_CODE(c.pci.unpack(bref)); + HANDLE_CODE(c.carrier_freq.unpack(bref)); + if (c.network_ctrl_order_present) { + HANDLE_CODE(c.network_ctrl_order.unpack(bref)); + } + if (c.sys_info_present) { + HANDLE_CODE(c.sys_info.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "cell_change_order_s::target_rat_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cell_change_order_s::target_rat_type_c_::geran_s_::geran_s_() +{ + network_ctrl_order_present = false; + sys_info_present = false; +} + +// CounterCheck-v8a0-IEs ::= SEQUENCE +counter_check_v8a0_ies_s::counter_check_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE counter_check_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void counter_check_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// DLInformationTransfer-v8a0-IEs ::= SEQUENCE +dl_info_transfer_v8a0_ies_s::dl_info_transfer_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE dl_info_transfer_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// E-CSFB-r9 ::= SEQUENCE +e_csfb_r9_s::e_csfb_r9_s() +{ + msg_cont_cdma2000_minus1_xrtt_r9_present = false; + mob_cdma2000_hrpd_r9_present = false; + msg_cont_cdma2000_hrpd_r9_present = false; + redirect_carrier_cdma2000_hrpd_r9_present = false; +} +SRSASN_CODE e_csfb_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(msg_cont_cdma2000_minus1_xrtt_r9_present, 1)); + HANDLE_CODE(bref.pack(mob_cdma2000_hrpd_r9_present, 1)); + HANDLE_CODE(bref.pack(msg_cont_cdma2000_hrpd_r9_present, 1)); + HANDLE_CODE(bref.pack(redirect_carrier_cdma2000_hrpd_r9_present, 1)); + + if (msg_cont_cdma2000_minus1_xrtt_r9_present) { + HANDLE_CODE(msg_cont_cdma2000_minus1_xrtt_r9.pack(bref)); + } + if (mob_cdma2000_hrpd_r9_present) { + HANDLE_CODE(pack_enum(bref, mob_cdma2000_hrpd_r9)); + } + if (msg_cont_cdma2000_hrpd_r9_present) { + HANDLE_CODE(msg_cont_cdma2000_hrpd_r9.pack(bref)); + } + if (redirect_carrier_cdma2000_hrpd_r9_present) { + HANDLE_CODE(redirect_carrier_cdma2000_hrpd_r9.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE e_csfb_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(msg_cont_cdma2000_minus1_xrtt_r9_present, 1)); + HANDLE_CODE(bref.unpack(mob_cdma2000_hrpd_r9_present, 1)); + HANDLE_CODE(bref.unpack(msg_cont_cdma2000_hrpd_r9_present, 1)); + HANDLE_CODE(bref.unpack(redirect_carrier_cdma2000_hrpd_r9_present, 1)); + + if (msg_cont_cdma2000_minus1_xrtt_r9_present) { + HANDLE_CODE(msg_cont_cdma2000_minus1_xrtt_r9.unpack(bref)); + } + if (mob_cdma2000_hrpd_r9_present) { + HANDLE_CODE(unpack_enum(mob_cdma2000_hrpd_r9, bref)); + } + if (msg_cont_cdma2000_hrpd_r9_present) { + HANDLE_CODE(msg_cont_cdma2000_hrpd_r9.unpack(bref)); + } + if (redirect_carrier_cdma2000_hrpd_r9_present) { + HANDLE_CODE(redirect_carrier_cdma2000_hrpd_r9.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void e_csfb_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (msg_cont_cdma2000_minus1_xrtt_r9_present) { + j.write_str("messageContCDMA2000-1XRTT-r9", msg_cont_cdma2000_minus1_xrtt_r9.to_string()); + } + if (mob_cdma2000_hrpd_r9_present) { + j.write_str("mobilityCDMA2000-HRPD-r9", mob_cdma2000_hrpd_r9.to_string()); + } + if (msg_cont_cdma2000_hrpd_r9_present) { + j.write_str("messageContCDMA2000-HRPD-r9", msg_cont_cdma2000_hrpd_r9.to_string()); + } + if (redirect_carrier_cdma2000_hrpd_r9_present) { + j.write_fieldname("redirectCarrierCDMA2000-HRPD-r9"); + redirect_carrier_cdma2000_hrpd_r9.to_json(j); + } + j.end_obj(); +} + +// Handover ::= SEQUENCE +ho_s::ho_s() +{ + nas_security_param_from_eutra_present = false; + sys_info_present = false; +} +SRSASN_CODE ho_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nas_security_param_from_eutra_present, 1)); + HANDLE_CODE(bref.pack(sys_info_present, 1)); + + HANDLE_CODE(pack_enum(bref, target_rat_type)); + HANDLE_CODE(target_rat_msg_container.pack(bref)); + if (nas_security_param_from_eutra_present) { + HANDLE_CODE(nas_security_param_from_eutra.pack(bref)); + } + if (sys_info_present) { + HANDLE_CODE(sys_info.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nas_security_param_from_eutra_present, 1)); + HANDLE_CODE(bref.unpack(sys_info_present, 1)); + + HANDLE_CODE(unpack_enum(target_rat_type, bref)); + HANDLE_CODE(target_rat_msg_container.unpack(bref)); + if (nas_security_param_from_eutra_present) { + HANDLE_CODE(nas_security_param_from_eutra.unpack(bref)); + } + if (sys_info_present) { + HANDLE_CODE(sys_info.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_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_eutra_present) { + j.write_str("nas-SecurityParamFromEUTRA", nas_security_param_from_eutra.to_string()); + } + if (sys_info_present) { + j.write_fieldname("systemInformation"); + sys_info.to_json(j); + } + j.end_obj(); +} + +// HandoverFromEUTRAPreparationRequest-v890-IEs ::= SEQUENCE +ho_from_eutra_prep_request_v890_ies_s::ho_from_eutra_prep_request_v890_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_from_eutra_prep_request_v890_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_v890_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_from_eutra_prep_request_v890_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LoggedMeasurementConfiguration-v1080-IEs ::= SEQUENCE +logged_meas_cfg_v1080_ies_s::logged_meas_cfg_v1080_ies_s() +{ + late_non_crit_ext_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE logged_meas_cfg_v1080_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_r10_present) { + HANDLE_CODE(late_non_crit_ext_r10.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_v1080_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_r10_present) { + HANDLE_CODE(late_non_crit_ext_r10.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_v1080_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_r10_present) { + j.write_str("lateNonCriticalExtension-r10", late_non_crit_ext_r10.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MeasConfig ::= SEQUENCE +meas_cfg_s::meas_cfg_s() +{ + ext = false; + meas_obj_to_rem_list_present = false; + meas_obj_to_add_mod_list_present = false; + report_cfg_to_rem_list_present = false; + report_cfg_to_add_mod_list_present = false; + meas_id_to_rem_list_present = false; + meas_id_to_add_mod_list_present = false; + quant_cfg_present = false; + meas_gap_cfg_present = false; + s_measure_present = false; + pre_regist_info_hrpd_present = false; + speed_state_pars_present = false; + meas_obj_to_add_mod_list_v9e0_present = false; + allow_interruptions_r11_present = false; + meas_scale_factor_r12_present = false; + meas_id_to_rem_list_ext_r12_present = false; + meas_id_to_add_mod_list_ext_r12_present = false; + meas_rsrq_on_all_symbols_r12_present = false; + meas_obj_to_rem_list_ext_r13_present = false; + meas_obj_to_add_mod_list_ext_r13_present = false; + meas_id_to_add_mod_list_v1310_present = false; + meas_id_to_add_mod_list_ext_v1310_present = false; + meas_gap_cfg_per_cc_list_r14_present = false; + meas_gap_sharing_cfg_r14_present = false; + fr1_gap_r15_present = false; + mgta_r15_present = false; + meas_gap_cfg_dense_prs_r15_present = false; + height_thresh_ref_r15_present = false; +} +SRSASN_CODE meas_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_obj_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_rem_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.pack(s_measure_present, 1)); + HANDLE_CODE(bref.pack(pre_regist_info_hrpd_present, 1)); + HANDLE_CODE(bref.pack(speed_state_pars_present, 1)); + + if (meas_obj_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (meas_obj_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_add_mod_list, 1, 32)); + } + if (report_cfg_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (report_cfg_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_add_mod_list, 1, 32)); + } + if (meas_id_to_rem_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_to_rem_list, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (meas_id_to_add_mod_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_to_add_mod_list, 1, 32)); + } + if (quant_cfg_present) { + HANDLE_CODE(quant_cfg.pack(bref)); + } + if (meas_gap_cfg_present) { + HANDLE_CODE(meas_gap_cfg.pack(bref)); + } + if (s_measure_present) { + HANDLE_CODE(pack_unalign_integer(bref, s_measure, (uint8_t)0, (uint8_t)97)); + } + if (pre_regist_info_hrpd_present) { + HANDLE_CODE(pre_regist_info_hrpd.pack(bref)); + } + if (speed_state_pars_present) { + HANDLE_CODE(speed_state_pars.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(7); + rrc_asn1_warn_assert(meas_obj_to_add_mod_list_v9e0_present != (meas_obj_to_add_mod_list_v9e0.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= meas_obj_to_add_mod_list_v9e0_present; + group_flags[1] |= allow_interruptions_r11_present; + rrc_asn1_warn_assert(meas_scale_factor_r12_present != (meas_scale_factor_r12.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= meas_scale_factor_r12_present; + rrc_asn1_warn_assert(meas_id_to_rem_list_ext_r12_present != (meas_id_to_rem_list_ext_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= meas_id_to_rem_list_ext_r12_present; + rrc_asn1_warn_assert(meas_id_to_add_mod_list_ext_r12_present != (meas_id_to_add_mod_list_ext_r12.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= meas_id_to_add_mod_list_ext_r12_present; + group_flags[2] |= meas_rsrq_on_all_symbols_r12_present; + rrc_asn1_warn_assert(meas_obj_to_rem_list_ext_r13_present != (meas_obj_to_rem_list_ext_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= meas_obj_to_rem_list_ext_r13_present; + rrc_asn1_warn_assert(meas_obj_to_add_mod_list_ext_r13_present != (meas_obj_to_add_mod_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= meas_obj_to_add_mod_list_ext_r13_present; + rrc_asn1_warn_assert(meas_id_to_add_mod_list_v1310_present != (meas_id_to_add_mod_list_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= meas_id_to_add_mod_list_v1310_present; + rrc_asn1_warn_assert(meas_id_to_add_mod_list_ext_v1310_present != (meas_id_to_add_mod_list_ext_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= meas_id_to_add_mod_list_ext_v1310_present; + rrc_asn1_warn_assert(meas_gap_cfg_per_cc_list_r14_present != (meas_gap_cfg_per_cc_list_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= meas_gap_cfg_per_cc_list_r14_present; + rrc_asn1_warn_assert(meas_gap_sharing_cfg_r14_present != (meas_gap_sharing_cfg_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= meas_gap_sharing_cfg_r14_present; + group_flags[5] |= fr1_gap_r15_present; + group_flags[5] |= mgta_r15_present; + rrc_asn1_warn_assert(meas_gap_cfg_dense_prs_r15_present != (meas_gap_cfg_dense_prs_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= meas_gap_cfg_dense_prs_r15_present; + rrc_asn1_warn_assert(height_thresh_ref_r15_present != (height_thresh_ref_r15.get() != NULL), __FILE__, __LINE__); + group_flags[6] |= height_thresh_ref_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_v9e0_present, 1)); + if (meas_obj_to_add_mod_list_v9e0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_obj_to_add_mod_list_v9e0, 1, 32)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(allow_interruptions_r11_present, 1)); + if (allow_interruptions_r11_present) { + HANDLE_CODE(bref.pack(allow_interruptions_r11, 1)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_scale_factor_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_rem_list_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_rsrq_on_all_symbols_r12_present, 1)); + if (meas_scale_factor_r12_present) { + HANDLE_CODE(meas_scale_factor_r12->pack(bref)); + } + if (meas_id_to_rem_list_ext_r12_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *meas_id_to_rem_list_ext_r12, 1, 32, UnalignedIntegerPacker(33, 64))); + } + if (meas_id_to_add_mod_list_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_id_to_add_mod_list_ext_r12, 1, 32)); + } + if (meas_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(bref.pack(meas_rsrq_on_all_symbols_r12, 1)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_obj_to_rem_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_v1310_present, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list_ext_v1310_present, 1)); + if (meas_obj_to_rem_list_ext_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *meas_obj_to_rem_list_ext_r13, 1, 32, UnalignedIntegerPacker(33, 64))); + } + if (meas_obj_to_add_mod_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_obj_to_add_mod_list_ext_r13, 1, 32)); + } + if (meas_id_to_add_mod_list_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_id_to_add_mod_list_v1310, 1, 32)); + } + if (meas_id_to_add_mod_list_ext_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_id_to_add_mod_list_ext_v1310, 1, 32)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_gap_cfg_per_cc_list_r14_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_sharing_cfg_r14_present, 1)); + if (meas_gap_cfg_per_cc_list_r14_present) { + HANDLE_CODE(meas_gap_cfg_per_cc_list_r14->pack(bref)); + } + if (meas_gap_sharing_cfg_r14_present) { + HANDLE_CODE(meas_gap_sharing_cfg_r14->pack(bref)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(fr1_gap_r15_present, 1)); + HANDLE_CODE(bref.pack(mgta_r15_present, 1)); + if (fr1_gap_r15_present) { + HANDLE_CODE(bref.pack(fr1_gap_r15, 1)); + } + if (mgta_r15_present) { + HANDLE_CODE(bref.pack(mgta_r15, 1)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_gap_cfg_dense_prs_r15_present, 1)); + HANDLE_CODE(bref.pack(height_thresh_ref_r15_present, 1)); + if (meas_gap_cfg_dense_prs_r15_present) { + HANDLE_CODE(meas_gap_cfg_dense_prs_r15->pack(bref)); + } + if (height_thresh_ref_r15_present) { + HANDLE_CODE(height_thresh_ref_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_obj_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(report_cfg_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(report_cfg_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_rem_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.unpack(s_measure_present, 1)); + HANDLE_CODE(bref.unpack(pre_regist_info_hrpd_present, 1)); + HANDLE_CODE(bref.unpack(speed_state_pars_present, 1)); + + if (meas_obj_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (meas_obj_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_to_add_mod_list, bref, 1, 32)); + } + if (report_cfg_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(report_cfg_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (report_cfg_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(report_cfg_to_add_mod_list, bref, 1, 32)); + } + if (meas_id_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_to_rem_list, bref, 1, 32, UnalignedIntegerPacker(1, 32))); + } + if (meas_id_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_to_add_mod_list, bref, 1, 32)); + } + if (quant_cfg_present) { + HANDLE_CODE(quant_cfg.unpack(bref)); + } + if (meas_gap_cfg_present) { + HANDLE_CODE(meas_gap_cfg.unpack(bref)); + } + if (s_measure_present) { + HANDLE_CODE(unpack_unalign_integer(s_measure, bref, (uint8_t)0, (uint8_t)97)); + } + if (pre_regist_info_hrpd_present) { + HANDLE_CODE(pre_regist_info_hrpd.unpack(bref)); + } + if (speed_state_pars_present) { + HANDLE_CODE(speed_state_pars.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(7); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_v9e0_present, 1)); + if (meas_obj_to_add_mod_list_v9e0_present) { + meas_obj_to_add_mod_list_v9e0 = make_copy_ptr(meas_obj_to_add_mod_list_v9e0_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_obj_to_add_mod_list_v9e0, bref, 1, 32)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(allow_interruptions_r11_present, 1)); + if (allow_interruptions_r11_present) { + HANDLE_CODE(bref.unpack(allow_interruptions_r11, 1)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_scale_factor_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_rem_list_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_add_mod_list_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_rsrq_on_all_symbols_r12_present, 1)); + if (meas_scale_factor_r12_present) { + meas_scale_factor_r12 = make_copy_ptr(meas_scale_factor_r12_c_()); + HANDLE_CODE(meas_scale_factor_r12->unpack(bref)); + } + if (meas_id_to_rem_list_ext_r12_present) { + meas_id_to_rem_list_ext_r12 = make_copy_ptr(meas_id_to_rem_list_ext_r12_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*meas_id_to_rem_list_ext_r12, bref, 1, 32, UnalignedIntegerPacker(33, 64))); + } + if (meas_id_to_add_mod_list_ext_r12_present) { + meas_id_to_add_mod_list_ext_r12 = make_copy_ptr(meas_id_to_add_mod_list_ext_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_id_to_add_mod_list_ext_r12, bref, 1, 32)); + } + if (meas_rsrq_on_all_symbols_r12_present) { + HANDLE_CODE(bref.unpack(meas_rsrq_on_all_symbols_r12, 1)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_obj_to_rem_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_add_mod_list_v1310_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_to_add_mod_list_ext_v1310_present, 1)); + if (meas_obj_to_rem_list_ext_r13_present) { + meas_obj_to_rem_list_ext_r13 = make_copy_ptr(meas_obj_to_rem_list_ext_r13_l()); + HANDLE_CODE( + unpack_dyn_seq_of(*meas_obj_to_rem_list_ext_r13, bref, 1, 32, UnalignedIntegerPacker(33, 64))); + } + if (meas_obj_to_add_mod_list_ext_r13_present) { + meas_obj_to_add_mod_list_ext_r13 = make_copy_ptr(meas_obj_to_add_mod_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_obj_to_add_mod_list_ext_r13, bref, 1, 32)); + } + if (meas_id_to_add_mod_list_v1310_present) { + meas_id_to_add_mod_list_v1310 = make_copy_ptr(meas_id_to_add_mod_list_v1310_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_id_to_add_mod_list_v1310, bref, 1, 32)); + } + if (meas_id_to_add_mod_list_ext_v1310_present) { + meas_id_to_add_mod_list_ext_v1310 = make_copy_ptr(meas_id_to_add_mod_list_ext_v1310_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_id_to_add_mod_list_ext_v1310, bref, 1, 32)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_gap_cfg_per_cc_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_sharing_cfg_r14_present, 1)); + if (meas_gap_cfg_per_cc_list_r14_present) { + meas_gap_cfg_per_cc_list_r14 = make_copy_ptr(meas_gap_cfg_per_cc_list_r14_c()); + HANDLE_CODE(meas_gap_cfg_per_cc_list_r14->unpack(bref)); + } + if (meas_gap_sharing_cfg_r14_present) { + meas_gap_sharing_cfg_r14 = make_copy_ptr(meas_gap_sharing_cfg_r14_c()); + HANDLE_CODE(meas_gap_sharing_cfg_r14->unpack(bref)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(fr1_gap_r15_present, 1)); + HANDLE_CODE(bref.unpack(mgta_r15_present, 1)); + if (fr1_gap_r15_present) { + HANDLE_CODE(bref.unpack(fr1_gap_r15, 1)); + } + if (mgta_r15_present) { + HANDLE_CODE(bref.unpack(mgta_r15, 1)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_gap_cfg_dense_prs_r15_present, 1)); + HANDLE_CODE(bref.unpack(height_thresh_ref_r15_present, 1)); + if (meas_gap_cfg_dense_prs_r15_present) { + meas_gap_cfg_dense_prs_r15 = make_copy_ptr(meas_gap_cfg_dense_prs_r15_c()); + HANDLE_CODE(meas_gap_cfg_dense_prs_r15->unpack(bref)); + } + if (height_thresh_ref_r15_present) { + height_thresh_ref_r15 = make_copy_ptr(height_thresh_ref_r15_c_()); + HANDLE_CODE(height_thresh_ref_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_obj_to_rem_list_present) { + j.start_array("measObjectToRemoveList"); + for (uint32_t i1 = 0; i1 < meas_obj_to_rem_list.size(); ++i1) { + j.write_int(meas_obj_to_rem_list[i1]); + } + j.end_array(); + } + if (meas_obj_to_add_mod_list_present) { + j.start_array("measObjectToAddModList"); + for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list.size(); ++i1) { + meas_obj_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (report_cfg_to_rem_list_present) { + j.start_array("reportConfigToRemoveList"); + for (uint32_t i1 = 0; i1 < report_cfg_to_rem_list.size(); ++i1) { + j.write_int(report_cfg_to_rem_list[i1]); + } + j.end_array(); + } + if (report_cfg_to_add_mod_list_present) { + j.start_array("reportConfigToAddModList"); + for (uint32_t i1 = 0; i1 < report_cfg_to_add_mod_list.size(); ++i1) { + report_cfg_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + if (meas_id_to_rem_list_present) { + j.start_array("measIdToRemoveList"); + for (uint32_t i1 = 0; i1 < meas_id_to_rem_list.size(); ++i1) { + j.write_int(meas_id_to_rem_list[i1]); + } + j.end_array(); + } + if (meas_id_to_add_mod_list_present) { + j.start_array("measIdToAddModList"); + for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list.size(); ++i1) { + meas_id_to_add_mod_list[i1].to_json(j); + } + j.end_array(); + } + 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 (s_measure_present) { + j.write_int("s-Measure", s_measure); + } + if (pre_regist_info_hrpd_present) { + j.write_fieldname("preRegistrationInfoHRPD"); + pre_regist_info_hrpd.to_json(j); + } + if (speed_state_pars_present) { + j.write_fieldname("speedStatePars"); + speed_state_pars.to_json(j); + } + if (meas_obj_to_add_mod_list_v9e0_present) { + j.start_array("measObjectToAddModList-v9e0"); + for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list_v9e0->size(); ++i1) { + ((*meas_obj_to_add_mod_list_v9e0)[i1]).to_json(j); + } + j.end_array(); + } + if (allow_interruptions_r11_present) { + j.write_bool("allowInterruptions-r11", allow_interruptions_r11); + } + if (meas_scale_factor_r12_present) { + j.write_fieldname("measScaleFactor-r12"); + meas_scale_factor_r12->to_json(j); + } + if (meas_id_to_rem_list_ext_r12_present) { + j.start_array("measIdToRemoveListExt-r12"); + for (uint32_t i1 = 0; i1 < meas_id_to_rem_list_ext_r12->size(); ++i1) { + j.write_int(((*meas_id_to_rem_list_ext_r12)[i1])); + } + j.end_array(); + } + if (meas_id_to_add_mod_list_ext_r12_present) { + j.start_array("measIdToAddModListExt-r12"); + for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list_ext_r12->size(); ++i1) { + ((*meas_id_to_add_mod_list_ext_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_rsrq_on_all_symbols_r12_present) { + j.write_bool("measRSRQ-OnAllSymbols-r12", meas_rsrq_on_all_symbols_r12); + } + if (meas_obj_to_rem_list_ext_r13_present) { + j.start_array("measObjectToRemoveListExt-r13"); + for (uint32_t i1 = 0; i1 < meas_obj_to_rem_list_ext_r13->size(); ++i1) { + j.write_int(((*meas_obj_to_rem_list_ext_r13)[i1])); + } + j.end_array(); + } + if (meas_obj_to_add_mod_list_ext_r13_present) { + j.start_array("measObjectToAddModListExt-r13"); + for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list_ext_r13->size(); ++i1) { + ((*meas_obj_to_add_mod_list_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_id_to_add_mod_list_v1310_present) { + j.start_array("measIdToAddModList-v1310"); + for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list_v1310->size(); ++i1) { + ((*meas_id_to_add_mod_list_v1310)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_id_to_add_mod_list_ext_v1310_present) { + j.start_array("measIdToAddModListExt-v1310"); + for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list_ext_v1310->size(); ++i1) { + ((*meas_id_to_add_mod_list_ext_v1310)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_gap_cfg_per_cc_list_r14_present) { + j.write_fieldname("measGapConfigPerCC-List-r14"); + meas_gap_cfg_per_cc_list_r14->to_json(j); + } + if (meas_gap_sharing_cfg_r14_present) { + j.write_fieldname("measGapSharingConfig-r14"); + meas_gap_sharing_cfg_r14->to_json(j); + } + if (fr1_gap_r15_present) { + j.write_bool("fr1-Gap-r15", fr1_gap_r15); + } + if (mgta_r15_present) { + j.write_bool("mgta-r15", mgta_r15); + } + if (meas_gap_cfg_dense_prs_r15_present) { + j.write_fieldname("measGapConfigDensePRS-r15"); + meas_gap_cfg_dense_prs_r15->to_json(j); + } + if (height_thresh_ref_r15_present) { + j.write_fieldname("heightThreshRef-r15"); + height_thresh_ref_r15->to_json(j); + } + j.end_obj(); +} + +void meas_cfg_s::speed_state_pars_c_::set(types::options e) +{ + type_ = e; +} +void meas_cfg_s::speed_state_pars_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("mobilityStateParameters"); + c.mob_state_params.to_json(j); + j.write_fieldname("timeToTrigger-SF"); + c.time_to_trigger_sf.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::speed_state_pars_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_cfg_s::speed_state_pars_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.mob_state_params.pack(bref)); + HANDLE_CODE(c.time_to_trigger_sf.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::speed_state_pars_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_s::speed_state_pars_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.mob_state_params.unpack(bref)); + HANDLE_CODE(c.time_to_trigger_sf.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::speed_state_pars_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_cfg_s::meas_scale_factor_r12_c_::set(types::options e) +{ + type_ = e; +} +void meas_cfg_s::meas_scale_factor_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_str("setup", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::meas_scale_factor_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_cfg_s::meas_scale_factor_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_enum(bref, c)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::meas_scale_factor_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_s::meas_scale_factor_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_enum(c, bref)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::meas_scale_factor_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_cfg_s::height_thresh_ref_r15_c_::set(types::options e) +{ + type_ = e; +} +void meas_cfg_s::height_thresh_ref_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_int("setup", c); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::height_thresh_ref_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_cfg_s::height_thresh_ref_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_unalign_integer(bref, c, (uint8_t)0, (uint8_t)31)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::height_thresh_ref_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_s::height_thresh_ref_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_unalign_integer(c, bref, (uint8_t)0, (uint8_t)31)); + break; + default: + log_invalid_choice_id(type_, "meas_cfg_s::height_thresh_ref_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MobilityControlInfo ::= SEQUENCE +mob_ctrl_info_s::mob_ctrl_info_s() +{ + ext = false; + carrier_freq_present = false; + carrier_bw_present = false; + add_spec_emission_present = false; + rach_cfg_ded_present = false; + carrier_freq_v9e0_present = false; + drb_continue_rohc_r11_present = false; + mob_ctrl_info_v2x_r14_present = false; + ho_without_wt_change_r14_present = false; + make_before_break_r14_present = false; + rach_skip_r14_present = false; + same_sfn_ind_r14_present = false; + mib_repeat_status_r14_present = false; + sched_info_sib1_br_r14_present = false; +} +SRSASN_CODE mob_ctrl_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_freq_present, 1)); + HANDLE_CODE(bref.pack(carrier_bw_present, 1)); + HANDLE_CODE(bref.pack(add_spec_emission_present, 1)); + HANDLE_CODE(bref.pack(rach_cfg_ded_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, target_pci, (uint16_t)0, (uint16_t)503)); + if (carrier_freq_present) { + HANDLE_CODE(carrier_freq.pack(bref)); + } + if (carrier_bw_present) { + HANDLE_CODE(carrier_bw.pack(bref)); + } + if (add_spec_emission_present) { + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission, (uint8_t)1, (uint8_t)32)); + } + HANDLE_CODE(pack_enum(bref, t304)); + HANDLE_CODE(new_ue_id.pack(bref)); + HANDLE_CODE(rr_cfg_common.pack(bref)); + if (rach_cfg_ded_present) { + HANDLE_CODE(rach_cfg_ded.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + rrc_asn1_warn_assert(carrier_freq_v9e0_present != (carrier_freq_v9e0.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= carrier_freq_v9e0_present; + group_flags[1] |= drb_continue_rohc_r11_present; + rrc_asn1_warn_assert(mob_ctrl_info_v2x_r14_present != (mob_ctrl_info_v2x_r14.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= mob_ctrl_info_v2x_r14_present; + group_flags[2] |= ho_without_wt_change_r14_present; + group_flags[2] |= make_before_break_r14_present; + rrc_asn1_warn_assert(rach_skip_r14_present != (rach_skip_r14.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= rach_skip_r14_present; + group_flags[2] |= same_sfn_ind_r14_present; + group_flags[3] |= mib_repeat_status_r14_present; + group_flags[3] |= sched_info_sib1_br_r14_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(carrier_freq_v9e0_present, 1)); + if (carrier_freq_v9e0_present) { + HANDLE_CODE(carrier_freq_v9e0->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(drb_continue_rohc_r11_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mob_ctrl_info_v2x_r14_present, 1)); + HANDLE_CODE(bref.pack(ho_without_wt_change_r14_present, 1)); + HANDLE_CODE(bref.pack(make_before_break_r14_present, 1)); + HANDLE_CODE(bref.pack(rach_skip_r14_present, 1)); + HANDLE_CODE(bref.pack(same_sfn_ind_r14_present, 1)); + if (mob_ctrl_info_v2x_r14_present) { + HANDLE_CODE(mob_ctrl_info_v2x_r14->pack(bref)); + } + if (ho_without_wt_change_r14_present) { + HANDLE_CODE(pack_enum(bref, ho_without_wt_change_r14)); + } + if (rach_skip_r14_present) { + HANDLE_CODE(rach_skip_r14->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mib_repeat_status_r14_present, 1)); + HANDLE_CODE(bref.pack(sched_info_sib1_br_r14_present, 1)); + if (mib_repeat_status_r14_present) { + HANDLE_CODE(bref.pack(mib_repeat_status_r14, 1)); + } + if (sched_info_sib1_br_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sched_info_sib1_br_r14, (uint8_t)0, (uint8_t)31)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_ctrl_info_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(carrier_freq_present, 1)); + HANDLE_CODE(bref.unpack(carrier_bw_present, 1)); + HANDLE_CODE(bref.unpack(add_spec_emission_present, 1)); + HANDLE_CODE(bref.unpack(rach_cfg_ded_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(target_pci, bref, (uint16_t)0, (uint16_t)503)); + if (carrier_freq_present) { + HANDLE_CODE(carrier_freq.unpack(bref)); + } + if (carrier_bw_present) { + HANDLE_CODE(carrier_bw.unpack(bref)); + } + if (add_spec_emission_present) { + HANDLE_CODE(unpack_unalign_integer(add_spec_emission, bref, (uint8_t)1, (uint8_t)32)); + } + HANDLE_CODE(unpack_enum(t304, bref)); + HANDLE_CODE(new_ue_id.unpack(bref)); + HANDLE_CODE(rr_cfg_common.unpack(bref)); + if (rach_cfg_ded_present) { + HANDLE_CODE(rach_cfg_ded.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(carrier_freq_v9e0_present, 1)); + if (carrier_freq_v9e0_present) { + carrier_freq_v9e0 = make_copy_ptr(carrier_freq_eutra_v9e0_s()); + HANDLE_CODE(carrier_freq_v9e0->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(drb_continue_rohc_r11_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mob_ctrl_info_v2x_r14_present, 1)); + HANDLE_CODE(bref.unpack(ho_without_wt_change_r14_present, 1)); + HANDLE_CODE(bref.unpack(make_before_break_r14_present, 1)); + HANDLE_CODE(bref.unpack(rach_skip_r14_present, 1)); + HANDLE_CODE(bref.unpack(same_sfn_ind_r14_present, 1)); + if (mob_ctrl_info_v2x_r14_present) { + mob_ctrl_info_v2x_r14 = make_copy_ptr(mob_ctrl_info_v2x_r14_s()); + HANDLE_CODE(mob_ctrl_info_v2x_r14->unpack(bref)); + } + if (ho_without_wt_change_r14_present) { + HANDLE_CODE(unpack_enum(ho_without_wt_change_r14, bref)); + } + if (rach_skip_r14_present) { + rach_skip_r14 = make_copy_ptr(rach_skip_r14_s()); + HANDLE_CODE(rach_skip_r14->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mib_repeat_status_r14_present, 1)); + HANDLE_CODE(bref.unpack(sched_info_sib1_br_r14_present, 1)); + if (mib_repeat_status_r14_present) { + HANDLE_CODE(bref.unpack(mib_repeat_status_r14, 1)); + } + if (sched_info_sib1_br_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sched_info_sib1_br_r14, bref, (uint8_t)0, (uint8_t)31)); + } + } + } + return SRSASN_SUCCESS; +} +void mob_ctrl_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("targetPhysCellId", target_pci); + if (carrier_freq_present) { + j.write_fieldname("carrierFreq"); + carrier_freq.to_json(j); + } + if (carrier_bw_present) { + j.write_fieldname("carrierBandwidth"); + carrier_bw.to_json(j); + } + if (add_spec_emission_present) { + j.write_int("additionalSpectrumEmission", add_spec_emission); + } + j.write_str("t304", t304.to_string()); + j.write_str("newUE-Identity", new_ue_id.to_string()); + j.write_fieldname("radioResourceConfigCommon"); + rr_cfg_common.to_json(j); + if (rach_cfg_ded_present) { + j.write_fieldname("rach-ConfigDedicated"); + rach_cfg_ded.to_json(j); + } + if (carrier_freq_v9e0_present) { + j.write_fieldname("carrierFreq-v9e0"); + carrier_freq_v9e0->to_json(j); + } + if (drb_continue_rohc_r11_present) { + j.write_str("drb-ContinueROHC-r11", "true"); + } + if (mob_ctrl_info_v2x_r14_present) { + j.write_fieldname("mobilityControlInfoV2X-r14"); + mob_ctrl_info_v2x_r14->to_json(j); + } + if (ho_without_wt_change_r14_present) { + j.write_str("handoverWithoutWT-Change-r14", ho_without_wt_change_r14.to_string()); + } + if (make_before_break_r14_present) { + j.write_str("makeBeforeBreak-r14", "true"); + } + if (rach_skip_r14_present) { + j.write_fieldname("rach-Skip-r14"); + rach_skip_r14->to_json(j); + } + if (same_sfn_ind_r14_present) { + j.write_str("sameSFN-Indication-r14", "true"); + } + if (mib_repeat_status_r14_present) { + j.write_bool("mib-RepetitionStatus-r14", mib_repeat_status_r14); + } + if (sched_info_sib1_br_r14_present) { + j.write_int("schedulingInfoSIB1-BR-r14", sched_info_sib1_br_r14); + } + j.end_obj(); +} + +// MobilityFromEUTRACommand-v8a0-IEs ::= SEQUENCE +mob_from_eutra_cmd_v8a0_ies_s::mob_from_eutra_cmd_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MobilityFromEUTRACommand-v930-IEs ::= SEQUENCE +mob_from_eutra_cmd_v930_ies_s::mob_from_eutra_cmd_v930_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_v930_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_v930_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_v930_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RN-SubframeConfig-r10 ::= SEQUENCE +rn_sf_cfg_r10_s::rn_sf_cfg_r10_s() +{ + ext = false; + sf_cfg_pattern_r10_present = false; + rpdcch_cfg_r10_present = false; +} +SRSASN_CODE rn_sf_cfg_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sf_cfg_pattern_r10_present, 1)); + HANDLE_CODE(bref.pack(rpdcch_cfg_r10_present, 1)); + + if (sf_cfg_pattern_r10_present) { + HANDLE_CODE(sf_cfg_pattern_r10.pack(bref)); + } + if (rpdcch_cfg_r10_present) { + bref.pack(rpdcch_cfg_r10.ext, 1); + HANDLE_CODE(pack_enum(bref, rpdcch_cfg_r10.res_alloc_type_r10)); + HANDLE_CODE(rpdcch_cfg_r10.res_block_assign_r10.pack(bref)); + HANDLE_CODE(rpdcch_cfg_r10.demod_rs_r10.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, rpdcch_cfg_r10.pdsch_start_r10, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(rpdcch_cfg_r10.pucch_cfg_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sf_cfg_pattern_r10_present, 1)); + HANDLE_CODE(bref.unpack(rpdcch_cfg_r10_present, 1)); + + if (sf_cfg_pattern_r10_present) { + HANDLE_CODE(sf_cfg_pattern_r10.unpack(bref)); + } + if (rpdcch_cfg_r10_present) { + bref.unpack(rpdcch_cfg_r10.ext, 1); + HANDLE_CODE(unpack_enum(rpdcch_cfg_r10.res_alloc_type_r10, bref)); + HANDLE_CODE(rpdcch_cfg_r10.res_block_assign_r10.unpack(bref)); + HANDLE_CODE(rpdcch_cfg_r10.demod_rs_r10.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(rpdcch_cfg_r10.pdsch_start_r10, bref, (uint8_t)1, (uint8_t)3)); + HANDLE_CODE(rpdcch_cfg_r10.pucch_cfg_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rn_sf_cfg_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sf_cfg_pattern_r10_present) { + j.write_fieldname("subframeConfigPattern-r10"); + sf_cfg_pattern_r10.to_json(j); + } + if (rpdcch_cfg_r10_present) { + j.write_fieldname("rpdcch-Config-r10"); + j.start_obj(); + j.write_str("resourceAllocationType-r10", rpdcch_cfg_r10.res_alloc_type_r10.to_string()); + j.write_fieldname("resourceBlockAssignment-r10"); + rpdcch_cfg_r10.res_block_assign_r10.to_json(j); + j.write_fieldname("demodulationRS-r10"); + rpdcch_cfg_r10.demod_rs_r10.to_json(j); + j.write_int("pdsch-Start-r10", rpdcch_cfg_r10.pdsch_start_r10); + j.write_fieldname("pucch-Config-r10"); + rpdcch_cfg_r10.pucch_cfg_r10.to_json(j); + j.end_obj(); + } + j.end_obj(); +} + +void rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::destroy_() +{ + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + c.destroy >(); + break; + default: + break; + } +} +void rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + c.init >(); + break; + case types::sf_cfg_pattern_tdd_r10: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_"); + } +} +rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::sf_cfg_pattern_r10_c_(const rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + c.init(other.c.get >()); + break; + case types::sf_cfg_pattern_tdd_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_"); + } +} +rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_& rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_:: + operator=(const rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + c.set(other.c.get >()); + break; + case types::sf_cfg_pattern_tdd_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + j.write_str("subframeConfigPatternFDD-r10", c.get >().to_string()); + break; + case types::sf_cfg_pattern_tdd_r10: + j.write_int("subframeConfigPatternTDD-r10", c.get()); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_cfg_pattern_tdd_r10: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)31)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf_cfg_pattern_fdd_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_cfg_pattern_tdd_r10: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)31)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::rpdcch_cfg_r10_s_() +{ + ext = false; +} + +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::destroy_() +{ + switch (type_) { + case types::type01_r10: + c.destroy(); + break; + case types::type2_r10: + c.destroy(); + break; + default: + break; + } +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::type01_r10: + c.init(); + break; + case types::type2_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::res_block_assign_r10_c_( + const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::type01_r10: + c.init(other.c.get()); + break; + case types::type2_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_& +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_:: +operator=(const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::type01_r10: + c.set(other.c.get()); + break; + case types::type2_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::type01_r10: + j.write_fieldname("type01-r10"); + c.get().to_json(j); + break; + case types::type2_r10: + j.write_fieldname("type2-r10"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::type01_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::type2_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::type01_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::type2_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::destroy_() +{ + switch (type_) { + case types::nrb6_r10: + c.destroy >(); + break; + case types::nrb15_r10: + c.destroy >(); + break; + case types::nrb25_r10: + c.destroy >(); + break; + case types::nrb50_r10: + c.destroy >(); + break; + case types::nrb75_r10: + c.destroy >(); + break; + case types::nrb100_r10: + c.destroy >(); + break; + default: + break; + } +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nrb6_r10: + c.init >(); + break; + case types::nrb15_r10: + c.init >(); + break; + case types::nrb25_r10: + c.init >(); + break; + case types::nrb50_r10: + c.init >(); + break; + case types::nrb75_r10: + c.init >(); + break; + case types::nrb100_r10: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::type01_r10_c_( + const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nrb6_r10: + c.init(other.c.get >()); + break; + case types::nrb15_r10: + c.init(other.c.get >()); + break; + case types::nrb25_r10: + c.init(other.c.get >()); + break; + case types::nrb50_r10: + c.init(other.c.get >()); + break; + case types::nrb75_r10: + c.init(other.c.get >()); + break; + case types::nrb100_r10: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_& +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_:: +operator=(const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nrb6_r10: + c.set(other.c.get >()); + break; + case types::nrb15_r10: + c.set(other.c.get >()); + break; + case types::nrb25_r10: + c.set(other.c.get >()); + break; + case types::nrb50_r10: + c.set(other.c.get >()); + break; + case types::nrb75_r10: + c.set(other.c.get >()); + break; + case types::nrb100_r10: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nrb6_r10: + j.write_str("nrb6-r10", c.get >().to_string()); + break; + case types::nrb15_r10: + j.write_str("nrb15-r10", c.get >().to_string()); + break; + case types::nrb25_r10: + j.write_str("nrb25-r10", c.get >().to_string()); + break; + case types::nrb50_r10: + j.write_str("nrb50-r10", c.get >().to_string()); + break; + case types::nrb75_r10: + j.write_str("nrb75-r10", c.get >().to_string()); + break; + case types::nrb100_r10: + j.write_str("nrb100-r10", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::nrb6_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb15_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb25_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb50_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb75_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb100_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::nrb6_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb15_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb25_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb50_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb75_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb100_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::destroy_() +{ + switch (type_) { + case types::nrb6_r10: + c.destroy >(); + break; + case types::nrb15_r10: + c.destroy >(); + break; + case types::nrb25_r10: + c.destroy >(); + break; + case types::nrb50_r10: + c.destroy >(); + break; + case types::nrb75_r10: + c.destroy >(); + break; + case types::nrb100_r10: + c.destroy >(); + break; + default: + break; + } +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nrb6_r10: + c.init >(); + break; + case types::nrb15_r10: + c.init >(); + break; + case types::nrb25_r10: + c.init >(); + break; + case types::nrb50_r10: + c.init >(); + break; + case types::nrb75_r10: + c.init >(); + break; + case types::nrb100_r10: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::type2_r10_c_( + const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nrb6_r10: + c.init(other.c.get >()); + break; + case types::nrb15_r10: + c.init(other.c.get >()); + break; + case types::nrb25_r10: + c.init(other.c.get >()); + break; + case types::nrb50_r10: + c.init(other.c.get >()); + break; + case types::nrb75_r10: + c.init(other.c.get >()); + break; + case types::nrb100_r10: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_& +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_:: +operator=(const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nrb6_r10: + c.set(other.c.get >()); + break; + case types::nrb15_r10: + c.set(other.c.get >()); + break; + case types::nrb25_r10: + c.set(other.c.get >()); + break; + case types::nrb50_r10: + c.set(other.c.get >()); + break; + case types::nrb75_r10: + c.set(other.c.get >()); + break; + case types::nrb100_r10: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nrb6_r10: + j.write_str("nrb6-r10", c.get >().to_string()); + break; + case types::nrb15_r10: + j.write_str("nrb15-r10", c.get >().to_string()); + break; + case types::nrb25_r10: + j.write_str("nrb25-r10", c.get >().to_string()); + break; + case types::nrb50_r10: + j.write_str("nrb50-r10", c.get >().to_string()); + break; + case types::nrb75_r10: + j.write_str("nrb75-r10", c.get >().to_string()); + break; + case types::nrb100_r10: + j.write_str("nrb100-r10", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::nrb6_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb15_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb25_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb50_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb75_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::nrb100_r10: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::nrb6_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb15_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb25_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb50_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb75_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::nrb100_r10: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::destroy_() {} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::demod_rs_r10_c_( + const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interleaving_r10: + break; + case types::no_interleaving_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_& rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_:: + operator=(const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interleaving_r10: + break; + case types::no_interleaving_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interleaving_r10: + break; + case types::no_interleaving_r10: + j.write_str("noInterleaving-r10", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interleaving_r10: + break; + case types::no_interleaving_r10: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interleaving_r10: + break; + case types::no_interleaving_r10: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::destroy_() +{ + switch (type_) { + case types::tdd: + c.destroy(); + break; + case types::fdd: + c.destroy(); + break; + default: + break; + } +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::tdd: + c.init(); + break; + case types::fdd: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::pucch_cfg_r10_c_( + const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::tdd: + c.init(other.c.get()); + break; + case types::fdd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_& rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_:: + operator=(const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::tdd: + c.set(other.c.get()); + break; + case types::fdd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::tdd: + j.write_fieldname("tdd"); + c.get().to_json(j); + break; + case types::fdd: + j.write_fieldname("fdd"); + j.start_obj(); + j.write_int("n1PUCCH-AN-P0-r10", c.get().n1_pucch_an_p0_r10); + if (c.get().n1_pucch_an_p1_r10_present) { + j.write_int("n1PUCCH-AN-P1-r10", c.get().n1_pucch_an_p1_r10); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::tdd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::fdd: + HANDLE_CODE(bref.pack(c.get().n1_pucch_an_p1_r10_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().n1_pucch_an_p0_r10, (uint16_t)0, (uint16_t)2047)); + if (c.get().n1_pucch_an_p1_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.get().n1_pucch_an_p1_r10, (uint16_t)0, (uint16_t)2047)); + } + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::tdd: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::fdd: + HANDLE_CODE(bref.unpack(c.get().n1_pucch_an_p1_r10_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.get().n1_pucch_an_p0_r10, bref, (uint16_t)0, (uint16_t)2047)); + if (c.get().n1_pucch_an_p1_r10_present) { + HANDLE_CODE(unpack_unalign_integer(c.get().n1_pucch_an_p1_r10, bref, (uint16_t)0, (uint16_t)2047)); + } + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::destroy_() +{ + switch (type_) { + case types::ch_sel_mux_bundling: + c.destroy(); + break; + case types::fallback_for_format3: + c.destroy(); + break; + default: + break; + } +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ch_sel_mux_bundling: + c.init(); + break; + case types::fallback_for_format3: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::tdd_c_( + const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ch_sel_mux_bundling: + c.init(other.c.get()); + break; + case types::fallback_for_format3: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_"); + } +} +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_& +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_:: +operator=(const rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ch_sel_mux_bundling: + c.set(other.c.get()); + break; + case types::fallback_for_format3: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_"); + } + + return *this; +} +void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ch_sel_mux_bundling: + j.write_fieldname("channelSelectionMultiplexingBundling"); + j.start_obj(); + j.start_array("n1PUCCH-AN-List-r10"); + for (uint32_t i1 = 0; i1 < c.get().n1_pucch_an_list_r10.size(); ++i1) { + j.write_int(c.get().n1_pucch_an_list_r10[i1]); + } + j.end_array(); + j.end_obj(); + break; + case types::fallback_for_format3: + j.write_fieldname("fallbackForFormat3"); + j.start_obj(); + j.write_int("n1PUCCH-AN-P0-r10", c.get().n1_pucch_an_p0_r10); + if (c.get().n1_pucch_an_p1_r10_present) { + j.write_int("n1PUCCH-AN-P1-r10", c.get().n1_pucch_an_p1_r10); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ch_sel_mux_bundling: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().n1_pucch_an_list_r10, 1, 4, + UnalignedIntegerPacker(0, 2047))); + break; + case types::fallback_for_format3: + HANDLE_CODE(bref.pack(c.get().n1_pucch_an_p1_r10_present, 1)); + HANDLE_CODE( + pack_unalign_integer(bref, c.get().n1_pucch_an_p0_r10, (uint16_t)0, (uint16_t)2047)); + if (c.get().n1_pucch_an_p1_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, c.get().n1_pucch_an_p1_r10, (uint16_t)0, + (uint16_t)2047)); + } + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ch_sel_mux_bundling: + HANDLE_CODE(unpack_dyn_seq_of(c.get().n1_pucch_an_list_r10, bref, 1, 4, + UnalignedIntegerPacker(0, 2047))); + break; + case types::fallback_for_format3: + HANDLE_CODE(bref.unpack(c.get().n1_pucch_an_p1_r10_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.get().n1_pucch_an_p0_r10, bref, (uint16_t)0, + (uint16_t)2047)); + if (c.get().n1_pucch_an_p1_r10_present) { + HANDLE_CODE(unpack_unalign_integer(c.get().n1_pucch_an_p1_r10, bref, (uint16_t)0, + (uint16_t)2047)); + } + break; + default: + log_invalid_choice_id(type_, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::fallback_for_format3_s_::fallback_for_format3_s_() +{ + n1_pucch_an_p1_r10_present = false; +} + +rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::fdd_s_::fdd_s_() +{ + n1_pucch_an_p1_r10_present = false; +} + +// RN-SystemInfo-r10 ::= SEQUENCE +rn_sys_info_r10_s::rn_sys_info_r10_s() +{ + ext = false; + sib_type1_r10_present = false; + sib_type2_r10_present = false; +} +SRSASN_CODE rn_sys_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sib_type1_r10_present, 1)); + HANDLE_CODE(bref.pack(sib_type2_r10_present, 1)); + + if (sib_type1_r10_present) { + HANDLE_CODE(sib_type1_r10.pack(bref)); + } + if (sib_type2_r10_present) { + HANDLE_CODE(sib_type2_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_sys_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sib_type1_r10_present, 1)); + HANDLE_CODE(bref.unpack(sib_type2_r10_present, 1)); + + if (sib_type1_r10_present) { + HANDLE_CODE(sib_type1_r10.unpack(bref)); + } + if (sib_type2_r10_present) { + HANDLE_CODE(sib_type2_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rn_sys_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sib_type1_r10_present) { + j.write_str("systemInformationBlockType1-r10", sib_type1_r10.to_string()); + } + if (sib_type2_r10_present) { + j.write_fieldname("systemInformationBlockType2-r10"); + sib_type2_r10.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-v890-IEs ::= SEQUENCE +rrc_conn_recfg_v890_ies_s::rrc_conn_recfg_v890_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_v890_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_v890_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_v890_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionRelease-v890-IEs ::= SEQUENCE +rrc_conn_release_v890_ies_s::rrc_conn_release_v890_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_v890_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_v890_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_v890_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionResume-v1430-IEs ::= SEQUENCE +rrc_conn_resume_v1430_ies_s::rrc_conn_resume_v1430_ies_s() +{ + other_cfg_r14_present = false; + rrc_conn_resume_v1510_ies_present = false; +} +SRSASN_CODE rrc_conn_resume_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(other_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(rrc_conn_resume_v1510_ies_present, 1)); + + if (other_cfg_r14_present) { + HANDLE_CODE(other_cfg_r14.pack(bref)); + } + if (rrc_conn_resume_v1510_ies_present) { + HANDLE_CODE(rrc_conn_resume_v1510_ies.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(other_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(rrc_conn_resume_v1510_ies_present, 1)); + + if (other_cfg_r14_present) { + HANDLE_CODE(other_cfg_r14.unpack(bref)); + } + if (rrc_conn_resume_v1510_ies_present) { + HANDLE_CODE(rrc_conn_resume_v1510_ies.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (other_cfg_r14_present) { + j.write_fieldname("otherConfig-r14"); + other_cfg_r14.to_json(j); + } + if (rrc_conn_resume_v1510_ies_present) { + j.write_fieldname("rrcConnectionResume-v1510-IEs"); + rrc_conn_resume_v1510_ies.to_json(j); + } + j.end_obj(); +} + +// RedirectedCarrierInfo ::= CHOICE +void redirected_carrier_info_c::destroy_() +{ + switch (type_) { + case types::geran: + c.destroy(); + break; + case types::cdma2000_hrpd: + c.destroy(); + break; + case types::cdma2000_minus1x_rtt: + c.destroy(); + break; + case types::utra_tdd_r10: + c.destroy(); + break; + case types::nr_r15: + c.destroy(); + break; + default: + break; + } +} +void redirected_carrier_info_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::eutra: + break; + case types::geran: + c.init(); + break; + case types::utra_fdd: + break; + case types::utra_tdd: + break; + case types::cdma2000_hrpd: + c.init(); + break; + case types::cdma2000_minus1x_rtt: + c.init(); + break; + case types::utra_tdd_r10: + c.init(); + break; + case types::nr_r15: + 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::eutra: + c.init(other.c.get()); + break; + case types::geran: + c.init(other.c.get()); + break; + case types::utra_fdd: + c.init(other.c.get()); + break; + case types::utra_tdd: + c.init(other.c.get()); + break; + case types::cdma2000_hrpd: + c.init(other.c.get()); + break; + case types::cdma2000_minus1x_rtt: + c.init(other.c.get()); + break; + case types::utra_tdd_r10: + c.init(other.c.get()); + break; + case types::nr_r15: + 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::eutra: + c.set(other.c.get()); + break; + case types::geran: + c.set(other.c.get()); + break; + case types::utra_fdd: + c.set(other.c.get()); + break; + case types::utra_tdd: + c.set(other.c.get()); + break; + case types::cdma2000_hrpd: + c.set(other.c.get()); + break; + case types::cdma2000_minus1x_rtt: + c.set(other.c.get()); + break; + case types::utra_tdd_r10: + c.set(other.c.get()); + break; + case types::nr_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + } + + return *this; +} +void redirected_carrier_info_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::eutra: + j.write_int("eutra", c.get()); + break; + case types::geran: + j.write_fieldname("geran"); + c.get().to_json(j); + break; + case types::utra_fdd: + j.write_int("utra-FDD", c.get()); + break; + case types::utra_tdd: + j.write_int("utra-TDD", c.get()); + break; + case types::cdma2000_hrpd: + j.write_fieldname("cdma2000-HRPD"); + c.get().to_json(j); + break; + case types::cdma2000_minus1x_rtt: + j.write_fieldname("cdma2000-1xRTT"); + c.get().to_json(j); + break; + case types::utra_tdd_r10: + j.start_array("utra-TDD-r10"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_int(c.get()[i1]); + } + j.end_array(); + break; + case types::nr_r15: + j.write_fieldname("nr-r15"); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::eutra: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)65535)); + break; + case types::geran: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::utra_fdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)16383)); + break; + case types::utra_tdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)16383)); + break; + case types::cdma2000_hrpd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cdma2000_minus1x_rtt: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::utra_tdd_r10: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 6, + UnalignedIntegerPacker(0, 16383))); + } break; + case types::nr_r15: { + varlength_field_pack_guard scope(bref); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::eutra: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)65535)); + break; + case types::geran: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::utra_fdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)16383)); + break; + case types::utra_tdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)16383)); + break; + case types::cdma2000_hrpd: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cdma2000_minus1x_rtt: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::utra_tdd_r10: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 6, + UnalignedIntegerPacker(0, 16383))); + } break; + case types::nr_r15: { + varlength_field_unpack_guard scope(bref); + 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; +} + +// SecurityConfigHO ::= SEQUENCE +security_cfg_ho_s::security_cfg_ho_s() +{ + ext = false; +} +SRSASN_CODE security_cfg_ho_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(ho_type.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_cfg_ho_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(ho_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void security_cfg_ho_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("handoverType"); + ho_type.to_json(j); + j.end_obj(); +} + +void security_cfg_ho_s::ho_type_c_::destroy_() +{ + switch (type_) { + case types::intra_lte: + c.destroy(); + break; + case types::inter_rat: + c.destroy(); + break; + default: + break; + } +} +void security_cfg_ho_s::ho_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::intra_lte: + c.init(); + break; + case types::inter_rat: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_s::ho_type_c_"); + } +} +security_cfg_ho_s::ho_type_c_::ho_type_c_(const security_cfg_ho_s::ho_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::intra_lte: + c.init(other.c.get()); + break; + case types::inter_rat: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_s::ho_type_c_"); + } +} +security_cfg_ho_s::ho_type_c_& security_cfg_ho_s::ho_type_c_::operator=(const security_cfg_ho_s::ho_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::intra_lte: + c.set(other.c.get()); + break; + case types::inter_rat: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_s::ho_type_c_"); + } + + return *this; +} +void security_cfg_ho_s::ho_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::intra_lte: + j.write_fieldname("intraLTE"); + j.start_obj(); + if (c.get().security_algorithm_cfg_present) { + j.write_fieldname("securityAlgorithmConfig"); + c.get().security_algorithm_cfg.to_json(j); + } + j.write_bool("keyChangeIndicator", c.get().key_change_ind); + j.write_int("nextHopChainingCount", c.get().next_hop_chaining_count); + j.end_obj(); + break; + case types::inter_rat: + j.write_fieldname("interRAT"); + j.start_obj(); + j.write_fieldname("securityAlgorithmConfig"); + c.get().security_algorithm_cfg.to_json(j); + j.write_str("nas-SecurityParamToEUTRA", c.get().nas_security_param_to_eutra.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_s::ho_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE security_cfg_ho_s::ho_type_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::intra_lte: + HANDLE_CODE(bref.pack(c.get().security_algorithm_cfg_present, 1)); + if (c.get().security_algorithm_cfg_present) { + HANDLE_CODE(c.get().security_algorithm_cfg.pack(bref)); + } + HANDLE_CODE(bref.pack(c.get().key_change_ind, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().next_hop_chaining_count, (uint8_t)0, (uint8_t)7)); + break; + case types::inter_rat: + HANDLE_CODE(c.get().security_algorithm_cfg.pack(bref)); + HANDLE_CODE(c.get().nas_security_param_to_eutra.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_s::ho_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_cfg_ho_s::ho_type_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::intra_lte: + HANDLE_CODE(bref.unpack(c.get().security_algorithm_cfg_present, 1)); + if (c.get().security_algorithm_cfg_present) { + HANDLE_CODE(c.get().security_algorithm_cfg.unpack(bref)); + } + HANDLE_CODE(bref.unpack(c.get().key_change_ind, 1)); + HANDLE_CODE(unpack_unalign_integer(c.get().next_hop_chaining_count, bref, (uint8_t)0, (uint8_t)7)); + break; + case types::inter_rat: + HANDLE_CODE(c.get().security_algorithm_cfg.unpack(bref)); + HANDLE_CODE(c.get().nas_security_param_to_eutra.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "security_cfg_ho_s::ho_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +security_cfg_ho_s::ho_type_c_::intra_lte_s_::intra_lte_s_() +{ + security_algorithm_cfg_present = false; +} + +// SecurityConfigSMC ::= SEQUENCE +security_cfg_smc_s::security_cfg_smc_s() +{ + ext = false; +} +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(bit_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(); +} + +// SecurityModeCommand-v8a0-IEs ::= SEQUENCE +security_mode_cmd_v8a0_ies_s::security_mode_cmd_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE security_mode_cmd_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void security_mode_cmd_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// TraceReference-r10 ::= SEQUENCE +SRSASN_CODE trace_ref_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_r10.pack(bref)); + HANDLE_CODE(trace_id_r10.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE trace_ref_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id_r10.unpack(bref)); + HANDLE_CODE(trace_id_r10.unpack(bref)); + + return SRSASN_SUCCESS; +} +void trace_ref_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity-r10"); + plmn_id_r10.to_json(j); + j.write_str("traceId-r10", trace_id_r10.to_string()); + j.end_obj(); +} + +// UECapabilityEnquiry-v8a0-IEs ::= SEQUENCE +ue_cap_enquiry_v8a0_ies_s::ue_cap_enquiry_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationRequest-v930-IEs ::= SEQUENCE +ue_info_request_v930_ies_s::ue_info_request_v930_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_request_v930_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_v930_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_request_v930_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CSFBParametersResponseCDMA2000-r8-IEs ::= SEQUENCE +csfb_params_resp_cdma2000_r8_ies_s::csfb_params_resp_cdma2000_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE csfb_params_resp_cdma2000_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(rand.pack(bref)); + HANDLE_CODE(mob_params.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_resp_cdma2000_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(rand.unpack(bref)); + HANDLE_CODE(mob_params.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csfb_params_resp_cdma2000_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("rand", rand.to_string()); + j.write_str("mobilityParameters", mob_params.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CounterCheck-r8-IEs ::= SEQUENCE +counter_check_r8_ies_s::counter_check_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE counter_check_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_msb_info_list, 1, 11)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(drb_count_msb_info_list, bref, 1, 11)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void counter_check_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("drb-CountMSB-InfoList"); + for (uint32_t i1 = 0; i1 < drb_count_msb_info_list.size(); ++i1) { + drb_count_msb_info_list[i1].to_json(j); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// DLInformationTransfer-r15-IEs ::= SEQUENCE +dl_info_transfer_r15_ies_s::dl_info_transfer_r15_ies_s() +{ + ded_info_type_r15_present = false; + time_ref_info_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE dl_info_transfer_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_info_type_r15_present, 1)); + HANDLE_CODE(bref.pack(time_ref_info_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_info_type_r15_present) { + HANDLE_CODE(ded_info_type_r15.pack(bref)); + } + if (time_ref_info_r15_present) { + HANDLE_CODE(time_ref_info_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ded_info_type_r15_present, 1)); + HANDLE_CODE(bref.unpack(time_ref_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ded_info_type_r15_present) { + HANDLE_CODE(ded_info_type_r15.unpack(bref)); + } + if (time_ref_info_r15_present) { + HANDLE_CODE(time_ref_info_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_info_type_r15_present) { + j.write_fieldname("dedicatedInfoType-r15"); + ded_info_type_r15.to_json(j); + } + if (time_ref_info_r15_present) { + j.write_fieldname("timeReferenceInfo-r15"); + time_ref_info_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::destroy_() +{ + switch (type_) { + case types::ded_info_nas_r15: + c.destroy(); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + c.destroy(); + break; + case types::ded_info_cdma2000_hrpd_r15: + c.destroy(); + break; + default: + break; + } +} +void dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ded_info_nas_r15: + c.init(); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + c.init(); + break; + case types::ded_info_cdma2000_hrpd_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_"); + } +} +dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::ded_info_type_r15_c_( + const dl_info_transfer_r15_ies_s::ded_info_type_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ded_info_nas_r15: + c.init(other.c.get()); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + c.init(other.c.get()); + break; + case types::ded_info_cdma2000_hrpd_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_"); + } +} +dl_info_transfer_r15_ies_s::ded_info_type_r15_c_& dl_info_transfer_r15_ies_s::ded_info_type_r15_c_:: + operator=(const dl_info_transfer_r15_ies_s::ded_info_type_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ded_info_nas_r15: + c.set(other.c.get()); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + c.set(other.c.get()); + break; + case types::ded_info_cdma2000_hrpd_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_"); + } + + return *this; +} +void dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ded_info_nas_r15: + j.write_str("dedicatedInfoNAS-r15", c.get().to_string()); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + j.write_str("dedicatedInfoCDMA2000-1XRTT-r15", c.get().to_string()); + break; + case types::ded_info_cdma2000_hrpd_r15: + j.write_str("dedicatedInfoCDMA2000-HRPD-r15", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ded_info_nas_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ded_info_cdma2000_hrpd_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ded_info_nas_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ded_info_cdma2000_minus1_xrtt_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ded_info_cdma2000_hrpd_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DLInformationTransfer-r8-IEs ::= SEQUENCE +dl_info_transfer_r8_ies_s::dl_info_transfer_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE dl_info_transfer_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ded_info_type.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ded_info_type.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("dedicatedInfoType"); + ded_info_type.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void dl_info_transfer_r8_ies_s::ded_info_type_c_::destroy_() +{ + switch (type_) { + case types::ded_info_nas: + c.destroy(); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.destroy(); + break; + case types::ded_info_cdma2000_hrpd: + c.destroy(); + break; + default: + break; + } +} +void dl_info_transfer_r8_ies_s::ded_info_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ded_info_nas: + c.init(); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.init(); + break; + case types::ded_info_cdma2000_hrpd: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r8_ies_s::ded_info_type_c_"); + } +} +dl_info_transfer_r8_ies_s::ded_info_type_c_::ded_info_type_c_(const dl_info_transfer_r8_ies_s::ded_info_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ded_info_nas: + c.init(other.c.get()); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.init(other.c.get()); + break; + case types::ded_info_cdma2000_hrpd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r8_ies_s::ded_info_type_c_"); + } +} +dl_info_transfer_r8_ies_s::ded_info_type_c_& dl_info_transfer_r8_ies_s::ded_info_type_c_:: + operator=(const dl_info_transfer_r8_ies_s::ded_info_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ded_info_nas: + c.set(other.c.get()); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.set(other.c.get()); + break; + case types::ded_info_cdma2000_hrpd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r8_ies_s::ded_info_type_c_"); + } + + return *this; +} +void dl_info_transfer_r8_ies_s::ded_info_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ded_info_nas: + j.write_str("dedicatedInfoNAS", c.get().to_string()); + break; + case types::ded_info_cdma2000_minus1_xrtt: + j.write_str("dedicatedInfoCDMA2000-1XRTT", c.get().to_string()); + break; + case types::ded_info_cdma2000_hrpd: + j.write_str("dedicatedInfoCDMA2000-HRPD", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r8_ies_s::ded_info_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_info_transfer_r8_ies_s::ded_info_type_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ded_info_nas: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ded_info_cdma2000_minus1_xrtt: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ded_info_cdma2000_hrpd: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r8_ies_s::ded_info_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_r8_ies_s::ded_info_type_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ded_info_nas: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ded_info_cdma2000_minus1_xrtt: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ded_info_cdma2000_hrpd: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_r8_ies_s::ded_info_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// HandoverFromEUTRAPreparationRequest-r8-IEs ::= SEQUENCE +ho_from_eutra_prep_request_r8_ies_s::ho_from_eutra_prep_request_r8_ies_s() +{ + rand_present = false; + mob_params_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_from_eutra_prep_request_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rand_present, 1)); + HANDLE_CODE(bref.pack(mob_params_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, cdma2000_type)); + if (rand_present) { + HANDLE_CODE(rand.pack(bref)); + } + if (mob_params_present) { + HANDLE_CODE(mob_params.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rand_present, 1)); + HANDLE_CODE(bref.unpack(mob_params_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(cdma2000_type, bref)); + if (rand_present) { + HANDLE_CODE(rand.unpack(bref)); + } + if (mob_params_present) { + HANDLE_CODE(mob_params.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_from_eutra_prep_request_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cdma2000-Type", cdma2000_type.to_string()); + if (rand_present) { + j.write_str("rand", rand.to_string()); + } + if (mob_params_present) { + j.write_str("mobilityParameters", mob_params.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LoggedMeasurementConfiguration-r10-IEs ::= SEQUENCE +logged_meas_cfg_r10_ies_s::logged_meas_cfg_r10_ies_s() +{ + area_cfg_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE logged_meas_cfg_r10_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(trace_ref_r10.pack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.pack(bref)); + HANDLE_CODE(tce_id_r10.pack(bref)); + HANDLE_CODE(absolute_time_info_r10.pack(bref)); + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, logging_dur_r10)); + HANDLE_CODE(pack_enum(bref, logging_interv_r10)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r10_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(trace_ref_r10.unpack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.unpack(bref)); + HANDLE_CODE(tce_id_r10.unpack(bref)); + HANDLE_CODE(absolute_time_info_r10.unpack(bref)); + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.unpack(bref)); + } + HANDLE_CODE(unpack_enum(logging_dur_r10, bref)); + HANDLE_CODE(unpack_enum(logging_interv_r10, bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_r10_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("traceReference-r10"); + trace_ref_r10.to_json(j); + j.write_str("traceRecordingSessionRef-r10", trace_recording_session_ref_r10.to_string()); + j.write_str("tce-Id-r10", tce_id_r10.to_string()); + j.write_str("absoluteTimeInfo-r10", absolute_time_info_r10.to_string()); + if (area_cfg_r10_present) { + j.write_fieldname("areaConfiguration-r10"); + area_cfg_r10.to_json(j); + } + j.write_str("loggingDuration-r10", logging_dur_r10.to_string()); + j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MobilityFromEUTRACommand-r8-IEs ::= SEQUENCE +mob_from_eutra_cmd_r8_ies_s::mob_from_eutra_cmd_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.pack(cs_fallback_ind, 1)); + HANDLE_CODE(purpose.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.unpack(cs_fallback_ind, 1)); + HANDLE_CODE(purpose.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("cs-FallbackIndicator", cs_fallback_ind); + j.write_fieldname("purpose"); + purpose.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void mob_from_eutra_cmd_r8_ies_s::purpose_c_::destroy_() +{ + switch (type_) { + case types::ho: + c.destroy(); + break; + case types::cell_change_order: + c.destroy(); + break; + default: + break; + } +} +void mob_from_eutra_cmd_r8_ies_s::purpose_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ho: + c.init(); + break; + case types::cell_change_order: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r8_ies_s::purpose_c_"); + } +} +mob_from_eutra_cmd_r8_ies_s::purpose_c_::purpose_c_(const mob_from_eutra_cmd_r8_ies_s::purpose_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ho: + c.init(other.c.get()); + break; + case types::cell_change_order: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r8_ies_s::purpose_c_"); + } +} +mob_from_eutra_cmd_r8_ies_s::purpose_c_& mob_from_eutra_cmd_r8_ies_s::purpose_c_:: + operator=(const mob_from_eutra_cmd_r8_ies_s::purpose_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ho: + c.set(other.c.get()); + break; + case types::cell_change_order: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r8_ies_s::purpose_c_"); + } + + return *this; +} +void mob_from_eutra_cmd_r8_ies_s::purpose_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ho: + j.write_fieldname("handover"); + c.get().to_json(j); + break; + case types::cell_change_order: + j.write_fieldname("cellChangeOrder"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r8_ies_s::purpose_c_"); + } + j.end_obj(); +} +SRSASN_CODE mob_from_eutra_cmd_r8_ies_s::purpose_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ho: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cell_change_order: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r8_ies_s::purpose_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_r8_ies_s::purpose_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ho: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cell_change_order: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r8_ies_s::purpose_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MobilityFromEUTRACommand-r9-IEs ::= SEQUENCE +mob_from_eutra_cmd_r9_ies_s::mob_from_eutra_cmd_r9_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE mob_from_eutra_cmd_r9_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.pack(cs_fallback_ind, 1)); + HANDLE_CODE(purpose.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_r9_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.unpack(cs_fallback_ind, 1)); + HANDLE_CODE(purpose.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mob_from_eutra_cmd_r9_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("cs-FallbackIndicator", cs_fallback_ind); + j.write_fieldname("purpose"); + purpose.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void mob_from_eutra_cmd_r9_ies_s::purpose_c_::destroy_() +{ + switch (type_) { + case types::ho: + c.destroy(); + break; + case types::cell_change_order: + c.destroy(); + break; + case types::e_csfb_r9: + c.destroy(); + break; + default: + break; + } +} +void mob_from_eutra_cmd_r9_ies_s::purpose_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ho: + c.init(); + break; + case types::cell_change_order: + c.init(); + break; + case types::e_csfb_r9: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r9_ies_s::purpose_c_"); + } +} +mob_from_eutra_cmd_r9_ies_s::purpose_c_::purpose_c_(const mob_from_eutra_cmd_r9_ies_s::purpose_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ho: + c.init(other.c.get()); + break; + case types::cell_change_order: + c.init(other.c.get()); + break; + case types::e_csfb_r9: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r9_ies_s::purpose_c_"); + } +} +mob_from_eutra_cmd_r9_ies_s::purpose_c_& mob_from_eutra_cmd_r9_ies_s::purpose_c_:: + operator=(const mob_from_eutra_cmd_r9_ies_s::purpose_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ho: + c.set(other.c.get()); + break; + case types::cell_change_order: + c.set(other.c.get()); + break; + case types::e_csfb_r9: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r9_ies_s::purpose_c_"); + } + + return *this; +} +void mob_from_eutra_cmd_r9_ies_s::purpose_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ho: + j.write_fieldname("handover"); + c.get().to_json(j); + break; + case types::cell_change_order: + j.write_fieldname("cellChangeOrder"); + c.get().to_json(j); + break; + case types::e_csfb_r9: + j.write_fieldname("e-CSFB-r9"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r9_ies_s::purpose_c_"); + } + j.end_obj(); +} +SRSASN_CODE mob_from_eutra_cmd_r9_ies_s::purpose_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ho: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cell_change_order: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::e_csfb_r9: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r9_ies_s::purpose_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_r9_ies_s::purpose_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ho: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cell_change_order: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::e_csfb_r9: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_r9_ies_s::purpose_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RNReconfiguration-r10-IEs ::= SEQUENCE +rn_recfg_r10_ies_s::rn_recfg_r10_ies_s() +{ + rn_sys_info_r10_present = false; + rn_sf_cfg_r10_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rn_recfg_r10_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rn_sys_info_r10_present, 1)); + HANDLE_CODE(bref.pack(rn_sf_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rn_sys_info_r10_present) { + HANDLE_CODE(rn_sys_info_r10.pack(bref)); + } + if (rn_sf_cfg_r10_present) { + HANDLE_CODE(rn_sf_cfg_r10.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_r10_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rn_sys_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(rn_sf_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rn_sys_info_r10_present) { + HANDLE_CODE(rn_sys_info_r10.unpack(bref)); + } + if (rn_sf_cfg_r10_present) { + HANDLE_CODE(rn_sf_cfg_r10.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rn_recfg_r10_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rn_sys_info_r10_present) { + j.write_fieldname("rn-SystemInfo-r10"); + rn_sys_info_r10.to_json(j); + } + if (rn_sf_cfg_r10_present) { + j.write_fieldname("rn-SubframeConfig-r10"); + rn_sf_cfg_r10.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReconfiguration-r8-IEs ::= SEQUENCE +rrc_conn_recfg_r8_ies_s::rrc_conn_recfg_r8_ies_s() +{ + meas_cfg_present = false; + mob_ctrl_info_present = false; + ded_info_nas_list_present = false; + rr_cfg_ded_present = false; + security_cfg_ho_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_cfg_present, 1)); + HANDLE_CODE(bref.pack(mob_ctrl_info_present, 1)); + HANDLE_CODE(bref.pack(ded_info_nas_list_present, 1)); + HANDLE_CODE(bref.pack(rr_cfg_ded_present, 1)); + HANDLE_CODE(bref.pack(security_cfg_ho_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.pack(bref)); + } + if (mob_ctrl_info_present) { + HANDLE_CODE(mob_ctrl_info.pack(bref)); + } + if (ded_info_nas_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ded_info_nas_list, 1, 11)); + } + if (rr_cfg_ded_present) { + HANDLE_CODE(rr_cfg_ded.pack(bref)); + } + if (security_cfg_ho_present) { + HANDLE_CODE(security_cfg_ho.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); + HANDLE_CODE(bref.unpack(mob_ctrl_info_present, 1)); + HANDLE_CODE(bref.unpack(ded_info_nas_list_present, 1)); + HANDLE_CODE(bref.unpack(rr_cfg_ded_present, 1)); + HANDLE_CODE(bref.unpack(security_cfg_ho_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.unpack(bref)); + } + if (mob_ctrl_info_present) { + HANDLE_CODE(mob_ctrl_info.unpack(bref)); + } + if (ded_info_nas_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ded_info_nas_list, bref, 1, 11)); + } + if (rr_cfg_ded_present) { + HANDLE_CODE(rr_cfg_ded.unpack(bref)); + } + if (security_cfg_ho_present) { + HANDLE_CODE(security_cfg_ho.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_cfg_present) { + j.write_fieldname("measConfig"); + meas_cfg.to_json(j); + } + if (mob_ctrl_info_present) { + j.write_fieldname("mobilityControlInfo"); + mob_ctrl_info.to_json(j); + } + if (ded_info_nas_list_present) { + j.start_array("dedicatedInfoNASList"); + for (uint32_t i1 = 0; i1 < ded_info_nas_list.size(); ++i1) { + j.write_str(ded_info_nas_list[i1].to_string()); + } + j.end_array(); + } + if (rr_cfg_ded_present) { + j.write_fieldname("radioResourceConfigDedicated"); + rr_cfg_ded.to_json(j); + } + if (security_cfg_ho_present) { + j.write_fieldname("securityConfigHO"); + security_cfg_ho.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionRelease-r8-IEs ::= SEQUENCE +rrc_conn_release_r8_ies_s::rrc_conn_release_r8_ies_s() +{ + redirected_carrier_info_present = false; + idle_mode_mob_ctrl_info_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_release_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(redirected_carrier_info_present, 1)); + HANDLE_CODE(bref.pack(idle_mode_mob_ctrl_info_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, release_cause)); + if (redirected_carrier_info_present) { + HANDLE_CODE(redirected_carrier_info.pack(bref)); + } + if (idle_mode_mob_ctrl_info_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(redirected_carrier_info_present, 1)); + HANDLE_CODE(bref.unpack(idle_mode_mob_ctrl_info_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(release_cause, bref)); + if (redirected_carrier_info_present) { + HANDLE_CODE(redirected_carrier_info.unpack(bref)); + } + if (idle_mode_mob_ctrl_info_present) { + HANDLE_CODE(idle_mode_mob_ctrl_info.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_release_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("releaseCause", release_cause.to_string()); + if (redirected_carrier_info_present) { + j.write_fieldname("redirectedCarrierInfo"); + redirected_carrier_info.to_json(j); + } + if (idle_mode_mob_ctrl_info_present) { + j.write_fieldname("idleModeMobilityControlInfo"); + idle_mode_mob_ctrl_info.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionResume-r13-IEs ::= SEQUENCE +rrc_conn_resume_r13_ies_s::rrc_conn_resume_r13_ies_s() +{ + rr_cfg_ded_r13_present = false; + meas_cfg_r13_present = false; + ant_info_ded_pcell_r13_present = false; + drb_continue_rohc_r13_present = false; + late_non_crit_ext_present = false; + rrc_conn_resume_v1430_ies_present = false; +} +SRSASN_CODE rrc_conn_resume_r13_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(ant_info_ded_pcell_r13_present, 1)); + HANDLE_CODE(bref.pack(drb_continue_rohc_r13_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(rrc_conn_resume_v1430_ies_present, 1)); + + if (rr_cfg_ded_r13_present) { + HANDLE_CODE(rr_cfg_ded_r13.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, next_hop_chaining_count_r13, (uint8_t)0, (uint8_t)7)); + if (meas_cfg_r13_present) { + HANDLE_CODE(meas_cfg_r13.pack(bref)); + } + if (ant_info_ded_pcell_r13_present) { + HANDLE_CODE(ant_info_ded_pcell_r13.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (rrc_conn_resume_v1430_ies_present) { + HANDLE_CODE(rrc_conn_resume_v1430_ies.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_r13_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_ded_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(ant_info_ded_pcell_r13_present, 1)); + HANDLE_CODE(bref.unpack(drb_continue_rohc_r13_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(rrc_conn_resume_v1430_ies_present, 1)); + + if (rr_cfg_ded_r13_present) { + HANDLE_CODE(rr_cfg_ded_r13.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(next_hop_chaining_count_r13, bref, (uint8_t)0, (uint8_t)7)); + if (meas_cfg_r13_present) { + HANDLE_CODE(meas_cfg_r13.unpack(bref)); + } + if (ant_info_ded_pcell_r13_present) { + HANDLE_CODE(ant_info_ded_pcell_r13.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (rrc_conn_resume_v1430_ies_present) { + HANDLE_CODE(rrc_conn_resume_v1430_ies.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_r13_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_ded_r13_present) { + j.write_fieldname("radioResourceConfigDedicated-r13"); + rr_cfg_ded_r13.to_json(j); + } + j.write_int("nextHopChainingCount-r13", next_hop_chaining_count_r13); + if (meas_cfg_r13_present) { + j.write_fieldname("measConfig-r13"); + meas_cfg_r13.to_json(j); + } + if (ant_info_ded_pcell_r13_present) { + j.write_fieldname("antennaInfoDedicatedPCell-r13"); + ant_info_ded_pcell_r13.to_json(j); + } + if (drb_continue_rohc_r13_present) { + j.write_str("drb-ContinueROHC-r13", "true"); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (rrc_conn_resume_v1430_ies_present) { + j.write_fieldname("rrcConnectionResume-v1430-IEs"); + rrc_conn_resume_v1430_ies.to_json(j); + } + j.end_obj(); +} + +// SecurityModeCommand-r8-IEs ::= SEQUENCE +security_mode_cmd_r8_ies_s::security_mode_cmd_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE security_mode_cmd_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(security_cfg_smc.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(security_cfg_smc.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void security_mode_cmd_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("securityConfigSMC"); + security_cfg_smc.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UECapabilityEnquiry-r8-IEs ::= SEQUENCE +ue_cap_enquiry_r8_ies_s::ue_cap_enquiry_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_enquiry_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_request, 1, 8, EnumPacker())); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(ue_cap_request, bref, 1, 8, EnumPacker())); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("ue-CapabilityRequest"); + for (uint32_t i1 = 0; i1 < ue_cap_request.size(); ++i1) { + j.write_str(ue_cap_request[i1].to_string()); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationRequest-r9-IEs ::= SEQUENCE +ue_info_request_r9_ies_s::ue_info_request_r9_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_request_r9_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.pack(rach_report_req_r9, 1)); + HANDLE_CODE(bref.pack(rlf_report_req_r9, 1)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_r9_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(bref.unpack(rach_report_req_r9, 1)); + HANDLE_CODE(bref.unpack(rlf_report_req_r9, 1)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_request_r9_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("rach-ReportReq-r9", rach_report_req_r9); + j.write_bool("rlf-ReportReq-r9", rlf_report_req_r9); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CSFBParametersResponseCDMA2000 ::= SEQUENCE +SRSASN_CODE csfb_params_resp_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_resp_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void csfb_params_resp_cdma2000_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 csfb_params_resp_cdma2000_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + c.destroy(); + break; + default: + break; + } +} +void csfb_params_resp_cdma2000_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csfb_params_resp_cdma2000_s::crit_exts_c_"); + } +} +csfb_params_resp_cdma2000_s::crit_exts_c_::crit_exts_c_(const csfb_params_resp_cdma2000_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csfb_params_resp_cdma2000_s::crit_exts_c_"); + } +} +csfb_params_resp_cdma2000_s::crit_exts_c_& csfb_params_resp_cdma2000_s::crit_exts_c_:: + operator=(const csfb_params_resp_cdma2000_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csfb_params_resp_cdma2000_s::crit_exts_c_"); + } + + return *this; +} +void csfb_params_resp_cdma2000_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + j.write_fieldname("csfbParametersResponseCDMA2000-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "csfb_params_resp_cdma2000_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE csfb_params_resp_cdma2000_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "csfb_params_resp_cdma2000_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_resp_cdma2000_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::csfb_params_resp_cdma2000_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "csfb_params_resp_cdma2000_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CounterCheck ::= SEQUENCE +SRSASN_CODE counter_check_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void counter_check_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void counter_check_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void counter_check_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + } +} +counter_check_s::crit_exts_c_::crit_exts_c_(const counter_check_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + } +} +counter_check_s::crit_exts_c_& counter_check_s::crit_exts_c_::operator=(const counter_check_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + } + + return *this; +} +void counter_check_s::crit_exts_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::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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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; +} + +void counter_check_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void counter_check_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::counter_check_r8: + j.write_fieldname("counterCheck-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE counter_check_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::counter_check_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::counter_check_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_::c1_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_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + 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_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void dl_info_transfer_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + } +} +dl_info_transfer_s::crit_exts_c_::crit_exts_c_(const dl_info_transfer_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + } +} +dl_info_transfer_s::crit_exts_c_& dl_info_transfer_s::crit_exts_c_:: + operator=(const dl_info_transfer_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + } + + return *this; +} +void dl_info_transfer_s::crit_exts_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::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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_info_transfer_s::crit_exts_c_::c1_c_::destroy_() +{ + switch (type_) { + case types::dl_info_transfer_r8: + c.destroy(); + break; + case types::dl_info_transfer_r15: + c.destroy(); + break; + default: + break; + } +} +void dl_info_transfer_s::crit_exts_c_::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dl_info_transfer_r8: + c.init(); + break; + case types::dl_info_transfer_r15: + c.init(); + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_::c1_c_"); + } +} +dl_info_transfer_s::crit_exts_c_::c1_c_::c1_c_(const dl_info_transfer_s::crit_exts_c_::c1_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::dl_info_transfer_r8: + c.init(other.c.get()); + break; + case types::dl_info_transfer_r15: + 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_info_transfer_s::crit_exts_c_::c1_c_"); + } +} +dl_info_transfer_s::crit_exts_c_::c1_c_& dl_info_transfer_s::crit_exts_c_::c1_c_:: + operator=(const dl_info_transfer_s::crit_exts_c_::c1_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dl_info_transfer_r8: + c.set(other.c.get()); + break; + case types::dl_info_transfer_r15: + 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_info_transfer_s::crit_exts_c_::c1_c_"); + } + + return *this; +} +void dl_info_transfer_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dl_info_transfer_r8: + j.write_fieldname("dlInformationTransfer-r8"); + c.get().to_json(j); + break; + case types::dl_info_transfer_r15: + j.write_fieldname("dlInformationTransfer-r15"); + c.get().to_json(j); + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::dl_info_transfer_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_info_transfer_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::dl_info_transfer_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_info_transfer_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// HandoverFromEUTRAPreparationRequest ::= SEQUENCE +SRSASN_CODE ho_from_eutra_prep_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ho_from_eutra_prep_request_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 ho_from_eutra_prep_request_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ho_from_eutra_prep_request_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_"); + } +} +ho_from_eutra_prep_request_s::crit_exts_c_::crit_exts_c_(const ho_from_eutra_prep_request_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_"); + } +} +ho_from_eutra_prep_request_s::crit_exts_c_& ho_from_eutra_prep_request_s::crit_exts_c_:: + operator=(const ho_from_eutra_prep_request_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_"); + } + + return *this; +} +void ho_from_eutra_prep_request_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ho_from_eutra_prep_request_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ho_from_eutra_prep_request_r8: + j.write_fieldname("handoverFromEUTRAPreparationRequest-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ho_from_eutra_prep_request_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ho_from_eutra_prep_request_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// LoggedMeasurementConfiguration-r10 ::= SEQUENCE +SRSASN_CODE logged_meas_cfg_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_r10_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_r10_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void logged_meas_cfg_r10_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_"); + } +} +logged_meas_cfg_r10_s::crit_exts_c_::crit_exts_c_(const logged_meas_cfg_r10_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_"); + } +} +logged_meas_cfg_r10_s::crit_exts_c_& logged_meas_cfg_r10_s::crit_exts_c_:: + operator=(const logged_meas_cfg_r10_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_"); + } + + return *this; +} +void logged_meas_cfg_r10_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE logged_meas_cfg_r10_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r10_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::logged_meas_cfg_r10: + j.write_fieldname("loggedMeasurementConfiguration-r10"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::logged_meas_cfg_r10: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::logged_meas_cfg_r10: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MobilityFromEUTRACommand ::= SEQUENCE +SRSASN_CODE mob_from_eutra_cmd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mob_from_eutra_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_eutra_cmd_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void mob_from_eutra_cmd_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_"); + } +} +mob_from_eutra_cmd_s::crit_exts_c_::crit_exts_c_(const mob_from_eutra_cmd_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_"); + } +} +mob_from_eutra_cmd_s::crit_exts_c_& mob_from_eutra_cmd_s::crit_exts_c_:: + operator=(const mob_from_eutra_cmd_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_"); + } + + return *this; +} +void mob_from_eutra_cmd_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE mob_from_eutra_cmd_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::destroy_() +{ + switch (type_) { + case types::mob_from_eutra_cmd_r8: + c.destroy(); + break; + case types::mob_from_eutra_cmd_r9: + c.destroy(); + break; + default: + break; + } +} +void mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::mob_from_eutra_cmd_r8: + c.init(); + break; + case types::mob_from_eutra_cmd_r9: + c.init(); + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_"); + } +} +mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::c1_c_(const mob_from_eutra_cmd_s::crit_exts_c_::c1_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::mob_from_eutra_cmd_r8: + c.init(other.c.get()); + break; + case types::mob_from_eutra_cmd_r9: + c.init(other.c.get()); + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_"); + } +} +mob_from_eutra_cmd_s::crit_exts_c_::c1_c_& mob_from_eutra_cmd_s::crit_exts_c_::c1_c_:: + operator=(const mob_from_eutra_cmd_s::crit_exts_c_::c1_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::mob_from_eutra_cmd_r8: + c.set(other.c.get()); + break; + case types::mob_from_eutra_cmd_r9: + c.set(other.c.get()); + break; + case types::spare2: + break; + case types::spare1: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_"); + } + + return *this; +} +void mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mob_from_eutra_cmd_r8: + j.write_fieldname("mobilityFromEUTRACommand-r8"); + c.get().to_json(j); + break; + case types::mob_from_eutra_cmd_r9: + j.write_fieldname("mobilityFromEUTRACommand-r9"); + c.get().to_json(j); + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::mob_from_eutra_cmd_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::mob_from_eutra_cmd_r9: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::mob_from_eutra_cmd_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::mob_from_eutra_cmd_r9: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RNReconfiguration-r10 ::= SEQUENCE +SRSASN_CODE rn_recfg_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rn_recfg_r10_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 rn_recfg_r10_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rn_recfg_r10_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_"); + } +} +rn_recfg_r10_s::crit_exts_c_::crit_exts_c_(const rn_recfg_r10_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_"); + } +} +rn_recfg_r10_s::crit_exts_c_& rn_recfg_r10_s::crit_exts_c_::operator=(const rn_recfg_r10_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_"); + } + + return *this; +} +void rn_recfg_r10_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_recfg_r10_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_r10_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_recfg_r10_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rn_recfg_r10_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rn_recfg_r10: + j.write_fieldname("rnReconfiguration-r10"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_recfg_r10_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rn_recfg_r10: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_r10_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rn_recfg_r10: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReconfiguration ::= SEQUENCE +SRSASN_CODE rrc_conn_recfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_recfg_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_recfg_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_"); + } +} +rrc_conn_recfg_s::crit_exts_c_::crit_exts_c_(const rrc_conn_recfg_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_"); + } +} +rrc_conn_recfg_s::crit_exts_c_& rrc_conn_recfg_s::crit_exts_c_::operator=(const rrc_conn_recfg_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_recfg_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_recfg_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_recfg_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_recfg_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_recfg_r8: + j.write_fieldname("rrcConnectionReconfiguration-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_recfg_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_recfg_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_recfg_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionRelease ::= SEQUENCE +SRSASN_CODE rrc_conn_release_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_release_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_release_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_"); + } +} +rrc_conn_release_s::crit_exts_c_::crit_exts_c_(const rrc_conn_release_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_"); + } +} +rrc_conn_release_s::crit_exts_c_& rrc_conn_release_s::crit_exts_c_:: + operator=(const rrc_conn_release_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_release_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_release_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_release_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_release_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_release_r8: + j.write_fieldname("rrcConnectionRelease-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_release_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_release_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_release_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_release_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_release_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionResume-r13 ::= SEQUENCE +SRSASN_CODE rrc_conn_resume_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_r13_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_conn_resume_r13_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_resume_r13_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_"); + } +} +rrc_conn_resume_r13_s::crit_exts_c_::crit_exts_c_(const rrc_conn_resume_r13_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_"); + } +} +rrc_conn_resume_r13_s::crit_exts_c_& rrc_conn_resume_r13_s::crit_exts_c_:: + operator=(const rrc_conn_resume_r13_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_resume_r13_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_resume_r13_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_r13_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_resume_r13: + j.write_fieldname("rrcConnectionResume-r13"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_resume_r13: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_resume_r13: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_r13_s::crit_exts_c_::c1_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_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void security_mode_cmd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void security_mode_cmd_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void security_mode_cmd_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + } +} +security_mode_cmd_s::crit_exts_c_::crit_exts_c_(const security_mode_cmd_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + } +} +security_mode_cmd_s::crit_exts_c_& security_mode_cmd_s::crit_exts_c_:: + operator=(const security_mode_cmd_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + } + + return *this; +} +void security_mode_cmd_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.get().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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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; +} + +void security_mode_cmd_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void security_mode_cmd_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::security_mode_cmd_r8: + j.write_fieldname("securityModeCommand-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE security_mode_cmd_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::security_mode_cmd_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::security_mode_cmd_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_::c1_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_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_cap_enquiry_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ue_cap_enquiry_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_cap_enquiry_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + } +} +ue_cap_enquiry_s::crit_exts_c_::crit_exts_c_(const ue_cap_enquiry_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + } +} +ue_cap_enquiry_s::crit_exts_c_& ue_cap_enquiry_s::crit_exts_c_::operator=(const ue_cap_enquiry_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + } + + return *this; +} +void ue_cap_enquiry_s::crit_exts_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::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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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; +} + +void ue_cap_enquiry_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_cap_enquiry_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_cap_enquiry_r8: + j.write_fieldname("ueCapabilityEnquiry-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_cap_enquiry_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_cap_enquiry_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UEInformationRequest-r9 ::= SEQUENCE +SRSASN_CODE ue_info_request_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_info_request_r9_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_r9_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_info_request_r9_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_"); + } +} +ue_info_request_r9_s::crit_exts_c_::crit_exts_c_(const ue_info_request_r9_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_"); + } +} +ue_info_request_r9_s::crit_exts_c_& ue_info_request_r9_s::crit_exts_c_:: + operator=(const ue_info_request_r9_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_"); + } + + return *this; +} +void ue_info_request_r9_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_info_request_r9_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_r9_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ue_info_request_r9_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_info_request_r9_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_info_request_r9: + j.write_fieldname("ueInformationRequest-r9"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_info_request_r9_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_info_request_r9: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_r9_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_info_request_r9: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r9_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DL-DCCH-MessageType ::= CHOICE +void dl_dcch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void dl_dcch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } +} +dl_dcch_msg_type_c::dl_dcch_msg_type_c(const dl_dcch_msg_type_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } +} +dl_dcch_msg_type_c& dl_dcch_msg_type_c::operator=(const dl_dcch_msg_type_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } + + return *this; +} +void dl_dcch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE dl_dcch_msg_type_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_dcch_msg_type_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_dcch_msg_type_c::c1_c_::destroy_() +{ + switch (type_) { + case types::csfb_params_resp_cdma2000: + c.destroy(); + break; + case types::dl_info_transfer: + c.destroy(); + break; + case types::ho_from_eutra_prep_request: + c.destroy(); + break; + case types::mob_from_eutra_cmd: + c.destroy(); + break; + case types::rrc_conn_recfg: + c.destroy(); + break; + case types::rrc_conn_release: + c.destroy(); + break; + case types::security_mode_cmd: + c.destroy(); + break; + case types::ue_cap_enquiry: + c.destroy(); + break; + case types::counter_check: + c.destroy(); + break; + case types::ue_info_request_r9: + c.destroy(); + break; + case types::logged_meas_cfg_r10: + c.destroy(); + break; + case types::rn_recfg_r10: + c.destroy(); + break; + case types::rrc_conn_resume_r13: + c.destroy(); + break; + default: + break; + } +} +void dl_dcch_msg_type_c::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::csfb_params_resp_cdma2000: + c.init(); + break; + case types::dl_info_transfer: + c.init(); + break; + case types::ho_from_eutra_prep_request: + c.init(); + break; + case types::mob_from_eutra_cmd: + c.init(); + break; + case types::rrc_conn_recfg: + c.init(); + break; + case types::rrc_conn_release: + c.init(); + break; + case types::security_mode_cmd: + c.init(); + break; + case types::ue_cap_enquiry: + c.init(); + break; + case types::counter_check: + c.init(); + break; + case types::ue_info_request_r9: + c.init(); + break; + case types::logged_meas_cfg_r10: + c.init(); + break; + case types::rn_recfg_r10: + c.init(); + break; + case types::rrc_conn_resume_r13: + 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::csfb_params_resp_cdma2000: + c.init(other.c.get()); + break; + case types::dl_info_transfer: + c.init(other.c.get()); + break; + case types::ho_from_eutra_prep_request: + c.init(other.c.get()); + break; + case types::mob_from_eutra_cmd: + c.init(other.c.get()); + break; + case types::rrc_conn_recfg: + c.init(other.c.get()); + break; + case types::rrc_conn_release: + c.init(other.c.get()); + break; + case types::security_mode_cmd: + 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::ue_info_request_r9: + c.init(other.c.get()); + break; + case types::logged_meas_cfg_r10: + c.init(other.c.get()); + break; + case types::rn_recfg_r10: + c.init(other.c.get()); + break; + case types::rrc_conn_resume_r13: + 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::csfb_params_resp_cdma2000: + c.set(other.c.get()); + break; + case types::dl_info_transfer: + c.set(other.c.get()); + break; + case types::ho_from_eutra_prep_request: + c.set(other.c.get()); + break; + case types::mob_from_eutra_cmd: + c.set(other.c.get()); + break; + case types::rrc_conn_recfg: + c.set(other.c.get()); + break; + case types::rrc_conn_release: + c.set(other.c.get()); + break; + case types::security_mode_cmd: + c.set(other.c.get()); + break; + case types::ue_cap_enquiry: + c.set(other.c.get()); + break; + case types::counter_check: + c.set(other.c.get()); + break; + case types::ue_info_request_r9: + c.set(other.c.get()); + break; + case types::logged_meas_cfg_r10: + c.set(other.c.get()); + break; + case types::rn_recfg_r10: + c.set(other.c.get()); + break; + case types::rrc_conn_resume_r13: + c.set(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_"); + } + + return *this; +} +void dl_dcch_msg_type_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::csfb_params_resp_cdma2000: + j.write_fieldname("csfbParametersResponseCDMA2000"); + c.get().to_json(j); + break; + case types::dl_info_transfer: + j.write_fieldname("dlInformationTransfer"); + c.get().to_json(j); + break; + case types::ho_from_eutra_prep_request: + j.write_fieldname("handoverFromEUTRAPreparationRequest"); + c.get().to_json(j); + break; + case types::mob_from_eutra_cmd: + j.write_fieldname("mobilityFromEUTRACommand"); + c.get().to_json(j); + break; + case types::rrc_conn_recfg: + j.write_fieldname("rrcConnectionReconfiguration"); + c.get().to_json(j); + break; + case types::rrc_conn_release: + j.write_fieldname("rrcConnectionRelease"); + c.get().to_json(j); + break; + case types::security_mode_cmd: + j.write_fieldname("securityModeCommand"); + c.get().to_json(j); + break; + case types::ue_cap_enquiry: + j.write_fieldname("ueCapabilityEnquiry"); + c.get().to_json(j); + break; + case types::counter_check: + j.write_fieldname("counterCheck"); + c.get().to_json(j); + break; + case types::ue_info_request_r9: + j.write_fieldname("ueInformationRequest-r9"); + c.get().to_json(j); + break; + case types::logged_meas_cfg_r10: + j.write_fieldname("loggedMeasurementConfiguration-r10"); + c.get().to_json(j); + break; + case types::rn_recfg_r10: + j.write_fieldname("rnReconfiguration-r10"); + c.get().to_json(j); + break; + case types::rrc_conn_resume_r13: + j.write_fieldname("rrcConnectionResume-r13"); + c.get().to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_dcch_msg_type_c::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::csfb_params_resp_cdma2000: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_info_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ho_from_eutra_prep_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::mob_from_eutra_cmd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_recfg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_release: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::security_mode_cmd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_cap_enquiry: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::counter_check: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_info_request_r9: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::logged_meas_cfg_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rn_recfg_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_resume_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_dcch_msg_type_c::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::csfb_params_resp_cdma2000: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_info_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ho_from_eutra_prep_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::mob_from_eutra_cmd: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_recfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_release: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::security_mode_cmd: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_cap_enquiry: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::counter_check: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_info_request_r9: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::logged_meas_cfg_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rn_recfg_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_resume_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// DL-DCCH-Message ::= SEQUENCE +SRSASN_CODE dl_dcch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_dcch_msg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void dl_dcch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("DL-DCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// TMGI-r9 ::= SEQUENCE +SRSASN_CODE tmgi_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_r9.pack(bref)); + HANDLE_CODE(service_id_r9.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tmgi_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id_r9.unpack(bref)); + HANDLE_CODE(service_id_r9.unpack(bref)); + + return SRSASN_SUCCESS; +} +void tmgi_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Id-r9"); + plmn_id_r9.to_json(j); + j.write_str("serviceId-r9", service_id_r9.to_string()); + j.end_obj(); +} + +void tmgi_r9_s::plmn_id_r9_c_::destroy_() +{ + switch (type_) { + case types::explicit_value_r9: + c.destroy(); + break; + default: + break; + } +} +void tmgi_r9_s::plmn_id_r9_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_idx_r9: + break; + case types::explicit_value_r9: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tmgi_r9_s::plmn_id_r9_c_"); + } +} +tmgi_r9_s::plmn_id_r9_c_::plmn_id_r9_c_(const tmgi_r9_s::plmn_id_r9_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_idx_r9: + c.init(other.c.get()); + break; + case types::explicit_value_r9: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tmgi_r9_s::plmn_id_r9_c_"); + } +} +tmgi_r9_s::plmn_id_r9_c_& tmgi_r9_s::plmn_id_r9_c_::operator=(const tmgi_r9_s::plmn_id_r9_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::plmn_idx_r9: + c.set(other.c.get()); + break; + case types::explicit_value_r9: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tmgi_r9_s::plmn_id_r9_c_"); + } + + return *this; +} +void tmgi_r9_s::plmn_id_r9_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_idx_r9: + j.write_int("plmn-Index-r9", c.get()); + break; + case types::explicit_value_r9: + j.write_fieldname("explicitValue-r9"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "tmgi_r9_s::plmn_id_r9_c_"); + } + j.end_obj(); +} +SRSASN_CODE tmgi_r9_s::plmn_id_r9_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::plmn_idx_r9: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)1, (uint8_t)6)); + break; + case types::explicit_value_r9: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "tmgi_r9_s::plmn_id_r9_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tmgi_r9_s::plmn_id_r9_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::plmn_idx_r9: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)1, (uint8_t)6)); + break; + case types::explicit_value_r9: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "tmgi_r9_s::plmn_id_r9_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MBMS-SessionInfo-r9 ::= SEQUENCE +mbms_session_info_r9_s::mbms_session_info_r9_s() +{ + ext = false; + session_id_r9_present = false; +} +SRSASN_CODE mbms_session_info_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(session_id_r9_present, 1)); + + HANDLE_CODE(tmgi_r9.pack(bref)); + if (session_id_r9_present) { + HANDLE_CODE(session_id_r9.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, lc_ch_id_r9, (uint8_t)0, (uint8_t)28)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_session_info_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(session_id_r9_present, 1)); + + HANDLE_CODE(tmgi_r9.unpack(bref)); + if (session_id_r9_present) { + HANDLE_CODE(session_id_r9.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(lc_ch_id_r9, bref, (uint8_t)0, (uint8_t)28)); + + return SRSASN_SUCCESS; +} +void mbms_session_info_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("tmgi-r9"); + tmgi_r9.to_json(j); + if (session_id_r9_present) { + j.write_str("sessionId-r9", session_id_r9.to_string()); + } + j.write_int("logicalChannelIdentity-r9", lc_ch_id_r9); + j.end_obj(); +} + +// PMCH-Config-r12 ::= SEQUENCE +pmch_cfg_r12_s::pmch_cfg_r12_s() +{ + ext = false; + mch_sched_period_v1430_present = false; +} +SRSASN_CODE pmch_cfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, sf_alloc_end_r12, (uint16_t)0, (uint16_t)1535)); + HANDLE_CODE(data_mcs_r12.pack(bref)); + HANDLE_CODE(pack_enum(bref, mch_sched_period_r12)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= mch_sched_period_v1430_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(mch_sched_period_v1430_present, 1)); + if (mch_sched_period_v1430_present) { + HANDLE_CODE(pack_enum(bref, mch_sched_period_v1430)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pmch_cfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(sf_alloc_end_r12, bref, (uint16_t)0, (uint16_t)1535)); + HANDLE_CODE(data_mcs_r12.unpack(bref)); + HANDLE_CODE(unpack_enum(mch_sched_period_r12, bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(mch_sched_period_v1430_present, 1)); + if (mch_sched_period_v1430_present) { + HANDLE_CODE(unpack_enum(mch_sched_period_v1430, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pmch_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sf-AllocEnd-r12", sf_alloc_end_r12); + j.write_fieldname("dataMCS-r12"); + data_mcs_r12.to_json(j); + j.write_str("mch-SchedulingPeriod-r12", mch_sched_period_r12.to_string()); + if (mch_sched_period_v1430_present) { + j.write_str("mch-SchedulingPeriod-v1430", mch_sched_period_v1430.to_string()); + } + j.end_obj(); +} + +void pmch_cfg_r12_s::data_mcs_r12_c_::destroy_() {} +void pmch_cfg_r12_s::data_mcs_r12_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pmch_cfg_r12_s::data_mcs_r12_c_::data_mcs_r12_c_(const pmch_cfg_r12_s::data_mcs_r12_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::normal_r12: + c.init(other.c.get()); + break; + case types::higer_order_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pmch_cfg_r12_s::data_mcs_r12_c_"); + } +} +pmch_cfg_r12_s::data_mcs_r12_c_& pmch_cfg_r12_s::data_mcs_r12_c_:: + operator=(const pmch_cfg_r12_s::data_mcs_r12_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::normal_r12: + c.set(other.c.get()); + break; + case types::higer_order_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pmch_cfg_r12_s::data_mcs_r12_c_"); + } + + return *this; +} +void pmch_cfg_r12_s::data_mcs_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::normal_r12: + j.write_int("normal-r12", c.get()); + break; + case types::higer_order_r12: + j.write_int("higerOrder-r12", c.get()); + break; + default: + log_invalid_choice_id(type_, "pmch_cfg_r12_s::data_mcs_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE pmch_cfg_r12_s::data_mcs_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::normal_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)28)); + break; + case types::higer_order_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)27)); + break; + default: + log_invalid_choice_id(type_, "pmch_cfg_r12_s::data_mcs_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pmch_cfg_r12_s::data_mcs_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::normal_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)28)); + break; + case types::higer_order_r12: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)27)); + break; + default: + log_invalid_choice_id(type_, "pmch_cfg_r12_s::data_mcs_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PMCH-InfoExt-r12 ::= SEQUENCE +pmch_info_ext_r12_s::pmch_info_ext_r12_s() +{ + ext = false; +} +SRSASN_CODE pmch_info_ext_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pmch_cfg_r12.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_session_info_list_r12, 0, 29)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pmch_info_ext_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(pmch_cfg_r12.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(mbms_session_info_list_r12, bref, 0, 29)); + + return SRSASN_SUCCESS; +} +void pmch_info_ext_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pmch-Config-r12"); + pmch_cfg_r12.to_json(j); + j.start_array("mbms-SessionInfoList-r12"); + for (uint32_t i1 = 0; i1 < mbms_session_info_list_r12.size(); ++i1) { + mbms_session_info_list_r12[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MBSFNAreaConfiguration-v1430-IEs ::= SEQUENCE +mbsfn_area_cfg_v1430_ies_s::mbsfn_area_cfg_v1430_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE mbsfn_area_cfg_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, common_sf_alloc_r14, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_area_cfg_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(common_sf_alloc_r14, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void mbsfn_area_cfg_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("commonSF-Alloc-r14"); + for (uint32_t i1 = 0; i1 < common_sf_alloc_r14.size(); ++i1) { + common_sf_alloc_r14[i1].to_json(j); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// PMCH-Config-r9 ::= SEQUENCE +pmch_cfg_r9_s::pmch_cfg_r9_s() +{ + ext = false; +} +SRSASN_CODE pmch_cfg_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, sf_alloc_end_r9, (uint16_t)0, (uint16_t)1535)); + HANDLE_CODE(pack_unalign_integer(bref, data_mcs_r9, (uint8_t)0, (uint8_t)28)); + HANDLE_CODE(pack_enum(bref, mch_sched_period_r9)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pmch_cfg_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(sf_alloc_end_r9, bref, (uint16_t)0, (uint16_t)1535)); + HANDLE_CODE(unpack_unalign_integer(data_mcs_r9, bref, (uint8_t)0, (uint8_t)28)); + HANDLE_CODE(unpack_enum(mch_sched_period_r9, bref)); + + return SRSASN_SUCCESS; +} +void pmch_cfg_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sf-AllocEnd-r9", sf_alloc_end_r9); + j.write_int("dataMCS-r9", data_mcs_r9); + j.write_str("mch-SchedulingPeriod-r9", mch_sched_period_r9.to_string()); + j.end_obj(); +} + +// CountingRequestInfo-r10 ::= SEQUENCE +count_request_info_r10_s::count_request_info_r10_s() +{ + ext = false; +} +SRSASN_CODE count_request_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(tmgi_r10.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE count_request_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(tmgi_r10.unpack(bref)); + + return SRSASN_SUCCESS; +} +void count_request_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("tmgi-r10"); + tmgi_r10.to_json(j); + j.end_obj(); +} + +// MBSFNAreaConfiguration-v1250-IEs ::= SEQUENCE +mbsfn_area_cfg_v1250_ies_s::mbsfn_area_cfg_v1250_ies_s() +{ + pmch_info_list_ext_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mbsfn_area_cfg_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pmch_info_list_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (pmch_info_list_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pmch_info_list_ext_r12, 0, 15)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_area_cfg_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pmch_info_list_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (pmch_info_list_ext_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(pmch_info_list_ext_r12, bref, 0, 15)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mbsfn_area_cfg_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pmch_info_list_ext_r12_present) { + j.start_array("pmch-InfoListExt-r12"); + for (uint32_t i1 = 0; i1 < pmch_info_list_ext_r12.size(); ++i1) { + pmch_info_list_ext_r12[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// PMCH-Info-r9 ::= SEQUENCE +pmch_info_r9_s::pmch_info_r9_s() +{ + ext = false; +} +SRSASN_CODE pmch_info_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pmch_cfg_r9.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_session_info_list_r9, 0, 29)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pmch_info_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(pmch_cfg_r9.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(mbms_session_info_list_r9, bref, 0, 29)); + + return SRSASN_SUCCESS; +} +void pmch_info_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pmch-Config-r9"); + pmch_cfg_r9.to_json(j); + j.start_array("mbms-SessionInfoList-r9"); + for (uint32_t i1 = 0; i1 < mbms_session_info_list_r9.size(); ++i1) { + mbms_session_info_list_r9[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MBSFNAreaConfiguration-v930-IEs ::= SEQUENCE +mbsfn_area_cfg_v930_ies_s::mbsfn_area_cfg_v930_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mbsfn_area_cfg_v930_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_area_cfg_v930_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mbsfn_area_cfg_v930_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MBMSCountingRequest-r10 ::= SEQUENCE +mbms_count_request_r10_s::mbms_count_request_r10_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mbms_count_request_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, count_request_list_r10, 1, 16)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_count_request_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(count_request_list_r10, bref, 1, 16)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mbms_count_request_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("countingRequestList-r10"); + for (uint32_t i1 = 0; i1 < count_request_list_r10.size(); ++i1) { + count_request_list_r10[i1].to_json(j); + } + j.end_array(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// MBSFNAreaConfiguration-r9 ::= SEQUENCE +mbsfn_area_cfg_r9_s::mbsfn_area_cfg_r9_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE mbsfn_area_cfg_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, common_sf_alloc_r9, 1, 8)); + HANDLE_CODE(pack_enum(bref, common_sf_alloc_period_r9)); + HANDLE_CODE(pack_dyn_seq_of(bref, pmch_info_list_r9, 0, 15)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbsfn_area_cfg_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(common_sf_alloc_r9, bref, 1, 8)); + HANDLE_CODE(unpack_enum(common_sf_alloc_period_r9, bref)); + HANDLE_CODE(unpack_dyn_seq_of(pmch_info_list_r9, bref, 0, 15)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mbsfn_area_cfg_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("commonSF-Alloc-r9"); + for (uint32_t i1 = 0; i1 < common_sf_alloc_r9.size(); ++i1) { + common_sf_alloc_r9[i1].to_json(j); + } + j.end_array(); + j.write_str("commonSF-AllocPeriod-r9", common_sf_alloc_period_r9.to_string()); + j.start_array("pmch-InfoList-r9"); + for (uint32_t i1 = 0; i1 < pmch_info_list_r9.size(); ++i1) { + pmch_info_list_r9[i1].to_json(j); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MCCH-MessageType ::= CHOICE +void mcch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + case types::later: + c.destroy(); + break; + default: + break; + } +} +void mcch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::later: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c"); + } +} +mcch_msg_type_c::mcch_msg_type_c(const mcch_msg_type_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::later: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c"); + } +} +mcch_msg_type_c& mcch_msg_type_c::operator=(const mcch_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::later: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c"); + } + + return *this; +} +void mcch_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::later: + j.write_fieldname("later"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE mcch_msg_type_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::later: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_msg_type_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::later: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mcch_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; +} +void mcch_msg_type_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mbsfn_area_cfg_r9: + j.write_fieldname("mbsfnAreaConfiguration-r9"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE mcch_msg_type_c::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::mbsfn_area_cfg_r9: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_msg_type_c::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::mbsfn_area_cfg_r9: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mcch_msg_type_c::later_c_::destroy_() +{ + switch (type_) { + case types::c2: + c.destroy(); + break; + default: + break; + } +} +void mcch_msg_type_c::later_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c2: + c.init(); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_"); + } +} +mcch_msg_type_c::later_c_::later_c_(const mcch_msg_type_c::later_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c2: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_"); + } +} +mcch_msg_type_c::later_c_& mcch_msg_type_c::later_c_::operator=(const mcch_msg_type_c::later_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c2: + c.set(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_"); + } + + return *this; +} +void mcch_msg_type_c::later_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c2: + j.write_fieldname("c2"); + c.get().to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_"); + } + j.end_obj(); +} +SRSASN_CODE mcch_msg_type_c::later_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_msg_type_c::later_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mcch_msg_type_c::later_c_::c2_c_::set(types::options e) +{ + type_ = e; +} +void mcch_msg_type_c::later_c_::c2_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mbms_count_request_r10: + j.write_fieldname("mbmsCountingRequest-r10"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_::c2_c_"); + } + j.end_obj(); +} +SRSASN_CODE mcch_msg_type_c::later_c_::c2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::mbms_count_request_r10: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_::c2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_msg_type_c::later_c_::c2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::mbms_count_request_r10: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mcch_msg_type_c::later_c_::c2_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MCCH-Message ::= SEQUENCE +SRSASN_CODE mcch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_msg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void mcch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("MCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// Paging-v1530-IEs ::= SEQUENCE +paging_v1530_ies_s::paging_v1530_ies_s() +{ + access_type_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE paging_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(access_type_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(access_type_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void paging_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (access_type_present) { + j.write_str("accessType", "non3GPP"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// Paging-v1310-IEs ::= SEQUENCE +paging_v1310_ies_s::paging_v1310_ies_s() +{ + redist_ind_r13_present = false; + sys_info_mod_e_drx_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE paging_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(redist_ind_r13_present, 1)); + HANDLE_CODE(bref.pack(sys_info_mod_e_drx_r13_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 paging_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(redist_ind_r13_present, 1)); + HANDLE_CODE(bref.unpack(sys_info_mod_e_drx_r13_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 paging_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (redist_ind_r13_present) { + j.write_str("redistributionIndication-r13", "true"); + } + if (sys_info_mod_e_drx_r13_present) { + j.write_str("systemInfoModification-eDRX-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// S-TMSI ::= SEQUENCE +SRSASN_CODE s_tmsi_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(mmec.pack(bref)); + HANDLE_CODE(m_tmsi.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE s_tmsi_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(mmec.unpack(bref)); + HANDLE_CODE(m_tmsi.unpack(bref)); + + return SRSASN_SUCCESS; +} +void s_tmsi_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("mmec", mmec.to_string()); + j.write_str("m-TMSI", m_tmsi.to_string()); + j.end_obj(); +} + +// Paging-v1130-IEs ::= SEQUENCE +paging_v1130_ies_s::paging_v1130_ies_s() +{ + eab_param_mod_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE paging_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eab_param_mod_r11_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 paging_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(eab_param_mod_r11_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 paging_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eab_param_mod_r11_present) { + j.write_str("eab-ParamModification-r11", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// PagingUE-Identity ::= CHOICE +void paging_ue_id_c::destroy_() +{ + switch (type_) { + case types::s_tmsi: + c.destroy(); + break; + case types::imsi: + c.destroy(); + break; + case types::ng_minus5_g_s_tmsi_r15: + c.destroy >(); + break; + case types::i_rnti_r15: + c.destroy >(); + break; + default: + break; + } +} +void paging_ue_id_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::s_tmsi: + c.init(); + break; + case types::imsi: + c.init(); + break; + case types::ng_minus5_g_s_tmsi_r15: + c.init >(); + break; + case types::i_rnti_r15: + 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::s_tmsi: + c.init(other.c.get()); + break; + case types::imsi: + c.init(other.c.get()); + break; + case types::ng_minus5_g_s_tmsi_r15: + c.init(other.c.get >()); + break; + case types::i_rnti_r15: + 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::s_tmsi: + c.set(other.c.get()); + break; + case types::imsi: + c.set(other.c.get()); + break; + case types::ng_minus5_g_s_tmsi_r15: + c.set(other.c.get >()); + break; + case types::i_rnti_r15: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "paging_ue_id_c"); + } + + return *this; +} +void paging_ue_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::s_tmsi: + j.write_fieldname("s-TMSI"); + c.get().to_json(j); + break; + case types::imsi: + j.start_array("imsi"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + j.write_int(c.get()[i1]); + } + j.end_array(); + break; + case types::ng_minus5_g_s_tmsi_r15: + j.write_str("ng-5G-S-TMSI-r15", c.get >().to_string()); + break; + case types::i_rnti_r15: + j.write_str("i-RNTI-r15", 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::s_tmsi: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::imsi: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 6, 21, UnalignedIntegerPacker(0, 9))); + break; + case types::ng_minus5_g_s_tmsi_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get >().pack(bref)); + } break; + case types::i_rnti_r15: { + varlength_field_pack_guard scope(bref); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::s_tmsi: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::imsi: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 6, 21, UnalignedIntegerPacker(0, 9))); + break; + case types::ng_minus5_g_s_tmsi_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get >().unpack(bref)); + } break; + case types::i_rnti_r15: { + varlength_field_unpack_guard scope(bref); + 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; +} + +// Paging-v920-IEs ::= SEQUENCE +paging_v920_ies_s::paging_v920_ies_s() +{ + cmas_ind_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE paging_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cmas_ind_r9_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 paging_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cmas_ind_r9_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 paging_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cmas_ind_r9_present) { + j.write_str("cmas-Indication-r9", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// PagingRecord ::= SEQUENCE +paging_record_s::paging_record_s() +{ + ext = false; +} +SRSASN_CODE paging_record_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(pack_enum(bref, cn_domain)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_record_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(unpack_enum(cn_domain, 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); + j.write_str("cn-Domain", cn_domain.to_string()); + j.end_obj(); +} + +// Paging-v890-IEs ::= SEQUENCE +paging_v890_ies_s::paging_v890_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE paging_v890_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_v890_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void paging_v890_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// Paging ::= SEQUENCE +paging_s::paging_s() +{ + paging_record_list_present = false; + sys_info_mod_present = false; + etws_ind_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE paging_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(paging_record_list_present, 1)); + HANDLE_CODE(bref.pack(sys_info_mod_present, 1)); + HANDLE_CODE(bref.pack(etws_ind_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (paging_record_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list, 1, 16)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(paging_record_list_present, 1)); + HANDLE_CODE(bref.unpack(sys_info_mod_present, 1)); + HANDLE_CODE(bref.unpack(etws_ind_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, 16)); + } + 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_present) { + j.start_array("pagingRecordList"); + for (uint32_t i1 = 0; i1 < paging_record_list.size(); ++i1) { + paging_record_list[i1].to_json(j); + } + j.end_array(); + } + if (sys_info_mod_present) { + j.write_str("systemInfoModification", "true"); + } + if (etws_ind_present) { + j.write_str("etws-Indication", "true"); + } + 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::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void pcch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c"); + } +} +pcch_msg_type_c::pcch_msg_type_c(const pcch_msg_type_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c"); + } +} +pcch_msg_type_c& pcch_msg_type_c::operator=(const pcch_msg_type_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::msg_class_ext: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c"); + } + + return *this; +} +void pcch_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: + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pcch_msg_type_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void pcch_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; +} +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; + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::paging: + HANDLE_CODE(c.pack(bref)); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::paging: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// 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(bit_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(); +} + +// MBMSSessionInfo-r13 ::= SEQUENCE +mbms_session_info_r13_s::mbms_session_info_r13_s() +{ + session_id_r13_present = false; +} +SRSASN_CODE mbms_session_info_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(session_id_r13_present, 1)); + + HANDLE_CODE(tmgi_r13.pack(bref)); + if (session_id_r13_present) { + HANDLE_CODE(session_id_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_session_info_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(session_id_r13_present, 1)); + + HANDLE_CODE(tmgi_r13.unpack(bref)); + if (session_id_r13_present) { + HANDLE_CODE(session_id_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mbms_session_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("tmgi-r13"); + tmgi_r13.to_json(j); + if (session_id_r13_present) { + j.write_str("sessionId-r13", session_id_r13.to_string()); + } + j.end_obj(); +} + +// SC-MTCH-SchedulingInfo-BR-r14 ::= SEQUENCE +sc_mtch_sched_info_br_r14_s::sc_mtch_sched_info_br_r14_s() +{ + ext = false; +} +SRSASN_CODE sc_mtch_sched_info_br_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, on_dur_timer_scptm_r14)); + HANDLE_CODE(pack_enum(bref, drx_inactivity_timer_scptm_r14)); + HANDLE_CODE(sched_period_start_offset_scptm_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_sched_info_br_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(on_dur_timer_scptm_r14, bref)); + HANDLE_CODE(unpack_enum(drx_inactivity_timer_scptm_r14, bref)); + HANDLE_CODE(sched_period_start_offset_scptm_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sc_mtch_sched_info_br_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("onDurationTimerSCPTM-r14", on_dur_timer_scptm_r14.to_string()); + j.write_str("drx-InactivityTimerSCPTM-r14", drx_inactivity_timer_scptm_r14.to_string()); + j.write_fieldname("schedulingPeriodStartOffsetSCPTM-r14"); + sched_period_start_offset_scptm_r14.to_json(j); + j.end_obj(); +} + +void sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::destroy_() {} +void sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::sched_period_start_offset_scptm_r14_c_( + const sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf10: + c.init(other.c.get()); + break; + case types::sf20: + c.init(other.c.get()); + break; + case types::sf32: + c.init(other.c.get()); + break; + case types::sf40: + c.init(other.c.get()); + break; + case types::sf64: + c.init(other.c.get()); + break; + case types::sf80: + c.init(other.c.get()); + break; + case types::sf128: + c.init(other.c.get()); + break; + case types::sf160: + c.init(other.c.get()); + break; + case types::sf256: + c.init(other.c.get()); + break; + case types::sf320: + c.init(other.c.get()); + break; + case types::sf512: + c.init(other.c.get()); + break; + case types::sf640: + c.init(other.c.get()); + break; + case types::sf1024: + c.init(other.c.get()); + break; + case types::sf2048: + c.init(other.c.get()); + break; + case types::sf4096: + c.init(other.c.get()); + break; + case types::sf8192: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_"); + } +} +sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_& +sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_:: +operator=(const sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf10: + c.set(other.c.get()); + break; + case types::sf20: + c.set(other.c.get()); + break; + case types::sf32: + c.set(other.c.get()); + break; + case types::sf40: + c.set(other.c.get()); + break; + case types::sf64: + c.set(other.c.get()); + break; + case types::sf80: + c.set(other.c.get()); + break; + case types::sf128: + c.set(other.c.get()); + break; + case types::sf160: + c.set(other.c.get()); + break; + case types::sf256: + c.set(other.c.get()); + break; + case types::sf320: + c.set(other.c.get()); + break; + case types::sf512: + c.set(other.c.get()); + break; + case types::sf640: + c.set(other.c.get()); + break; + case types::sf1024: + c.set(other.c.get()); + break; + case types::sf2048: + c.set(other.c.get()); + break; + case types::sf4096: + c.set(other.c.get()); + break; + case types::sf8192: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_"); + } + + return *this; +} +void sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf10: + j.write_int("sf10", c.get()); + break; + case types::sf20: + j.write_int("sf20", c.get()); + break; + case types::sf32: + j.write_int("sf32", c.get()); + break; + case types::sf40: + j.write_int("sf40", c.get()); + break; + case types::sf64: + j.write_int("sf64", c.get()); + break; + case types::sf80: + j.write_int("sf80", c.get()); + break; + case types::sf128: + j.write_int("sf128", c.get()); + break; + case types::sf160: + j.write_int("sf160", c.get()); + break; + case types::sf256: + j.write_int("sf256", c.get()); + break; + case types::sf320: + j.write_int("sf320", c.get()); + break; + case types::sf512: + j.write_int("sf512", c.get()); + break; + case types::sf640: + j.write_int("sf640", c.get()); + break; + case types::sf1024: + j.write_int("sf1024", c.get()); + break; + case types::sf2048: + j.write_int("sf2048", c.get()); + break; + case types::sf4096: + j.write_int("sf4096", c.get()); + break; + case types::sf8192: + j.write_int("sf8192", c.get()); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf10: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1023)); + break; + case types::sf2048: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)2047)); + break; + case types::sf4096: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)4095)); + break; + case types::sf8192: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)8191)); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf10: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1023)); + break; + case types::sf2048: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)2047)); + break; + case types::sf4096: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)4095)); + break; + case types::sf8192: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)8191)); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SC-MTCH-SchedulingInfo-r13 ::= SEQUENCE +sc_mtch_sched_info_r13_s::sc_mtch_sched_info_r13_s() +{ + ext = false; +} +SRSASN_CODE sc_mtch_sched_info_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, on_dur_timer_scptm_r13)); + HANDLE_CODE(pack_enum(bref, drx_inactivity_timer_scptm_r13)); + HANDLE_CODE(sched_period_start_offset_scptm_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_sched_info_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(on_dur_timer_scptm_r13, bref)); + HANDLE_CODE(unpack_enum(drx_inactivity_timer_scptm_r13, bref)); + HANDLE_CODE(sched_period_start_offset_scptm_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sc_mtch_sched_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("onDurationTimerSCPTM-r13", on_dur_timer_scptm_r13.to_string()); + j.write_str("drx-InactivityTimerSCPTM-r13", drx_inactivity_timer_scptm_r13.to_string()); + j.write_fieldname("schedulingPeriodStartOffsetSCPTM-r13"); + sched_period_start_offset_scptm_r13.to_json(j); + j.end_obj(); +} + +void sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::destroy_() {} +void sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::sched_period_start_offset_scptm_r13_c_( + const sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf10: + c.init(other.c.get()); + break; + case types::sf20: + c.init(other.c.get()); + break; + case types::sf32: + c.init(other.c.get()); + break; + case types::sf40: + c.init(other.c.get()); + break; + case types::sf64: + c.init(other.c.get()); + break; + case types::sf80: + c.init(other.c.get()); + break; + case types::sf128: + c.init(other.c.get()); + break; + case types::sf160: + c.init(other.c.get()); + break; + case types::sf256: + c.init(other.c.get()); + break; + case types::sf320: + c.init(other.c.get()); + break; + case types::sf512: + c.init(other.c.get()); + break; + case types::sf640: + c.init(other.c.get()); + break; + case types::sf1024: + c.init(other.c.get()); + break; + case types::sf2048: + c.init(other.c.get()); + break; + case types::sf4096: + c.init(other.c.get()); + break; + case types::sf8192: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_"); + } +} +sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_& +sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_:: +operator=(const sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf10: + c.set(other.c.get()); + break; + case types::sf20: + c.set(other.c.get()); + break; + case types::sf32: + c.set(other.c.get()); + break; + case types::sf40: + c.set(other.c.get()); + break; + case types::sf64: + c.set(other.c.get()); + break; + case types::sf80: + c.set(other.c.get()); + break; + case types::sf128: + c.set(other.c.get()); + break; + case types::sf160: + c.set(other.c.get()); + break; + case types::sf256: + c.set(other.c.get()); + break; + case types::sf320: + c.set(other.c.get()); + break; + case types::sf512: + c.set(other.c.get()); + break; + case types::sf640: + c.set(other.c.get()); + break; + case types::sf1024: + c.set(other.c.get()); + break; + case types::sf2048: + c.set(other.c.get()); + break; + case types::sf4096: + c.set(other.c.get()); + break; + case types::sf8192: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_"); + } + + return *this; +} +void sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf10: + j.write_int("sf10", c.get()); + break; + case types::sf20: + j.write_int("sf20", c.get()); + break; + case types::sf32: + j.write_int("sf32", c.get()); + break; + case types::sf40: + j.write_int("sf40", c.get()); + break; + case types::sf64: + j.write_int("sf64", c.get()); + break; + case types::sf80: + j.write_int("sf80", c.get()); + break; + case types::sf128: + j.write_int("sf128", c.get()); + break; + case types::sf160: + j.write_int("sf160", c.get()); + break; + case types::sf256: + j.write_int("sf256", c.get()); + break; + case types::sf320: + j.write_int("sf320", c.get()); + break; + case types::sf512: + j.write_int("sf512", c.get()); + break; + case types::sf640: + j.write_int("sf640", c.get()); + break; + case types::sf1024: + j.write_int("sf1024", c.get()); + break; + case types::sf2048: + j.write_int("sf2048", c.get()); + break; + case types::sf4096: + j.write_int("sf4096", c.get()); + break; + case types::sf8192: + j.write_int("sf8192", c.get()); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf10: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1023)); + break; + case types::sf2048: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)2048)); + break; + case types::sf4096: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)4096)); + break; + case types::sf8192: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)8192)); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf10: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)9)); + break; + case types::sf20: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)19)); + break; + case types::sf32: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)31)); + break; + case types::sf40: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)39)); + break; + case types::sf64: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)63)); + break; + case types::sf80: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::sf128: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + case types::sf160: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::sf256: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)255)); + break; + case types::sf320: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::sf512: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::sf640: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::sf1024: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1023)); + break; + case types::sf2048: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)2048)); + break; + case types::sf4096: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)4096)); + break; + case types::sf8192: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)8192)); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// PCI-ARFCN-r13 ::= SEQUENCE +pci_arfcn_r13_s::pci_arfcn_r13_s() +{ + carrier_freq_r13_present = false; +} +SRSASN_CODE pci_arfcn_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r13, (uint16_t)0, (uint16_t)503)); + if (carrier_freq_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r13, (uint32_t)0, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_arfcn_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r13, bref, (uint16_t)0, (uint16_t)503)); + if (carrier_freq_r13_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r13, bref, (uint32_t)0, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +void pci_arfcn_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r13", pci_r13); + if (carrier_freq_r13_present) { + j.write_int("carrierFreq-r13", carrier_freq_r13); + } + j.end_obj(); +} + +// SC-MTCH-Info-BR-r14 ::= SEQUENCE +sc_mtch_info_br_r14_s::sc_mtch_info_br_r14_s() +{ + ext = false; + sc_mtch_sched_info_r14_present = false; + sc_mtch_neighbour_cell_r14_present = false; + p_a_r14_present = false; +} +SRSASN_CODE sc_mtch_info_br_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sc_mtch_sched_info_r14_present, 1)); + HANDLE_CODE(bref.pack(sc_mtch_neighbour_cell_r14_present, 1)); + HANDLE_CODE(bref.pack(p_a_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, sc_mtch_carrier_freq_r14, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(mbms_session_info_r14.pack(bref)); + HANDLE_CODE(g_rnti_r14.pack(bref)); + if (sc_mtch_sched_info_r14_present) { + HANDLE_CODE(sc_mtch_sched_info_r14.pack(bref)); + } + if (sc_mtch_neighbour_cell_r14_present) { + HANDLE_CODE(sc_mtch_neighbour_cell_r14.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, mpdcch_nb_sc_mtch_r14, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(pack_enum(bref, mpdcch_num_repeat_sc_mtch_r14)); + HANDLE_CODE(mpdcch_start_sf_sc_mtch_r14.pack(bref)); + HANDLE_CODE(pack_enum(bref, mpdcch_pdsch_hop_cfg_sc_mtch_r14)); + HANDLE_CODE(pack_enum(bref, mpdcch_pdsch_cemode_cfg_sc_mtch_r14)); + HANDLE_CODE(pack_enum(bref, mpdcch_pdsch_max_bw_sc_mtch_r14)); + HANDLE_CODE(pack_enum(bref, mpdcch_offset_sc_mtch_r14)); + if (p_a_r14_present) { + HANDLE_CODE(pack_enum(bref, p_a_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_info_br_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sc_mtch_sched_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(sc_mtch_neighbour_cell_r14_present, 1)); + HANDLE_CODE(bref.unpack(p_a_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(sc_mtch_carrier_freq_r14, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(mbms_session_info_r14.unpack(bref)); + HANDLE_CODE(g_rnti_r14.unpack(bref)); + if (sc_mtch_sched_info_r14_present) { + HANDLE_CODE(sc_mtch_sched_info_r14.unpack(bref)); + } + if (sc_mtch_neighbour_cell_r14_present) { + HANDLE_CODE(sc_mtch_neighbour_cell_r14.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(mpdcch_nb_sc_mtch_r14, bref, (uint8_t)1, (uint8_t)16)); + HANDLE_CODE(unpack_enum(mpdcch_num_repeat_sc_mtch_r14, bref)); + HANDLE_CODE(mpdcch_start_sf_sc_mtch_r14.unpack(bref)); + HANDLE_CODE(unpack_enum(mpdcch_pdsch_hop_cfg_sc_mtch_r14, bref)); + HANDLE_CODE(unpack_enum(mpdcch_pdsch_cemode_cfg_sc_mtch_r14, bref)); + HANDLE_CODE(unpack_enum(mpdcch_pdsch_max_bw_sc_mtch_r14, bref)); + HANDLE_CODE(unpack_enum(mpdcch_offset_sc_mtch_r14, bref)); + if (p_a_r14_present) { + HANDLE_CODE(unpack_enum(p_a_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void sc_mtch_info_br_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sc-mtch-CarrierFreq-r14", sc_mtch_carrier_freq_r14); + j.write_fieldname("mbmsSessionInfo-r14"); + mbms_session_info_r14.to_json(j); + j.write_str("g-RNTI-r14", g_rnti_r14.to_string()); + if (sc_mtch_sched_info_r14_present) { + j.write_fieldname("sc-mtch-schedulingInfo-r14"); + sc_mtch_sched_info_r14.to_json(j); + } + if (sc_mtch_neighbour_cell_r14_present) { + j.write_str("sc-mtch-neighbourCell-r14", sc_mtch_neighbour_cell_r14.to_string()); + } + j.write_int("mpdcch-Narrowband-SC-MTCH-r14", mpdcch_nb_sc_mtch_r14); + j.write_str("mpdcch-NumRepetition-SC-MTCH-r14", mpdcch_num_repeat_sc_mtch_r14.to_string()); + j.write_fieldname("mpdcch-StartSF-SC-MTCH-r14"); + mpdcch_start_sf_sc_mtch_r14.to_json(j); + j.write_str("mpdcch-PDSCH-HoppingConfig-SC-MTCH-r14", mpdcch_pdsch_hop_cfg_sc_mtch_r14.to_string()); + j.write_str("mpdcch-PDSCH-CEmodeConfig-SC-MTCH-r14", mpdcch_pdsch_cemode_cfg_sc_mtch_r14.to_string()); + j.write_str("mpdcch-PDSCH-MaxBandwidth-SC-MTCH-r14", mpdcch_pdsch_max_bw_sc_mtch_r14.to_string()); + j.write_str("mpdcch-Offset-SC-MTCH-r14", mpdcch_offset_sc_mtch_r14.to_string()); + if (p_a_r14_present) { + j.write_str("p-a-r14", p_a_r14.to_string()); + } + j.end_obj(); +} + +void sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::destroy_() {} +void sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::mpdcch_start_sf_sc_mtch_r14_c_( + const sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r14: + c.init(other.c.get()); + break; + case types::tdd_r14: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_"); + } +} +sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_& sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_:: + operator=(const sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r14: + c.set(other.c.get()); + break; + case types::tdd_r14: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_"); + } + + return *this; +} +void sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r14: + j.write_str("fdd-r14", c.get().to_string()); + break; + case types::tdd_r14: + j.write_str("tdd-r14", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r14: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::tdd_r14: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r14: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::tdd_r14: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SC-MTCH-Info-r13 ::= SEQUENCE +sc_mtch_info_r13_s::sc_mtch_info_r13_s() +{ + ext = false; + sc_mtch_sched_info_r13_present = false; + sc_mtch_neighbour_cell_r13_present = false; + p_a_r13_present = false; +} +SRSASN_CODE sc_mtch_info_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sc_mtch_sched_info_r13_present, 1)); + HANDLE_CODE(bref.pack(sc_mtch_neighbour_cell_r13_present, 1)); + + HANDLE_CODE(mbms_session_info_r13.pack(bref)); + HANDLE_CODE(g_rnti_r13.pack(bref)); + if (sc_mtch_sched_info_r13_present) { + HANDLE_CODE(sc_mtch_sched_info_r13.pack(bref)); + } + if (sc_mtch_neighbour_cell_r13_present) { + HANDLE_CODE(sc_mtch_neighbour_cell_r13.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= p_a_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(p_a_r13_present, 1)); + if (p_a_r13_present) { + HANDLE_CODE(pack_enum(bref, p_a_r13)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mtch_info_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sc_mtch_sched_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(sc_mtch_neighbour_cell_r13_present, 1)); + + HANDLE_CODE(mbms_session_info_r13.unpack(bref)); + HANDLE_CODE(g_rnti_r13.unpack(bref)); + if (sc_mtch_sched_info_r13_present) { + HANDLE_CODE(sc_mtch_sched_info_r13.unpack(bref)); + } + if (sc_mtch_neighbour_cell_r13_present) { + HANDLE_CODE(sc_mtch_neighbour_cell_r13.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(p_a_r13_present, 1)); + if (p_a_r13_present) { + HANDLE_CODE(unpack_enum(p_a_r13, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sc_mtch_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mbmsSessionInfo-r13"); + mbms_session_info_r13.to_json(j); + j.write_str("g-RNTI-r13", g_rnti_r13.to_string()); + if (sc_mtch_sched_info_r13_present) { + j.write_fieldname("sc-mtch-schedulingInfo-r13"); + sc_mtch_sched_info_r13.to_json(j); + } + if (sc_mtch_neighbour_cell_r13_present) { + j.write_str("sc-mtch-neighbourCell-r13", sc_mtch_neighbour_cell_r13.to_string()); + } + if (p_a_r13_present) { + j.write_str("p-a-r13", p_a_r13.to_string()); + } + j.end_obj(); +} + +// SCPTMConfiguration-v1340 ::= SEQUENCE +scptm_cfg_v1340_s::scptm_cfg_v1340_s() +{ + p_b_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scptm_cfg_v1340_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(p_b_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (p_b_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_b_r13, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scptm_cfg_v1340_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(p_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (p_b_r13_present) { + HANDLE_CODE(unpack_unalign_integer(p_b_r13, bref, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +void scptm_cfg_v1340_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (p_b_r13_present) { + j.write_int("p-b-r13", p_b_r13); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SCPTMConfiguration-BR-r14 ::= SEQUENCE +scptm_cfg_br_r14_s::scptm_cfg_br_r14_s() +{ + scptm_neighbour_cell_list_r14_present = false; + p_b_r14_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scptm_cfg_br_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scptm_neighbour_cell_list_r14_present, 1)); + HANDLE_CODE(bref.pack(p_b_r14_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, sc_mtch_info_list_r14, 0, 128)); + if (scptm_neighbour_cell_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, scptm_neighbour_cell_list_r14, 1, 8)); + } + if (p_b_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_b_r14, (uint8_t)0, (uint8_t)3)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scptm_cfg_br_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scptm_neighbour_cell_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(p_b_r14_present, 1)); + 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(sc_mtch_info_list_r14, bref, 0, 128)); + if (scptm_neighbour_cell_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(scptm_neighbour_cell_list_r14, bref, 1, 8)); + } + if (p_b_r14_present) { + HANDLE_CODE(unpack_unalign_integer(p_b_r14, bref, (uint8_t)0, (uint8_t)3)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scptm_cfg_br_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("sc-mtch-InfoList-r14"); + for (uint32_t i1 = 0; i1 < sc_mtch_info_list_r14.size(); ++i1) { + sc_mtch_info_list_r14[i1].to_json(j); + } + j.end_array(); + if (scptm_neighbour_cell_list_r14_present) { + j.start_array("scptm-NeighbourCellList-r14"); + for (uint32_t i1 = 0; i1 < scptm_neighbour_cell_list_r14.size(); ++i1) { + scptm_neighbour_cell_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (p_b_r14_present) { + j.write_int("p-b-r14", p_b_r14); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SCPTMConfiguration-r13 ::= SEQUENCE +scptm_cfg_r13_s::scptm_cfg_r13_s() +{ + scptm_neighbour_cell_list_r13_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scptm_cfg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scptm_neighbour_cell_list_r13_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, sc_mtch_info_list_r13, 0, 1023)); + if (scptm_neighbour_cell_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, scptm_neighbour_cell_list_r13, 1, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scptm_cfg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scptm_neighbour_cell_list_r13_present, 1)); + 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(sc_mtch_info_list_r13, bref, 0, 1023)); + if (scptm_neighbour_cell_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(scptm_neighbour_cell_list_r13, bref, 1, 8)); + } + 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 scptm_cfg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("sc-mtch-InfoList-r13"); + for (uint32_t i1 = 0; i1 < sc_mtch_info_list_r13.size(); ++i1) { + sc_mtch_info_list_r13[i1].to_json(j); + } + j.end_array(); + if (scptm_neighbour_cell_list_r13_present) { + j.start_array("scptm-NeighbourCellList-r13"); + for (uint32_t i1 = 0; i1 < scptm_neighbour_cell_list_r13.size(); ++i1) { + scptm_neighbour_cell_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SC-MCCH-MessageType-r13 ::= CHOICE +void sc_mcch_msg_type_r13_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + case types::msg_class_ext: + c.destroy(); + break; + default: + break; + } +} +void sc_mcch_msg_type_r13_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_, "sc_mcch_msg_type_r13_c"); + } +} +sc_mcch_msg_type_r13_c::sc_mcch_msg_type_r13_c(const sc_mcch_msg_type_r13_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_, "sc_mcch_msg_type_r13_c"); + } +} +sc_mcch_msg_type_r13_c& sc_mcch_msg_type_r13_c::operator=(const sc_mcch_msg_type_r13_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_, "sc_mcch_msg_type_r13_c"); + } + + return *this; +} +void sc_mcch_msg_type_r13_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_, "sc_mcch_msg_type_r13_c"); + } + j.end_obj(); +} +SRSASN_CODE sc_mcch_msg_type_r13_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + 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_, "sc_mcch_msg_type_r13_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_msg_type_r13_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, 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_, "sc_mcch_msg_type_r13_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sc_mcch_msg_type_r13_c::c1_c_::set(types::options e) +{ + type_ = e; +} +void sc_mcch_msg_type_r13_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scptm_cfg_r13: + j.write_fieldname("scptmConfiguration-r13"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mcch_msg_type_r13_c::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::scptm_cfg_r13: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_msg_type_r13_c::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::scptm_cfg_r13: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sc_mcch_msg_type_r13_c::msg_class_ext_c_::destroy_() +{ + switch (type_) { + case types::c2: + c.destroy(); + break; + default: + break; + } +} +void sc_mcch_msg_type_r13_c::msg_class_ext_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c2: + c.init(); + break; + case types::msg_class_ext_future_r14: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_"); + } +} +sc_mcch_msg_type_r13_c::msg_class_ext_c_::msg_class_ext_c_(const sc_mcch_msg_type_r13_c::msg_class_ext_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c2: + c.init(other.c.get()); + break; + case types::msg_class_ext_future_r14: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_"); + } +} +sc_mcch_msg_type_r13_c::msg_class_ext_c_& sc_mcch_msg_type_r13_c::msg_class_ext_c_:: + operator=(const sc_mcch_msg_type_r13_c::msg_class_ext_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c2: + c.set(other.c.get()); + break; + case types::msg_class_ext_future_r14: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_"); + } + + return *this; +} +void sc_mcch_msg_type_r13_c::msg_class_ext_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c2: + j.write_fieldname("c2"); + c.get().to_json(j); + break; + case types::msg_class_ext_future_r14: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mcch_msg_type_r13_c::msg_class_ext_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext_future_r14: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_msg_type_r13_c::msg_class_ext_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext_future_r14: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::set(types::options e) +{ + type_ = e; +} +void sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scptm_cfg_br_r14: + j.write_fieldname("scptmConfiguration-BR-r14"); + c.to_json(j); + break; + case types::spare: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_"); + } + j.end_obj(); +} +SRSASN_CODE sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::scptm_cfg_br_r14: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::scptm_cfg_br_r14: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare: + break; + default: + log_invalid_choice_id(type_, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SC-MCCH-Message-r13 ::= SEQUENCE +SRSASN_CODE sc_mcch_msg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sc_mcch_msg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void sc_mcch_msg_r13_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("SC-MCCH-Message-r13"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// InitialUE-Identity ::= CHOICE +void init_ue_id_c::destroy_() +{ + switch (type_) { + case types::s_tmsi: + 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::s_tmsi: + 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::s_tmsi: + 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::s_tmsi: + 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; +} +void init_ue_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::s_tmsi: + j.write_fieldname("s-TMSI"); + c.get().to_json(j); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::s_tmsi: + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::s_tmsi: + 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; +} + +// ReestabUE-Identity ::= SEQUENCE +SRSASN_CODE reestab_ue_id_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(c_rnti.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(short_mac_i.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE reestab_ue_id_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(c_rnti.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)503)); + 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_str("c-RNTI", c_rnti.to_string()); + j.write_int("physCellId", pci); + j.write_str("shortMAC-I", short_mac_i.to_string()); + j.end_obj(); +} + +// RRCConnectionReestablishmentRequest-r8-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_reest_request_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(pack_enum(bref, reest_cause)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_request_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(unpack_enum(reest_cause, bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_request_r8_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(); +} + +// RRCConnectionRequest-r8-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_request_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(pack_enum(bref, establishment_cause)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_request_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(unpack_enum(establishment_cause, bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_request_r8_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(); +} + +// RRCConnectionResumeRequest-5GC-r15-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_resume_request_minus5_gc_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(resume_id_r15.pack(bref)); + HANDLE_CODE(short_resume_mac_i_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, resume_cause_r15)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_request_minus5_gc_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(resume_id_r15.unpack(bref)); + HANDLE_CODE(short_resume_mac_i_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(resume_cause_r15, bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_request_minus5_gc_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("resumeIdentity-r15"); + resume_id_r15.to_json(j); + j.write_str("shortResumeMAC-I-r15", short_resume_mac_i_r15.to_string()); + j.write_str("resumeCause-r15", resume_cause_r15.to_string()); + j.write_str("spare", spare.to_string()); + j.end_obj(); +} + +void rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::destroy_() +{ + switch (type_) { + case types::full_i_rnti_r15: + c.destroy >(); + break; + case types::short_i_rnti_r15: + c.destroy >(); + break; + default: + break; + } +} +void rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::full_i_rnti_r15: + c.init >(); + break; + case types::short_i_rnti_r15: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_"); + } +} +rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::resume_id_r15_c_( + const rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::full_i_rnti_r15: + c.init(other.c.get >()); + break; + case types::short_i_rnti_r15: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_"); + } +} +rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_& +rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_:: +operator=(const rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::full_i_rnti_r15: + c.set(other.c.get >()); + break; + case types::short_i_rnti_r15: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_"); + } + + return *this; +} +void rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::full_i_rnti_r15: + j.write_str("fullI-RNTI-r15", c.get >().to_string()); + break; + case types::short_i_rnti_r15: + j.write_str("shortI-RNTI-r15", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::full_i_rnti_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::short_i_rnti_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::full_i_rnti_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::short_i_rnti_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionResumeRequest-r13-IEs ::= SEQUENCE +SRSASN_CODE rrc_conn_resume_request_r13_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(resume_id_r13.pack(bref)); + HANDLE_CODE(short_resume_mac_i_r13.pack(bref)); + HANDLE_CODE(pack_enum(bref, resume_cause_r13)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_request_r13_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(resume_id_r13.unpack(bref)); + HANDLE_CODE(short_resume_mac_i_r13.unpack(bref)); + HANDLE_CODE(unpack_enum(resume_cause_r13, bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_request_r13_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("resumeIdentity-r13"); + resume_id_r13.to_json(j); + j.write_str("shortResumeMAC-I-r13", short_resume_mac_i_r13.to_string()); + j.write_str("resumeCause-r13", resume_cause_r13.to_string()); + j.write_str("spare", spare.to_string()); + j.end_obj(); +} + +void rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::destroy_() +{ + switch (type_) { + case types::resume_id_r13: + c.destroy >(); + break; + case types::truncated_resume_id_r13: + c.destroy >(); + break; + default: + break; + } +} +void rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::resume_id_r13: + c.init >(); + break; + case types::truncated_resume_id_r13: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_"); + } +} +rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::resume_id_r13_c_( + const rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::resume_id_r13: + c.init(other.c.get >()); + break; + case types::truncated_resume_id_r13: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_"); + } +} +rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_& rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_:: + operator=(const rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::resume_id_r13: + c.set(other.c.get >()); + break; + case types::truncated_resume_id_r13: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_"); + } + + return *this; +} +void rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::resume_id_r13: + j.write_str("resumeID-r13", c.get >().to_string()); + break; + case types::truncated_resume_id_r13: + j.write_str("truncatedResumeID-r13", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::resume_id_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::truncated_resume_id_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::resume_id_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::truncated_resume_id_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCEarlyDataRequest-r15-IEs ::= SEQUENCE +rrc_early_data_request_r15_ies_s::rrc_early_data_request_r15_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_early_data_request_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(s_tmsi_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, establishment_cause_r15)); + HANDLE_CODE(ded_info_nas_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_request_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(s_tmsi_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(establishment_cause_r15, bref)); + HANDLE_CODE(ded_info_nas_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_early_data_request_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("s-TMSI-r15"); + s_tmsi_r15.to_json(j); + j.write_str("establishmentCause-r15", establishment_cause_r15.to_string()); + j.write_str("dedicatedInfoNAS-r15", ded_info_nas_r15.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentRequest ::= SEQUENCE +SRSASN_CODE rrc_conn_reest_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_request_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_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_conn_reest_request_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_reest_request_r8: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_reest_request_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_reest_request_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_request_s::crit_exts_c_"); + } +} +rrc_conn_reest_request_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_request_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_reest_request_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_request_s::crit_exts_c_"); + } +} +rrc_conn_reest_request_s::crit_exts_c_& rrc_conn_reest_request_s::crit_exts_c_:: + operator=(const rrc_conn_reest_request_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_reest_request_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_request_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_reest_request_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reest_request_r8: + j.write_fieldname("rrcConnectionReestablishmentRequest-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_request_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reest_request_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reest_request_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_request_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_request_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reest_request_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_request_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionRequest ::= SEQUENCE +SRSASN_CODE rrc_conn_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_request_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_request_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_request_r8: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_request_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_request_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_request_s::crit_exts_c_"); + } +} +rrc_conn_request_s::crit_exts_c_::crit_exts_c_(const rrc_conn_request_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_request_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_request_s::crit_exts_c_"); + } +} +rrc_conn_request_s::crit_exts_c_& rrc_conn_request_s::crit_exts_c_:: + operator=(const rrc_conn_request_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_request_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_request_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_request_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_request_r8: + j.write_fieldname("rrcConnectionRequest-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_request_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_request_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_request_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_request_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_request_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_request_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_request_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionResumeRequest-r13 ::= SEQUENCE +SRSASN_CODE rrc_conn_resume_request_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_request_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_request_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_conn_resume_request_r13_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_resume_request_r13: + c.destroy(); + break; + case types::rrc_conn_resume_request_r15: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_resume_request_r13_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_resume_request_r13: + c.init(); + break; + case types::rrc_conn_resume_request_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_s::crit_exts_c_"); + } +} +rrc_conn_resume_request_r13_s::crit_exts_c_::crit_exts_c_(const rrc_conn_resume_request_r13_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_resume_request_r13: + c.init(other.c.get()); + break; + case types::rrc_conn_resume_request_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_s::crit_exts_c_"); + } +} +rrc_conn_resume_request_r13_s::crit_exts_c_& rrc_conn_resume_request_r13_s::crit_exts_c_:: + operator=(const rrc_conn_resume_request_r13_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_resume_request_r13: + c.set(other.c.get()); + break; + case types::rrc_conn_resume_request_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_resume_request_r13_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_resume_request_r13: + j.write_fieldname("rrcConnectionResumeRequest-r13"); + c.get().to_json(j); + break; + case types::rrc_conn_resume_request_r15: + j.write_fieldname("rrcConnectionResumeRequest-r15"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_resume_request_r13_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_resume_request_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_resume_request_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_request_r13_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_resume_request_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_resume_request_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_request_r13_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCEarlyDataRequest-r15 ::= SEQUENCE +SRSASN_CODE rrc_early_data_request_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_request_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_early_data_request_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_early_data_request_r15_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_early_data_request_r15: + c.destroy(); + break; + default: + break; + } +} +void rrc_early_data_request_r15_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_early_data_request_r15: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_request_r15_s::crit_exts_c_"); + } +} +rrc_early_data_request_r15_s::crit_exts_c_::crit_exts_c_(const rrc_early_data_request_r15_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_early_data_request_r15: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_request_r15_s::crit_exts_c_"); + } +} +rrc_early_data_request_r15_s::crit_exts_c_& rrc_early_data_request_r15_s::crit_exts_c_:: + operator=(const rrc_early_data_request_r15_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_early_data_request_r15: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_request_r15_s::crit_exts_c_"); + } + + return *this; +} +void rrc_early_data_request_r15_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_early_data_request_r15: + j.write_fieldname("rrcEarlyDataRequest-r15"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_request_r15_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_early_data_request_r15_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_early_data_request_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_request_r15_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_early_data_request_r15_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_early_data_request_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_early_data_request_r15_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UL-CCCH-MessageType ::= CHOICE +void ul_ccch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + case types::msg_class_ext: + c.destroy(); + break; + default: + break; + } +} +void ul_ccch_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_ccch_msg_type_c"); + } +} +ul_ccch_msg_type_c::ul_ccch_msg_type_c(const ul_ccch_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_ccch_msg_type_c"); + } +} +ul_ccch_msg_type_c& ul_ccch_msg_type_c::operator=(const ul_ccch_msg_type_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::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_ccch_msg_type_c"); + } + + return *this; +} +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.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_ccch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + 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_ccch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, 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_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_conn_reest_request: + c.destroy(); + break; + case types::rrc_conn_request: + c.destroy(); + break; + default: + break; + } +} +void ul_ccch_msg_type_c::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_reest_request: + c.init(); + break; + case types::rrc_conn_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_conn_reest_request: + c.init(other.c.get()); + break; + case types::rrc_conn_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_conn_reest_request: + c.set(other.c.get()); + break; + case types::rrc_conn_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; +} +void ul_ccch_msg_type_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reest_request: + j.write_fieldname("rrcConnectionReestablishmentRequest"); + c.get().to_json(j); + break; + case types::rrc_conn_request: + j.write_fieldname("rrcConnectionRequest"); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reest_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reest_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_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; +} + +void ul_ccch_msg_type_c::msg_class_ext_c_::destroy_() +{ + switch (type_) { + case types::c2: + c.destroy(); + break; + case types::msg_class_ext_future_r13: + c.destroy(); + break; + default: + break; + } +} +void ul_ccch_msg_type_c::msg_class_ext_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c2: + c.init(); + break; + case types::msg_class_ext_future_r13: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_"); + } +} +ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_c_(const ul_ccch_msg_type_c::msg_class_ext_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c2: + c.init(other.c.get()); + break; + case types::msg_class_ext_future_r13: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_"); + } +} +ul_ccch_msg_type_c::msg_class_ext_c_& ul_ccch_msg_type_c::msg_class_ext_c_:: + operator=(const ul_ccch_msg_type_c::msg_class_ext_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c2: + c.set(other.c.get()); + break; + case types::msg_class_ext_future_r13: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_"); + } + + return *this; +} +void ul_ccch_msg_type_c::msg_class_ext_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c2: + j.write_fieldname("c2"); + c.get().to_json(j); + break; + case types::msg_class_ext_future_r13: + j.write_fieldname("messageClassExtensionFuture-r13"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext_future_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext_future_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::set(types::options e) +{ + type_ = e; +} +void ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_resume_request_r13: + j.write_fieldname("rrcConnectionResumeRequest-r13"); + c.to_json(j); + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_resume_request_r13: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_resume_request_r13: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::destroy_() +{ + switch (type_) { + case types::c3: + c.destroy(); + break; + default: + break; + } +} +void ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c3: + c.init(); + break; + case types::msg_class_ext_future_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_"); + } +} +ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::msg_class_ext_future_r13_c_( + const ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c3: + c.init(other.c.get()); + break; + case types::msg_class_ext_future_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_"); + } +} +ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_& +ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_:: +operator=(const ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c3: + c.set(other.c.get()); + break; + case types::msg_class_ext_future_r15: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_"); + } + + return *this; +} +void ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c3: + j.write_fieldname("c3"); + c.get().to_json(j); + break; + case types::msg_class_ext_future_r15: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c3: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext_future_r15: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c3: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext_future_r15: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::set(types::options e) +{ + type_ = e; +} +void ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_early_data_request_r15: + j.write_fieldname("rrcEarlyDataRequest-r15"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_early_data_request_r15: + 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_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_early_data_request_r15: + 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_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_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(bit_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(); +} + +// CellGlobalIdCDMA2000 ::= CHOICE +void cell_global_id_cdma2000_c::destroy_() +{ + switch (type_) { + case types::cell_global_id1_xrtt: + c.destroy >(); + break; + case types::cell_global_id_hrpd: + c.destroy >(); + break; + default: + break; + } +} +void cell_global_id_cdma2000_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id1_xrtt: + c.init >(); + break; + case types::cell_global_id_hrpd: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_global_id_cdma2000_c"); + } +} +cell_global_id_cdma2000_c::cell_global_id_cdma2000_c(const cell_global_id_cdma2000_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id1_xrtt: + c.init(other.c.get >()); + break; + case types::cell_global_id_hrpd: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_global_id_cdma2000_c"); + } +} +cell_global_id_cdma2000_c& cell_global_id_cdma2000_c::operator=(const cell_global_id_cdma2000_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id1_xrtt: + c.set(other.c.get >()); + break; + case types::cell_global_id_hrpd: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cell_global_id_cdma2000_c"); + } + + return *this; +} +void cell_global_id_cdma2000_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id1_xrtt: + j.write_str("cellGlobalId1XRTT", c.get >().to_string()); + break; + case types::cell_global_id_hrpd: + j.write_str("cellGlobalIdHRPD", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "cell_global_id_cdma2000_c"); + } + j.end_obj(); +} +SRSASN_CODE cell_global_id_cdma2000_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cell_global_id1_xrtt: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::cell_global_id_hrpd: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cell_global_id_cdma2000_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_global_id_cdma2000_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cell_global_id1_xrtt: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::cell_global_id_hrpd: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cell_global_id_cdma2000_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AdditionalSI-Info-r9 ::= SEQUENCE +add_si_info_r9_s::add_si_info_r9_s() +{ + csg_member_status_r9_present = false; + csg_id_r9_present = false; +} +SRSASN_CODE add_si_info_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csg_member_status_r9_present, 1)); + HANDLE_CODE(bref.pack(csg_id_r9_present, 1)); + + if (csg_id_r9_present) { + HANDLE_CODE(csg_id_r9.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE add_si_info_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csg_member_status_r9_present, 1)); + HANDLE_CODE(bref.unpack(csg_id_r9_present, 1)); + + if (csg_id_r9_present) { + HANDLE_CODE(csg_id_r9.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void add_si_info_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csg_member_status_r9_present) { + j.write_str("csg-MemberStatus-r9", "member"); + } + if (csg_id_r9_present) { + j.write_str("csg-Identity-r9", csg_id_r9.to_string()); + } + j.end_obj(); +} + +// BLER-Result-r12 ::= SEQUENCE +SRSASN_CODE bler_result_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, bler_r12, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(blocks_rx_r12.n_r12.pack(bref)); + HANDLE_CODE(blocks_rx_r12.m_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bler_result_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(bler_r12, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(blocks_rx_r12.n_r12.unpack(bref)); + HANDLE_CODE(blocks_rx_r12.m_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void bler_result_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bler-r12", bler_r12); + j.write_fieldname("blocksReceived-r12"); + j.start_obj(); + j.write_str("n-r12", blocks_rx_r12.n_r12.to_string()); + j.write_str("m-r12", blocks_rx_r12.m_r12.to_string()); + j.end_obj(); + j.end_obj(); +} + +// CellGlobalIdUTRA ::= SEQUENCE +SRSASN_CODE cell_global_id_utra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(cell_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_global_id_utra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(cell_id.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_global_id_utra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + j.write_str("cellIdentity", cell_id.to_string()); + j.end_obj(); +} + +// MeasResultCDMA2000 ::= SEQUENCE +meas_result_cdma2000_s::meas_result_cdma2000_s() +{ + cgi_info_present = false; +} +SRSASN_CODE meas_result_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cgi_info_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)511)); + if (cgi_info_present) { + HANDLE_CODE(cgi_info.pack(bref)); + } + bref.pack(meas_result.ext, 1); + HANDLE_CODE(bref.pack(meas_result.pilot_pn_phase_present, 1)); + if (meas_result.pilot_pn_phase_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result.pilot_pn_phase, (uint16_t)0, (uint16_t)32767)); + } + HANDLE_CODE(pack_unalign_integer(bref, meas_result.pilot_strength, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cgi_info_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)511)); + if (cgi_info_present) { + HANDLE_CODE(cgi_info.unpack(bref)); + } + bref.unpack(meas_result.ext, 1); + HANDLE_CODE(bref.unpack(meas_result.pilot_pn_phase_present, 1)); + if (meas_result.pilot_pn_phase_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result.pilot_pn_phase, bref, (uint16_t)0, (uint16_t)32767)); + } + HANDLE_CODE(unpack_unalign_integer(meas_result.pilot_strength, bref, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +void meas_result_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId", pci); + if (cgi_info_present) { + j.write_fieldname("cgi-Info"); + cgi_info.to_json(j); + } + j.write_fieldname("measResult"); + j.start_obj(); + if (meas_result.pilot_pn_phase_present) { + j.write_int("pilotPnPhase", meas_result.pilot_pn_phase); + } + j.write_int("pilotStrength", meas_result.pilot_strength); + j.end_obj(); + j.end_obj(); +} + +meas_result_cdma2000_s::meas_result_s_::meas_result_s_() +{ + ext = false; + pilot_pn_phase_present = false; +} + +// CellGlobalIdGERAN ::= SEQUENCE +SRSASN_CODE cell_global_id_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id.pack(bref)); + HANDLE_CODE(location_area_code.pack(bref)); + HANDLE_CODE(cell_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_global_id_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(plmn_id.unpack(bref)); + HANDLE_CODE(location_area_code.unpack(bref)); + HANDLE_CODE(cell_id.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_global_id_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity"); + plmn_id.to_json(j); + j.write_str("locationAreaCode", location_area_code.to_string()); + j.write_str("cellIdentity", cell_id.to_string()); + j.end_obj(); +} + +// DataBLER-MCH-Result-r12 ::= SEQUENCE +SRSASN_CODE data_bler_mch_result_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, mch_idx_r12, (uint8_t)1, (uint8_t)15)); + HANDLE_CODE(data_bler_result_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE data_bler_mch_result_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(mch_idx_r12, bref, (uint8_t)1, (uint8_t)15)); + HANDLE_CODE(data_bler_result_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void data_bler_mch_result_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("mch-Index-r12", mch_idx_r12); + j.write_fieldname("dataBLER-Result-r12"); + data_bler_result_r12.to_json(j); + j.end_obj(); +} + +// MeasResultEUTRA ::= SEQUENCE +meas_result_eutra_s::meas_result_eutra_s() +{ + cgi_info_present = false; +} +SRSASN_CODE meas_result_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cgi_info_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)503)); + if (cgi_info_present) { + HANDLE_CODE(bref.pack(cgi_info.plmn_id_list_present, 1)); + HANDLE_CODE(cgi_info.cell_global_id.pack(bref)); + HANDLE_CODE(cgi_info.tac.pack(bref)); + if (cgi_info.plmn_id_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info.plmn_id_list, 1, 5)); + } + } + HANDLE_CODE(meas_result.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cgi_info_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)503)); + if (cgi_info_present) { + HANDLE_CODE(bref.unpack(cgi_info.plmn_id_list_present, 1)); + HANDLE_CODE(cgi_info.cell_global_id.unpack(bref)); + HANDLE_CODE(cgi_info.tac.unpack(bref)); + if (cgi_info.plmn_id_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info.plmn_id_list, bref, 1, 5)); + } + } + HANDLE_CODE(meas_result.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_result_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId", pci); + if (cgi_info_present) { + j.write_fieldname("cgi-Info"); + j.start_obj(); + j.write_fieldname("cellGlobalId"); + cgi_info.cell_global_id.to_json(j); + j.write_str("trackingAreaCode", cgi_info.tac.to_string()); + if (cgi_info.plmn_id_list_present) { + j.start_array("plmn-IdentityList"); + for (uint32_t i1 = 0; i1 < cgi_info.plmn_id_list.size(); ++i1) { + cgi_info.plmn_id_list[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.write_fieldname("measResult"); + meas_result.to_json(j); + j.end_obj(); +} + +meas_result_eutra_s::cgi_info_s_::cgi_info_s_() +{ + plmn_id_list_present = false; +} + +meas_result_eutra_s::meas_result_s_::meas_result_s_() +{ + ext = false; + rsrp_result_present = false; + rsrq_result_present = false; + add_si_info_r9_present = false; + primary_plmn_suitable_r12_present = false; + meas_result_v1250_present = false; + rs_sinr_result_r13_present = false; + cgi_info_v1310_present = false; + meas_result_v1360_present = false; + cgi_info_minus5_gc_r15_present = false; +} +SRSASN_CODE meas_result_eutra_s::meas_result_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rsrp_result_present, 1)); + HANDLE_CODE(bref.pack(rsrq_result_present, 1)); + + if (rsrp_result_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrp_result, (uint8_t)0, (uint8_t)97)); + } + if (rsrq_result_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrq_result, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(5); + rrc_asn1_warn_assert(add_si_info_r9_present != (add_si_info_r9.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= add_si_info_r9_present; + group_flags[1] |= primary_plmn_suitable_r12_present; + group_flags[1] |= meas_result_v1250_present; + group_flags[2] |= rs_sinr_result_r13_present; + rrc_asn1_warn_assert(cgi_info_v1310_present != (cgi_info_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= cgi_info_v1310_present; + group_flags[3] |= meas_result_v1360_present; + rrc_asn1_warn_assert(cgi_info_minus5_gc_r15_present != (cgi_info_minus5_gc_r15.get() != NULL), __FILE__, __LINE__); + group_flags[4] |= cgi_info_minus5_gc_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(add_si_info_r9_present, 1)); + if (add_si_info_r9_present) { + HANDLE_CODE(add_si_info_r9->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(primary_plmn_suitable_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_v1250_present, 1)); + if (meas_result_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_v1250, (int8_t)-30, (int8_t)46)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rs_sinr_result_r13_present, 1)); + HANDLE_CODE(bref.pack(cgi_info_v1310_present, 1)); + if (rs_sinr_result_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + if (cgi_info_v1310_present) { + HANDLE_CODE(bref.pack(cgi_info_v1310->freq_band_ind_r13_present, 1)); + HANDLE_CODE(bref.pack(cgi_info_v1310->multi_band_info_list_r13_present, 1)); + HANDLE_CODE(bref.pack(cgi_info_v1310->freq_band_ind_prio_r13_present, 1)); + if (cgi_info_v1310->freq_band_ind_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, cgi_info_v1310->freq_band_ind_r13, (uint16_t)1, (uint16_t)256)); + } + if (cgi_info_v1310->multi_band_info_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_v1310->multi_band_info_list_r13, 1, 8, + UnalignedIntegerPacker(1, 256))); + } + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_v1360_present, 1)); + if (meas_result_v1360_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_v1360, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cgi_info_minus5_gc_r15_present, 1)); + if (cgi_info_minus5_gc_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cgi_info_minus5_gc_r15, 1, 6)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_eutra_s::meas_result_s_::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rsrp_result_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_result_present, 1)); + + if (rsrp_result_present) { + HANDLE_CODE(unpack_unalign_integer(rsrp_result, bref, (uint8_t)0, (uint8_t)97)); + } + if (rsrq_result_present) { + HANDLE_CODE(unpack_unalign_integer(rsrq_result, bref, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(add_si_info_r9_present, 1)); + if (add_si_info_r9_present) { + add_si_info_r9 = make_copy_ptr(add_si_info_r9_s()); + HANDLE_CODE(add_si_info_r9->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(primary_plmn_suitable_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_v1250_present, 1)); + if (meas_result_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_v1250, bref, (int8_t)-30, (int8_t)46)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rs_sinr_result_r13_present, 1)); + HANDLE_CODE(bref.unpack(cgi_info_v1310_present, 1)); + if (rs_sinr_result_r13_present) { + HANDLE_CODE(unpack_unalign_integer(rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + if (cgi_info_v1310_present) { + cgi_info_v1310 = make_copy_ptr(cgi_info_v1310_s_()); + HANDLE_CODE(bref.unpack(cgi_info_v1310->freq_band_ind_r13_present, 1)); + HANDLE_CODE(bref.unpack(cgi_info_v1310->multi_band_info_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(cgi_info_v1310->freq_band_ind_prio_r13_present, 1)); + if (cgi_info_v1310->freq_band_ind_r13_present) { + HANDLE_CODE(unpack_unalign_integer(cgi_info_v1310->freq_band_ind_r13, bref, (uint16_t)1, (uint16_t)256)); + } + if (cgi_info_v1310->multi_band_info_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info_v1310->multi_band_info_list_r13, bref, 1, 8, + UnalignedIntegerPacker(1, 256))); + } + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_v1360_present, 1)); + if (meas_result_v1360_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_v1360, bref, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cgi_info_minus5_gc_r15_present, 1)); + if (cgi_info_minus5_gc_r15_present) { + cgi_info_minus5_gc_r15 = make_copy_ptr(cgi_info_minus5_gc_r15_l_()); + HANDLE_CODE(unpack_dyn_seq_of(*cgi_info_minus5_gc_r15, bref, 1, 6)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_result_eutra_s::meas_result_s_::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrp_result_present) { + j.write_int("rsrpResult", rsrp_result); + } + if (rsrq_result_present) { + j.write_int("rsrqResult", rsrq_result); + } + if (add_si_info_r9_present) { + j.write_fieldname("additionalSI-Info-r9"); + add_si_info_r9->to_json(j); + } + if (primary_plmn_suitable_r12_present) { + j.write_str("primaryPLMN-Suitable-r12", "true"); + } + if (meas_result_v1250_present) { + j.write_int("measResult-v1250", meas_result_v1250); + } + if (rs_sinr_result_r13_present) { + j.write_int("rs-sinr-Result-r13", rs_sinr_result_r13); + } + if (cgi_info_v1310_present) { + j.write_fieldname("cgi-Info-v1310"); + j.start_obj(); + if (cgi_info_v1310->freq_band_ind_r13_present) { + j.write_int("freqBandIndicator-r13", cgi_info_v1310->freq_band_ind_r13); + } + if (cgi_info_v1310->multi_band_info_list_r13_present) { + j.start_array("multiBandInfoList-r13"); + for (uint32_t i1 = 0; i1 < cgi_info_v1310->multi_band_info_list_r13.size(); ++i1) { + j.write_int(cgi_info_v1310->multi_band_info_list_r13[i1]); + } + j.end_array(); + } + if (cgi_info_v1310->freq_band_ind_prio_r13_present) { + j.write_str("freqBandIndicatorPriority-r13", "true"); + } + j.end_obj(); + } + if (meas_result_v1360_present) { + j.write_int("measResult-v1360", meas_result_v1360); + } + if (cgi_info_minus5_gc_r15_present) { + j.start_array("cgi-Info-5GC-r15"); + for (uint32_t i1 = 0; i1 < cgi_info_minus5_gc_r15->size(); ++i1) { + ((*cgi_info_minus5_gc_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +meas_result_eutra_s::meas_result_s_::cgi_info_v1310_s_::cgi_info_v1310_s_() +{ + freq_band_ind_r13_present = false; + multi_band_info_list_r13_present = false; + freq_band_ind_prio_r13_present = false; +} + +// MeasResultIdleEUTRA-r15 ::= SEQUENCE +meas_result_idle_eutra_r15_s::meas_result_idle_eutra_r15_s() +{ + ext = false; +} +SRSASN_CODE meas_result_idle_eutra_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_unalign_integer(bref, pci_r15, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_r15.rsrp_result_r15, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_r15.rsrq_result_r15, (int8_t)-30, (int8_t)46)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_idle_eutra_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_unalign_integer(pci_r15, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(meas_result_r15.rsrp_result_r15, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_r15.rsrq_result_r15, bref, (int8_t)-30, (int8_t)46)); + + return SRSASN_SUCCESS; +} +void meas_result_idle_eutra_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + j.write_int("physCellId-r15", pci_r15); + j.write_fieldname("measResult-r15"); + j.start_obj(); + j.write_int("rsrpResult-r15", meas_result_r15.rsrp_result_r15); + j.write_int("rsrqResult-r15", meas_result_r15.rsrq_result_r15); + j.end_obj(); + j.end_obj(); +} + +// MeasResultUTRA ::= SEQUENCE +meas_result_utra_s::meas_result_utra_s() +{ + cgi_info_present = false; +} +SRSASN_CODE meas_result_utra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cgi_info_present, 1)); + + HANDLE_CODE(pci.pack(bref)); + if (cgi_info_present) { + HANDLE_CODE(bref.pack(cgi_info.location_area_code_present, 1)); + HANDLE_CODE(bref.pack(cgi_info.routing_area_code_present, 1)); + HANDLE_CODE(bref.pack(cgi_info.plmn_id_list_present, 1)); + HANDLE_CODE(cgi_info.cell_global_id.pack(bref)); + if (cgi_info.location_area_code_present) { + HANDLE_CODE(cgi_info.location_area_code.pack(bref)); + } + if (cgi_info.routing_area_code_present) { + HANDLE_CODE(cgi_info.routing_area_code.pack(bref)); + } + if (cgi_info.plmn_id_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info.plmn_id_list, 1, 5)); + } + } + HANDLE_CODE(meas_result.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_utra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cgi_info_present, 1)); + + HANDLE_CODE(pci.unpack(bref)); + if (cgi_info_present) { + HANDLE_CODE(bref.unpack(cgi_info.location_area_code_present, 1)); + HANDLE_CODE(bref.unpack(cgi_info.routing_area_code_present, 1)); + HANDLE_CODE(bref.unpack(cgi_info.plmn_id_list_present, 1)); + HANDLE_CODE(cgi_info.cell_global_id.unpack(bref)); + if (cgi_info.location_area_code_present) { + HANDLE_CODE(cgi_info.location_area_code.unpack(bref)); + } + if (cgi_info.routing_area_code_present) { + HANDLE_CODE(cgi_info.routing_area_code.unpack(bref)); + } + if (cgi_info.plmn_id_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info.plmn_id_list, bref, 1, 5)); + } + } + HANDLE_CODE(meas_result.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_result_utra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("physCellId"); + pci.to_json(j); + if (cgi_info_present) { + j.write_fieldname("cgi-Info"); + j.start_obj(); + j.write_fieldname("cellGlobalId"); + cgi_info.cell_global_id.to_json(j); + if (cgi_info.location_area_code_present) { + j.write_str("locationAreaCode", cgi_info.location_area_code.to_string()); + } + if (cgi_info.routing_area_code_present) { + j.write_str("routingAreaCode", cgi_info.routing_area_code.to_string()); + } + if (cgi_info.plmn_id_list_present) { + j.start_array("plmn-IdentityList"); + for (uint32_t i1 = 0; i1 < cgi_info.plmn_id_list.size(); ++i1) { + cgi_info.plmn_id_list[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.write_fieldname("measResult"); + meas_result.to_json(j); + j.end_obj(); +} + +void meas_result_utra_s::pci_c_::destroy_() {} +void meas_result_utra_s::pci_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_result_utra_s::pci_c_::pci_c_(const meas_result_utra_s::pci_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd: + c.init(other.c.get()); + break; + case types::tdd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_result_utra_s::pci_c_"); + } +} +meas_result_utra_s::pci_c_& meas_result_utra_s::pci_c_::operator=(const meas_result_utra_s::pci_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd: + c.set(other.c.get()); + break; + case types::tdd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_result_utra_s::pci_c_"); + } + + return *this; +} +void meas_result_utra_s::pci_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd: + j.write_int("fdd", c.get()); + break; + case types::tdd: + j.write_int("tdd", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_result_utra_s::pci_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_result_utra_s::pci_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::tdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "meas_result_utra_s::pci_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_utra_s::pci_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::tdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "meas_result_utra_s::pci_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +meas_result_utra_s::cgi_info_s_::cgi_info_s_() +{ + location_area_code_present = false; + routing_area_code_present = false; + plmn_id_list_present = false; +} + +meas_result_utra_s::meas_result_s_::meas_result_s_() +{ + ext = false; + utra_rscp_present = false; + utra_ec_n0_present = false; + add_si_info_r9_present = false; + primary_plmn_suitable_r12_present = false; +} +SRSASN_CODE meas_result_utra_s::meas_result_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(utra_rscp_present, 1)); + HANDLE_CODE(bref.pack(utra_ec_n0_present, 1)); + + if (utra_rscp_present) { + HANDLE_CODE(pack_unalign_integer(bref, utra_rscp, (int8_t)-5, (int8_t)91)); + } + if (utra_ec_n0_present) { + HANDLE_CODE(pack_unalign_integer(bref, utra_ec_n0, (uint8_t)0, (uint8_t)49)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(add_si_info_r9_present != (add_si_info_r9.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= add_si_info_r9_present; + group_flags[1] |= primary_plmn_suitable_r12_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(add_si_info_r9_present, 1)); + if (add_si_info_r9_present) { + HANDLE_CODE(add_si_info_r9->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(primary_plmn_suitable_r12_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_utra_s::meas_result_s_::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(utra_rscp_present, 1)); + HANDLE_CODE(bref.unpack(utra_ec_n0_present, 1)); + + if (utra_rscp_present) { + HANDLE_CODE(unpack_unalign_integer(utra_rscp, bref, (int8_t)-5, (int8_t)91)); + } + if (utra_ec_n0_present) { + HANDLE_CODE(unpack_unalign_integer(utra_ec_n0, bref, (uint8_t)0, (uint8_t)49)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(add_si_info_r9_present, 1)); + if (add_si_info_r9_present) { + add_si_info_r9 = make_copy_ptr(add_si_info_r9_s()); + HANDLE_CODE(add_si_info_r9->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(primary_plmn_suitable_r12_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void meas_result_utra_s::meas_result_s_::to_json(json_writer& j) const +{ + j.start_obj(); + if (utra_rscp_present) { + j.write_int("utra-RSCP", utra_rscp); + } + if (utra_ec_n0_present) { + j.write_int("utra-EcN0", utra_ec_n0); + } + if (add_si_info_r9_present) { + j.write_fieldname("additionalSI-Info-r9"); + add_si_info_r9->to_json(j); + } + if (primary_plmn_suitable_r12_present) { + j.write_str("primaryPLMN-Suitable-r12", "true"); + } + j.end_obj(); +} + +// RegisteredAMF-r15 ::= SEQUENCE +registered_amf_r15_s::registered_amf_r15_s() +{ + plmn_id_r15_present = false; +} +SRSASN_CODE registered_amf_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_r15_present, 1)); + + if (plmn_id_r15_present) { + HANDLE_CODE(plmn_id_r15.pack(bref)); + } + HANDLE_CODE(amf_id_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE registered_amf_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_r15_present, 1)); + + if (plmn_id_r15_present) { + HANDLE_CODE(plmn_id_r15.unpack(bref)); + } + HANDLE_CODE(amf_id_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void registered_amf_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_r15_present) { + j.write_fieldname("plmn-Identity-r15"); + plmn_id_r15.to_json(j); + } + j.write_str("amf-Identifier-r15", amf_id_r15.to_string()); + j.end_obj(); +} + +// S-NSSAI-r15 ::= CHOICE +void s_nssai_r15_c::destroy_() +{ + switch (type_) { + case types::sst: + c.destroy >(); + break; + case types::sst_sd: + c.destroy >(); + break; + default: + break; + } +} +void s_nssai_r15_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_r15_c"); + } +} +s_nssai_r15_c::s_nssai_r15_c(const s_nssai_r15_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_r15_c"); + } +} +s_nssai_r15_c& s_nssai_r15_c::operator=(const s_nssai_r15_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_r15_c"); + } + + return *this; +} +void s_nssai_r15_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_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE s_nssai_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + 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_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE s_nssai_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, 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_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// LocationInfo-r10 ::= SEQUENCE +location_info_r10_s::location_info_r10_s() +{ + ext = false; + horizontal_velocity_r10_present = false; + gnss_tod_msec_r10_present = false; + vertical_velocity_info_r15_present = false; +} +SRSASN_CODE location_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(horizontal_velocity_r10_present, 1)); + HANDLE_CODE(bref.pack(gnss_tod_msec_r10_present, 1)); + + HANDLE_CODE(location_coordinates_r10.pack(bref)); + if (horizontal_velocity_r10_present) { + HANDLE_CODE(horizontal_velocity_r10.pack(bref)); + } + if (gnss_tod_msec_r10_present) { + HANDLE_CODE(gnss_tod_msec_r10.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(vertical_velocity_info_r15_present != (vertical_velocity_info_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= vertical_velocity_info_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(vertical_velocity_info_r15_present, 1)); + if (vertical_velocity_info_r15_present) { + HANDLE_CODE(vertical_velocity_info_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE location_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(horizontal_velocity_r10_present, 1)); + HANDLE_CODE(bref.unpack(gnss_tod_msec_r10_present, 1)); + + HANDLE_CODE(location_coordinates_r10.unpack(bref)); + if (horizontal_velocity_r10_present) { + HANDLE_CODE(horizontal_velocity_r10.unpack(bref)); + } + if (gnss_tod_msec_r10_present) { + HANDLE_CODE(gnss_tod_msec_r10.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(vertical_velocity_info_r15_present, 1)); + if (vertical_velocity_info_r15_present) { + vertical_velocity_info_r15 = make_copy_ptr(vertical_velocity_info_r15_c_()); + HANDLE_CODE(vertical_velocity_info_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void location_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("locationCoordinates-r10"); + location_coordinates_r10.to_json(j); + if (horizontal_velocity_r10_present) { + j.write_str("horizontalVelocity-r10", horizontal_velocity_r10.to_string()); + } + if (gnss_tod_msec_r10_present) { + j.write_str("gnss-TOD-msec-r10", gnss_tod_msec_r10.to_string()); + } + if (vertical_velocity_info_r15_present) { + j.write_fieldname("verticalVelocityInfo-r15"); + vertical_velocity_info_r15->to_json(j); + } + j.end_obj(); +} + +void location_info_r10_s::location_coordinates_r10_c_::destroy_() +{ + switch (type_) { + case types::ellipsoid_point_r10: + c.destroy(); + break; + case types::ellipsoid_point_with_altitude_r10: + c.destroy(); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: + c.destroy(); + break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: + c.destroy(); + break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: + c.destroy(); + break; + case types::ellipsoid_arc_r11: + c.destroy(); + break; + case types::polygon_r11: + c.destroy(); + break; + default: + break; + } +} +void location_info_r10_s::location_coordinates_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ellipsoid_point_r10: + c.init(); + break; + case types::ellipsoid_point_with_altitude_r10: + c.init(); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: + c.init(); + break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: + c.init(); + break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: + c.init(); + break; + case types::ellipsoid_arc_r11: + c.init(); + break; + case types::polygon_r11: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::location_coordinates_r10_c_"); + } +} +location_info_r10_s::location_coordinates_r10_c_::location_coordinates_r10_c_( + const location_info_r10_s::location_coordinates_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ellipsoid_point_r10: + c.init(other.c.get()); + break; + case types::ellipsoid_point_with_altitude_r10: + c.init(other.c.get()); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: + c.init(other.c.get()); + break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: + c.init(other.c.get()); + break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: + c.init(other.c.get()); + break; + case types::ellipsoid_arc_r11: + c.init(other.c.get()); + break; + case types::polygon_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::location_coordinates_r10_c_"); + } +} +location_info_r10_s::location_coordinates_r10_c_& location_info_r10_s::location_coordinates_r10_c_:: + operator=(const location_info_r10_s::location_coordinates_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ellipsoid_point_r10: + c.set(other.c.get()); + break; + case types::ellipsoid_point_with_altitude_r10: + c.set(other.c.get()); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: + c.set(other.c.get()); + break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: + c.set(other.c.get()); + break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: + c.set(other.c.get()); + break; + case types::ellipsoid_arc_r11: + c.set(other.c.get()); + break; + case types::polygon_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::location_coordinates_r10_c_"); + } + + return *this; +} +void location_info_r10_s::location_coordinates_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ellipsoid_point_r10: + j.write_str("ellipsoid-Point-r10", c.get().to_string()); + break; + case types::ellipsoid_point_with_altitude_r10: + j.write_str("ellipsoidPointWithAltitude-r10", c.get().to_string()); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: + j.write_str("ellipsoidPointWithUncertaintyCircle-r11", c.get().to_string()); + break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: + j.write_str("ellipsoidPointWithUncertaintyEllipse-r11", c.get().to_string()); + break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: + j.write_str("ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11", c.get().to_string()); + break; + case types::ellipsoid_arc_r11: + j.write_str("ellipsoidArc-r11", c.get().to_string()); + break; + case types::polygon_r11: + j.write_str("polygon-r11", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::location_coordinates_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE location_info_r10_s::location_coordinates_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ellipsoid_point_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ellipsoid_point_with_altitude_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::ellipsoid_arc_r11: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::polygon_r11: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(c.get().pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::location_coordinates_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE location_info_r10_s::location_coordinates_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ellipsoid_point_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ellipsoid_point_with_altitude_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ellipsoid_point_with_uncertainty_circle_r11: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::ellipsoid_point_with_uncertainty_ellipse_r11: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::ellipsoid_arc_r11: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::polygon_r11: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(c.get().unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::location_coordinates_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void location_info_r10_s::vertical_velocity_info_r15_c_::destroy_() +{ + switch (type_) { + case types::vertical_velocity_r15: + c.destroy(); + break; + case types::vertical_velocity_and_uncertainty_r15: + c.destroy(); + break; + default: + break; + } +} +void location_info_r10_s::vertical_velocity_info_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::vertical_velocity_r15: + c.init(); + break; + case types::vertical_velocity_and_uncertainty_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::vertical_velocity_info_r15_c_"); + } +} +location_info_r10_s::vertical_velocity_info_r15_c_::vertical_velocity_info_r15_c_( + const location_info_r10_s::vertical_velocity_info_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::vertical_velocity_r15: + c.init(other.c.get()); + break; + case types::vertical_velocity_and_uncertainty_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::vertical_velocity_info_r15_c_"); + } +} +location_info_r10_s::vertical_velocity_info_r15_c_& location_info_r10_s::vertical_velocity_info_r15_c_:: + operator=(const location_info_r10_s::vertical_velocity_info_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::vertical_velocity_r15: + c.set(other.c.get()); + break; + case types::vertical_velocity_and_uncertainty_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::vertical_velocity_info_r15_c_"); + } + + return *this; +} +void location_info_r10_s::vertical_velocity_info_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::vertical_velocity_r15: + j.write_str("verticalVelocity-r15", c.get().to_string()); + break; + case types::vertical_velocity_and_uncertainty_r15: + j.write_str("verticalVelocityAndUncertainty-r15", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::vertical_velocity_info_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE location_info_r10_s::vertical_velocity_info_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::vertical_velocity_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::vertical_velocity_and_uncertainty_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::vertical_velocity_info_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE location_info_r10_s::vertical_velocity_info_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::vertical_velocity_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::vertical_velocity_and_uncertainty_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "location_info_r10_s::vertical_velocity_info_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasResultGERAN ::= SEQUENCE +meas_result_geran_s::meas_result_geran_s() +{ + cgi_info_present = false; +} +SRSASN_CODE meas_result_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cgi_info_present, 1)); + + HANDLE_CODE(carrier_freq.pack(bref)); + HANDLE_CODE(pci.pack(bref)); + if (cgi_info_present) { + HANDLE_CODE(bref.pack(cgi_info.routing_area_code_present, 1)); + HANDLE_CODE(cgi_info.cell_global_id.pack(bref)); + if (cgi_info.routing_area_code_present) { + HANDLE_CODE(cgi_info.routing_area_code.pack(bref)); + } + } + bref.pack(meas_result.ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, meas_result.rssi, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cgi_info_present, 1)); + + HANDLE_CODE(carrier_freq.unpack(bref)); + HANDLE_CODE(pci.unpack(bref)); + if (cgi_info_present) { + HANDLE_CODE(bref.unpack(cgi_info.routing_area_code_present, 1)); + HANDLE_CODE(cgi_info.cell_global_id.unpack(bref)); + if (cgi_info.routing_area_code_present) { + HANDLE_CODE(cgi_info.routing_area_code.unpack(bref)); + } + } + bref.unpack(meas_result.ext, 1); + HANDLE_CODE(unpack_unalign_integer(meas_result.rssi, bref, (uint8_t)0, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +void meas_result_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("carrierFreq"); + carrier_freq.to_json(j); + j.write_fieldname("physCellId"); + pci.to_json(j); + if (cgi_info_present) { + j.write_fieldname("cgi-Info"); + j.start_obj(); + j.write_fieldname("cellGlobalId"); + cgi_info.cell_global_id.to_json(j); + if (cgi_info.routing_area_code_present) { + j.write_str("routingAreaCode", cgi_info.routing_area_code.to_string()); + } + j.end_obj(); + } + j.write_fieldname("measResult"); + j.start_obj(); + j.write_int("rssi", meas_result.rssi); + j.end_obj(); + j.end_obj(); +} + +meas_result_geran_s::cgi_info_s_::cgi_info_s_() +{ + routing_area_code_present = false; +} + +meas_result_geran_s::meas_result_s_::meas_result_s_() +{ + ext = false; +} + +// MeasResultNR-r15 ::= SEQUENCE +meas_result_nr_r15_s::meas_result_nr_r15_s() +{ + ext = false; + rsrp_result_r15_present = false; + rsrq_result_r15_present = false; + rs_sinr_result_r15_present = false; +} +SRSASN_CODE meas_result_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rsrp_result_r15_present, 1)); + HANDLE_CODE(bref.pack(rsrq_result_r15_present, 1)); + HANDLE_CODE(bref.pack(rs_sinr_result_r15_present, 1)); + + if (rsrp_result_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrp_result_r15, (uint8_t)0, (uint8_t)127)); + } + if (rsrq_result_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrq_result_r15, (uint8_t)0, (uint8_t)127)); + } + if (rs_sinr_result_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rs_sinr_result_r15, (uint8_t)0, (uint8_t)127)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rsrp_result_r15_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_result_r15_present, 1)); + HANDLE_CODE(bref.unpack(rs_sinr_result_r15_present, 1)); + + if (rsrp_result_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rsrp_result_r15, bref, (uint8_t)0, (uint8_t)127)); + } + if (rsrq_result_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rsrq_result_r15, bref, (uint8_t)0, (uint8_t)127)); + } + if (rs_sinr_result_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rs_sinr_result_r15, bref, (uint8_t)0, (uint8_t)127)); + } + + return SRSASN_SUCCESS; +} +void meas_result_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrp_result_r15_present) { + j.write_int("rsrpResult-r15", rsrp_result_r15); + } + if (rsrq_result_r15_present) { + j.write_int("rsrqResult-r15", rsrq_result_r15); + } + if (rs_sinr_result_r15_present) { + j.write_int("rs-sinr-Result-r15", rs_sinr_result_r15); + } + j.end_obj(); +} + +// MeasResultsCDMA2000 ::= SEQUENCE +SRSASN_CODE meas_results_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pre_regist_status_hrpd, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_cdma2000, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pre_regist_status_hrpd, 1)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_cdma2000, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_results_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("preRegistrationStatusHRPD", pre_regist_status_hrpd); + j.start_array("measResultListCDMA2000"); + for (uint32_t i1 = 0; i1 < meas_result_list_cdma2000.size(); ++i1) { + meas_result_list_cdma2000[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// PLMN-IdentityInfoNR-r15 ::= SEQUENCE +plmn_id_info_nr_r15_s::plmn_id_info_nr_r15_s() +{ + tac_r15_present = false; + ran_area_code_r15_present = false; +} +SRSASN_CODE plmn_id_info_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tac_r15_present, 1)); + HANDLE_CODE(bref.pack(ran_area_code_r15_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r15, 1, 12)); + if (tac_r15_present) { + HANDLE_CODE(tac_r15.pack(bref)); + } + if (ran_area_code_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, ran_area_code_r15, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(cell_id_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tac_r15_present, 1)); + HANDLE_CODE(bref.unpack(ran_area_code_r15_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r15, bref, 1, 12)); + if (tac_r15_present) { + HANDLE_CODE(tac_r15.unpack(bref)); + } + if (ran_area_code_r15_present) { + HANDLE_CODE(unpack_unalign_integer(ran_area_code_r15, bref, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(cell_id_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void plmn_id_info_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmn-IdentityList-r15"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r15.size(); ++i1) { + plmn_id_list_r15[i1].to_json(j); + } + j.end_array(); + if (tac_r15_present) { + j.write_str("trackingAreaCode-r15", tac_r15.to_string()); + } + if (ran_area_code_r15_present) { + j.write_int("ran-AreaCode-r15", ran_area_code_r15); + } + j.write_str("cellIdentity-r15", cell_id_r15.to_string()); + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1530-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1530_ies_s::rrc_conn_setup_complete_v1530_ies_s() +{ + log_meas_available_bt_r15_present = false; + log_meas_available_wlan_r15_present = false; + idle_meas_available_r15_present = false; + flight_path_info_available_r15_present = false; + connect_to5_gc_r15_present = false; + registered_amf_r15_present = false; + s_nssai_list_r15_present = false; + ng_minus5_g_s_tmsi_bits_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(idle_meas_available_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.pack(connect_to5_gc_r15_present, 1)); + HANDLE_CODE(bref.pack(registered_amf_r15_present, 1)); + HANDLE_CODE(bref.pack(s_nssai_list_r15_present, 1)); + HANDLE_CODE(bref.pack(ng_minus5_g_s_tmsi_bits_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (registered_amf_r15_present) { + HANDLE_CODE(registered_amf_r15.pack(bref)); + } + if (s_nssai_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_nssai_list_r15, 1, 8)); + } + if (ng_minus5_g_s_tmsi_bits_r15_present) { + HANDLE_CODE(ng_minus5_g_s_tmsi_bits_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(idle_meas_available_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.unpack(connect_to5_gc_r15_present, 1)); + HANDLE_CODE(bref.unpack(registered_amf_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_nssai_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(ng_minus5_g_s_tmsi_bits_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (registered_amf_r15_present) { + HANDLE_CODE(registered_amf_r15.unpack(bref)); + } + if (s_nssai_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_nssai_list_r15, bref, 1, 8)); + } + if (ng_minus5_g_s_tmsi_bits_r15_present) { + HANDLE_CODE(ng_minus5_g_s_tmsi_bits_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_bt_r15_present) { + j.write_str("logMeasAvailableBT-r15", "true"); + } + if (log_meas_available_wlan_r15_present) { + j.write_str("logMeasAvailableWLAN-r15", "true"); + } + if (idle_meas_available_r15_present) { + j.write_str("idleMeasAvailable-r15", "true"); + } + if (flight_path_info_available_r15_present) { + j.write_str("flightPathInfoAvailable-r15", "true"); + } + if (connect_to5_gc_r15_present) { + j.write_str("connectTo5GC-r15", "true"); + } + if (registered_amf_r15_present) { + j.write_fieldname("registeredAMF-r15"); + registered_amf_r15.to_json(j); + } + if (s_nssai_list_r15_present) { + j.start_array("s-NSSAI-list-r15"); + for (uint32_t i1 = 0; i1 < s_nssai_list_r15.size(); ++i1) { + s_nssai_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (ng_minus5_g_s_tmsi_bits_r15_present) { + j.write_fieldname("ng-5G-S-TMSI-Bits-r15"); + ng_minus5_g_s_tmsi_bits_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +void rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::destroy_() +{ + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + c.destroy >(); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + c.destroy >(); + break; + default: + break; + } +} +void rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + c.init >(); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_"); + } +} +rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::ng_minus5_g_s_tmsi_bits_r15_c_( + const rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + c.init(other.c.get >()); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_"); + } +} +rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_& +rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_:: +operator=(const rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + c.set(other.c.get >()); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_"); + } + + return *this; +} +void rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + j.write_str("ng-5G-S-TMSI-r15", c.get >().to_string()); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + j.write_str("ng-5G-S-TMSI-Part2-r15", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ng_minus5_g_s_tmsi_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::ng_minus5_g_s_tmsi_part2_r15: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RSRQ-Type-r12 ::= SEQUENCE +SRSASN_CODE rsrq_type_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(all_symbols_r12, 1)); + HANDLE_CODE(bref.pack(wide_band_r12, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rsrq_type_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(all_symbols_r12, 1)); + HANDLE_CODE(bref.unpack(wide_band_r12, 1)); + + return SRSASN_SUCCESS; +} +void rsrq_type_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("allSymbols-r12", all_symbols_r12); + j.write_bool("wideBand-r12", wide_band_r12); + j.end_obj(); +} + +// WLAN-RTT-r15 ::= SEQUENCE +wlan_rtt_r15_s::wlan_rtt_r15_s() +{ + ext = false; + rtt_accuracy_r15_present = false; +} +SRSASN_CODE wlan_rtt_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rtt_accuracy_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, rtt_value_r15, (uint32_t)0, (uint32_t)16777215)); + HANDLE_CODE(pack_enum(bref, rtt_units_r15)); + if (rtt_accuracy_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rtt_accuracy_r15, (uint8_t)0, (uint8_t)255)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_rtt_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rtt_accuracy_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(rtt_value_r15, bref, (uint32_t)0, (uint32_t)16777215)); + HANDLE_CODE(unpack_enum(rtt_units_r15, bref)); + if (rtt_accuracy_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rtt_accuracy_r15, bref, (uint8_t)0, (uint8_t)255)); + } + + return SRSASN_SUCCESS; +} +void wlan_rtt_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rttValue-r15", rtt_value_r15); + j.write_str("rttUnits-r15", rtt_units_r15.to_string()); + if (rtt_accuracy_r15_present) { + j.write_int("rttAccuracy-r15", rtt_accuracy_r15); + } + j.end_obj(); +} + +// LogMeasResultBT-r15 ::= SEQUENCE +log_meas_result_bt_r15_s::log_meas_result_bt_r15_s() +{ + ext = false; + rssi_bt_r15_present = false; +} +SRSASN_CODE log_meas_result_bt_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rssi_bt_r15_present, 1)); + + HANDLE_CODE(bt_addr_r15.pack(bref)); + if (rssi_bt_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rssi_bt_r15, (int8_t)-128, (int8_t)127)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_result_bt_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rssi_bt_r15_present, 1)); + + HANDLE_CODE(bt_addr_r15.unpack(bref)); + if (rssi_bt_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rssi_bt_r15, bref, (int8_t)-128, (int8_t)127)); + } + + return SRSASN_SUCCESS; +} +void log_meas_result_bt_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bt-Addr-r15", bt_addr_r15.to_string()); + if (rssi_bt_r15_present) { + j.write_int("rssi-BT-r15", rssi_bt_r15); + } + j.end_obj(); +} + +// LogMeasResultWLAN-r15 ::= SEQUENCE +log_meas_result_wlan_r15_s::log_meas_result_wlan_r15_s() +{ + ext = false; + rssi_wlan_r15_present = false; + rtt_wlan_r15_present = false; +} +SRSASN_CODE log_meas_result_wlan_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rssi_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(rtt_wlan_r15_present, 1)); + + HANDLE_CODE(wlan_ids_r15.pack(bref)); + if (rssi_wlan_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rssi_wlan_r15, (uint8_t)0, (uint8_t)141)); + } + if (rtt_wlan_r15_present) { + HANDLE_CODE(rtt_wlan_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_result_wlan_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rssi_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(rtt_wlan_r15_present, 1)); + + HANDLE_CODE(wlan_ids_r15.unpack(bref)); + if (rssi_wlan_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rssi_wlan_r15, bref, (uint8_t)0, (uint8_t)141)); + } + if (rtt_wlan_r15_present) { + HANDLE_CODE(rtt_wlan_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void log_meas_result_wlan_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("wlan-Identifiers-r15"); + wlan_ids_r15.to_json(j); + if (rssi_wlan_r15_present) { + j.write_int("rssiWLAN-r15", rssi_wlan_r15); + } + if (rtt_wlan_r15_present) { + j.write_fieldname("rtt-WLAN-r15"); + rtt_wlan_r15.to_json(j); + } + j.end_obj(); +} + +// MeasResult2CDMA2000-r9 ::= SEQUENCE +SRSASN_CODE meas_result2_cdma2000_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(carrier_freq_r9.pack(bref)); + HANDLE_CODE(meas_result_list_r9.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_cdma2000_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(carrier_freq_r9.unpack(bref)); + HANDLE_CODE(meas_result_list_r9.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_result2_cdma2000_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("carrierFreq-r9"); + carrier_freq_r9.to_json(j); + j.write_fieldname("measResultList-r9"); + meas_result_list_r9.to_json(j); + j.end_obj(); +} + +// MeasResult2EUTRA-r9 ::= SEQUENCE +SRSASN_CODE meas_result2_eutra_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r9, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_r9, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_eutra_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r9, bref, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_r9, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result2_eutra_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r9", carrier_freq_r9); + j.start_array("measResultList-r9"); + for (uint32_t i1 = 0; i1 < meas_result_list_r9.size(); ++i1) { + meas_result_list_r9[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResult2EUTRA-v1250 ::= SEQUENCE +meas_result2_eutra_v1250_s::meas_result2_eutra_v1250_s() +{ + rsrq_type_r12_present = false; +} +SRSASN_CODE meas_result2_eutra_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rsrq_type_r12_present, 1)); + + if (rsrq_type_r12_present) { + HANDLE_CODE(rsrq_type_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_eutra_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rsrq_type_r12_present, 1)); + + if (rsrq_type_r12_present) { + HANDLE_CODE(rsrq_type_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result2_eutra_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrq_type_r12_present) { + j.write_fieldname("rsrq-Type-r12"); + rsrq_type_r12.to_json(j); + } + j.end_obj(); +} + +// MeasResult2EUTRA-v9e0 ::= SEQUENCE +meas_result2_eutra_v9e0_s::meas_result2_eutra_v9e0_s() +{ + carrier_freq_v9e0_present = false; +} +SRSASN_CODE meas_result2_eutra_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_v9e0_present, 1)); + + if (carrier_freq_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_v9e0, (uint32_t)65536, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_eutra_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_v9e0_present, 1)); + + if (carrier_freq_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + } + + return SRSASN_SUCCESS; +} +void meas_result2_eutra_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_v9e0_present) { + j.write_int("carrierFreq-v9e0", carrier_freq_v9e0); + } + j.end_obj(); +} + +// MeasResult2UTRA-r9 ::= SEQUENCE +SRSASN_CODE meas_result2_utra_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r9, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_r9, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_utra_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r9, bref, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_r9, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result2_utra_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r9", carrier_freq_r9); + j.start_array("measResultList-r9"); + for (uint32_t i1 = 0; i1 < meas_result_list_r9.size(); ++i1) { + meas_result_list_r9[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultIdle-r15 ::= SEQUENCE +meas_result_idle_r15_s::meas_result_idle_r15_s() +{ + ext = false; + meas_result_neigh_cells_r15_present = false; +} +SRSASN_CODE meas_result_idle_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, meas_result_serving_cell_r15.rsrp_result_r15, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_serving_cell_r15.rsrq_result_r15, (int8_t)-30, (int8_t)46)); + if (meas_result_neigh_cells_r15_present) { + HANDLE_CODE(meas_result_neigh_cells_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_idle_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(meas_result_serving_cell_r15.rsrp_result_r15, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_serving_cell_r15.rsrq_result_r15, bref, (int8_t)-30, (int8_t)46)); + if (meas_result_neigh_cells_r15_present) { + HANDLE_CODE(meas_result_neigh_cells_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result_idle_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultServingCell-r15"); + j.start_obj(); + j.write_int("rsrpResult-r15", meas_result_serving_cell_r15.rsrp_result_r15); + j.write_int("rsrqResult-r15", meas_result_serving_cell_r15.rsrq_result_r15); + j.end_obj(); + if (meas_result_neigh_cells_r15_present) { + j.write_fieldname("measResultNeighCells-r15"); + meas_result_neigh_cells_r15.to_json(j); + } + j.end_obj(); +} + +void meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::set(types::options e) +{ + type_ = e; +} +void meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::meas_result_idle_list_eutra_r15: + j.start_array("measResultIdleListEUTRA-r15"); + for (uint32_t i1 = 0; i1 < c.size(); ++i1) { + c[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::meas_result_idle_list_eutra_r15: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::meas_result_idle_list_eutra_r15: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasResultMBSFN-r12 ::= SEQUENCE +meas_result_mbsfn_r12_s::meas_result_mbsfn_r12_s() +{ + ext = false; + sig_bler_result_r12_present = false; + data_bler_mch_result_list_r12_present = false; +} +SRSASN_CODE meas_result_mbsfn_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sig_bler_result_r12_present, 1)); + HANDLE_CODE(bref.pack(data_bler_mch_result_list_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, mbsfn_area_r12.mbsfn_area_id_r12, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE(pack_unalign_integer(bref, mbsfn_area_r12.carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_unalign_integer(bref, rsrp_result_mbsfn_r12, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, rsrq_result_mbsfn_r12, (uint8_t)0, (uint8_t)31)); + if (sig_bler_result_r12_present) { + HANDLE_CODE(sig_bler_result_r12.pack(bref)); + } + if (data_bler_mch_result_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, data_bler_mch_result_list_r12, 1, 15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_mbsfn_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sig_bler_result_r12_present, 1)); + HANDLE_CODE(bref.unpack(data_bler_mch_result_list_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(mbsfn_area_r12.mbsfn_area_id_r12, bref, (uint8_t)0, (uint8_t)255)); + HANDLE_CODE(unpack_unalign_integer(mbsfn_area_r12.carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_unalign_integer(rsrp_result_mbsfn_r12, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(rsrq_result_mbsfn_r12, bref, (uint8_t)0, (uint8_t)31)); + if (sig_bler_result_r12_present) { + HANDLE_CODE(sig_bler_result_r12.unpack(bref)); + } + if (data_bler_mch_result_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(data_bler_mch_result_list_r12, bref, 1, 15)); + } + + return SRSASN_SUCCESS; +} +void meas_result_mbsfn_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mbsfn-Area-r12"); + j.start_obj(); + j.write_int("mbsfn-AreaId-r12", mbsfn_area_r12.mbsfn_area_id_r12); + j.write_int("carrierFreq-r12", mbsfn_area_r12.carrier_freq_r12); + j.end_obj(); + j.write_int("rsrpResultMBSFN-r12", rsrp_result_mbsfn_r12); + j.write_int("rsrqResultMBSFN-r12", rsrq_result_mbsfn_r12); + if (sig_bler_result_r12_present) { + j.write_fieldname("signallingBLER-Result-r12"); + sig_bler_result_r12.to_json(j); + } + if (data_bler_mch_result_list_r12_present) { + j.start_array("dataBLER-MCH-ResultList-r12"); + for (uint32_t i1 = 0; i1 < data_bler_mch_result_list_r12.size(); ++i1) { + data_bler_mch_result_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasResultSSB-Index-r15 ::= SEQUENCE +meas_result_ssb_idx_r15_s::meas_result_ssb_idx_r15_s() +{ + ext = false; + meas_result_ssb_idx_r15_present = false; +} +SRSASN_CODE meas_result_ssb_idx_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_ssb_idx_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, ssb_idx_r15, (uint8_t)0, (uint8_t)63)); + if (meas_result_ssb_idx_r15_present) { + HANDLE_CODE(meas_result_ssb_idx_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_ssb_idx_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_ssb_idx_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(ssb_idx_r15, bref, (uint8_t)0, (uint8_t)63)); + if (meas_result_ssb_idx_r15_present) { + HANDLE_CODE(meas_result_ssb_idx_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result_ssb_idx_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ssb-Index-r15", ssb_idx_r15); + if (meas_result_ssb_idx_r15_present) { + j.write_fieldname("measResultSSB-Index-r15"); + meas_result_ssb_idx_r15.to_json(j); + } + j.end_obj(); +} + +// PerCC-GapIndication-r14 ::= SEQUENCE +SRSASN_CODE per_cc_gap_ind_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, serv_cell_id_r14, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_enum(bref, gap_ind_r14)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE per_cc_gap_ind_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(serv_cell_id_r14, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_enum(gap_ind_r14, bref)); + + return SRSASN_SUCCESS; +} +void per_cc_gap_ind_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellId-r14", serv_cell_id_r14); + j.write_str("gapIndication-r14", gap_ind_r14.to_string()); + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-v1530-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v1530_ies_s::rrc_conn_recfg_complete_v1530_ies_s() +{ + log_meas_available_bt_r15_present = false; + log_meas_available_wlan_r15_present = false; + flight_path_info_available_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_complete_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_complete_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_bt_r15_present) { + j.write_str("logMeasAvailableBT-r15", "true"); + } + if (log_meas_available_wlan_r15_present) { + j.write_str("logMeasAvailableWLAN-r15", "true"); + } + if (flight_path_info_available_r15_present) { + j.write_str("flightPathInfoAvailable-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1430-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1430_ies_s::rrc_conn_setup_complete_v1430_ies_s() +{ + dcn_id_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dcn_id_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (dcn_id_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, dcn_id_r14, (uint16_t)0, (uint16_t)65535)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dcn_id_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (dcn_id_r14_present) { + HANDLE_CODE(unpack_unalign_integer(dcn_id_r14, bref, (uint16_t)0, (uint16_t)65535)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dcn_id_r14_present) { + j.write_int("dcn-ID-r14", dcn_id_r14); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// VictimSystemType-r11 ::= SEQUENCE +victim_sys_type_r11_s::victim_sys_type_r11_s() +{ + gps_r11_present = false; + glonass_r11_present = false; + bds_r11_present = false; + galileo_r11_present = false; + wlan_r11_present = false; + bluetooth_r11_present = false; +} +SRSASN_CODE victim_sys_type_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(gps_r11_present, 1)); + HANDLE_CODE(bref.pack(glonass_r11_present, 1)); + HANDLE_CODE(bref.pack(bds_r11_present, 1)); + HANDLE_CODE(bref.pack(galileo_r11_present, 1)); + HANDLE_CODE(bref.pack(wlan_r11_present, 1)); + HANDLE_CODE(bref.pack(bluetooth_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE victim_sys_type_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(gps_r11_present, 1)); + HANDLE_CODE(bref.unpack(glonass_r11_present, 1)); + HANDLE_CODE(bref.unpack(bds_r11_present, 1)); + HANDLE_CODE(bref.unpack(galileo_r11_present, 1)); + HANDLE_CODE(bref.unpack(wlan_r11_present, 1)); + HANDLE_CODE(bref.unpack(bluetooth_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void victim_sys_type_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gps_r11_present) { + j.write_str("gps-r11", "true"); + } + if (glonass_r11_present) { + j.write_str("glonass-r11", "true"); + } + if (bds_r11_present) { + j.write_str("bds-r11", "true"); + } + if (galileo_r11_present) { + j.write_str("galileo-r11", "true"); + } + if (wlan_r11_present) { + j.write_str("wlan-r11", "true"); + } + if (bluetooth_r11_present) { + j.write_str("bluetooth-r11", "true"); + } + j.end_obj(); +} + +// VisitedCellInfo-r12 ::= SEQUENCE +visited_cell_info_r12_s::visited_cell_info_r12_s() +{ + ext = false; + visited_cell_id_r12_present = false; +} +SRSASN_CODE visited_cell_info_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(visited_cell_id_r12_present, 1)); + + if (visited_cell_id_r12_present) { + HANDLE_CODE(visited_cell_id_r12.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, time_spent_r12, (uint16_t)0, (uint16_t)4095)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_cell_info_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(visited_cell_id_r12_present, 1)); + + if (visited_cell_id_r12_present) { + HANDLE_CODE(visited_cell_id_r12.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(time_spent_r12, bref, (uint16_t)0, (uint16_t)4095)); + + return SRSASN_SUCCESS; +} +void visited_cell_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (visited_cell_id_r12_present) { + j.write_fieldname("visitedCellId-r12"); + visited_cell_id_r12.to_json(j); + } + j.write_int("timeSpent-r12", time_spent_r12); + j.end_obj(); +} + +void visited_cell_info_r12_s::visited_cell_id_r12_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r12: + c.destroy(); + break; + case types::pci_arfcn_r12: + c.destroy(); + break; + default: + break; + } +} +void visited_cell_info_r12_s::visited_cell_id_r12_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r12: + c.init(); + break; + case types::pci_arfcn_r12: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r12_s::visited_cell_id_r12_c_"); + } +} +visited_cell_info_r12_s::visited_cell_id_r12_c_::visited_cell_id_r12_c_( + const visited_cell_info_r12_s::visited_cell_id_r12_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r12: + c.init(other.c.get()); + break; + case types::pci_arfcn_r12: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r12_s::visited_cell_id_r12_c_"); + } +} +visited_cell_info_r12_s::visited_cell_id_r12_c_& visited_cell_info_r12_s::visited_cell_id_r12_c_:: + operator=(const visited_cell_info_r12_s::visited_cell_id_r12_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r12: + c.set(other.c.get()); + break; + case types::pci_arfcn_r12: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r12_s::visited_cell_id_r12_c_"); + } + + return *this; +} +void visited_cell_info_r12_s::visited_cell_id_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r12: + j.write_fieldname("cellGlobalId-r12"); + c.get().to_json(j); + break; + case types::pci_arfcn_r12: + j.write_fieldname("pci-arfcn-r12"); + j.start_obj(); + j.write_int("physCellId-r12", c.get().pci_r12); + j.write_int("carrierFreq-r12", c.get().carrier_freq_r12); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r12_s::visited_cell_id_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_cell_info_r12_s::visited_cell_id_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cell_global_id_r12: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r12: + HANDLE_CODE(pack_unalign_integer(bref, c.get().pci_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + pack_unalign_integer(bref, c.get().carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r12_s::visited_cell_id_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_cell_info_r12_s::visited_cell_id_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cell_global_id_r12: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r12: + HANDLE_CODE(unpack_unalign_integer(c.get().pci_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + unpack_unalign_integer(c.get().carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r12_s::visited_cell_id_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// WayPointLocation-r15 ::= SEQUENCE +way_point_location_r15_s::way_point_location_r15_s() +{ + time_stamp_r15_present = false; +} +SRSASN_CODE way_point_location_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(time_stamp_r15_present, 1)); + + HANDLE_CODE(way_point_location_r15.pack(bref)); + if (time_stamp_r15_present) { + HANDLE_CODE(time_stamp_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE way_point_location_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(time_stamp_r15_present, 1)); + + HANDLE_CODE(way_point_location_r15.unpack(bref)); + if (time_stamp_r15_present) { + HANDLE_CODE(time_stamp_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void way_point_location_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("wayPointLocation-r15"); + way_point_location_r15.to_json(j); + if (time_stamp_r15_present) { + j.write_str("timeStamp-r15", time_stamp_r15.to_string()); + } + j.end_obj(); +} + +// AffectedCarrierFreqCombInfoMRDC-r15 ::= SEQUENCE +affected_carrier_freq_comb_info_mrdc_r15_s::affected_carrier_freq_comb_info_mrdc_r15_s() +{ + affected_carrier_freq_comb_mrdc_r15_present = false; +} +SRSASN_CODE affected_carrier_freq_comb_info_mrdc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_mrdc_r15_present, 1)); + + HANDLE_CODE(victim_sys_type_r15.pack(bref)); + HANDLE_CODE(pack_enum(bref, interference_direction_mrdc_r15)); + if (affected_carrier_freq_comb_mrdc_r15_present) { + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15_present, 1)); + if (affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15, 1, 32, + UnalignedIntegerPacker(1, 64))); + } + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15, 1, 16, + UnalignedIntegerPacker(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE affected_carrier_freq_comb_info_mrdc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_mrdc_r15_present, 1)); + + HANDLE_CODE(victim_sys_type_r15.unpack(bref)); + HANDLE_CODE(unpack_enum(interference_direction_mrdc_r15, bref)); + if (affected_carrier_freq_comb_mrdc_r15_present) { + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15_present, 1)); + if (affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15, bref, 1, + 32, UnalignedIntegerPacker(1, 64))); + } + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15, bref, 1, 16, + UnalignedIntegerPacker(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +void affected_carrier_freq_comb_info_mrdc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("victimSystemType-r15"); + victim_sys_type_r15.to_json(j); + j.write_str("interferenceDirectionMRDC-r15", interference_direction_mrdc_r15.to_string()); + if (affected_carrier_freq_comb_mrdc_r15_present) { + j.write_fieldname("affectedCarrierFreqCombMRDC-r15"); + j.start_obj(); + if (affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15_present) { + j.start_array("affectedCarrierFreqCombEUTRA-r15"); + for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15.size(); + ++i1) { + j.write_int(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15[i1]); + } + j.end_array(); + } + j.start_array("affectedCarrierFreqCombNR-r15"); + for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15.size(); ++i1) { + j.write_int(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15[i1]); + } + j.end_array(); + j.end_obj(); + } + j.end_obj(); +} + +affected_carrier_freq_comb_info_mrdc_r15_s::affected_carrier_freq_comb_mrdc_r15_s_:: + affected_carrier_freq_comb_mrdc_r15_s_() +{ + affected_carrier_freq_comb_eutra_r15_present = false; +} + +// CGI-InfoNR-r15 ::= SEQUENCE +cgi_info_nr_r15_s::cgi_info_nr_r15_s() +{ + ext = false; + plmn_id_info_list_r15_present = false; + freq_band_list_minus15_present = false; + no_sib1_r15_present = false; +} +SRSASN_CODE cgi_info_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(plmn_id_info_list_r15_present, 1)); + HANDLE_CODE(bref.pack(freq_band_list_minus15_present, 1)); + HANDLE_CODE(bref.pack(no_sib1_r15_present, 1)); + + if (plmn_id_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list_r15, 1, 12)); + } + if (freq_band_list_minus15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_minus15, 1, 32, UnalignedIntegerPacker(1, 1024))); + } + if (no_sib1_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, no_sib1_r15.ssb_subcarrier_offset_r15, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, no_sib1_r15.pdcch_cfg_sib1_r15, (uint8_t)0, (uint8_t)255)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cgi_info_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(plmn_id_info_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_list_minus15_present, 1)); + HANDLE_CODE(bref.unpack(no_sib1_r15_present, 1)); + + if (plmn_id_info_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_info_list_r15, bref, 1, 12)); + } + if (freq_band_list_minus15_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_minus15, bref, 1, 32, UnalignedIntegerPacker(1, 1024))); + } + if (no_sib1_r15_present) { + HANDLE_CODE(unpack_unalign_integer(no_sib1_r15.ssb_subcarrier_offset_r15, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(no_sib1_r15.pdcch_cfg_sib1_r15, bref, (uint8_t)0, (uint8_t)255)); + } + + return SRSASN_SUCCESS; +} +void cgi_info_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_info_list_r15_present) { + j.start_array("plmn-IdentityInfoList-r15"); + for (uint32_t i1 = 0; i1 < plmn_id_info_list_r15.size(); ++i1) { + plmn_id_info_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (freq_band_list_minus15_present) { + j.start_array("frequencyBandList-15"); + for (uint32_t i1 = 0; i1 < freq_band_list_minus15.size(); ++i1) { + j.write_int(freq_band_list_minus15[i1]); + } + j.end_array(); + } + if (no_sib1_r15_present) { + j.write_fieldname("noSIB1-r15"); + j.start_obj(); + j.write_int("ssb-SubcarrierOffset-r15", no_sib1_r15.ssb_subcarrier_offset_r15); + j.write_int("pdcch-ConfigSIB1-r15", no_sib1_r15.pdcch_cfg_sib1_r15); + j.end_obj(); + } + j.end_obj(); +} + +// FlightPathInfoReport-r15 ::= SEQUENCE +flight_path_info_report_r15_s::flight_path_info_report_r15_s() +{ + flight_path_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE flight_path_info_report_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(flight_path_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (flight_path_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, flight_path_r15, 1, 20)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE flight_path_info_report_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(flight_path_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (flight_path_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(flight_path_r15, bref, 1, 20)); + } + + return SRSASN_SUCCESS; +} +void flight_path_info_report_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (flight_path_r15_present) { + j.start_array("flightPath-r15"); + for (uint32_t i1 = 0; i1 < flight_path_r15.size(); ++i1) { + flight_path_r15[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-v1510-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v1510_ies_s::rrc_conn_recfg_complete_v1510_ies_s() +{ + scg_cfg_resp_nr_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v1510_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scg_cfg_resp_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (scg_cfg_resp_nr_r15_present) { + HANDLE_CODE(scg_cfg_resp_nr_r15.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_complete_v1510_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scg_cfg_resp_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (scg_cfg_resp_nr_r15_present) { + HANDLE_CODE(scg_cfg_resp_nr_r15.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_complete_v1510_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scg_cfg_resp_nr_r15_present) { + j.write_str("scg-ConfigResponseNR-r15", scg_cfg_resp_nr_r15.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-v1530-IEs ::= SEQUENCE +rrc_conn_reest_complete_v1530_ies_s::rrc_conn_reest_complete_v1530_ies_s() +{ + log_meas_available_bt_r15_present = false; + log_meas_available_wlan_r15_present = false; + flight_path_info_available_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_complete_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_complete_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_bt_r15_present) { + j.write_str("logMeasAvailableBT-r15", "true"); + } + if (log_meas_available_wlan_r15_present) { + j.write_str("logMeasAvailableWLAN-r15", "true"); + } + if (flight_path_info_available_r15_present) { + j.write_str("flightPathInfoAvailable-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1330-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1330_ies_s::rrc_conn_setup_complete_v1330_ies_s() +{ + ue_ce_need_ul_gaps_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1330_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_ce_need_ul_gaps_r13_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_conn_setup_complete_v1330_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_ce_need_ul_gaps_r13_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_conn_setup_complete_v1330_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_ce_need_ul_gaps_r13_present) { + j.write_str("ue-CE-NeedULGaps-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LogMeasInfo-r10 ::= SEQUENCE +log_meas_info_r10_s::log_meas_info_r10_s() +{ + ext = false; + location_info_r10_present = false; + meas_result_neigh_cells_r10_present = false; + meas_result_list_eutra_v1090_present = false; + meas_result_list_mbsfn_r12_present = false; + meas_result_serv_cell_v1250_present = false; + serv_cell_rsrq_type_r12_present = false; + meas_result_list_eutra_v1250_present = false; + in_dev_coex_detected_r13_present = false; + meas_result_serv_cell_v1360_present = false; + log_meas_result_list_bt_r15_present = false; + log_meas_result_list_wlan_r15_present = false; +} +SRSASN_CODE log_meas_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(location_info_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r10_present, 1)); + + if (location_info_r10_present) { + HANDLE_CODE(location_info_r10.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, relative_time_stamp_r10, (uint16_t)0, (uint16_t)7200)); + HANDLE_CODE(serv_cell_id_r10.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_serv_cell_r10.rsrp_result_r10, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_serv_cell_r10.rsrq_result_r10, (uint8_t)0, (uint8_t)34)); + if (meas_result_neigh_cells_r10_present) { + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r10.meas_result_list_eutra_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r10.meas_result_list_utra_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r10.meas_result_list_geran_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10_present, 1)); + if (meas_result_neigh_cells_r10.meas_result_list_eutra_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r10.meas_result_list_eutra_r10, 1, 8)); + } + if (meas_result_neigh_cells_r10.meas_result_list_utra_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r10.meas_result_list_utra_r10, 1, 8)); + } + if (meas_result_neigh_cells_r10.meas_result_list_geran_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r10.meas_result_list_geran_r10, 1, 3, + SeqOfPacker(1, 8, Packer()))); + } + if (meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10, 1, 8)); + } + } + + if (ext) { + ext_groups_header group_flags(5); + rrc_asn1_warn_assert(meas_result_list_eutra_v1090_present != (meas_result_list_eutra_v1090.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= meas_result_list_eutra_v1090_present; + rrc_asn1_warn_assert(meas_result_list_mbsfn_r12_present != (meas_result_list_mbsfn_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= meas_result_list_mbsfn_r12_present; + group_flags[1] |= meas_result_serv_cell_v1250_present; + rrc_asn1_warn_assert(serv_cell_rsrq_type_r12_present != (serv_cell_rsrq_type_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= serv_cell_rsrq_type_r12_present; + rrc_asn1_warn_assert(meas_result_list_eutra_v1250_present != (meas_result_list_eutra_v1250.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= meas_result_list_eutra_v1250_present; + group_flags[2] |= in_dev_coex_detected_r13_present; + group_flags[3] |= meas_result_serv_cell_v1360_present; + rrc_asn1_warn_assert(log_meas_result_list_bt_r15_present != (log_meas_result_list_bt_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[4] |= log_meas_result_list_bt_r15_present; + rrc_asn1_warn_assert(log_meas_result_list_wlan_r15_present != (log_meas_result_list_wlan_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[4] |= log_meas_result_list_wlan_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_list_eutra_v1090_present, 1)); + if (meas_result_list_eutra_v1090_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_eutra_v1090, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_list_mbsfn_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serv_cell_v1250_present, 1)); + HANDLE_CODE(bref.pack(serv_cell_rsrq_type_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_list_eutra_v1250_present, 1)); + if (meas_result_list_mbsfn_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_mbsfn_r12, 1, 8)); + } + if (meas_result_serv_cell_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_serv_cell_v1250, (int8_t)-30, (int8_t)46)); + } + if (serv_cell_rsrq_type_r12_present) { + HANDLE_CODE(serv_cell_rsrq_type_r12->pack(bref)); + } + if (meas_result_list_eutra_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_eutra_v1250, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(in_dev_coex_detected_r13_present, 1)); + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_serv_cell_v1360_present, 1)); + if (meas_result_serv_cell_v1360_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_serv_cell_v1360, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_result_list_wlan_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_bt_r15, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_wlan_r15, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(location_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r10_present, 1)); + + if (location_info_r10_present) { + HANDLE_CODE(location_info_r10.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(relative_time_stamp_r10, bref, (uint16_t)0, (uint16_t)7200)); + HANDLE_CODE(serv_cell_id_r10.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(meas_result_serv_cell_r10.rsrp_result_r10, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_serv_cell_r10.rsrq_result_r10, bref, (uint8_t)0, (uint8_t)34)); + if (meas_result_neigh_cells_r10_present) { + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r10.meas_result_list_eutra_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r10.meas_result_list_utra_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r10.meas_result_list_geran_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10_present, 1)); + if (meas_result_neigh_cells_r10.meas_result_list_eutra_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r10.meas_result_list_eutra_r10, bref, 1, 8)); + } + if (meas_result_neigh_cells_r10.meas_result_list_utra_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r10.meas_result_list_utra_r10, bref, 1, 8)); + } + if (meas_result_neigh_cells_r10.meas_result_list_geran_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r10.meas_result_list_geran_r10, bref, 1, 3, + SeqOfPacker(1, 8, Packer()))); + } + if (meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10, bref, 1, 8)); + } + } + + if (ext) { + ext_groups_header group_flags(5); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_list_eutra_v1090_present, 1)); + if (meas_result_list_eutra_v1090_present) { + meas_result_list_eutra_v1090 = make_copy_ptr(meas_result_list2_eutra_v9e0_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_eutra_v1090, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_list_mbsfn_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serv_cell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(serv_cell_rsrq_type_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_list_eutra_v1250_present, 1)); + if (meas_result_list_mbsfn_r12_present) { + meas_result_list_mbsfn_r12 = make_copy_ptr(meas_result_list_mbsfn_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_mbsfn_r12, bref, 1, 8)); + } + if (meas_result_serv_cell_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_serv_cell_v1250, bref, (int8_t)-30, (int8_t)46)); + } + if (serv_cell_rsrq_type_r12_present) { + serv_cell_rsrq_type_r12 = make_copy_ptr(rsrq_type_r12_s()); + HANDLE_CODE(serv_cell_rsrq_type_r12->unpack(bref)); + } + if (meas_result_list_eutra_v1250_present) { + meas_result_list_eutra_v1250 = make_copy_ptr(meas_result_list2_eutra_v1250_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_eutra_v1250, bref, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(in_dev_coex_detected_r13_present, 1)); + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_serv_cell_v1360_present, 1)); + if (meas_result_serv_cell_v1360_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_serv_cell_v1360, bref, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_result_list_wlan_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + log_meas_result_list_bt_r15 = make_copy_ptr(log_meas_result_list_bt_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_bt_r15, bref, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + log_meas_result_list_wlan_r15 = make_copy_ptr(log_meas_result_list_wlan_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_wlan_r15, bref, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +void log_meas_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (location_info_r10_present) { + j.write_fieldname("locationInfo-r10"); + location_info_r10.to_json(j); + } + j.write_int("relativeTimeStamp-r10", relative_time_stamp_r10); + j.write_fieldname("servCellIdentity-r10"); + serv_cell_id_r10.to_json(j); + j.write_fieldname("measResultServCell-r10"); + j.start_obj(); + j.write_int("rsrpResult-r10", meas_result_serv_cell_r10.rsrp_result_r10); + j.write_int("rsrqResult-r10", meas_result_serv_cell_r10.rsrq_result_r10); + j.end_obj(); + if (meas_result_neigh_cells_r10_present) { + j.write_fieldname("measResultNeighCells-r10"); + j.start_obj(); + if (meas_result_neigh_cells_r10.meas_result_list_eutra_r10_present) { + j.start_array("measResultListEUTRA-r10"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_eutra_r10.size(); ++i1) { + meas_result_neigh_cells_r10.meas_result_list_eutra_r10[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r10.meas_result_list_utra_r10_present) { + j.start_array("measResultListUTRA-r10"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_utra_r10.size(); ++i1) { + meas_result_neigh_cells_r10.meas_result_list_utra_r10[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r10.meas_result_list_geran_r10_present) { + j.start_array("measResultListGERAN-r10"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_geran_r10.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < meas_result_neigh_cells_r10.meas_result_list_geran_r10[i1].size(); ++i2) { + meas_result_neigh_cells_r10.meas_result_list_geran_r10[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + if (meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10_present) { + j.start_array("measResultListCDMA2000-r10"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10.size(); ++i1) { + meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (meas_result_list_eutra_v1090_present) { + j.start_array("measResultListEUTRA-v1090"); + for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1090->size(); ++i1) { + ((*meas_result_list_eutra_v1090)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_list_mbsfn_r12_present) { + j.start_array("measResultListMBSFN-r12"); + for (uint32_t i1 = 0; i1 < meas_result_list_mbsfn_r12->size(); ++i1) { + ((*meas_result_list_mbsfn_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_serv_cell_v1250_present) { + j.write_int("measResultServCell-v1250", meas_result_serv_cell_v1250); + } + if (serv_cell_rsrq_type_r12_present) { + j.write_fieldname("servCellRSRQ-Type-r12"); + serv_cell_rsrq_type_r12->to_json(j); + } + if (meas_result_list_eutra_v1250_present) { + j.start_array("measResultListEUTRA-v1250"); + for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1250->size(); ++i1) { + ((*meas_result_list_eutra_v1250)[i1]).to_json(j); + } + j.end_array(); + } + if (in_dev_coex_detected_r13_present) { + j.write_str("inDeviceCoexDetected-r13", "true"); + } + if (meas_result_serv_cell_v1360_present) { + j.write_int("measResultServCell-v1360", meas_result_serv_cell_v1360); + } + if (log_meas_result_list_bt_r15_present) { + j.start_array("logMeasResultListBT-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { + ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (log_meas_result_list_wlan_r15_present) { + j.start_array("logMeasResultListWLAN-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { + ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +log_meas_info_r10_s::meas_result_neigh_cells_r10_s_::meas_result_neigh_cells_r10_s_() +{ + meas_result_list_eutra_r10_present = false; + meas_result_list_utra_r10_present = false; + meas_result_list_geran_r10_present = false; + meas_result_list_cdma2000_r10_present = false; +} + +// MRDC-AssistanceInfo-r15 ::= SEQUENCE +mrdc_assist_info_r15_s::mrdc_assist_info_r15_s() +{ + ext = false; +} +SRSASN_CODE mrdc_assist_info_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_info_list_mrdc_r15, 1, 128)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mrdc_assist_info_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_info_list_mrdc_r15, bref, 1, 128)); + + return SRSASN_SUCCESS; +} +void mrdc_assist_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("affectedCarrierFreqCombInfoListMRDC-r15"); + for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_info_list_mrdc_r15.size(); ++i1) { + affected_carrier_freq_comb_info_list_mrdc_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultCellNR-r15 ::= SEQUENCE +meas_result_cell_nr_r15_s::meas_result_cell_nr_r15_s() +{ + ext = false; + meas_result_rs_idx_list_r15_present = false; + cgi_info_r15_present = false; +} +SRSASN_CODE meas_result_cell_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_rs_idx_list_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r15, (uint16_t)0, (uint16_t)1007)); + HANDLE_CODE(meas_result_cell_r15.pack(bref)); + if (meas_result_rs_idx_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_rs_idx_list_r15, 1, 32)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(cgi_info_r15_present != (cgi_info_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= cgi_info_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(cgi_info_r15_present, 1)); + if (cgi_info_r15_present) { + HANDLE_CODE(cgi_info_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cell_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_rs_idx_list_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r15, bref, (uint16_t)0, (uint16_t)1007)); + HANDLE_CODE(meas_result_cell_r15.unpack(bref)); + if (meas_result_rs_idx_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_rs_idx_list_r15, bref, 1, 32)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(cgi_info_r15_present, 1)); + if (cgi_info_r15_present) { + cgi_info_r15 = make_copy_ptr(cgi_info_nr_r15_s()); + HANDLE_CODE(cgi_info_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_result_cell_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pci-r15", pci_r15); + j.write_fieldname("measResultCell-r15"); + meas_result_cell_r15.to_json(j); + if (meas_result_rs_idx_list_r15_present) { + j.start_array("measResultRS-IndexList-r15"); + for (uint32_t i1 = 0; i1 < meas_result_rs_idx_list_r15.size(); ++i1) { + meas_result_rs_idx_list_r15[i1].to_json(j); + } + j.end_array(); + } + if (cgi_info_r15_present) { + j.write_fieldname("cgi-Info-r15"); + cgi_info_r15->to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-v1430-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v1430_ies_s::rrc_conn_recfg_complete_v1430_ies_s() +{ + per_cc_gap_ind_list_r14_present = false; + num_freq_effective_r14_present = false; + num_freq_effective_reduced_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(per_cc_gap_ind_list_r14_present, 1)); + HANDLE_CODE(bref.pack(num_freq_effective_r14_present, 1)); + HANDLE_CODE(bref.pack(num_freq_effective_reduced_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (per_cc_gap_ind_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, per_cc_gap_ind_list_r14, 1, 32)); + } + if (num_freq_effective_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, num_freq_effective_r14, (uint8_t)1, (uint8_t)12)); + } + if (num_freq_effective_reduced_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, num_freq_effective_reduced_r14, (uint8_t)1, (uint8_t)12)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_complete_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(per_cc_gap_ind_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(num_freq_effective_r14_present, 1)); + HANDLE_CODE(bref.unpack(num_freq_effective_reduced_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (per_cc_gap_ind_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(per_cc_gap_ind_list_r14, bref, 1, 32)); + } + if (num_freq_effective_r14_present) { + HANDLE_CODE(unpack_unalign_integer(num_freq_effective_r14, bref, (uint8_t)1, (uint8_t)12)); + } + if (num_freq_effective_reduced_r14_present) { + HANDLE_CODE(unpack_unalign_integer(num_freq_effective_reduced_r14, bref, (uint8_t)1, (uint8_t)12)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_complete_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (per_cc_gap_ind_list_r14_present) { + j.start_array("perCC-GapIndicationList-r14"); + for (uint32_t i1 = 0; i1 < per_cc_gap_ind_list_r14.size(); ++i1) { + per_cc_gap_ind_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (num_freq_effective_r14_present) { + j.write_int("numFreqEffective-r14", num_freq_effective_r14); + } + if (num_freq_effective_reduced_r14_present) { + j.write_int("numFreqEffectiveReduced-r14", num_freq_effective_reduced_r14); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-v1250-IEs ::= SEQUENCE +rrc_conn_reest_complete_v1250_ies_s::rrc_conn_reest_complete_v1250_ies_s() +{ + log_meas_available_mbsfn_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_mbsfn_r12_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_conn_reest_complete_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_mbsfn_r12_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_conn_reest_complete_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_mbsfn_r12_present) { + j.write_str("logMeasAvailableMBSFN-r12", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1320-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1320_ies_s::rrc_conn_setup_complete_v1320_ies_s() +{ + ce_mode_b_r13_present = false; + s_tmsi_r13_present = false; + attach_without_pdn_connect_r13_present = false; + up_cio_t_eps_optim_r13_present = false; + cp_cio_t_eps_optim_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1320_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_mode_b_r13_present, 1)); + HANDLE_CODE(bref.pack(s_tmsi_r13_present, 1)); + HANDLE_CODE(bref.pack(attach_without_pdn_connect_r13_present, 1)); + HANDLE_CODE(bref.pack(up_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.pack(cp_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (s_tmsi_r13_present) { + HANDLE_CODE(s_tmsi_r13.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v1320_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_mode_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(s_tmsi_r13_present, 1)); + HANDLE_CODE(bref.unpack(attach_without_pdn_connect_r13_present, 1)); + HANDLE_CODE(bref.unpack(up_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.unpack(cp_cio_t_eps_optim_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (s_tmsi_r13_present) { + HANDLE_CODE(s_tmsi_r13.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_v1320_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_mode_b_r13_present) { + j.write_str("ce-ModeB-r13", "supported"); + } + if (s_tmsi_r13_present) { + j.write_fieldname("s-TMSI-r13"); + s_tmsi_r13.to_json(j); + } + if (attach_without_pdn_connect_r13_present) { + j.write_str("attachWithoutPDN-Connectivity-r13", "true"); + } + if (up_cio_t_eps_optim_r13_present) { + j.write_str("up-CIoT-EPS-Optimisation-r13", "true"); + } + if (cp_cio_t_eps_optim_r13_present) { + j.write_str("cp-CIoT-EPS-Optimisation-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// TrafficPatternInfo-v1530 ::= SEQUENCE +traffic_pattern_info_v1530_s::traffic_pattern_info_v1530_s() +{ + traffic_dest_r15_present = false; + reliability_info_sl_r15_present = false; +} +SRSASN_CODE traffic_pattern_info_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(traffic_dest_r15_present, 1)); + HANDLE_CODE(bref.pack(reliability_info_sl_r15_present, 1)); + + if (traffic_dest_r15_present) { + HANDLE_CODE(traffic_dest_r15.pack(bref)); + } + if (reliability_info_sl_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, reliability_info_sl_r15, (uint8_t)1, (uint8_t)8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE traffic_pattern_info_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(traffic_dest_r15_present, 1)); + HANDLE_CODE(bref.unpack(reliability_info_sl_r15_present, 1)); + + if (traffic_dest_r15_present) { + HANDLE_CODE(traffic_dest_r15.unpack(bref)); + } + if (reliability_info_sl_r15_present) { + HANDLE_CODE(unpack_unalign_integer(reliability_info_sl_r15, bref, (uint8_t)1, (uint8_t)8)); + } + + return SRSASN_SUCCESS; +} +void traffic_pattern_info_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (traffic_dest_r15_present) { + j.write_str("trafficDestination-r15", traffic_dest_r15.to_string()); + } + if (reliability_info_sl_r15_present) { + j.write_int("reliabilityInfoSL-r15", reliability_info_sl_r15); + } + j.end_obj(); +} + +// UEInformationResponse-v1530-IEs ::= SEQUENCE +ue_info_resp_v1530_ies_s::ue_info_resp_v1530_ies_s() +{ + meas_result_list_idle_r15_present = false; + flight_path_info_report_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_list_idle_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_info_report_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_result_list_idle_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_idle_r15, 1, 3)); + } + if (flight_path_info_report_r15_present) { + HANDLE_CODE(flight_path_info_report_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_list_idle_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_info_report_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_result_list_idle_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_idle_r15, bref, 1, 3)); + } + if (flight_path_info_report_r15_present) { + HANDLE_CODE(flight_path_info_report_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_result_list_idle_r15_present) { + j.start_array("measResultListIdle-r15"); + for (uint32_t i1 = 0; i1 < meas_result_list_idle_r15.size(); ++i1) { + meas_result_list_idle_r15[i1].to_json(j); + } + j.end_array(); + } + if (flight_path_info_report_r15_present) { + j.write_fieldname("flightPathInfoReport-r15"); + flight_path_info_report_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// AffectedCarrierFreq-v1310 ::= SEQUENCE +affected_carrier_freq_v1310_s::affected_carrier_freq_v1310_s() +{ + carrier_freq_v1310_present = false; +} +SRSASN_CODE affected_carrier_freq_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_v1310_present, 1)); + + if (carrier_freq_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_v1310, (uint8_t)33, (uint8_t)64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE affected_carrier_freq_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_v1310_present, 1)); + + if (carrier_freq_v1310_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_v1310, bref, (uint8_t)33, (uint8_t)64)); + } + + return SRSASN_SUCCESS; +} +void affected_carrier_freq_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_v1310_present) { + j.write_int("carrierFreq-v1310", carrier_freq_v1310); + } + j.end_obj(); +} + +// ConnEstFailReport-r11 ::= SEQUENCE +conn_est_fail_report_r11_s::conn_est_fail_report_r11_s() +{ + ext = false; + location_info_r11_present = false; + meas_result_neigh_cells_r11_present = false; + meas_result_list_eutra_v1130_present = false; + meas_result_failed_cell_v1250_present = false; + failed_cell_rsrq_type_r12_present = false; + meas_result_list_eutra_v1250_present = false; + meas_result_failed_cell_v1360_present = false; + log_meas_result_list_bt_r15_present = false; + log_meas_result_list_wlan_r15_present = false; +} +SRSASN_CODE conn_est_fail_report_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(location_info_r11_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r11_present, 1)); + HANDLE_CODE(bref.pack(meas_result_list_eutra_v1130_present, 1)); + + HANDLE_CODE(failed_cell_id_r11.pack(bref)); + if (location_info_r11_present) { + HANDLE_CODE(location_info_r11.pack(bref)); + } + HANDLE_CODE(bref.pack(meas_result_failed_cell_r11.rsrq_result_r11_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_failed_cell_r11.rsrp_result_r11, (uint8_t)0, (uint8_t)97)); + if (meas_result_failed_cell_r11.rsrq_result_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_failed_cell_r11.rsrq_result_r11, (uint8_t)0, (uint8_t)34)); + } + if (meas_result_neigh_cells_r11_present) { + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r11.meas_result_list_eutra_r11_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r11.meas_result_list_utra_r11_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r11.meas_result_list_geran_r11_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r11.meas_results_cdma2000_r11_present, 1)); + if (meas_result_neigh_cells_r11.meas_result_list_eutra_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r11.meas_result_list_eutra_r11, 1, 8)); + } + if (meas_result_neigh_cells_r11.meas_result_list_utra_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r11.meas_result_list_utra_r11, 1, 8)); + } + if (meas_result_neigh_cells_r11.meas_result_list_geran_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r11.meas_result_list_geran_r11, 1, 8)); + } + if (meas_result_neigh_cells_r11.meas_results_cdma2000_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r11.meas_results_cdma2000_r11, 1, 8)); + } + } + HANDLE_CODE(pack_unalign_integer(bref, nof_preambs_sent_r11, (uint8_t)1, (uint8_t)200)); + HANDLE_CODE(bref.pack(contention_detected_r11, 1)); + HANDLE_CODE(bref.pack(max_tx_pwr_reached_r11, 1)); + HANDLE_CODE(pack_unalign_integer(bref, time_since_fail_r11, (uint32_t)0, (uint32_t)172800)); + if (meas_result_list_eutra_v1130_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_eutra_v1130, 1, 8)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags[0] |= meas_result_failed_cell_v1250_present; + rrc_asn1_warn_assert(failed_cell_rsrq_type_r12_present != (failed_cell_rsrq_type_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= failed_cell_rsrq_type_r12_present; + rrc_asn1_warn_assert(meas_result_list_eutra_v1250_present != (meas_result_list_eutra_v1250.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= meas_result_list_eutra_v1250_present; + group_flags[1] |= meas_result_failed_cell_v1360_present; + rrc_asn1_warn_assert(log_meas_result_list_bt_r15_present != (log_meas_result_list_bt_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= log_meas_result_list_bt_r15_present; + rrc_asn1_warn_assert(log_meas_result_list_wlan_r15_present != (log_meas_result_list_wlan_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[2] |= log_meas_result_list_wlan_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_failed_cell_v1250_present, 1)); + HANDLE_CODE(bref.pack(failed_cell_rsrq_type_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_list_eutra_v1250_present, 1)); + if (meas_result_failed_cell_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_failed_cell_v1250, (int8_t)-30, (int8_t)46)); + } + if (failed_cell_rsrq_type_r12_present) { + HANDLE_CODE(failed_cell_rsrq_type_r12->pack(bref)); + } + if (meas_result_list_eutra_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_eutra_v1250, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_failed_cell_v1360_present, 1)); + if (meas_result_failed_cell_v1360_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_failed_cell_v1360, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_result_list_wlan_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_bt_r15, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_wlan_r15, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE conn_est_fail_report_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(location_info_r11_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r11_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_list_eutra_v1130_present, 1)); + + HANDLE_CODE(failed_cell_id_r11.unpack(bref)); + if (location_info_r11_present) { + HANDLE_CODE(location_info_r11.unpack(bref)); + } + HANDLE_CODE(bref.unpack(meas_result_failed_cell_r11.rsrq_result_r11_present, 1)); + HANDLE_CODE(unpack_unalign_integer(meas_result_failed_cell_r11.rsrp_result_r11, bref, (uint8_t)0, (uint8_t)97)); + if (meas_result_failed_cell_r11.rsrq_result_r11_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_failed_cell_r11.rsrq_result_r11, bref, (uint8_t)0, (uint8_t)34)); + } + if (meas_result_neigh_cells_r11_present) { + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r11.meas_result_list_eutra_r11_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r11.meas_result_list_utra_r11_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r11.meas_result_list_geran_r11_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r11.meas_results_cdma2000_r11_present, 1)); + if (meas_result_neigh_cells_r11.meas_result_list_eutra_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r11.meas_result_list_eutra_r11, bref, 1, 8)); + } + if (meas_result_neigh_cells_r11.meas_result_list_utra_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r11.meas_result_list_utra_r11, bref, 1, 8)); + } + if (meas_result_neigh_cells_r11.meas_result_list_geran_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r11.meas_result_list_geran_r11, bref, 1, 8)); + } + if (meas_result_neigh_cells_r11.meas_results_cdma2000_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r11.meas_results_cdma2000_r11, bref, 1, 8)); + } + } + HANDLE_CODE(unpack_unalign_integer(nof_preambs_sent_r11, bref, (uint8_t)1, (uint8_t)200)); + HANDLE_CODE(bref.unpack(contention_detected_r11, 1)); + HANDLE_CODE(bref.unpack(max_tx_pwr_reached_r11, 1)); + HANDLE_CODE(unpack_unalign_integer(time_since_fail_r11, bref, (uint32_t)0, (uint32_t)172800)); + if (meas_result_list_eutra_v1130_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_eutra_v1130, bref, 1, 8)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_failed_cell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(failed_cell_rsrq_type_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_list_eutra_v1250_present, 1)); + if (meas_result_failed_cell_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_failed_cell_v1250, bref, (int8_t)-30, (int8_t)46)); + } + if (failed_cell_rsrq_type_r12_present) { + failed_cell_rsrq_type_r12 = make_copy_ptr(rsrq_type_r12_s()); + HANDLE_CODE(failed_cell_rsrq_type_r12->unpack(bref)); + } + if (meas_result_list_eutra_v1250_present) { + meas_result_list_eutra_v1250 = make_copy_ptr(meas_result_list2_eutra_v1250_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_eutra_v1250, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_failed_cell_v1360_present, 1)); + if (meas_result_failed_cell_v1360_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_failed_cell_v1360, bref, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_result_list_wlan_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + log_meas_result_list_bt_r15 = make_copy_ptr(log_meas_result_list_bt_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_bt_r15, bref, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + log_meas_result_list_wlan_r15 = make_copy_ptr(log_meas_result_list_wlan_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_wlan_r15, bref, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +void conn_est_fail_report_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("failedCellId-r11"); + failed_cell_id_r11.to_json(j); + if (location_info_r11_present) { + j.write_fieldname("locationInfo-r11"); + location_info_r11.to_json(j); + } + j.write_fieldname("measResultFailedCell-r11"); + j.start_obj(); + j.write_int("rsrpResult-r11", meas_result_failed_cell_r11.rsrp_result_r11); + if (meas_result_failed_cell_r11.rsrq_result_r11_present) { + j.write_int("rsrqResult-r11", meas_result_failed_cell_r11.rsrq_result_r11); + } + j.end_obj(); + if (meas_result_neigh_cells_r11_present) { + j.write_fieldname("measResultNeighCells-r11"); + j.start_obj(); + if (meas_result_neigh_cells_r11.meas_result_list_eutra_r11_present) { + j.start_array("measResultListEUTRA-r11"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_result_list_eutra_r11.size(); ++i1) { + meas_result_neigh_cells_r11.meas_result_list_eutra_r11[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r11.meas_result_list_utra_r11_present) { + j.start_array("measResultListUTRA-r11"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_result_list_utra_r11.size(); ++i1) { + meas_result_neigh_cells_r11.meas_result_list_utra_r11[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r11.meas_result_list_geran_r11_present) { + j.start_array("measResultListGERAN-r11"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_result_list_geran_r11.size(); ++i1) { + meas_result_neigh_cells_r11.meas_result_list_geran_r11[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r11.meas_results_cdma2000_r11_present) { + j.start_array("measResultsCDMA2000-r11"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_results_cdma2000_r11.size(); ++i1) { + meas_result_neigh_cells_r11.meas_results_cdma2000_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.write_int("numberOfPreamblesSent-r11", nof_preambs_sent_r11); + j.write_bool("contentionDetected-r11", contention_detected_r11); + j.write_bool("maxTxPowerReached-r11", max_tx_pwr_reached_r11); + j.write_int("timeSinceFailure-r11", time_since_fail_r11); + if (meas_result_list_eutra_v1130_present) { + j.start_array("measResultListEUTRA-v1130"); + for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1130.size(); ++i1) { + meas_result_list_eutra_v1130[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_failed_cell_v1250_present) { + j.write_int("measResultFailedCell-v1250", meas_result_failed_cell_v1250); + } + if (failed_cell_rsrq_type_r12_present) { + j.write_fieldname("failedCellRSRQ-Type-r12"); + failed_cell_rsrq_type_r12->to_json(j); + } + if (meas_result_list_eutra_v1250_present) { + j.start_array("measResultListEUTRA-v1250"); + for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1250->size(); ++i1) { + ((*meas_result_list_eutra_v1250)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_failed_cell_v1360_present) { + j.write_int("measResultFailedCell-v1360", meas_result_failed_cell_v1360); + } + if (log_meas_result_list_bt_r15_present) { + j.start_array("logMeasResultListBT-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { + ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (log_meas_result_list_wlan_r15_present) { + j.start_array("logMeasResultListWLAN-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { + ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +conn_est_fail_report_r11_s::meas_result_failed_cell_r11_s_::meas_result_failed_cell_r11_s_() +{ + rsrq_result_r11_present = false; +} + +conn_est_fail_report_r11_s::meas_result_neigh_cells_r11_s_::meas_result_neigh_cells_r11_s_() +{ + meas_result_list_eutra_r11_present = false; + meas_result_list_utra_r11_present = false; + meas_result_list_geran_r11_present = false; + meas_results_cdma2000_r11_present = false; +} + +// DRB-CountInfo ::= SEQUENCE +SRSASN_CODE drb_count_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, drb_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, count_ul, (uint32_t)0, (uint32_t)4294967295)); + HANDLE_CODE(pack_unalign_integer(bref, count_dl, (uint32_t)0, (uint32_t)4294967295)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_count_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(drb_id, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(count_ul, bref, (uint32_t)0, (uint32_t)4294967295)); + HANDLE_CODE(unpack_unalign_integer(count_dl, bref, (uint32_t)0, (uint32_t)4294967295)); + + 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(); +} + +// InDeviceCoexIndication-v1530-IEs ::= SEQUENCE +in_dev_coex_ind_v1530_ies_s::in_dev_coex_ind_v1530_ies_s() +{ + mrdc_assist_info_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE in_dev_coex_ind_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mrdc_assist_info_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mrdc_assist_info_r15_present) { + HANDLE_CODE(mrdc_assist_info_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mrdc_assist_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mrdc_assist_info_r15_present) { + HANDLE_CODE(mrdc_assist_info_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void in_dev_coex_ind_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mrdc_assist_info_r15_present) { + j.write_fieldname("mrdc-AssistanceInfo-r15"); + mrdc_assist_info_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-v1250-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v1250_ies_s::rrc_conn_recfg_complete_v1250_ies_s() +{ + log_meas_available_mbsfn_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_mbsfn_r12_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_conn_recfg_complete_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_mbsfn_r12_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_conn_recfg_complete_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_mbsfn_r12_present) { + j.write_str("logMeasAvailableMBSFN-r12", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-v1130-IEs ::= SEQUENCE +rrc_conn_reest_complete_v1130_ies_s::rrc_conn_reest_complete_v1130_ies_s() +{ + conn_est_fail_info_available_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(conn_est_fail_info_available_r11_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_conn_reest_complete_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(conn_est_fail_info_available_r11_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_conn_reest_complete_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (conn_est_fail_info_available_r11_present) { + j.write_str("connEstFailInfoAvailable-r11", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1250-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1250_ies_s::rrc_conn_setup_complete_v1250_ies_s() +{ + mob_state_r12_present = false; + mob_history_avail_r12_present = false; + log_meas_available_mbsfn_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mob_state_r12_present, 1)); + HANDLE_CODE(bref.pack(mob_history_avail_r12_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_mbsfn_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mob_state_r12_present) { + HANDLE_CODE(pack_enum(bref, mob_state_r12)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mob_state_r12_present, 1)); + HANDLE_CODE(bref.unpack(mob_history_avail_r12_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_mbsfn_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mob_state_r12_present) { + HANDLE_CODE(unpack_enum(mob_state_r12, bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mob_state_r12_present) { + j.write_str("mobilityState-r12", mob_state_r12.to_string()); + } + if (mob_history_avail_r12_present) { + j.write_str("mobilityHistoryAvail-r12", "true"); + } + if (log_meas_available_mbsfn_r12_present) { + j.write_str("logMeasAvailableMBSFN-r12", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SL-V2X-CommTxResourceReq-r14 ::= SEQUENCE +sl_v2x_comm_tx_res_req_r14_s::sl_v2x_comm_tx_res_req_r14_s() +{ + carrier_freq_comm_tx_r14_present = false; + v2x_type_tx_sync_r14_present = false; + v2x_dest_info_list_r14_present = false; +} +SRSASN_CODE sl_v2x_comm_tx_res_req_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_comm_tx_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_dest_info_list_r14_present, 1)); + + if (carrier_freq_comm_tx_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_comm_tx_r14, (uint8_t)0, (uint8_t)7)); + } + if (v2x_type_tx_sync_r14_present) { + HANDLE_CODE(pack_enum(bref, v2x_type_tx_sync_r14)); + } + if (v2x_dest_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_dest_info_list_r14, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_comm_tx_res_req_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_comm_tx_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_type_tx_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_dest_info_list_r14_present, 1)); + + if (carrier_freq_comm_tx_r14_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_comm_tx_r14, bref, (uint8_t)0, (uint8_t)7)); + } + if (v2x_type_tx_sync_r14_present) { + HANDLE_CODE(unpack_enum(v2x_type_tx_sync_r14, bref)); + } + if (v2x_dest_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_dest_info_list_r14, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void sl_v2x_comm_tx_res_req_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_comm_tx_r14_present) { + j.write_int("carrierFreqCommTx-r14", carrier_freq_comm_tx_r14); + } + if (v2x_type_tx_sync_r14_present) { + j.write_str("v2x-TypeTxSync-r14", v2x_type_tx_sync_r14.to_string()); + } + if (v2x_dest_info_list_r14_present) { + j.start_array("v2x-DestinationInfoList-r14"); + for (uint32_t i1 = 0; i1 < v2x_dest_info_list_r14.size(); ++i1) { + j.write_str(v2x_dest_info_list_r14[i1].to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// UEInformationResponse-v1250-IEs ::= SEQUENCE +ue_info_resp_v1250_ies_s::ue_info_resp_v1250_ies_s() +{ + mob_history_report_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mob_history_report_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mob_history_report_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mob_history_report_r12, 1, 16)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mob_history_report_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mob_history_report_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(mob_history_report_r12, bref, 1, 16)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mob_history_report_r12_present) { + j.start_array("mobilityHistoryReport-r12"); + for (uint32_t i1 = 0; i1 < mob_history_report_r12.size(); ++i1) { + mob_history_report_r12[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// FailureReportSCG-v12d0 ::= SEQUENCE +fail_report_scg_v12d0_s::fail_report_scg_v12d0_s() +{ + meas_result_neigh_cells_v12d0_present = false; +} +SRSASN_CODE fail_report_scg_v12d0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_neigh_cells_v12d0_present, 1)); + + if (meas_result_neigh_cells_v12d0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_v12d0, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_scg_v12d0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_v12d0_present, 1)); + + if (meas_result_neigh_cells_v12d0_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_v12d0, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void fail_report_scg_v12d0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_result_neigh_cells_v12d0_present) { + j.start_array("measResultNeighCells-v12d0"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_v12d0.size(); ++i1) { + meas_result_neigh_cells_v12d0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// IDC-SubframePattern-r11 ::= CHOICE +void idc_sf_pattern_r11_c::destroy_() +{ + switch (type_) { + case types::sf_pattern_fdd_r11: + c.destroy >(); + break; + case types::sf_pattern_tdd_r11: + c.destroy(); + break; + default: + break; + } +} +void idc_sf_pattern_r11_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sf_pattern_fdd_r11: + c.init >(); + break; + case types::sf_pattern_tdd_r11: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c"); + } +} +idc_sf_pattern_r11_c::idc_sf_pattern_r11_c(const idc_sf_pattern_r11_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf_pattern_fdd_r11: + c.init(other.c.get >()); + break; + case types::sf_pattern_tdd_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c"); + } +} +idc_sf_pattern_r11_c& idc_sf_pattern_r11_c::operator=(const idc_sf_pattern_r11_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf_pattern_fdd_r11: + c.set(other.c.get >()); + break; + case types::sf_pattern_tdd_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c"); + } + + return *this; +} +void idc_sf_pattern_r11_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf_pattern_fdd_r11: + j.write_str("subframePatternFDD-r11", c.get >().to_string()); + break; + case types::sf_pattern_tdd_r11: + j.write_fieldname("subframePatternTDD-r11"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c"); + } + j.end_obj(); +} +SRSASN_CODE idc_sf_pattern_r11_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf_pattern_fdd_r11: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_pattern_tdd_r11: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE idc_sf_pattern_r11_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf_pattern_fdd_r11: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_pattern_tdd_r11: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::destroy_() +{ + switch (type_) { + case types::sf_cfg0_r11: + c.destroy >(); + break; + case types::sf_cfg1_minus5_r11: + c.destroy >(); + break; + case types::sf_cfg6_r11: + c.destroy >(); + break; + default: + break; + } +} +void idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sf_cfg0_r11: + c.init >(); + break; + case types::sf_cfg1_minus5_r11: + c.init >(); + break; + case types::sf_cfg6_r11: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_"); + } +} +idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::sf_pattern_tdd_r11_c_( + const idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf_cfg0_r11: + c.init(other.c.get >()); + break; + case types::sf_cfg1_minus5_r11: + c.init(other.c.get >()); + break; + case types::sf_cfg6_r11: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_"); + } +} +idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_& idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_:: + operator=(const idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf_cfg0_r11: + c.set(other.c.get >()); + break; + case types::sf_cfg1_minus5_r11: + c.set(other.c.get >()); + break; + case types::sf_cfg6_r11: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_"); + } + + return *this; +} +void idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf_cfg0_r11: + j.write_str("subframeConfig0-r11", c.get >().to_string()); + break; + case types::sf_cfg1_minus5_r11: + j.write_str("subframeConfig1-5-r11", c.get >().to_string()); + break; + case types::sf_cfg6_r11: + j.write_str("subframeConfig6-r11", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sf_cfg0_r11: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_cfg1_minus5_r11: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::sf_cfg6_r11: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sf_cfg0_r11: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_cfg1_minus5_r11: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::sf_cfg6_r11: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// InDeviceCoexIndication-v1360-IEs ::= SEQUENCE +in_dev_coex_ind_v1360_ies_s::in_dev_coex_ind_v1360_ies_s() +{ + hardware_sharing_problem_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE in_dev_coex_ind_v1360_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(hardware_sharing_problem_r13_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 in_dev_coex_ind_v1360_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(hardware_sharing_problem_r13_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 in_dev_coex_ind_v1360_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hardware_sharing_problem_r13_present) { + j.write_str("hardwareSharingProblem-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LogMeasReport-r10 ::= SEQUENCE +log_meas_report_r10_s::log_meas_report_r10_s() +{ + ext = false; + log_meas_available_r10_present = false; + log_meas_available_bt_r15_present = false; + log_meas_available_wlan_r15_present = false; +} +SRSASN_CODE log_meas_report_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(log_meas_available_r10_present, 1)); + + HANDLE_CODE(absolute_time_stamp_r10.pack(bref)); + HANDLE_CODE(trace_ref_r10.pack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.pack(bref)); + HANDLE_CODE(tce_id_r10.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, log_meas_info_list_r10, 1, 520)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= log_meas_available_bt_r15_present; + group_flags[0] |= log_meas_available_wlan_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_report_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(log_meas_available_r10_present, 1)); + + HANDLE_CODE(absolute_time_stamp_r10.unpack(bref)); + HANDLE_CODE(trace_ref_r10.unpack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.unpack(bref)); + HANDLE_CODE(tce_id_r10.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(log_meas_info_list_r10, bref, 1, 520)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void log_meas_report_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("absoluteTimeStamp-r10", absolute_time_stamp_r10.to_string()); + j.write_fieldname("traceReference-r10"); + trace_ref_r10.to_json(j); + j.write_str("traceRecordingSessionRef-r10", trace_recording_session_ref_r10.to_string()); + j.write_str("tce-Id-r10", tce_id_r10.to_string()); + j.start_array("logMeasInfoList-r10"); + for (uint32_t i1 = 0; i1 < log_meas_info_list_r10.size(); ++i1) { + log_meas_info_list_r10[i1].to_json(j); + } + j.end_array(); + if (log_meas_available_r10_present) { + j.write_str("logMeasAvailable-r10", "true"); + } + if (log_meas_available_bt_r15_present) { + j.write_str("logMeasAvailableBT-r15", "true"); + } + if (log_meas_available_wlan_r15_present) { + j.write_str("logMeasAvailableWLAN-r15", "true"); + } + j.end_obj(); +} + +// MBMS-ServiceInfo-r13 ::= SEQUENCE +SRSASN_CODE mbms_service_info_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(tmgi_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_service_info_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(tmgi_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mbms_service_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("tmgi-r13"); + tmgi_r13.to_json(j); + j.end_obj(); +} + +// MeasResultCBR-r14 ::= SEQUENCE +meas_result_cbr_r14_s::meas_result_cbr_r14_s() +{ + cbr_pscch_r14_present = false; +} +SRSASN_CODE meas_result_cbr_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cbr_pscch_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pool_id_r14, (uint8_t)1, (uint8_t)72)); + HANDLE_CODE(pack_unalign_integer(bref, cbr_pssch_r14, (uint8_t)0, (uint8_t)100)); + if (cbr_pscch_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, cbr_pscch_r14, (uint8_t)0, (uint8_t)100)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cbr_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cbr_pscch_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pool_id_r14, bref, (uint8_t)1, (uint8_t)72)); + HANDLE_CODE(unpack_unalign_integer(cbr_pssch_r14, bref, (uint8_t)0, (uint8_t)100)); + if (cbr_pscch_r14_present) { + HANDLE_CODE(unpack_unalign_integer(cbr_pscch_r14, bref, (uint8_t)0, (uint8_t)100)); + } + + return SRSASN_SUCCESS; +} +void meas_result_cbr_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("poolIdentity-r14", pool_id_r14); + j.write_int("cbr-PSSCH-r14", cbr_pssch_r14); + if (cbr_pscch_r14_present) { + j.write_int("cbr-PSCCH-r14", cbr_pscch_r14); + } + j.end_obj(); +} + +// MeasResultCSI-RS-r12 ::= SEQUENCE +meas_result_csi_rs_r12_s::meas_result_csi_rs_r12_s() +{ + ext = false; +} +SRSASN_CODE meas_result_csi_rs_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, meas_csi_rs_id_r12, (uint8_t)1, (uint8_t)96)); + HANDLE_CODE(pack_unalign_integer(bref, csi_rsrp_result_r12, (uint8_t)0, (uint8_t)97)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_csi_rs_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(meas_csi_rs_id_r12, bref, (uint8_t)1, (uint8_t)96)); + HANDLE_CODE(unpack_unalign_integer(csi_rsrp_result_r12, bref, (uint8_t)0, (uint8_t)97)); + + return SRSASN_SUCCESS; +} +void meas_result_csi_rs_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measCSI-RS-Id-r12", meas_csi_rs_id_r12); + j.write_int("csi-RSRP-Result-r12", csi_rsrp_result_r12); + j.end_obj(); +} + +// MeasResultCellSFTD-r15 ::= SEQUENCE +meas_result_cell_sftd_r15_s::meas_result_cell_sftd_r15_s() +{ + rsrp_result_r15_present = false; +} +SRSASN_CODE meas_result_cell_sftd_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rsrp_result_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r15, (uint16_t)0, (uint16_t)1007)); + HANDLE_CODE(pack_unalign_integer(bref, sfn_offset_result_r15, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(pack_unalign_integer(bref, frame_boundary_offset_result_r15, (int16_t)-30720, (int16_t)30719)); + if (rsrp_result_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrp_result_r15, (uint8_t)0, (uint8_t)127)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cell_sftd_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rsrp_result_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r15, bref, (uint16_t)0, (uint16_t)1007)); + HANDLE_CODE(unpack_unalign_integer(sfn_offset_result_r15, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(unpack_unalign_integer(frame_boundary_offset_result_r15, bref, (int16_t)-30720, (int16_t)30719)); + if (rsrp_result_r15_present) { + HANDLE_CODE(unpack_unalign_integer(rsrp_result_r15, bref, (uint8_t)0, (uint8_t)127)); + } + + return SRSASN_SUCCESS; +} +void meas_result_cell_sftd_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r15", pci_r15); + j.write_int("sfn-OffsetResult-r15", sfn_offset_result_r15); + j.write_int("frameBoundaryOffsetResult-r15", frame_boundary_offset_result_r15); + if (rsrp_result_r15_present) { + j.write_int("rsrpResult-r15", rsrp_result_r15); + } + j.end_obj(); +} + +// MeasResultFreqFailNR-r15 ::= SEQUENCE +meas_result_freq_fail_nr_r15_s::meas_result_freq_fail_nr_r15_s() +{ + ext = false; + meas_result_cell_list_r15_present = false; +} +SRSASN_CODE meas_result_freq_fail_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_cell_list_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)3279165)); + if (meas_result_cell_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_r15, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_freq_fail_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_cell_list_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)3279165)); + if (meas_result_cell_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_cell_list_r15, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void meas_result_freq_fail_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + if (meas_result_cell_list_r15_present) { + j.start_array("measResultCellList-r15"); + for (uint32_t i1 = 0; i1 < meas_result_cell_list_r15.size(); ++i1) { + meas_result_cell_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasResultServFreq-r10 ::= SEQUENCE +meas_result_serv_freq_r10_s::meas_result_serv_freq_r10_s() +{ + ext = false; + meas_result_scell_r10_present = false; + meas_result_best_neigh_cell_r10_present = false; + meas_result_scell_v1250_present = false; + meas_result_best_neigh_cell_v1250_present = false; + meas_result_scell_v1310_present = false; + meas_result_best_neigh_cell_v1310_present = false; +} +SRSASN_CODE meas_result_serv_freq_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_scell_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_r10_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, serv_freq_id_r10, (uint8_t)0, (uint8_t)7)); + if (meas_result_scell_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r10.rsrp_result_scell_r10, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r10.rsrq_result_scell_r10, (uint8_t)0, (uint8_t)34)); + } + if (meas_result_best_neigh_cell_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_best_neigh_cell_r10.pci_r10, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_best_neigh_cell_r10.rsrp_result_ncell_r10, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_best_neigh_cell_r10.rsrq_result_ncell_r10, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= meas_result_scell_v1250_present; + group_flags[0] |= meas_result_best_neigh_cell_v1250_present; + rrc_asn1_warn_assert(meas_result_scell_v1310_present != (meas_result_scell_v1310.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= meas_result_scell_v1310_present; + rrc_asn1_warn_assert(meas_result_best_neigh_cell_v1310_present != (meas_result_best_neigh_cell_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= meas_result_best_neigh_cell_v1310_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_scell_v1250_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_v1250_present, 1)); + if (meas_result_scell_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_v1250, (int8_t)-30, (int8_t)46)); + } + if (meas_result_best_neigh_cell_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_best_neigh_cell_v1250, (int8_t)-30, (int8_t)46)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_scell_v1310_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_v1310_present, 1)); + if (meas_result_scell_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_v1310->rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + if (meas_result_best_neigh_cell_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_best_neigh_cell_v1310->rs_sinr_result_r13, (uint8_t)0, + (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_serv_freq_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_scell_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_r10_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(serv_freq_id_r10, bref, (uint8_t)0, (uint8_t)7)); + if (meas_result_scell_r10_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r10.rsrp_result_scell_r10, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r10.rsrq_result_scell_r10, bref, (uint8_t)0, (uint8_t)34)); + } + if (meas_result_best_neigh_cell_r10_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_best_neigh_cell_r10.pci_r10, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + unpack_unalign_integer(meas_result_best_neigh_cell_r10.rsrp_result_ncell_r10, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE( + unpack_unalign_integer(meas_result_best_neigh_cell_r10.rsrq_result_ncell_r10, bref, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_scell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_v1250_present, 1)); + if (meas_result_scell_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_v1250, bref, (int8_t)-30, (int8_t)46)); + } + if (meas_result_best_neigh_cell_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_best_neigh_cell_v1250, bref, (int8_t)-30, (int8_t)46)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_scell_v1310_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_v1310_present, 1)); + if (meas_result_scell_v1310_present) { + meas_result_scell_v1310 = make_copy_ptr(meas_result_scell_v1310_s_()); + HANDLE_CODE( + unpack_unalign_integer(meas_result_scell_v1310->rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + if (meas_result_best_neigh_cell_v1310_present) { + meas_result_best_neigh_cell_v1310 = make_copy_ptr(meas_result_best_neigh_cell_v1310_s_()); + HANDLE_CODE(unpack_unalign_integer(meas_result_best_neigh_cell_v1310->rs_sinr_result_r13, bref, (uint8_t)0, + (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_result_serv_freq_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servFreqId-r10", serv_freq_id_r10); + if (meas_result_scell_r10_present) { + j.write_fieldname("measResultSCell-r10"); + j.start_obj(); + j.write_int("rsrpResultSCell-r10", meas_result_scell_r10.rsrp_result_scell_r10); + j.write_int("rsrqResultSCell-r10", meas_result_scell_r10.rsrq_result_scell_r10); + j.end_obj(); + } + if (meas_result_best_neigh_cell_r10_present) { + j.write_fieldname("measResultBestNeighCell-r10"); + j.start_obj(); + j.write_int("physCellId-r10", meas_result_best_neigh_cell_r10.pci_r10); + j.write_int("rsrpResultNCell-r10", meas_result_best_neigh_cell_r10.rsrp_result_ncell_r10); + j.write_int("rsrqResultNCell-r10", meas_result_best_neigh_cell_r10.rsrq_result_ncell_r10); + j.end_obj(); + } + if (meas_result_scell_v1250_present) { + j.write_int("measResultSCell-v1250", meas_result_scell_v1250); + } + if (meas_result_best_neigh_cell_v1250_present) { + j.write_int("measResultBestNeighCell-v1250", meas_result_best_neigh_cell_v1250); + } + if (meas_result_scell_v1310_present) { + j.write_fieldname("measResultSCell-v1310"); + j.start_obj(); + j.write_int("rs-sinr-Result-r13", meas_result_scell_v1310->rs_sinr_result_r13); + j.end_obj(); + } + if (meas_result_best_neigh_cell_v1310_present) { + j.write_fieldname("measResultBestNeighCell-v1310"); + j.start_obj(); + j.write_int("rs-sinr-Result-r13", meas_result_best_neigh_cell_v1310->rs_sinr_result_r13); + j.end_obj(); + } + j.end_obj(); +} + +// MeasResultServFreq-r13 ::= SEQUENCE +meas_result_serv_freq_r13_s::meas_result_serv_freq_r13_s() +{ + ext = false; + meas_result_scell_r13_present = false; + meas_result_best_neigh_cell_r13_present = false; + meas_result_best_neigh_cell_v1360_present = false; +} +SRSASN_CODE meas_result_serv_freq_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, serv_freq_id_r13, (uint8_t)0, (uint8_t)31)); + if (meas_result_scell_r13_present) { + HANDLE_CODE(bref.pack(meas_result_scell_r13.rs_sinr_result_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r13.rsrp_result_scell_r13, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r13.rsrq_result_scell_r13, (int8_t)-30, (int8_t)46)); + if (meas_result_scell_r13.rs_sinr_result_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r13.rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + } + if (meas_result_best_neigh_cell_r13_present) { + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_r13.rs_sinr_result_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_best_neigh_cell_r13.pci_r13, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_best_neigh_cell_r13.rsrp_result_ncell_r13, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_best_neigh_cell_r13.rsrq_result_ncell_r13, (int8_t)-30, (int8_t)46)); + if (meas_result_best_neigh_cell_r13.rs_sinr_result_r13_present) { + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_best_neigh_cell_r13.rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(meas_result_best_neigh_cell_v1360_present != (meas_result_best_neigh_cell_v1360.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= meas_result_best_neigh_cell_v1360_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_v1360_present, 1)); + if (meas_result_best_neigh_cell_v1360_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_best_neigh_cell_v1360->rsrp_result_ncell_v1360, (int8_t)-17, + (int8_t)-1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_serv_freq_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(serv_freq_id_r13, bref, (uint8_t)0, (uint8_t)31)); + if (meas_result_scell_r13_present) { + HANDLE_CODE(bref.unpack(meas_result_scell_r13.rs_sinr_result_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r13.rsrp_result_scell_r13, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r13.rsrq_result_scell_r13, bref, (int8_t)-30, (int8_t)46)); + if (meas_result_scell_r13.rs_sinr_result_r13_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r13.rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + } + if (meas_result_best_neigh_cell_r13_present) { + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_r13.rs_sinr_result_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(meas_result_best_neigh_cell_r13.pci_r13, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + unpack_unalign_integer(meas_result_best_neigh_cell_r13.rsrp_result_ncell_r13, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE( + unpack_unalign_integer(meas_result_best_neigh_cell_r13.rsrq_result_ncell_r13, bref, (int8_t)-30, (int8_t)46)); + if (meas_result_best_neigh_cell_r13.rs_sinr_result_r13_present) { + HANDLE_CODE( + unpack_unalign_integer(meas_result_best_neigh_cell_r13.rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_v1360_present, 1)); + if (meas_result_best_neigh_cell_v1360_present) { + meas_result_best_neigh_cell_v1360 = make_copy_ptr(meas_result_best_neigh_cell_v1360_s_()); + HANDLE_CODE(unpack_unalign_integer(meas_result_best_neigh_cell_v1360->rsrp_result_ncell_v1360, bref, + (int8_t)-17, (int8_t)-1)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_result_serv_freq_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servFreqId-r13", serv_freq_id_r13); + if (meas_result_scell_r13_present) { + j.write_fieldname("measResultSCell-r13"); + j.start_obj(); + j.write_int("rsrpResultSCell-r13", meas_result_scell_r13.rsrp_result_scell_r13); + j.write_int("rsrqResultSCell-r13", meas_result_scell_r13.rsrq_result_scell_r13); + if (meas_result_scell_r13.rs_sinr_result_r13_present) { + j.write_int("rs-sinr-Result-r13", meas_result_scell_r13.rs_sinr_result_r13); + } + j.end_obj(); + } + if (meas_result_best_neigh_cell_r13_present) { + j.write_fieldname("measResultBestNeighCell-r13"); + j.start_obj(); + j.write_int("physCellId-r13", meas_result_best_neigh_cell_r13.pci_r13); + j.write_int("rsrpResultNCell-r13", meas_result_best_neigh_cell_r13.rsrp_result_ncell_r13); + j.write_int("rsrqResultNCell-r13", meas_result_best_neigh_cell_r13.rsrq_result_ncell_r13); + if (meas_result_best_neigh_cell_r13.rs_sinr_result_r13_present) { + j.write_int("rs-sinr-Result-r13", meas_result_best_neigh_cell_r13.rs_sinr_result_r13); + } + j.end_obj(); + } + if (meas_result_best_neigh_cell_v1360_present) { + j.write_fieldname("measResultBestNeighCell-v1360"); + j.start_obj(); + j.write_int("rsrpResultNCell-v1360", meas_result_best_neigh_cell_v1360->rsrp_result_ncell_v1360); + j.end_obj(); + } + j.end_obj(); +} + +meas_result_serv_freq_r13_s::meas_result_scell_r13_s_::meas_result_scell_r13_s_() +{ + rs_sinr_result_r13_present = false; +} + +meas_result_serv_freq_r13_s::meas_result_best_neigh_cell_r13_s_::meas_result_best_neigh_cell_r13_s_() +{ + rs_sinr_result_r13_present = false; +} + +// MeasResultServFreqNR-r15 ::= SEQUENCE +meas_result_serv_freq_nr_r15_s::meas_result_serv_freq_nr_r15_s() +{ + ext = false; + meas_result_scell_r15_present = false; + meas_result_best_neigh_cell_r15_present = false; +} +SRSASN_CODE meas_result_serv_freq_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_r15_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r15, (uint32_t)0, (uint32_t)3279165)); + if (meas_result_scell_r15_present) { + HANDLE_CODE(meas_result_scell_r15.pack(bref)); + } + if (meas_result_best_neigh_cell_r15_present) { + HANDLE_CODE(meas_result_best_neigh_cell_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_serv_freq_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_r15_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r15, bref, (uint32_t)0, (uint32_t)3279165)); + if (meas_result_scell_r15_present) { + HANDLE_CODE(meas_result_scell_r15.unpack(bref)); + } + if (meas_result_best_neigh_cell_r15_present) { + HANDLE_CODE(meas_result_best_neigh_cell_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result_serv_freq_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r15", carrier_freq_r15); + if (meas_result_scell_r15_present) { + j.write_fieldname("measResultSCell-r15"); + meas_result_scell_r15.to_json(j); + } + if (meas_result_best_neigh_cell_r15_present) { + j.write_fieldname("measResultBestNeighCell-r15"); + meas_result_best_neigh_cell_r15.to_json(j); + } + j.end_obj(); +} + +// MeasResultWLAN-r13 ::= SEQUENCE +meas_result_wlan_r13_s::meas_result_wlan_r13_s() +{ + ext = false; + carrier_info_wlan_r13_present = false; + band_wlan_r13_present = false; + available_admission_capacity_wlan_r13_present = false; + backhaul_dl_bw_wlan_r13_present = false; + backhaul_ul_bw_wlan_r13_present = false; + ch_utilization_wlan_r13_present = false; + station_count_wlan_r13_present = false; + connected_wlan_r13_present = false; +} +SRSASN_CODE meas_result_wlan_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_info_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(band_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(available_admission_capacity_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(backhaul_dl_bw_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(backhaul_ul_bw_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(ch_utilization_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(station_count_wlan_r13_present, 1)); + HANDLE_CODE(bref.pack(connected_wlan_r13_present, 1)); + + HANDLE_CODE(wlan_ids_r13.pack(bref)); + if (carrier_info_wlan_r13_present) { + HANDLE_CODE(carrier_info_wlan_r13.pack(bref)); + } + if (band_wlan_r13_present) { + HANDLE_CODE(pack_enum(bref, band_wlan_r13)); + } + HANDLE_CODE(pack_unalign_integer(bref, rssi_wlan_r13, (uint8_t)0, (uint8_t)141)); + if (available_admission_capacity_wlan_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, available_admission_capacity_wlan_r13, (uint16_t)0, (uint16_t)31250)); + } + if (backhaul_dl_bw_wlan_r13_present) { + HANDLE_CODE(pack_enum(bref, backhaul_dl_bw_wlan_r13)); + } + if (backhaul_ul_bw_wlan_r13_present) { + HANDLE_CODE(pack_enum(bref, backhaul_ul_bw_wlan_r13)); + } + if (ch_utilization_wlan_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, ch_utilization_wlan_r13, (uint8_t)0, (uint8_t)255)); + } + if (station_count_wlan_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, station_count_wlan_r13, (uint16_t)0, (uint16_t)65535)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_wlan_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(carrier_info_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(band_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(available_admission_capacity_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(backhaul_dl_bw_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(backhaul_ul_bw_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(ch_utilization_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(station_count_wlan_r13_present, 1)); + HANDLE_CODE(bref.unpack(connected_wlan_r13_present, 1)); + + HANDLE_CODE(wlan_ids_r13.unpack(bref)); + if (carrier_info_wlan_r13_present) { + HANDLE_CODE(carrier_info_wlan_r13.unpack(bref)); + } + if (band_wlan_r13_present) { + HANDLE_CODE(unpack_enum(band_wlan_r13, bref)); + } + HANDLE_CODE(unpack_unalign_integer(rssi_wlan_r13, bref, (uint8_t)0, (uint8_t)141)); + if (available_admission_capacity_wlan_r13_present) { + HANDLE_CODE(unpack_unalign_integer(available_admission_capacity_wlan_r13, bref, (uint16_t)0, (uint16_t)31250)); + } + if (backhaul_dl_bw_wlan_r13_present) { + HANDLE_CODE(unpack_enum(backhaul_dl_bw_wlan_r13, bref)); + } + if (backhaul_ul_bw_wlan_r13_present) { + HANDLE_CODE(unpack_enum(backhaul_ul_bw_wlan_r13, bref)); + } + if (ch_utilization_wlan_r13_present) { + HANDLE_CODE(unpack_unalign_integer(ch_utilization_wlan_r13, bref, (uint8_t)0, (uint8_t)255)); + } + if (station_count_wlan_r13_present) { + HANDLE_CODE(unpack_unalign_integer(station_count_wlan_r13, bref, (uint16_t)0, (uint16_t)65535)); + } + + return SRSASN_SUCCESS; +} +void meas_result_wlan_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("wlan-Identifiers-r13"); + wlan_ids_r13.to_json(j); + if (carrier_info_wlan_r13_present) { + j.write_fieldname("carrierInfoWLAN-r13"); + carrier_info_wlan_r13.to_json(j); + } + if (band_wlan_r13_present) { + j.write_str("bandWLAN-r13", band_wlan_r13.to_string()); + } + j.write_int("rssiWLAN-r13", rssi_wlan_r13); + if (available_admission_capacity_wlan_r13_present) { + j.write_int("availableAdmissionCapacityWLAN-r13", available_admission_capacity_wlan_r13); + } + if (backhaul_dl_bw_wlan_r13_present) { + j.write_str("backhaulDL-BandwidthWLAN-r13", backhaul_dl_bw_wlan_r13.to_string()); + } + if (backhaul_ul_bw_wlan_r13_present) { + j.write_str("backhaulUL-BandwidthWLAN-r13", backhaul_ul_bw_wlan_r13.to_string()); + } + if (ch_utilization_wlan_r13_present) { + j.write_int("channelUtilizationWLAN-r13", ch_utilization_wlan_r13); + } + if (station_count_wlan_r13_present) { + j.write_int("stationCountWLAN-r13", station_count_wlan_r13); + } + if (connected_wlan_r13_present) { + j.write_str("connectedWLAN-r13", "true"); + } + j.end_obj(); +} + +// OverheatingAssistance-r14 ::= SEQUENCE +overheat_assist_r14_s::overheat_assist_r14_s() +{ + reduced_ue_category_present = false; + reduced_max_ccs_present = false; +} +SRSASN_CODE overheat_assist_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_ue_category_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_ccs_present, 1)); + + if (reduced_ue_category_present) { + HANDLE_CODE(pack_unalign_integer(bref, reduced_ue_category.reduced_ue_category_dl, (uint8_t)0, (uint8_t)19)); + HANDLE_CODE(pack_unalign_integer(bref, reduced_ue_category.reduced_ue_category_ul, (uint8_t)0, (uint8_t)21)); + } + if (reduced_max_ccs_present) { + HANDLE_CODE(pack_unalign_integer(bref, reduced_max_ccs.reduced_ccs_dl, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, reduced_max_ccs.reduced_ccs_ul, (uint8_t)0, (uint8_t)31)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE overheat_assist_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_ue_category_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_ccs_present, 1)); + + if (reduced_ue_category_present) { + HANDLE_CODE(unpack_unalign_integer(reduced_ue_category.reduced_ue_category_dl, bref, (uint8_t)0, (uint8_t)19)); + HANDLE_CODE(unpack_unalign_integer(reduced_ue_category.reduced_ue_category_ul, bref, (uint8_t)0, (uint8_t)21)); + } + if (reduced_max_ccs_present) { + HANDLE_CODE(unpack_unalign_integer(reduced_max_ccs.reduced_ccs_dl, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(unpack_unalign_integer(reduced_max_ccs.reduced_ccs_ul, bref, (uint8_t)0, (uint8_t)31)); + } + + return SRSASN_SUCCESS; +} +void overheat_assist_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_ue_category_present) { + j.write_fieldname("reducedUE-Category"); + j.start_obj(); + j.write_int("reducedUE-CategoryDL", reduced_ue_category.reduced_ue_category_dl); + j.write_int("reducedUE-CategoryUL", reduced_ue_category.reduced_ue_category_ul); + j.end_obj(); + } + if (reduced_max_ccs_present) { + j.write_fieldname("reducedMaxCCs"); + j.start_obj(); + j.write_int("reducedCCsDL", reduced_max_ccs.reduced_ccs_dl); + j.write_int("reducedCCsUL", reduced_max_ccs.reduced_ccs_ul); + j.end_obj(); + } + j.end_obj(); +} + +// RLF-Report-v9e0 ::= SEQUENCE +SRSASN_CODE rlf_report_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_eutra_v9e0, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_eutra_v9e0, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void rlf_report_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measResultListEUTRA-v9e0"); + for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v9e0.size(); ++i1) { + meas_result_list_eutra_v9e0[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-v1130-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v1130_ies_s::rrc_conn_recfg_complete_v1130_ies_s() +{ + conn_est_fail_info_available_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(conn_est_fail_info_available_r11_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_conn_recfg_complete_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(conn_est_fail_info_available_r11_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_conn_recfg_complete_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (conn_est_fail_info_available_r11_present) { + j.write_str("connEstFailInfoAvailable-r11", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-v1020-IEs ::= SEQUENCE +rrc_conn_reest_complete_v1020_ies_s::rrc_conn_reest_complete_v1020_ies_s() +{ + log_meas_available_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_r10_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_conn_reest_complete_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_r10_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_conn_reest_complete_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_r10_present) { + j.write_str("logMeasAvailable-r10", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1130-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1130_ies_s::rrc_conn_setup_complete_v1130_ies_s() +{ + conn_est_fail_info_available_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(conn_est_fail_info_available_r11_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_conn_setup_complete_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(conn_est_fail_info_available_r11_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_conn_setup_complete_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (conn_est_fail_info_available_r11_present) { + j.write_str("connEstFailInfoAvailable-r11", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SL-DiscSysInfoReport-r13 ::= SEQUENCE +sl_disc_sys_info_report_r13_s::sl_disc_sys_info_report_r13_s() +{ + ext = false; + plmn_id_list_r13_present = false; + cell_id_minus13_present = false; + carrier_freq_info_minus13_present = false; + disc_rx_res_r13_present = false; + disc_tx_pool_common_r13_present = false; + disc_tx_pwr_info_r13_present = false; + disc_sync_cfg_r13_present = false; + disc_cell_sel_info_r13_present = false; + cell_resel_info_r13_present = false; + tdd_cfg_r13_present = false; + freq_info_r13_present = false; + p_max_r13_present = false; + ref_sig_pwr_r13_present = false; + freq_info_v1370_present = false; +} +SRSASN_CODE sl_disc_sys_info_report_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(plmn_id_list_r13_present, 1)); + HANDLE_CODE(bref.pack(cell_id_minus13_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_info_minus13_present, 1)); + HANDLE_CODE(bref.pack(disc_rx_res_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_pool_common_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_pwr_info_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_sync_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_cell_sel_info_r13_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_info_r13_present, 1)); + HANDLE_CODE(bref.pack(tdd_cfg_r13_present, 1)); + HANDLE_CODE(bref.pack(freq_info_r13_present, 1)); + HANDLE_CODE(bref.pack(p_max_r13_present, 1)); + HANDLE_CODE(bref.pack(ref_sig_pwr_r13_present, 1)); + + if (plmn_id_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r13, 1, 6)); + } + if (cell_id_minus13_present) { + HANDLE_CODE(cell_id_minus13.pack(bref)); + } + if (carrier_freq_info_minus13_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_info_minus13, (uint32_t)0, (uint32_t)262143)); + } + if (disc_rx_res_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_rx_res_r13, 1, 16)); + } + if (disc_tx_pool_common_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_tx_pool_common_r13, 1, 4)); + } + if (disc_tx_pwr_info_r13_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, &(disc_tx_pwr_info_r13)[0], disc_tx_pwr_info_r13.size())); + } + if (disc_sync_cfg_r13_present) { + HANDLE_CODE(disc_sync_cfg_r13.pack(bref)); + } + if (disc_cell_sel_info_r13_present) { + HANDLE_CODE(bref.pack(disc_cell_sel_info_r13.q_rx_lev_min_offset_r13_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, disc_cell_sel_info_r13.q_rx_lev_min_r13, (int8_t)-70, (int8_t)-22)); + if (disc_cell_sel_info_r13.q_rx_lev_min_offset_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_cell_sel_info_r13.q_rx_lev_min_offset_r13, (uint8_t)1, (uint8_t)8)); + } + } + if (cell_resel_info_r13_present) { + HANDLE_CODE(pack_enum(bref, cell_resel_info_r13.q_hyst_r13)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_info_r13.q_rx_lev_min_r13, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(pack_unalign_integer(bref, cell_resel_info_r13.t_resel_eutra_r13, (uint8_t)0, (uint8_t)7)); + } + if (tdd_cfg_r13_present) { + HANDLE_CODE(tdd_cfg_r13.pack(bref)); + } + if (freq_info_r13_present) { + HANDLE_CODE(bref.pack(freq_info_r13.ul_carrier_freq_r13_present, 1)); + HANDLE_CODE(bref.pack(freq_info_r13.ul_bw_r13_present, 1)); + HANDLE_CODE(bref.pack(freq_info_r13.add_spec_emission_r13_present, 1)); + if (freq_info_r13.ul_carrier_freq_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_info_r13.ul_carrier_freq_r13, (uint16_t)0, (uint16_t)65535)); + } + if (freq_info_r13.ul_bw_r13_present) { + HANDLE_CODE(pack_enum(bref, freq_info_r13.ul_bw_r13)); + } + if (freq_info_r13.add_spec_emission_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_info_r13.add_spec_emission_r13, (uint8_t)1, (uint8_t)32)); + } + } + if (p_max_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max_r13, (int8_t)-30, (int8_t)33)); + } + if (ref_sig_pwr_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, ref_sig_pwr_r13, (int8_t)-60, (int8_t)50)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(freq_info_v1370_present != (freq_info_v1370.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= freq_info_v1370_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(freq_info_v1370_present, 1)); + if (freq_info_v1370_present) { + HANDLE_CODE(pack_unalign_integer(bref, freq_info_v1370->add_spec_emission_v1370, (uint16_t)33, (uint16_t)288)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_sys_info_report_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(plmn_id_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(cell_id_minus13_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_info_minus13_present, 1)); + HANDLE_CODE(bref.unpack(disc_rx_res_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_pool_common_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_pwr_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_sync_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_cell_sel_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(tdd_cfg_r13_present, 1)); + HANDLE_CODE(bref.unpack(freq_info_r13_present, 1)); + HANDLE_CODE(bref.unpack(p_max_r13_present, 1)); + HANDLE_CODE(bref.unpack(ref_sig_pwr_r13_present, 1)); + + if (plmn_id_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r13, bref, 1, 6)); + } + if (cell_id_minus13_present) { + HANDLE_CODE(cell_id_minus13.unpack(bref)); + } + if (carrier_freq_info_minus13_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_info_minus13, bref, (uint32_t)0, (uint32_t)262143)); + } + if (disc_rx_res_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_rx_res_r13, bref, 1, 16)); + } + if (disc_tx_pool_common_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_tx_pool_common_r13, bref, 1, 4)); + } + if (disc_tx_pwr_info_r13_present) { + HANDLE_CODE(unpack_fixed_seq_of(&(disc_tx_pwr_info_r13)[0], bref, disc_tx_pwr_info_r13.size())); + } + if (disc_sync_cfg_r13_present) { + HANDLE_CODE(disc_sync_cfg_r13.unpack(bref)); + } + if (disc_cell_sel_info_r13_present) { + HANDLE_CODE(bref.unpack(disc_cell_sel_info_r13.q_rx_lev_min_offset_r13_present, 1)); + HANDLE_CODE(unpack_unalign_integer(disc_cell_sel_info_r13.q_rx_lev_min_r13, bref, (int8_t)-70, (int8_t)-22)); + if (disc_cell_sel_info_r13.q_rx_lev_min_offset_r13_present) { + HANDLE_CODE(unpack_unalign_integer(disc_cell_sel_info_r13.q_rx_lev_min_offset_r13, bref, (uint8_t)1, (uint8_t)8)); + } + } + if (cell_resel_info_r13_present) { + HANDLE_CODE(unpack_enum(cell_resel_info_r13.q_hyst_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_info_r13.q_rx_lev_min_r13, bref, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(unpack_unalign_integer(cell_resel_info_r13.t_resel_eutra_r13, bref, (uint8_t)0, (uint8_t)7)); + } + if (tdd_cfg_r13_present) { + HANDLE_CODE(tdd_cfg_r13.unpack(bref)); + } + if (freq_info_r13_present) { + HANDLE_CODE(bref.unpack(freq_info_r13.ul_carrier_freq_r13_present, 1)); + HANDLE_CODE(bref.unpack(freq_info_r13.ul_bw_r13_present, 1)); + HANDLE_CODE(bref.unpack(freq_info_r13.add_spec_emission_r13_present, 1)); + if (freq_info_r13.ul_carrier_freq_r13_present) { + HANDLE_CODE(unpack_unalign_integer(freq_info_r13.ul_carrier_freq_r13, bref, (uint16_t)0, (uint16_t)65535)); + } + if (freq_info_r13.ul_bw_r13_present) { + HANDLE_CODE(unpack_enum(freq_info_r13.ul_bw_r13, bref)); + } + if (freq_info_r13.add_spec_emission_r13_present) { + HANDLE_CODE(unpack_unalign_integer(freq_info_r13.add_spec_emission_r13, bref, (uint8_t)1, (uint8_t)32)); + } + } + if (p_max_r13_present) { + HANDLE_CODE(unpack_unalign_integer(p_max_r13, bref, (int8_t)-30, (int8_t)33)); + } + if (ref_sig_pwr_r13_present) { + HANDLE_CODE(unpack_unalign_integer(ref_sig_pwr_r13, bref, (int8_t)-60, (int8_t)50)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(freq_info_v1370_present, 1)); + if (freq_info_v1370_present) { + freq_info_v1370 = make_copy_ptr(freq_info_v1370_s_()); + HANDLE_CODE( + unpack_unalign_integer(freq_info_v1370->add_spec_emission_v1370, bref, (uint16_t)33, (uint16_t)288)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_disc_sys_info_report_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_list_r13_present) { + j.start_array("plmn-IdentityList-r13"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r13.size(); ++i1) { + plmn_id_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (cell_id_minus13_present) { + j.write_str("cellIdentity-13", cell_id_minus13.to_string()); + } + if (carrier_freq_info_minus13_present) { + j.write_int("carrierFreqInfo-13", carrier_freq_info_minus13); + } + if (disc_rx_res_r13_present) { + j.start_array("discRxResources-r13"); + for (uint32_t i1 = 0; i1 < disc_rx_res_r13.size(); ++i1) { + disc_rx_res_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_tx_pool_common_r13_present) { + j.start_array("discTxPoolCommon-r13"); + for (uint32_t i1 = 0; i1 < disc_tx_pool_common_r13.size(); ++i1) { + disc_tx_pool_common_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_tx_pwr_info_r13_present) { + j.start_array("discTxPowerInfo-r13"); + for (uint32_t i1 = 0; i1 < disc_tx_pwr_info_r13.size(); ++i1) { + disc_tx_pwr_info_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_sync_cfg_r13_present) { + j.write_fieldname("discSyncConfig-r13"); + disc_sync_cfg_r13.to_json(j); + } + if (disc_cell_sel_info_r13_present) { + j.write_fieldname("discCellSelectionInfo-r13"); + j.start_obj(); + j.write_int("q-RxLevMin-r13", disc_cell_sel_info_r13.q_rx_lev_min_r13); + if (disc_cell_sel_info_r13.q_rx_lev_min_offset_r13_present) { + j.write_int("q-RxLevMinOffset-r13", disc_cell_sel_info_r13.q_rx_lev_min_offset_r13); + } + j.end_obj(); + } + if (cell_resel_info_r13_present) { + j.write_fieldname("cellReselectionInfo-r13"); + j.start_obj(); + j.write_str("q-Hyst-r13", cell_resel_info_r13.q_hyst_r13.to_string()); + j.write_int("q-RxLevMin-r13", cell_resel_info_r13.q_rx_lev_min_r13); + j.write_int("t-ReselectionEUTRA-r13", cell_resel_info_r13.t_resel_eutra_r13); + j.end_obj(); + } + if (tdd_cfg_r13_present) { + j.write_fieldname("tdd-Config-r13"); + tdd_cfg_r13.to_json(j); + } + if (freq_info_r13_present) { + j.write_fieldname("freqInfo-r13"); + j.start_obj(); + if (freq_info_r13.ul_carrier_freq_r13_present) { + j.write_int("ul-CarrierFreq-r13", freq_info_r13.ul_carrier_freq_r13); + } + if (freq_info_r13.ul_bw_r13_present) { + j.write_str("ul-Bandwidth-r13", freq_info_r13.ul_bw_r13.to_string()); + } + if (freq_info_r13.add_spec_emission_r13_present) { + j.write_int("additionalSpectrumEmission-r13", freq_info_r13.add_spec_emission_r13); + } + j.end_obj(); + } + if (p_max_r13_present) { + j.write_int("p-Max-r13", p_max_r13); + } + if (ref_sig_pwr_r13_present) { + j.write_int("referenceSignalPower-r13", ref_sig_pwr_r13); + } + if (freq_info_v1370_present) { + j.write_fieldname("freqInfo-v1370"); + j.start_obj(); + j.write_int("additionalSpectrumEmission-v1370", freq_info_v1370->add_spec_emission_v1370); + j.end_obj(); + } + j.end_obj(); +} + +sl_disc_sys_info_report_r13_s::disc_cell_sel_info_r13_s_::disc_cell_sel_info_r13_s_() +{ + q_rx_lev_min_offset_r13_present = false; +} + +sl_disc_sys_info_report_r13_s::freq_info_r13_s_::freq_info_r13_s_() +{ + ul_carrier_freq_r13_present = false; + ul_bw_r13_present = false; + add_spec_emission_r13_present = false; +} + +// SL-DiscTxResourceReq-r13 ::= SEQUENCE +sl_disc_tx_res_req_r13_s::sl_disc_tx_res_req_r13_s() +{ + carrier_freq_disc_tx_r13_present = false; +} +SRSASN_CODE sl_disc_tx_res_req_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_disc_tx_r13_present, 1)); + + if (carrier_freq_disc_tx_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_disc_tx_r13, (uint8_t)1, (uint8_t)8)); + } + HANDLE_CODE(pack_unalign_integer(bref, disc_tx_res_req_r13, (uint8_t)1, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_disc_tx_res_req_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_disc_tx_r13_present, 1)); + + if (carrier_freq_disc_tx_r13_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_disc_tx_r13, bref, (uint8_t)1, (uint8_t)8)); + } + HANDLE_CODE(unpack_unalign_integer(disc_tx_res_req_r13, bref, (uint8_t)1, (uint8_t)63)); + + return SRSASN_SUCCESS; +} +void sl_disc_tx_res_req_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_disc_tx_r13_present) { + j.write_int("carrierFreqDiscTx-r13", carrier_freq_disc_tx_r13); + } + j.write_int("discTxResourceReq-r13", disc_tx_res_req_r13); + j.end_obj(); +} + +// SL-GapFreqInfo-r13 ::= SEQUENCE +sl_gap_freq_info_r13_s::sl_gap_freq_info_r13_s() +{ + carrier_freq_r13_present = false; +} +SRSASN_CODE sl_gap_freq_info_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_r13_present, 1)); + + if (carrier_freq_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r13, (uint32_t)0, (uint32_t)262143)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, gap_pattern_list_r13, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_gap_freq_info_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_r13_present, 1)); + + if (carrier_freq_r13_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r13, bref, (uint32_t)0, (uint32_t)262143)); + } + HANDLE_CODE(unpack_dyn_seq_of(gap_pattern_list_r13, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void sl_gap_freq_info_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_r13_present) { + j.write_int("carrierFreq-r13", carrier_freq_r13); + } + j.start_array("gapPatternList-r13"); + for (uint32_t i1 = 0; i1 < gap_pattern_list_r13.size(); ++i1) { + gap_pattern_list_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// SensingResult-r15 ::= SEQUENCE +SRSASN_CODE sensing_result_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, res_idx_r15, (uint16_t)1, (uint16_t)2000)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sensing_result_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(res_idx_r15, bref, (uint16_t)1, (uint16_t)2000)); + + return SRSASN_SUCCESS; +} +void sensing_result_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("resourceIndex-r15", res_idx_r15); + j.end_obj(); +} + +// SidelinkUEInformation-v1530-IEs ::= SEQUENCE +sidelink_ue_info_v1530_ies_s::sidelink_ue_info_v1530_ies_s() +{ + reliability_info_list_sl_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sidelink_ue_info_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reliability_info_list_sl_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (reliability_info_list_sl_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, reliability_info_list_sl_r15, 1, 8, UnalignedIntegerPacker(1, 8))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reliability_info_list_sl_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (reliability_info_list_sl_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(reliability_info_list_sl_r15, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + } + + return SRSASN_SUCCESS; +} +void sidelink_ue_info_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reliability_info_list_sl_r15_present) { + j.start_array("reliabilityInfoListSL-r15"); + for (uint32_t i1 = 0; i1 < reliability_info_list_sl_r15.size(); ++i1) { + j.write_int(reliability_info_list_sl_r15[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// TrafficPatternInfo-r14 ::= SEQUENCE +traffic_pattern_info_r14_s::traffic_pattern_info_r14_s() +{ + prio_info_sl_r14_present = false; + lc_ch_id_ul_r14_present = false; +} +SRSASN_CODE traffic_pattern_info_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(prio_info_sl_r14_present, 1)); + HANDLE_CODE(bref.pack(lc_ch_id_ul_r14_present, 1)); + + HANDLE_CODE(pack_enum(bref, traffic_periodicity_r14)); + HANDLE_CODE(pack_unalign_integer(bref, timing_offset_r14, (uint16_t)0, (uint16_t)10239)); + if (prio_info_sl_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, prio_info_sl_r14, (uint8_t)1, (uint8_t)8)); + } + if (lc_ch_id_ul_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, lc_ch_id_ul_r14, (uint8_t)3, (uint8_t)10)); + } + HANDLE_CODE(msg_size_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE traffic_pattern_info_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(prio_info_sl_r14_present, 1)); + HANDLE_CODE(bref.unpack(lc_ch_id_ul_r14_present, 1)); + + HANDLE_CODE(unpack_enum(traffic_periodicity_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(timing_offset_r14, bref, (uint16_t)0, (uint16_t)10239)); + if (prio_info_sl_r14_present) { + HANDLE_CODE(unpack_unalign_integer(prio_info_sl_r14, bref, (uint8_t)1, (uint8_t)8)); + } + if (lc_ch_id_ul_r14_present) { + HANDLE_CODE(unpack_unalign_integer(lc_ch_id_ul_r14, bref, (uint8_t)3, (uint8_t)10)); + } + HANDLE_CODE(msg_size_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void traffic_pattern_info_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("trafficPeriodicity-r14", traffic_periodicity_r14.to_string()); + j.write_int("timingOffset-r14", timing_offset_r14); + if (prio_info_sl_r14_present) { + j.write_int("priorityInfoSL-r14", prio_info_sl_r14); + } + if (lc_ch_id_ul_r14_present) { + j.write_int("logicalChannelIdentityUL-r14", lc_ch_id_ul_r14); + } + j.write_str("messageSize-r14", msg_size_r14.to_string()); + j.end_obj(); +} + +// UE-RadioPagingInfo-r12 ::= SEQUENCE +ue_radio_paging_info_r12_s::ue_radio_paging_info_r12_s() +{ + ext = false; + ue_category_v1250_present = false; + ue_category_dl_v1310_present = false; + ce_mode_a_r13_present = false; + ce_mode_b_r13_present = false; + wake_up_signal_r15_present = false; + wake_up_signal_tdd_r15_present = false; + wake_up_signal_min_gap_e_drx_r15_present = false; + wake_up_signal_min_gap_e_drx_tdd_r15_present = false; +} +SRSASN_CODE ue_radio_paging_info_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ue_category_v1250_present, 1)); + + if (ue_category_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_v1250, (uint8_t)0, (uint8_t)0)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= ue_category_dl_v1310_present; + group_flags[0] |= ce_mode_a_r13_present; + group_flags[0] |= ce_mode_b_r13_present; + group_flags[1] |= wake_up_signal_r15_present; + group_flags[1] |= wake_up_signal_tdd_r15_present; + group_flags[1] |= wake_up_signal_min_gap_e_drx_r15_present; + group_flags[1] |= wake_up_signal_min_gap_e_drx_tdd_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(ue_category_dl_v1310_present, 1)); + HANDLE_CODE(bref.pack(ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(ce_mode_b_r13_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(wake_up_signal_r15_present, 1)); + HANDLE_CODE(bref.pack(wake_up_signal_tdd_r15_present, 1)); + HANDLE_CODE(bref.pack(wake_up_signal_min_gap_e_drx_r15_present, 1)); + HANDLE_CODE(bref.pack(wake_up_signal_min_gap_e_drx_tdd_r15_present, 1)); + if (wake_up_signal_min_gap_e_drx_r15_present) { + HANDLE_CODE(pack_enum(bref, wake_up_signal_min_gap_e_drx_r15)); + } + if (wake_up_signal_min_gap_e_drx_tdd_r15_present) { + HANDLE_CODE(pack_enum(bref, wake_up_signal_min_gap_e_drx_tdd_r15)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_paging_info_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ue_category_v1250_present, 1)); + + if (ue_category_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_v1250, bref, (uint8_t)0, (uint8_t)0)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(ue_category_dl_v1310_present, 1)); + HANDLE_CODE(bref.unpack(ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(ce_mode_b_r13_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(wake_up_signal_r15_present, 1)); + HANDLE_CODE(bref.unpack(wake_up_signal_tdd_r15_present, 1)); + HANDLE_CODE(bref.unpack(wake_up_signal_min_gap_e_drx_r15_present, 1)); + HANDLE_CODE(bref.unpack(wake_up_signal_min_gap_e_drx_tdd_r15_present, 1)); + if (wake_up_signal_min_gap_e_drx_r15_present) { + HANDLE_CODE(unpack_enum(wake_up_signal_min_gap_e_drx_r15, bref)); + } + if (wake_up_signal_min_gap_e_drx_tdd_r15_present) { + HANDLE_CODE(unpack_enum(wake_up_signal_min_gap_e_drx_tdd_r15, bref)); + } + } + } + return SRSASN_SUCCESS; +} +void ue_radio_paging_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_v1250_present) { + j.write_int("ue-Category-v1250", ue_category_v1250); + } + if (ue_category_dl_v1310_present) { + j.write_str("ue-CategoryDL-v1310", "m1"); + } + if (ce_mode_a_r13_present) { + j.write_str("ce-ModeA-r13", "true"); + } + if (ce_mode_b_r13_present) { + j.write_str("ce-ModeB-r13", "true"); + } + if (wake_up_signal_r15_present) { + j.write_str("wakeUpSignal-r15", "true"); + } + if (wake_up_signal_tdd_r15_present) { + j.write_str("wakeUpSignal-TDD-r15", "true"); + } + if (wake_up_signal_min_gap_e_drx_r15_present) { + j.write_str("wakeUpSignalMinGap-eDRX-r15", wake_up_signal_min_gap_e_drx_r15.to_string()); + } + if (wake_up_signal_min_gap_e_drx_tdd_r15_present) { + j.write_str("wakeUpSignalMinGap-eDRX-TDD-r15", wake_up_signal_min_gap_e_drx_tdd_r15.to_string()); + } + j.end_obj(); +} + +// UEAssistanceInformation-v1530-IEs ::= SEQUENCE +ueassist_info_v1530_ies_s::ueassist_info_v1530_ies_s() +{ + sps_assist_info_v1530_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ueassist_info_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sps_assist_info_v1530_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sps_assist_info_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sps_assist_info_v1530_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sps_assist_info_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void ueassist_info_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sps_assist_info_v1530_present) { + j.write_fieldname("sps-AssistanceInformation-v1530"); + j.start_obj(); + j.start_array("trafficPatternInfoListSL-v1530"); + for (uint32_t i1 = 0; i1 < sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530.size(); ++i1) { + sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UEInformationResponse-v1130-IEs ::= SEQUENCE +ue_info_resp_v1130_ies_s::ue_info_resp_v1130_ies_s() +{ + conn_est_fail_report_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(conn_est_fail_report_r11_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (conn_est_fail_report_r11_present) { + HANDLE_CODE(conn_est_fail_report_r11.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(conn_est_fail_report_r11_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (conn_est_fail_report_r11_present) { + HANDLE_CODE(conn_est_fail_report_r11.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (conn_est_fail_report_r11_present) { + j.write_fieldname("connEstFailReport-r11"); + conn_est_fail_report_r11.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UL-PDCP-DelayResult-r13 ::= SEQUENCE +ul_pdcp_delay_result_r13_s::ul_pdcp_delay_result_r13_s() +{ + ext = false; +} +SRSASN_CODE ul_pdcp_delay_result_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, qci_id_r13)); + HANDLE_CODE(pack_unalign_integer(bref, excess_delay_r13, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pdcp_delay_result_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(qci_id_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(excess_delay_r13, bref, (uint8_t)0, (uint8_t)31)); + + return SRSASN_SUCCESS; +} +void ul_pdcp_delay_result_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("qci-Id-r13", qci_id_r13.to_string()); + j.write_int("excessDelay-r13", excess_delay_r13); + j.end_obj(); +} + +// AffectedCarrierFreq-r11 ::= SEQUENCE +SRSASN_CODE affected_carrier_freq_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r11, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_enum(bref, interference_direction_r11)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE affected_carrier_freq_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r11, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_enum(interference_direction_r11, bref)); + + return SRSASN_SUCCESS; +} +void affected_carrier_freq_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r11", carrier_freq_r11); + j.write_str("interferenceDirection-r11", interference_direction_r11.to_string()); + j.end_obj(); +} + +// BW-Preference-r14 ::= SEQUENCE +bw_pref_r14_s::bw_pref_r14_s() +{ + dl_pref_r14_present = false; + ul_pref_r14_present = false; +} +SRSASN_CODE bw_pref_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dl_pref_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_pref_r14_present, 1)); + + if (dl_pref_r14_present) { + HANDLE_CODE(pack_enum(bref, dl_pref_r14)); + } + if (ul_pref_r14_present) { + HANDLE_CODE(pack_enum(bref, ul_pref_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bw_pref_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dl_pref_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_pref_r14_present, 1)); + + if (dl_pref_r14_present) { + HANDLE_CODE(unpack_enum(dl_pref_r14, bref)); + } + if (ul_pref_r14_present) { + HANDLE_CODE(unpack_enum(ul_pref_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void bw_pref_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_pref_r14_present) { + j.write_str("dl-Preference-r14", dl_pref_r14.to_string()); + } + if (ul_pref_r14_present) { + j.write_str("ul-Preference-r14", ul_pref_r14.to_string()); + } + j.end_obj(); +} + +// CounterCheckResponse-v1530-IEs ::= SEQUENCE +counter_check_resp_v1530_ies_s::counter_check_resp_v1530_ies_s() +{ + drb_count_info_list_ext_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE counter_check_resp_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drb_count_info_list_ext_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (drb_count_info_list_ext_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_info_list_ext_r15, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_resp_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drb_count_info_list_ext_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (drb_count_info_list_ext_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_count_info_list_ext_r15, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void counter_check_resp_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drb_count_info_list_ext_r15_present) { + j.start_array("drb-CountInfoListExt-r15"); + for (uint32_t i1 = 0; i1 < drb_count_info_list_ext_r15.size(); ++i1) { + drb_count_info_list_ext_r15[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CountingResponseInfo-r10 ::= SEQUENCE +count_resp_info_r10_s::count_resp_info_r10_s() +{ + ext = false; +} +SRSASN_CODE count_resp_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, count_resp_service_r10, (uint8_t)0, (uint8_t)15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE count_resp_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(count_resp_service_r10, bref, (uint8_t)0, (uint8_t)15)); + + return SRSASN_SUCCESS; +} +void count_resp_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("countingResponseService-r10", count_resp_service_r10); + j.end_obj(); +} + +// DelayBudgetReport-r14 ::= CHOICE +void delay_budget_report_r14_c::destroy_() {} +void delay_budget_report_r14_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +delay_budget_report_r14_c::delay_budget_report_r14_c(const delay_budget_report_r14_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::type1: + c.init(other.c.get()); + break; + case types::type2: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "delay_budget_report_r14_c"); + } +} +delay_budget_report_r14_c& delay_budget_report_r14_c::operator=(const delay_budget_report_r14_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::type1: + c.set(other.c.get()); + break; + case types::type2: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "delay_budget_report_r14_c"); + } + + return *this; +} +void delay_budget_report_r14_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::type1: + j.write_str("type1", c.get().to_string()); + break; + case types::type2: + j.write_str("type2", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "delay_budget_report_r14_c"); + } + j.end_obj(); +} +SRSASN_CODE delay_budget_report_r14_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::type1: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + case types::type2: + HANDLE_CODE(pack_enum(bref, c.get())); + break; + default: + log_invalid_choice_id(type_, "delay_budget_report_r14_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE delay_budget_report_r14_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::type1: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + case types::type2: + HANDLE_CODE(unpack_enum(c.get(), bref)); + break; + default: + log_invalid_choice_id(type_, "delay_budget_report_r14_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// InDeviceCoexIndication-v1310-IEs ::= SEQUENCE +in_dev_coex_ind_v1310_ies_s::in_dev_coex_ind_v1310_ies_s() +{ + affected_carrier_freq_list_v1310_present = false; + affected_carrier_freq_comb_list_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE in_dev_coex_ind_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(affected_carrier_freq_list_v1310_present, 1)); + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_list_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (affected_carrier_freq_list_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_list_v1310, 1, 32)); + } + if (affected_carrier_freq_comb_list_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, affected_carrier_freq_comb_list_r13, 1, 128, + SeqOfPacker >(2, 32, UnalignedIntegerPacker(1, 64)))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(affected_carrier_freq_list_v1310_present, 1)); + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (affected_carrier_freq_list_v1310_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_list_v1310, bref, 1, 32)); + } + if (affected_carrier_freq_comb_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of( + affected_carrier_freq_comb_list_r13, bref, 1, 128, + SeqOfPacker >(2, 32, UnalignedIntegerPacker(1, 64)))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void in_dev_coex_ind_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (affected_carrier_freq_list_v1310_present) { + j.start_array("affectedCarrierFreqList-v1310"); + for (uint32_t i1 = 0; i1 < affected_carrier_freq_list_v1310.size(); ++i1) { + affected_carrier_freq_list_v1310[i1].to_json(j); + } + j.end_array(); + } + if (affected_carrier_freq_comb_list_r13_present) { + j.start_array("affectedCarrierFreqCombList-r13"); + for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_list_r13.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < affected_carrier_freq_comb_list_r13[i1].size(); ++i2) { + j.write_int(affected_carrier_freq_comb_list_r13[i1][i2]); + } + j.end_array(); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MeasResultForECID-r9 ::= SEQUENCE +SRSASN_CODE meas_result_for_ecid_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ue_rx_tx_time_diff_result_r9, (uint16_t)0, (uint16_t)4095)); + HANDLE_CODE(current_sfn_r9.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_for_ecid_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ue_rx_tx_time_diff_result_r9, bref, (uint16_t)0, (uint16_t)4095)); + HANDLE_CODE(current_sfn_r9.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_result_for_ecid_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ue-RxTxTimeDiffResult-r9", ue_rx_tx_time_diff_result_r9); + j.write_str("currentSFN-r9", current_sfn_r9.to_string()); + j.end_obj(); +} + +// MeasResultForRSSI-r13 ::= SEQUENCE +meas_result_for_rssi_r13_s::meas_result_for_rssi_r13_s() +{ + ext = false; +} +SRSASN_CODE meas_result_for_rssi_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, rssi_result_r13, (uint8_t)0, (uint8_t)76)); + HANDLE_CODE(pack_unalign_integer(bref, ch_occupancy_r13, (uint8_t)0, (uint8_t)100)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_for_rssi_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(rssi_result_r13, bref, (uint8_t)0, (uint8_t)76)); + HANDLE_CODE(unpack_unalign_integer(ch_occupancy_r13, bref, (uint8_t)0, (uint8_t)100)); + + return SRSASN_SUCCESS; +} +void meas_result_for_rssi_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rssi-Result-r13", rssi_result_r13); + j.write_int("channelOccupancy-r13", ch_occupancy_r13); + j.end_obj(); +} + +// MeasResultSSTD-r13 ::= SEQUENCE +SRSASN_CODE meas_result_sstd_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, sfn_offset_result_r13, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(pack_unalign_integer(bref, frame_boundary_offset_result_r13, (int8_t)-5, (int8_t)4)); + HANDLE_CODE(pack_unalign_integer(bref, sf_boundary_offset_result_r13, (uint8_t)0, (uint8_t)127)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_sstd_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(sfn_offset_result_r13, bref, (uint16_t)0, (uint16_t)1023)); + HANDLE_CODE(unpack_unalign_integer(frame_boundary_offset_result_r13, bref, (int8_t)-5, (int8_t)4)); + HANDLE_CODE(unpack_unalign_integer(sf_boundary_offset_result_r13, bref, (uint8_t)0, (uint8_t)127)); + + return SRSASN_SUCCESS; +} +void meas_result_sstd_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sfn-OffsetResult-r13", sfn_offset_result_r13); + j.write_int("frameBoundaryOffsetResult-r13", frame_boundary_offset_result_r13); + j.write_int("subframeBoundaryOffsetResult-r13", sf_boundary_offset_result_r13); + j.end_obj(); +} + +// MeasResultSensing-r15 ::= SEQUENCE +SRSASN_CODE meas_result_sensing_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, sl_sf_ref_r15, (uint16_t)0, (uint16_t)10239)); + HANDLE_CODE(pack_dyn_seq_of(bref, sensing_result_r15, 0, 400)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_sensing_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(sl_sf_ref_r15, bref, (uint16_t)0, (uint16_t)10239)); + HANDLE_CODE(unpack_dyn_seq_of(sensing_result_r15, bref, 0, 400)); + + return SRSASN_SUCCESS; +} +void meas_result_sensing_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sl-SubframeRef-r15", sl_sf_ref_r15); + j.start_array("sensingResult-r15"); + for (uint32_t i1 = 0; i1 < sensing_result_r15.size(); ++i1) { + sensing_result_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-v1020-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v1020_ies_s::rrc_conn_recfg_complete_v1020_ies_s() +{ + rlf_info_available_r10_present = false; + log_meas_available_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rlf_info_available_r10_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_r10_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_conn_recfg_complete_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rlf_info_available_r10_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_r10_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_conn_recfg_complete_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rlf_info_available_r10_present) { + j.write_str("rlf-InfoAvailable-r10", "true"); + } + if (log_meas_available_r10_present) { + j.write_str("logMeasAvailable-r10", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-v8a0-IEs ::= SEQUENCE +rrc_conn_reest_complete_v8a0_ies_s::rrc_conn_reest_complete_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_complete_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_reest_complete_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v1020-IEs ::= SEQUENCE +rrc_conn_setup_complete_v1020_ies_s::rrc_conn_setup_complete_v1020_ies_s() +{ + gummei_type_r10_present = false; + rlf_info_available_r10_present = false; + log_meas_available_r10_present = false; + rn_sf_cfg_req_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(gummei_type_r10_present, 1)); + HANDLE_CODE(bref.pack(rlf_info_available_r10_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_r10_present, 1)); + HANDLE_CODE(bref.pack(rn_sf_cfg_req_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (gummei_type_r10_present) { + HANDLE_CODE(pack_enum(bref, gummei_type_r10)); + } + if (rn_sf_cfg_req_r10_present) { + HANDLE_CODE(pack_enum(bref, rn_sf_cfg_req_r10)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(gummei_type_r10_present, 1)); + HANDLE_CODE(bref.unpack(rlf_info_available_r10_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_r10_present, 1)); + HANDLE_CODE(bref.unpack(rn_sf_cfg_req_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (gummei_type_r10_present) { + HANDLE_CODE(unpack_enum(gummei_type_r10, bref)); + } + if (rn_sf_cfg_req_r10_present) { + HANDLE_CODE(unpack_enum(rn_sf_cfg_req_r10, bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gummei_type_r10_present) { + j.write_str("gummei-Type-r10", gummei_type_r10.to_string()); + } + if (rlf_info_available_r10_present) { + j.write_str("rlf-InfoAvailable-r10", "true"); + } + if (log_meas_available_r10_present) { + j.write_str("logMeasAvailable-r10", "true"); + } + if (rn_sf_cfg_req_r10_present) { + j.write_str("rn-SubframeConfigReq-r10", rn_sf_cfg_req_r10.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RSTD-InterFreqInfo-r10 ::= SEQUENCE +rstd_inter_freq_info_r10_s::rstd_inter_freq_info_r10_s() +{ + ext = false; + carrier_freq_v1090_present = false; + meas_prs_offset_r15_present = false; +} +SRSASN_CODE rstd_inter_freq_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r10, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(pack_unalign_integer(bref, meas_prs_offset_r10, (uint8_t)0, (uint8_t)39)); + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= carrier_freq_v1090_present; + rrc_asn1_warn_assert(meas_prs_offset_r15_present != (meas_prs_offset_r15.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= meas_prs_offset_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(carrier_freq_v1090_present, 1)); + if (carrier_freq_v1090_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_v1090, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_prs_offset_r15_present, 1)); + if (meas_prs_offset_r15_present) { + HANDLE_CODE(meas_prs_offset_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rstd_inter_freq_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r10, bref, (uint16_t)0, (uint16_t)65535)); + HANDLE_CODE(unpack_unalign_integer(meas_prs_offset_r10, bref, (uint8_t)0, (uint8_t)39)); + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(carrier_freq_v1090_present, 1)); + if (carrier_freq_v1090_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_v1090, bref, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_prs_offset_r15_present, 1)); + if (meas_prs_offset_r15_present) { + meas_prs_offset_r15 = make_copy_ptr(meas_prs_offset_r15_c_()); + HANDLE_CODE(meas_prs_offset_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rstd_inter_freq_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r10", carrier_freq_r10); + j.write_int("measPRS-Offset-r10", meas_prs_offset_r10); + if (carrier_freq_v1090_present) { + j.write_int("carrierFreq-v1090", carrier_freq_v1090); + } + if (meas_prs_offset_r15_present) { + j.write_fieldname("measPRS-Offset-r15"); + meas_prs_offset_r15->to_json(j); + } + j.end_obj(); +} + +void rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::destroy_() {} +void rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::meas_prs_offset_r15_c_( + const rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rstd0_r15: + c.init(other.c.get()); + break; + case types::rstd1_r15: + c.init(other.c.get()); + break; + case types::rstd2_r15: + c.init(other.c.get()); + break; + case types::rstd3_r15: + c.init(other.c.get()); + break; + case types::rstd4_r15: + c.init(other.c.get()); + break; + case types::rstd5_r15: + c.init(other.c.get()); + break; + case types::rstd6_r15: + c.init(other.c.get()); + break; + case types::rstd7_r15: + c.init(other.c.get()); + break; + case types::rstd8_r15: + c.init(other.c.get()); + break; + case types::rstd9_r15: + c.init(other.c.get()); + break; + case types::rstd10_r15: + c.init(other.c.get()); + break; + case types::rstd11_r15: + c.init(other.c.get()); + break; + case types::rstd12_r15: + c.init(other.c.get()); + break; + case types::rstd13_r15: + c.init(other.c.get()); + break; + case types::rstd14_r15: + c.init(other.c.get()); + break; + case types::rstd15_r15: + c.init(other.c.get()); + break; + case types::rstd16_r15: + c.init(other.c.get()); + break; + case types::rstd17_r15: + c.init(other.c.get()); + break; + case types::rstd18_r15: + c.init(other.c.get()); + break; + case types::rstd19_r15: + c.init(other.c.get()); + break; + case types::rstd20_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_"); + } +} +rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_& rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_:: + operator=(const rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rstd0_r15: + c.set(other.c.get()); + break; + case types::rstd1_r15: + c.set(other.c.get()); + break; + case types::rstd2_r15: + c.set(other.c.get()); + break; + case types::rstd3_r15: + c.set(other.c.get()); + break; + case types::rstd4_r15: + c.set(other.c.get()); + break; + case types::rstd5_r15: + c.set(other.c.get()); + break; + case types::rstd6_r15: + c.set(other.c.get()); + break; + case types::rstd7_r15: + c.set(other.c.get()); + break; + case types::rstd8_r15: + c.set(other.c.get()); + break; + case types::rstd9_r15: + c.set(other.c.get()); + break; + case types::rstd10_r15: + c.set(other.c.get()); + break; + case types::rstd11_r15: + c.set(other.c.get()); + break; + case types::rstd12_r15: + c.set(other.c.get()); + break; + case types::rstd13_r15: + c.set(other.c.get()); + break; + case types::rstd14_r15: + c.set(other.c.get()); + break; + case types::rstd15_r15: + c.set(other.c.get()); + break; + case types::rstd16_r15: + c.set(other.c.get()); + break; + case types::rstd17_r15: + c.set(other.c.get()); + break; + case types::rstd18_r15: + c.set(other.c.get()); + break; + case types::rstd19_r15: + c.set(other.c.get()); + break; + case types::rstd20_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_"); + } + + return *this; +} +void rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rstd0_r15: + j.write_int("rstd0-r15", c.get()); + break; + case types::rstd1_r15: + j.write_int("rstd1-r15", c.get()); + break; + case types::rstd2_r15: + j.write_int("rstd2-r15", c.get()); + break; + case types::rstd3_r15: + j.write_int("rstd3-r15", c.get()); + break; + case types::rstd4_r15: + j.write_int("rstd4-r15", c.get()); + break; + case types::rstd5_r15: + j.write_int("rstd5-r15", c.get()); + break; + case types::rstd6_r15: + j.write_int("rstd6-r15", c.get()); + break; + case types::rstd7_r15: + j.write_int("rstd7-r15", c.get()); + break; + case types::rstd8_r15: + j.write_int("rstd8-r15", c.get()); + break; + case types::rstd9_r15: + j.write_int("rstd9-r15", c.get()); + break; + case types::rstd10_r15: + j.write_int("rstd10-r15", c.get()); + break; + case types::rstd11_r15: + j.write_int("rstd11-r15", c.get()); + break; + case types::rstd12_r15: + j.write_int("rstd12-r15", c.get()); + break; + case types::rstd13_r15: + j.write_int("rstd13-r15", c.get()); + break; + case types::rstd14_r15: + j.write_int("rstd14-r15", c.get()); + break; + case types::rstd15_r15: + j.write_int("rstd15-r15", c.get()); + break; + case types::rstd16_r15: + j.write_int("rstd16-r15", c.get()); + break; + case types::rstd17_r15: + j.write_int("rstd17-r15", c.get()); + break; + case types::rstd18_r15: + j.write_int("rstd18-r15", c.get()); + break; + case types::rstd19_r15: + j.write_int("rstd19-r15", c.get()); + break; + case types::rstd20_r15: + j.write_int("rstd20-r15", c.get()); + break; + default: + log_invalid_choice_id(type_, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rstd0_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)79)); + break; + case types::rstd1_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::rstd2_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd3_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd4_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd5_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)159)); + break; + case types::rstd6_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd7_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd8_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd9_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd10_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd11_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd12_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)319)); + break; + case types::rstd13_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd14_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd15_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd16_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd17_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd18_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd19_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)639)); + break; + case types::rstd20_r15: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)1279)); + break; + default: + log_invalid_choice_id(type_, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rstd0_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)79)); + break; + case types::rstd1_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::rstd2_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd3_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd4_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd5_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)159)); + break; + case types::rstd6_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd7_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd8_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd9_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd10_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd11_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd12_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)319)); + break; + case types::rstd13_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd14_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd15_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd16_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd17_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd18_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + case types::rstd19_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)639)); + break; + case types::rstd20_r15: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)1279)); + break; + default: + log_invalid_choice_id(type_, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SCGFailureInformation-v12d0-IEs ::= SEQUENCE +scg_fail_info_v12d0_ies_s::scg_fail_info_v12d0_ies_s() +{ + fail_report_scg_v12d0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_fail_info_v12d0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_scg_v12d0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_report_scg_v12d0_present) { + HANDLE_CODE(fail_report_scg_v12d0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_v12d0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_report_scg_v12d0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_scg_v12d0_present) { + HANDLE_CODE(fail_report_scg_v12d0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_v12d0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_report_scg_v12d0_present) { + j.write_fieldname("failureReportSCG-v12d0"); + fail_report_scg_v12d0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SL-CommTxResourceReq-r12 ::= SEQUENCE +sl_comm_tx_res_req_r12_s::sl_comm_tx_res_req_r12_s() +{ + carrier_freq_r12_present = false; +} +SRSASN_CODE sl_comm_tx_res_req_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(carrier_freq_r12_present, 1)); + + if (carrier_freq_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, dest_info_list_r12, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_comm_tx_res_req_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(carrier_freq_r12_present, 1)); + + if (carrier_freq_r12_present) { + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + } + HANDLE_CODE(unpack_dyn_seq_of(dest_info_list_r12, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void sl_comm_tx_res_req_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_r12_present) { + j.write_int("carrierFreq-r12", carrier_freq_r12); + } + j.start_array("destinationInfoList-r12"); + for (uint32_t i1 = 0; i1 < dest_info_list_r12.size(); ++i1) { + j.write_str(dest_info_list_r12[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// SidelinkUEInformation-v1430-IEs ::= SEQUENCE +sidelink_ue_info_v1430_ies_s::sidelink_ue_info_v1430_ies_s() +{ + v2x_comm_rx_interested_freq_list_r14_present = false; + p2x_comm_tx_type_r14_present = false; + v2x_comm_tx_res_req_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sidelink_ue_info_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_comm_rx_interested_freq_list_r14_present, 1)); + HANDLE_CODE(bref.pack(p2x_comm_tx_type_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_comm_tx_res_req_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (v2x_comm_rx_interested_freq_list_r14_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, v2x_comm_rx_interested_freq_list_r14, 1, 8, UnalignedIntegerPacker(0, 7))); + } + if (v2x_comm_tx_res_req_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_tx_res_req_r14, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_comm_rx_interested_freq_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(p2x_comm_tx_type_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_comm_tx_res_req_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (v2x_comm_rx_interested_freq_list_r14_present) { + HANDLE_CODE( + unpack_dyn_seq_of(v2x_comm_rx_interested_freq_list_r14, bref, 1, 8, UnalignedIntegerPacker(0, 7))); + } + if (v2x_comm_tx_res_req_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_tx_res_req_r14, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sidelink_ue_info_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (v2x_comm_rx_interested_freq_list_r14_present) { + j.start_array("v2x-CommRxInterestedFreqList-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_rx_interested_freq_list_r14.size(); ++i1) { + j.write_int(v2x_comm_rx_interested_freq_list_r14[i1]); + } + j.end_array(); + } + if (p2x_comm_tx_type_r14_present) { + j.write_str("p2x-CommTxType-r14", "true"); + } + if (v2x_comm_tx_res_req_r14_present) { + j.start_array("v2x-CommTxResourceReq-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_tx_res_req_r14.size(); ++i1) { + v2x_comm_tx_res_req_r14[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-CapabilityRAT-Container ::= SEQUENCE +SRSASN_CODE ue_cap_rat_container_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, rat_type)); + HANDLE_CODE(ue_cap_rat_container.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_rat_container_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(rat_type, 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("ueCapabilityRAT-Container", ue_cap_rat_container.to_string()); + j.end_obj(); +} + +// UEAssistanceInformation-v1450-IEs ::= SEQUENCE +ueassist_info_v1450_ies_s::ueassist_info_v1450_ies_s() +{ + overheat_assist_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ueassist_info_v1450_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(overheat_assist_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (overheat_assist_r14_present) { + HANDLE_CODE(overheat_assist_r14.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_v1450_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(overheat_assist_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (overheat_assist_r14_present) { + HANDLE_CODE(overheat_assist_r14.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ueassist_info_v1450_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (overheat_assist_r14_present) { + j.write_fieldname("overheatingAssistance-r14"); + overheat_assist_r14.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UECapabilityInformation-v1250-IEs ::= SEQUENCE +ue_cap_info_v1250_ies_s::ue_cap_info_v1250_ies_s() +{ + ue_radio_paging_info_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_info_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_radio_paging_info_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_radio_paging_info_r12_present) { + HANDLE_CODE(ue_radio_paging_info_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_radio_paging_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_radio_paging_info_r12_present) { + HANDLE_CODE(ue_radio_paging_info_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_info_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_radio_paging_info_r12_present) { + j.write_fieldname("ue-RadioPagingInfo-r12"); + ue_radio_paging_info_r12.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UEInformationResponse-v1020-IEs ::= SEQUENCE +ue_info_resp_v1020_ies_s::ue_info_resp_v1020_ies_s() +{ + log_meas_report_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_report_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (log_meas_report_r10_present) { + HANDLE_CODE(log_meas_report_r10.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_report_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (log_meas_report_r10_present) { + HANDLE_CODE(log_meas_report_r10.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_report_r10_present) { + j.write_fieldname("logMeasReport-r10"); + log_meas_report_r10.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationResponse-v9e0-IEs ::= SEQUENCE +ue_info_resp_v9e0_ies_s::ue_info_resp_v9e0_ies_s() +{ + rlf_report_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rlf_report_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rlf_report_v9e0_present) { + HANDLE_CODE(rlf_report_v9e0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rlf_report_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rlf_report_v9e0_present) { + HANDLE_CODE(rlf_report_v9e0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rlf_report_v9e0_present) { + j.write_fieldname("rlf-Report-v9e0"); + rlf_report_v9e0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CSFBParametersRequestCDMA2000-v8a0-IEs ::= SEQUENCE +csfb_params_request_cdma2000_v8a0_ies_s::csfb_params_request_cdma2000_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE csfb_params_request_cdma2000_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_request_cdma2000_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void csfb_params_request_cdma2000_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CounterCheckResponse-v8a0-IEs ::= SEQUENCE +counter_check_resp_v8a0_ies_s::counter_check_resp_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE counter_check_resp_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_resp_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void counter_check_resp_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// FailureReportSCG-NR-r15 ::= SEQUENCE +fail_report_scg_nr_r15_s::fail_report_scg_nr_r15_s() +{ + ext = false; + meas_result_freq_list_nr_r15_present = false; + meas_result_scg_r15_present = false; +} +SRSASN_CODE fail_report_scg_nr_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_freq_list_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_r15_present, 1)); + + HANDLE_CODE(pack_enum(bref, fail_type_r15)); + if (meas_result_freq_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_nr_r15, 1, 5)); + } + if (meas_result_scg_r15_present) { + HANDLE_CODE(meas_result_scg_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_scg_nr_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_freq_list_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_scg_r15_present, 1)); + + HANDLE_CODE(unpack_enum(fail_type_r15, bref)); + if (meas_result_freq_list_nr_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_nr_r15, bref, 1, 5)); + } + if (meas_result_scg_r15_present) { + HANDLE_CODE(meas_result_scg_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void fail_report_scg_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("failureType-r15", fail_type_r15.to_string()); + if (meas_result_freq_list_nr_r15_present) { + j.start_array("measResultFreqListNR-r15"); + for (uint32_t i1 = 0; i1 < meas_result_freq_list_nr_r15.size(); ++i1) { + meas_result_freq_list_nr_r15[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_scg_r15_present) { + j.write_str("measResultSCG-r15", meas_result_scg_r15.to_string()); + } + j.end_obj(); +} + +// FailureReportSCG-r12 ::= SEQUENCE +fail_report_scg_r12_s::fail_report_scg_r12_s() +{ + ext = false; + meas_result_serv_freq_list_r12_present = false; + meas_result_neigh_cells_r12_present = false; + fail_type_v1290_present = false; + meas_result_serv_freq_list_ext_r13_present = false; +} +SRSASN_CODE fail_report_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r12_present, 1)); + + HANDLE_CODE(pack_enum(bref, fail_type_r12)); + if (meas_result_serv_freq_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serv_freq_list_r12, 1, 5)); + } + if (meas_result_neigh_cells_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r12, 1, 8)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= fail_type_v1290_present; + rrc_asn1_warn_assert(meas_result_serv_freq_list_ext_r13_present != + (meas_result_serv_freq_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= meas_result_serv_freq_list_ext_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(fail_type_v1290_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_ext_r13_present, 1)); + if (meas_result_serv_freq_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_serv_freq_list_ext_r13, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r12_present, 1)); + + HANDLE_CODE(unpack_enum(fail_type_r12, bref)); + if (meas_result_serv_freq_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_serv_freq_list_r12, bref, 1, 5)); + } + if (meas_result_neigh_cells_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r12, bref, 1, 8)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(fail_type_v1290_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_ext_r13_present, 1)); + if (meas_result_serv_freq_list_ext_r13_present) { + meas_result_serv_freq_list_ext_r13 = make_copy_ptr(meas_result_serv_freq_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_serv_freq_list_ext_r13, bref, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +void fail_report_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("failureType-r12", fail_type_r12.to_string()); + if (meas_result_serv_freq_list_r12_present) { + j.start_array("measResultServFreqList-r12"); + for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_r12.size(); ++i1) { + meas_result_serv_freq_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r12_present) { + j.start_array("measResultNeighCells-r12"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r12.size(); ++i1) { + meas_result_neigh_cells_r12[i1].to_json(j); + } + j.end_array(); + } + if (fail_type_v1290_present) { + j.write_str("failureType-v1290", "maxUL-TimingDiff-v1290"); + } + if (meas_result_serv_freq_list_ext_r13_present) { + j.start_array("measResultServFreqListExt-r13"); + for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_ext_r13->size(); ++i1) { + ((*meas_result_serv_freq_list_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// InDeviceCoexIndication-v11d0-IEs ::= SEQUENCE +in_dev_coex_ind_v11d0_ies_s::in_dev_coex_ind_v11d0_ies_s() +{ + ul_ca_assist_info_r11_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE in_dev_coex_ind_v11d0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_ca_assist_info_r11_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_ca_assist_info_r11_present) { + HANDLE_CODE(bref.pack(ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11_present, 1)); + if (ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11, 1, 128, + SeqOfPacker >(2, 5, UnalignedIntegerPacker(1, 32)))); + } + HANDLE_CODE(ul_ca_assist_info_r11.victim_sys_type_r11.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_v11d0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_ca_assist_info_r11_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_ca_assist_info_r11_present) { + HANDLE_CODE(bref.unpack(ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11_present, 1)); + if (ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of( + ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11, bref, 1, 128, + SeqOfPacker >(2, 5, UnalignedIntegerPacker(1, 32)))); + } + HANDLE_CODE(ul_ca_assist_info_r11.victim_sys_type_r11.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void in_dev_coex_ind_v11d0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_ca_assist_info_r11_present) { + j.write_fieldname("ul-CA-AssistanceInfo-r11"); + j.start_obj(); + if (ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11_present) { + j.start_array("affectedCarrierFreqCombList-r11"); + for (uint32_t i1 = 0; i1 < ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11[i1].size(); ++i2) { + j.write_int(ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11[i1][i2]); + } + j.end_array(); + } + j.end_array(); + } + j.write_fieldname("victimSystemType-r11"); + ul_ca_assist_info_r11.victim_sys_type_r11.to_json(j); + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +in_dev_coex_ind_v11d0_ies_s::ul_ca_assist_info_r11_s_::ul_ca_assist_info_r11_s_() +{ + affected_carrier_freq_comb_list_r11_present = false; +} + +// MBMSInterestIndication-v1310-IEs ::= SEQUENCE +mbms_interest_ind_v1310_ies_s::mbms_interest_ind_v1310_ies_s() +{ + mbms_services_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mbms_interest_ind_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbms_services_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mbms_services_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_services_r13, 0, 15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_interest_ind_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbms_services_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mbms_services_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbms_services_r13, bref, 0, 15)); + } + + return SRSASN_SUCCESS; +} +void mbms_interest_ind_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbms_services_r13_present) { + j.start_array("mbms-Services-r13"); + for (uint32_t i1 = 0; i1 < mbms_services_r13.size(); ++i1) { + mbms_services_r13[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// MeasResults ::= SEQUENCE +meas_results_s::meas_results_s() +{ + ext = false; + meas_result_neigh_cells_present = false; + meas_result_for_ecid_r9_present = false; + location_info_r10_present = false; + meas_result_serv_freq_list_r10_present = false; + meas_id_v1250_present = false; + meas_result_pcell_v1250_present = false; + meas_result_csi_rs_list_r12_present = false; + meas_result_for_rssi_r13_present = false; + meas_result_serv_freq_list_ext_r13_present = false; + meas_result_sstd_r13_present = false; + meas_result_pcell_v1310_present = false; + ul_pdcp_delay_result_list_r13_present = false; + meas_result_list_wlan_r13_present = false; + meas_result_pcell_v1360_present = false; + meas_result_list_cbr_r14_present = false; + meas_result_list_wlan_r14_present = false; + meas_result_serv_freq_list_nr_r15_present = false; + meas_result_cell_list_sftd_r15_present = false; + log_meas_result_list_bt_r15_present = false; + log_meas_result_list_wlan_r15_present = false; + meas_result_sensing_r15_present = false; + height_ue_r15_present = false; +} +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_unalign_integer(bref, meas_id, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_pcell.rsrp_result, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_pcell.rsrq_result, (uint8_t)0, (uint8_t)34)); + if (meas_result_neigh_cells_present) { + HANDLE_CODE(meas_result_neigh_cells.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(8); + rrc_asn1_warn_assert(meas_result_for_ecid_r9_present != (meas_result_for_ecid_r9.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= meas_result_for_ecid_r9_present; + rrc_asn1_warn_assert(location_info_r10_present != (location_info_r10.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= location_info_r10_present; + rrc_asn1_warn_assert(meas_result_serv_freq_list_r10_present != (meas_result_serv_freq_list_r10.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= meas_result_serv_freq_list_r10_present; + group_flags[2] |= meas_id_v1250_present; + group_flags[2] |= meas_result_pcell_v1250_present; + rrc_asn1_warn_assert(meas_result_csi_rs_list_r12_present != (meas_result_csi_rs_list_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[2] |= meas_result_csi_rs_list_r12_present; + rrc_asn1_warn_assert(meas_result_for_rssi_r13_present != (meas_result_for_rssi_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= meas_result_for_rssi_r13_present; + rrc_asn1_warn_assert(meas_result_serv_freq_list_ext_r13_present != + (meas_result_serv_freq_list_ext_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= meas_result_serv_freq_list_ext_r13_present; + rrc_asn1_warn_assert(meas_result_sstd_r13_present != (meas_result_sstd_r13.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= meas_result_sstd_r13_present; + rrc_asn1_warn_assert(meas_result_pcell_v1310_present != (meas_result_pcell_v1310.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= meas_result_pcell_v1310_present; + rrc_asn1_warn_assert(ul_pdcp_delay_result_list_r13_present != (ul_pdcp_delay_result_list_r13.get() != NULL), + __FILE__, __LINE__); + group_flags[3] |= ul_pdcp_delay_result_list_r13_present; + rrc_asn1_warn_assert(meas_result_list_wlan_r13_present != (meas_result_list_wlan_r13.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= meas_result_list_wlan_r13_present; + group_flags[4] |= meas_result_pcell_v1360_present; + rrc_asn1_warn_assert(meas_result_list_cbr_r14_present != (meas_result_list_cbr_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= meas_result_list_cbr_r14_present; + rrc_asn1_warn_assert(meas_result_list_wlan_r14_present != (meas_result_list_wlan_r14.get() != NULL), __FILE__, + __LINE__); + group_flags[5] |= meas_result_list_wlan_r14_present; + rrc_asn1_warn_assert(meas_result_serv_freq_list_nr_r15_present != (meas_result_serv_freq_list_nr_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= meas_result_serv_freq_list_nr_r15_present; + rrc_asn1_warn_assert(meas_result_cell_list_sftd_r15_present != (meas_result_cell_list_sftd_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= meas_result_cell_list_sftd_r15_present; + rrc_asn1_warn_assert(log_meas_result_list_bt_r15_present != (log_meas_result_list_bt_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= log_meas_result_list_bt_r15_present; + rrc_asn1_warn_assert(log_meas_result_list_wlan_r15_present != (log_meas_result_list_wlan_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[7] |= log_meas_result_list_wlan_r15_present; + rrc_asn1_warn_assert(meas_result_sensing_r15_present != (meas_result_sensing_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[7] |= meas_result_sensing_r15_present; + group_flags[7] |= height_ue_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_for_ecid_r9_present, 1)); + if (meas_result_for_ecid_r9_present) { + HANDLE_CODE(meas_result_for_ecid_r9->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(location_info_r10_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_r10_present, 1)); + if (location_info_r10_present) { + HANDLE_CODE(location_info_r10->pack(bref)); + } + if (meas_result_serv_freq_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_serv_freq_list_r10, 1, 5)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_id_v1250_present, 1)); + HANDLE_CODE(bref.pack(meas_result_pcell_v1250_present, 1)); + HANDLE_CODE(bref.pack(meas_result_csi_rs_list_r12_present, 1)); + if (meas_id_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_id_v1250, (uint8_t)33, (uint8_t)64)); + } + if (meas_result_pcell_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_pcell_v1250, (int8_t)-30, (int8_t)46)); + } + if (meas_result_csi_rs_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_csi_rs_list_r12, 1, 8)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_for_rssi_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_sstd_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_pcell_v1310_present, 1)); + HANDLE_CODE(bref.pack(ul_pdcp_delay_result_list_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_list_wlan_r13_present, 1)); + if (meas_result_for_rssi_r13_present) { + HANDLE_CODE(meas_result_for_rssi_r13->pack(bref)); + } + if (meas_result_serv_freq_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_serv_freq_list_ext_r13, 1, 32)); + } + if (meas_result_sstd_r13_present) { + HANDLE_CODE(meas_result_sstd_r13->pack(bref)); + } + if (meas_result_pcell_v1310_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_pcell_v1310->rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + if (ul_pdcp_delay_result_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ul_pdcp_delay_result_list_r13, 1, 6)); + } + if (meas_result_list_wlan_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_wlan_r13, 1, 8)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_pcell_v1360_present, 1)); + if (meas_result_pcell_v1360_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_pcell_v1360, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_list_cbr_r14_present, 1)); + HANDLE_CODE(bref.pack(meas_result_list_wlan_r14_present, 1)); + if (meas_result_list_cbr_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_cbr_r14, 1, 72)); + } + if (meas_result_list_wlan_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_wlan_r14, 1, 32)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_serv_freq_list_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_r15_present, 1)); + if (meas_result_serv_freq_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_serv_freq_list_nr_r15, 1, 32)); + } + if (meas_result_cell_list_sftd_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_cell_list_sftd_r15, 1, 3)); + } + } + if (group_flags[7]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_result_list_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(meas_result_sensing_r15_present, 1)); + HANDLE_CODE(bref.pack(height_ue_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_bt_r15, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_wlan_r15, 1, 32)); + } + if (meas_result_sensing_r15_present) { + HANDLE_CODE(meas_result_sensing_r15->pack(bref)); + } + if (height_ue_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, height_ue_r15, (int16_t)-400, (int16_t)8880)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(meas_id, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_unalign_integer(meas_result_pcell.rsrp_result, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_pcell.rsrq_result, bref, (uint8_t)0, (uint8_t)34)); + if (meas_result_neigh_cells_present) { + HANDLE_CODE(meas_result_neigh_cells.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(8); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_for_ecid_r9_present, 1)); + if (meas_result_for_ecid_r9_present) { + meas_result_for_ecid_r9 = make_copy_ptr(meas_result_for_ecid_r9_s()); + HANDLE_CODE(meas_result_for_ecid_r9->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(location_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_r10_present, 1)); + if (location_info_r10_present) { + location_info_r10 = make_copy_ptr(location_info_r10_s()); + HANDLE_CODE(location_info_r10->unpack(bref)); + } + if (meas_result_serv_freq_list_r10_present) { + meas_result_serv_freq_list_r10 = make_copy_ptr(meas_result_serv_freq_list_r10_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_serv_freq_list_r10, bref, 1, 5)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_id_v1250_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_pcell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_csi_rs_list_r12_present, 1)); + if (meas_id_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_id_v1250, bref, (uint8_t)33, (uint8_t)64)); + } + if (meas_result_pcell_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_pcell_v1250, bref, (int8_t)-30, (int8_t)46)); + } + if (meas_result_csi_rs_list_r12_present) { + meas_result_csi_rs_list_r12 = make_copy_ptr(meas_result_csi_rs_list_r12_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_csi_rs_list_r12, bref, 1, 8)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_for_rssi_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_sstd_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_pcell_v1310_present, 1)); + HANDLE_CODE(bref.unpack(ul_pdcp_delay_result_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_list_wlan_r13_present, 1)); + if (meas_result_for_rssi_r13_present) { + meas_result_for_rssi_r13 = make_copy_ptr(meas_result_for_rssi_r13_s()); + HANDLE_CODE(meas_result_for_rssi_r13->unpack(bref)); + } + if (meas_result_serv_freq_list_ext_r13_present) { + meas_result_serv_freq_list_ext_r13 = make_copy_ptr(meas_result_serv_freq_list_ext_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_serv_freq_list_ext_r13, bref, 1, 32)); + } + if (meas_result_sstd_r13_present) { + meas_result_sstd_r13 = make_copy_ptr(meas_result_sstd_r13_s()); + HANDLE_CODE(meas_result_sstd_r13->unpack(bref)); + } + if (meas_result_pcell_v1310_present) { + meas_result_pcell_v1310 = make_copy_ptr(meas_result_pcell_v1310_s_()); + HANDLE_CODE( + unpack_unalign_integer(meas_result_pcell_v1310->rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + if (ul_pdcp_delay_result_list_r13_present) { + ul_pdcp_delay_result_list_r13 = make_copy_ptr(ul_pdcp_delay_result_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*ul_pdcp_delay_result_list_r13, bref, 1, 6)); + } + if (meas_result_list_wlan_r13_present) { + meas_result_list_wlan_r13 = make_copy_ptr(meas_result_list_wlan_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_wlan_r13, bref, 1, 8)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_pcell_v1360_present, 1)); + if (meas_result_pcell_v1360_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_pcell_v1360, bref, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_list_cbr_r14_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_list_wlan_r14_present, 1)); + if (meas_result_list_cbr_r14_present) { + meas_result_list_cbr_r14 = make_copy_ptr(meas_result_list_cbr_r14_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_cbr_r14, bref, 1, 72)); + } + if (meas_result_list_wlan_r14_present) { + meas_result_list_wlan_r14 = make_copy_ptr(meas_result_list_wlan_r14_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_wlan_r14, bref, 1, 32)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_serv_freq_list_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_r15_present, 1)); + if (meas_result_serv_freq_list_nr_r15_present) { + meas_result_serv_freq_list_nr_r15 = make_copy_ptr(meas_result_serv_freq_list_nr_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_serv_freq_list_nr_r15, bref, 1, 32)); + } + if (meas_result_cell_list_sftd_r15_present) { + meas_result_cell_list_sftd_r15 = make_copy_ptr(meas_result_cell_list_sftd_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_cell_list_sftd_r15, bref, 1, 3)); + } + } + if (group_flags[7]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_result_list_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_sensing_r15_present, 1)); + HANDLE_CODE(bref.unpack(height_ue_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + log_meas_result_list_bt_r15 = make_copy_ptr(log_meas_result_list_bt_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_bt_r15, bref, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + log_meas_result_list_wlan_r15 = make_copy_ptr(log_meas_result_list_wlan_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_wlan_r15, bref, 1, 32)); + } + if (meas_result_sensing_r15_present) { + meas_result_sensing_r15 = make_copy_ptr(meas_result_sensing_r15_s()); + HANDLE_CODE(meas_result_sensing_r15->unpack(bref)); + } + if (height_ue_r15_present) { + HANDLE_CODE(unpack_unalign_integer(height_ue_r15, bref, (int16_t)-400, (int16_t)8880)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_results_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measId", meas_id); + j.write_fieldname("measResultPCell"); + j.start_obj(); + j.write_int("rsrpResult", meas_result_pcell.rsrp_result); + j.write_int("rsrqResult", meas_result_pcell.rsrq_result); + j.end_obj(); + if (meas_result_neigh_cells_present) { + j.write_fieldname("measResultNeighCells"); + meas_result_neigh_cells.to_json(j); + } + if (meas_result_for_ecid_r9_present) { + j.write_fieldname("measResultForECID-r9"); + meas_result_for_ecid_r9->to_json(j); + } + if (location_info_r10_present) { + j.write_fieldname("locationInfo-r10"); + location_info_r10->to_json(j); + } + if (meas_result_serv_freq_list_r10_present) { + j.start_array("measResultServFreqList-r10"); + for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_r10->size(); ++i1) { + ((*meas_result_serv_freq_list_r10)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_id_v1250_present) { + j.write_int("measId-v1250", meas_id_v1250); + } + if (meas_result_pcell_v1250_present) { + j.write_int("measResultPCell-v1250", meas_result_pcell_v1250); + } + if (meas_result_csi_rs_list_r12_present) { + j.start_array("measResultCSI-RS-List-r12"); + for (uint32_t i1 = 0; i1 < meas_result_csi_rs_list_r12->size(); ++i1) { + ((*meas_result_csi_rs_list_r12)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_for_rssi_r13_present) { + j.write_fieldname("measResultForRSSI-r13"); + meas_result_for_rssi_r13->to_json(j); + } + if (meas_result_serv_freq_list_ext_r13_present) { + j.start_array("measResultServFreqListExt-r13"); + for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_ext_r13->size(); ++i1) { + ((*meas_result_serv_freq_list_ext_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_sstd_r13_present) { + j.write_fieldname("measResultSSTD-r13"); + meas_result_sstd_r13->to_json(j); + } + if (meas_result_pcell_v1310_present) { + j.write_fieldname("measResultPCell-v1310"); + j.start_obj(); + j.write_int("rs-sinr-Result-r13", meas_result_pcell_v1310->rs_sinr_result_r13); + j.end_obj(); + } + if (ul_pdcp_delay_result_list_r13_present) { + j.start_array("ul-PDCP-DelayResultList-r13"); + for (uint32_t i1 = 0; i1 < ul_pdcp_delay_result_list_r13->size(); ++i1) { + ((*ul_pdcp_delay_result_list_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_list_wlan_r13_present) { + j.start_array("measResultListWLAN-r13"); + for (uint32_t i1 = 0; i1 < meas_result_list_wlan_r13->size(); ++i1) { + ((*meas_result_list_wlan_r13)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_pcell_v1360_present) { + j.write_int("measResultPCell-v1360", meas_result_pcell_v1360); + } + if (meas_result_list_cbr_r14_present) { + j.start_array("measResultListCBR-r14"); + for (uint32_t i1 = 0; i1 < meas_result_list_cbr_r14->size(); ++i1) { + ((*meas_result_list_cbr_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_list_wlan_r14_present) { + j.start_array("measResultListWLAN-r14"); + for (uint32_t i1 = 0; i1 < meas_result_list_wlan_r14->size(); ++i1) { + ((*meas_result_list_wlan_r14)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_serv_freq_list_nr_r15_present) { + j.start_array("measResultServFreqListNR-r15"); + for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_nr_r15->size(); ++i1) { + ((*meas_result_serv_freq_list_nr_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_cell_list_sftd_r15_present) { + j.start_array("measResultCellListSFTD-r15"); + for (uint32_t i1 = 0; i1 < meas_result_cell_list_sftd_r15->size(); ++i1) { + ((*meas_result_cell_list_sftd_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (log_meas_result_list_bt_r15_present) { + j.start_array("logMeasResultListBT-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { + ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (log_meas_result_list_wlan_r15_present) { + j.start_array("logMeasResultListWLAN-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { + ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (meas_result_sensing_r15_present) { + j.write_fieldname("measResultSensing-r15"); + meas_result_sensing_r15->to_json(j); + } + if (height_ue_r15_present) { + j.write_int("heightUE-r15", height_ue_r15); + } + j.end_obj(); +} + +void meas_results_s::meas_result_neigh_cells_c_::destroy_() +{ + switch (type_) { + case types::meas_result_list_eutra: + c.destroy(); + break; + case types::meas_result_list_utra: + c.destroy(); + break; + case types::meas_result_list_geran: + c.destroy(); + break; + case types::meas_results_cdma2000: + c.destroy(); + break; + case types::meas_result_neigh_cell_list_nr_r15: + 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_eutra: + c.init(); + break; + case types::meas_result_list_utra: + c.init(); + break; + case types::meas_result_list_geran: + c.init(); + break; + case types::meas_results_cdma2000: + c.init(); + break; + case types::meas_result_neigh_cell_list_nr_r15: + 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_eutra: + c.init(other.c.get()); + break; + case types::meas_result_list_utra: + c.init(other.c.get()); + break; + case types::meas_result_list_geran: + c.init(other.c.get()); + break; + case types::meas_results_cdma2000: + c.init(other.c.get()); + break; + case types::meas_result_neigh_cell_list_nr_r15: + 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_eutra: + c.set(other.c.get()); + break; + case types::meas_result_list_utra: + c.set(other.c.get()); + break; + case types::meas_result_list_geran: + c.set(other.c.get()); + break; + case types::meas_results_cdma2000: + c.set(other.c.get()); + break; + case types::meas_result_neigh_cell_list_nr_r15: + 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; +} +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_eutra: + j.start_array("measResultListEUTRA"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::meas_result_list_utra: + j.start_array("measResultListUTRA"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::meas_result_list_geran: + j.start_array("measResultListGERAN"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + case types::meas_results_cdma2000: + j.write_fieldname("measResultsCDMA2000"); + c.get().to_json(j); + break; + case types::meas_result_neigh_cell_list_nr_r15: + j.start_array("measResultNeighCellListNR-r15"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + 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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::meas_result_list_eutra: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + case types::meas_result_list_utra: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + case types::meas_result_list_geran: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + case types::meas_results_cdma2000: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_result_neigh_cell_list_nr_r15: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + } break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_s::meas_result_neigh_cells_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::meas_result_list_eutra: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + case types::meas_result_list_utra: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + case types::meas_result_list_geran: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + case types::meas_results_cdma2000: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_result_neigh_cell_list_nr_r15: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + } break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasurementReport-v8a0-IEs ::= SEQUENCE +meas_report_v8a0_ies_s::meas_report_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE meas_report_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// ProximityIndication-v930-IEs ::= SEQUENCE +proximity_ind_v930_ies_s::proximity_ind_v930_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE proximity_ind_v930_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE proximity_ind_v930_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void proximity_ind_v930_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RLF-Report-r9 ::= SEQUENCE +rlf_report_r9_s::rlf_report_r9_s() +{ + ext = false; + meas_result_neigh_cells_r9_present = false; + location_info_r10_present = false; + failed_pcell_id_r10_present = false; + reest_cell_id_r10_present = false; + time_conn_fail_r10_present = false; + conn_fail_type_r10_present = false; + prev_pcell_id_r10_present = false; + failed_pcell_id_v1090_present = false; + basic_fields_r11_present = false; + prev_utra_cell_id_r11_present = false; + sel_utra_cell_id_r11_present = false; + failed_pcell_id_v1250_present = false; + meas_result_last_serv_cell_v1250_present = false; + last_serv_cell_rsrq_type_r12_present = false; + meas_result_list_eutra_v1250_present = false; + drb_established_with_qci_minus1_r13_present = false; + meas_result_last_serv_cell_v1360_present = false; + log_meas_result_list_bt_r15_present = false; + log_meas_result_list_wlan_r15_present = false; +} +SRSASN_CODE rlf_report_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r9_present, 1)); + + HANDLE_CODE(bref.pack(meas_result_last_serv_cell_r9.rsrq_result_r9_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_last_serv_cell_r9.rsrp_result_r9, (uint8_t)0, (uint8_t)97)); + if (meas_result_last_serv_cell_r9.rsrq_result_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_last_serv_cell_r9.rsrq_result_r9, (uint8_t)0, (uint8_t)34)); + } + if (meas_result_neigh_cells_r9_present) { + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r9.meas_result_list_eutra_r9_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r9.meas_result_list_utra_r9_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r9.meas_result_list_geran_r9_present, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r9.meas_results_cdma2000_r9_present, 1)); + if (meas_result_neigh_cells_r9.meas_result_list_eutra_r9_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r9.meas_result_list_eutra_r9, 1, 8)); + } + if (meas_result_neigh_cells_r9.meas_result_list_utra_r9_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r9.meas_result_list_utra_r9, 1, 8)); + } + if (meas_result_neigh_cells_r9.meas_result_list_geran_r9_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r9.meas_result_list_geran_r9, 1, 8)); + } + if (meas_result_neigh_cells_r9.meas_results_cdma2000_r9_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r9.meas_results_cdma2000_r9, 1, 8)); + } + } + + if (ext) { + ext_groups_header group_flags(7); + rrc_asn1_warn_assert(location_info_r10_present != (location_info_r10.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= location_info_r10_present; + rrc_asn1_warn_assert(failed_pcell_id_r10_present != (failed_pcell_id_r10.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= failed_pcell_id_r10_present; + rrc_asn1_warn_assert(reest_cell_id_r10_present != (reest_cell_id_r10.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= reest_cell_id_r10_present; + group_flags[0] |= time_conn_fail_r10_present; + group_flags[0] |= conn_fail_type_r10_present; + rrc_asn1_warn_assert(prev_pcell_id_r10_present != (prev_pcell_id_r10.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= prev_pcell_id_r10_present; + rrc_asn1_warn_assert(failed_pcell_id_v1090_present != (failed_pcell_id_v1090.get() != NULL), __FILE__, __LINE__); + group_flags[1] |= failed_pcell_id_v1090_present; + rrc_asn1_warn_assert(basic_fields_r11_present != (basic_fields_r11.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= basic_fields_r11_present; + rrc_asn1_warn_assert(prev_utra_cell_id_r11_present != (prev_utra_cell_id_r11.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= prev_utra_cell_id_r11_present; + rrc_asn1_warn_assert(sel_utra_cell_id_r11_present != (sel_utra_cell_id_r11.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= sel_utra_cell_id_r11_present; + rrc_asn1_warn_assert(failed_pcell_id_v1250_present != (failed_pcell_id_v1250.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= failed_pcell_id_v1250_present; + group_flags[3] |= meas_result_last_serv_cell_v1250_present; + rrc_asn1_warn_assert(last_serv_cell_rsrq_type_r12_present != (last_serv_cell_rsrq_type_r12.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= last_serv_cell_rsrq_type_r12_present; + rrc_asn1_warn_assert(meas_result_list_eutra_v1250_present != (meas_result_list_eutra_v1250.get() != NULL), __FILE__, + __LINE__); + group_flags[3] |= meas_result_list_eutra_v1250_present; + group_flags[4] |= drb_established_with_qci_minus1_r13_present; + group_flags[5] |= meas_result_last_serv_cell_v1360_present; + rrc_asn1_warn_assert(log_meas_result_list_bt_r15_present != (log_meas_result_list_bt_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[6] |= log_meas_result_list_bt_r15_present; + rrc_asn1_warn_assert(log_meas_result_list_wlan_r15_present != (log_meas_result_list_wlan_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[6] |= log_meas_result_list_wlan_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(location_info_r10_present, 1)); + HANDLE_CODE(bref.pack(failed_pcell_id_r10_present, 1)); + HANDLE_CODE(bref.pack(reest_cell_id_r10_present, 1)); + HANDLE_CODE(bref.pack(time_conn_fail_r10_present, 1)); + HANDLE_CODE(bref.pack(conn_fail_type_r10_present, 1)); + HANDLE_CODE(bref.pack(prev_pcell_id_r10_present, 1)); + if (location_info_r10_present) { + HANDLE_CODE(location_info_r10->pack(bref)); + } + if (failed_pcell_id_r10_present) { + HANDLE_CODE(failed_pcell_id_r10->pack(bref)); + } + if (reest_cell_id_r10_present) { + HANDLE_CODE(reest_cell_id_r10->pack(bref)); + } + if (time_conn_fail_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, time_conn_fail_r10, (uint16_t)0, (uint16_t)1023)); + } + if (conn_fail_type_r10_present) { + HANDLE_CODE(pack_enum(bref, conn_fail_type_r10)); + } + if (prev_pcell_id_r10_present) { + HANDLE_CODE(prev_pcell_id_r10->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(failed_pcell_id_v1090_present, 1)); + if (failed_pcell_id_v1090_present) { + HANDLE_CODE( + pack_unalign_integer(bref, failed_pcell_id_v1090->carrier_freq_v1090, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(basic_fields_r11_present, 1)); + HANDLE_CODE(bref.pack(prev_utra_cell_id_r11_present, 1)); + HANDLE_CODE(bref.pack(sel_utra_cell_id_r11_present, 1)); + if (basic_fields_r11_present) { + HANDLE_CODE(basic_fields_r11->c_rnti_r11.pack(bref)); + HANDLE_CODE(pack_enum(bref, basic_fields_r11->rlf_cause_r11)); + HANDLE_CODE(pack_unalign_integer(bref, basic_fields_r11->time_since_fail_r11, (uint32_t)0, (uint32_t)172800)); + } + if (prev_utra_cell_id_r11_present) { + HANDLE_CODE(bref.pack(prev_utra_cell_id_r11->cell_global_id_r11_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, prev_utra_cell_id_r11->carrier_freq_r11, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(prev_utra_cell_id_r11->pci_r11.pack(bref)); + if (prev_utra_cell_id_r11->cell_global_id_r11_present) { + HANDLE_CODE(prev_utra_cell_id_r11->cell_global_id_r11.pack(bref)); + } + } + if (sel_utra_cell_id_r11_present) { + HANDLE_CODE(pack_unalign_integer(bref, sel_utra_cell_id_r11->carrier_freq_r11, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(sel_utra_cell_id_r11->pci_r11.pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(failed_pcell_id_v1250_present, 1)); + HANDLE_CODE(bref.pack(meas_result_last_serv_cell_v1250_present, 1)); + HANDLE_CODE(bref.pack(last_serv_cell_rsrq_type_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_list_eutra_v1250_present, 1)); + if (failed_pcell_id_v1250_present) { + HANDLE_CODE(failed_pcell_id_v1250->tac_failed_pcell_r12.pack(bref)); + } + if (meas_result_last_serv_cell_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_last_serv_cell_v1250, (int8_t)-30, (int8_t)46)); + } + if (last_serv_cell_rsrq_type_r12_present) { + HANDLE_CODE(last_serv_cell_rsrq_type_r12->pack(bref)); + } + if (meas_result_list_eutra_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *meas_result_list_eutra_v1250, 1, 8)); + } + } + if (group_flags[4]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(drb_established_with_qci_minus1_r13_present, 1)); + } + if (group_flags[5]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(meas_result_last_serv_cell_v1360_present, 1)); + if (meas_result_last_serv_cell_v1360_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_last_serv_cell_v1360, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[6]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_result_list_wlan_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_bt_r15, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *log_meas_result_list_wlan_r15, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r9_present, 1)); + + HANDLE_CODE(bref.unpack(meas_result_last_serv_cell_r9.rsrq_result_r9_present, 1)); + HANDLE_CODE(unpack_unalign_integer(meas_result_last_serv_cell_r9.rsrp_result_r9, bref, (uint8_t)0, (uint8_t)97)); + if (meas_result_last_serv_cell_r9.rsrq_result_r9_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_last_serv_cell_r9.rsrq_result_r9, bref, (uint8_t)0, (uint8_t)34)); + } + if (meas_result_neigh_cells_r9_present) { + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r9.meas_result_list_eutra_r9_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r9.meas_result_list_utra_r9_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r9.meas_result_list_geran_r9_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r9.meas_results_cdma2000_r9_present, 1)); + if (meas_result_neigh_cells_r9.meas_result_list_eutra_r9_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r9.meas_result_list_eutra_r9, bref, 1, 8)); + } + if (meas_result_neigh_cells_r9.meas_result_list_utra_r9_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r9.meas_result_list_utra_r9, bref, 1, 8)); + } + if (meas_result_neigh_cells_r9.meas_result_list_geran_r9_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r9.meas_result_list_geran_r9, bref, 1, 8)); + } + if (meas_result_neigh_cells_r9.meas_results_cdma2000_r9_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r9.meas_results_cdma2000_r9, bref, 1, 8)); + } + } + + if (ext) { + ext_groups_header group_flags(7); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(location_info_r10_present, 1)); + HANDLE_CODE(bref.unpack(failed_pcell_id_r10_present, 1)); + HANDLE_CODE(bref.unpack(reest_cell_id_r10_present, 1)); + HANDLE_CODE(bref.unpack(time_conn_fail_r10_present, 1)); + HANDLE_CODE(bref.unpack(conn_fail_type_r10_present, 1)); + HANDLE_CODE(bref.unpack(prev_pcell_id_r10_present, 1)); + if (location_info_r10_present) { + location_info_r10 = make_copy_ptr(location_info_r10_s()); + HANDLE_CODE(location_info_r10->unpack(bref)); + } + if (failed_pcell_id_r10_present) { + failed_pcell_id_r10 = make_copy_ptr(failed_pcell_id_r10_c_()); + HANDLE_CODE(failed_pcell_id_r10->unpack(bref)); + } + if (reest_cell_id_r10_present) { + reest_cell_id_r10 = make_copy_ptr(cell_global_id_eutra_s()); + HANDLE_CODE(reest_cell_id_r10->unpack(bref)); + } + if (time_conn_fail_r10_present) { + HANDLE_CODE(unpack_unalign_integer(time_conn_fail_r10, bref, (uint16_t)0, (uint16_t)1023)); + } + if (conn_fail_type_r10_present) { + HANDLE_CODE(unpack_enum(conn_fail_type_r10, bref)); + } + if (prev_pcell_id_r10_present) { + prev_pcell_id_r10 = make_copy_ptr(cell_global_id_eutra_s()); + HANDLE_CODE(prev_pcell_id_r10->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(failed_pcell_id_v1090_present, 1)); + if (failed_pcell_id_v1090_present) { + failed_pcell_id_v1090 = make_copy_ptr(failed_pcell_id_v1090_s_()); + HANDLE_CODE( + unpack_unalign_integer(failed_pcell_id_v1090->carrier_freq_v1090, bref, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(basic_fields_r11_present, 1)); + HANDLE_CODE(bref.unpack(prev_utra_cell_id_r11_present, 1)); + HANDLE_CODE(bref.unpack(sel_utra_cell_id_r11_present, 1)); + if (basic_fields_r11_present) { + basic_fields_r11 = make_copy_ptr(basic_fields_r11_s_()); + HANDLE_CODE(basic_fields_r11->c_rnti_r11.unpack(bref)); + HANDLE_CODE(unpack_enum(basic_fields_r11->rlf_cause_r11, bref)); + HANDLE_CODE(unpack_unalign_integer(basic_fields_r11->time_since_fail_r11, bref, (uint32_t)0, (uint32_t)172800)); + } + if (prev_utra_cell_id_r11_present) { + prev_utra_cell_id_r11 = make_copy_ptr(prev_utra_cell_id_r11_s_()); + HANDLE_CODE(bref.unpack(prev_utra_cell_id_r11->cell_global_id_r11_present, 1)); + HANDLE_CODE( + unpack_unalign_integer(prev_utra_cell_id_r11->carrier_freq_r11, bref, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(prev_utra_cell_id_r11->pci_r11.unpack(bref)); + if (prev_utra_cell_id_r11->cell_global_id_r11_present) { + HANDLE_CODE(prev_utra_cell_id_r11->cell_global_id_r11.unpack(bref)); + } + } + if (sel_utra_cell_id_r11_present) { + sel_utra_cell_id_r11 = make_copy_ptr(sel_utra_cell_id_r11_s_()); + HANDLE_CODE(unpack_unalign_integer(sel_utra_cell_id_r11->carrier_freq_r11, bref, (uint16_t)0, (uint16_t)16383)); + HANDLE_CODE(sel_utra_cell_id_r11->pci_r11.unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(failed_pcell_id_v1250_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_last_serv_cell_v1250_present, 1)); + HANDLE_CODE(bref.unpack(last_serv_cell_rsrq_type_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_list_eutra_v1250_present, 1)); + if (failed_pcell_id_v1250_present) { + failed_pcell_id_v1250 = make_copy_ptr(failed_pcell_id_v1250_s_()); + HANDLE_CODE(failed_pcell_id_v1250->tac_failed_pcell_r12.unpack(bref)); + } + if (meas_result_last_serv_cell_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_last_serv_cell_v1250, bref, (int8_t)-30, (int8_t)46)); + } + if (last_serv_cell_rsrq_type_r12_present) { + last_serv_cell_rsrq_type_r12 = make_copy_ptr(rsrq_type_r12_s()); + HANDLE_CODE(last_serv_cell_rsrq_type_r12->unpack(bref)); + } + if (meas_result_list_eutra_v1250_present) { + meas_result_list_eutra_v1250 = make_copy_ptr(meas_result_list2_eutra_v1250_l()); + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_list_eutra_v1250, bref, 1, 8)); + } + } + if (group_flags[4]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(drb_established_with_qci_minus1_r13_present, 1)); + } + if (group_flags[5]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(meas_result_last_serv_cell_v1360_present, 1)); + if (meas_result_last_serv_cell_v1360_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_last_serv_cell_v1360, bref, (int8_t)-17, (int8_t)-1)); + } + } + if (group_flags[6]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(log_meas_result_list_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_result_list_wlan_r15_present, 1)); + if (log_meas_result_list_bt_r15_present) { + log_meas_result_list_bt_r15 = make_copy_ptr(log_meas_result_list_bt_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_bt_r15, bref, 1, 32)); + } + if (log_meas_result_list_wlan_r15_present) { + log_meas_result_list_wlan_r15 = make_copy_ptr(log_meas_result_list_wlan_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*log_meas_result_list_wlan_r15, bref, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +void rlf_report_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultLastServCell-r9"); + j.start_obj(); + j.write_int("rsrpResult-r9", meas_result_last_serv_cell_r9.rsrp_result_r9); + if (meas_result_last_serv_cell_r9.rsrq_result_r9_present) { + j.write_int("rsrqResult-r9", meas_result_last_serv_cell_r9.rsrq_result_r9); + } + j.end_obj(); + if (meas_result_neigh_cells_r9_present) { + j.write_fieldname("measResultNeighCells-r9"); + j.start_obj(); + if (meas_result_neigh_cells_r9.meas_result_list_eutra_r9_present) { + j.start_array("measResultListEUTRA-r9"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_result_list_eutra_r9.size(); ++i1) { + meas_result_neigh_cells_r9.meas_result_list_eutra_r9[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r9.meas_result_list_utra_r9_present) { + j.start_array("measResultListUTRA-r9"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_result_list_utra_r9.size(); ++i1) { + meas_result_neigh_cells_r9.meas_result_list_utra_r9[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r9.meas_result_list_geran_r9_present) { + j.start_array("measResultListGERAN-r9"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_result_list_geran_r9.size(); ++i1) { + meas_result_neigh_cells_r9.meas_result_list_geran_r9[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r9.meas_results_cdma2000_r9_present) { + j.start_array("measResultsCDMA2000-r9"); + for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_results_cdma2000_r9.size(); ++i1) { + meas_result_neigh_cells_r9.meas_results_cdma2000_r9[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (location_info_r10_present) { + j.write_fieldname("locationInfo-r10"); + location_info_r10->to_json(j); + } + if (failed_pcell_id_r10_present) { + j.write_fieldname("failedPCellId-r10"); + failed_pcell_id_r10->to_json(j); + } + if (reest_cell_id_r10_present) { + j.write_fieldname("reestablishmentCellId-r10"); + reest_cell_id_r10->to_json(j); + } + if (time_conn_fail_r10_present) { + j.write_int("timeConnFailure-r10", time_conn_fail_r10); + } + if (conn_fail_type_r10_present) { + j.write_str("connectionFailureType-r10", conn_fail_type_r10.to_string()); + } + if (prev_pcell_id_r10_present) { + j.write_fieldname("previousPCellId-r10"); + prev_pcell_id_r10->to_json(j); + } + if (failed_pcell_id_v1090_present) { + j.write_fieldname("failedPCellId-v1090"); + j.start_obj(); + j.write_int("carrierFreq-v1090", failed_pcell_id_v1090->carrier_freq_v1090); + j.end_obj(); + } + if (basic_fields_r11_present) { + j.write_fieldname("basicFields-r11"); + j.start_obj(); + j.write_str("c-RNTI-r11", basic_fields_r11->c_rnti_r11.to_string()); + j.write_str("rlf-Cause-r11", basic_fields_r11->rlf_cause_r11.to_string()); + j.write_int("timeSinceFailure-r11", basic_fields_r11->time_since_fail_r11); + j.end_obj(); + } + if (prev_utra_cell_id_r11_present) { + j.write_fieldname("previousUTRA-CellId-r11"); + j.start_obj(); + j.write_int("carrierFreq-r11", prev_utra_cell_id_r11->carrier_freq_r11); + j.write_fieldname("physCellId-r11"); + prev_utra_cell_id_r11->pci_r11.to_json(j); + if (prev_utra_cell_id_r11->cell_global_id_r11_present) { + j.write_fieldname("cellGlobalId-r11"); + prev_utra_cell_id_r11->cell_global_id_r11.to_json(j); + } + j.end_obj(); + } + if (sel_utra_cell_id_r11_present) { + j.write_fieldname("selectedUTRA-CellId-r11"); + j.start_obj(); + j.write_int("carrierFreq-r11", sel_utra_cell_id_r11->carrier_freq_r11); + j.write_fieldname("physCellId-r11"); + sel_utra_cell_id_r11->pci_r11.to_json(j); + j.end_obj(); + } + if (failed_pcell_id_v1250_present) { + j.write_fieldname("failedPCellId-v1250"); + j.start_obj(); + j.write_str("tac-FailedPCell-r12", failed_pcell_id_v1250->tac_failed_pcell_r12.to_string()); + j.end_obj(); + } + if (meas_result_last_serv_cell_v1250_present) { + j.write_int("measResultLastServCell-v1250", meas_result_last_serv_cell_v1250); + } + if (last_serv_cell_rsrq_type_r12_present) { + j.write_fieldname("lastServCellRSRQ-Type-r12"); + last_serv_cell_rsrq_type_r12->to_json(j); + } + if (meas_result_list_eutra_v1250_present) { + j.start_array("measResultListEUTRA-v1250"); + for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1250->size(); ++i1) { + ((*meas_result_list_eutra_v1250)[i1]).to_json(j); + } + j.end_array(); + } + if (drb_established_with_qci_minus1_r13_present) { + j.write_str("drb-EstablishedWithQCI-1-r13", "qci1"); + } + if (meas_result_last_serv_cell_v1360_present) { + j.write_int("measResultLastServCell-v1360", meas_result_last_serv_cell_v1360); + } + if (log_meas_result_list_bt_r15_present) { + j.start_array("logMeasResultListBT-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { + ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (log_meas_result_list_wlan_r15_present) { + j.start_array("logMeasResultListWLAN-r15"); + for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { + ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +rlf_report_r9_s::meas_result_last_serv_cell_r9_s_::meas_result_last_serv_cell_r9_s_() +{ + rsrq_result_r9_present = false; +} + +rlf_report_r9_s::meas_result_neigh_cells_r9_s_::meas_result_neigh_cells_r9_s_() +{ + meas_result_list_eutra_r9_present = false; + meas_result_list_utra_r9_present = false; + meas_result_list_geran_r9_present = false; + meas_results_cdma2000_r9_present = false; +} + +void rlf_report_r9_s::failed_pcell_id_r10_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r10: + c.destroy(); + break; + case types::pci_arfcn_r10: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r9_s::failed_pcell_id_r10_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r10: + c.init(); + break; + case types::pci_arfcn_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::failed_pcell_id_r10_c_"); + } +} +rlf_report_r9_s::failed_pcell_id_r10_c_::failed_pcell_id_r10_c_(const rlf_report_r9_s::failed_pcell_id_r10_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r10: + c.init(other.c.get()); + break; + case types::pci_arfcn_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::failed_pcell_id_r10_c_"); + } +} +rlf_report_r9_s::failed_pcell_id_r10_c_& rlf_report_r9_s::failed_pcell_id_r10_c_:: + operator=(const rlf_report_r9_s::failed_pcell_id_r10_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r10: + c.set(other.c.get()); + break; + case types::pci_arfcn_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::failed_pcell_id_r10_c_"); + } + + return *this; +} +void rlf_report_r9_s::failed_pcell_id_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r10: + j.write_fieldname("cellGlobalId-r10"); + c.get().to_json(j); + break; + case types::pci_arfcn_r10: + j.write_fieldname("pci-arfcn-r10"); + j.start_obj(); + j.write_int("physCellId-r10", c.get().pci_r10); + j.write_int("carrierFreq-r10", c.get().carrier_freq_r10); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::failed_pcell_id_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r9_s::failed_pcell_id_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::cell_global_id_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r10: + HANDLE_CODE(pack_unalign_integer(bref, c.get().pci_r10, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().carrier_freq_r10, (uint16_t)0, (uint16_t)65535)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::failed_pcell_id_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r9_s::failed_pcell_id_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::cell_global_id_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r10: + HANDLE_CODE(unpack_unalign_integer(c.get().pci_r10, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE( + unpack_unalign_integer(c.get().carrier_freq_r10, bref, (uint16_t)0, (uint16_t)65535)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::failed_pcell_id_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +rlf_report_r9_s::prev_utra_cell_id_r11_s_::prev_utra_cell_id_r11_s_() +{ + cell_global_id_r11_present = false; +} + +void rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::destroy_() {} +void rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::pci_r11_c_( + const rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r11: + c.init(other.c.get()); + break; + case types::tdd_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_"); + } +} +rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_& rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_:: + operator=(const rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r11: + c.set(other.c.get()); + break; + case types::tdd_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_"); + } + + return *this; +} +void rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r11: + j.write_int("fdd-r11", c.get()); + break; + case types::tdd_r11: + j.write_int("tdd-r11", c.get()); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r11: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::tdd_r11: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r11: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::tdd_r11: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::destroy_() {} +void rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::pci_r11_c_( + const rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd_r11: + c.init(other.c.get()); + break; + case types::tdd_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_"); + } +} +rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_& rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_:: + operator=(const rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd_r11: + c.set(other.c.get()); + break; + case types::tdd_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_"); + } + + return *this; +} +void rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd_r11: + j.write_int("fdd-r11", c.get()); + break; + case types::tdd_r11: + j.write_int("tdd-r11", c.get()); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd_r11: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::tdd_r11: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd_r11: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::tdd_r11: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReconfigurationComplete-v8a0-IEs ::= SEQUENCE +rrc_conn_recfg_complete_v8a0_ies_s::rrc_conn_recfg_complete_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_complete_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_recfg_complete_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-v920-IEs ::= SEQUENCE +rrc_conn_reest_complete_v920_ies_s::rrc_conn_reest_complete_v920_ies_s() +{ + rlf_info_available_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rlf_info_available_r9_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_conn_reest_complete_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rlf_info_available_r9_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_conn_reest_complete_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rlf_info_available_r9_present) { + j.write_str("rlf-InfoAvailable-r9", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionResumeComplete-v1530-IEs ::= SEQUENCE +rrc_conn_resume_complete_v1530_ies_s::rrc_conn_resume_complete_v1530_ies_s() +{ + log_meas_available_bt_r15_present = false; + log_meas_available_wlan_r15_present = false; + idle_meas_available_r15_present = false; + flight_path_info_available_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_resume_complete_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(idle_meas_available_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_complete_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(log_meas_available_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(idle_meas_available_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_info_available_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_complete_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_bt_r15_present) { + j.write_str("logMeasAvailableBT-r15", "true"); + } + if (log_meas_available_wlan_r15_present) { + j.write_str("logMeasAvailableWLAN-r15", "true"); + } + if (idle_meas_available_r15_present) { + j.write_str("idleMeasAvailable-r15", "true"); + } + if (flight_path_info_available_r15_present) { + j.write_str("flightPathInfoAvailable-r15", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-v8a0-IEs ::= SEQUENCE +rrc_conn_setup_complete_v8a0_ies_s::rrc_conn_setup_complete_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RegisteredMME ::= SEQUENCE +registered_mme_s::registered_mme_s() +{ + plmn_id_present = false; +} +SRSASN_CODE registered_mme_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(mmegi.pack(bref)); + HANDLE_CODE(mmec.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE registered_mme_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_present, 1)); + + if (plmn_id_present) { + HANDLE_CODE(plmn_id.unpack(bref)); + } + HANDLE_CODE(mmegi.unpack(bref)); + HANDLE_CODE(mmec.unpack(bref)); + + return SRSASN_SUCCESS; +} +void registered_mme_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("mmegi", mmegi.to_string()); + j.write_str("mmec", mmec.to_string()); + j.end_obj(); +} + +// SCGFailureInformation-v1310-IEs ::= SEQUENCE +scg_fail_info_v1310_ies_s::scg_fail_info_v1310_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_fail_info_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SecurityModeComplete-v8a0-IEs ::= SEQUENCE +security_mode_complete_v8a0_ies_s::security_mode_complete_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE security_mode_complete_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_complete_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void security_mode_complete_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SecurityModeFailure-v8a0-IEs ::= SEQUENCE +security_mode_fail_v8a0_ies_s::security_mode_fail_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE security_mode_fail_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_fail_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void security_mode_fail_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SidelinkUEInformation-v1310-IEs ::= SEQUENCE +sidelink_ue_info_v1310_ies_s::sidelink_ue_info_v1310_ies_s() +{ + comm_tx_res_req_uc_r13_present = false; + comm_tx_res_info_req_relay_r13_present = false; + disc_tx_res_req_v1310_present = false; + disc_tx_res_req_ps_r13_present = false; + disc_rx_gap_req_r13_present = false; + disc_tx_gap_req_r13_present = false; + disc_sys_info_report_freq_list_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sidelink_ue_info_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(comm_tx_res_req_uc_r13_present, 1)); + HANDLE_CODE(bref.pack(comm_tx_res_info_req_relay_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_res_req_v1310_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_res_req_ps_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_rx_gap_req_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_gap_req_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_sys_info_report_freq_list_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (comm_tx_res_req_uc_r13_present) { + HANDLE_CODE(comm_tx_res_req_uc_r13.pack(bref)); + } + if (comm_tx_res_info_req_relay_r13_present) { + HANDLE_CODE(bref.pack(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13_present, 1)); + HANDLE_CODE(bref.pack(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13_present, 1)); + if (comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13_present) { + HANDLE_CODE(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13.pack(bref)); + } + if (comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13_present) { + HANDLE_CODE(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, comm_tx_res_info_req_relay_r13.ue_type_r13)); + } + if (disc_tx_res_req_v1310_present) { + HANDLE_CODE(bref.pack(disc_tx_res_req_v1310.carrier_freq_disc_tx_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13_present, 1)); + if (disc_tx_res_req_v1310.carrier_freq_disc_tx_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_tx_res_req_v1310.carrier_freq_disc_tx_r13, (uint8_t)1, (uint8_t)8)); + } + if (disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13, 1, 8)); + } + } + if (disc_tx_res_req_ps_r13_present) { + HANDLE_CODE(disc_tx_res_req_ps_r13.pack(bref)); + } + if (disc_rx_gap_req_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_rx_gap_req_r13, 1, 8)); + } + if (disc_tx_gap_req_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_tx_gap_req_r13, 1, 8)); + } + if (disc_sys_info_report_freq_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_sys_info_report_freq_list_r13, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(comm_tx_res_req_uc_r13_present, 1)); + HANDLE_CODE(bref.unpack(comm_tx_res_info_req_relay_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_res_req_v1310_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_res_req_ps_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_rx_gap_req_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_gap_req_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_sys_info_report_freq_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (comm_tx_res_req_uc_r13_present) { + HANDLE_CODE(comm_tx_res_req_uc_r13.unpack(bref)); + } + if (comm_tx_res_info_req_relay_r13_present) { + HANDLE_CODE(bref.unpack(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13_present, 1)); + HANDLE_CODE(bref.unpack(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13_present, 1)); + if (comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13_present) { + HANDLE_CODE(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13.unpack(bref)); + } + if (comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13_present) { + HANDLE_CODE(comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13.unpack(bref)); + } + HANDLE_CODE(unpack_enum(comm_tx_res_info_req_relay_r13.ue_type_r13, bref)); + } + if (disc_tx_res_req_v1310_present) { + HANDLE_CODE(bref.unpack(disc_tx_res_req_v1310.carrier_freq_disc_tx_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13_present, 1)); + if (disc_tx_res_req_v1310.carrier_freq_disc_tx_r13_present) { + HANDLE_CODE(unpack_unalign_integer(disc_tx_res_req_v1310.carrier_freq_disc_tx_r13, bref, (uint8_t)1, (uint8_t)8)); + } + if (disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13, bref, 1, 8)); + } + } + if (disc_tx_res_req_ps_r13_present) { + HANDLE_CODE(disc_tx_res_req_ps_r13.unpack(bref)); + } + if (disc_rx_gap_req_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_rx_gap_req_r13, bref, 1, 8)); + } + if (disc_tx_gap_req_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_tx_gap_req_r13, bref, 1, 8)); + } + if (disc_sys_info_report_freq_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_sys_info_report_freq_list_r13, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sidelink_ue_info_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (comm_tx_res_req_uc_r13_present) { + j.write_fieldname("commTxResourceReqUC-r13"); + comm_tx_res_req_uc_r13.to_json(j); + } + if (comm_tx_res_info_req_relay_r13_present) { + j.write_fieldname("commTxResourceInfoReqRelay-r13"); + j.start_obj(); + if (comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13_present) { + j.write_fieldname("commTxResourceReqRelay-r13"); + comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_r13.to_json(j); + } + if (comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13_present) { + j.write_fieldname("commTxResourceReqRelayUC-r13"); + comm_tx_res_info_req_relay_r13.comm_tx_res_req_relay_uc_r13.to_json(j); + } + j.write_str("ue-Type-r13", comm_tx_res_info_req_relay_r13.ue_type_r13.to_string()); + j.end_obj(); + } + if (disc_tx_res_req_v1310_present) { + j.write_fieldname("discTxResourceReq-v1310"); + j.start_obj(); + if (disc_tx_res_req_v1310.carrier_freq_disc_tx_r13_present) { + j.write_int("carrierFreqDiscTx-r13", disc_tx_res_req_v1310.carrier_freq_disc_tx_r13); + } + if (disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13_present) { + j.start_array("discTxResourceReqAddFreq-r13"); + for (uint32_t i1 = 0; i1 < disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13.size(); ++i1) { + disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (disc_tx_res_req_ps_r13_present) { + j.write_fieldname("discTxResourceReqPS-r13"); + disc_tx_res_req_ps_r13.to_json(j); + } + if (disc_rx_gap_req_r13_present) { + j.start_array("discRxGapReq-r13"); + for (uint32_t i1 = 0; i1 < disc_rx_gap_req_r13.size(); ++i1) { + disc_rx_gap_req_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_tx_gap_req_r13_present) { + j.start_array("discTxGapReq-r13"); + for (uint32_t i1 = 0; i1 < disc_tx_gap_req_r13.size(); ++i1) { + disc_tx_gap_req_r13[i1].to_json(j); + } + j.end_array(); + } + if (disc_sys_info_report_freq_list_r13_present) { + j.start_array("discSysInfoReportFreqList-r13"); + for (uint32_t i1 = 0; i1 < disc_sys_info_report_freq_list_r13.size(); ++i1) { + disc_sys_info_report_freq_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +sidelink_ue_info_v1310_ies_s::comm_tx_res_info_req_relay_r13_s_::comm_tx_res_info_req_relay_r13_s_() +{ + comm_tx_res_req_relay_r13_present = false; + comm_tx_res_req_relay_uc_r13_present = false; +} + +sidelink_ue_info_v1310_ies_s::disc_tx_res_req_v1310_s_::disc_tx_res_req_v1310_s_() +{ + carrier_freq_disc_tx_r13_present = false; + disc_tx_res_req_add_freq_r13_present = false; +} + +// TDM-AssistanceInfo-r11 ::= CHOICE +void tdm_assist_info_r11_c::destroy_() +{ + switch (type_) { + case types::drx_assist_info_r11: + c.destroy(); + break; + case types::idc_sf_pattern_list_r11: + c.destroy(); + break; + default: + break; + } +} +void tdm_assist_info_r11_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::drx_assist_info_r11: + c.init(); + break; + case types::idc_sf_pattern_list_r11: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tdm_assist_info_r11_c"); + } +} +tdm_assist_info_r11_c::tdm_assist_info_r11_c(const tdm_assist_info_r11_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::drx_assist_info_r11: + c.init(other.c.get()); + break; + case types::idc_sf_pattern_list_r11: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tdm_assist_info_r11_c"); + } +} +tdm_assist_info_r11_c& tdm_assist_info_r11_c::operator=(const tdm_assist_info_r11_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::drx_assist_info_r11: + c.set(other.c.get()); + break; + case types::idc_sf_pattern_list_r11: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tdm_assist_info_r11_c"); + } + + return *this; +} +void tdm_assist_info_r11_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::drx_assist_info_r11: + j.write_fieldname("drx-AssistanceInfo-r11"); + j.start_obj(); + j.write_str("drx-CycleLength-r11", c.get().drx_cycle_len_r11.to_string()); + if (c.get().drx_offset_r11_present) { + j.write_int("drx-Offset-r11", c.get().drx_offset_r11); + } + j.write_str("drx-ActiveTime-r11", c.get().drx_active_time_r11.to_string()); + j.end_obj(); + break; + case types::idc_sf_pattern_list_r11: + j.start_array("idc-SubframePatternList-r11"); + for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { + c.get()[i1].to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "tdm_assist_info_r11_c"); + } + j.end_obj(); +} +SRSASN_CODE tdm_assist_info_r11_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::drx_assist_info_r11: + HANDLE_CODE(bref.pack(c.get().drx_offset_r11_present, 1)); + HANDLE_CODE(pack_enum(bref, c.get().drx_cycle_len_r11)); + if (c.get().drx_offset_r11_present) { + HANDLE_CODE( + pack_unalign_integer(bref, c.get().drx_offset_r11, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(pack_enum(bref, c.get().drx_active_time_r11)); + break; + case types::idc_sf_pattern_list_r11: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + default: + log_invalid_choice_id(type_, "tdm_assist_info_r11_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tdm_assist_info_r11_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::drx_assist_info_r11: + HANDLE_CODE(bref.unpack(c.get().drx_offset_r11_present, 1)); + HANDLE_CODE(unpack_enum(c.get().drx_cycle_len_r11, bref)); + if (c.get().drx_offset_r11_present) { + HANDLE_CODE( + unpack_unalign_integer(c.get().drx_offset_r11, bref, (uint8_t)0, (uint8_t)255)); + } + HANDLE_CODE(unpack_enum(c.get().drx_active_time_r11, bref)); + break; + case types::idc_sf_pattern_list_r11: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "tdm_assist_info_r11_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_assist_info_r11_s_() +{ + drx_offset_r11_present = false; +} + +// UEAssistanceInformation-v1430-IEs ::= SEQUENCE +ueassist_info_v1430_ies_s::ueassist_info_v1430_ies_s() +{ + bw_pref_r14_present = false; + sps_assist_info_r14_present = false; + rlm_report_r14_present = false; + delay_budget_report_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ueassist_info_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(bw_pref_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_assist_info_r14_present, 1)); + HANDLE_CODE(bref.pack(rlm_report_r14_present, 1)); + HANDLE_CODE(bref.pack(delay_budget_report_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (bw_pref_r14_present) { + HANDLE_CODE(bw_pref_r14.pack(bref)); + } + if (sps_assist_info_r14_present) { + HANDLE_CODE(bref.pack(sps_assist_info_r14.traffic_pattern_info_list_sl_r14_present, 1)); + HANDLE_CODE(bref.pack(sps_assist_info_r14.traffic_pattern_info_list_ul_r14_present, 1)); + if (sps_assist_info_r14.traffic_pattern_info_list_sl_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_assist_info_r14.traffic_pattern_info_list_sl_r14, 1, 8)); + } + if (sps_assist_info_r14.traffic_pattern_info_list_ul_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_assist_info_r14.traffic_pattern_info_list_ul_r14, 1, 8)); + } + } + if (rlm_report_r14_present) { + HANDLE_CODE(bref.pack(rlm_report_r14.excess_rep_mpdcch_r14_present, 1)); + HANDLE_CODE(pack_enum(bref, rlm_report_r14.rlm_event_r14)); + if (rlm_report_r14.excess_rep_mpdcch_r14_present) { + HANDLE_CODE(pack_enum(bref, rlm_report_r14.excess_rep_mpdcch_r14)); + } + } + if (delay_budget_report_r14_present) { + HANDLE_CODE(delay_budget_report_r14.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(bw_pref_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_assist_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(rlm_report_r14_present, 1)); + HANDLE_CODE(bref.unpack(delay_budget_report_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (bw_pref_r14_present) { + HANDLE_CODE(bw_pref_r14.unpack(bref)); + } + if (sps_assist_info_r14_present) { + HANDLE_CODE(bref.unpack(sps_assist_info_r14.traffic_pattern_info_list_sl_r14_present, 1)); + HANDLE_CODE(bref.unpack(sps_assist_info_r14.traffic_pattern_info_list_ul_r14_present, 1)); + if (sps_assist_info_r14.traffic_pattern_info_list_sl_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_assist_info_r14.traffic_pattern_info_list_sl_r14, bref, 1, 8)); + } + if (sps_assist_info_r14.traffic_pattern_info_list_ul_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_assist_info_r14.traffic_pattern_info_list_ul_r14, bref, 1, 8)); + } + } + if (rlm_report_r14_present) { + HANDLE_CODE(bref.unpack(rlm_report_r14.excess_rep_mpdcch_r14_present, 1)); + HANDLE_CODE(unpack_enum(rlm_report_r14.rlm_event_r14, bref)); + if (rlm_report_r14.excess_rep_mpdcch_r14_present) { + HANDLE_CODE(unpack_enum(rlm_report_r14.excess_rep_mpdcch_r14, bref)); + } + } + if (delay_budget_report_r14_present) { + HANDLE_CODE(delay_budget_report_r14.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ueassist_info_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (bw_pref_r14_present) { + j.write_fieldname("bw-Preference-r14"); + bw_pref_r14.to_json(j); + } + if (sps_assist_info_r14_present) { + j.write_fieldname("sps-AssistanceInformation-r14"); + j.start_obj(); + if (sps_assist_info_r14.traffic_pattern_info_list_sl_r14_present) { + j.start_array("trafficPatternInfoListSL-r14"); + for (uint32_t i1 = 0; i1 < sps_assist_info_r14.traffic_pattern_info_list_sl_r14.size(); ++i1) { + sps_assist_info_r14.traffic_pattern_info_list_sl_r14[i1].to_json(j); + } + j.end_array(); + } + if (sps_assist_info_r14.traffic_pattern_info_list_ul_r14_present) { + j.start_array("trafficPatternInfoListUL-r14"); + for (uint32_t i1 = 0; i1 < sps_assist_info_r14.traffic_pattern_info_list_ul_r14.size(); ++i1) { + sps_assist_info_r14.traffic_pattern_info_list_ul_r14[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (rlm_report_r14_present) { + j.write_fieldname("rlm-Report-r14"); + j.start_obj(); + j.write_str("rlm-Event-r14", rlm_report_r14.rlm_event_r14.to_string()); + if (rlm_report_r14.excess_rep_mpdcch_r14_present) { + j.write_str("excessRep-MPDCCH-r14", rlm_report_r14.excess_rep_mpdcch_r14.to_string()); + } + j.end_obj(); + } + if (delay_budget_report_r14_present) { + j.write_fieldname("delayBudgetReport-r14"); + delay_budget_report_r14.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +ueassist_info_v1430_ies_s::sps_assist_info_r14_s_::sps_assist_info_r14_s_() +{ + traffic_pattern_info_list_sl_r14_present = false; + traffic_pattern_info_list_ul_r14_present = false; +} + +ueassist_info_v1430_ies_s::rlm_report_r14_s_::rlm_report_r14_s_() +{ + excess_rep_mpdcch_r14_present = false; +} + +// UECapabilityInformation-v8a0-IEs ::= SEQUENCE +ue_cap_info_v8a0_ies_s::ue_cap_info_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_info_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_info_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationResponse-v930-IEs ::= SEQUENCE +ue_info_resp_v930_ies_s::ue_info_resp_v930_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_v930_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v930_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v930_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// ULHandoverPreparationTransfer-v8a0-IEs ::= SEQUENCE +ul_ho_prep_transfer_v8a0_ies_s::ul_ho_prep_transfer_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ul_ho_prep_transfer_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ho_prep_transfer_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_ho_prep_transfer_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// ULInformationTransfer-v8a0-IEs ::= SEQUENCE +ul_info_transfer_v8a0_ies_s::ul_info_transfer_v8a0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ul_info_transfer_v8a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_v8a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_info_transfer_v8a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// WLANConnectionStatusReport-v1430-IEs ::= SEQUENCE +wlan_conn_status_report_v1430_ies_s::wlan_conn_status_report_v1430_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE wlan_conn_status_report_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, wlan_status_v1430)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_conn_status_report_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(wlan_status_v1430, bref)); + + return SRSASN_SUCCESS; +} +void wlan_conn_status_report_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("wlan-Status-v1430", wlan_status_v1430.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CSFBParametersRequestCDMA2000-r8-IEs ::= SEQUENCE +csfb_params_request_cdma2000_r8_ies_s::csfb_params_request_cdma2000_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE csfb_params_request_cdma2000_r8_ies_s::pack(bit_ref& bref) const +{ + 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 csfb_params_request_cdma2000_r8_ies_s::unpack(bit_ref& bref) +{ + 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 csfb_params_request_cdma2000_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CounterCheckResponse-r8-IEs ::= SEQUENCE +counter_check_resp_r8_ies_s::counter_check_resp_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE counter_check_resp_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, drb_count_info_list, 0, 11)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_resp_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(drb_count_info_list, bref, 0, 11)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void counter_check_resp_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("drb-CountInfoList"); + for (uint32_t i1 = 0; i1 < drb_count_info_list.size(); ++i1) { + drb_count_info_list[i1].to_json(j); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// FailedLogicalChannelInfo-r15 ::= SEQUENCE +SRSASN_CODE failed_lc_ch_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(failed_lc_ch_id_r15.lc_ch_id_r15_present, 1)); + HANDLE_CODE(bref.pack(failed_lc_ch_id_r15.lc_ch_id_ext_r15_present, 1)); + HANDLE_CODE(pack_enum(bref, failed_lc_ch_id_r15.cell_group_ind_r15)); + if (failed_lc_ch_id_r15.lc_ch_id_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, failed_lc_ch_id_r15.lc_ch_id_r15, (uint8_t)1, (uint8_t)10)); + } + if (failed_lc_ch_id_r15.lc_ch_id_ext_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, failed_lc_ch_id_r15.lc_ch_id_ext_r15, (uint8_t)32, (uint8_t)38)); + } + HANDLE_CODE(pack_enum(bref, fail_type)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE failed_lc_ch_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(failed_lc_ch_id_r15.lc_ch_id_r15_present, 1)); + HANDLE_CODE(bref.unpack(failed_lc_ch_id_r15.lc_ch_id_ext_r15_present, 1)); + HANDLE_CODE(unpack_enum(failed_lc_ch_id_r15.cell_group_ind_r15, bref)); + if (failed_lc_ch_id_r15.lc_ch_id_r15_present) { + HANDLE_CODE(unpack_unalign_integer(failed_lc_ch_id_r15.lc_ch_id_r15, bref, (uint8_t)1, (uint8_t)10)); + } + if (failed_lc_ch_id_r15.lc_ch_id_ext_r15_present) { + HANDLE_CODE(unpack_unalign_integer(failed_lc_ch_id_r15.lc_ch_id_ext_r15, bref, (uint8_t)32, (uint8_t)38)); + } + HANDLE_CODE(unpack_enum(fail_type, bref)); + + return SRSASN_SUCCESS; +} +void failed_lc_ch_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("failedLogicalChannelIdentity-r15"); + j.start_obj(); + j.write_str("cellGroupIndication-r15", failed_lc_ch_id_r15.cell_group_ind_r15.to_string()); + if (failed_lc_ch_id_r15.lc_ch_id_r15_present) { + j.write_int("logicalChannelIdentity-r15", failed_lc_ch_id_r15.lc_ch_id_r15); + } + if (failed_lc_ch_id_r15.lc_ch_id_ext_r15_present) { + j.write_int("logicalChannelIdentityExt-r15", failed_lc_ch_id_r15.lc_ch_id_ext_r15); + } + j.end_obj(); + j.write_str("failureType", fail_type.to_string()); + j.end_obj(); +} + +failed_lc_ch_info_r15_s::failed_lc_ch_id_r15_s_::failed_lc_ch_id_r15_s_() +{ + lc_ch_id_r15_present = false; + lc_ch_id_ext_r15_present = false; +} + +// InDeviceCoexIndication-r11-IEs ::= SEQUENCE +in_dev_coex_ind_r11_ies_s::in_dev_coex_ind_r11_ies_s() +{ + affected_carrier_freq_list_r11_present = false; + tdm_assist_info_r11_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE in_dev_coex_ind_r11_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(affected_carrier_freq_list_r11_present, 1)); + HANDLE_CODE(bref.pack(tdm_assist_info_r11_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (affected_carrier_freq_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_list_r11, 1, 32)); + } + if (tdm_assist_info_r11_present) { + HANDLE_CODE(tdm_assist_info_r11.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_r11_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(affected_carrier_freq_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(tdm_assist_info_r11_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (affected_carrier_freq_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_list_r11, bref, 1, 32)); + } + if (tdm_assist_info_r11_present) { + HANDLE_CODE(tdm_assist_info_r11.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 in_dev_coex_ind_r11_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (affected_carrier_freq_list_r11_present) { + j.start_array("affectedCarrierFreqList-r11"); + for (uint32_t i1 = 0; i1 < affected_carrier_freq_list_r11.size(); ++i1) { + affected_carrier_freq_list_r11[i1].to_json(j); + } + j.end_array(); + } + if (tdm_assist_info_r11_present) { + j.write_fieldname("tdm-AssistanceInfo-r11"); + tdm_assist_info_r11.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// InterFreqRSTDMeasurementIndication-r10-IEs ::= SEQUENCE +inter_freq_rstd_meas_ind_r10_ies_s::inter_freq_rstd_meas_ind_r10_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(rstd_inter_freq_ind_r10.pack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(rstd_inter_freq_ind_r10.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_rstd_meas_ind_r10_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rstd-InterFreqIndication-r10"); + rstd_inter_freq_ind_r10.to_json(j); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +void inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::set(types::options e) +{ + type_ = e; +} +void inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::start: + j.write_fieldname("start"); + j.start_obj(); + j.start_array("rstd-InterFreqInfoList-r10"); + for (uint32_t i1 = 0; i1 < c.rstd_inter_freq_info_list_r10.size(); ++i1) { + c.rstd_inter_freq_info_list_r10[i1].to_json(j); + } + j.end_array(); + j.end_obj(); + break; + case types::stop: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_"); + } + j.end_obj(); +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::start: + HANDLE_CODE(pack_dyn_seq_of(bref, c.rstd_inter_freq_info_list_r10, 1, 3)); + break; + case types::stop: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::start: + HANDLE_CODE(unpack_dyn_seq_of(c.rstd_inter_freq_info_list_r10, bref, 1, 3)); + break; + case types::stop: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MBMSCountingResponse-r10-IEs ::= SEQUENCE +mbms_count_resp_r10_ies_s::mbms_count_resp_r10_ies_s() +{ + mbsfn_area_idx_r10_present = false; + count_resp_list_r10_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mbms_count_resp_r10_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbsfn_area_idx_r10_present, 1)); + HANDLE_CODE(bref.pack(count_resp_list_r10_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mbsfn_area_idx_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, mbsfn_area_idx_r10, (uint8_t)0, (uint8_t)7)); + } + if (count_resp_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, count_resp_list_r10, 1, 16)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_count_resp_r10_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbsfn_area_idx_r10_present, 1)); + HANDLE_CODE(bref.unpack(count_resp_list_r10_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mbsfn_area_idx_r10_present) { + HANDLE_CODE(unpack_unalign_integer(mbsfn_area_idx_r10, bref, (uint8_t)0, (uint8_t)7)); + } + if (count_resp_list_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(count_resp_list_r10, bref, 1, 16)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mbms_count_resp_r10_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbsfn_area_idx_r10_present) { + j.write_int("mbsfn-AreaIndex-r10", mbsfn_area_idx_r10); + } + if (count_resp_list_r10_present) { + j.start_array("countingResponseList-r10"); + for (uint32_t i1 = 0; i1 < count_resp_list_r10.size(); ++i1) { + count_resp_list_r10[i1].to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// MBMSInterestIndication-r11-IEs ::= SEQUENCE +mbms_interest_ind_r11_ies_s::mbms_interest_ind_r11_ies_s() +{ + mbms_freq_list_r11_present = false; + mbms_prio_r11_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE mbms_interest_ind_r11_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbms_freq_list_r11_present, 1)); + HANDLE_CODE(bref.pack(mbms_prio_r11_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mbms_freq_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbms_freq_list_r11, 1, 5, UnalignedIntegerPacker(0, 262143))); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_interest_ind_r11_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbms_freq_list_r11_present, 1)); + HANDLE_CODE(bref.unpack(mbms_prio_r11_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mbms_freq_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbms_freq_list_r11, bref, 1, 5, UnalignedIntegerPacker(0, 262143))); + } + 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 mbms_interest_ind_r11_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbms_freq_list_r11_present) { + j.start_array("mbms-FreqList-r11"); + for (uint32_t i1 = 0; i1 < mbms_freq_list_r11.size(); ++i1) { + j.write_int(mbms_freq_list_r11[i1]); + } + j.end_array(); + } + if (mbms_prio_r11_present) { + j.write_str("mbms-Priority-r11", "true"); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MeasReportAppLayer-r15-IEs ::= SEQUENCE +meas_report_app_layer_r15_ies_s::meas_report_app_layer_r15_ies_s() +{ + meas_report_app_layer_container_r15_present = false; + service_type_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE meas_report_app_layer_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_report_app_layer_container_r15_present, 1)); + HANDLE_CODE(bref.pack(service_type_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_report_app_layer_container_r15_present) { + HANDLE_CODE(meas_report_app_layer_container_r15.pack(bref)); + } + if (service_type_present) { + HANDLE_CODE(pack_enum(bref, service_type)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_app_layer_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_report_app_layer_container_r15_present, 1)); + HANDLE_CODE(bref.unpack(service_type_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_report_app_layer_container_r15_present) { + HANDLE_CODE(meas_report_app_layer_container_r15.unpack(bref)); + } + if (service_type_present) { + HANDLE_CODE(unpack_enum(service_type, bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_app_layer_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_report_app_layer_container_r15_present) { + j.write_str("measReportAppLayerContainer-r15", meas_report_app_layer_container_r15.to_string()); + } + if (service_type_present) { + j.write_str("serviceType", service_type.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// MeasurementReport-r8-IEs ::= SEQUENCE +meas_report_r8_ies_s::meas_report_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE meas_report_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_results.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_results.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResults"); + meas_results.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// ProximityIndication-r9-IEs ::= SEQUENCE +proximity_ind_r9_ies_s::proximity_ind_r9_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE proximity_ind_r9_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, type_r9)); + HANDLE_CODE(carrier_freq_r9.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE proximity_ind_r9_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(type_r9, bref)); + HANDLE_CODE(carrier_freq_r9.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void proximity_ind_r9_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("type-r9", type_r9.to_string()); + j.write_fieldname("carrierFreq-r9"); + carrier_freq_r9.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void proximity_ind_r9_ies_s::carrier_freq_r9_c_::destroy_() {} +void proximity_ind_r9_ies_s::carrier_freq_r9_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +proximity_ind_r9_ies_s::carrier_freq_r9_c_::carrier_freq_r9_c_(const proximity_ind_r9_ies_s::carrier_freq_r9_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::eutra_r9: + c.init(other.c.get()); + break; + case types::utra_r9: + c.init(other.c.get()); + break; + case types::eutra2_v9e0: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_ies_s::carrier_freq_r9_c_"); + } +} +proximity_ind_r9_ies_s::carrier_freq_r9_c_& proximity_ind_r9_ies_s::carrier_freq_r9_c_:: + operator=(const proximity_ind_r9_ies_s::carrier_freq_r9_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::eutra_r9: + c.set(other.c.get()); + break; + case types::utra_r9: + c.set(other.c.get()); + break; + case types::eutra2_v9e0: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_ies_s::carrier_freq_r9_c_"); + } + + return *this; +} +void proximity_ind_r9_ies_s::carrier_freq_r9_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::eutra_r9: + j.write_int("eutra-r9", c.get()); + break; + case types::utra_r9: + j.write_int("utra-r9", c.get()); + break; + case types::eutra2_v9e0: + j.write_int("eutra2-v9e0", c.get()); + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_ies_s::carrier_freq_r9_c_"); + } + j.end_obj(); +} +SRSASN_CODE proximity_ind_r9_ies_s::carrier_freq_r9_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::eutra_r9: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)65535)); + break; + case types::utra_r9: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)16383)); + break; + case types::eutra2_v9e0: { + varlength_field_pack_guard scope(bref); + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint32_t)65536, (uint32_t)262143)); + } break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_ies_s::carrier_freq_r9_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE proximity_ind_r9_ies_s::carrier_freq_r9_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::eutra_r9: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)65535)); + break; + case types::utra_r9: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)16383)); + break; + case types::eutra2_v9e0: { + varlength_field_unpack_guard scope(bref); + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint32_t)65536, (uint32_t)262143)); + } break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_ies_s::carrier_freq_r9_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RNReconfigurationComplete-r10-IEs ::= SEQUENCE +rn_recfg_complete_r10_ies_s::rn_recfg_complete_r10_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rn_recfg_complete_r10_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_complete_r10_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rn_recfg_complete_r10_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCConnectionReconfigurationComplete-r8-IEs ::= SEQUENCE +rrc_conn_recfg_complete_r8_ies_s::rrc_conn_recfg_complete_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_recfg_complete_r8_ies_s::pack(bit_ref& bref) const +{ + 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_conn_recfg_complete_r8_ies_s::unpack(bit_ref& bref) +{ + 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_conn_recfg_complete_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionReestablishmentComplete-r8-IEs ::= SEQUENCE +rrc_conn_reest_complete_r8_ies_s::rrc_conn_reest_complete_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_reest_complete_r8_ies_s::pack(bit_ref& bref) const +{ + 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_conn_reest_complete_r8_ies_s::unpack(bit_ref& bref) +{ + 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_conn_reest_complete_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionResumeComplete-r13-IEs ::= SEQUENCE +rrc_conn_resume_complete_r13_ies_s::rrc_conn_resume_complete_r13_ies_s() +{ + sel_plmn_id_r13_present = false; + ded_info_nas_r13_present = false; + rlf_info_available_r13_present = false; + log_meas_available_r13_present = false; + conn_est_fail_info_available_r13_present = false; + mob_state_r13_present = false; + mob_history_avail_r13_present = false; + log_meas_available_mbsfn_r13_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_resume_complete_r13_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sel_plmn_id_r13_present, 1)); + HANDLE_CODE(bref.pack(ded_info_nas_r13_present, 1)); + HANDLE_CODE(bref.pack(rlf_info_available_r13_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_r13_present, 1)); + HANDLE_CODE(bref.pack(conn_est_fail_info_available_r13_present, 1)); + HANDLE_CODE(bref.pack(mob_state_r13_present, 1)); + HANDLE_CODE(bref.pack(mob_history_avail_r13_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_mbsfn_r13_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sel_plmn_id_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, sel_plmn_id_r13, (uint8_t)1, (uint8_t)6)); + } + if (ded_info_nas_r13_present) { + HANDLE_CODE(ded_info_nas_r13.pack(bref)); + } + if (mob_state_r13_present) { + HANDLE_CODE(pack_enum(bref, mob_state_r13)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_complete_r13_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sel_plmn_id_r13_present, 1)); + HANDLE_CODE(bref.unpack(ded_info_nas_r13_present, 1)); + HANDLE_CODE(bref.unpack(rlf_info_available_r13_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_r13_present, 1)); + HANDLE_CODE(bref.unpack(conn_est_fail_info_available_r13_present, 1)); + HANDLE_CODE(bref.unpack(mob_state_r13_present, 1)); + HANDLE_CODE(bref.unpack(mob_history_avail_r13_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_mbsfn_r13_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sel_plmn_id_r13_present) { + HANDLE_CODE(unpack_unalign_integer(sel_plmn_id_r13, bref, (uint8_t)1, (uint8_t)6)); + } + if (ded_info_nas_r13_present) { + HANDLE_CODE(ded_info_nas_r13.unpack(bref)); + } + if (mob_state_r13_present) { + HANDLE_CODE(unpack_enum(mob_state_r13, 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_conn_resume_complete_r13_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sel_plmn_id_r13_present) { + j.write_int("selectedPLMN-Identity-r13", sel_plmn_id_r13); + } + if (ded_info_nas_r13_present) { + j.write_str("dedicatedInfoNAS-r13", ded_info_nas_r13.to_string()); + } + if (rlf_info_available_r13_present) { + j.write_str("rlf-InfoAvailable-r13", "true"); + } + if (log_meas_available_r13_present) { + j.write_str("logMeasAvailable-r13", "true"); + } + if (conn_est_fail_info_available_r13_present) { + j.write_str("connEstFailInfoAvailable-r13", "true"); + } + if (mob_state_r13_present) { + j.write_str("mobilityState-r13", mob_state_r13.to_string()); + } + if (mob_history_avail_r13_present) { + j.write_str("mobilityHistoryAvail-r13", "true"); + } + if (log_meas_available_mbsfn_r13_present) { + j.write_str("logMeasAvailableMBSFN-r13", "true"); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCConnectionSetupComplete-r8-IEs ::= SEQUENCE +rrc_conn_setup_complete_r8_ies_s::rrc_conn_setup_complete_r8_ies_s() +{ + registered_mme_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE rrc_conn_setup_complete_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(registered_mme_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, sel_plmn_id, (uint8_t)1, (uint8_t)6)); + if (registered_mme_present) { + HANDLE_CODE(registered_mme.pack(bref)); + } + HANDLE_CODE(ded_info_nas.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(registered_mme_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(sel_plmn_id, bref, (uint8_t)1, (uint8_t)6)); + if (registered_mme_present) { + HANDLE_CODE(registered_mme.unpack(bref)); + } + HANDLE_CODE(ded_info_nas.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_conn_setup_complete_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("selectedPLMN-Identity", sel_plmn_id); + if (registered_mme_present) { + j.write_fieldname("registeredMME"); + registered_mme.to_json(j); + } + j.write_str("dedicatedInfoNAS", ded_info_nas.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SCGFailureInformation-r12-IEs ::= SEQUENCE +scg_fail_info_r12_ies_s::scg_fail_info_r12_ies_s() +{ + fail_report_scg_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_fail_info_r12_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_report_scg_r12_present) { + HANDLE_CODE(fail_report_scg_r12.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_r12_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_report_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_scg_r12_present) { + HANDLE_CODE(fail_report_scg_r12.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_r12_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_report_scg_r12_present) { + j.write_fieldname("failureReportSCG-r12"); + fail_report_scg_r12.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SCGFailureInformationNR-r15-IEs ::= SEQUENCE +scg_fail_info_nr_r15_ies_s::scg_fail_info_nr_r15_ies_s() +{ + fail_report_scg_nr_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_fail_info_nr_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_scg_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_report_scg_nr_r15_present) { + HANDLE_CODE(fail_report_scg_nr_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_nr_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_report_scg_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_scg_nr_r15_present) { + HANDLE_CODE(fail_report_scg_nr_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_nr_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_report_scg_nr_r15_present) { + j.write_fieldname("failureReportSCG-NR-r15"); + fail_report_scg_nr_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SecurityModeComplete-r8-IEs ::= SEQUENCE +security_mode_complete_r8_ies_s::security_mode_complete_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE security_mode_complete_r8_ies_s::pack(bit_ref& bref) const +{ + 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 security_mode_complete_r8_ies_s::unpack(bit_ref& bref) +{ + 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 security_mode_complete_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SecurityModeFailure-r8-IEs ::= SEQUENCE +security_mode_fail_r8_ies_s::security_mode_fail_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE security_mode_fail_r8_ies_s::pack(bit_ref& bref) const +{ + 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 security_mode_fail_r8_ies_s::unpack(bit_ref& bref) +{ + 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 security_mode_fail_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SidelinkUEInformation-r12-IEs ::= SEQUENCE +sidelink_ue_info_r12_ies_s::sidelink_ue_info_r12_ies_s() +{ + comm_rx_interested_freq_r12_present = false; + comm_tx_res_req_r12_present = false; + disc_rx_interest_r12_present = false; + disc_tx_res_req_r12_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE sidelink_ue_info_r12_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(comm_rx_interested_freq_r12_present, 1)); + HANDLE_CODE(bref.pack(comm_tx_res_req_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_rx_interest_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_tx_res_req_r12_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (comm_rx_interested_freq_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, comm_rx_interested_freq_r12, (uint32_t)0, (uint32_t)262143)); + } + if (comm_tx_res_req_r12_present) { + HANDLE_CODE(comm_tx_res_req_r12.pack(bref)); + } + if (disc_tx_res_req_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, disc_tx_res_req_r12, (uint8_t)1, (uint8_t)63)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_r12_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(comm_rx_interested_freq_r12_present, 1)); + HANDLE_CODE(bref.unpack(comm_tx_res_req_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_rx_interest_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_tx_res_req_r12_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (comm_rx_interested_freq_r12_present) { + HANDLE_CODE(unpack_unalign_integer(comm_rx_interested_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + } + if (comm_tx_res_req_r12_present) { + HANDLE_CODE(comm_tx_res_req_r12.unpack(bref)); + } + if (disc_tx_res_req_r12_present) { + HANDLE_CODE(unpack_unalign_integer(disc_tx_res_req_r12, bref, (uint8_t)1, (uint8_t)63)); + } + 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_r12_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (comm_rx_interested_freq_r12_present) { + j.write_int("commRxInterestedFreq-r12", comm_rx_interested_freq_r12); + } + if (comm_tx_res_req_r12_present) { + j.write_fieldname("commTxResourceReq-r12"); + comm_tx_res_req_r12.to_json(j); + } + if (disc_rx_interest_r12_present) { + j.write_str("discRxInterest-r12", "true"); + } + if (disc_tx_res_req_r12_present) { + j.write_int("discTxResourceReq-r12", disc_tx_res_req_r12); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEAssistanceInformation-r11-IEs ::= SEQUENCE +ueassist_info_r11_ies_s::ueassist_info_r11_ies_s() +{ + pwr_pref_ind_r11_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ueassist_info_r11_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pwr_pref_ind_r11_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (pwr_pref_ind_r11_present) { + HANDLE_CODE(pack_enum(bref, pwr_pref_ind_r11)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_r11_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pwr_pref_ind_r11_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (pwr_pref_ind_r11_present) { + HANDLE_CODE(unpack_enum(pwr_pref_ind_r11, 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 ueassist_info_r11_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pwr_pref_ind_r11_present) { + j.write_str("powerPrefIndication-r11", pwr_pref_ind_r11.to_string()); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UECapabilityInformation-r8-IEs ::= SEQUENCE +ue_cap_info_r8_ies_s::ue_cap_info_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_cap_info_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_container_list, 0, 8)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(ue_cap_rat_container_list, bref, 0, 8)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_cap_info_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("ue-CapabilityRAT-ContainerList"); + for (uint32_t i1 = 0; i1 < ue_cap_rat_container_list.size(); ++i1) { + ue_cap_rat_container_list[i1].to_json(j); + } + j.end_array(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationResponse-r9-IEs ::= SEQUENCE +ue_info_resp_r9_ies_s::ue_info_resp_r9_ies_s() +{ + rach_report_r9_present = false; + rlf_report_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_info_resp_r9_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rach_report_r9_present, 1)); + HANDLE_CODE(bref.pack(rlf_report_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rach_report_r9_present) { + HANDLE_CODE(pack_unalign_integer(bref, rach_report_r9.nof_preambs_sent_r9, (uint8_t)1, (uint8_t)200)); + HANDLE_CODE(bref.pack(rach_report_r9.contention_detected_r9, 1)); + } + if (rlf_report_r9_present) { + HANDLE_CODE(rlf_report_r9.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_r9_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rach_report_r9_present, 1)); + HANDLE_CODE(bref.unpack(rlf_report_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rach_report_r9_present) { + HANDLE_CODE(unpack_unalign_integer(rach_report_r9.nof_preambs_sent_r9, bref, (uint8_t)1, (uint8_t)200)); + HANDLE_CODE(bref.unpack(rach_report_r9.contention_detected_r9, 1)); + } + if (rlf_report_r9_present) { + HANDLE_CODE(rlf_report_r9.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_r9_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rach_report_r9_present) { + j.write_fieldname("rach-Report-r9"); + j.start_obj(); + j.write_int("numberOfPreamblesSent-r9", rach_report_r9.nof_preambs_sent_r9); + j.write_bool("contentionDetected-r9", rach_report_r9.contention_detected_r9); + j.end_obj(); + } + if (rlf_report_r9_present) { + j.write_fieldname("rlf-Report-r9"); + rlf_report_r9.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// ULHandoverPreparationTransfer-r8-IEs ::= SEQUENCE +ul_ho_prep_transfer_r8_ies_s::ul_ho_prep_transfer_r8_ies_s() +{ + meid_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ul_ho_prep_transfer_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meid_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, cdma2000_type)); + if (meid_present) { + HANDLE_CODE(meid.pack(bref)); + } + HANDLE_CODE(ded_info.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ho_prep_transfer_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meid_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(cdma2000_type, bref)); + if (meid_present) { + HANDLE_CODE(meid.unpack(bref)); + } + HANDLE_CODE(ded_info.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_ho_prep_transfer_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cdma2000-Type", cdma2000_type.to_string()); + if (meid_present) { + j.write_str("meid", meid.to_string()); + } + j.write_str("dedicatedInfo", ded_info.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// ULInformationTransfer-r8-IEs ::= SEQUENCE +ul_info_transfer_r8_ies_s::ul_info_transfer_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ul_info_transfer_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ded_info_type.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ded_info_type.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_info_transfer_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("dedicatedInfoType"); + ded_info_type.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void ul_info_transfer_r8_ies_s::ded_info_type_c_::destroy_() +{ + switch (type_) { + case types::ded_info_nas: + c.destroy(); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.destroy(); + break; + case types::ded_info_cdma2000_hrpd: + c.destroy(); + break; + default: + break; + } +} +void ul_info_transfer_r8_ies_s::ded_info_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ded_info_nas: + c.init(); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.init(); + break; + case types::ded_info_cdma2000_hrpd: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_r8_ies_s::ded_info_type_c_"); + } +} +ul_info_transfer_r8_ies_s::ded_info_type_c_::ded_info_type_c_(const ul_info_transfer_r8_ies_s::ded_info_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ded_info_nas: + c.init(other.c.get()); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.init(other.c.get()); + break; + case types::ded_info_cdma2000_hrpd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_r8_ies_s::ded_info_type_c_"); + } +} +ul_info_transfer_r8_ies_s::ded_info_type_c_& ul_info_transfer_r8_ies_s::ded_info_type_c_:: + operator=(const ul_info_transfer_r8_ies_s::ded_info_type_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ded_info_nas: + c.set(other.c.get()); + break; + case types::ded_info_cdma2000_minus1_xrtt: + c.set(other.c.get()); + break; + case types::ded_info_cdma2000_hrpd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_r8_ies_s::ded_info_type_c_"); + } + + return *this; +} +void ul_info_transfer_r8_ies_s::ded_info_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ded_info_nas: + j.write_str("dedicatedInfoNAS", c.get().to_string()); + break; + case types::ded_info_cdma2000_minus1_xrtt: + j.write_str("dedicatedInfoCDMA2000-1XRTT", c.get().to_string()); + break; + case types::ded_info_cdma2000_hrpd: + j.write_str("dedicatedInfoCDMA2000-HRPD", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_r8_ies_s::ded_info_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_r8_ies_s::ded_info_type_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ded_info_nas: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ded_info_cdma2000_minus1_xrtt: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ded_info_cdma2000_hrpd: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_r8_ies_s::ded_info_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_r8_ies_s::ded_info_type_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ded_info_nas: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ded_info_cdma2000_minus1_xrtt: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ded_info_cdma2000_hrpd: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_r8_ies_s::ded_info_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ULInformationTransferMRDC-r15-IEs ::= SEQUENCE +ul_info_transfer_mrdc_r15_ies_s::ul_info_transfer_mrdc_r15_ies_s() +{ + ul_dcch_msg_nr_r15_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ul_info_transfer_mrdc_r15_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_dcch_msg_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_dcch_msg_nr_r15_present) { + HANDLE_CODE(ul_dcch_msg_nr_r15.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_r15_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_dcch_msg_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_dcch_msg_nr_r15_present) { + HANDLE_CODE(ul_dcch_msg_nr_r15.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_info_transfer_mrdc_r15_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_dcch_msg_nr_r15_present) { + j.write_str("ul-DCCH-MessageNR-r15", ul_dcch_msg_nr_r15.to_string()); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// WLANConnectionStatusReport-r13-IEs ::= SEQUENCE +wlan_conn_status_report_r13_ies_s::wlan_conn_status_report_r13_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE wlan_conn_status_report_r13_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, wlan_status_r13)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_conn_status_report_r13_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(wlan_status_r13, 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 wlan_conn_status_report_r13_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("wlan-Status-r13", wlan_status_r13.to_string()); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CSFBParametersRequestCDMA2000 ::= SEQUENCE +SRSASN_CODE csfb_params_request_cdma2000_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_request_cdma2000_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void csfb_params_request_cdma2000_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void csfb_params_request_cdma2000_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + c.destroy(); + break; + default: + break; + } +} +void csfb_params_request_cdma2000_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csfb_params_request_cdma2000_s::crit_exts_c_"); + } +} +csfb_params_request_cdma2000_s::crit_exts_c_::crit_exts_c_(const csfb_params_request_cdma2000_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csfb_params_request_cdma2000_s::crit_exts_c_"); + } +} +csfb_params_request_cdma2000_s::crit_exts_c_& csfb_params_request_cdma2000_s::crit_exts_c_:: + operator=(const csfb_params_request_cdma2000_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csfb_params_request_cdma2000_s::crit_exts_c_"); + } + + return *this; +} +void csfb_params_request_cdma2000_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + j.write_fieldname("csfbParametersRequestCDMA2000-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "csfb_params_request_cdma2000_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE csfb_params_request_cdma2000_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "csfb_params_request_cdma2000_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csfb_params_request_cdma2000_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::csfb_params_request_cdma2000_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "csfb_params_request_cdma2000_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CounterCheckResponse ::= SEQUENCE +SRSASN_CODE counter_check_resp_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_resp_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void counter_check_resp_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void counter_check_resp_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::counter_check_resp_r8: + c.destroy(); + break; + default: + break; + } +} +void counter_check_resp_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::counter_check_resp_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + } +} +counter_check_resp_s::crit_exts_c_::crit_exts_c_(const counter_check_resp_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::counter_check_resp_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + } +} +counter_check_resp_s::crit_exts_c_& counter_check_resp_s::crit_exts_c_:: + operator=(const counter_check_resp_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::counter_check_resp_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + } + + return *this; +} +void counter_check_resp_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::counter_check_resp_r8: + j.write_fieldname("counterCheckResponse-r8"); + c.get().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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::counter_check_resp_r8: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::counter_check_resp_r8: + HANDLE_CODE(c.get().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; +} + +// FailureInformation-r15 ::= SEQUENCE +fail_info_r15_s::fail_info_r15_s() +{ + failed_lc_ch_info_r15_present = false; +} +SRSASN_CODE fail_info_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(failed_lc_ch_info_r15_present, 1)); + + if (failed_lc_ch_info_r15_present) { + HANDLE_CODE(failed_lc_ch_info_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_info_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(failed_lc_ch_info_r15_present, 1)); + + if (failed_lc_ch_info_r15_present) { + HANDLE_CODE(failed_lc_ch_info_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void fail_info_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (failed_lc_ch_info_r15_present) { + j.write_fieldname("failedLogicalChannelInfo-r15"); + failed_lc_ch_info_r15.to_json(j); + } + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + j.end_obj(); +} + +// InDeviceCoexIndication-r11 ::= SEQUENCE +SRSASN_CODE in_dev_coex_ind_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void in_dev_coex_ind_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void in_dev_coex_ind_r11_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void in_dev_coex_ind_r11_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_"); + } +} +in_dev_coex_ind_r11_s::crit_exts_c_::crit_exts_c_(const in_dev_coex_ind_r11_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_"); + } +} +in_dev_coex_ind_r11_s::crit_exts_c_& in_dev_coex_ind_r11_s::crit_exts_c_:: + operator=(const in_dev_coex_ind_r11_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_"); + } + + return *this; +} +void in_dev_coex_ind_r11_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE in_dev_coex_ind_r11_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_r11_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::in_dev_coex_ind_r11: + j.write_fieldname("inDeviceCoexIndication-r11"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::in_dev_coex_ind_r11: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::in_dev_coex_ind_r11: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// InterFreqRSTDMeasurementIndication-r10 ::= SEQUENCE +SRSASN_CODE inter_freq_rstd_meas_ind_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void inter_freq_rstd_meas_ind_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_"); + } +} +inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::crit_exts_c_(const inter_freq_rstd_meas_ind_r10_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_"); + } +} +inter_freq_rstd_meas_ind_r10_s::crit_exts_c_& inter_freq_rstd_meas_ind_r10_s::crit_exts_c_:: + operator=(const inter_freq_rstd_meas_ind_r10_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_"); + } + + return *this; +} +void inter_freq_rstd_meas_ind_r10_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::inter_freq_rstd_meas_ind_r10: + j.write_fieldname("interFreqRSTDMeasurementIndication-r10"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::inter_freq_rstd_meas_ind_r10: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::inter_freq_rstd_meas_ind_r10: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MBMSCountingResponse-r10 ::= SEQUENCE +SRSASN_CODE mbms_count_resp_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_count_resp_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mbms_count_resp_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void mbms_count_resp_r10_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void mbms_count_resp_r10_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_"); + } +} +mbms_count_resp_r10_s::crit_exts_c_::crit_exts_c_(const mbms_count_resp_r10_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_"); + } +} +mbms_count_resp_r10_s::crit_exts_c_& mbms_count_resp_r10_s::crit_exts_c_:: + operator=(const mbms_count_resp_r10_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_"); + } + + return *this; +} +void mbms_count_resp_r10_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbms_count_resp_r10_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_count_resp_r10_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mbms_count_resp_r10_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void mbms_count_resp_r10_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::count_resp_r10: + j.write_fieldname("countingResponse-r10"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbms_count_resp_r10_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::count_resp_r10: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_count_resp_r10_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::count_resp_r10: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mbms_count_resp_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MBMSInterestIndication-r11 ::= SEQUENCE +SRSASN_CODE mbms_interest_ind_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_interest_ind_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mbms_interest_ind_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void mbms_interest_ind_r11_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void mbms_interest_ind_r11_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_"); + } +} +mbms_interest_ind_r11_s::crit_exts_c_::crit_exts_c_(const mbms_interest_ind_r11_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_"); + } +} +mbms_interest_ind_r11_s::crit_exts_c_& mbms_interest_ind_r11_s::crit_exts_c_:: + operator=(const mbms_interest_ind_r11_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_"); + } + + return *this; +} +void mbms_interest_ind_r11_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbms_interest_ind_r11_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_interest_ind_r11_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interest_ind_r11: + j.write_fieldname("interestIndication-r11"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::interest_ind_r11: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::interest_ind_r11: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "mbms_interest_ind_r11_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// MeasReportAppLayer-r15 ::= SEQUENCE +SRSASN_CODE meas_report_app_layer_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_app_layer_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_report_app_layer_r15_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_app_layer_r15_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::meas_report_app_layer_r15: + c.destroy(); + break; + default: + break; + } +} +void meas_report_app_layer_r15_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::meas_report_app_layer_r15: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_app_layer_r15_s::crit_exts_c_"); + } +} +meas_report_app_layer_r15_s::crit_exts_c_::crit_exts_c_(const meas_report_app_layer_r15_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::meas_report_app_layer_r15: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_app_layer_r15_s::crit_exts_c_"); + } +} +meas_report_app_layer_r15_s::crit_exts_c_& meas_report_app_layer_r15_s::crit_exts_c_:: + operator=(const meas_report_app_layer_r15_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::meas_report_app_layer_r15: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_app_layer_r15_s::crit_exts_c_"); + } + + return *this; +} +void meas_report_app_layer_r15_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::meas_report_app_layer_r15: + j.write_fieldname("measReportAppLayer-r15"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_app_layer_r15_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_report_app_layer_r15_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::meas_report_app_layer_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_app_layer_r15_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_app_layer_r15_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::meas_report_app_layer_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_app_layer_r15_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(bit_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_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void meas_report_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + } +} +meas_report_s::crit_exts_c_::crit_exts_c_(const meas_report_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + } +} +meas_report_s::crit_exts_c_& meas_report_s::crit_exts_c_::operator=(const meas_report_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + } + + return *this; +} +void meas_report_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_report_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void meas_report_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void meas_report_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::meas_report_r8: + j.write_fieldname("measurementReport-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_report_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::meas_report_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::meas_report_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "meas_report_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ProximityIndication-r9 ::= SEQUENCE +SRSASN_CODE proximity_ind_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE proximity_ind_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void proximity_ind_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void proximity_ind_r9_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void proximity_ind_r9_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_"); + } +} +proximity_ind_r9_s::crit_exts_c_::crit_exts_c_(const proximity_ind_r9_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_"); + } +} +proximity_ind_r9_s::crit_exts_c_& proximity_ind_r9_s::crit_exts_c_:: + operator=(const proximity_ind_r9_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_"); + } + + return *this; +} +void proximity_ind_r9_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE proximity_ind_r9_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE proximity_ind_r9_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void proximity_ind_r9_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void proximity_ind_r9_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::proximity_ind_r9: + j.write_fieldname("proximityIndication-r9"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE proximity_ind_r9_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::proximity_ind_r9: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE proximity_ind_r9_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::proximity_ind_r9: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "proximity_ind_r9_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RNReconfigurationComplete-r10 ::= SEQUENCE +SRSASN_CODE rn_recfg_complete_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_complete_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rn_recfg_complete_r10_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 rn_recfg_complete_r10_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rn_recfg_complete_r10_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_"); + } +} +rn_recfg_complete_r10_s::crit_exts_c_::crit_exts_c_(const rn_recfg_complete_r10_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_"); + } +} +rn_recfg_complete_r10_s::crit_exts_c_& rn_recfg_complete_r10_s::crit_exts_c_:: + operator=(const rn_recfg_complete_r10_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_"); + } + + return *this; +} +void rn_recfg_complete_r10_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_recfg_complete_r10_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_complete_r10_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rn_recfg_complete_r10: + j.write_fieldname("rnReconfigurationComplete-r10"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rn_recfg_complete_r10: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rn_recfg_complete_r10: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rn_recfg_complete_r10_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReconfigurationComplete ::= SEQUENCE +SRSASN_CODE rrc_conn_recfg_complete_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_complete_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_recfg_complete_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_recfg_complete_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_complete_s::crit_exts_c_"); + } +} +rrc_conn_recfg_complete_s::crit_exts_c_::crit_exts_c_(const rrc_conn_recfg_complete_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_complete_s::crit_exts_c_"); + } +} +rrc_conn_recfg_complete_s::crit_exts_c_& rrc_conn_recfg_complete_s::crit_exts_c_:: + operator=(const rrc_conn_recfg_complete_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_complete_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_recfg_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + j.write_fieldname("rrcConnectionReconfigurationComplete-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_complete_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_recfg_complete_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_recfg_complete_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_recfg_complete_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_recfg_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionReestablishmentComplete ::= SEQUENCE +SRSASN_CODE rrc_conn_reest_complete_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_complete_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_reest_complete_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_reest_complete_r8: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_reest_complete_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_reest_complete_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_complete_s::crit_exts_c_"); + } +} +rrc_conn_reest_complete_s::crit_exts_c_::crit_exts_c_(const rrc_conn_reest_complete_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_reest_complete_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_complete_s::crit_exts_c_"); + } +} +rrc_conn_reest_complete_s::crit_exts_c_& rrc_conn_reest_complete_s::crit_exts_c_:: + operator=(const rrc_conn_reest_complete_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_reest_complete_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_complete_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_reest_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_reest_complete_r8: + j.write_fieldname("rrcConnectionReestablishmentComplete-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_complete_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_reest_complete_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_reest_complete_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_reest_complete_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_reest_complete_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_reest_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionResumeComplete-r13 ::= SEQUENCE +SRSASN_CODE rrc_conn_resume_complete_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_complete_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_resume_complete_r13_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_conn_resume_complete_r13_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_conn_resume_complete_r13: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_resume_complete_r13_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_conn_resume_complete_r13: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_complete_r13_s::crit_exts_c_"); + } +} +rrc_conn_resume_complete_r13_s::crit_exts_c_::crit_exts_c_(const rrc_conn_resume_complete_r13_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::rrc_conn_resume_complete_r13: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_complete_r13_s::crit_exts_c_"); + } +} +rrc_conn_resume_complete_r13_s::crit_exts_c_& rrc_conn_resume_complete_r13_s::crit_exts_c_:: + operator=(const rrc_conn_resume_complete_r13_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rrc_conn_resume_complete_r13: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_complete_r13_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_resume_complete_r13_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_resume_complete_r13: + j.write_fieldname("rrcConnectionResumeComplete-r13"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_complete_r13_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_resume_complete_r13_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_resume_complete_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_complete_r13_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_resume_complete_r13_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_resume_complete_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_resume_complete_r13_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// RRCConnectionSetupComplete ::= SEQUENCE +SRSASN_CODE rrc_conn_setup_complete_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_conn_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_conn_setup_complete_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void rrc_conn_setup_complete_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_"); + } +} +rrc_conn_setup_complete_s::crit_exts_c_::crit_exts_c_(const rrc_conn_setup_complete_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_"); + } +} +rrc_conn_setup_complete_s::crit_exts_c_& rrc_conn_setup_complete_s::crit_exts_c_:: + operator=(const rrc_conn_setup_complete_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_"); + } + + return *this; +} +void rrc_conn_setup_complete_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_setup_complete_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_conn_setup_complete_r8: + j.write_fieldname("rrcConnectionSetupComplete-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::rrc_conn_setup_complete_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::rrc_conn_setup_complete_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "rrc_conn_setup_complete_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SCGFailureInformation-r12 ::= SEQUENCE +SRSASN_CODE scg_fail_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_fail_info_r12_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_r12_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void scg_fail_info_r12_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_"); + } +} +scg_fail_info_r12_s::crit_exts_c_::crit_exts_c_(const scg_fail_info_r12_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_"); + } +} +scg_fail_info_r12_s::crit_exts_c_& scg_fail_info_r12_s::crit_exts_c_:: + operator=(const scg_fail_info_r12_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_"); + } + + return *this; +} +void scg_fail_info_r12_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_fail_info_r12_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_r12_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void scg_fail_info_r12_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void scg_fail_info_r12_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scg_fail_info_r12: + j.write_fieldname("scgFailureInformation-r12"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_fail_info_r12_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::scg_fail_info_r12: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_r12_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::scg_fail_info_r12: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SCGFailureInformationNR-r15 ::= SEQUENCE +SRSASN_CODE scg_fail_info_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_fail_info_nr_r15_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_nr_r15_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void scg_fail_info_nr_r15_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_"); + } +} +scg_fail_info_nr_r15_s::crit_exts_c_::crit_exts_c_(const scg_fail_info_nr_r15_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_"); + } +} +scg_fail_info_nr_r15_s::crit_exts_c_& scg_fail_info_nr_r15_s::crit_exts_c_:: + operator=(const scg_fail_info_nr_r15_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_"); + } + + return *this; +} +void scg_fail_info_nr_r15_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_fail_info_nr_r15_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_nr_r15_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scg_fail_info_nr_r15: + j.write_fieldname("scgFailureInformationNR-r15"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::scg_fail_info_nr_r15: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::scg_fail_info_nr_r15: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_fail_info_nr_r15_s::crit_exts_c_::c1_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_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_complete_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + 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_::destroy_() +{ + switch (type_) { + case types::security_mode_complete_r8: + c.destroy(); + break; + default: + break; + } +} +void security_mode_complete_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::security_mode_complete_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + } +} +security_mode_complete_s::crit_exts_c_::crit_exts_c_(const security_mode_complete_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::security_mode_complete_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + } +} +security_mode_complete_s::crit_exts_c_& security_mode_complete_s::crit_exts_c_:: + operator=(const security_mode_complete_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::security_mode_complete_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + } + + return *this; +} +void security_mode_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::security_mode_complete_r8: + j.write_fieldname("securityModeComplete-r8"); + c.get().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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::security_mode_complete_r8: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::security_mode_complete_r8: + HANDLE_CODE(c.get().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_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_fail_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + 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_::destroy_() +{ + switch (type_) { + case types::security_mode_fail_r8: + c.destroy(); + break; + default: + break; + } +} +void security_mode_fail_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::security_mode_fail_r8: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + } +} +security_mode_fail_s::crit_exts_c_::crit_exts_c_(const security_mode_fail_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::security_mode_fail_r8: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + } +} +security_mode_fail_s::crit_exts_c_& security_mode_fail_s::crit_exts_c_:: + operator=(const security_mode_fail_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::security_mode_fail_r8: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + } + + return *this; +} +void security_mode_fail_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::security_mode_fail_r8: + j.write_fieldname("securityModeFailure-r8"); + c.get().to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE security_mode_fail_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::security_mode_fail_r8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_fail_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::security_mode_fail_r8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_fail_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SidelinkUEInformation-r12 ::= SEQUENCE +SRSASN_CODE sidelink_ue_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sidelink_ue_info_r12_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_r12_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void sidelink_ue_info_r12_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_"); + } +} +sidelink_ue_info_r12_s::crit_exts_c_::crit_exts_c_(const sidelink_ue_info_r12_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_"); + } +} +sidelink_ue_info_r12_s::crit_exts_c_& sidelink_ue_info_r12_s::crit_exts_c_:: + operator=(const sidelink_ue_info_r12_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_"); + } + + return *this; +} +void sidelink_ue_info_r12_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE sidelink_ue_info_r12_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_r12_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sidelink_ue_info_r12: + j.write_fieldname("sidelinkUEInformation-r12"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::sidelink_ue_info_r12: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::sidelink_ue_info_r12: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UEAssistanceInformation-r11 ::= SEQUENCE +SRSASN_CODE ueassist_info_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ueassist_info_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ueassist_info_r11_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ueassist_info_r11_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_"); + } +} +ueassist_info_r11_s::crit_exts_c_::crit_exts_c_(const ueassist_info_r11_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_"); + } +} +ueassist_info_r11_s::crit_exts_c_& ueassist_info_r11_s::crit_exts_c_:: + operator=(const ueassist_info_r11_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_"); + } + + return *this; +} +void ueassist_info_r11_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ueassist_info_r11_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_r11_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ueassist_info_r11_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ueassist_info_r11_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_assist_info_r11: + j.write_fieldname("ueAssistanceInformation-r11"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ueassist_info_r11_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_assist_info_r11: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ueassist_info_r11_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_assist_info_r11: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ueassist_info_r11_s::crit_exts_c_::c1_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_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + 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_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_cap_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); + } +} +ue_cap_info_s::crit_exts_c_::crit_exts_c_(const ue_cap_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); + } +} +ue_cap_info_s::crit_exts_c_& ue_cap_info_s::crit_exts_c_::operator=(const ue_cap_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); + } + + return *this; +} +void ue_cap_info_s::crit_exts_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::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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ue_cap_info_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_cap_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_cap_info_r8: + j.write_fieldname("ueCapabilityInformation-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_cap_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_cap_info_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_cap_info_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_cap_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UEInformationResponse-r9 ::= SEQUENCE +SRSASN_CODE ue_info_resp_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, rrc_transaction_id, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(rrc_transaction_id, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_info_resp_r9_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_r9_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_info_resp_r9_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_"); + } +} +ue_info_resp_r9_s::crit_exts_c_::crit_exts_c_(const ue_info_resp_r9_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_"); + } +} +ue_info_resp_r9_s::crit_exts_c_& ue_info_resp_r9_s::crit_exts_c_:: + operator=(const ue_info_resp_r9_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_"); + } + + return *this; +} +void ue_info_resp_r9_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_info_resp_r9_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_r9_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ue_info_resp_r9_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_info_resp_r9_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_info_resp_r9: + j.write_fieldname("ueInformationResponse-r9"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_info_resp_r9_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_info_resp_r9: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_r9_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_info_resp_r9: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r9_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ULHandoverPreparationTransfer ::= SEQUENCE +SRSASN_CODE ul_ho_prep_transfer_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ho_prep_transfer_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_ho_prep_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_ho_prep_transfer_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ul_ho_prep_transfer_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_"); + } +} +ul_ho_prep_transfer_s::crit_exts_c_::crit_exts_c_(const ul_ho_prep_transfer_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_"); + } +} +ul_ho_prep_transfer_s::crit_exts_c_& ul_ho_prep_transfer_s::crit_exts_c_:: + operator=(const ul_ho_prep_transfer_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_"); + } + + return *this; +} +void ul_ho_prep_transfer_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ho_prep_transfer_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ho_prep_transfer_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_ho_prep_transfer_r8: + j.write_fieldname("ulHandoverPreparationTransfer-r8"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_ho_prep_transfer_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ul_ho_prep_transfer_r8: + 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_ho_prep_transfer_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ul_ho_prep_transfer_r8: + 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_ho_prep_transfer_s::crit_exts_c_::c1_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(bit_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_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ul_info_transfer_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + } +} +ul_info_transfer_s::crit_exts_c_::crit_exts_c_(const ul_info_transfer_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + } +} +ul_info_transfer_s::crit_exts_c_& ul_info_transfer_s::crit_exts_c_:: + operator=(const ul_info_transfer_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + } + + return *this; +} +void ul_info_transfer_s::crit_exts_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::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 +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().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; +} + +void ul_info_transfer_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ul_info_transfer_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_info_transfer_r8: + j.write_fieldname("ulInformationTransfer-r8"); + 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_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ul_info_transfer_r8: + 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_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ul_info_transfer_r8: + 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_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// ULInformationTransferMRDC-r15 ::= SEQUENCE +SRSASN_CODE ul_info_transfer_mrdc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_info_transfer_mrdc_r15_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_r15_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ul_info_transfer_mrdc_r15_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_r15_s::crit_exts_c_"); + } +} +ul_info_transfer_mrdc_r15_s::crit_exts_c_::crit_exts_c_(const ul_info_transfer_mrdc_r15_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_r15_s::crit_exts_c_"); + } +} +ul_info_transfer_mrdc_r15_s::crit_exts_c_& ul_info_transfer_mrdc_r15_s::crit_exts_c_:: + operator=(const ul_info_transfer_mrdc_r15_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_r15_s::crit_exts_c_"); + } + + return *this; +} +void ul_info_transfer_mrdc_r15_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_r15_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_mrdc_r15_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_r15_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_r15_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_r15_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_info_transfer_mrdc_r15: + j.write_fieldname("ulInformationTransferMRDC-r15"); + 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_r15_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ul_info_transfer_mrdc_r15: + 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_r15_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ul_info_transfer_mrdc_r15: + 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_r15_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// WLANConnectionStatusReport-r13 ::= SEQUENCE +SRSASN_CODE wlan_conn_status_report_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_conn_status_report_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void wlan_conn_status_report_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void wlan_conn_status_report_r13_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void wlan_conn_status_report_r13_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_"); + } +} +wlan_conn_status_report_r13_s::crit_exts_c_::crit_exts_c_(const wlan_conn_status_report_r13_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_"); + } +} +wlan_conn_status_report_r13_s::crit_exts_c_& wlan_conn_status_report_r13_s::crit_exts_c_:: + operator=(const wlan_conn_status_report_r13_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_"); + } + + return *this; +} +void wlan_conn_status_report_r13_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE wlan_conn_status_report_r13_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_conn_status_report_r13_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::wlan_conn_status_report_r13: + j.write_fieldname("wlanConnectionStatusReport-r13"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::wlan_conn_status_report_r13: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::wlan_conn_status_report_r13: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UL-DCCH-MessageType ::= CHOICE +void ul_dcch_msg_type_c::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + case types::msg_class_ext: + c.destroy(); + break; + default: + break; + } +} +void ul_dcch_msg_type_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::msg_class_ext: + 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; +} +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 +{ + pack_enum(bref, type_); + 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(bit_ref& bref) +{ + types e; + unpack_enum(e, 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::csfb_params_request_cdma2000: + c.destroy(); + break; + case types::meas_report: + c.destroy(); + break; + case types::rrc_conn_recfg_complete: + c.destroy(); + break; + case types::rrc_conn_reest_complete: + c.destroy(); + break; + case types::rrc_conn_setup_complete: + c.destroy(); + break; + case types::security_mode_complete: + c.destroy(); + break; + case types::security_mode_fail: + c.destroy(); + break; + case types::ue_cap_info: + c.destroy(); + break; + case types::ul_ho_prep_transfer: + c.destroy(); + break; + case types::ul_info_transfer: + c.destroy(); + break; + case types::counter_check_resp: + c.destroy(); + break; + case types::ue_info_resp_r9: + c.destroy(); + break; + case types::proximity_ind_r9: + c.destroy(); + break; + case types::rn_recfg_complete_r10: + c.destroy(); + break; + case types::mbms_count_resp_r10: + c.destroy(); + break; + case types::inter_freq_rstd_meas_ind_r10: + c.destroy(); + break; + default: + break; + } +} +void ul_dcch_msg_type_c::c1_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::csfb_params_request_cdma2000: + c.init(); + break; + case types::meas_report: + c.init(); + break; + case types::rrc_conn_recfg_complete: + c.init(); + break; + case types::rrc_conn_reest_complete: + c.init(); + break; + case types::rrc_conn_setup_complete: + c.init(); + break; + case types::security_mode_complete: + c.init(); + break; + case types::security_mode_fail: + c.init(); + break; + case types::ue_cap_info: + c.init(); + break; + case types::ul_ho_prep_transfer: + c.init(); + break; + case types::ul_info_transfer: + c.init(); + break; + case types::counter_check_resp: + c.init(); + break; + case types::ue_info_resp_r9: + c.init(); + break; + case types::proximity_ind_r9: + c.init(); + break; + case types::rn_recfg_complete_r10: + c.init(); + break; + case types::mbms_count_resp_r10: + c.init(); + break; + case types::inter_freq_rstd_meas_ind_r10: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + } +} +ul_dcch_msg_type_c::c1_c_::c1_c_(const ul_dcch_msg_type_c::c1_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::csfb_params_request_cdma2000: + c.init(other.c.get()); + break; + case types::meas_report: + c.init(other.c.get()); + break; + case types::rrc_conn_recfg_complete: + c.init(other.c.get()); + break; + case types::rrc_conn_reest_complete: + c.init(other.c.get()); + break; + case types::rrc_conn_setup_complete: + c.init(other.c.get()); + break; + case types::security_mode_complete: + c.init(other.c.get()); + break; + case types::security_mode_fail: + c.init(other.c.get()); + break; + case types::ue_cap_info: + c.init(other.c.get()); + break; + case types::ul_ho_prep_transfer: + c.init(other.c.get()); + break; + case types::ul_info_transfer: + c.init(other.c.get()); + break; + case types::counter_check_resp: + c.init(other.c.get()); + break; + case types::ue_info_resp_r9: + c.init(other.c.get()); + break; + case types::proximity_ind_r9: + c.init(other.c.get()); + break; + case types::rn_recfg_complete_r10: + c.init(other.c.get()); + break; + case types::mbms_count_resp_r10: + c.init(other.c.get()); + break; + case types::inter_freq_rstd_meas_ind_r10: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + } +} +ul_dcch_msg_type_c::c1_c_& ul_dcch_msg_type_c::c1_c_::operator=(const ul_dcch_msg_type_c::c1_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::csfb_params_request_cdma2000: + c.set(other.c.get()); + break; + case types::meas_report: + c.set(other.c.get()); + break; + case types::rrc_conn_recfg_complete: + c.set(other.c.get()); + break; + case types::rrc_conn_reest_complete: + c.set(other.c.get()); + break; + case types::rrc_conn_setup_complete: + c.set(other.c.get()); + break; + case types::security_mode_complete: + c.set(other.c.get()); + break; + case types::security_mode_fail: + c.set(other.c.get()); + break; + case types::ue_cap_info: + c.set(other.c.get()); + break; + case types::ul_ho_prep_transfer: + c.set(other.c.get()); + break; + case types::ul_info_transfer: + c.set(other.c.get()); + break; + case types::counter_check_resp: + c.set(other.c.get()); + break; + case types::ue_info_resp_r9: + c.set(other.c.get()); + break; + case types::proximity_ind_r9: + c.set(other.c.get()); + break; + case types::rn_recfg_complete_r10: + c.set(other.c.get()); + break; + case types::mbms_count_resp_r10: + c.set(other.c.get()); + break; + case types::inter_freq_rstd_meas_ind_r10: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + } + + return *this; +} +void ul_dcch_msg_type_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::csfb_params_request_cdma2000: + j.write_fieldname("csfbParametersRequestCDMA2000"); + c.get().to_json(j); + break; + case types::meas_report: + j.write_fieldname("measurementReport"); + c.get().to_json(j); + break; + case types::rrc_conn_recfg_complete: + j.write_fieldname("rrcConnectionReconfigurationComplete"); + c.get().to_json(j); + break; + case types::rrc_conn_reest_complete: + j.write_fieldname("rrcConnectionReestablishmentComplete"); + c.get().to_json(j); + break; + case types::rrc_conn_setup_complete: + j.write_fieldname("rrcConnectionSetupComplete"); + c.get().to_json(j); + break; + case types::security_mode_complete: + j.write_fieldname("securityModeComplete"); + c.get().to_json(j); + break; + case types::security_mode_fail: + j.write_fieldname("securityModeFailure"); + c.get().to_json(j); + break; + case types::ue_cap_info: + j.write_fieldname("ueCapabilityInformation"); + c.get().to_json(j); + break; + case types::ul_ho_prep_transfer: + j.write_fieldname("ulHandoverPreparationTransfer"); + c.get().to_json(j); + break; + case types::ul_info_transfer: + j.write_fieldname("ulInformationTransfer"); + c.get().to_json(j); + break; + case types::counter_check_resp: + j.write_fieldname("counterCheckResponse"); + c.get().to_json(j); + break; + case types::ue_info_resp_r9: + j.write_fieldname("ueInformationResponse-r9"); + c.get().to_json(j); + break; + case types::proximity_ind_r9: + j.write_fieldname("proximityIndication-r9"); + c.get().to_json(j); + break; + case types::rn_recfg_complete_r10: + j.write_fieldname("rnReconfigurationComplete-r10"); + c.get().to_json(j); + break; + case types::mbms_count_resp_r10: + j.write_fieldname("mbmsCountingResponse-r10"); + c.get().to_json(j); + break; + case types::inter_freq_rstd_meas_ind_r10: + j.write_fieldname("interFreqRSTDMeasurementIndication-r10"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_dcch_msg_type_c::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::csfb_params_request_cdma2000: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_report: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_recfg_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_reest_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_setup_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::security_mode_complete: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::security_mode_fail: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_cap_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_ho_prep_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_info_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::counter_check_resp: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_info_resp_r9: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::proximity_ind_r9: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rn_recfg_complete_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::mbms_count_resp_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::inter_freq_rstd_meas_ind_r10: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_dcch_msg_type_c::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::csfb_params_request_cdma2000: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_report: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_recfg_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_reest_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_setup_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::security_mode_complete: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::security_mode_fail: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_cap_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_ho_prep_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_info_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::counter_check_resp: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_info_resp_r9: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::proximity_ind_r9: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rn_recfg_complete_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::mbms_count_resp_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::inter_freq_rstd_meas_ind_r10: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_dcch_msg_type_c::msg_class_ext_c_::destroy_() +{ + switch (type_) { + case types::c2: + c.destroy(); + break; + default: + break; + } +} +void ul_dcch_msg_type_c::msg_class_ext_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c2: + c.init(); + break; + case types::msg_class_ext_future_r11: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_"); + } +} +ul_dcch_msg_type_c::msg_class_ext_c_::msg_class_ext_c_(const ul_dcch_msg_type_c::msg_class_ext_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c2: + c.init(other.c.get()); + break; + case types::msg_class_ext_future_r11: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_"); + } +} +ul_dcch_msg_type_c::msg_class_ext_c_& ul_dcch_msg_type_c::msg_class_ext_c_:: + operator=(const ul_dcch_msg_type_c::msg_class_ext_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c2: + c.set(other.c.get()); + break; + case types::msg_class_ext_future_r11: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_"); + } + + return *this; +} +void ul_dcch_msg_type_c::msg_class_ext_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c2: + j.write_fieldname("c2"); + c.get().to_json(j); + break; + case types::msg_class_ext_future_r11: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_dcch_msg_type_c::msg_class_ext_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::msg_class_ext_future_r11: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_dcch_msg_type_c::msg_class_ext_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::msg_class_ext_future_r11: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::destroy_() +{ + switch (type_) { + case types::ue_assist_info_r11: + c.destroy(); + break; + case types::in_dev_coex_ind_r11: + c.destroy(); + break; + case types::mbms_interest_ind_r11: + c.destroy(); + break; + case types::scg_fail_info_r12: + c.destroy(); + break; + case types::sidelink_ue_info_r12: + c.destroy(); + break; + case types::wlan_conn_status_report_r13: + c.destroy(); + break; + case types::rrc_conn_resume_complete_r13: + c.destroy(); + break; + case types::ul_info_transfer_mrdc_r15: + c.destroy(); + break; + case types::scg_fail_info_nr_r15: + c.destroy(); + break; + case types::meas_report_app_layer_r15: + c.destroy(); + break; + case types::fail_info_r15: + 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::ue_assist_info_r11: + c.init(); + break; + case types::in_dev_coex_ind_r11: + c.init(); + break; + case types::mbms_interest_ind_r11: + c.init(); + break; + case types::scg_fail_info_r12: + c.init(); + break; + case types::sidelink_ue_info_r12: + c.init(); + break; + case types::wlan_conn_status_report_r13: + c.init(); + break; + case types::rrc_conn_resume_complete_r13: + c.init(); + break; + case types::ul_info_transfer_mrdc_r15: + c.init(); + break; + case types::scg_fail_info_nr_r15: + c.init(); + break; + case types::meas_report_app_layer_r15: + c.init(); + break; + case types::fail_info_r15: + c.init(); + 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::ue_assist_info_r11: + c.init(other.c.get()); + break; + case types::in_dev_coex_ind_r11: + c.init(other.c.get()); + break; + case types::mbms_interest_ind_r11: + c.init(other.c.get()); + break; + case types::scg_fail_info_r12: + c.init(other.c.get()); + break; + case types::sidelink_ue_info_r12: + c.init(other.c.get()); + break; + case types::wlan_conn_status_report_r13: + c.init(other.c.get()); + break; + case types::rrc_conn_resume_complete_r13: + c.init(other.c.get()); + break; + case types::ul_info_transfer_mrdc_r15: + c.init(other.c.get()); + break; + case types::scg_fail_info_nr_r15: + c.init(other.c.get()); + break; + case types::meas_report_app_layer_r15: + c.init(other.c.get()); + break; + case types::fail_info_r15: + c.init(other.c.get()); + 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::ue_assist_info_r11: + c.set(other.c.get()); + break; + case types::in_dev_coex_ind_r11: + c.set(other.c.get()); + break; + case types::mbms_interest_ind_r11: + c.set(other.c.get()); + break; + case types::scg_fail_info_r12: + c.set(other.c.get()); + break; + case types::sidelink_ue_info_r12: + c.set(other.c.get()); + break; + case types::wlan_conn_status_report_r13: + c.set(other.c.get()); + break; + case types::rrc_conn_resume_complete_r13: + c.set(other.c.get()); + break; + case types::ul_info_transfer_mrdc_r15: + c.set(other.c.get()); + break; + case types::scg_fail_info_nr_r15: + c.set(other.c.get()); + break; + case types::meas_report_app_layer_r15: + c.set(other.c.get()); + break; + case types::fail_info_r15: + c.set(other.c.get()); + 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_"); + } + + return *this; +} +void ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_assist_info_r11: + j.write_fieldname("ueAssistanceInformation-r11"); + c.get().to_json(j); + break; + case types::in_dev_coex_ind_r11: + j.write_fieldname("inDeviceCoexIndication-r11"); + c.get().to_json(j); + break; + case types::mbms_interest_ind_r11: + j.write_fieldname("mbmsInterestIndication-r11"); + c.get().to_json(j); + break; + case types::scg_fail_info_r12: + j.write_fieldname("scgFailureInformation-r12"); + c.get().to_json(j); + break; + case types::sidelink_ue_info_r12: + j.write_fieldname("sidelinkUEInformation-r12"); + c.get().to_json(j); + break; + case types::wlan_conn_status_report_r13: + j.write_fieldname("wlanConnectionStatusReport-r13"); + c.get().to_json(j); + break; + case types::rrc_conn_resume_complete_r13: + j.write_fieldname("rrcConnectionResumeComplete-r13"); + c.get().to_json(j); + break; + case types::ul_info_transfer_mrdc_r15: + j.write_fieldname("ulInformationTransferMRDC-r15"); + c.get().to_json(j); + break; + case types::scg_fail_info_nr_r15: + j.write_fieldname("scgFailureInformationNR-r15"); + c.get().to_json(j); + break; + case types::meas_report_app_layer_r15: + j.write_fieldname("measReportAppLayer-r15"); + c.get().to_json(j); + break; + case types::fail_info_r15: + j.write_fieldname("failureInformation-r15"); + c.get().to_json(j); + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_assist_info_r11: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::in_dev_coex_ind_r11: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::mbms_interest_ind_r11: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scg_fail_info_r12: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sidelink_ue_info_r12: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::wlan_conn_status_report_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_conn_resume_complete_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_info_transfer_mrdc_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scg_fail_info_nr_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::meas_report_app_layer_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::fail_info_r15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_assist_info_r11: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::in_dev_coex_ind_r11: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::mbms_interest_ind_r11: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scg_fail_info_r12: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sidelink_ue_info_r12: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::wlan_conn_status_report_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_conn_resume_complete_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_info_transfer_mrdc_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scg_fail_info_nr_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::meas_report_app_layer_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::fail_info_r15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UL-DCCH-Message ::= SEQUENCE +SRSASN_CODE ul_dcch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_dcch_msg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void ul_dcch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("UL-DCCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// InterFreqBandInfo ::= SEQUENCE +SRSASN_CODE inter_freq_band_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_need_for_gaps, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_band_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_need_for_gaps, 1)); + + return SRSASN_SUCCESS; +} +void inter_freq_band_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("interFreqNeedForGaps", inter_freq_need_for_gaps); + j.end_obj(); +} + +// InterRAT-BandInfo ::= SEQUENCE +SRSASN_CODE inter_rat_band_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_rat_need_for_gaps, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_rat_band_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_rat_need_for_gaps, 1)); + + return SRSASN_SUCCESS; +} +void inter_rat_band_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("interRAT-NeedForGaps", inter_rat_need_for_gaps); + j.end_obj(); +} + +// BandInfoEUTRA ::= SEQUENCE +band_info_eutra_s::band_info_eutra_s() +{ + inter_rat_band_list_present = false; +} +SRSASN_CODE band_info_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_rat_band_list_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_band_list, 1, 64)); + if (inter_rat_band_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_rat_band_list, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_info_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_rat_band_list_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_band_list, bref, 1, 64)); + if (inter_rat_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_rat_band_list, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_info_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("interFreqBandList"); + for (uint32_t i1 = 0; i1 < inter_freq_band_list.size(); ++i1) { + inter_freq_band_list[i1].to_json(j); + } + j.end_array(); + if (inter_rat_band_list_present) { + j.start_array("interRAT-BandList"); + for (uint32_t i1 = 0; i1 < inter_rat_band_list.size(); ++i1) { + inter_rat_band_list[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CA-MIMO-ParametersDL-r10 ::= SEQUENCE +ca_mimo_params_dl_r10_s::ca_mimo_params_dl_r10_s() +{ + supported_mimo_cap_dl_r10_present = false; +} +SRSASN_CODE ca_mimo_params_dl_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_mimo_cap_dl_r10_present, 1)); + + HANDLE_CODE(pack_enum(bref, ca_bw_class_dl_r10)); + if (supported_mimo_cap_dl_r10_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_dl_r10)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_dl_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_mimo_cap_dl_r10_present, 1)); + + HANDLE_CODE(unpack_enum(ca_bw_class_dl_r10, bref)); + if (supported_mimo_cap_dl_r10_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_dl_r10, bref)); + } + + return SRSASN_SUCCESS; +} +void ca_mimo_params_dl_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ca-BandwidthClassDL-r10", ca_bw_class_dl_r10.to_string()); + if (supported_mimo_cap_dl_r10_present) { + j.write_str("supportedMIMO-CapabilityDL-r10", supported_mimo_cap_dl_r10.to_string()); + } + j.end_obj(); +} + +// CA-MIMO-ParametersUL-r10 ::= SEQUENCE +ca_mimo_params_ul_r10_s::ca_mimo_params_ul_r10_s() +{ + supported_mimo_cap_ul_r10_present = false; +} +SRSASN_CODE ca_mimo_params_ul_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_mimo_cap_ul_r10_present, 1)); + + HANDLE_CODE(pack_enum(bref, ca_bw_class_ul_r10)); + if (supported_mimo_cap_ul_r10_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_ul_r10)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_ul_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_mimo_cap_ul_r10_present, 1)); + + HANDLE_CODE(unpack_enum(ca_bw_class_ul_r10, bref)); + if (supported_mimo_cap_ul_r10_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_ul_r10, bref)); + } + + return SRSASN_SUCCESS; +} +void ca_mimo_params_ul_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ca-BandwidthClassUL-r10", ca_bw_class_ul_r10.to_string()); + if (supported_mimo_cap_ul_r10_present) { + j.write_str("supportedMIMO-CapabilityUL-r10", supported_mimo_cap_ul_r10.to_string()); + } + j.end_obj(); +} + +// BandParameters-r10 ::= SEQUENCE +band_params_r10_s::band_params_r10_s() +{ + band_params_ul_r10_present = false; + band_params_dl_r10_present = false; +} +SRSASN_CODE band_params_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_params_ul_r10_present, 1)); + HANDLE_CODE(bref.pack(band_params_dl_r10_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, band_eutra_r10, (uint8_t)1, (uint8_t)64)); + if (band_params_ul_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_params_ul_r10, 1, 16)); + } + if (band_params_dl_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_params_dl_r10, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_params_ul_r10_present, 1)); + HANDLE_CODE(bref.unpack(band_params_dl_r10_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(band_eutra_r10, bref, (uint8_t)1, (uint8_t)64)); + if (band_params_ul_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_params_ul_r10, bref, 1, 16)); + } + if (band_params_dl_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_params_dl_r10, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void band_params_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandEUTRA-r10", band_eutra_r10); + if (band_params_ul_r10_present) { + j.start_array("bandParametersUL-r10"); + for (uint32_t i1 = 0; i1 < band_params_ul_r10.size(); ++i1) { + band_params_ul_r10[i1].to_json(j); + } + j.end_array(); + } + if (band_params_dl_r10_present) { + j.start_array("bandParametersDL-r10"); + for (uint32_t i1 = 0; i1 < band_params_dl_r10.size(); ++i1) { + band_params_dl_r10[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// BandParameters-r11 ::= SEQUENCE +band_params_r11_s::band_params_r11_s() +{ + band_params_ul_r11_present = false; + band_params_dl_r11_present = false; + supported_csi_proc_r11_present = false; +} +SRSASN_CODE band_params_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_params_ul_r11_present, 1)); + HANDLE_CODE(bref.pack(band_params_dl_r11_present, 1)); + HANDLE_CODE(bref.pack(supported_csi_proc_r11_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, band_eutra_r11, (uint16_t)1, (uint16_t)256)); + if (band_params_ul_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_params_ul_r11, 1, 16)); + } + if (band_params_dl_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_params_dl_r11, 1, 16)); + } + if (supported_csi_proc_r11_present) { + HANDLE_CODE(pack_enum(bref, supported_csi_proc_r11)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_params_ul_r11_present, 1)); + HANDLE_CODE(bref.unpack(band_params_dl_r11_present, 1)); + HANDLE_CODE(bref.unpack(supported_csi_proc_r11_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(band_eutra_r11, bref, (uint16_t)1, (uint16_t)256)); + if (band_params_ul_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_params_ul_r11, bref, 1, 16)); + } + if (band_params_dl_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_params_dl_r11, bref, 1, 16)); + } + if (supported_csi_proc_r11_present) { + HANDLE_CODE(unpack_enum(supported_csi_proc_r11, bref)); + } + + return SRSASN_SUCCESS; +} +void band_params_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandEUTRA-r11", band_eutra_r11); + if (band_params_ul_r11_present) { + j.start_array("bandParametersUL-r11"); + for (uint32_t i1 = 0; i1 < band_params_ul_r11.size(); ++i1) { + band_params_ul_r11[i1].to_json(j); + } + j.end_array(); + } + if (band_params_dl_r11_present) { + j.start_array("bandParametersDL-r11"); + for (uint32_t i1 = 0; i1 < band_params_dl_r11.size(); ++i1) { + band_params_dl_r11[i1].to_json(j); + } + j.end_array(); + } + if (supported_csi_proc_r11_present) { + j.write_str("supportedCSI-Proc-r11", supported_csi_proc_r11.to_string()); + } + j.end_obj(); +} + +// BandCombinationParameters-r11 ::= SEQUENCE +band_combination_params_r11_s::band_combination_params_r11_s() +{ + ext = false; + supported_bw_combination_set_r11_present = false; + multiple_timing_advance_r11_present = false; + simul_rx_tx_r11_present = false; +} +SRSASN_CODE band_combination_params_r11_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(supported_bw_combination_set_r11_present, 1)); + HANDLE_CODE(bref.pack(multiple_timing_advance_r11_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_r11_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_r11, 1, 64)); + if (supported_bw_combination_set_r11_present) { + HANDLE_CODE(supported_bw_combination_set_r11.pack(bref)); + } + HANDLE_CODE(band_info_eutra_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_r11_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(supported_bw_combination_set_r11_present, 1)); + HANDLE_CODE(bref.unpack(multiple_timing_advance_r11_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_r11_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_r11, bref, 1, 64)); + if (supported_bw_combination_set_r11_present) { + HANDLE_CODE(supported_bw_combination_set_r11.unpack(bref)); + } + HANDLE_CODE(band_info_eutra_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void band_combination_params_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandParameterList-r11"); + for (uint32_t i1 = 0; i1 < band_param_list_r11.size(); ++i1) { + band_param_list_r11[i1].to_json(j); + } + j.end_array(); + if (supported_bw_combination_set_r11_present) { + j.write_str("supportedBandwidthCombinationSet-r11", supported_bw_combination_set_r11.to_string()); + } + if (multiple_timing_advance_r11_present) { + j.write_str("multipleTimingAdvance-r11", "supported"); + } + if (simul_rx_tx_r11_present) { + j.write_str("simultaneousRx-Tx-r11", "supported"); + } + j.write_fieldname("bandInfoEUTRA-r11"); + band_info_eutra_r11.to_json(j); + j.end_obj(); +} + +// IntraBandContiguousCC-Info-r12 ::= SEQUENCE +intra_band_contiguous_cc_info_r12_s::intra_band_contiguous_cc_info_r12_s() +{ + four_layer_tm3_tm4_per_cc_r12_present = false; + supported_mimo_cap_dl_r12_present = false; + supported_csi_proc_r12_present = false; +} +SRSASN_CODE intra_band_contiguous_cc_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(four_layer_tm3_tm4_per_cc_r12_present, 1)); + HANDLE_CODE(bref.pack(supported_mimo_cap_dl_r12_present, 1)); + HANDLE_CODE(bref.pack(supported_csi_proc_r12_present, 1)); + + if (supported_mimo_cap_dl_r12_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_dl_r12)); + } + if (supported_csi_proc_r12_present) { + HANDLE_CODE(pack_enum(bref, supported_csi_proc_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE intra_band_contiguous_cc_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(four_layer_tm3_tm4_per_cc_r12_present, 1)); + HANDLE_CODE(bref.unpack(supported_mimo_cap_dl_r12_present, 1)); + HANDLE_CODE(bref.unpack(supported_csi_proc_r12_present, 1)); + + if (supported_mimo_cap_dl_r12_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_dl_r12, bref)); + } + if (supported_csi_proc_r12_present) { + HANDLE_CODE(unpack_enum(supported_csi_proc_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void intra_band_contiguous_cc_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (four_layer_tm3_tm4_per_cc_r12_present) { + j.write_str("fourLayerTM3-TM4-perCC-r12", "supported"); + } + if (supported_mimo_cap_dl_r12_present) { + j.write_str("supportedMIMO-CapabilityDL-r12", supported_mimo_cap_dl_r12.to_string()); + } + if (supported_csi_proc_r12_present) { + j.write_str("supportedCSI-Proc-r12", supported_csi_proc_r12.to_string()); + } + j.end_obj(); +} + +// CA-MIMO-ParametersDL-r13 ::= SEQUENCE +ca_mimo_params_dl_r13_s::ca_mimo_params_dl_r13_s() +{ + supported_mimo_cap_dl_r13_present = false; + four_layer_tm3_tm4_r13_present = false; +} +SRSASN_CODE ca_mimo_params_dl_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_mimo_cap_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(four_layer_tm3_tm4_r13_present, 1)); + + HANDLE_CODE(pack_enum(bref, ca_bw_class_dl_r13)); + if (supported_mimo_cap_dl_r13_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_dl_r13)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, intra_band_contiguous_cc_info_list_r13, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_dl_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_mimo_cap_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(four_layer_tm3_tm4_r13_present, 1)); + + HANDLE_CODE(unpack_enum(ca_bw_class_dl_r13, bref)); + if (supported_mimo_cap_dl_r13_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_dl_r13, bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(intra_band_contiguous_cc_info_list_r13, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void ca_mimo_params_dl_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ca-BandwidthClassDL-r13", ca_bw_class_dl_r13.to_string()); + if (supported_mimo_cap_dl_r13_present) { + j.write_str("supportedMIMO-CapabilityDL-r13", supported_mimo_cap_dl_r13.to_string()); + } + if (four_layer_tm3_tm4_r13_present) { + j.write_str("fourLayerTM3-TM4-r13", "supported"); + } + j.start_array("intraBandContiguousCC-InfoList-r13"); + for (uint32_t i1 = 0; i1 < intra_band_contiguous_cc_info_list_r13.size(); ++i1) { + intra_band_contiguous_cc_info_list_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// BandParameters-r13 ::= SEQUENCE +band_params_r13_s::band_params_r13_s() +{ + band_params_ul_r13_present = false; + band_params_dl_r13_present = false; + supported_csi_proc_r13_present = false; +} +SRSASN_CODE band_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_params_ul_r13_present, 1)); + HANDLE_CODE(bref.pack(band_params_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_csi_proc_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, band_eutra_r13, (uint16_t)1, (uint16_t)256)); + if (band_params_ul_r13_present) { + HANDLE_CODE(band_params_ul_r13.pack(bref)); + } + if (band_params_dl_r13_present) { + HANDLE_CODE(band_params_dl_r13.pack(bref)); + } + if (supported_csi_proc_r13_present) { + HANDLE_CODE(pack_enum(bref, supported_csi_proc_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_params_ul_r13_present, 1)); + HANDLE_CODE(bref.unpack(band_params_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_csi_proc_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(band_eutra_r13, bref, (uint16_t)1, (uint16_t)256)); + if (band_params_ul_r13_present) { + HANDLE_CODE(band_params_ul_r13.unpack(bref)); + } + if (band_params_dl_r13_present) { + HANDLE_CODE(band_params_dl_r13.unpack(bref)); + } + if (supported_csi_proc_r13_present) { + HANDLE_CODE(unpack_enum(supported_csi_proc_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void band_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandEUTRA-r13", band_eutra_r13); + if (band_params_ul_r13_present) { + j.write_fieldname("bandParametersUL-r13"); + band_params_ul_r13.to_json(j); + } + if (band_params_dl_r13_present) { + j.write_fieldname("bandParametersDL-r13"); + band_params_dl_r13.to_json(j); + } + if (supported_csi_proc_r13_present) { + j.write_str("supportedCSI-Proc-r13", supported_csi_proc_r13.to_string()); + } + j.end_obj(); +} + +// BandCombinationParameters-r13 ::= SEQUENCE +band_combination_params_r13_s::band_combination_params_r13_s() +{ + different_fallback_supported_r13_present = false; + supported_bw_combination_set_r13_present = false; + multiple_timing_advance_r13_present = false; + simul_rx_tx_r13_present = false; + dc_support_r13_present = false; + supported_naics_minus2_crs_ap_r13_present = false; + comm_supported_bands_per_bc_r13_present = false; +} +SRSASN_CODE band_combination_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(different_fallback_supported_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_bw_combination_set_r13_present, 1)); + HANDLE_CODE(bref.pack(multiple_timing_advance_r13_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_r13_present, 1)); + HANDLE_CODE(bref.pack(dc_support_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_naics_minus2_crs_ap_r13_present, 1)); + HANDLE_CODE(bref.pack(comm_supported_bands_per_bc_r13_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_r13, 1, 64)); + if (supported_bw_combination_set_r13_present) { + HANDLE_CODE(supported_bw_combination_set_r13.pack(bref)); + } + HANDLE_CODE(band_info_eutra_r13.pack(bref)); + if (dc_support_r13_present) { + HANDLE_CODE(bref.pack(dc_support_r13.async_r13_present, 1)); + HANDLE_CODE(bref.pack(dc_support_r13.supported_cell_grouping_r13_present, 1)); + if (dc_support_r13.supported_cell_grouping_r13_present) { + HANDLE_CODE(dc_support_r13.supported_cell_grouping_r13.pack(bref)); + } + } + if (supported_naics_minus2_crs_ap_r13_present) { + HANDLE_CODE(supported_naics_minus2_crs_ap_r13.pack(bref)); + } + if (comm_supported_bands_per_bc_r13_present) { + HANDLE_CODE(comm_supported_bands_per_bc_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(different_fallback_supported_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_bw_combination_set_r13_present, 1)); + HANDLE_CODE(bref.unpack(multiple_timing_advance_r13_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_r13_present, 1)); + HANDLE_CODE(bref.unpack(dc_support_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_naics_minus2_crs_ap_r13_present, 1)); + HANDLE_CODE(bref.unpack(comm_supported_bands_per_bc_r13_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_r13, bref, 1, 64)); + if (supported_bw_combination_set_r13_present) { + HANDLE_CODE(supported_bw_combination_set_r13.unpack(bref)); + } + HANDLE_CODE(band_info_eutra_r13.unpack(bref)); + if (dc_support_r13_present) { + HANDLE_CODE(bref.unpack(dc_support_r13.async_r13_present, 1)); + HANDLE_CODE(bref.unpack(dc_support_r13.supported_cell_grouping_r13_present, 1)); + if (dc_support_r13.supported_cell_grouping_r13_present) { + HANDLE_CODE(dc_support_r13.supported_cell_grouping_r13.unpack(bref)); + } + } + if (supported_naics_minus2_crs_ap_r13_present) { + HANDLE_CODE(supported_naics_minus2_crs_ap_r13.unpack(bref)); + } + if (comm_supported_bands_per_bc_r13_present) { + HANDLE_CODE(comm_supported_bands_per_bc_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (different_fallback_supported_r13_present) { + j.write_str("differentFallbackSupported-r13", "true"); + } + j.start_array("bandParameterList-r13"); + for (uint32_t i1 = 0; i1 < band_param_list_r13.size(); ++i1) { + band_param_list_r13[i1].to_json(j); + } + j.end_array(); + if (supported_bw_combination_set_r13_present) { + j.write_str("supportedBandwidthCombinationSet-r13", supported_bw_combination_set_r13.to_string()); + } + if (multiple_timing_advance_r13_present) { + j.write_str("multipleTimingAdvance-r13", "supported"); + } + if (simul_rx_tx_r13_present) { + j.write_str("simultaneousRx-Tx-r13", "supported"); + } + j.write_fieldname("bandInfoEUTRA-r13"); + band_info_eutra_r13.to_json(j); + if (dc_support_r13_present) { + j.write_fieldname("dc-Support-r13"); + j.start_obj(); + if (dc_support_r13.async_r13_present) { + j.write_str("asynchronous-r13", "supported"); + } + if (dc_support_r13.supported_cell_grouping_r13_present) { + j.write_fieldname("supportedCellGrouping-r13"); + dc_support_r13.supported_cell_grouping_r13.to_json(j); + } + j.end_obj(); + } + if (supported_naics_minus2_crs_ap_r13_present) { + j.write_str("supportedNAICS-2CRS-AP-r13", supported_naics_minus2_crs_ap_r13.to_string()); + } + if (comm_supported_bands_per_bc_r13_present) { + j.write_str("commSupportedBandsPerBC-r13", comm_supported_bands_per_bc_r13.to_string()); + } + j.end_obj(); +} + +band_combination_params_r13_s::dc_support_r13_s_::dc_support_r13_s_() +{ + async_r13_present = false; + supported_cell_grouping_r13_present = false; +} + +void band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::destroy_() +{ + switch (type_) { + case types::three_entries_r13: + c.destroy >(); + break; + case types::four_entries_r13: + c.destroy >(); + break; + case types::five_entries_r13: + c.destroy >(); + break; + default: + break; + } +} +void band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::three_entries_r13: + c.init >(); + break; + case types::four_entries_r13: + c.init >(); + break; + case types::five_entries_r13: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_"); + } +} +band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::supported_cell_grouping_r13_c_( + const band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::three_entries_r13: + c.init(other.c.get >()); + break; + case types::four_entries_r13: + c.init(other.c.get >()); + break; + case types::five_entries_r13: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_"); + } +} +band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_& +band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_:: +operator=(const band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::three_entries_r13: + c.set(other.c.get >()); + break; + case types::four_entries_r13: + c.set(other.c.get >()); + break; + case types::five_entries_r13: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_"); + } + + return *this; +} +void band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::three_entries_r13: + j.write_str("threeEntries-r13", c.get >().to_string()); + break; + case types::four_entries_r13: + j.write_str("fourEntries-r13", c.get >().to_string()); + break; + case types::five_entries_r13: + j.write_str("fiveEntries-r13", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_"); + } + j.end_obj(); +} +SRSASN_CODE band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::three_entries_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_entries_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::five_entries_r13: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::three_entries_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_entries_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::five_entries_r13: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// BandParameters-v1090 ::= SEQUENCE +band_params_v1090_s::band_params_v1090_s() +{ + ext = false; + band_eutra_v1090_present = false; +} +SRSASN_CODE band_params_v1090_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(band_eutra_v1090_present, 1)); + + if (band_eutra_v1090_present) { + HANDLE_CODE(pack_unalign_integer(bref, band_eutra_v1090, (uint16_t)65, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1090_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(band_eutra_v1090_present, 1)); + + if (band_eutra_v1090_present) { + HANDLE_CODE(unpack_unalign_integer(band_eutra_v1090, bref, (uint16_t)65, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +void band_params_v1090_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_eutra_v1090_present) { + j.write_int("bandEUTRA-v1090", band_eutra_v1090); + } + j.end_obj(); +} + +// CA-MIMO-ParametersDL-v10i0 ::= SEQUENCE +ca_mimo_params_dl_v10i0_s::ca_mimo_params_dl_v10i0_s() +{ + four_layer_tm3_tm4_r10_present = false; +} +SRSASN_CODE ca_mimo_params_dl_v10i0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(four_layer_tm3_tm4_r10_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_dl_v10i0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(four_layer_tm3_tm4_r10_present, 1)); + + return SRSASN_SUCCESS; +} +void ca_mimo_params_dl_v10i0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (four_layer_tm3_tm4_r10_present) { + j.write_str("fourLayerTM3-TM4-r10", "supported"); + } + j.end_obj(); +} + +// BandParameters-v10i0 ::= SEQUENCE +SRSASN_CODE band_params_v10i0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, band_params_dl_v10i0, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v10i0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(band_params_dl_v10i0, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void band_params_v10i0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandParametersDL-v10i0"); + for (uint32_t i1 = 0; i1 < band_params_dl_v10i0.size(); ++i1) { + band_params_dl_v10i0[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// BandCombinationParameters-v10i0 ::= SEQUENCE +band_combination_params_v10i0_s::band_combination_params_v10i0_s() +{ + band_param_list_v10i0_present = false; +} +SRSASN_CODE band_combination_params_v10i0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v10i0_present, 1)); + + if (band_param_list_v10i0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v10i0, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v10i0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v10i0_present, 1)); + + if (band_param_list_v10i0_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v10i0, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v10i0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v10i0_present) { + j.start_array("bandParameterList-v10i0"); + for (uint32_t i1 = 0; i1 < band_param_list_v10i0.size(); ++i1) { + band_param_list_v10i0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// BandParameters-v1130 ::= SEQUENCE +SRSASN_CODE band_params_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, supported_csi_proc_r11)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(supported_csi_proc_r11, bref)); + + return SRSASN_SUCCESS; +} +void band_params_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("supportedCSI-Proc-r11", supported_csi_proc_r11.to_string()); + j.end_obj(); +} + +// BandCombinationParameters-v1130 ::= SEQUENCE +band_combination_params_v1130_s::band_combination_params_v1130_s() +{ + ext = false; + multiple_timing_advance_r11_present = false; + simul_rx_tx_r11_present = false; + band_param_list_r11_present = false; +} +SRSASN_CODE band_combination_params_v1130_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(multiple_timing_advance_r11_present, 1)); + HANDLE_CODE(bref.pack(simul_rx_tx_r11_present, 1)); + HANDLE_CODE(bref.pack(band_param_list_r11_present, 1)); + + if (band_param_list_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_r11, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1130_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(multiple_timing_advance_r11_present, 1)); + HANDLE_CODE(bref.unpack(simul_rx_tx_r11_present, 1)); + HANDLE_CODE(bref.unpack(band_param_list_r11_present, 1)); + + if (band_param_list_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_r11, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multiple_timing_advance_r11_present) { + j.write_str("multipleTimingAdvance-r11", "supported"); + } + if (simul_rx_tx_r11_present) { + j.write_str("simultaneousRx-Tx-r11", "supported"); + } + if (band_param_list_r11_present) { + j.start_array("bandParameterList-r11"); + for (uint32_t i1 = 0; i1 < band_param_list_r11.size(); ++i1) { + band_param_list_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// BandCombinationParameters-v1250 ::= SEQUENCE +band_combination_params_v1250_s::band_combination_params_v1250_s() +{ + ext = false; + dc_support_r12_present = false; + supported_naics_minus2_crs_ap_r12_present = false; + comm_supported_bands_per_bc_r12_present = false; +} +SRSASN_CODE band_combination_params_v1250_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dc_support_r12_present, 1)); + HANDLE_CODE(bref.pack(supported_naics_minus2_crs_ap_r12_present, 1)); + HANDLE_CODE(bref.pack(comm_supported_bands_per_bc_r12_present, 1)); + + if (dc_support_r12_present) { + HANDLE_CODE(bref.pack(dc_support_r12.async_r12_present, 1)); + HANDLE_CODE(bref.pack(dc_support_r12.supported_cell_grouping_r12_present, 1)); + if (dc_support_r12.supported_cell_grouping_r12_present) { + HANDLE_CODE(dc_support_r12.supported_cell_grouping_r12.pack(bref)); + } + } + if (supported_naics_minus2_crs_ap_r12_present) { + HANDLE_CODE(supported_naics_minus2_crs_ap_r12.pack(bref)); + } + if (comm_supported_bands_per_bc_r12_present) { + HANDLE_CODE(comm_supported_bands_per_bc_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1250_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dc_support_r12_present, 1)); + HANDLE_CODE(bref.unpack(supported_naics_minus2_crs_ap_r12_present, 1)); + HANDLE_CODE(bref.unpack(comm_supported_bands_per_bc_r12_present, 1)); + + if (dc_support_r12_present) { + HANDLE_CODE(bref.unpack(dc_support_r12.async_r12_present, 1)); + HANDLE_CODE(bref.unpack(dc_support_r12.supported_cell_grouping_r12_present, 1)); + if (dc_support_r12.supported_cell_grouping_r12_present) { + HANDLE_CODE(dc_support_r12.supported_cell_grouping_r12.unpack(bref)); + } + } + if (supported_naics_minus2_crs_ap_r12_present) { + HANDLE_CODE(supported_naics_minus2_crs_ap_r12.unpack(bref)); + } + if (comm_supported_bands_per_bc_r12_present) { + HANDLE_CODE(comm_supported_bands_per_bc_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dc_support_r12_present) { + j.write_fieldname("dc-Support-r12"); + j.start_obj(); + if (dc_support_r12.async_r12_present) { + j.write_str("asynchronous-r12", "supported"); + } + if (dc_support_r12.supported_cell_grouping_r12_present) { + j.write_fieldname("supportedCellGrouping-r12"); + dc_support_r12.supported_cell_grouping_r12.to_json(j); + } + j.end_obj(); + } + if (supported_naics_minus2_crs_ap_r12_present) { + j.write_str("supportedNAICS-2CRS-AP-r12", supported_naics_minus2_crs_ap_r12.to_string()); + } + if (comm_supported_bands_per_bc_r12_present) { + j.write_str("commSupportedBandsPerBC-r12", comm_supported_bands_per_bc_r12.to_string()); + } + j.end_obj(); +} + +band_combination_params_v1250_s::dc_support_r12_s_::dc_support_r12_s_() +{ + async_r12_present = false; + supported_cell_grouping_r12_present = false; +} + +void band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::destroy_() +{ + switch (type_) { + case types::three_entries_r12: + c.destroy >(); + break; + case types::four_entries_r12: + c.destroy >(); + break; + case types::five_entries_r12: + c.destroy >(); + break; + default: + break; + } +} +void band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::three_entries_r12: + c.init >(); + break; + case types::four_entries_r12: + c.init >(); + break; + case types::five_entries_r12: + c.init >(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_"); + } +} +band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::supported_cell_grouping_r12_c_( + const band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::three_entries_r12: + c.init(other.c.get >()); + break; + case types::four_entries_r12: + c.init(other.c.get >()); + break; + case types::five_entries_r12: + c.init(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_"); + } +} +band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_& +band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_:: +operator=(const band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::three_entries_r12: + c.set(other.c.get >()); + break; + case types::four_entries_r12: + c.set(other.c.get >()); + break; + case types::five_entries_r12: + c.set(other.c.get >()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_"); + } + + return *this; +} +void band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::three_entries_r12: + j.write_str("threeEntries-r12", c.get >().to_string()); + break; + case types::four_entries_r12: + j.write_str("fourEntries-r12", c.get >().to_string()); + break; + case types::five_entries_r12: + j.write_str("fiveEntries-r12", c.get >().to_string()); + break; + default: + log_invalid_choice_id(type_, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_"); + } + j.end_obj(); +} +SRSASN_CODE +band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::three_entries_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::four_entries_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + case types::five_entries_r12: + HANDLE_CODE(c.get >().pack(bref)); + break; + default: + log_invalid_choice_id(type_, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::three_entries_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::four_entries_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + case types::five_entries_r12: + HANDLE_CODE(c.get >().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// CA-MIMO-ParametersDL-v1270 ::= SEQUENCE +SRSASN_CODE ca_mimo_params_dl_v1270_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, intra_band_contiguous_cc_info_list_r12, 1, 5)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_dl_v1270_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(intra_band_contiguous_cc_info_list_r12, bref, 1, 5)); + + return SRSASN_SUCCESS; +} +void ca_mimo_params_dl_v1270_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("intraBandContiguousCC-InfoList-r12"); + for (uint32_t i1 = 0; i1 < intra_band_contiguous_cc_info_list_r12.size(); ++i1) { + intra_band_contiguous_cc_info_list_r12[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// BandParameters-v1270 ::= SEQUENCE +SRSASN_CODE band_params_v1270_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, band_params_dl_v1270, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1270_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(band_params_dl_v1270, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void band_params_v1270_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandParametersDL-v1270"); + for (uint32_t i1 = 0; i1 < band_params_dl_v1270.size(); ++i1) { + band_params_dl_v1270[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// BandCombinationParameters-v1270 ::= SEQUENCE +band_combination_params_v1270_s::band_combination_params_v1270_s() +{ + band_param_list_v1270_present = false; +} +SRSASN_CODE band_combination_params_v1270_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1270_present, 1)); + + if (band_param_list_v1270_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1270, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1270_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1270_present, 1)); + + if (band_param_list_v1270_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1270, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1270_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1270_present) { + j.start_array("bandParameterList-v1270"); + for (uint32_t i1 = 0; i1 < band_param_list_v1270.size(); ++i1) { + band_param_list_v1270[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MIMO-BeamformedCapabilities-r13 ::= SEQUENCE +mimo_beamformed_capabilities_r13_s::mimo_beamformed_capabilities_r13_s() +{ + n_max_list_r13_present = false; +} +SRSASN_CODE mimo_beamformed_capabilities_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(n_max_list_r13_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, k_max_r13, (uint8_t)1, (uint8_t)8)); + if (n_max_list_r13_present) { + HANDLE_CODE(n_max_list_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_beamformed_capabilities_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(n_max_list_r13_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(k_max_r13, bref, (uint8_t)1, (uint8_t)8)); + if (n_max_list_r13_present) { + HANDLE_CODE(n_max_list_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_beamformed_capabilities_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("k-Max-r13", k_max_r13); + if (n_max_list_r13_present) { + j.write_str("n-MaxList-r13", n_max_list_r13.to_string()); + } + j.end_obj(); +} + +// MIMO-NonPrecodedCapabilities-r13 ::= SEQUENCE +mimo_non_precoded_capabilities_r13_s::mimo_non_precoded_capabilities_r13_s() +{ + cfg1_r13_present = false; + cfg2_r13_present = false; + cfg3_r13_present = false; + cfg4_r13_present = false; +} +SRSASN_CODE mimo_non_precoded_capabilities_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cfg1_r13_present, 1)); + HANDLE_CODE(bref.pack(cfg2_r13_present, 1)); + HANDLE_CODE(bref.pack(cfg3_r13_present, 1)); + HANDLE_CODE(bref.pack(cfg4_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_non_precoded_capabilities_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cfg1_r13_present, 1)); + HANDLE_CODE(bref.unpack(cfg2_r13_present, 1)); + HANDLE_CODE(bref.unpack(cfg3_r13_present, 1)); + HANDLE_CODE(bref.unpack(cfg4_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void mimo_non_precoded_capabilities_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cfg1_r13_present) { + j.write_str("config1-r13", "supported"); + } + if (cfg2_r13_present) { + j.write_str("config2-r13", "supported"); + } + if (cfg3_r13_present) { + j.write_str("config3-r13", "supported"); + } + if (cfg4_r13_present) { + j.write_str("config4-r13", "supported"); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBCPerTM-r13 ::= SEQUENCE +mimo_ca_params_per_bo_bc_per_tm_r13_s::mimo_ca_params_per_bo_bc_per_tm_r13_s() +{ + non_precoded_r13_present = false; + beamformed_r13_present = false; + dmrs_enhance_r13_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_precoded_r13_present, 1)); + HANDLE_CODE(bref.pack(beamformed_r13_present, 1)); + HANDLE_CODE(bref.pack(dmrs_enhance_r13_present, 1)); + + if (non_precoded_r13_present) { + HANDLE_CODE(non_precoded_r13.pack(bref)); + } + if (beamformed_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, beamformed_r13, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_precoded_r13_present, 1)); + HANDLE_CODE(bref.unpack(beamformed_r13_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_enhance_r13_present, 1)); + + if (non_precoded_r13_present) { + HANDLE_CODE(non_precoded_r13.unpack(bref)); + } + if (beamformed_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(beamformed_r13, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_per_tm_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_precoded_r13_present) { + j.write_fieldname("nonPrecoded-r13"); + non_precoded_r13.to_json(j); + } + if (beamformed_r13_present) { + j.start_array("beamformed-r13"); + for (uint32_t i1 = 0; i1 < beamformed_r13.size(); ++i1) { + beamformed_r13[i1].to_json(j); + } + j.end_array(); + } + if (dmrs_enhance_r13_present) { + j.write_str("dmrs-Enhancements-r13", "different"); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBC-r13 ::= SEQUENCE +mimo_ca_params_per_bo_bc_r13_s::mimo_ca_params_per_bo_bc_r13_s() +{ + params_tm9_r13_present = false; + params_tm10_r13_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(params_tm9_r13_present, 1)); + HANDLE_CODE(bref.pack(params_tm10_r13_present, 1)); + + if (params_tm9_r13_present) { + HANDLE_CODE(params_tm9_r13.pack(bref)); + } + if (params_tm10_r13_present) { + HANDLE_CODE(params_tm10_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(params_tm9_r13_present, 1)); + HANDLE_CODE(bref.unpack(params_tm10_r13_present, 1)); + + if (params_tm9_r13_present) { + HANDLE_CODE(params_tm9_r13.unpack(bref)); + } + if (params_tm10_r13_present) { + HANDLE_CODE(params_tm10_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (params_tm9_r13_present) { + j.write_fieldname("parametersTM9-r13"); + params_tm9_r13.to_json(j); + } + if (params_tm10_r13_present) { + j.write_fieldname("parametersTM10-r13"); + params_tm10_r13.to_json(j); + } + j.end_obj(); +} + +// BandParameters-v1320 ::= SEQUENCE +SRSASN_CODE band_params_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(band_params_dl_v1320.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(band_params_dl_v1320.unpack(bref)); + + return SRSASN_SUCCESS; +} +void band_params_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("bandParametersDL-v1320"); + band_params_dl_v1320.to_json(j); + j.end_obj(); +} + +// BandCombinationParameters-v1320 ::= SEQUENCE +band_combination_params_v1320_s::band_combination_params_v1320_s() +{ + band_param_list_v1320_present = false; + add_rx_tx_performance_req_r13_present = false; +} +SRSASN_CODE band_combination_params_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1320_present, 1)); + HANDLE_CODE(bref.pack(add_rx_tx_performance_req_r13_present, 1)); + + if (band_param_list_v1320_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1320, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1320_present, 1)); + HANDLE_CODE(bref.unpack(add_rx_tx_performance_req_r13_present, 1)); + + if (band_param_list_v1320_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1320, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1320_present) { + j.start_array("bandParameterList-v1320"); + for (uint32_t i1 = 0; i1 < band_param_list_v1320.size(); ++i1) { + band_param_list_v1320[i1].to_json(j); + } + j.end_array(); + } + if (add_rx_tx_performance_req_r13_present) { + j.write_str("additionalRx-Tx-PerformanceReq-r13", "supported"); + } + j.end_obj(); +} + +// BandParameters-v1380 ::= SEQUENCE +band_params_v1380_s::band_params_v1380_s() +{ + tx_ant_switch_dl_r13_present = false; + tx_ant_switch_ul_r13_present = false; +} +SRSASN_CODE band_params_v1380_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_ant_switch_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(tx_ant_switch_ul_r13_present, 1)); + + if (tx_ant_switch_dl_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_ant_switch_dl_r13, (uint8_t)1, (uint8_t)32)); + } + if (tx_ant_switch_ul_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_ant_switch_ul_r13, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1380_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tx_ant_switch_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(tx_ant_switch_ul_r13_present, 1)); + + if (tx_ant_switch_dl_r13_present) { + HANDLE_CODE(unpack_unalign_integer(tx_ant_switch_dl_r13, bref, (uint8_t)1, (uint8_t)32)); + } + if (tx_ant_switch_ul_r13_present) { + HANDLE_CODE(unpack_unalign_integer(tx_ant_switch_ul_r13, bref, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +void band_params_v1380_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_ant_switch_dl_r13_present) { + j.write_int("txAntennaSwitchDL-r13", tx_ant_switch_dl_r13); + } + if (tx_ant_switch_ul_r13_present) { + j.write_int("txAntennaSwitchUL-r13", tx_ant_switch_ul_r13); + } + j.end_obj(); +} + +// BandCombinationParameters-v1380 ::= SEQUENCE +band_combination_params_v1380_s::band_combination_params_v1380_s() +{ + band_param_list_v1380_present = false; +} +SRSASN_CODE band_combination_params_v1380_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1380_present, 1)); + + if (band_param_list_v1380_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1380, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1380_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1380_present, 1)); + + if (band_param_list_v1380_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1380, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1380_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1380_present) { + j.start_array("bandParameterList-v1380"); + for (uint32_t i1 = 0; i1 < band_param_list_v1380.size(); ++i1) { + band_param_list_v1380[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBCPerTM-v1430 ::= SEQUENCE +mimo_ca_params_per_bo_bc_per_tm_v1430_s::mimo_ca_params_per_bo_bc_per_tm_v1430_s() +{ + csi_report_np_r14_present = false; + csi_report_advanced_r14_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_report_np_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_report_advanced_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_report_np_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_advanced_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_per_tm_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_report_np_r14_present) { + j.write_str("csi-ReportingNP-r14", "different"); + } + if (csi_report_advanced_r14_present) { + j.write_str("csi-ReportingAdvanced-r14", "different"); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBC-v1430 ::= SEQUENCE +mimo_ca_params_per_bo_bc_v1430_s::mimo_ca_params_per_bo_bc_v1430_s() +{ + params_tm9_v1430_present = false; + params_tm10_v1430_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(params_tm9_v1430_present, 1)); + HANDLE_CODE(bref.pack(params_tm10_v1430_present, 1)); + + if (params_tm9_v1430_present) { + HANDLE_CODE(params_tm9_v1430.pack(bref)); + } + if (params_tm10_v1430_present) { + HANDLE_CODE(params_tm10_v1430.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(params_tm9_v1430_present, 1)); + HANDLE_CODE(bref.unpack(params_tm10_v1430_present, 1)); + + if (params_tm9_v1430_present) { + HANDLE_CODE(params_tm9_v1430.unpack(bref)); + } + if (params_tm10_v1430_present) { + HANDLE_CODE(params_tm10_v1430.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (params_tm9_v1430_present) { + j.write_fieldname("parametersTM9-v1430"); + params_tm9_v1430.to_json(j); + } + if (params_tm10_v1430_present) { + j.write_fieldname("parametersTM10-v1430"); + params_tm10_v1430.to_json(j); + } + j.end_obj(); +} + +// RetuningTimeInfo-r14 ::= SEQUENCE +SRSASN_CODE retuning_time_info_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(retuning_info.rf_retuning_time_dl_r14_present, 1)); + HANDLE_CODE(bref.pack(retuning_info.rf_retuning_time_ul_r14_present, 1)); + if (retuning_info.rf_retuning_time_dl_r14_present) { + HANDLE_CODE(pack_enum(bref, retuning_info.rf_retuning_time_dl_r14)); + } + if (retuning_info.rf_retuning_time_ul_r14_present) { + HANDLE_CODE(pack_enum(bref, retuning_info.rf_retuning_time_ul_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE retuning_time_info_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(retuning_info.rf_retuning_time_dl_r14_present, 1)); + HANDLE_CODE(bref.unpack(retuning_info.rf_retuning_time_ul_r14_present, 1)); + if (retuning_info.rf_retuning_time_dl_r14_present) { + HANDLE_CODE(unpack_enum(retuning_info.rf_retuning_time_dl_r14, bref)); + } + if (retuning_info.rf_retuning_time_ul_r14_present) { + HANDLE_CODE(unpack_enum(retuning_info.rf_retuning_time_ul_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void retuning_time_info_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("retuningInfo"); + j.start_obj(); + if (retuning_info.rf_retuning_time_dl_r14_present) { + j.write_str("rf-RetuningTimeDL-r14", retuning_info.rf_retuning_time_dl_r14.to_string()); + } + if (retuning_info.rf_retuning_time_ul_r14_present) { + j.write_str("rf-RetuningTimeUL-r14", retuning_info.rf_retuning_time_ul_r14.to_string()); + } + j.end_obj(); + j.end_obj(); +} + +retuning_time_info_r14_s::retuning_info_s_::retuning_info_s_() +{ + rf_retuning_time_dl_r14_present = false; + rf_retuning_time_ul_r14_present = false; +} + +// UL-256QAM-perCC-Info-r14 ::= SEQUENCE +ul_minus256_qam_per_cc_info_r14_s::ul_minus256_qam_per_cc_info_r14_s() +{ + ul_minus256_qam_per_cc_r14_present = false; +} +SRSASN_CODE ul_minus256_qam_per_cc_info_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_minus256_qam_per_cc_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_minus256_qam_per_cc_info_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_minus256_qam_per_cc_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void ul_minus256_qam_per_cc_info_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_minus256_qam_per_cc_r14_present) { + j.write_str("ul-256QAM-perCC-r14", "supported"); + } + j.end_obj(); +} + +// BandParameters-v1430 ::= SEQUENCE +band_params_v1430_s::band_params_v1430_s() +{ + band_params_dl_v1430_present = false; + ul_minus256_qam_r14_present = false; + ul_minus256_qam_per_cc_info_list_r14_present = false; + retuning_time_info_band_list_r14_present = false; +} +SRSASN_CODE band_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_params_dl_v1430_present, 1)); + HANDLE_CODE(bref.pack(ul_minus256_qam_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_minus256_qam_per_cc_info_list_r14_present, 1)); + HANDLE_CODE(bref.pack(retuning_time_info_band_list_r14_present, 1)); + + if (band_params_dl_v1430_present) { + HANDLE_CODE(band_params_dl_v1430.pack(bref)); + } + if (ul_minus256_qam_per_cc_info_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_minus256_qam_per_cc_info_list_r14, 2, 32)); + } + if (retuning_time_info_band_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, retuning_time_info_band_list_r14, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_params_dl_v1430_present, 1)); + HANDLE_CODE(bref.unpack(ul_minus256_qam_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_minus256_qam_per_cc_info_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(retuning_time_info_band_list_r14_present, 1)); + + if (band_params_dl_v1430_present) { + HANDLE_CODE(band_params_dl_v1430.unpack(bref)); + } + if (ul_minus256_qam_per_cc_info_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_minus256_qam_per_cc_info_list_r14, bref, 2, 32)); + } + if (retuning_time_info_band_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(retuning_time_info_band_list_r14, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_params_dl_v1430_present) { + j.write_fieldname("bandParametersDL-v1430"); + band_params_dl_v1430.to_json(j); + } + if (ul_minus256_qam_r14_present) { + j.write_str("ul-256QAM-r14", "supported"); + } + if (ul_minus256_qam_per_cc_info_list_r14_present) { + j.start_array("ul-256QAM-perCC-InfoList-r14"); + for (uint32_t i1 = 0; i1 < ul_minus256_qam_per_cc_info_list_r14.size(); ++i1) { + ul_minus256_qam_per_cc_info_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (retuning_time_info_band_list_r14_present) { + j.start_array("retuningTimeInfoBandList-r14"); + for (uint32_t i1 = 0; i1 < retuning_time_info_band_list_r14.size(); ++i1) { + retuning_time_info_band_list_r14[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// BandCombinationParameters-v1430 ::= SEQUENCE +band_combination_params_v1430_s::band_combination_params_v1430_s() +{ + band_param_list_v1430_present = false; + v2x_supported_tx_band_comb_list_per_bc_r14_present = false; + v2x_supported_rx_band_comb_list_per_bc_r14_present = false; +} +SRSASN_CODE band_combination_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1430_present, 1)); + HANDLE_CODE(bref.pack(v2x_supported_tx_band_comb_list_per_bc_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_supported_rx_band_comb_list_per_bc_r14_present, 1)); + + if (band_param_list_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1430, 1, 64)); + } + if (v2x_supported_tx_band_comb_list_per_bc_r14_present) { + HANDLE_CODE(v2x_supported_tx_band_comb_list_per_bc_r14.pack(bref)); + } + if (v2x_supported_rx_band_comb_list_per_bc_r14_present) { + HANDLE_CODE(v2x_supported_rx_band_comb_list_per_bc_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1430_present, 1)); + HANDLE_CODE(bref.unpack(v2x_supported_tx_band_comb_list_per_bc_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_supported_rx_band_comb_list_per_bc_r14_present, 1)); + + if (band_param_list_v1430_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1430, bref, 1, 64)); + } + if (v2x_supported_tx_band_comb_list_per_bc_r14_present) { + HANDLE_CODE(v2x_supported_tx_band_comb_list_per_bc_r14.unpack(bref)); + } + if (v2x_supported_rx_band_comb_list_per_bc_r14_present) { + HANDLE_CODE(v2x_supported_rx_band_comb_list_per_bc_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1430_present) { + j.start_array("bandParameterList-v1430"); + for (uint32_t i1 = 0; i1 < band_param_list_v1430.size(); ++i1) { + band_param_list_v1430[i1].to_json(j); + } + j.end_array(); + } + if (v2x_supported_tx_band_comb_list_per_bc_r14_present) { + j.write_str("v2x-SupportedTxBandCombListPerBC-r14", v2x_supported_tx_band_comb_list_per_bc_r14.to_string()); + } + if (v2x_supported_rx_band_comb_list_per_bc_r14_present) { + j.write_str("v2x-SupportedRxBandCombListPerBC-r14", v2x_supported_rx_band_comb_list_per_bc_r14.to_string()); + } + j.end_obj(); +} + +// MUST-Parameters-r14 ::= SEQUENCE +must_params_r14_s::must_params_r14_s() +{ + must_tm234_up_to2_tx_r14_present = false; + must_tm89_up_to_one_interfering_layer_r14_present = false; + must_tm10_up_to_one_interfering_layer_r14_present = false; + must_tm89_up_to_three_interfering_layers_r14_present = false; + must_tm10_up_to_three_interfering_layers_r14_present = false; +} +SRSASN_CODE must_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(must_tm234_up_to2_tx_r14_present, 1)); + HANDLE_CODE(bref.pack(must_tm89_up_to_one_interfering_layer_r14_present, 1)); + HANDLE_CODE(bref.pack(must_tm10_up_to_one_interfering_layer_r14_present, 1)); + HANDLE_CODE(bref.pack(must_tm89_up_to_three_interfering_layers_r14_present, 1)); + HANDLE_CODE(bref.pack(must_tm10_up_to_three_interfering_layers_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE must_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(must_tm234_up_to2_tx_r14_present, 1)); + HANDLE_CODE(bref.unpack(must_tm89_up_to_one_interfering_layer_r14_present, 1)); + HANDLE_CODE(bref.unpack(must_tm10_up_to_one_interfering_layer_r14_present, 1)); + HANDLE_CODE(bref.unpack(must_tm89_up_to_three_interfering_layers_r14_present, 1)); + HANDLE_CODE(bref.unpack(must_tm10_up_to_three_interfering_layers_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void must_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (must_tm234_up_to2_tx_r14_present) { + j.write_str("must-TM234-UpTo2Tx-r14", "supported"); + } + if (must_tm89_up_to_one_interfering_layer_r14_present) { + j.write_str("must-TM89-UpToOneInterferingLayer-r14", "supported"); + } + if (must_tm10_up_to_one_interfering_layer_r14_present) { + j.write_str("must-TM10-UpToOneInterferingLayer-r14", "supported"); + } + if (must_tm89_up_to_three_interfering_layers_r14_present) { + j.write_str("must-TM89-UpToThreeInterferingLayers-r14", "supported"); + } + if (must_tm10_up_to_three_interfering_layers_r14_present) { + j.write_str("must-TM10-UpToThreeInterferingLayers-r14", "supported"); + } + j.end_obj(); +} + +// BandParameters-v1450 ::= SEQUENCE +band_params_v1450_s::band_params_v1450_s() +{ + must_cap_per_band_r14_present = false; +} +SRSASN_CODE band_params_v1450_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(must_cap_per_band_r14_present, 1)); + + if (must_cap_per_band_r14_present) { + HANDLE_CODE(must_cap_per_band_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1450_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(must_cap_per_band_r14_present, 1)); + + if (must_cap_per_band_r14_present) { + HANDLE_CODE(must_cap_per_band_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_params_v1450_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (must_cap_per_band_r14_present) { + j.write_fieldname("must-CapabilityPerBand-r14"); + must_cap_per_band_r14.to_json(j); + } + j.end_obj(); +} + +// BandCombinationParameters-v1450 ::= SEQUENCE +band_combination_params_v1450_s::band_combination_params_v1450_s() +{ + band_param_list_v1450_present = false; +} +SRSASN_CODE band_combination_params_v1450_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1450_present, 1)); + + if (band_param_list_v1450_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1450, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1450_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1450_present, 1)); + + if (band_param_list_v1450_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1450, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1450_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1450_present) { + j.start_array("bandParameterList-v1450"); + for (uint32_t i1 = 0; i1 < band_param_list_v1450.size(); ++i1) { + band_param_list_v1450[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBCPerTM-v1470 ::= SEQUENCE +mimo_ca_params_per_bo_bc_per_tm_v1470_s::mimo_ca_params_per_bo_bc_per_tm_v1470_s() +{ + csi_report_advanced_max_ports_r14_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_report_advanced_max_ports_r14_present, 1)); + + if (csi_report_advanced_max_ports_r14_present) { + HANDLE_CODE(pack_enum(bref, csi_report_advanced_max_ports_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_report_advanced_max_ports_r14_present, 1)); + + if (csi_report_advanced_max_ports_r14_present) { + HANDLE_CODE(unpack_enum(csi_report_advanced_max_ports_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_per_tm_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_report_advanced_max_ports_r14_present) { + j.write_str("csi-ReportingAdvancedMaxPorts-r14", csi_report_advanced_max_ports_r14.to_string()); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBC-v1470 ::= SEQUENCE +SRSASN_CODE mimo_ca_params_per_bo_bc_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(params_tm9_v1470.pack(bref)); + HANDLE_CODE(params_tm10_v1470.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(params_tm9_v1470.unpack(bref)); + HANDLE_CODE(params_tm10_v1470.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("parametersTM9-v1470"); + params_tm9_v1470.to_json(j); + j.write_fieldname("parametersTM10-v1470"); + params_tm10_v1470.to_json(j); + j.end_obj(); +} + +// BandParameters-v1470 ::= SEQUENCE +band_params_v1470_s::band_params_v1470_s() +{ + band_params_dl_v1470_present = false; +} +SRSASN_CODE band_params_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_params_dl_v1470_present, 1)); + + if (band_params_dl_v1470_present) { + HANDLE_CODE(band_params_dl_v1470.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_params_dl_v1470_present, 1)); + + if (band_params_dl_v1470_present) { + HANDLE_CODE(band_params_dl_v1470.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_params_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_params_dl_v1470_present) { + j.write_fieldname("bandParametersDL-v1470"); + band_params_dl_v1470.to_json(j); + } + j.end_obj(); +} + +// BandCombinationParameters-v1470 ::= SEQUENCE +band_combination_params_v1470_s::band_combination_params_v1470_s() +{ + band_param_list_v1470_present = false; + srs_max_simul_ccs_r14_present = false; +} +SRSASN_CODE band_combination_params_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1470_present, 1)); + HANDLE_CODE(bref.pack(srs_max_simul_ccs_r14_present, 1)); + + if (band_param_list_v1470_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1470, 1, 64)); + } + if (srs_max_simul_ccs_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, srs_max_simul_ccs_r14, (uint8_t)1, (uint8_t)31)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1470_present, 1)); + HANDLE_CODE(bref.unpack(srs_max_simul_ccs_r14_present, 1)); + + if (band_param_list_v1470_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1470, bref, 1, 64)); + } + if (srs_max_simul_ccs_r14_present) { + HANDLE_CODE(unpack_unalign_integer(srs_max_simul_ccs_r14, bref, (uint8_t)1, (uint8_t)31)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1470_present) { + j.start_array("bandParameterList-v1470"); + for (uint32_t i1 = 0; i1 < band_param_list_v1470.size(); ++i1) { + band_param_list_v1470[i1].to_json(j); + } + j.end_array(); + } + if (srs_max_simul_ccs_r14_present) { + j.write_int("srs-MaxSimultaneousCCs-r14", srs_max_simul_ccs_r14); + } + j.end_obj(); +} + +// DL-UL-CCs-r15 ::= SEQUENCE +dl_ul_ccs_r15_s::dl_ul_ccs_r15_s() +{ + max_num_dl_ccs_r15_present = false; + max_num_ul_ccs_r15_present = false; +} +SRSASN_CODE dl_ul_ccs_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_num_dl_ccs_r15_present, 1)); + HANDLE_CODE(bref.pack(max_num_ul_ccs_r15_present, 1)); + + if (max_num_dl_ccs_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_num_dl_ccs_r15, (uint8_t)1, (uint8_t)32)); + } + if (max_num_ul_ccs_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_num_ul_ccs_r15, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ul_ccs_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_num_dl_ccs_r15_present, 1)); + HANDLE_CODE(bref.unpack(max_num_ul_ccs_r15_present, 1)); + + if (max_num_dl_ccs_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_num_dl_ccs_r15, bref, (uint8_t)1, (uint8_t)32)); + } + if (max_num_ul_ccs_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_num_ul_ccs_r15, bref, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +void dl_ul_ccs_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (max_num_dl_ccs_r15_present) { + j.write_int("maxNumberDL-CCs-r15", max_num_dl_ccs_r15); + } + if (max_num_ul_ccs_r15_present) { + j.write_int("maxNumberUL-CCs-r15", max_num_ul_ccs_r15); + } + j.end_obj(); +} + +// CA-MIMO-ParametersDL-r15 ::= SEQUENCE +ca_mimo_params_dl_r15_s::ca_mimo_params_dl_r15_s() +{ + supported_mimo_cap_dl_r15_present = false; + four_layer_tm3_tm4_r15_present = false; + intra_band_contiguous_cc_info_list_r15_present = false; +} +SRSASN_CODE ca_mimo_params_dl_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_mimo_cap_dl_r15_present, 1)); + HANDLE_CODE(bref.pack(four_layer_tm3_tm4_r15_present, 1)); + HANDLE_CODE(bref.pack(intra_band_contiguous_cc_info_list_r15_present, 1)); + + if (supported_mimo_cap_dl_r15_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_dl_r15)); + } + if (intra_band_contiguous_cc_info_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, intra_band_contiguous_cc_info_list_r15, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_dl_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_mimo_cap_dl_r15_present, 1)); + HANDLE_CODE(bref.unpack(four_layer_tm3_tm4_r15_present, 1)); + HANDLE_CODE(bref.unpack(intra_band_contiguous_cc_info_list_r15_present, 1)); + + if (supported_mimo_cap_dl_r15_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_dl_r15, bref)); + } + if (intra_band_contiguous_cc_info_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(intra_band_contiguous_cc_info_list_r15, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void ca_mimo_params_dl_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_mimo_cap_dl_r15_present) { + j.write_str("supportedMIMO-CapabilityDL-r15", supported_mimo_cap_dl_r15.to_string()); + } + if (four_layer_tm3_tm4_r15_present) { + j.write_str("fourLayerTM3-TM4-r15", "supported"); + } + if (intra_band_contiguous_cc_info_list_r15_present) { + j.start_array("intraBandContiguousCC-InfoList-r15"); + for (uint32_t i1 = 0; i1 < intra_band_contiguous_cc_info_list_r15.size(); ++i1) { + intra_band_contiguous_cc_info_list_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CA-MIMO-ParametersUL-r15 ::= SEQUENCE +ca_mimo_params_ul_r15_s::ca_mimo_params_ul_r15_s() +{ + supported_mimo_cap_ul_r15_present = false; +} +SRSASN_CODE ca_mimo_params_ul_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_mimo_cap_ul_r15_present, 1)); + + if (supported_mimo_cap_ul_r15_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_ul_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ca_mimo_params_ul_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_mimo_cap_ul_r15_present, 1)); + + if (supported_mimo_cap_ul_r15_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_ul_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void ca_mimo_params_ul_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_mimo_cap_ul_r15_present) { + j.write_str("supportedMIMO-CapabilityUL-r15", supported_mimo_cap_ul_r15.to_string()); + } + j.end_obj(); +} + +// STTI-SupportedCombinations-r15 ::= SEQUENCE +stti_supported_combinations_r15_s::stti_supported_combinations_r15_s() +{ + combination_minus22_r15_present = false; + combination_minus77_r15_present = false; + combination_minus27_r15_present = false; + combination_minus22_minus27_r15_present = false; + combination_minus77_minus22_r15_present = false; + combination_minus77_minus27_r15_present = false; +} +SRSASN_CODE stti_supported_combinations_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(combination_minus22_r15_present, 1)); + HANDLE_CODE(bref.pack(combination_minus77_r15_present, 1)); + HANDLE_CODE(bref.pack(combination_minus27_r15_present, 1)); + HANDLE_CODE(bref.pack(combination_minus22_minus27_r15_present, 1)); + HANDLE_CODE(bref.pack(combination_minus77_minus22_r15_present, 1)); + HANDLE_CODE(bref.pack(combination_minus77_minus27_r15_present, 1)); + + if (combination_minus22_r15_present) { + HANDLE_CODE(combination_minus22_r15.pack(bref)); + } + if (combination_minus77_r15_present) { + HANDLE_CODE(combination_minus77_r15.pack(bref)); + } + if (combination_minus27_r15_present) { + HANDLE_CODE(combination_minus27_r15.pack(bref)); + } + if (combination_minus22_minus27_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, combination_minus22_minus27_r15, 1, 2)); + } + if (combination_minus77_minus22_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, combination_minus77_minus22_r15, 1, 2)); + } + if (combination_minus77_minus27_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, combination_minus77_minus27_r15, 1, 2)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE stti_supported_combinations_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(combination_minus22_r15_present, 1)); + HANDLE_CODE(bref.unpack(combination_minus77_r15_present, 1)); + HANDLE_CODE(bref.unpack(combination_minus27_r15_present, 1)); + HANDLE_CODE(bref.unpack(combination_minus22_minus27_r15_present, 1)); + HANDLE_CODE(bref.unpack(combination_minus77_minus22_r15_present, 1)); + HANDLE_CODE(bref.unpack(combination_minus77_minus27_r15_present, 1)); + + if (combination_minus22_r15_present) { + HANDLE_CODE(combination_minus22_r15.unpack(bref)); + } + if (combination_minus77_r15_present) { + HANDLE_CODE(combination_minus77_r15.unpack(bref)); + } + if (combination_minus27_r15_present) { + HANDLE_CODE(combination_minus27_r15.unpack(bref)); + } + if (combination_minus22_minus27_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(combination_minus22_minus27_r15, bref, 1, 2)); + } + if (combination_minus77_minus22_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(combination_minus77_minus22_r15, bref, 1, 2)); + } + if (combination_minus77_minus27_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(combination_minus77_minus27_r15, bref, 1, 2)); + } + + return SRSASN_SUCCESS; +} +void stti_supported_combinations_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (combination_minus22_r15_present) { + j.write_fieldname("combination-22-r15"); + combination_minus22_r15.to_json(j); + } + if (combination_minus77_r15_present) { + j.write_fieldname("combination-77-r15"); + combination_minus77_r15.to_json(j); + } + if (combination_minus27_r15_present) { + j.write_fieldname("combination-27-r15"); + combination_minus27_r15.to_json(j); + } + if (combination_minus22_minus27_r15_present) { + j.start_array("combination-22-27-r15"); + for (uint32_t i1 = 0; i1 < combination_minus22_minus27_r15.size(); ++i1) { + combination_minus22_minus27_r15[i1].to_json(j); + } + j.end_array(); + } + if (combination_minus77_minus22_r15_present) { + j.start_array("combination-77-22-r15"); + for (uint32_t i1 = 0; i1 < combination_minus77_minus22_r15.size(); ++i1) { + combination_minus77_minus22_r15[i1].to_json(j); + } + j.end_array(); + } + if (combination_minus77_minus27_r15_present) { + j.start_array("combination-77-27-r15"); + for (uint32_t i1 = 0; i1 < combination_minus77_minus27_r15.size(); ++i1) { + combination_minus77_minus27_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// STTI-SPT-BandParameters-r15 ::= SEQUENCE +stti_spt_band_params_r15_s::stti_spt_band_params_r15_s() +{ + ext = false; + dl_minus1024_qam_slot_r15_present = false; + dl_minus1024_qam_subslot_ta_minus1_r15_present = false; + dl_minus1024_qam_subslot_ta_minus2_r15_present = false; + simul_tx_different_tx_dur_r15_present = false; + s_tti_ca_mimo_params_dl_r15_present = false; + s_tti_fd_mimo_coexistence_present = false; + s_tti_mimo_ca_params_per_bo_bcs_r15_present = false; + s_tti_mimo_ca_params_per_bo_bcs_v1530_present = false; + s_tti_supported_combinations_r15_present = false; + s_tti_supported_csi_proc_r15_present = false; + ul_minus256_qam_slot_r15_present = false; + ul_minus256_qam_subslot_r15_present = false; +} +SRSASN_CODE stti_spt_band_params_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dl_minus1024_qam_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(dl_minus1024_qam_subslot_ta_minus1_r15_present, 1)); + HANDLE_CODE(bref.pack(dl_minus1024_qam_subslot_ta_minus2_r15_present, 1)); + HANDLE_CODE(bref.pack(simul_tx_different_tx_dur_r15_present, 1)); + HANDLE_CODE(bref.pack(s_tti_ca_mimo_params_dl_r15_present, 1)); + HANDLE_CODE(bref.pack(s_tti_fd_mimo_coexistence_present, 1)); + HANDLE_CODE(bref.pack(s_tti_mimo_ca_params_per_bo_bcs_r15_present, 1)); + HANDLE_CODE(bref.pack(s_tti_mimo_ca_params_per_bo_bcs_v1530_present, 1)); + HANDLE_CODE(bref.pack(s_tti_supported_combinations_r15_present, 1)); + HANDLE_CODE(bref.pack(s_tti_supported_csi_proc_r15_present, 1)); + HANDLE_CODE(bref.pack(ul_minus256_qam_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(ul_minus256_qam_subslot_r15_present, 1)); + + if (s_tti_ca_mimo_params_dl_r15_present) { + HANDLE_CODE(s_tti_ca_mimo_params_dl_r15.pack(bref)); + } + HANDLE_CODE(s_tti_ca_mimo_params_ul_r15.pack(bref)); + if (s_tti_mimo_ca_params_per_bo_bcs_r15_present) { + HANDLE_CODE(s_tti_mimo_ca_params_per_bo_bcs_r15.pack(bref)); + } + if (s_tti_mimo_ca_params_per_bo_bcs_v1530_present) { + HANDLE_CODE(s_tti_mimo_ca_params_per_bo_bcs_v1530.pack(bref)); + } + if (s_tti_supported_combinations_r15_present) { + HANDLE_CODE(s_tti_supported_combinations_r15.pack(bref)); + } + if (s_tti_supported_csi_proc_r15_present) { + HANDLE_CODE(pack_enum(bref, s_tti_supported_csi_proc_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE stti_spt_band_params_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dl_minus1024_qam_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(dl_minus1024_qam_subslot_ta_minus1_r15_present, 1)); + HANDLE_CODE(bref.unpack(dl_minus1024_qam_subslot_ta_minus2_r15_present, 1)); + HANDLE_CODE(bref.unpack(simul_tx_different_tx_dur_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_tti_ca_mimo_params_dl_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_tti_fd_mimo_coexistence_present, 1)); + HANDLE_CODE(bref.unpack(s_tti_mimo_ca_params_per_bo_bcs_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_tti_mimo_ca_params_per_bo_bcs_v1530_present, 1)); + HANDLE_CODE(bref.unpack(s_tti_supported_combinations_r15_present, 1)); + HANDLE_CODE(bref.unpack(s_tti_supported_csi_proc_r15_present, 1)); + HANDLE_CODE(bref.unpack(ul_minus256_qam_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(ul_minus256_qam_subslot_r15_present, 1)); + + if (s_tti_ca_mimo_params_dl_r15_present) { + HANDLE_CODE(s_tti_ca_mimo_params_dl_r15.unpack(bref)); + } + HANDLE_CODE(s_tti_ca_mimo_params_ul_r15.unpack(bref)); + if (s_tti_mimo_ca_params_per_bo_bcs_r15_present) { + HANDLE_CODE(s_tti_mimo_ca_params_per_bo_bcs_r15.unpack(bref)); + } + if (s_tti_mimo_ca_params_per_bo_bcs_v1530_present) { + HANDLE_CODE(s_tti_mimo_ca_params_per_bo_bcs_v1530.unpack(bref)); + } + if (s_tti_supported_combinations_r15_present) { + HANDLE_CODE(s_tti_supported_combinations_r15.unpack(bref)); + } + if (s_tti_supported_csi_proc_r15_present) { + HANDLE_CODE(unpack_enum(s_tti_supported_csi_proc_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void stti_spt_band_params_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_minus1024_qam_slot_r15_present) { + j.write_str("dl-1024QAM-Slot-r15", "supported"); + } + if (dl_minus1024_qam_subslot_ta_minus1_r15_present) { + j.write_str("dl-1024QAM-SubslotTA-1-r15", "supported"); + } + if (dl_minus1024_qam_subslot_ta_minus2_r15_present) { + j.write_str("dl-1024QAM-SubslotTA-2-r15", "supported"); + } + if (simul_tx_different_tx_dur_r15_present) { + j.write_str("simultaneousTx-differentTx-duration-r15", "supported"); + } + if (s_tti_ca_mimo_params_dl_r15_present) { + j.write_fieldname("sTTI-CA-MIMO-ParametersDL-r15"); + s_tti_ca_mimo_params_dl_r15.to_json(j); + } + j.write_fieldname("sTTI-CA-MIMO-ParametersUL-r15"); + s_tti_ca_mimo_params_ul_r15.to_json(j); + if (s_tti_fd_mimo_coexistence_present) { + j.write_str("sTTI-FD-MIMO-Coexistence", "supported"); + } + if (s_tti_mimo_ca_params_per_bo_bcs_r15_present) { + j.write_fieldname("sTTI-MIMO-CA-ParametersPerBoBCs-r15"); + s_tti_mimo_ca_params_per_bo_bcs_r15.to_json(j); + } + if (s_tti_mimo_ca_params_per_bo_bcs_v1530_present) { + j.write_fieldname("sTTI-MIMO-CA-ParametersPerBoBCs-v1530"); + s_tti_mimo_ca_params_per_bo_bcs_v1530.to_json(j); + } + if (s_tti_supported_combinations_r15_present) { + j.write_fieldname("sTTI-SupportedCombinations-r15"); + s_tti_supported_combinations_r15.to_json(j); + } + if (s_tti_supported_csi_proc_r15_present) { + j.write_str("sTTI-SupportedCSI-Proc-r15", s_tti_supported_csi_proc_r15.to_string()); + } + if (ul_minus256_qam_slot_r15_present) { + j.write_str("ul-256QAM-Slot-r15", "supported"); + } + if (ul_minus256_qam_subslot_r15_present) { + j.write_str("ul-256QAM-Subslot-r15", "supported"); + } + j.end_obj(); +} + +// BandParameters-v1530 ::= SEQUENCE +band_params_v1530_s::band_params_v1530_s() +{ + ue_tx_ant_sel_srs_minus1_t4_r_r15_present = false; + ue_tx_ant_sel_srs_minus2_t4_r_minus2_pairs_r15_present = false; + ue_tx_ant_sel_srs_minus2_t4_r_minus3_pairs_r15_present = false; + dl_minus1024_qam_r15_present = false; + qcl_type_c_operation_r15_present = false; + qcl_cri_based_csi_report_r15_present = false; + stti_spt_band_params_r15_present = false; +} +SRSASN_CODE band_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_tx_ant_sel_srs_minus1_t4_r_r15_present, 1)); + HANDLE_CODE(bref.pack(ue_tx_ant_sel_srs_minus2_t4_r_minus2_pairs_r15_present, 1)); + HANDLE_CODE(bref.pack(ue_tx_ant_sel_srs_minus2_t4_r_minus3_pairs_r15_present, 1)); + HANDLE_CODE(bref.pack(dl_minus1024_qam_r15_present, 1)); + HANDLE_CODE(bref.pack(qcl_type_c_operation_r15_present, 1)); + HANDLE_CODE(bref.pack(qcl_cri_based_csi_report_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_band_params_r15_present, 1)); + + if (stti_spt_band_params_r15_present) { + HANDLE_CODE(stti_spt_band_params_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_tx_ant_sel_srs_minus1_t4_r_r15_present, 1)); + HANDLE_CODE(bref.unpack(ue_tx_ant_sel_srs_minus2_t4_r_minus2_pairs_r15_present, 1)); + HANDLE_CODE(bref.unpack(ue_tx_ant_sel_srs_minus2_t4_r_minus3_pairs_r15_present, 1)); + HANDLE_CODE(bref.unpack(dl_minus1024_qam_r15_present, 1)); + HANDLE_CODE(bref.unpack(qcl_type_c_operation_r15_present, 1)); + HANDLE_CODE(bref.unpack(qcl_cri_based_csi_report_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_band_params_r15_present, 1)); + + if (stti_spt_band_params_r15_present) { + HANDLE_CODE(stti_spt_band_params_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_tx_ant_sel_srs_minus1_t4_r_r15_present) { + j.write_str("ue-TxAntennaSelection-SRS-1T4R-r15", "supported"); + } + if (ue_tx_ant_sel_srs_minus2_t4_r_minus2_pairs_r15_present) { + j.write_str("ue-TxAntennaSelection-SRS-2T4R-2Pairs-r15", "supported"); + } + if (ue_tx_ant_sel_srs_minus2_t4_r_minus3_pairs_r15_present) { + j.write_str("ue-TxAntennaSelection-SRS-2T4R-3Pairs-r15", "supported"); + } + if (dl_minus1024_qam_r15_present) { + j.write_str("dl-1024QAM-r15", "supported"); + } + if (qcl_type_c_operation_r15_present) { + j.write_str("qcl-TypeC-Operation-r15", "supported"); + } + if (qcl_cri_based_csi_report_r15_present) { + j.write_str("qcl-CRI-BasedCSI-Reporting-r15", "supported"); + } + if (stti_spt_band_params_r15_present) { + j.write_fieldname("stti-SPT-BandParameters-r15"); + stti_spt_band_params_r15.to_json(j); + } + j.end_obj(); +} + +// SPT-Parameters-r15 ::= SEQUENCE +spt_params_r15_s::spt_params_r15_s() +{ + frame_structure_type_spt_r15_present = false; + max_num_ccs_spt_r15_present = false; +} +SRSASN_CODE spt_params_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(frame_structure_type_spt_r15_present, 1)); + HANDLE_CODE(bref.pack(max_num_ccs_spt_r15_present, 1)); + + if (frame_structure_type_spt_r15_present) { + HANDLE_CODE(frame_structure_type_spt_r15.pack(bref)); + } + if (max_num_ccs_spt_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_num_ccs_spt_r15, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE spt_params_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(frame_structure_type_spt_r15_present, 1)); + HANDLE_CODE(bref.unpack(max_num_ccs_spt_r15_present, 1)); + + if (frame_structure_type_spt_r15_present) { + HANDLE_CODE(frame_structure_type_spt_r15.unpack(bref)); + } + if (max_num_ccs_spt_r15_present) { + HANDLE_CODE(unpack_unalign_integer(max_num_ccs_spt_r15, bref, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +void spt_params_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (frame_structure_type_spt_r15_present) { + j.write_str("frameStructureType-SPT-r15", frame_structure_type_spt_r15.to_string()); + } + if (max_num_ccs_spt_r15_present) { + j.write_int("maxNumberCCs-SPT-r15", max_num_ccs_spt_r15); + } + j.end_obj(); +} + +// BandCombinationParameters-v1530 ::= SEQUENCE +band_combination_params_v1530_s::band_combination_params_v1530_s() +{ + band_param_list_v1530_present = false; + spt_params_r15_present = false; +} +SRSASN_CODE band_combination_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_param_list_v1530_present, 1)); + HANDLE_CODE(bref.pack(spt_params_r15_present, 1)); + + if (band_param_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, band_param_list_v1530, 1, 64)); + } + if (spt_params_r15_present) { + HANDLE_CODE(spt_params_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_param_list_v1530_present, 1)); + HANDLE_CODE(bref.unpack(spt_params_r15_present, 1)); + + if (band_param_list_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(band_param_list_v1530, bref, 1, 64)); + } + if (spt_params_r15_present) { + HANDLE_CODE(spt_params_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_param_list_v1530_present) { + j.start_array("bandParameterList-v1530"); + for (uint32_t i1 = 0; i1 < band_param_list_v1530.size(); ++i1) { + band_param_list_v1530[i1].to_json(j); + } + j.end_array(); + } + if (spt_params_r15_present) { + j.write_fieldname("spt-Parameters-r15"); + spt_params_r15.to_json(j); + } + j.end_obj(); +} + +// BandCombinationParametersExt-r10 ::= SEQUENCE +band_combination_params_ext_r10_s::band_combination_params_ext_r10_s() +{ + supported_bw_combination_set_r10_present = false; +} +SRSASN_CODE band_combination_params_ext_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_bw_combination_set_r10_present, 1)); + + if (supported_bw_combination_set_r10_present) { + HANDLE_CODE(supported_bw_combination_set_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_ext_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_bw_combination_set_r10_present, 1)); + + if (supported_bw_combination_set_r10_present) { + HANDLE_CODE(supported_bw_combination_set_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void band_combination_params_ext_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_bw_combination_set_r10_present) { + j.write_str("supportedBandwidthCombinationSet-r10", supported_bw_combination_set_r10.to_string()); + } + j.end_obj(); +} + +// BandParametersRxSL-r14 ::= SEQUENCE +band_params_rx_sl_r14_s::band_params_rx_sl_r14_s() +{ + v2x_high_reception_r14_present = false; +} +SRSASN_CODE band_params_rx_sl_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_high_reception_r14_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_bw_class_rx_sl_r14, 1, 16, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_rx_sl_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_high_reception_r14_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(v2x_bw_class_rx_sl_r14, bref, 1, 16, EnumPacker())); + + return SRSASN_SUCCESS; +} +void band_params_rx_sl_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("v2x-BandwidthClassRxSL-r14"); + for (uint32_t i1 = 0; i1 < v2x_bw_class_rx_sl_r14.size(); ++i1) { + j.write_str(v2x_bw_class_rx_sl_r14[i1].to_string()); + } + j.end_array(); + if (v2x_high_reception_r14_present) { + j.write_str("v2x-HighReception-r14", "supported"); + } + j.end_obj(); +} + +// BandParametersTxSL-r14 ::= SEQUENCE +band_params_tx_sl_r14_s::band_params_tx_sl_r14_s() +{ + v2x_e_nb_sched_r14_present = false; + v2x_high_pwr_r14_present = false; +} +SRSASN_CODE band_params_tx_sl_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_e_nb_sched_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_high_pwr_r14_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_bw_class_tx_sl_r14, 1, 16, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_params_tx_sl_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_e_nb_sched_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_high_pwr_r14_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(v2x_bw_class_tx_sl_r14, bref, 1, 16, EnumPacker())); + + return SRSASN_SUCCESS; +} +void band_params_tx_sl_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("v2x-BandwidthClassTxSL-r14"); + for (uint32_t i1 = 0; i1 < v2x_bw_class_tx_sl_r14.size(); ++i1) { + j.write_str(v2x_bw_class_tx_sl_r14[i1].to_string()); + } + j.end_array(); + if (v2x_e_nb_sched_r14_present) { + j.write_str("v2x-eNB-Scheduled-r14", "supported"); + } + if (v2x_high_pwr_r14_present) { + j.write_str("v2x-HighPower-r14", "supported"); + } + j.end_obj(); +} + +// FeatureSetDL-PerCC-r15 ::= SEQUENCE +feature_set_dl_per_cc_r15_s::feature_set_dl_per_cc_r15_s() +{ + four_layer_tm3_tm4_r15_present = false; + supported_mimo_cap_dl_r15_present = false; + supported_csi_proc_r15_present = false; +} +SRSASN_CODE feature_set_dl_per_cc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(four_layer_tm3_tm4_r15_present, 1)); + HANDLE_CODE(bref.pack(supported_mimo_cap_dl_r15_present, 1)); + HANDLE_CODE(bref.pack(supported_csi_proc_r15_present, 1)); + + if (supported_mimo_cap_dl_r15_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_dl_r15)); + } + if (supported_csi_proc_r15_present) { + HANDLE_CODE(pack_enum(bref, supported_csi_proc_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_set_dl_per_cc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(four_layer_tm3_tm4_r15_present, 1)); + HANDLE_CODE(bref.unpack(supported_mimo_cap_dl_r15_present, 1)); + HANDLE_CODE(bref.unpack(supported_csi_proc_r15_present, 1)); + + if (supported_mimo_cap_dl_r15_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_dl_r15, bref)); + } + if (supported_csi_proc_r15_present) { + HANDLE_CODE(unpack_enum(supported_csi_proc_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void feature_set_dl_per_cc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (four_layer_tm3_tm4_r15_present) { + j.write_str("fourLayerTM3-TM4-r15", "supported"); + } + if (supported_mimo_cap_dl_r15_present) { + j.write_str("supportedMIMO-CapabilityDL-r15", supported_mimo_cap_dl_r15.to_string()); + } + if (supported_csi_proc_r15_present) { + j.write_str("supportedCSI-Proc-r15", supported_csi_proc_r15.to_string()); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBCPerTM-r15 ::= SEQUENCE +mimo_ca_params_per_bo_bc_per_tm_r15_s::mimo_ca_params_per_bo_bc_per_tm_r15_s() +{ + non_precoded_r13_present = false; + beamformed_r13_present = false; + dmrs_enhance_r13_present = false; + csi_report_np_r14_present = false; + csi_report_advanced_r14_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_precoded_r13_present, 1)); + HANDLE_CODE(bref.pack(beamformed_r13_present, 1)); + HANDLE_CODE(bref.pack(dmrs_enhance_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_report_np_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_report_advanced_r14_present, 1)); + + if (non_precoded_r13_present) { + HANDLE_CODE(non_precoded_r13.pack(bref)); + } + if (beamformed_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, beamformed_r13, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_per_tm_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_precoded_r13_present, 1)); + HANDLE_CODE(bref.unpack(beamformed_r13_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_enhance_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_np_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_advanced_r14_present, 1)); + + if (non_precoded_r13_present) { + HANDLE_CODE(non_precoded_r13.unpack(bref)); + } + if (beamformed_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(beamformed_r13, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_per_tm_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_precoded_r13_present) { + j.write_fieldname("nonPrecoded-r13"); + non_precoded_r13.to_json(j); + } + if (beamformed_r13_present) { + j.start_array("beamformed-r13"); + for (uint32_t i1 = 0; i1 < beamformed_r13.size(); ++i1) { + beamformed_r13[i1].to_json(j); + } + j.end_array(); + } + if (dmrs_enhance_r13_present) { + j.write_str("dmrs-Enhancements-r13", "different"); + } + if (csi_report_np_r14_present) { + j.write_str("csi-ReportingNP-r14", "different"); + } + if (csi_report_advanced_r14_present) { + j.write_str("csi-ReportingAdvanced-r14", "different"); + } + j.end_obj(); +} + +// MIMO-CA-ParametersPerBoBC-r15 ::= SEQUENCE +mimo_ca_params_per_bo_bc_r15_s::mimo_ca_params_per_bo_bc_r15_s() +{ + params_tm9_r15_present = false; + params_tm10_r15_present = false; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(params_tm9_r15_present, 1)); + HANDLE_CODE(bref.pack(params_tm10_r15_present, 1)); + + if (params_tm9_r15_present) { + HANDLE_CODE(params_tm9_r15.pack(bref)); + } + if (params_tm10_r15_present) { + HANDLE_CODE(params_tm10_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ca_params_per_bo_bc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(params_tm9_r15_present, 1)); + HANDLE_CODE(bref.unpack(params_tm10_r15_present, 1)); + + if (params_tm9_r15_present) { + HANDLE_CODE(params_tm9_r15.unpack(bref)); + } + if (params_tm10_r15_present) { + HANDLE_CODE(params_tm10_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ca_params_per_bo_bc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (params_tm9_r15_present) { + j.write_fieldname("parametersTM9-r15"); + params_tm9_r15.to_json(j); + } + if (params_tm10_r15_present) { + j.write_fieldname("parametersTM10-r15"); + params_tm10_r15.to_json(j); + } + j.end_obj(); +} + +// FeatureSetDL-r15 ::= SEQUENCE +feature_set_dl_r15_s::feature_set_dl_r15_s() +{ + mimo_ca_params_per_bo_bc_r15_present = false; +} +SRSASN_CODE feature_set_dl_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mimo_ca_params_per_bo_bc_r15_present, 1)); + + if (mimo_ca_params_per_bo_bc_r15_present) { + HANDLE_CODE(mimo_ca_params_per_bo_bc_r15.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, feature_set_per_cc_list_dl_r15, 1, 32, UnalignedIntegerPacker(0, 32))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_set_dl_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mimo_ca_params_per_bo_bc_r15_present, 1)); + + if (mimo_ca_params_per_bo_bc_r15_present) { + HANDLE_CODE(mimo_ca_params_per_bo_bc_r15.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(feature_set_per_cc_list_dl_r15, bref, 1, 32, UnalignedIntegerPacker(0, 32))); + + return SRSASN_SUCCESS; +} +void feature_set_dl_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mimo_ca_params_per_bo_bc_r15_present) { + j.write_fieldname("mimo-CA-ParametersPerBoBC-r15"); + mimo_ca_params_per_bo_bc_r15.to_json(j); + } + j.start_array("featureSetPerCC-ListDL-r15"); + for (uint32_t i1 = 0; i1 < feature_set_per_cc_list_dl_r15.size(); ++i1) { + j.write_int(feature_set_per_cc_list_dl_r15[i1]); + } + j.end_array(); + j.end_obj(); +} + +// FeatureSetUL-PerCC-r15 ::= SEQUENCE +feature_set_ul_per_cc_r15_s::feature_set_ul_per_cc_r15_s() +{ + supported_mimo_cap_ul_r15_present = false; + ul_minus256_qam_r15_present = false; +} +SRSASN_CODE feature_set_ul_per_cc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_mimo_cap_ul_r15_present, 1)); + HANDLE_CODE(bref.pack(ul_minus256_qam_r15_present, 1)); + + if (supported_mimo_cap_ul_r15_present) { + HANDLE_CODE(pack_enum(bref, supported_mimo_cap_ul_r15)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_set_ul_per_cc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_mimo_cap_ul_r15_present, 1)); + HANDLE_CODE(bref.unpack(ul_minus256_qam_r15_present, 1)); + + if (supported_mimo_cap_ul_r15_present) { + HANDLE_CODE(unpack_enum(supported_mimo_cap_ul_r15, bref)); + } + + return SRSASN_SUCCESS; +} +void feature_set_ul_per_cc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_mimo_cap_ul_r15_present) { + j.write_str("supportedMIMO-CapabilityUL-r15", supported_mimo_cap_ul_r15.to_string()); + } + if (ul_minus256_qam_r15_present) { + j.write_str("ul-256QAM-r15", "supported"); + } + j.end_obj(); +} + +// FeatureSetUL-r15 ::= SEQUENCE +SRSASN_CODE feature_set_ul_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, feature_set_per_cc_list_ul_r15, 1, 32, UnalignedIntegerPacker(0, 32))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_set_ul_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(feature_set_per_cc_list_ul_r15, bref, 1, 32, UnalignedIntegerPacker(0, 32))); + + return SRSASN_SUCCESS; +} +void feature_set_ul_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("featureSetPerCC-ListUL-r15"); + for (uint32_t i1 = 0; i1 < feature_set_per_cc_list_ul_r15.size(); ++i1) { + j.write_int(feature_set_per_cc_list_ul_r15[i1]); + } + j.end_array(); + j.end_obj(); +} + +// FeatureSetsEUTRA-r15 ::= SEQUENCE +feature_sets_eutra_r15_s::feature_sets_eutra_r15_s() +{ + ext = false; + feature_sets_dl_r15_present = false; + feature_sets_dl_per_cc_r15_present = false; + feature_sets_ul_r15_present = false; + feature_sets_ul_per_cc_r15_present = false; +} +SRSASN_CODE feature_sets_eutra_r15_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(feature_sets_dl_r15_present, 1)); + HANDLE_CODE(bref.pack(feature_sets_dl_per_cc_r15_present, 1)); + HANDLE_CODE(bref.pack(feature_sets_ul_r15_present, 1)); + HANDLE_CODE(bref.pack(feature_sets_ul_per_cc_r15_present, 1)); + + if (feature_sets_dl_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, feature_sets_dl_r15, 1, 256)); + } + if (feature_sets_dl_per_cc_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, feature_sets_dl_per_cc_r15, 1, 32)); + } + if (feature_sets_ul_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, feature_sets_ul_r15, 1, 256)); + } + if (feature_sets_ul_per_cc_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, feature_sets_ul_per_cc_r15, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_sets_eutra_r15_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(feature_sets_dl_r15_present, 1)); + HANDLE_CODE(bref.unpack(feature_sets_dl_per_cc_r15_present, 1)); + HANDLE_CODE(bref.unpack(feature_sets_ul_r15_present, 1)); + HANDLE_CODE(bref.unpack(feature_sets_ul_per_cc_r15_present, 1)); + + if (feature_sets_dl_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(feature_sets_dl_r15, bref, 1, 256)); + } + if (feature_sets_dl_per_cc_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(feature_sets_dl_per_cc_r15, bref, 1, 32)); + } + if (feature_sets_ul_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(feature_sets_ul_r15, bref, 1, 256)); + } + if (feature_sets_ul_per_cc_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(feature_sets_ul_per_cc_r15, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void feature_sets_eutra_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (feature_sets_dl_r15_present) { + j.start_array("featureSetsDL-r15"); + for (uint32_t i1 = 0; i1 < feature_sets_dl_r15.size(); ++i1) { + feature_sets_dl_r15[i1].to_json(j); + } + j.end_array(); + } + if (feature_sets_dl_per_cc_r15_present) { + j.start_array("featureSetsDL-PerCC-r15"); + for (uint32_t i1 = 0; i1 < feature_sets_dl_per_cc_r15.size(); ++i1) { + feature_sets_dl_per_cc_r15[i1].to_json(j); + } + j.end_array(); + } + if (feature_sets_ul_r15_present) { + j.start_array("featureSetsUL-r15"); + for (uint32_t i1 = 0; i1 < feature_sets_ul_r15.size(); ++i1) { + feature_sets_ul_r15[i1].to_json(j); + } + j.end_array(); + } + if (feature_sets_ul_per_cc_r15_present) { + j.start_array("featureSetsUL-PerCC-r15"); + for (uint32_t i1 = 0; i1 < feature_sets_ul_per_cc_r15.size(); ++i1) { + feature_sets_ul_per_cc_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// IRAT-ParametersCDMA2000-1XRTT ::= SEQUENCE +SRSASN_CODE irat_params_cdma2000_minus1_xrtt_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list1_xrtt, 1, 32, EnumPacker())); + HANDLE_CODE(pack_enum(bref, tx_cfg1_xrtt)); + HANDLE_CODE(pack_enum(bref, rx_cfg1_xrtt)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_cdma2000_minus1_xrtt_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list1_xrtt, bref, 1, 32, EnumPacker())); + HANDLE_CODE(unpack_enum(tx_cfg1_xrtt, bref)); + HANDLE_CODE(unpack_enum(rx_cfg1_xrtt, bref)); + + return SRSASN_SUCCESS; +} +void irat_params_cdma2000_minus1_xrtt_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandList1XRTT"); + for (uint32_t i1 = 0; i1 < supported_band_list1_xrtt.size(); ++i1) { + j.write_str(supported_band_list1_xrtt[i1].to_string()); + } + j.end_array(); + j.write_str("tx-Config1XRTT", tx_cfg1_xrtt.to_string()); + j.write_str("rx-Config1XRTT", rx_cfg1_xrtt.to_string()); + j.end_obj(); +} + +// IRAT-ParametersCDMA2000-HRPD ::= SEQUENCE +SRSASN_CODE irat_params_cdma2000_hrpd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_hrpd, 1, 32, EnumPacker())); + HANDLE_CODE(pack_enum(bref, tx_cfg_hrpd)); + HANDLE_CODE(pack_enum(bref, rx_cfg_hrpd)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_cdma2000_hrpd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_hrpd, bref, 1, 32, EnumPacker())); + HANDLE_CODE(unpack_enum(tx_cfg_hrpd, bref)); + HANDLE_CODE(unpack_enum(rx_cfg_hrpd, bref)); + + return SRSASN_SUCCESS; +} +void irat_params_cdma2000_hrpd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListHRPD"); + for (uint32_t i1 = 0; i1 < supported_band_list_hrpd.size(); ++i1) { + j.write_str(supported_band_list_hrpd[i1].to_string()); + } + j.end_array(); + j.write_str("tx-ConfigHRPD", tx_cfg_hrpd.to_string()); + j.write_str("rx-ConfigHRPD", rx_cfg_hrpd.to_string()); + j.end_obj(); +} + +// IRAT-ParametersGERAN ::= SEQUENCE +SRSASN_CODE irat_params_geran_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_geran, 1, 64, EnumPacker())); + HANDLE_CODE(bref.pack(inter_rat_ps_ho_to_geran, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_geran_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_geran, bref, 1, 64, EnumPacker())); + HANDLE_CODE(bref.unpack(inter_rat_ps_ho_to_geran, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_geran_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListGERAN"); + for (uint32_t i1 = 0; i1 < supported_band_list_geran.size(); ++i1) { + j.write_str(supported_band_list_geran[i1].to_string()); + } + j.end_array(); + j.write_bool("interRAT-PS-HO-ToGERAN", inter_rat_ps_ho_to_geran); + j.end_obj(); +} + +// SupportedBandNR-r15 ::= SEQUENCE +SRSASN_CODE supported_band_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, band_nr_r15, (uint16_t)1, (uint16_t)1024)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(band_nr_r15, bref, (uint16_t)1, (uint16_t)1024)); + + return SRSASN_SUCCESS; +} +void supported_band_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandNR-r15", band_nr_r15); + j.end_obj(); +} + +// IRAT-ParametersNR-r15 ::= SEQUENCE +irat_params_nr_r15_s::irat_params_nr_r15_s() +{ + en_dc_r15_present = false; + event_b2_r15_present = false; + supported_band_list_nr_r15_present = false; +} +SRSASN_CODE irat_params_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(en_dc_r15_present, 1)); + HANDLE_CODE(bref.pack(event_b2_r15_present, 1)); + HANDLE_CODE(bref.pack(supported_band_list_nr_r15_present, 1)); + + if (supported_band_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_nr_r15, 1, 1024)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(en_dc_r15_present, 1)); + HANDLE_CODE(bref.unpack(event_b2_r15_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_list_nr_r15_present, 1)); + + if (supported_band_list_nr_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_nr_r15, bref, 1, 1024)); + } + + return SRSASN_SUCCESS; +} +void irat_params_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (en_dc_r15_present) { + j.write_str("en-DC-r15", "supported"); + } + if (event_b2_r15_present) { + j.write_str("eventB2-r15", "supported"); + } + if (supported_band_list_nr_r15_present) { + j.start_array("supportedBandListNR-r15"); + for (uint32_t i1 = 0; i1 < supported_band_list_nr_r15.size(); ++i1) { + supported_band_list_nr_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// IRAT-ParametersUTRA-FDD ::= SEQUENCE +SRSASN_CODE irat_params_utra_fdd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_utra_fdd, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_fdd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_utra_fdd, bref, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +void irat_params_utra_fdd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListUTRA-FDD"); + for (uint32_t i1 = 0; i1 < supported_band_list_utra_fdd.size(); ++i1) { + j.write_str(supported_band_list_utra_fdd[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// IRAT-ParametersUTRA-TDD128 ::= SEQUENCE +SRSASN_CODE irat_params_utra_tdd128_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_utra_tdd128, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_tdd128_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_utra_tdd128, bref, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +void irat_params_utra_tdd128_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListUTRA-TDD128"); + for (uint32_t i1 = 0; i1 < supported_band_list_utra_tdd128.size(); ++i1) { + j.write_str(supported_band_list_utra_tdd128[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// IRAT-ParametersUTRA-TDD384 ::= SEQUENCE +SRSASN_CODE irat_params_utra_tdd384_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_utra_tdd384, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_tdd384_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_utra_tdd384, bref, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +void irat_params_utra_tdd384_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListUTRA-TDD384"); + for (uint32_t i1 = 0; i1 < supported_band_list_utra_tdd384.size(); ++i1) { + j.write_str(supported_band_list_utra_tdd384[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// IRAT-ParametersUTRA-TDD768 ::= SEQUENCE +SRSASN_CODE irat_params_utra_tdd768_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_utra_tdd768, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_tdd768_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_utra_tdd768, bref, 1, 64, EnumPacker())); + + return SRSASN_SUCCESS; +} +void irat_params_utra_tdd768_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListUTRA-TDD768"); + for (uint32_t i1 = 0; i1 < supported_band_list_utra_tdd768.size(); ++i1) { + j.write_str(supported_band_list_utra_tdd768[i1].to_string()); + } + j.end_array(); + j.end_obj(); +} + +// IRAT-ParametersWLAN-r13 ::= SEQUENCE +irat_params_wlan_r13_s::irat_params_wlan_r13_s() +{ + supported_band_list_wlan_r13_present = false; +} +SRSASN_CODE irat_params_wlan_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_list_wlan_r13_present, 1)); + + if (supported_band_list_wlan_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_wlan_r13, 1, 8, EnumPacker())); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_wlan_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_list_wlan_r13_present, 1)); + + if (supported_band_list_wlan_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_wlan_r13, bref, 1, 8, EnumPacker())); + } + + return SRSASN_SUCCESS; +} +void irat_params_wlan_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_list_wlan_r13_present) { + j.start_array("supportedBandListWLAN-r13"); + for (uint32_t i1 = 0; i1 < supported_band_list_wlan_r13.size(); ++i1) { + j.write_str(supported_band_list_wlan_r13[i1].to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// SkipSubframeProcessing-r15 ::= SEQUENCE +skip_sf_processing_r15_s::skip_sf_processing_r15_s() +{ + skip_processing_dl_slot_r15_present = false; + skip_processing_dl_sub_slot_r15_present = false; + skip_processing_ul_slot_r15_present = false; + skip_processing_ul_sub_slot_r15_present = false; +} +SRSASN_CODE skip_sf_processing_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(skip_processing_dl_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(skip_processing_dl_sub_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(skip_processing_ul_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(skip_processing_ul_sub_slot_r15_present, 1)); + + if (skip_processing_dl_slot_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, skip_processing_dl_slot_r15, (uint8_t)0, (uint8_t)3)); + } + if (skip_processing_dl_sub_slot_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, skip_processing_dl_sub_slot_r15, (uint8_t)0, (uint8_t)3)); + } + if (skip_processing_ul_slot_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, skip_processing_ul_slot_r15, (uint8_t)0, (uint8_t)3)); + } + if (skip_processing_ul_sub_slot_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, skip_processing_ul_sub_slot_r15, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE skip_sf_processing_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(skip_processing_dl_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(skip_processing_dl_sub_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(skip_processing_ul_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(skip_processing_ul_sub_slot_r15_present, 1)); + + if (skip_processing_dl_slot_r15_present) { + HANDLE_CODE(unpack_unalign_integer(skip_processing_dl_slot_r15, bref, (uint8_t)0, (uint8_t)3)); + } + if (skip_processing_dl_sub_slot_r15_present) { + HANDLE_CODE(unpack_unalign_integer(skip_processing_dl_sub_slot_r15, bref, (uint8_t)0, (uint8_t)3)); + } + if (skip_processing_ul_slot_r15_present) { + HANDLE_CODE(unpack_unalign_integer(skip_processing_ul_slot_r15, bref, (uint8_t)0, (uint8_t)3)); + } + if (skip_processing_ul_sub_slot_r15_present) { + HANDLE_CODE(unpack_unalign_integer(skip_processing_ul_sub_slot_r15, bref, (uint8_t)0, (uint8_t)3)); + } + + return SRSASN_SUCCESS; +} +void skip_sf_processing_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (skip_processing_dl_slot_r15_present) { + j.write_int("skipProcessingDL-Slot-r15", skip_processing_dl_slot_r15); + } + if (skip_processing_dl_sub_slot_r15_present) { + j.write_int("skipProcessingDL-SubSlot-r15", skip_processing_dl_sub_slot_r15); + } + if (skip_processing_ul_slot_r15_present) { + j.write_int("skipProcessingUL-Slot-r15", skip_processing_ul_slot_r15); + } + if (skip_processing_ul_sub_slot_r15_present) { + j.write_int("skipProcessingUL-SubSlot-r15", skip_processing_ul_sub_slot_r15); + } + j.end_obj(); +} + +// MAC-Parameters-v1530 ::= SEQUENCE +mac_params_v1530_s::mac_params_v1530_s() +{ + min_proc_timeline_subslot_r15_present = false; + skip_sf_processing_r15_present = false; + early_data_up_r15_present = false; + dormant_scell_state_r15_present = false; + direct_scell_activation_r15_present = false; + direct_scell_hibernation_r15_present = false; + extended_lcid_dupl_r15_present = false; + sps_serving_cell_r15_present = false; +} +SRSASN_CODE mac_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(min_proc_timeline_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(skip_sf_processing_r15_present, 1)); + HANDLE_CODE(bref.pack(early_data_up_r15_present, 1)); + HANDLE_CODE(bref.pack(dormant_scell_state_r15_present, 1)); + HANDLE_CODE(bref.pack(direct_scell_activation_r15_present, 1)); + HANDLE_CODE(bref.pack(direct_scell_hibernation_r15_present, 1)); + HANDLE_CODE(bref.pack(extended_lcid_dupl_r15_present, 1)); + HANDLE_CODE(bref.pack(sps_serving_cell_r15_present, 1)); + + if (min_proc_timeline_subslot_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, min_proc_timeline_subslot_r15, 1, 3, EnumPacker())); + } + if (skip_sf_processing_r15_present) { + HANDLE_CODE(skip_sf_processing_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(min_proc_timeline_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(skip_sf_processing_r15_present, 1)); + HANDLE_CODE(bref.unpack(early_data_up_r15_present, 1)); + HANDLE_CODE(bref.unpack(dormant_scell_state_r15_present, 1)); + HANDLE_CODE(bref.unpack(direct_scell_activation_r15_present, 1)); + HANDLE_CODE(bref.unpack(direct_scell_hibernation_r15_present, 1)); + HANDLE_CODE(bref.unpack(extended_lcid_dupl_r15_present, 1)); + HANDLE_CODE(bref.unpack(sps_serving_cell_r15_present, 1)); + + if (min_proc_timeline_subslot_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(min_proc_timeline_subslot_r15, bref, 1, 3, EnumPacker())); + } + if (skip_sf_processing_r15_present) { + HANDLE_CODE(skip_sf_processing_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mac_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (min_proc_timeline_subslot_r15_present) { + j.start_array("min-Proc-TimelineSubslot-r15"); + for (uint32_t i1 = 0; i1 < min_proc_timeline_subslot_r15.size(); ++i1) { + j.write_str(min_proc_timeline_subslot_r15[i1].to_string()); + } + j.end_array(); + } + if (skip_sf_processing_r15_present) { + j.write_fieldname("skipSubframeProcessing-r15"); + skip_sf_processing_r15.to_json(j); + } + if (early_data_up_r15_present) { + j.write_str("earlyData-UP-r15", "supported"); + } + if (dormant_scell_state_r15_present) { + j.write_str("dormantSCellState-r15", "supported"); + } + if (direct_scell_activation_r15_present) { + j.write_str("directSCellActivation-r15", "supported"); + } + if (direct_scell_hibernation_r15_present) { + j.write_str("directSCellHibernation-r15", "supported"); + } + if (extended_lcid_dupl_r15_present) { + j.write_str("extendedLCID-Duplication-r15", "supported"); + } + if (sps_serving_cell_r15_present) { + j.write_str("sps-ServingCell-r15", "supported"); + } + j.end_obj(); +} + +// MIMO-UE-BeamformedCapabilities-r13 ::= SEQUENCE +mimo_ue_beamformed_capabilities_r13_s::mimo_ue_beamformed_capabilities_r13_s() +{ + alt_codebook_r13_present = false; +} +SRSASN_CODE mimo_ue_beamformed_capabilities_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(alt_codebook_r13_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, mimo_beamformed_capabilities_r13, 1, 4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_beamformed_capabilities_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(alt_codebook_r13_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(mimo_beamformed_capabilities_r13, bref, 1, 4)); + + return SRSASN_SUCCESS; +} +void mimo_ue_beamformed_capabilities_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (alt_codebook_r13_present) { + j.write_str("altCodebook-r13", "supported"); + } + j.start_array("mimo-BeamformedCapabilities-r13"); + for (uint32_t i1 = 0; i1 < mimo_beamformed_capabilities_r13.size(); ++i1) { + mimo_beamformed_capabilities_r13[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MIMO-UE-ParametersPerTM-r13 ::= SEQUENCE +mimo_ue_params_per_tm_r13_s::mimo_ue_params_per_tm_r13_s() +{ + non_precoded_r13_present = false; + beamformed_r13_present = false; + ch_meas_restrict_r13_present = false; + dmrs_enhance_r13_present = false; + csi_rs_enhance_tdd_r13_present = false; +} +SRSASN_CODE mimo_ue_params_per_tm_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_precoded_r13_present, 1)); + HANDLE_CODE(bref.pack(beamformed_r13_present, 1)); + HANDLE_CODE(bref.pack(ch_meas_restrict_r13_present, 1)); + HANDLE_CODE(bref.pack(dmrs_enhance_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_enhance_tdd_r13_present, 1)); + + if (non_precoded_r13_present) { + HANDLE_CODE(non_precoded_r13.pack(bref)); + } + if (beamformed_r13_present) { + HANDLE_CODE(beamformed_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_per_tm_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_precoded_r13_present, 1)); + HANDLE_CODE(bref.unpack(beamformed_r13_present, 1)); + HANDLE_CODE(bref.unpack(ch_meas_restrict_r13_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_enhance_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_enhance_tdd_r13_present, 1)); + + if (non_precoded_r13_present) { + HANDLE_CODE(non_precoded_r13.unpack(bref)); + } + if (beamformed_r13_present) { + HANDLE_CODE(beamformed_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ue_params_per_tm_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_precoded_r13_present) { + j.write_fieldname("nonPrecoded-r13"); + non_precoded_r13.to_json(j); + } + if (beamformed_r13_present) { + j.write_fieldname("beamformed-r13"); + beamformed_r13.to_json(j); + } + if (ch_meas_restrict_r13_present) { + j.write_str("channelMeasRestriction-r13", "supported"); + } + if (dmrs_enhance_r13_present) { + j.write_str("dmrs-Enhancements-r13", "supported"); + } + if (csi_rs_enhance_tdd_r13_present) { + j.write_str("csi-RS-EnhancementsTDD-r13", "supported"); + } + j.end_obj(); +} + +// MIMO-UE-Parameters-r13 ::= SEQUENCE +mimo_ue_params_r13_s::mimo_ue_params_r13_s() +{ + params_tm9_r13_present = false; + params_tm10_r13_present = false; + srs_enhance_tdd_r13_present = false; + srs_enhance_r13_present = false; + interference_meas_restrict_r13_present = false; +} +SRSASN_CODE mimo_ue_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(params_tm9_r13_present, 1)); + HANDLE_CODE(bref.pack(params_tm10_r13_present, 1)); + HANDLE_CODE(bref.pack(srs_enhance_tdd_r13_present, 1)); + HANDLE_CODE(bref.pack(srs_enhance_r13_present, 1)); + HANDLE_CODE(bref.pack(interference_meas_restrict_r13_present, 1)); + + if (params_tm9_r13_present) { + HANDLE_CODE(params_tm9_r13.pack(bref)); + } + if (params_tm10_r13_present) { + HANDLE_CODE(params_tm10_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(params_tm9_r13_present, 1)); + HANDLE_CODE(bref.unpack(params_tm10_r13_present, 1)); + HANDLE_CODE(bref.unpack(srs_enhance_tdd_r13_present, 1)); + HANDLE_CODE(bref.unpack(srs_enhance_r13_present, 1)); + HANDLE_CODE(bref.unpack(interference_meas_restrict_r13_present, 1)); + + if (params_tm9_r13_present) { + HANDLE_CODE(params_tm9_r13.unpack(bref)); + } + if (params_tm10_r13_present) { + HANDLE_CODE(params_tm10_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ue_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (params_tm9_r13_present) { + j.write_fieldname("parametersTM9-r13"); + params_tm9_r13.to_json(j); + } + if (params_tm10_r13_present) { + j.write_fieldname("parametersTM10-r13"); + params_tm10_r13.to_json(j); + } + if (srs_enhance_tdd_r13_present) { + j.write_str("srs-EnhancementsTDD-r13", "supported"); + } + if (srs_enhance_r13_present) { + j.write_str("srs-Enhancements-r13", "supported"); + } + if (interference_meas_restrict_r13_present) { + j.write_str("interferenceMeasRestriction-r13", "supported"); + } + j.end_obj(); +} + +// MIMO-UE-ParametersPerTM-v1430 ::= SEQUENCE +mimo_ue_params_per_tm_v1430_s::mimo_ue_params_per_tm_v1430_s() +{ + nzp_csi_rs_aperiodic_info_r14_present = false; + nzp_csi_rs_periodic_info_r14_present = false; + zp_csi_rs_aperiodic_info_r14_present = false; + ul_dmrs_enhance_r14_present = false; + density_reduction_np_r14_present = false; + density_reduction_bf_r14_present = false; + hybrid_csi_r14_present = false; + semi_ol_r14_present = false; + csi_report_np_r14_present = false; + csi_report_advanced_r14_present = false; +} +SRSASN_CODE mimo_ue_params_per_tm_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nzp_csi_rs_aperiodic_info_r14_present, 1)); + HANDLE_CODE(bref.pack(nzp_csi_rs_periodic_info_r14_present, 1)); + HANDLE_CODE(bref.pack(zp_csi_rs_aperiodic_info_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_dmrs_enhance_r14_present, 1)); + HANDLE_CODE(bref.pack(density_reduction_np_r14_present, 1)); + HANDLE_CODE(bref.pack(density_reduction_bf_r14_present, 1)); + HANDLE_CODE(bref.pack(hybrid_csi_r14_present, 1)); + HANDLE_CODE(bref.pack(semi_ol_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_report_np_r14_present, 1)); + HANDLE_CODE(bref.pack(csi_report_advanced_r14_present, 1)); + + if (nzp_csi_rs_aperiodic_info_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, nzp_csi_rs_aperiodic_info_r14.n_max_proc_r14, (uint8_t)5, (uint8_t)32)); + HANDLE_CODE(pack_enum(bref, nzp_csi_rs_aperiodic_info_r14.n_max_res_r14)); + } + if (nzp_csi_rs_periodic_info_r14_present) { + HANDLE_CODE(pack_enum(bref, nzp_csi_rs_periodic_info_r14.n_max_res_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_per_tm_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nzp_csi_rs_aperiodic_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(nzp_csi_rs_periodic_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(zp_csi_rs_aperiodic_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_dmrs_enhance_r14_present, 1)); + HANDLE_CODE(bref.unpack(density_reduction_np_r14_present, 1)); + HANDLE_CODE(bref.unpack(density_reduction_bf_r14_present, 1)); + HANDLE_CODE(bref.unpack(hybrid_csi_r14_present, 1)); + HANDLE_CODE(bref.unpack(semi_ol_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_np_r14_present, 1)); + HANDLE_CODE(bref.unpack(csi_report_advanced_r14_present, 1)); + + if (nzp_csi_rs_aperiodic_info_r14_present) { + HANDLE_CODE(unpack_unalign_integer(nzp_csi_rs_aperiodic_info_r14.n_max_proc_r14, bref, (uint8_t)5, (uint8_t)32)); + HANDLE_CODE(unpack_enum(nzp_csi_rs_aperiodic_info_r14.n_max_res_r14, bref)); + } + if (nzp_csi_rs_periodic_info_r14_present) { + HANDLE_CODE(unpack_enum(nzp_csi_rs_periodic_info_r14.n_max_res_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ue_params_per_tm_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (nzp_csi_rs_aperiodic_info_r14_present) { + j.write_fieldname("nzp-CSI-RS-AperiodicInfo-r14"); + j.start_obj(); + j.write_int("nMaxProc-r14", nzp_csi_rs_aperiodic_info_r14.n_max_proc_r14); + j.write_str("nMaxResource-r14", nzp_csi_rs_aperiodic_info_r14.n_max_res_r14.to_string()); + j.end_obj(); + } + if (nzp_csi_rs_periodic_info_r14_present) { + j.write_fieldname("nzp-CSI-RS-PeriodicInfo-r14"); + j.start_obj(); + j.write_str("nMaxResource-r14", nzp_csi_rs_periodic_info_r14.n_max_res_r14.to_string()); + j.end_obj(); + } + if (zp_csi_rs_aperiodic_info_r14_present) { + j.write_str("zp-CSI-RS-AperiodicInfo-r14", "supported"); + } + if (ul_dmrs_enhance_r14_present) { + j.write_str("ul-dmrs-Enhancements-r14", "supported"); + } + if (density_reduction_np_r14_present) { + j.write_str("densityReductionNP-r14", "supported"); + } + if (density_reduction_bf_r14_present) { + j.write_str("densityReductionBF-r14", "supported"); + } + if (hybrid_csi_r14_present) { + j.write_str("hybridCSI-r14", "supported"); + } + if (semi_ol_r14_present) { + j.write_str("semiOL-r14", "supported"); + } + if (csi_report_np_r14_present) { + j.write_str("csi-ReportingNP-r14", "supported"); + } + if (csi_report_advanced_r14_present) { + j.write_str("csi-ReportingAdvanced-r14", "supported"); + } + j.end_obj(); +} + +// MIMO-UE-Parameters-v1430 ::= SEQUENCE +mimo_ue_params_v1430_s::mimo_ue_params_v1430_s() +{ + params_tm9_v1430_present = false; + params_tm10_v1430_present = false; +} +SRSASN_CODE mimo_ue_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(params_tm9_v1430_present, 1)); + HANDLE_CODE(bref.pack(params_tm10_v1430_present, 1)); + + if (params_tm9_v1430_present) { + HANDLE_CODE(params_tm9_v1430.pack(bref)); + } + if (params_tm10_v1430_present) { + HANDLE_CODE(params_tm10_v1430.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(params_tm9_v1430_present, 1)); + HANDLE_CODE(bref.unpack(params_tm10_v1430_present, 1)); + + if (params_tm9_v1430_present) { + HANDLE_CODE(params_tm9_v1430.unpack(bref)); + } + if (params_tm10_v1430_present) { + HANDLE_CODE(params_tm10_v1430.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ue_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (params_tm9_v1430_present) { + j.write_fieldname("parametersTM9-v1430"); + params_tm9_v1430.to_json(j); + } + if (params_tm10_v1430_present) { + j.write_fieldname("parametersTM10-v1430"); + params_tm10_v1430.to_json(j); + } + j.end_obj(); +} + +// MIMO-UE-ParametersPerTM-v1470 ::= SEQUENCE +mimo_ue_params_per_tm_v1470_s::mimo_ue_params_per_tm_v1470_s() +{ + csi_report_advanced_max_ports_r14_present = false; +} +SRSASN_CODE mimo_ue_params_per_tm_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_report_advanced_max_ports_r14_present, 1)); + + if (csi_report_advanced_max_ports_r14_present) { + HANDLE_CODE(pack_enum(bref, csi_report_advanced_max_ports_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_per_tm_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_report_advanced_max_ports_r14_present, 1)); + + if (csi_report_advanced_max_ports_r14_present) { + HANDLE_CODE(unpack_enum(csi_report_advanced_max_ports_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void mimo_ue_params_per_tm_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_report_advanced_max_ports_r14_present) { + j.write_str("csi-ReportingAdvancedMaxPorts-r14", csi_report_advanced_max_ports_r14.to_string()); + } + j.end_obj(); +} + +// MIMO-UE-Parameters-v1470 ::= SEQUENCE +SRSASN_CODE mimo_ue_params_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(params_tm9_v1470.pack(bref)); + HANDLE_CODE(params_tm10_v1470.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mimo_ue_params_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(params_tm9_v1470.unpack(bref)); + HANDLE_CODE(params_tm10_v1470.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mimo_ue_params_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("parametersTM9-v1470"); + params_tm9_v1470.to_json(j); + j.write_fieldname("parametersTM10-v1470"); + params_tm10_v1470.to_json(j); + j.end_obj(); +} + +// MeasParameters ::= SEQUENCE +SRSASN_CODE meas_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, band_list_eutra, 1, 64)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(band_list_eutra, bref, 1, 64)); + + return SRSASN_SUCCESS; +} +void meas_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandListEUTRA"); + for (uint32_t i1 = 0; i1 < band_list_eutra.size(); ++i1) { + band_list_eutra[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasParameters-v1020 ::= SEQUENCE +SRSASN_CODE meas_params_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, band_combination_list_eutra_r10, 1, 128)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(band_combination_list_eutra_r10, bref, 1, 128)); + + return SRSASN_SUCCESS; +} +void meas_params_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("bandCombinationListEUTRA-r10"); + for (uint32_t i1 = 0; i1 < band_combination_list_eutra_r10.size(); ++i1) { + band_combination_list_eutra_r10[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// NAICS-Capability-Entry-r12 ::= SEQUENCE +naics_cap_entry_r12_s::naics_cap_entry_r12_s() +{ + ext = false; +} +SRSASN_CODE naics_cap_entry_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, nof_naics_capable_cc_r12, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(pack_enum(bref, nof_aggregated_prb_r12)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE naics_cap_entry_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(nof_naics_capable_cc_r12, bref, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(unpack_enum(nof_aggregated_prb_r12, bref)); + + return SRSASN_SUCCESS; +} +void naics_cap_entry_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("numberOfNAICS-CapableCC-r12", nof_naics_capable_cc_r12); + j.write_str("numberOfAggregatedPRB-r12", nof_aggregated_prb_r12.to_string()); + j.end_obj(); +} + +// NonContiguousUL-RA-WithinCC-r10 ::= SEQUENCE +non_contiguous_ul_ra_within_cc_r10_s::non_contiguous_ul_ra_within_cc_r10_s() +{ + non_contiguous_ul_ra_within_cc_info_r10_present = false; +} +SRSASN_CODE non_contiguous_ul_ra_within_cc_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_contiguous_ul_ra_within_cc_info_r10_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE non_contiguous_ul_ra_within_cc_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_contiguous_ul_ra_within_cc_info_r10_present, 1)); + + return SRSASN_SUCCESS; +} +void non_contiguous_ul_ra_within_cc_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_contiguous_ul_ra_within_cc_info_r10_present) { + j.write_str("nonContiguousUL-RA-WithinCC-Info-r10", "supported"); + } + j.end_obj(); +} + +// ROHC-ProfileSupportList-r15 ::= SEQUENCE +SRSASN_CODE rohc_profile_support_list_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(profile0x0001_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0002_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0003_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0004_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0006_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0101_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0102_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0103_r15, 1)); + HANDLE_CODE(bref.pack(profile0x0104_r15, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rohc_profile_support_list_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(profile0x0001_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0002_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0003_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0004_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0006_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0101_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0102_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0103_r15, 1)); + HANDLE_CODE(bref.unpack(profile0x0104_r15, 1)); + + return SRSASN_SUCCESS; +} +void rohc_profile_support_list_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("profile0x0001-r15", profile0x0001_r15); + j.write_bool("profile0x0002-r15", profile0x0002_r15); + j.write_bool("profile0x0003-r15", profile0x0003_r15); + j.write_bool("profile0x0004-r15", profile0x0004_r15); + j.write_bool("profile0x0006-r15", profile0x0006_r15); + j.write_bool("profile0x0101-r15", profile0x0101_r15); + j.write_bool("profile0x0102-r15", profile0x0102_r15); + j.write_bool("profile0x0103-r15", profile0x0103_r15); + j.write_bool("profile0x0104-r15", profile0x0104_r15); + j.end_obj(); +} + +// PDCP-Parameters ::= SEQUENCE +pdcp_params_s::pdcp_params_s() +{ + ext = false; + max_num_rohc_context_sessions_present = false; +} +SRSASN_CODE pdcp_params_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(max_num_rohc_context_sessions_present, 1)); + + HANDLE_CODE(supported_rohc_profiles.pack(bref)); + if (max_num_rohc_context_sessions_present) { + HANDLE_CODE(pack_enum(bref, max_num_rohc_context_sessions)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(max_num_rohc_context_sessions_present, 1)); + + HANDLE_CODE(supported_rohc_profiles.unpack(bref)); + if (max_num_rohc_context_sessions_present) { + HANDLE_CODE(unpack_enum(max_num_rohc_context_sessions, bref)); + } + + return SRSASN_SUCCESS; +} +void pdcp_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("supportedROHC-Profiles"); + supported_rohc_profiles.to_json(j); + if (max_num_rohc_context_sessions_present) { + j.write_str("maxNumberROHC-ContextSessions", max_num_rohc_context_sessions.to_string()); + } + j.end_obj(); +} + +// SupportedOperatorDic-r15 ::= SEQUENCE +SRSASN_CODE supported_operator_dic_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, version_of_dictionary_r15, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(associated_plmn_id_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_operator_dic_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(version_of_dictionary_r15, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(associated_plmn_id_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void supported_operator_dic_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("versionOfDictionary-r15", version_of_dictionary_r15); + j.write_fieldname("associatedPLMN-ID-r15"); + associated_plmn_id_r15.to_json(j); + j.end_obj(); +} + +// SupportedUDC-r15 ::= SEQUENCE +supported_udc_r15_s::supported_udc_r15_s() +{ + supported_standard_dic_r15_present = false; + supported_operator_dic_r15_present = false; +} +SRSASN_CODE supported_udc_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_standard_dic_r15_present, 1)); + HANDLE_CODE(bref.pack(supported_operator_dic_r15_present, 1)); + + if (supported_operator_dic_r15_present) { + HANDLE_CODE(supported_operator_dic_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_udc_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_standard_dic_r15_present, 1)); + HANDLE_CODE(bref.unpack(supported_operator_dic_r15_present, 1)); + + if (supported_operator_dic_r15_present) { + HANDLE_CODE(supported_operator_dic_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void supported_udc_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_standard_dic_r15_present) { + j.write_str("supportedStandardDic-r15", "supported"); + } + if (supported_operator_dic_r15_present) { + j.write_fieldname("supportedOperatorDic-r15"); + supported_operator_dic_r15.to_json(j); + } + j.end_obj(); +} + +// PDCP-Parameters-v1530 ::= SEQUENCE +pdcp_params_v1530_s::pdcp_params_v1530_s() +{ + supported_udc_r15_present = false; + pdcp_dupl_r15_present = false; +} +SRSASN_CODE pdcp_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_udc_r15_present, 1)); + HANDLE_CODE(bref.pack(pdcp_dupl_r15_present, 1)); + + if (supported_udc_r15_present) { + HANDLE_CODE(supported_udc_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_udc_r15_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_dupl_r15_present, 1)); + + if (supported_udc_r15_present) { + HANDLE_CODE(supported_udc_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdcp_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_udc_r15_present) { + j.write_fieldname("supportedUDC-r15"); + supported_udc_r15.to_json(j); + } + if (pdcp_dupl_r15_present) { + j.write_str("pdcp-Duplication-r15", "supported"); + } + j.end_obj(); +} + +// PDCP-ParametersNR-r15 ::= SEQUENCE +pdcp_params_nr_r15_s::pdcp_params_nr_r15_s() +{ + rohc_context_max_sessions_r15_present = false; + rohc_context_continue_r15_present = false; + out_of_order_delivery_r15_present = false; + sn_size_lo_r15_present = false; + ims_voice_over_nr_pdcp_mcg_bearer_r15_present = false; + ims_voice_over_nr_pdcp_scg_bearer_r15_present = false; +} +SRSASN_CODE pdcp_params_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rohc_context_max_sessions_r15_present, 1)); + HANDLE_CODE(bref.pack(rohc_context_continue_r15_present, 1)); + HANDLE_CODE(bref.pack(out_of_order_delivery_r15_present, 1)); + HANDLE_CODE(bref.pack(sn_size_lo_r15_present, 1)); + HANDLE_CODE(bref.pack(ims_voice_over_nr_pdcp_mcg_bearer_r15_present, 1)); + HANDLE_CODE(bref.pack(ims_voice_over_nr_pdcp_scg_bearer_r15_present, 1)); + + HANDLE_CODE(rohc_profiles_r15.pack(bref)); + if (rohc_context_max_sessions_r15_present) { + HANDLE_CODE(pack_enum(bref, rohc_context_max_sessions_r15)); + } + HANDLE_CODE(bref.pack(rohc_profiles_ul_only_r15.profile0x0006_r15, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rohc_context_max_sessions_r15_present, 1)); + HANDLE_CODE(bref.unpack(rohc_context_continue_r15_present, 1)); + HANDLE_CODE(bref.unpack(out_of_order_delivery_r15_present, 1)); + HANDLE_CODE(bref.unpack(sn_size_lo_r15_present, 1)); + HANDLE_CODE(bref.unpack(ims_voice_over_nr_pdcp_mcg_bearer_r15_present, 1)); + HANDLE_CODE(bref.unpack(ims_voice_over_nr_pdcp_scg_bearer_r15_present, 1)); + + HANDLE_CODE(rohc_profiles_r15.unpack(bref)); + if (rohc_context_max_sessions_r15_present) { + HANDLE_CODE(unpack_enum(rohc_context_max_sessions_r15, bref)); + } + HANDLE_CODE(bref.unpack(rohc_profiles_ul_only_r15.profile0x0006_r15, 1)); + + return SRSASN_SUCCESS; +} +void pdcp_params_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rohc-Profiles-r15"); + rohc_profiles_r15.to_json(j); + if (rohc_context_max_sessions_r15_present) { + j.write_str("rohc-ContextMaxSessions-r15", rohc_context_max_sessions_r15.to_string()); + } + j.write_fieldname("rohc-ProfilesUL-Only-r15"); + j.start_obj(); + j.write_bool("profile0x0006-r15", rohc_profiles_ul_only_r15.profile0x0006_r15); + j.end_obj(); + if (rohc_context_continue_r15_present) { + j.write_str("rohc-ContextContinue-r15", "supported"); + } + if (out_of_order_delivery_r15_present) { + j.write_str("outOfOrderDelivery-r15", "supported"); + } + if (sn_size_lo_r15_present) { + j.write_str("sn-SizeLo-r15", "supported"); + } + if (ims_voice_over_nr_pdcp_mcg_bearer_r15_present) { + j.write_str("ims-VoiceOverNR-PDCP-MCG-Bearer-r15", "supported"); + } + if (ims_voice_over_nr_pdcp_scg_bearer_r15_present) { + j.write_str("ims-VoiceOverNR-PDCP-SCG-Bearer-r15", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1020 ::= SEQUENCE +phy_layer_params_v1020_s::phy_layer_params_v1020_s() +{ + two_ant_ports_for_pucch_r10_present = false; + tm9_with_minus8_tx_fdd_r10_present = false; + pmi_disabling_r10_present = false; + cross_carrier_sched_r10_present = false; + simul_pucch_pusch_r10_present = false; + multi_cluster_pusch_within_cc_r10_present = false; + non_contiguous_ul_ra_within_cc_list_r10_present = false; +} +SRSASN_CODE phy_layer_params_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(two_ant_ports_for_pucch_r10_present, 1)); + HANDLE_CODE(bref.pack(tm9_with_minus8_tx_fdd_r10_present, 1)); + HANDLE_CODE(bref.pack(pmi_disabling_r10_present, 1)); + HANDLE_CODE(bref.pack(cross_carrier_sched_r10_present, 1)); + HANDLE_CODE(bref.pack(simul_pucch_pusch_r10_present, 1)); + HANDLE_CODE(bref.pack(multi_cluster_pusch_within_cc_r10_present, 1)); + HANDLE_CODE(bref.pack(non_contiguous_ul_ra_within_cc_list_r10_present, 1)); + + if (non_contiguous_ul_ra_within_cc_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, non_contiguous_ul_ra_within_cc_list_r10, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(two_ant_ports_for_pucch_r10_present, 1)); + HANDLE_CODE(bref.unpack(tm9_with_minus8_tx_fdd_r10_present, 1)); + HANDLE_CODE(bref.unpack(pmi_disabling_r10_present, 1)); + HANDLE_CODE(bref.unpack(cross_carrier_sched_r10_present, 1)); + HANDLE_CODE(bref.unpack(simul_pucch_pusch_r10_present, 1)); + HANDLE_CODE(bref.unpack(multi_cluster_pusch_within_cc_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_contiguous_ul_ra_within_cc_list_r10_present, 1)); + + if (non_contiguous_ul_ra_within_cc_list_r10_present) { + HANDLE_CODE(unpack_dyn_seq_of(non_contiguous_ul_ra_within_cc_list_r10, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (two_ant_ports_for_pucch_r10_present) { + j.write_str("twoAntennaPortsForPUCCH-r10", "supported"); + } + if (tm9_with_minus8_tx_fdd_r10_present) { + j.write_str("tm9-With-8Tx-FDD-r10", "supported"); + } + if (pmi_disabling_r10_present) { + j.write_str("pmi-Disabling-r10", "supported"); + } + if (cross_carrier_sched_r10_present) { + j.write_str("crossCarrierScheduling-r10", "supported"); + } + if (simul_pucch_pusch_r10_present) { + j.write_str("simultaneousPUCCH-PUSCH-r10", "supported"); + } + if (multi_cluster_pusch_within_cc_r10_present) { + j.write_str("multiClusterPUSCH-WithinCC-r10", "supported"); + } + if (non_contiguous_ul_ra_within_cc_list_r10_present) { + j.start_array("nonContiguousUL-RA-WithinCC-List-r10"); + for (uint32_t i1 = 0; i1 < non_contiguous_ul_ra_within_cc_list_r10.size(); ++i1) { + non_contiguous_ul_ra_within_cc_list_r10[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// PhyLayerParameters-v1250 ::= SEQUENCE +phy_layer_params_v1250_s::phy_layer_params_v1250_s() +{ + e_harq_pattern_fdd_r12_present = false; + enhanced_minus4_tx_codebook_r12_present = false; + tdd_fdd_ca_pcell_duplex_r12_present = false; + phy_tdd_re_cfg_tdd_pcell_r12_present = false; + phy_tdd_re_cfg_fdd_pcell_r12_present = false; + pusch_feedback_mode_r12_present = false; + pusch_srs_pwr_ctrl_sf_set_r12_present = false; + csi_sf_set_r12_present = false; + no_res_restrict_for_tti_bundling_r12_present = false; + discovery_signals_in_deact_scell_r12_present = false; + naics_cap_list_r12_present = false; +} +SRSASN_CODE phy_layer_params_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_harq_pattern_fdd_r12_present, 1)); + HANDLE_CODE(bref.pack(enhanced_minus4_tx_codebook_r12_present, 1)); + HANDLE_CODE(bref.pack(tdd_fdd_ca_pcell_duplex_r12_present, 1)); + HANDLE_CODE(bref.pack(phy_tdd_re_cfg_tdd_pcell_r12_present, 1)); + HANDLE_CODE(bref.pack(phy_tdd_re_cfg_fdd_pcell_r12_present, 1)); + HANDLE_CODE(bref.pack(pusch_feedback_mode_r12_present, 1)); + HANDLE_CODE(bref.pack(pusch_srs_pwr_ctrl_sf_set_r12_present, 1)); + HANDLE_CODE(bref.pack(csi_sf_set_r12_present, 1)); + HANDLE_CODE(bref.pack(no_res_restrict_for_tti_bundling_r12_present, 1)); + HANDLE_CODE(bref.pack(discovery_signals_in_deact_scell_r12_present, 1)); + HANDLE_CODE(bref.pack(naics_cap_list_r12_present, 1)); + + if (tdd_fdd_ca_pcell_duplex_r12_present) { + HANDLE_CODE(tdd_fdd_ca_pcell_duplex_r12.pack(bref)); + } + if (naics_cap_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, naics_cap_list_r12, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_harq_pattern_fdd_r12_present, 1)); + HANDLE_CODE(bref.unpack(enhanced_minus4_tx_codebook_r12_present, 1)); + HANDLE_CODE(bref.unpack(tdd_fdd_ca_pcell_duplex_r12_present, 1)); + HANDLE_CODE(bref.unpack(phy_tdd_re_cfg_tdd_pcell_r12_present, 1)); + HANDLE_CODE(bref.unpack(phy_tdd_re_cfg_fdd_pcell_r12_present, 1)); + HANDLE_CODE(bref.unpack(pusch_feedback_mode_r12_present, 1)); + HANDLE_CODE(bref.unpack(pusch_srs_pwr_ctrl_sf_set_r12_present, 1)); + HANDLE_CODE(bref.unpack(csi_sf_set_r12_present, 1)); + HANDLE_CODE(bref.unpack(no_res_restrict_for_tti_bundling_r12_present, 1)); + HANDLE_CODE(bref.unpack(discovery_signals_in_deact_scell_r12_present, 1)); + HANDLE_CODE(bref.unpack(naics_cap_list_r12_present, 1)); + + if (tdd_fdd_ca_pcell_duplex_r12_present) { + HANDLE_CODE(tdd_fdd_ca_pcell_duplex_r12.unpack(bref)); + } + if (naics_cap_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(naics_cap_list_r12, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (e_harq_pattern_fdd_r12_present) { + j.write_str("e-HARQ-Pattern-FDD-r12", "supported"); + } + if (enhanced_minus4_tx_codebook_r12_present) { + j.write_str("enhanced-4TxCodebook-r12", "supported"); + } + if (tdd_fdd_ca_pcell_duplex_r12_present) { + j.write_str("tdd-FDD-CA-PCellDuplex-r12", tdd_fdd_ca_pcell_duplex_r12.to_string()); + } + if (phy_tdd_re_cfg_tdd_pcell_r12_present) { + j.write_str("phy-TDD-ReConfig-TDD-PCell-r12", "supported"); + } + if (phy_tdd_re_cfg_fdd_pcell_r12_present) { + j.write_str("phy-TDD-ReConfig-FDD-PCell-r12", "supported"); + } + if (pusch_feedback_mode_r12_present) { + j.write_str("pusch-FeedbackMode-r12", "supported"); + } + if (pusch_srs_pwr_ctrl_sf_set_r12_present) { + j.write_str("pusch-SRS-PowerControl-SubframeSet-r12", "supported"); + } + if (csi_sf_set_r12_present) { + j.write_str("csi-SubframeSet-r12", "supported"); + } + if (no_res_restrict_for_tti_bundling_r12_present) { + j.write_str("noResourceRestrictionForTTIBundling-r12", "supported"); + } + if (discovery_signals_in_deact_scell_r12_present) { + j.write_str("discoverySignalsInDeactSCell-r12", "supported"); + } + if (naics_cap_list_r12_present) { + j.start_array("naics-Capability-List-r12"); + for (uint32_t i1 = 0; i1 < naics_cap_list_r12.size(); ++i1) { + naics_cap_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// PhyLayerParameters-v1320 ::= SEQUENCE +phy_layer_params_v1320_s::phy_layer_params_v1320_s() +{ + mimo_ue_params_r13_present = false; +} +SRSASN_CODE phy_layer_params_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mimo_ue_params_r13_present, 1)); + + if (mimo_ue_params_r13_present) { + HANDLE_CODE(mimo_ue_params_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mimo_ue_params_r13_present, 1)); + + if (mimo_ue_params_r13_present) { + HANDLE_CODE(mimo_ue_params_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mimo_ue_params_r13_present) { + j.write_fieldname("mimo-UE-Parameters-r13"); + mimo_ue_params_r13.to_json(j); + } + j.end_obj(); +} + +// PhyLayerParameters-v1330 ::= SEQUENCE +phy_layer_params_v1330_s::phy_layer_params_v1330_s() +{ + cch_interf_mitigation_ref_rec_type_a_r13_present = false; + cch_interf_mitigation_ref_rec_type_b_r13_present = false; + cch_interf_mitigation_max_num_ccs_r13_present = false; + crs_interf_mitigation_tm1to_tm9_r13_present = false; +} +SRSASN_CODE phy_layer_params_v1330_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cch_interf_mitigation_ref_rec_type_a_r13_present, 1)); + HANDLE_CODE(bref.pack(cch_interf_mitigation_ref_rec_type_b_r13_present, 1)); + HANDLE_CODE(bref.pack(cch_interf_mitigation_max_num_ccs_r13_present, 1)); + HANDLE_CODE(bref.pack(crs_interf_mitigation_tm1to_tm9_r13_present, 1)); + + if (cch_interf_mitigation_max_num_ccs_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, cch_interf_mitigation_max_num_ccs_r13, (uint8_t)1, (uint8_t)32)); + } + if (crs_interf_mitigation_tm1to_tm9_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, crs_interf_mitigation_tm1to_tm9_r13, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1330_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cch_interf_mitigation_ref_rec_type_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(cch_interf_mitigation_ref_rec_type_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(cch_interf_mitigation_max_num_ccs_r13_present, 1)); + HANDLE_CODE(bref.unpack(crs_interf_mitigation_tm1to_tm9_r13_present, 1)); + + if (cch_interf_mitigation_max_num_ccs_r13_present) { + HANDLE_CODE(unpack_unalign_integer(cch_interf_mitigation_max_num_ccs_r13, bref, (uint8_t)1, (uint8_t)32)); + } + if (crs_interf_mitigation_tm1to_tm9_r13_present) { + HANDLE_CODE(unpack_unalign_integer(crs_interf_mitigation_tm1to_tm9_r13, bref, (uint8_t)1, (uint8_t)32)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1330_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cch_interf_mitigation_ref_rec_type_a_r13_present) { + j.write_str("cch-InterfMitigation-RefRecTypeA-r13", "supported"); + } + if (cch_interf_mitigation_ref_rec_type_b_r13_present) { + j.write_str("cch-InterfMitigation-RefRecTypeB-r13", "supported"); + } + if (cch_interf_mitigation_max_num_ccs_r13_present) { + j.write_int("cch-InterfMitigation-MaxNumCCs-r13", cch_interf_mitigation_max_num_ccs_r13); + } + if (crs_interf_mitigation_tm1to_tm9_r13_present) { + j.write_int("crs-InterfMitigationTM1toTM9-r13", crs_interf_mitigation_tm1to_tm9_r13); + } + j.end_obj(); +} + +// FeMBMS-Unicast-Parameters-r14 ::= SEQUENCE +fe_mbms_unicast_params_r14_s::fe_mbms_unicast_params_r14_s() +{ + unicast_fembms_mixed_scell_r14_present = false; + empty_unicast_region_r14_present = false; +} +SRSASN_CODE fe_mbms_unicast_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(unicast_fembms_mixed_scell_r14_present, 1)); + HANDLE_CODE(bref.pack(empty_unicast_region_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE fe_mbms_unicast_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(unicast_fembms_mixed_scell_r14_present, 1)); + HANDLE_CODE(bref.unpack(empty_unicast_region_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void fe_mbms_unicast_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (unicast_fembms_mixed_scell_r14_present) { + j.write_str("unicast-fembmsMixedSCell-r14", "supported"); + } + if (empty_unicast_region_r14_present) { + j.write_str("emptyUnicastRegion-r14", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1430 ::= SEQUENCE +phy_layer_params_v1430_s::phy_layer_params_v1430_s() +{ + ce_pusch_nb_max_tbs_r14_present = false; + ce_pdsch_pusch_max_bw_r14_present = false; + ce_harq_ack_bundling_r14_present = false; + ce_pdsch_ten_processes_r14_present = false; + ce_retuning_symbols_r14_present = false; + ce_pdsch_pusch_enhancement_r14_present = false; + ce_sched_enhancement_r14_present = false; + ce_srs_enhancement_r14_present = false; + ce_pucch_enhancement_r14_present = false; + ce_closed_loop_tx_ant_sel_r14_present = false; + tdd_special_sf_r14_present = false; + tdd_tti_bundling_r14_present = false; + dmrs_less_up_pts_r14_present = false; + mimo_ue_params_v1430_present = false; + alternative_tbs_idx_r14_present = false; + fe_mbms_unicast_params_r14_present = false; +} +SRSASN_CODE phy_layer_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_pusch_nb_max_tbs_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_pusch_max_bw_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_harq_ack_bundling_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_ten_processes_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_retuning_symbols_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pdsch_pusch_enhancement_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_sched_enhancement_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_srs_enhancement_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_pucch_enhancement_r14_present, 1)); + HANDLE_CODE(bref.pack(ce_closed_loop_tx_ant_sel_r14_present, 1)); + HANDLE_CODE(bref.pack(tdd_special_sf_r14_present, 1)); + HANDLE_CODE(bref.pack(tdd_tti_bundling_r14_present, 1)); + HANDLE_CODE(bref.pack(dmrs_less_up_pts_r14_present, 1)); + HANDLE_CODE(bref.pack(mimo_ue_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(alternative_tbs_idx_r14_present, 1)); + HANDLE_CODE(bref.pack(fe_mbms_unicast_params_r14_present, 1)); + + if (ce_pdsch_pusch_max_bw_r14_present) { + HANDLE_CODE(pack_enum(bref, ce_pdsch_pusch_max_bw_r14)); + } + if (ce_retuning_symbols_r14_present) { + HANDLE_CODE(pack_enum(bref, ce_retuning_symbols_r14)); + } + if (mimo_ue_params_v1430_present) { + HANDLE_CODE(mimo_ue_params_v1430.pack(bref)); + } + if (fe_mbms_unicast_params_r14_present) { + HANDLE_CODE(fe_mbms_unicast_params_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_pusch_nb_max_tbs_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_pusch_max_bw_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_harq_ack_bundling_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_ten_processes_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_retuning_symbols_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pdsch_pusch_enhancement_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_sched_enhancement_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_srs_enhancement_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_pucch_enhancement_r14_present, 1)); + HANDLE_CODE(bref.unpack(ce_closed_loop_tx_ant_sel_r14_present, 1)); + HANDLE_CODE(bref.unpack(tdd_special_sf_r14_present, 1)); + HANDLE_CODE(bref.unpack(tdd_tti_bundling_r14_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_less_up_pts_r14_present, 1)); + HANDLE_CODE(bref.unpack(mimo_ue_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(alternative_tbs_idx_r14_present, 1)); + HANDLE_CODE(bref.unpack(fe_mbms_unicast_params_r14_present, 1)); + + if (ce_pdsch_pusch_max_bw_r14_present) { + HANDLE_CODE(unpack_enum(ce_pdsch_pusch_max_bw_r14, bref)); + } + if (ce_retuning_symbols_r14_present) { + HANDLE_CODE(unpack_enum(ce_retuning_symbols_r14, bref)); + } + if (mimo_ue_params_v1430_present) { + HANDLE_CODE(mimo_ue_params_v1430.unpack(bref)); + } + if (fe_mbms_unicast_params_r14_present) { + HANDLE_CODE(fe_mbms_unicast_params_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_pusch_nb_max_tbs_r14_present) { + j.write_str("ce-PUSCH-NB-MaxTBS-r14", "supported"); + } + if (ce_pdsch_pusch_max_bw_r14_present) { + j.write_str("ce-PDSCH-PUSCH-MaxBandwidth-r14", ce_pdsch_pusch_max_bw_r14.to_string()); + } + if (ce_harq_ack_bundling_r14_present) { + j.write_str("ce-HARQ-AckBundling-r14", "supported"); + } + if (ce_pdsch_ten_processes_r14_present) { + j.write_str("ce-PDSCH-TenProcesses-r14", "supported"); + } + if (ce_retuning_symbols_r14_present) { + j.write_str("ce-RetuningSymbols-r14", ce_retuning_symbols_r14.to_string()); + } + if (ce_pdsch_pusch_enhancement_r14_present) { + j.write_str("ce-PDSCH-PUSCH-Enhancement-r14", "supported"); + } + if (ce_sched_enhancement_r14_present) { + j.write_str("ce-SchedulingEnhancement-r14", "supported"); + } + if (ce_srs_enhancement_r14_present) { + j.write_str("ce-SRS-Enhancement-r14", "supported"); + } + if (ce_pucch_enhancement_r14_present) { + j.write_str("ce-PUCCH-Enhancement-r14", "supported"); + } + if (ce_closed_loop_tx_ant_sel_r14_present) { + j.write_str("ce-ClosedLoopTxAntennaSelection-r14", "supported"); + } + if (tdd_special_sf_r14_present) { + j.write_str("tdd-SpecialSubframe-r14", "supported"); + } + if (tdd_tti_bundling_r14_present) { + j.write_str("tdd-TTI-Bundling-r14", "supported"); + } + if (dmrs_less_up_pts_r14_present) { + j.write_str("dmrs-LessUpPTS-r14", "supported"); + } + if (mimo_ue_params_v1430_present) { + j.write_fieldname("mimo-UE-Parameters-v1430"); + mimo_ue_params_v1430.to_json(j); + } + if (alternative_tbs_idx_r14_present) { + j.write_str("alternativeTBS-Index-r14", "supported"); + } + if (fe_mbms_unicast_params_r14_present) { + j.write_fieldname("feMBMS-Unicast-Parameters-r14"); + fe_mbms_unicast_params_r14.to_json(j); + } + j.end_obj(); +} + +// PhyLayerParameters-v1470 ::= SEQUENCE +phy_layer_params_v1470_s::phy_layer_params_v1470_s() +{ + mimo_ue_params_v1470_present = false; + srs_up_pts_minus6sym_r14_present = false; +} +SRSASN_CODE phy_layer_params_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mimo_ue_params_v1470_present, 1)); + HANDLE_CODE(bref.pack(srs_up_pts_minus6sym_r14_present, 1)); + + if (mimo_ue_params_v1470_present) { + HANDLE_CODE(mimo_ue_params_v1470.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mimo_ue_params_v1470_present, 1)); + HANDLE_CODE(bref.unpack(srs_up_pts_minus6sym_r14_present, 1)); + + if (mimo_ue_params_v1470_present) { + HANDLE_CODE(mimo_ue_params_v1470.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mimo_ue_params_v1470_present) { + j.write_fieldname("mimo-UE-Parameters-v1470"); + mimo_ue_params_v1470.to_json(j); + } + if (srs_up_pts_minus6sym_r14_present) { + j.write_str("srs-UpPTS-6sym-r14", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1530 ::= SEQUENCE +phy_layer_params_v1530_s::phy_layer_params_v1530_s() +{ + stti_spt_capabilities_r15_present = false; + ce_capabilities_r15_present = false; + short_cqi_for_scell_activation_r15_present = false; + mimo_cbsr_advanced_csi_r15_present = false; + crs_intf_mitig_r15_present = false; + ul_pwr_ctrl_enhance_r15_present = false; + urllc_capabilities_r15_present = false; + alt_mcs_table_r15_present = false; +} +SRSASN_CODE phy_layer_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15_present, 1)); + HANDLE_CODE(bref.pack(short_cqi_for_scell_activation_r15_present, 1)); + HANDLE_CODE(bref.pack(mimo_cbsr_advanced_csi_r15_present, 1)); + HANDLE_CODE(bref.pack(crs_intf_mitig_r15_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_enhance_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15_present, 1)); + HANDLE_CODE(bref.pack(alt_mcs_table_r15_present, 1)); + + if (stti_spt_capabilities_r15_present) { + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.aperiodic_csi_report_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.dmrs_based_spdcch_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.dmrs_based_spdcch_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.dmrs_position_pattern_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.dmrs_sharing_subslot_pdsch_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.dmrs_repeat_subslot_pdsch_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.epdcch_spt_different_cells_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.epdcch_stti_different_cells_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.mimo_ue_params_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.mimo_ue_params_stti_v1530_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.nof_blind_decodes_uss_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.pdsch_slot_subslot_pdsch_decoding_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.pwr_uci_slot_pusch_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.pwr_uci_subslot_pusch_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.slot_pdsch_tx_div_tm9and10_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.subslot_pdsch_tx_div_tm9and10_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.spdcch_different_rs_types_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.srs_dci7_triggering_fs2_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.sps_cyclic_shift_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.spdcch_reuse_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.sps_stti_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.tm8_slot_pdsch_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.tm9_slot_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.tm9_slot_subslot_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.tm10_slot_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.tm10_slot_subslot_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.tx_div_spucch_r15_present, 1)); + HANDLE_CODE(bref.pack(stti_spt_capabilities_r15.ul_async_harq_sharing_diff_tti_lens_r15_present, 1)); + if (stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15_present) { + HANDLE_CODE(pack_enum(bref, stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15, (uint8_t)5, + (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.mimo_ue_params_stti_r15_present) { + HANDLE_CODE(stti_spt_capabilities_r15.mimo_ue_params_stti_r15.pack(bref)); + } + if (stti_spt_capabilities_r15.mimo_ue_params_stti_v1530_present) { + HANDLE_CODE(stti_spt_capabilities_r15.mimo_ue_params_stti_v1530.pack(bref)); + } + if (stti_spt_capabilities_r15.nof_blind_decodes_uss_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, stti_spt_capabilities_r15.nof_blind_decodes_uss_r15, (uint8_t)4, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.sps_stti_r15_present) { + HANDLE_CODE(pack_enum(bref, stti_spt_capabilities_r15.sps_stti_r15)); + } + } + if (ce_capabilities_r15_present) { + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_crs_intf_mitig_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_cqi_alternative_table_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_pdsch_flex_start_prb_ce_mode_a_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_pdsch_flex_start_prb_ce_mode_b_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_pdsch_minus64_qam_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_pusch_flex_start_prb_ce_mode_a_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_pusch_flex_start_prb_ce_mode_b_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_pusch_sub_prb_alloc_r15_present, 1)); + HANDLE_CODE(bref.pack(ce_capabilities_r15.ce_ul_harq_ack_feedback_r15_present, 1)); + } + if (urllc_capabilities_r15_present) { + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pdsch_rep_sf_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pdsch_rep_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pdsch_rep_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_slot_rep_pcell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_slot_rep_ps_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_slot_rep_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_sf_rep_pcell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_sf_rep_ps_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_sf_rep_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_subslot_rep_pcell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_subslot_rep_ps_cell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.pusch_sps_subslot_rep_scell_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.semi_static_cfi_r15_present, 1)); + HANDLE_CODE(bref.pack(urllc_capabilities_r15.semi_static_cfi_pattern_r15_present, 1)); + if (urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15, (uint8_t)0, (uint8_t)6)); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15_present) { + HANDLE_CODE(pack_unalign_integer(bref, urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15, (uint8_t)0, (uint8_t)31)); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15, (uint8_t)0, (uint8_t)6)); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15, (uint8_t)0, (uint8_t)31)); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15, (uint8_t)0, (uint8_t)6)); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15_present) { + HANDLE_CODE( + pack_unalign_integer(bref, urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15, (uint8_t)0, (uint8_t)31)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15_present, 1)); + HANDLE_CODE(bref.unpack(short_cqi_for_scell_activation_r15_present, 1)); + HANDLE_CODE(bref.unpack(mimo_cbsr_advanced_csi_r15_present, 1)); + HANDLE_CODE(bref.unpack(crs_intf_mitig_r15_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_enhance_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15_present, 1)); + HANDLE_CODE(bref.unpack(alt_mcs_table_r15_present, 1)); + + if (stti_spt_capabilities_r15_present) { + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.aperiodic_csi_report_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.dmrs_based_spdcch_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.dmrs_based_spdcch_non_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.dmrs_position_pattern_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.dmrs_sharing_subslot_pdsch_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.dmrs_repeat_subslot_pdsch_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.epdcch_spt_different_cells_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.epdcch_stti_different_cells_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.mimo_ue_params_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.mimo_ue_params_stti_v1530_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.nof_blind_decodes_uss_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.pdsch_slot_subslot_pdsch_decoding_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.pwr_uci_slot_pusch_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.pwr_uci_subslot_pusch_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.slot_pdsch_tx_div_tm9and10_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.subslot_pdsch_tx_div_tm9and10_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.spdcch_different_rs_types_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.srs_dci7_triggering_fs2_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.sps_cyclic_shift_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.spdcch_reuse_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.sps_stti_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.tm8_slot_pdsch_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.tm9_slot_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.tm9_slot_subslot_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.tm10_slot_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.tm10_slot_subslot_mbsfn_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.tx_div_spucch_r15_present, 1)); + HANDLE_CODE(bref.unpack(stti_spt_capabilities_r15.ul_async_harq_sharing_diff_tti_lens_r15_present, 1)); + if (stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15_present) { + HANDLE_CODE(unpack_enum(stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15, bref)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15_present) { + HANDLE_CODE(unpack_unalign_integer(stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15, bref, (uint8_t)5, + (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15_present) { + HANDLE_CODE(unpack_unalign_integer(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15, bref, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15_present) { + HANDLE_CODE(unpack_unalign_integer(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15, bref, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15_present) { + HANDLE_CODE(unpack_unalign_integer(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15, bref, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15_present) { + HANDLE_CODE(unpack_unalign_integer(stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15, bref, + (uint8_t)1, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.mimo_ue_params_stti_r15_present) { + HANDLE_CODE(stti_spt_capabilities_r15.mimo_ue_params_stti_r15.unpack(bref)); + } + if (stti_spt_capabilities_r15.mimo_ue_params_stti_v1530_present) { + HANDLE_CODE(stti_spt_capabilities_r15.mimo_ue_params_stti_v1530.unpack(bref)); + } + if (stti_spt_capabilities_r15.nof_blind_decodes_uss_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(stti_spt_capabilities_r15.nof_blind_decodes_uss_r15, bref, (uint8_t)4, (uint8_t)32)); + } + if (stti_spt_capabilities_r15.sps_stti_r15_present) { + HANDLE_CODE(unpack_enum(stti_spt_capabilities_r15.sps_stti_r15, bref)); + } + } + if (ce_capabilities_r15_present) { + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_crs_intf_mitig_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_cqi_alternative_table_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_pdsch_flex_start_prb_ce_mode_a_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_pdsch_flex_start_prb_ce_mode_b_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_pdsch_minus64_qam_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_pusch_flex_start_prb_ce_mode_a_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_pusch_flex_start_prb_ce_mode_b_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_pusch_sub_prb_alloc_r15_present, 1)); + HANDLE_CODE(bref.unpack(ce_capabilities_r15.ce_ul_harq_ack_feedback_r15_present, 1)); + } + if (urllc_capabilities_r15_present) { + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pdsch_rep_sf_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pdsch_rep_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pdsch_rep_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_slot_rep_pcell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_slot_rep_ps_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_slot_rep_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_sf_rep_pcell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_sf_rep_ps_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_sf_rep_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_subslot_rep_pcell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_subslot_rep_ps_cell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.pusch_sps_subslot_rep_scell_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.semi_static_cfi_r15_present, 1)); + HANDLE_CODE(bref.unpack(urllc_capabilities_r15.semi_static_cfi_pattern_r15_present, 1)); + if (urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15, bref, (uint8_t)0, (uint8_t)6)); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15, bref, (uint8_t)0, (uint8_t)31)); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15, bref, (uint8_t)0, (uint8_t)6)); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15, bref, (uint8_t)0, (uint8_t)31)); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15, bref, (uint8_t)0, (uint8_t)6)); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15_present) { + HANDLE_CODE( + unpack_unalign_integer(urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15, bref, (uint8_t)0, (uint8_t)31)); + } + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (stti_spt_capabilities_r15_present) { + j.write_fieldname("stti-SPT-Capabilities-r15"); + j.start_obj(); + if (stti_spt_capabilities_r15.aperiodic_csi_report_stti_r15_present) { + j.write_str("aperiodicCsi-ReportingSTTI-r15", "supported"); + } + if (stti_spt_capabilities_r15.dmrs_based_spdcch_mbsfn_r15_present) { + j.write_str("dmrs-BasedSPDCCH-MBSFN-r15", "supported"); + } + if (stti_spt_capabilities_r15.dmrs_based_spdcch_non_mbsfn_r15_present) { + j.write_str("dmrs-BasedSPDCCH-nonMBSFN-r15", "supported"); + } + if (stti_spt_capabilities_r15.dmrs_position_pattern_r15_present) { + j.write_str("dmrs-PositionPattern-r15", "supported"); + } + if (stti_spt_capabilities_r15.dmrs_sharing_subslot_pdsch_r15_present) { + j.write_str("dmrs-SharingSubslotPDSCH-r15", "supported"); + } + if (stti_spt_capabilities_r15.dmrs_repeat_subslot_pdsch_r15_present) { + j.write_str("dmrs-RepetitionSubslotPDSCH-r15", "supported"); + } + if (stti_spt_capabilities_r15.epdcch_spt_different_cells_r15_present) { + j.write_str("epdcch-SPT-differentCells-r15", "supported"); + } + if (stti_spt_capabilities_r15.epdcch_stti_different_cells_r15_present) { + j.write_str("epdcch-STTI-differentCells-r15", "supported"); + } + if (stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15_present) { + j.write_str("maxLayersSlotOrSubslotPUSCH-r15", + stti_spt_capabilities_r15.max_layers_slot_or_subslot_pusch_r15.to_string()); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15_present) { + j.write_int("maxNumberUpdatedCSI-Proc-SPT-r15", stti_spt_capabilities_r15.max_num_updated_csi_proc_spt_r15); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15_present) { + j.write_int("maxNumberUpdatedCSI-Proc-STTI-Comb77-r15", + stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb77_r15); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15_present) { + j.write_int("maxNumberUpdatedCSI-Proc-STTI-Comb27-r15", + stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb27_r15); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15_present) { + j.write_int("maxNumberUpdatedCSI-Proc-STTI-Comb22-Set1-r15", + stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set1_r15); + } + if (stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15_present) { + j.write_int("maxNumberUpdatedCSI-Proc-STTI-Comb22-Set2-r15", + stti_spt_capabilities_r15.max_num_updated_csi_proc_stti_comb22_set2_r15); + } + if (stti_spt_capabilities_r15.mimo_ue_params_stti_r15_present) { + j.write_fieldname("mimo-UE-ParametersSTTI-r15"); + stti_spt_capabilities_r15.mimo_ue_params_stti_r15.to_json(j); + } + if (stti_spt_capabilities_r15.mimo_ue_params_stti_v1530_present) { + j.write_fieldname("mimo-UE-ParametersSTTI-v1530"); + stti_spt_capabilities_r15.mimo_ue_params_stti_v1530.to_json(j); + } + if (stti_spt_capabilities_r15.nof_blind_decodes_uss_r15_present) { + j.write_int("numberOfBlindDecodesUSS-r15", stti_spt_capabilities_r15.nof_blind_decodes_uss_r15); + } + if (stti_spt_capabilities_r15.pdsch_slot_subslot_pdsch_decoding_r15_present) { + j.write_str("pdsch-SlotSubslotPDSCH-Decoding-r15", "supported"); + } + if (stti_spt_capabilities_r15.pwr_uci_slot_pusch_present) { + j.write_str("powerUCI-SlotPUSCH", "supported"); + } + if (stti_spt_capabilities_r15.pwr_uci_subslot_pusch_present) { + j.write_str("powerUCI-SubslotPUSCH", "supported"); + } + if (stti_spt_capabilities_r15.slot_pdsch_tx_div_tm9and10_present) { + j.write_str("slotPDSCH-TxDiv-TM9and10", "supported"); + } + if (stti_spt_capabilities_r15.subslot_pdsch_tx_div_tm9and10_present) { + j.write_str("subslotPDSCH-TxDiv-TM9and10", "supported"); + } + if (stti_spt_capabilities_r15.spdcch_different_rs_types_r15_present) { + j.write_str("spdcch-differentRS-types-r15", "supported"); + } + if (stti_spt_capabilities_r15.srs_dci7_triggering_fs2_r15_present) { + j.write_str("srs-DCI7-TriggeringFS2-r15", "supported"); + } + if (stti_spt_capabilities_r15.sps_cyclic_shift_r15_present) { + j.write_str("sps-cyclicShift-r15", "supported"); + } + if (stti_spt_capabilities_r15.spdcch_reuse_r15_present) { + j.write_str("spdcch-Reuse-r15", "supported"); + } + if (stti_spt_capabilities_r15.sps_stti_r15_present) { + j.write_str("sps-STTI-r15", stti_spt_capabilities_r15.sps_stti_r15.to_string()); + } + if (stti_spt_capabilities_r15.tm8_slot_pdsch_r15_present) { + j.write_str("tm8-slotPDSCH-r15", "supported"); + } + if (stti_spt_capabilities_r15.tm9_slot_subslot_r15_present) { + j.write_str("tm9-slotSubslot-r15", "supported"); + } + if (stti_spt_capabilities_r15.tm9_slot_subslot_mbsfn_r15_present) { + j.write_str("tm9-slotSubslotMBSFN-r15", "supported"); + } + if (stti_spt_capabilities_r15.tm10_slot_subslot_r15_present) { + j.write_str("tm10-slotSubslot-r15", "supported"); + } + if (stti_spt_capabilities_r15.tm10_slot_subslot_mbsfn_r15_present) { + j.write_str("tm10-slotSubslotMBSFN-r15", "supported"); + } + if (stti_spt_capabilities_r15.tx_div_spucch_r15_present) { + j.write_str("txDiv-SPUCCH-r15", "supported"); + } + if (stti_spt_capabilities_r15.ul_async_harq_sharing_diff_tti_lens_r15_present) { + j.write_str("ul-AsyncHarqSharingDiff-TTI-Lengths-r15", "supported"); + } + j.end_obj(); + } + if (ce_capabilities_r15_present) { + j.write_fieldname("ce-Capabilities-r15"); + j.start_obj(); + if (ce_capabilities_r15.ce_crs_intf_mitig_r15_present) { + j.write_str("ce-CRS-IntfMitig-r15", "supported"); + } + if (ce_capabilities_r15.ce_cqi_alternative_table_r15_present) { + j.write_str("ce-CQI-AlternativeTable-r15", "supported"); + } + if (ce_capabilities_r15.ce_pdsch_flex_start_prb_ce_mode_a_r15_present) { + j.write_str("ce-PDSCH-FlexibleStartPRB-CE-ModeA-r15", "supported"); + } + if (ce_capabilities_r15.ce_pdsch_flex_start_prb_ce_mode_b_r15_present) { + j.write_str("ce-PDSCH-FlexibleStartPRB-CE-ModeB-r15", "supported"); + } + if (ce_capabilities_r15.ce_pdsch_minus64_qam_r15_present) { + j.write_str("ce-PDSCH-64QAM-r15", "supported"); + } + if (ce_capabilities_r15.ce_pusch_flex_start_prb_ce_mode_a_r15_present) { + j.write_str("ce-PUSCH-FlexibleStartPRB-CE-ModeA-r15", "supported"); + } + if (ce_capabilities_r15.ce_pusch_flex_start_prb_ce_mode_b_r15_present) { + j.write_str("ce-PUSCH-FlexibleStartPRB-CE-ModeB-r15", "supported"); + } + if (ce_capabilities_r15.ce_pusch_sub_prb_alloc_r15_present) { + j.write_str("ce-PUSCH-SubPRB-Allocation-r15", "supported"); + } + if (ce_capabilities_r15.ce_ul_harq_ack_feedback_r15_present) { + j.write_str("ce-UL-HARQ-ACK-Feedback-r15", "supported"); + } + j.end_obj(); + } + if (short_cqi_for_scell_activation_r15_present) { + j.write_str("shortCQI-ForSCellActivation-r15", "supported"); + } + if (mimo_cbsr_advanced_csi_r15_present) { + j.write_str("mimo-CBSR-AdvancedCSI-r15", "supported"); + } + if (crs_intf_mitig_r15_present) { + j.write_str("crs-IntfMitig-r15", "supported"); + } + if (ul_pwr_ctrl_enhance_r15_present) { + j.write_str("ul-PowerControlEnhancements-r15", "supported"); + } + if (urllc_capabilities_r15_present) { + j.write_fieldname("urllc-Capabilities-r15"); + j.start_obj(); + if (urllc_capabilities_r15.pdsch_rep_sf_r15_present) { + j.write_str("pdsch-RepSubframe-r15", "supported"); + } + if (urllc_capabilities_r15.pdsch_rep_slot_r15_present) { + j.write_str("pdsch-RepSlot-r15", "supported"); + } + if (urllc_capabilities_r15.pdsch_rep_subslot_r15_present) { + j.write_str("pdsch-RepSubslot-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15_present) { + j.write_int("pusch-SPS-MultiConfigSubframe-r15", urllc_capabilities_r15.pusch_sps_multi_cfg_sf_r15); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15_present) { + j.write_int("pusch-SPS-MaxConfigSubframe-r15", urllc_capabilities_r15.pusch_sps_max_cfg_sf_r15); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15_present) { + j.write_int("pusch-SPS-MultiConfigSlot-r15", urllc_capabilities_r15.pusch_sps_multi_cfg_slot_r15); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15_present) { + j.write_int("pusch-SPS-MaxConfigSlot-r15", urllc_capabilities_r15.pusch_sps_max_cfg_slot_r15); + } + if (urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15_present) { + j.write_int("pusch-SPS-MultiConfigSubslot-r15", urllc_capabilities_r15.pusch_sps_multi_cfg_subslot_r15); + } + if (urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15_present) { + j.write_int("pusch-SPS-MaxConfigSubslot-r15", urllc_capabilities_r15.pusch_sps_max_cfg_subslot_r15); + } + if (urllc_capabilities_r15.pusch_sps_slot_rep_pcell_r15_present) { + j.write_str("pusch-SPS-SlotRepPCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_slot_rep_ps_cell_r15_present) { + j.write_str("pusch-SPS-SlotRepPSCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_slot_rep_scell_r15_present) { + j.write_str("pusch-SPS-SlotRepSCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_sf_rep_pcell_r15_present) { + j.write_str("pusch-SPS-SubframeRepPCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_sf_rep_ps_cell_r15_present) { + j.write_str("pusch-SPS-SubframeRepPSCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_sf_rep_scell_r15_present) { + j.write_str("pusch-SPS-SubframeRepSCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_subslot_rep_pcell_r15_present) { + j.write_str("pusch-SPS-SubslotRepPCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_subslot_rep_ps_cell_r15_present) { + j.write_str("pusch-SPS-SubslotRepPSCell-r15", "supported"); + } + if (urllc_capabilities_r15.pusch_sps_subslot_rep_scell_r15_present) { + j.write_str("pusch-SPS-SubslotRepSCell-r15", "supported"); + } + if (urllc_capabilities_r15.semi_static_cfi_r15_present) { + j.write_str("semiStaticCFI-r15", "supported"); + } + if (urllc_capabilities_r15.semi_static_cfi_pattern_r15_present) { + j.write_str("semiStaticCFI-Pattern-r15", "supported"); + } + j.end_obj(); + } + if (alt_mcs_table_r15_present) { + j.write_str("altMCS-Table-r15", "supported"); + } + j.end_obj(); +} + +phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::stti_spt_capabilities_r15_s_() +{ + aperiodic_csi_report_stti_r15_present = false; + dmrs_based_spdcch_mbsfn_r15_present = false; + dmrs_based_spdcch_non_mbsfn_r15_present = false; + dmrs_position_pattern_r15_present = false; + dmrs_sharing_subslot_pdsch_r15_present = false; + dmrs_repeat_subslot_pdsch_r15_present = false; + epdcch_spt_different_cells_r15_present = false; + epdcch_stti_different_cells_r15_present = false; + max_layers_slot_or_subslot_pusch_r15_present = false; + max_num_updated_csi_proc_spt_r15_present = false; + max_num_updated_csi_proc_stti_comb77_r15_present = false; + max_num_updated_csi_proc_stti_comb27_r15_present = false; + max_num_updated_csi_proc_stti_comb22_set1_r15_present = false; + max_num_updated_csi_proc_stti_comb22_set2_r15_present = false; + mimo_ue_params_stti_r15_present = false; + mimo_ue_params_stti_v1530_present = false; + nof_blind_decodes_uss_r15_present = false; + pdsch_slot_subslot_pdsch_decoding_r15_present = false; + pwr_uci_slot_pusch_present = false; + pwr_uci_subslot_pusch_present = false; + slot_pdsch_tx_div_tm9and10_present = false; + subslot_pdsch_tx_div_tm9and10_present = false; + spdcch_different_rs_types_r15_present = false; + srs_dci7_triggering_fs2_r15_present = false; + sps_cyclic_shift_r15_present = false; + spdcch_reuse_r15_present = false; + sps_stti_r15_present = false; + tm8_slot_pdsch_r15_present = false; + tm9_slot_subslot_r15_present = false; + tm9_slot_subslot_mbsfn_r15_present = false; + tm10_slot_subslot_r15_present = false; + tm10_slot_subslot_mbsfn_r15_present = false; + tx_div_spucch_r15_present = false; + ul_async_harq_sharing_diff_tti_lens_r15_present = false; +} + +phy_layer_params_v1530_s::ce_capabilities_r15_s_::ce_capabilities_r15_s_() +{ + ce_crs_intf_mitig_r15_present = false; + ce_cqi_alternative_table_r15_present = false; + ce_pdsch_flex_start_prb_ce_mode_a_r15_present = false; + ce_pdsch_flex_start_prb_ce_mode_b_r15_present = false; + ce_pdsch_minus64_qam_r15_present = false; + ce_pusch_flex_start_prb_ce_mode_a_r15_present = false; + ce_pusch_flex_start_prb_ce_mode_b_r15_present = false; + ce_pusch_sub_prb_alloc_r15_present = false; + ce_ul_harq_ack_feedback_r15_present = false; +} + +phy_layer_params_v1530_s::urllc_capabilities_r15_s_::urllc_capabilities_r15_s_() +{ + pdsch_rep_sf_r15_present = false; + pdsch_rep_slot_r15_present = false; + pdsch_rep_subslot_r15_present = false; + pusch_sps_multi_cfg_sf_r15_present = false; + pusch_sps_max_cfg_sf_r15_present = false; + pusch_sps_multi_cfg_slot_r15_present = false; + pusch_sps_max_cfg_slot_r15_present = false; + pusch_sps_multi_cfg_subslot_r15_present = false; + pusch_sps_max_cfg_subslot_r15_present = false; + pusch_sps_slot_rep_pcell_r15_present = false; + pusch_sps_slot_rep_ps_cell_r15_present = false; + pusch_sps_slot_rep_scell_r15_present = false; + pusch_sps_sf_rep_pcell_r15_present = false; + pusch_sps_sf_rep_ps_cell_r15_present = false; + pusch_sps_sf_rep_scell_r15_present = false; + pusch_sps_subslot_rep_pcell_r15_present = false; + pusch_sps_subslot_rep_ps_cell_r15_present = false; + pusch_sps_subslot_rep_scell_r15_present = false; + semi_static_cfi_r15_present = false; + semi_static_cfi_pattern_r15_present = false; +} + +// SupportedBandEUTRA ::= SEQUENCE +SRSASN_CODE supported_band_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, band_eutra, (uint8_t)1, (uint8_t)64)); + HANDLE_CODE(bref.pack(half_duplex, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_eutra_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(band_eutra, bref, (uint8_t)1, (uint8_t)64)); + HANDLE_CODE(bref.unpack(half_duplex, 1)); + + return SRSASN_SUCCESS; +} +void supported_band_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandEUTRA", band_eutra); + j.write_bool("halfDuplex", half_duplex); + j.end_obj(); +} + +// RF-Parameters ::= SEQUENCE +SRSASN_CODE rf_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_eutra, 1, 64)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_eutra, bref, 1, 64)); + + return SRSASN_SUCCESS; +} +void rf_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandListEUTRA"); + for (uint32_t i1 = 0; i1 < supported_band_list_eutra.size(); ++i1) { + supported_band_list_eutra[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RF-Parameters-v1020 ::= SEQUENCE +SRSASN_CODE rf_params_v1020_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_r10, 1, 128, SeqOfPacker(1, 64, Packer()))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1020_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_r10, bref, 1, 128, SeqOfPacker(1, 64, Packer()))); + + return SRSASN_SUCCESS; +} +void rf_params_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandCombination-r10"); + for (uint32_t i1 = 0; i1 < supported_band_combination_r10.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < supported_band_combination_r10[i1].size(); ++i2) { + supported_band_combination_r10[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + j.end_obj(); +} + +// RF-Parameters-v1060 ::= SEQUENCE +SRSASN_CODE rf_params_v1060_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_ext_r10, 1, 128)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1060_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_ext_r10, bref, 1, 128)); + + return SRSASN_SUCCESS; +} +void rf_params_v1060_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("supportedBandCombinationExt-r10"); + for (uint32_t i1 = 0; i1 < supported_band_combination_ext_r10.size(); ++i1) { + supported_band_combination_ext_r10[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RF-Parameters-v1090 ::= SEQUENCE +rf_params_v1090_s::rf_params_v1090_s() +{ + supported_band_combination_v1090_present = false; +} +SRSASN_CODE rf_params_v1090_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1090_present, 1)); + + if (supported_band_combination_v1090_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1090, 1, 128, SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1090_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1090_present, 1)); + + if (supported_band_combination_v1090_present) { + HANDLE_CODE( + unpack_dyn_seq_of(supported_band_combination_v1090, bref, 1, 128, SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1090_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1090_present) { + j.start_array("supportedBandCombination-v1090"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1090.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < supported_band_combination_v1090[i1].size(); ++i2) { + supported_band_combination_v1090[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v10i0 ::= SEQUENCE +rf_params_v10i0_s::rf_params_v10i0_s() +{ + supported_band_combination_v10i0_present = false; +} +SRSASN_CODE rf_params_v10i0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v10i0_present, 1)); + + if (supported_band_combination_v10i0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v10i0, 1, 128)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v10i0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v10i0_present, 1)); + + if (supported_band_combination_v10i0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v10i0, bref, 1, 128)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v10i0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v10i0_present) { + j.start_array("supportedBandCombination-v10i0"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v10i0.size(); ++i1) { + supported_band_combination_v10i0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v1130 ::= SEQUENCE +rf_params_v1130_s::rf_params_v1130_s() +{ + supported_band_combination_v1130_present = false; +} +SRSASN_CODE rf_params_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1130_present, 1)); + + if (supported_band_combination_v1130_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1130, 1, 128)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1130_present, 1)); + + if (supported_band_combination_v1130_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1130, bref, 1, 128)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1130_present) { + j.start_array("supportedBandCombination-v1130"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1130.size(); ++i1) { + supported_band_combination_v1130[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v1180 ::= SEQUENCE +rf_params_v1180_s::rf_params_v1180_s() +{ + freq_band_retrieval_r11_present = false; + requested_bands_r11_present = false; + supported_band_combination_add_r11_present = false; +} +SRSASN_CODE rf_params_v1180_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(freq_band_retrieval_r11_present, 1)); + HANDLE_CODE(bref.pack(requested_bands_r11_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_r11_present, 1)); + + if (requested_bands_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, requested_bands_r11, 1, 64, UnalignedIntegerPacker(1, 256))); + } + if (supported_band_combination_add_r11_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_r11, 1, 256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1180_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(freq_band_retrieval_r11_present, 1)); + HANDLE_CODE(bref.unpack(requested_bands_r11_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_r11_present, 1)); + + if (requested_bands_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(requested_bands_r11, bref, 1, 64, UnalignedIntegerPacker(1, 256))); + } + if (supported_band_combination_add_r11_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_r11, bref, 1, 256)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1180_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_band_retrieval_r11_present) { + j.write_str("freqBandRetrieval-r11", "supported"); + } + if (requested_bands_r11_present) { + j.start_array("requestedBands-r11"); + for (uint32_t i1 = 0; i1 < requested_bands_r11.size(); ++i1) { + j.write_int(requested_bands_r11[i1]); + } + j.end_array(); + } + if (supported_band_combination_add_r11_present) { + j.start_array("supportedBandCombinationAdd-r11"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_r11.size(); ++i1) { + supported_band_combination_add_r11[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v11d0 ::= SEQUENCE +rf_params_v11d0_s::rf_params_v11d0_s() +{ + supported_band_combination_add_v11d0_present = false; +} +SRSASN_CODE rf_params_v11d0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_add_v11d0_present, 1)); + + if (supported_band_combination_add_v11d0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v11d0, 1, 256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v11d0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_add_v11d0_present, 1)); + + if (supported_band_combination_add_v11d0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v11d0, bref, 1, 256)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v11d0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_add_v11d0_present) { + j.start_array("supportedBandCombinationAdd-v11d0"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v11d0.size(); ++i1) { + supported_band_combination_add_v11d0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SupportedBandEUTRA-v1250 ::= SEQUENCE +supported_band_eutra_v1250_s::supported_band_eutra_v1250_s() +{ + dl_minus256_qam_r12_present = false; + ul_minus64_qam_r12_present = false; +} +SRSASN_CODE supported_band_eutra_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dl_minus256_qam_r12_present, 1)); + HANDLE_CODE(bref.pack(ul_minus64_qam_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_eutra_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dl_minus256_qam_r12_present, 1)); + HANDLE_CODE(bref.unpack(ul_minus64_qam_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void supported_band_eutra_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_minus256_qam_r12_present) { + j.write_str("dl-256QAM-r12", "supported"); + } + if (ul_minus64_qam_r12_present) { + j.write_str("ul-64QAM-r12", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v1250 ::= SEQUENCE +rf_params_v1250_s::rf_params_v1250_s() +{ + supported_band_list_eutra_v1250_present = false; + supported_band_combination_v1250_present = false; + supported_band_combination_add_v1250_present = false; + freq_band_prio_adjustment_r12_present = false; +} +SRSASN_CODE rf_params_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_list_eutra_v1250_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_v1250_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1250_present, 1)); + HANDLE_CODE(bref.pack(freq_band_prio_adjustment_r12_present, 1)); + + if (supported_band_list_eutra_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_eutra_v1250, 1, 64)); + } + if (supported_band_combination_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1250, 1, 128)); + } + if (supported_band_combination_add_v1250_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1250, 1, 256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_list_eutra_v1250_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_v1250_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1250_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_prio_adjustment_r12_present, 1)); + + if (supported_band_list_eutra_v1250_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_eutra_v1250, bref, 1, 64)); + } + if (supported_band_combination_v1250_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1250, bref, 1, 128)); + } + if (supported_band_combination_add_v1250_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1250, bref, 1, 256)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_list_eutra_v1250_present) { + j.start_array("supportedBandListEUTRA-v1250"); + for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v1250.size(); ++i1) { + supported_band_list_eutra_v1250[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_v1250_present) { + j.start_array("supportedBandCombination-v1250"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1250.size(); ++i1) { + supported_band_combination_v1250[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1250_present) { + j.start_array("supportedBandCombinationAdd-v1250"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1250.size(); ++i1) { + supported_band_combination_add_v1250[i1].to_json(j); + } + j.end_array(); + } + if (freq_band_prio_adjustment_r12_present) { + j.write_str("freqBandPriorityAdjustment-r12", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v1270 ::= SEQUENCE +rf_params_v1270_s::rf_params_v1270_s() +{ + supported_band_combination_v1270_present = false; + supported_band_combination_add_v1270_present = false; +} +SRSASN_CODE rf_params_v1270_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1270_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1270_present, 1)); + + if (supported_band_combination_v1270_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1270, 1, 128)); + } + if (supported_band_combination_add_v1270_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1270, 1, 256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1270_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1270_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1270_present, 1)); + + if (supported_band_combination_v1270_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1270, bref, 1, 128)); + } + if (supported_band_combination_add_v1270_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1270, bref, 1, 256)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1270_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1270_present) { + j.start_array("supportedBandCombination-v1270"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1270.size(); ++i1) { + supported_band_combination_v1270[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1270_present) { + j.start_array("supportedBandCombinationAdd-v1270"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1270.size(); ++i1) { + supported_band_combination_add_v1270[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SupportedBandEUTRA-v1310 ::= SEQUENCE +supported_band_eutra_v1310_s::supported_band_eutra_v1310_s() +{ + ue_pwr_class_minus5_r13_present = false; +} +SRSASN_CODE supported_band_eutra_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_pwr_class_minus5_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_eutra_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_pwr_class_minus5_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void supported_band_eutra_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_pwr_class_minus5_r13_present) { + j.write_str("ue-PowerClass-5-r13", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v1310 ::= SEQUENCE +rf_params_v1310_s::rf_params_v1310_s() +{ + e_nb_requested_params_r13_present = false; + maximum_ccs_retrieval_r13_present = false; + skip_fallback_combinations_r13_present = false; + reduced_int_non_cont_comb_r13_present = false; + supported_band_list_eutra_v1310_present = false; + supported_band_combination_reduced_r13_present = false; +} +SRSASN_CODE rf_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_nb_requested_params_r13_present, 1)); + HANDLE_CODE(bref.pack(maximum_ccs_retrieval_r13_present, 1)); + HANDLE_CODE(bref.pack(skip_fallback_combinations_r13_present, 1)); + HANDLE_CODE(bref.pack(reduced_int_non_cont_comb_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_band_list_eutra_v1310_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_r13_present, 1)); + + if (e_nb_requested_params_r13_present) { + HANDLE_CODE(bref.pack(e_nb_requested_params_r13.reduced_int_non_cont_comb_requested_r13_present, 1)); + HANDLE_CODE(bref.pack(e_nb_requested_params_r13.requested_ccs_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(e_nb_requested_params_r13.requested_ccs_ul_r13_present, 1)); + HANDLE_CODE(bref.pack(e_nb_requested_params_r13.skip_fallback_comb_requested_r13_present, 1)); + if (e_nb_requested_params_r13.requested_ccs_dl_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, e_nb_requested_params_r13.requested_ccs_dl_r13, (uint8_t)2, (uint8_t)32)); + } + if (e_nb_requested_params_r13.requested_ccs_ul_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, e_nb_requested_params_r13.requested_ccs_ul_r13, (uint8_t)2, (uint8_t)32)); + } + } + if (supported_band_list_eutra_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_eutra_v1310, 1, 64)); + } + if (supported_band_combination_reduced_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_r13, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_nb_requested_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(maximum_ccs_retrieval_r13_present, 1)); + HANDLE_CODE(bref.unpack(skip_fallback_combinations_r13_present, 1)); + HANDLE_CODE(bref.unpack(reduced_int_non_cont_comb_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_list_eutra_v1310_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_r13_present, 1)); + + if (e_nb_requested_params_r13_present) { + HANDLE_CODE(bref.unpack(e_nb_requested_params_r13.reduced_int_non_cont_comb_requested_r13_present, 1)); + HANDLE_CODE(bref.unpack(e_nb_requested_params_r13.requested_ccs_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(e_nb_requested_params_r13.requested_ccs_ul_r13_present, 1)); + HANDLE_CODE(bref.unpack(e_nb_requested_params_r13.skip_fallback_comb_requested_r13_present, 1)); + if (e_nb_requested_params_r13.requested_ccs_dl_r13_present) { + HANDLE_CODE( + unpack_unalign_integer(e_nb_requested_params_r13.requested_ccs_dl_r13, bref, (uint8_t)2, (uint8_t)32)); + } + if (e_nb_requested_params_r13.requested_ccs_ul_r13_present) { + HANDLE_CODE( + unpack_unalign_integer(e_nb_requested_params_r13.requested_ccs_ul_r13, bref, (uint8_t)2, (uint8_t)32)); + } + } + if (supported_band_list_eutra_v1310_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_eutra_v1310, bref, 1, 64)); + } + if (supported_band_combination_reduced_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_r13, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (e_nb_requested_params_r13_present) { + j.write_fieldname("eNB-RequestedParameters-r13"); + j.start_obj(); + if (e_nb_requested_params_r13.reduced_int_non_cont_comb_requested_r13_present) { + j.write_str("reducedIntNonContCombRequested-r13", "true"); + } + if (e_nb_requested_params_r13.requested_ccs_dl_r13_present) { + j.write_int("requestedCCsDL-r13", e_nb_requested_params_r13.requested_ccs_dl_r13); + } + if (e_nb_requested_params_r13.requested_ccs_ul_r13_present) { + j.write_int("requestedCCsUL-r13", e_nb_requested_params_r13.requested_ccs_ul_r13); + } + if (e_nb_requested_params_r13.skip_fallback_comb_requested_r13_present) { + j.write_str("skipFallbackCombRequested-r13", "true"); + } + j.end_obj(); + } + if (maximum_ccs_retrieval_r13_present) { + j.write_str("maximumCCsRetrieval-r13", "supported"); + } + if (skip_fallback_combinations_r13_present) { + j.write_str("skipFallbackCombinations-r13", "supported"); + } + if (reduced_int_non_cont_comb_r13_present) { + j.write_str("reducedIntNonContComb-r13", "supported"); + } + if (supported_band_list_eutra_v1310_present) { + j.start_array("supportedBandListEUTRA-v1310"); + for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v1310.size(); ++i1) { + supported_band_list_eutra_v1310[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_r13_present) { + j.start_array("supportedBandCombinationReduced-r13"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_r13.size(); ++i1) { + supported_band_combination_reduced_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +rf_params_v1310_s::e_nb_requested_params_r13_s_::e_nb_requested_params_r13_s_() +{ + reduced_int_non_cont_comb_requested_r13_present = false; + requested_ccs_dl_r13_present = false; + requested_ccs_ul_r13_present = false; + skip_fallback_comb_requested_r13_present = false; +} + +// SupportedBandEUTRA-v1320 ::= SEQUENCE +supported_band_eutra_v1320_s::supported_band_eutra_v1320_s() +{ + intra_freq_ce_need_for_gaps_r13_present = false; + ue_pwr_class_n_r13_present = false; +} +SRSASN_CODE supported_band_eutra_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(intra_freq_ce_need_for_gaps_r13_present, 1)); + HANDLE_CODE(bref.pack(ue_pwr_class_n_r13_present, 1)); + + if (ue_pwr_class_n_r13_present) { + HANDLE_CODE(pack_enum(bref, ue_pwr_class_n_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_eutra_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(intra_freq_ce_need_for_gaps_r13_present, 1)); + HANDLE_CODE(bref.unpack(ue_pwr_class_n_r13_present, 1)); + + if (ue_pwr_class_n_r13_present) { + HANDLE_CODE(unpack_enum(ue_pwr_class_n_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void supported_band_eutra_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (intra_freq_ce_need_for_gaps_r13_present) { + j.write_str("intraFreq-CE-NeedForGaps-r13", "supported"); + } + if (ue_pwr_class_n_r13_present) { + j.write_str("ue-PowerClass-N-r13", ue_pwr_class_n_r13.to_string()); + } + j.end_obj(); +} + +// RF-Parameters-v1320 ::= SEQUENCE +rf_params_v1320_s::rf_params_v1320_s() +{ + supported_band_list_eutra_v1320_present = false; + supported_band_combination_v1320_present = false; + supported_band_combination_add_v1320_present = false; + supported_band_combination_reduced_v1320_present = false; +} +SRSASN_CODE rf_params_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_list_eutra_v1320_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_v1320_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1320_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1320_present, 1)); + + if (supported_band_list_eutra_v1320_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_eutra_v1320, 1, 64)); + } + if (supported_band_combination_v1320_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1320, 1, 128)); + } + if (supported_band_combination_add_v1320_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1320, 1, 256)); + } + if (supported_band_combination_reduced_v1320_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1320, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_list_eutra_v1320_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_v1320_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1320_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1320_present, 1)); + + if (supported_band_list_eutra_v1320_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_eutra_v1320, bref, 1, 64)); + } + if (supported_band_combination_v1320_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1320, bref, 1, 128)); + } + if (supported_band_combination_add_v1320_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1320, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1320_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1320, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_list_eutra_v1320_present) { + j.start_array("supportedBandListEUTRA-v1320"); + for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v1320.size(); ++i1) { + supported_band_list_eutra_v1320[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_v1320_present) { + j.start_array("supportedBandCombination-v1320"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1320.size(); ++i1) { + supported_band_combination_v1320[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1320_present) { + j.start_array("supportedBandCombinationAdd-v1320"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1320.size(); ++i1) { + supported_band_combination_add_v1320[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1320_present) { + j.start_array("supportedBandCombinationReduced-v1320"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1320.size(); ++i1) { + supported_band_combination_reduced_v1320[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v1380 ::= SEQUENCE +rf_params_v1380_s::rf_params_v1380_s() +{ + supported_band_combination_v1380_present = false; + supported_band_combination_add_v1380_present = false; + supported_band_combination_reduced_v1380_present = false; +} +SRSASN_CODE rf_params_v1380_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1380_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1380_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1380_present, 1)); + + if (supported_band_combination_v1380_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1380, 1, 128)); + } + if (supported_band_combination_add_v1380_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1380, 1, 256)); + } + if (supported_band_combination_reduced_v1380_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1380, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1380_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1380_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1380_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1380_present, 1)); + + if (supported_band_combination_v1380_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1380, bref, 1, 128)); + } + if (supported_band_combination_add_v1380_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1380, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1380_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1380, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1380_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1380_present) { + j.start_array("supportedBandCombination-v1380"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1380.size(); ++i1) { + supported_band_combination_v1380[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1380_present) { + j.start_array("supportedBandCombinationAdd-v1380"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1380.size(); ++i1) { + supported_band_combination_add_v1380[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1380_present) { + j.start_array("supportedBandCombinationReduced-v1380"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1380.size(); ++i1) { + supported_band_combination_reduced_v1380[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// BandCombinationParameters-v1390 ::= SEQUENCE +band_combination_params_v1390_s::band_combination_params_v1390_s() +{ + ue_ca_pwr_class_n_r13_present = false; +} +SRSASN_CODE band_combination_params_v1390_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_ca_pwr_class_n_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_params_v1390_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_ca_pwr_class_n_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void band_combination_params_v1390_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_ca_pwr_class_n_r13_present) { + j.write_str("ue-CA-PowerClass-N-r13", "class2"); + } + j.end_obj(); +} + +// RF-Parameters-v1390 ::= SEQUENCE +rf_params_v1390_s::rf_params_v1390_s() +{ + supported_band_combination_v1390_present = false; + supported_band_combination_add_v1390_present = false; + supported_band_combination_reduced_v1390_present = false; +} +SRSASN_CODE rf_params_v1390_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1390_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1390_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1390_present, 1)); + + if (supported_band_combination_v1390_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1390, 1, 128)); + } + if (supported_band_combination_add_v1390_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1390, 1, 256)); + } + if (supported_band_combination_reduced_v1390_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1390, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1390_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1390_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1390_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1390_present, 1)); + + if (supported_band_combination_v1390_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1390, bref, 1, 128)); + } + if (supported_band_combination_add_v1390_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1390, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1390_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1390, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1390_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1390_present) { + j.start_array("supportedBandCombination-v1390"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1390.size(); ++i1) { + supported_band_combination_v1390[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1390_present) { + j.start_array("supportedBandCombinationAdd-v1390"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1390.size(); ++i1) { + supported_band_combination_add_v1390[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1390_present) { + j.start_array("supportedBandCombinationReduced-v1390"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1390.size(); ++i1) { + supported_band_combination_reduced_v1390[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v1430 ::= SEQUENCE +rf_params_v1430_s::rf_params_v1430_s() +{ + supported_band_combination_v1430_present = false; + supported_band_combination_add_v1430_present = false; + supported_band_combination_reduced_v1430_present = false; + e_nb_requested_params_v1430_present = false; + diff_fallback_comb_report_r14_present = false; +} +SRSASN_CODE rf_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1430_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1430_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1430_present, 1)); + HANDLE_CODE(bref.pack(e_nb_requested_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(diff_fallback_comb_report_r14_present, 1)); + + if (supported_band_combination_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1430, 1, 128)); + } + if (supported_band_combination_add_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1430, 1, 256)); + } + if (supported_band_combination_reduced_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1430, 1, 384)); + } + if (e_nb_requested_params_v1430_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, e_nb_requested_params_v1430.requested_diff_fallback_comb_list_r14, 1, 384, + SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1430_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1430_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1430_present, 1)); + HANDLE_CODE(bref.unpack(e_nb_requested_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(diff_fallback_comb_report_r14_present, 1)); + + if (supported_band_combination_v1430_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1430, bref, 1, 128)); + } + if (supported_band_combination_add_v1430_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1430, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1430_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1430, bref, 1, 384)); + } + if (e_nb_requested_params_v1430_present) { + HANDLE_CODE(unpack_dyn_seq_of(e_nb_requested_params_v1430.requested_diff_fallback_comb_list_r14, bref, 1, 384, + SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1430_present) { + j.start_array("supportedBandCombination-v1430"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1430.size(); ++i1) { + supported_band_combination_v1430[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1430_present) { + j.start_array("supportedBandCombinationAdd-v1430"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1430.size(); ++i1) { + supported_band_combination_add_v1430[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1430_present) { + j.start_array("supportedBandCombinationReduced-v1430"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1430.size(); ++i1) { + supported_band_combination_reduced_v1430[i1].to_json(j); + } + j.end_array(); + } + if (e_nb_requested_params_v1430_present) { + j.write_fieldname("eNB-RequestedParameters-v1430"); + j.start_obj(); + j.start_array("requestedDiffFallbackCombList-r14"); + for (uint32_t i1 = 0; i1 < e_nb_requested_params_v1430.requested_diff_fallback_comb_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < e_nb_requested_params_v1430.requested_diff_fallback_comb_list_r14[i1].size(); ++i2) { + e_nb_requested_params_v1430.requested_diff_fallback_comb_list_r14[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + j.end_obj(); + } + if (diff_fallback_comb_report_r14_present) { + j.write_str("diffFallbackCombReport-r14", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v1450 ::= SEQUENCE +rf_params_v1450_s::rf_params_v1450_s() +{ + supported_band_combination_v1450_present = false; + supported_band_combination_add_v1450_present = false; + supported_band_combination_reduced_v1450_present = false; +} +SRSASN_CODE rf_params_v1450_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1450_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1450_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1450_present, 1)); + + if (supported_band_combination_v1450_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1450, 1, 128)); + } + if (supported_band_combination_add_v1450_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1450, 1, 256)); + } + if (supported_band_combination_reduced_v1450_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1450, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1450_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1450_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1450_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1450_present, 1)); + + if (supported_band_combination_v1450_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1450, bref, 1, 128)); + } + if (supported_band_combination_add_v1450_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1450, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1450_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1450, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1450_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1450_present) { + j.start_array("supportedBandCombination-v1450"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1450.size(); ++i1) { + supported_band_combination_v1450[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1450_present) { + j.start_array("supportedBandCombinationAdd-v1450"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1450.size(); ++i1) { + supported_band_combination_add_v1450[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1450_present) { + j.start_array("supportedBandCombinationReduced-v1450"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1450.size(); ++i1) { + supported_band_combination_reduced_v1450[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v1470 ::= SEQUENCE +rf_params_v1470_s::rf_params_v1470_s() +{ + supported_band_combination_v1470_present = false; + supported_band_combination_add_v1470_present = false; + supported_band_combination_reduced_v1470_present = false; +} +SRSASN_CODE rf_params_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_v1470_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1470_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1470_present, 1)); + + if (supported_band_combination_v1470_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1470, 1, 128)); + } + if (supported_band_combination_add_v1470_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1470, 1, 256)); + } + if (supported_band_combination_reduced_v1470_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1470, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_combination_v1470_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1470_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1470_present, 1)); + + if (supported_band_combination_v1470_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1470, bref, 1, 128)); + } + if (supported_band_combination_add_v1470_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1470, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1470_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1470, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_v1470_present) { + j.start_array("supportedBandCombination-v1470"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1470.size(); ++i1) { + supported_band_combination_v1470[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1470_present) { + j.start_array("supportedBandCombinationAdd-v1470"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1470.size(); ++i1) { + supported_band_combination_add_v1470[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1470_present) { + j.start_array("supportedBandCombinationReduced-v1470"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1470.size(); ++i1) { + supported_band_combination_reduced_v1470[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// RF-Parameters-v1530 ::= SEQUENCE +rf_params_v1530_s::rf_params_v1530_s() +{ + s_tti_spt_supported_r15_present = false; + supported_band_combination_v1530_present = false; + supported_band_combination_add_v1530_present = false; + supported_band_combination_reduced_v1530_present = false; + pwr_class_minus14dbm_r15_present = false; +} +SRSASN_CODE rf_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(s_tti_spt_supported_r15_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_v1530_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_add_v1530_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_reduced_v1530_present, 1)); + HANDLE_CODE(bref.pack(pwr_class_minus14dbm_r15_present, 1)); + + if (supported_band_combination_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_v1530, 1, 128)); + } + if (supported_band_combination_add_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_add_v1530, 1, 256)); + } + if (supported_band_combination_reduced_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_reduced_v1530, 1, 384)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(s_tti_spt_supported_r15_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_v1530_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_add_v1530_present, 1)); + HANDLE_CODE(bref.unpack(supported_band_combination_reduced_v1530_present, 1)); + HANDLE_CODE(bref.unpack(pwr_class_minus14dbm_r15_present, 1)); + + if (supported_band_combination_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_v1530, bref, 1, 128)); + } + if (supported_band_combination_add_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_add_v1530, bref, 1, 256)); + } + if (supported_band_combination_reduced_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_reduced_v1530, bref, 1, 384)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (s_tti_spt_supported_r15_present) { + j.write_str("sTTI-SPT-Supported-r15", "supported"); + } + if (supported_band_combination_v1530_present) { + j.start_array("supportedBandCombination-v1530"); + for (uint32_t i1 = 0; i1 < supported_band_combination_v1530.size(); ++i1) { + supported_band_combination_v1530[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_add_v1530_present) { + j.start_array("supportedBandCombinationAdd-v1530"); + for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1530.size(); ++i1) { + supported_band_combination_add_v1530[i1].to_json(j); + } + j.end_array(); + } + if (supported_band_combination_reduced_v1530_present) { + j.start_array("supportedBandCombinationReduced-v1530"); + for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1530.size(); ++i1) { + supported_band_combination_reduced_v1530[i1].to_json(j); + } + j.end_array(); + } + if (pwr_class_minus14dbm_r15_present) { + j.write_str("powerClass-14dBm-r15", "supported"); + } + j.end_obj(); +} + +// SupportedBandEUTRA-v9e0 ::= SEQUENCE +supported_band_eutra_v9e0_s::supported_band_eutra_v9e0_s() +{ + band_eutra_v9e0_present = false; +} +SRSASN_CODE supported_band_eutra_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_eutra_v9e0_present, 1)); + + if (band_eutra_v9e0_present) { + HANDLE_CODE(pack_unalign_integer(bref, band_eutra_v9e0, (uint16_t)65, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_eutra_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_eutra_v9e0_present, 1)); + + if (band_eutra_v9e0_present) { + HANDLE_CODE(unpack_unalign_integer(band_eutra_v9e0, bref, (uint16_t)65, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +void supported_band_eutra_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (band_eutra_v9e0_present) { + j.write_int("bandEUTRA-v9e0", band_eutra_v9e0); + } + j.end_obj(); +} + +// RF-Parameters-v9e0 ::= SEQUENCE +rf_params_v9e0_s::rf_params_v9e0_s() +{ + supported_band_list_eutra_v9e0_present = false; +} +SRSASN_CODE rf_params_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_list_eutra_v9e0_present, 1)); + + if (supported_band_list_eutra_v9e0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_eutra_v9e0, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_list_eutra_v9e0_present, 1)); + + if (supported_band_list_eutra_v9e0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_eutra_v9e0, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_list_eutra_v9e0_present) { + j.start_array("supportedBandListEUTRA-v9e0"); + for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v9e0.size(); ++i1) { + supported_band_list_eutra_v9e0[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SupportedBandInfo-r12 ::= SEQUENCE +supported_band_info_r12_s::supported_band_info_r12_s() +{ + support_r12_present = false; +} +SRSASN_CODE supported_band_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(support_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE supported_band_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(support_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void supported_band_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (support_r12_present) { + j.write_str("support-r12", "supported"); + } + j.end_obj(); +} + +// SL-Parameters-r12 ::= SEQUENCE +sl_params_r12_s::sl_params_r12_s() +{ + comm_simul_tx_r12_present = false; + comm_supported_bands_r12_present = false; + disc_supported_bands_r12_present = false; + disc_sched_res_alloc_r12_present = false; + disc_ue_sel_res_alloc_r12_present = false; + disc_slss_r12_present = false; + disc_supported_proc_r12_present = false; +} +SRSASN_CODE sl_params_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(comm_simul_tx_r12_present, 1)); + HANDLE_CODE(bref.pack(comm_supported_bands_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_supported_bands_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_sched_res_alloc_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_ue_sel_res_alloc_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_slss_r12_present, 1)); + HANDLE_CODE(bref.pack(disc_supported_proc_r12_present, 1)); + + if (comm_supported_bands_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, comm_supported_bands_r12, 1, 64, UnalignedIntegerPacker(1, 256))); + } + if (disc_supported_bands_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, disc_supported_bands_r12, 1, 64)); + } + if (disc_supported_proc_r12_present) { + HANDLE_CODE(pack_enum(bref, disc_supported_proc_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_params_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(comm_simul_tx_r12_present, 1)); + HANDLE_CODE(bref.unpack(comm_supported_bands_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_supported_bands_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_sched_res_alloc_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_ue_sel_res_alloc_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_slss_r12_present, 1)); + HANDLE_CODE(bref.unpack(disc_supported_proc_r12_present, 1)); + + if (comm_supported_bands_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(comm_supported_bands_r12, bref, 1, 64, UnalignedIntegerPacker(1, 256))); + } + if (disc_supported_bands_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(disc_supported_bands_r12, bref, 1, 64)); + } + if (disc_supported_proc_r12_present) { + HANDLE_CODE(unpack_enum(disc_supported_proc_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void sl_params_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (comm_simul_tx_r12_present) { + j.write_str("commSimultaneousTx-r12", "supported"); + } + if (comm_supported_bands_r12_present) { + j.start_array("commSupportedBands-r12"); + for (uint32_t i1 = 0; i1 < comm_supported_bands_r12.size(); ++i1) { + j.write_int(comm_supported_bands_r12[i1]); + } + j.end_array(); + } + if (disc_supported_bands_r12_present) { + j.start_array("discSupportedBands-r12"); + for (uint32_t i1 = 0; i1 < disc_supported_bands_r12.size(); ++i1) { + disc_supported_bands_r12[i1].to_json(j); + } + j.end_array(); + } + if (disc_sched_res_alloc_r12_present) { + j.write_str("discScheduledResourceAlloc-r12", "supported"); + } + if (disc_ue_sel_res_alloc_r12_present) { + j.write_str("disc-UE-SelectedResourceAlloc-r12", "supported"); + } + if (disc_slss_r12_present) { + j.write_str("disc-SLSS-r12", "supported"); + } + if (disc_supported_proc_r12_present) { + j.write_str("discSupportedProc-r12", disc_supported_proc_r12.to_string()); + } + j.end_obj(); +} + +// V2X-BandParameters-r14 ::= SEQUENCE +v2x_band_params_r14_s::v2x_band_params_r14_s() +{ + band_params_tx_sl_r14_present = false; + band_params_rx_sl_r14_present = false; +} +SRSASN_CODE v2x_band_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(band_params_tx_sl_r14_present, 1)); + HANDLE_CODE(bref.pack(band_params_rx_sl_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, v2x_freq_band_eutra_r14, (uint16_t)1, (uint16_t)256)); + if (band_params_tx_sl_r14_present) { + HANDLE_CODE(band_params_tx_sl_r14.pack(bref)); + } + if (band_params_rx_sl_r14_present) { + HANDLE_CODE(band_params_rx_sl_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE v2x_band_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(band_params_tx_sl_r14_present, 1)); + HANDLE_CODE(bref.unpack(band_params_rx_sl_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(v2x_freq_band_eutra_r14, bref, (uint16_t)1, (uint16_t)256)); + if (band_params_tx_sl_r14_present) { + HANDLE_CODE(band_params_tx_sl_r14.unpack(bref)); + } + if (band_params_rx_sl_r14_present) { + HANDLE_CODE(band_params_rx_sl_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void v2x_band_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("v2x-FreqBandEUTRA-r14", v2x_freq_band_eutra_r14); + if (band_params_tx_sl_r14_present) { + j.write_fieldname("bandParametersTxSL-r14"); + band_params_tx_sl_r14.to_json(j); + } + if (band_params_rx_sl_r14_present) { + j.write_fieldname("bandParametersRxSL-r14"); + band_params_rx_sl_r14.to_json(j); + } + j.end_obj(); +} + +// SL-Parameters-v1430 ::= SEQUENCE +sl_params_v1430_s::sl_params_v1430_s() +{ + zone_based_pool_sel_r14_present = false; + ue_autonomous_with_full_sensing_r14_present = false; + ue_autonomous_with_partial_sensing_r14_present = false; + sl_congestion_ctrl_r14_present = false; + v2x_tx_with_short_resv_interv_r14_present = false; + v2x_num_tx_rx_timing_r14_present = false; + v2x_non_adjacent_pscch_pssch_r14_present = false; + slss_tx_rx_r14_present = false; + v2x_supported_band_combination_list_r14_present = false; +} +SRSASN_CODE sl_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(zone_based_pool_sel_r14_present, 1)); + HANDLE_CODE(bref.pack(ue_autonomous_with_full_sensing_r14_present, 1)); + HANDLE_CODE(bref.pack(ue_autonomous_with_partial_sensing_r14_present, 1)); + HANDLE_CODE(bref.pack(sl_congestion_ctrl_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_tx_with_short_resv_interv_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_num_tx_rx_timing_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_non_adjacent_pscch_pssch_r14_present, 1)); + HANDLE_CODE(bref.pack(slss_tx_rx_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_supported_band_combination_list_r14_present, 1)); + + if (v2x_num_tx_rx_timing_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, v2x_num_tx_rx_timing_r14, (uint8_t)1, (uint8_t)16)); + } + if (v2x_supported_band_combination_list_r14_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, v2x_supported_band_combination_list_r14, 1, 384, SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(zone_based_pool_sel_r14_present, 1)); + HANDLE_CODE(bref.unpack(ue_autonomous_with_full_sensing_r14_present, 1)); + HANDLE_CODE(bref.unpack(ue_autonomous_with_partial_sensing_r14_present, 1)); + HANDLE_CODE(bref.unpack(sl_congestion_ctrl_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_tx_with_short_resv_interv_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_num_tx_rx_timing_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_non_adjacent_pscch_pssch_r14_present, 1)); + HANDLE_CODE(bref.unpack(slss_tx_rx_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_supported_band_combination_list_r14_present, 1)); + + if (v2x_num_tx_rx_timing_r14_present) { + HANDLE_CODE(unpack_unalign_integer(v2x_num_tx_rx_timing_r14, bref, (uint8_t)1, (uint8_t)16)); + } + if (v2x_supported_band_combination_list_r14_present) { + HANDLE_CODE( + unpack_dyn_seq_of(v2x_supported_band_combination_list_r14, bref, 1, 384, SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +void sl_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (zone_based_pool_sel_r14_present) { + j.write_str("zoneBasedPoolSelection-r14", "supported"); + } + if (ue_autonomous_with_full_sensing_r14_present) { + j.write_str("ue-AutonomousWithFullSensing-r14", "supported"); + } + if (ue_autonomous_with_partial_sensing_r14_present) { + j.write_str("ue-AutonomousWithPartialSensing-r14", "supported"); + } + if (sl_congestion_ctrl_r14_present) { + j.write_str("sl-CongestionControl-r14", "supported"); + } + if (v2x_tx_with_short_resv_interv_r14_present) { + j.write_str("v2x-TxWithShortResvInterval-r14", "supported"); + } + if (v2x_num_tx_rx_timing_r14_present) { + j.write_int("v2x-numberTxRxTiming-r14", v2x_num_tx_rx_timing_r14); + } + if (v2x_non_adjacent_pscch_pssch_r14_present) { + j.write_str("v2x-nonAdjacentPSCCH-PSSCH-r14", "supported"); + } + if (slss_tx_rx_r14_present) { + j.write_str("slss-TxRx-r14", "supported"); + } + if (v2x_supported_band_combination_list_r14_present) { + j.start_array("v2x-SupportedBandCombinationList-r14"); + for (uint32_t i1 = 0; i1 < v2x_supported_band_combination_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < v2x_supported_band_combination_list_r14[i1].size(); ++i2) { + v2x_supported_band_combination_list_r14[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + j.end_obj(); +} + +// V2X-BandParameters-v1530 ::= SEQUENCE +v2x_band_params_v1530_s::v2x_band_params_v1530_s() +{ + v2x_enhanced_high_reception_r15_present = false; +} +SRSASN_CODE v2x_band_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(v2x_enhanced_high_reception_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE v2x_band_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(v2x_enhanced_high_reception_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void v2x_band_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (v2x_enhanced_high_reception_r15_present) { + j.write_str("v2x-EnhancedHighReception-r15", "supported"); + } + j.end_obj(); +} + +// UE-CategorySL-r15 ::= SEQUENCE +SRSASN_CODE ue_category_sl_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, ue_category_sl_c_tx_r15, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(pack_unalign_integer(bref, ue_category_sl_c_rx_r15, (uint8_t)1, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_category_sl_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(ue_category_sl_c_tx_r15, bref, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(unpack_unalign_integer(ue_category_sl_c_rx_r15, bref, (uint8_t)1, (uint8_t)4)); + + return SRSASN_SUCCESS; +} +void ue_category_sl_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ue-CategorySL-C-TX-r15", ue_category_sl_c_tx_r15); + j.write_int("ue-CategorySL-C-RX-r15", ue_category_sl_c_rx_r15); + j.end_obj(); +} + +// SL-Parameters-v1530 ::= SEQUENCE +sl_params_v1530_s::sl_params_v1530_s() +{ + slss_supported_tx_freq_r15_present = false; + sl_minus64_qam_tx_r15_present = false; + sl_tx_diversity_r15_present = false; + ue_category_sl_r15_present = false; + v2x_supported_band_combination_list_v1530_present = false; +} +SRSASN_CODE sl_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(slss_supported_tx_freq_r15_present, 1)); + HANDLE_CODE(bref.pack(sl_minus64_qam_tx_r15_present, 1)); + HANDLE_CODE(bref.pack(sl_tx_diversity_r15_present, 1)); + HANDLE_CODE(bref.pack(ue_category_sl_r15_present, 1)); + HANDLE_CODE(bref.pack(v2x_supported_band_combination_list_v1530_present, 1)); + + if (slss_supported_tx_freq_r15_present) { + HANDLE_CODE(pack_enum(bref, slss_supported_tx_freq_r15)); + } + if (ue_category_sl_r15_present) { + HANDLE_CODE(ue_category_sl_r15.pack(bref)); + } + if (v2x_supported_band_combination_list_v1530_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, v2x_supported_band_combination_list_v1530, 1, 384, SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(slss_supported_tx_freq_r15_present, 1)); + HANDLE_CODE(bref.unpack(sl_minus64_qam_tx_r15_present, 1)); + HANDLE_CODE(bref.unpack(sl_tx_diversity_r15_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_sl_r15_present, 1)); + HANDLE_CODE(bref.unpack(v2x_supported_band_combination_list_v1530_present, 1)); + + if (slss_supported_tx_freq_r15_present) { + HANDLE_CODE(unpack_enum(slss_supported_tx_freq_r15, bref)); + } + if (ue_category_sl_r15_present) { + HANDLE_CODE(ue_category_sl_r15.unpack(bref)); + } + if (v2x_supported_band_combination_list_v1530_present) { + HANDLE_CODE(unpack_dyn_seq_of(v2x_supported_band_combination_list_v1530, bref, 1, 384, + SeqOfPacker(1, 64, Packer()))); + } + + return SRSASN_SUCCESS; +} +void sl_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (slss_supported_tx_freq_r15_present) { + j.write_str("slss-SupportedTxFreq-r15", slss_supported_tx_freq_r15.to_string()); + } + if (sl_minus64_qam_tx_r15_present) { + j.write_str("sl-64QAM-Tx-r15", "supported"); + } + if (sl_tx_diversity_r15_present) { + j.write_str("sl-TxDiversity-r15", "supported"); + } + if (ue_category_sl_r15_present) { + j.write_fieldname("ue-CategorySL-r15"); + ue_category_sl_r15.to_json(j); + } + if (v2x_supported_band_combination_list_v1530_present) { + j.start_array("v2x-SupportedBandCombinationList-v1530"); + for (uint32_t i1 = 0; i1 < v2x_supported_band_combination_list_v1530.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < v2x_supported_band_combination_list_v1530[i1].size(); ++i2) { + v2x_supported_band_combination_list_v1530[i1][i2].to_json(j); + } + j.end_array(); + } + j.end_array(); + } + j.end_obj(); +} + +// SPS-ConfigDL-STTI-r15 ::= CHOICE +void sps_cfg_dl_stti_r15_c::set(types::options e) +{ + type_ = e; +} +void sps_cfg_dl_stti_r15_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_str("semiPersistSchedIntervalDL-STTI-r15", c.semi_persist_sched_interv_dl_stti_r15.to_string()); + j.write_int("numberOfConfSPS-Processes-STTI-r15", c.nof_conf_sps_processes_stti_r15); + if (c.two_ant_port_activ_r15_present) { + j.write_fieldname("twoAntennaPortActivated-r15"); + c.two_ant_port_activ_r15.to_json(j); + } + j.write_int("sTTI-StartTimeDL-r15", c.s_tti_start_time_dl_r15); + if (c.tpc_pdcch_cfg_pucch_sps_r15_present) { + j.write_fieldname("tpc-PDCCH-ConfigPUCCH-SPS-r15"); + c.tpc_pdcch_cfg_pucch_sps_r15.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_stti_r15_c"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_dl_stti_r15_c::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + bref.pack(c.ext, 1); + HANDLE_CODE(bref.pack(c.two_ant_port_activ_r15_present, 1)); + HANDLE_CODE(bref.pack(c.tpc_pdcch_cfg_pucch_sps_r15_present, 1)); + HANDLE_CODE(pack_enum(bref, c.semi_persist_sched_interv_dl_stti_r15)); + HANDLE_CODE(pack_unalign_integer(bref, c.nof_conf_sps_processes_stti_r15, (uint8_t)1, (uint8_t)12)); + if (c.two_ant_port_activ_r15_present) { + HANDLE_CODE(c.two_ant_port_activ_r15.pack(bref)); + } + HANDLE_CODE(pack_unalign_integer(bref, c.s_tti_start_time_dl_r15, (uint8_t)0, (uint8_t)5)); + if (c.tpc_pdcch_cfg_pucch_sps_r15_present) { + HANDLE_CODE(c.tpc_pdcch_cfg_pucch_sps_r15.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_stti_r15_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_dl_stti_r15_c::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + bref.unpack(c.ext, 1); + HANDLE_CODE(bref.unpack(c.two_ant_port_activ_r15_present, 1)); + HANDLE_CODE(bref.unpack(c.tpc_pdcch_cfg_pucch_sps_r15_present, 1)); + HANDLE_CODE(unpack_enum(c.semi_persist_sched_interv_dl_stti_r15, bref)); + HANDLE_CODE(unpack_unalign_integer(c.nof_conf_sps_processes_stti_r15, bref, (uint8_t)1, (uint8_t)12)); + if (c.two_ant_port_activ_r15_present) { + HANDLE_CODE(c.two_ant_port_activ_r15.unpack(bref)); + } + HANDLE_CODE(unpack_unalign_integer(c.s_tti_start_time_dl_r15, bref, (uint8_t)0, (uint8_t)5)); + if (c.tpc_pdcch_cfg_pucch_sps_r15_present) { + HANDLE_CODE(c.tpc_pdcch_cfg_pucch_sps_r15.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_stti_r15_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +sps_cfg_dl_stti_r15_c::setup_s_::setup_s_() +{ + ext = false; + two_ant_port_activ_r15_present = false; + tpc_pdcch_cfg_pucch_sps_r15_present = false; +} + +void sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_::set(types::options e) +{ + type_ = e; +} +void sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.start_array("n1SPUCCH-AN-PersistentListP1-r15"); + for (uint32_t i1 = 0; i1 < c.n1_spucch_an_persistent_list_p1_r15.size(); ++i1) { + j.write_int(c.n1_spucch_an_persistent_list_p1_r15[i1]); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_"); + } + j.end_obj(); +} +SRSASN_CODE sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(pack_dyn_seq_of(bref, c.n1_spucch_an_persistent_list_p1_r15, 1, 4, + UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(unpack_dyn_seq_of(c.n1_spucch_an_persistent_list_p1_r15, bref, 1, 4, + UnalignedIntegerPacker(0, 2047))); + break; + default: + log_invalid_choice_id(type_, "sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE +neigh_cell_si_acquisition_params_v1530_s::neigh_cell_si_acquisition_params_v1530_s() +{ + report_cgi_nr_en_dc_r15_present = false; + report_cgi_nr_no_en_dc_r15_present = false; +} +SRSASN_CODE neigh_cell_si_acquisition_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(report_cgi_nr_en_dc_r15_present, 1)); + HANDLE_CODE(bref.pack(report_cgi_nr_no_en_dc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_si_acquisition_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(report_cgi_nr_en_dc_r15_present, 1)); + HANDLE_CODE(bref.unpack(report_cgi_nr_no_en_dc_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void neigh_cell_si_acquisition_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (report_cgi_nr_en_dc_r15_present) { + j.write_str("reportCGI-NR-EN-DC-r15", "supported"); + } + if (report_cgi_nr_no_en_dc_r15_present) { + j.write_str("reportCGI-NR-NoEN-DC-r15", "supported"); + } + j.end_obj(); +} + +// LAA-Parameters-v1530 ::= SEQUENCE +laa_params_v1530_s::laa_params_v1530_s() +{ + aul_r15_present = false; + laa_pusch_mode1_r15_present = false; + laa_pusch_mode2_r15_present = false; + laa_pusch_mode3_r15_present = false; +} +SRSASN_CODE laa_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(aul_r15_present, 1)); + HANDLE_CODE(bref.pack(laa_pusch_mode1_r15_present, 1)); + HANDLE_CODE(bref.pack(laa_pusch_mode2_r15_present, 1)); + HANDLE_CODE(bref.pack(laa_pusch_mode3_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(aul_r15_present, 1)); + HANDLE_CODE(bref.unpack(laa_pusch_mode1_r15_present, 1)); + HANDLE_CODE(bref.unpack(laa_pusch_mode2_r15_present, 1)); + HANDLE_CODE(bref.unpack(laa_pusch_mode3_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void laa_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (aul_r15_present) { + j.write_str("aul-r15", "supported"); + } + if (laa_pusch_mode1_r15_present) { + j.write_str("laa-PUSCH-Mode1-r15", "supported"); + } + if (laa_pusch_mode2_r15_present) { + j.write_str("laa-PUSCH-Mode2-r15", "supported"); + } + if (laa_pusch_mode3_r15_present) { + j.write_str("laa-PUSCH-Mode3-r15", "supported"); + } + j.end_obj(); +} + +// MeasParameters-v1530 ::= SEQUENCE +meas_params_v1530_s::meas_params_v1530_s() +{ + qoe_meas_report_r15_present = false; + qoe_mtsi_meas_report_r15_present = false; + ca_idle_mode_meass_r15_present = false; + ca_idle_mode_validity_area_r15_present = false; + height_meas_r15_present = false; + multiple_cells_meas_ext_r15_present = false; +} +SRSASN_CODE meas_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(qoe_meas_report_r15_present, 1)); + HANDLE_CODE(bref.pack(qoe_mtsi_meas_report_r15_present, 1)); + HANDLE_CODE(bref.pack(ca_idle_mode_meass_r15_present, 1)); + HANDLE_CODE(bref.pack(ca_idle_mode_validity_area_r15_present, 1)); + HANDLE_CODE(bref.pack(height_meas_r15_present, 1)); + HANDLE_CODE(bref.pack(multiple_cells_meas_ext_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(qoe_meas_report_r15_present, 1)); + HANDLE_CODE(bref.unpack(qoe_mtsi_meas_report_r15_present, 1)); + HANDLE_CODE(bref.unpack(ca_idle_mode_meass_r15_present, 1)); + HANDLE_CODE(bref.unpack(ca_idle_mode_validity_area_r15_present, 1)); + HANDLE_CODE(bref.unpack(height_meas_r15_present, 1)); + HANDLE_CODE(bref.unpack(multiple_cells_meas_ext_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (qoe_meas_report_r15_present) { + j.write_str("qoe-MeasReport-r15", "supported"); + } + if (qoe_mtsi_meas_report_r15_present) { + j.write_str("qoe-MTSI-MeasReport-r15", "supported"); + } + if (ca_idle_mode_meass_r15_present) { + j.write_str("ca-IdleModeMeasurements-r15", "supported"); + } + if (ca_idle_mode_validity_area_r15_present) { + j.write_str("ca-IdleModeValidityArea-r15", "supported"); + } + if (height_meas_r15_present) { + j.write_str("heightMeas-r15", "supported"); + } + if (multiple_cells_meas_ext_r15_present) { + j.write_str("multipleCellsMeasExtension-r15", "supported"); + } + j.end_obj(); +} + +// Other-Parameters-v1530 ::= SEQUENCE +other_params_v1530_s::other_params_v1530_s() +{ + assist_info_bit_for_lc_r15_present = false; + time_ref_provision_r15_present = false; + flight_path_plan_r15_present = false; +} +SRSASN_CODE other_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(assist_info_bit_for_lc_r15_present, 1)); + HANDLE_CODE(bref.pack(time_ref_provision_r15_present, 1)); + HANDLE_CODE(bref.pack(flight_path_plan_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(assist_info_bit_for_lc_r15_present, 1)); + HANDLE_CODE(bref.unpack(time_ref_provision_r15_present, 1)); + HANDLE_CODE(bref.unpack(flight_path_plan_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (assist_info_bit_for_lc_r15_present) { + j.write_str("assistInfoBitForLC-r15", "supported"); + } + if (time_ref_provision_r15_present) { + j.write_str("timeReferenceProvision-r15", "supported"); + } + if (flight_path_plan_r15_present) { + j.write_str("flightPathPlan-r15", "supported"); + } + j.end_obj(); +} + +// RLC-Parameters-v1530 ::= SEQUENCE +rlc_params_v1530_s::rlc_params_v1530_s() +{ + flex_um_am_combinations_r15_present = false; + rlc_am_ooo_delivery_r15_present = false; + rlc_um_ooo_delivery_r15_present = false; +} +SRSASN_CODE rlc_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(flex_um_am_combinations_r15_present, 1)); + HANDLE_CODE(bref.pack(rlc_am_ooo_delivery_r15_present, 1)); + HANDLE_CODE(bref.pack(rlc_um_ooo_delivery_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(flex_um_am_combinations_r15_present, 1)); + HANDLE_CODE(bref.unpack(rlc_am_ooo_delivery_r15_present, 1)); + HANDLE_CODE(bref.unpack(rlc_um_ooo_delivery_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void rlc_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (flex_um_am_combinations_r15_present) { + j.write_str("flexibleUM-AM-Combinations-r15", "supported"); + } + if (rlc_am_ooo_delivery_r15_present) { + j.write_str("rlc-AM-Ooo-Delivery-r15", "supported"); + } + if (rlc_um_ooo_delivery_r15_present) { + j.write_str("rlc-UM-Ooo-Delivery-r15", "supported"); + } + j.end_obj(); +} + +// UE-BasedNetwPerfMeasParameters-v1530 ::= SEQUENCE +ue_based_netw_perf_meas_params_v1530_s::ue_based_netw_perf_meas_params_v1530_s() +{ + logged_meas_bt_r15_present = false; + logged_meas_wlan_r15_present = false; + imm_meas_bt_r15_present = false; + imm_meas_wlan_r15_present = false; +} +SRSASN_CODE ue_based_netw_perf_meas_params_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(logged_meas_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(logged_meas_wlan_r15_present, 1)); + HANDLE_CODE(bref.pack(imm_meas_bt_r15_present, 1)); + HANDLE_CODE(bref.pack(imm_meas_wlan_r15_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_based_netw_perf_meas_params_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(logged_meas_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(logged_meas_wlan_r15_present, 1)); + HANDLE_CODE(bref.unpack(imm_meas_bt_r15_present, 1)); + HANDLE_CODE(bref.unpack(imm_meas_wlan_r15_present, 1)); + + return SRSASN_SUCCESS; +} +void ue_based_netw_perf_meas_params_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (logged_meas_bt_r15_present) { + j.write_str("loggedMeasBT-r15", "supported"); + } + if (logged_meas_wlan_r15_present) { + j.write_str("loggedMeasWLAN-r15", "supported"); + } + if (imm_meas_bt_r15_present) { + j.write_str("immMeasBT-r15", "supported"); + } + if (imm_meas_wlan_r15_present) { + j.write_str("immMeasWLAN-r15", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1530 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1530_s::ue_eutra_cap_add_xdd_mode_v1530_s() +{ + neigh_cell_si_acquisition_params_v1530_present = false; + reduced_cp_latency_r15_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(neigh_cell_si_acquisition_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(reduced_cp_latency_r15_present, 1)); + + if (neigh_cell_si_acquisition_params_v1530_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1530.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(neigh_cell_si_acquisition_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(reduced_cp_latency_r15_present, 1)); + + if (neigh_cell_si_acquisition_params_v1530_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1530.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (neigh_cell_si_acquisition_params_v1530_present) { + j.write_fieldname("neighCellSI-AcquisitionParameters-v1530"); + neigh_cell_si_acquisition_params_v1530.to_json(j); + } + if (reduced_cp_latency_r15_present) { + j.write_str("reducedCP-Latency-r15", "supported"); + } + j.end_obj(); +} + +// MeasParameters-v1520 ::= SEQUENCE +meas_params_v1520_s::meas_params_v1520_s() +{ + meas_gap_patterns_v1520_present = false; +} +SRSASN_CODE meas_params_v1520_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_gap_patterns_v1520_present, 1)); + + if (meas_gap_patterns_v1520_present) { + HANDLE_CODE(meas_gap_patterns_v1520.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1520_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_gap_patterns_v1520_present, 1)); + + if (meas_gap_patterns_v1520_present) { + HANDLE_CODE(meas_gap_patterns_v1520.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_params_v1520_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_gap_patterns_v1520_present) { + j.write_str("measGapPatterns-v1520", meas_gap_patterns_v1520.to_string()); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1530-IEs ::= SEQUENCE +ue_eutra_cap_v1530_ies_s::ue_eutra_cap_v1530_ies_s() +{ + meas_params_v1530_present = false; + other_params_v1530_present = false; + neigh_cell_si_acquisition_params_v1530_present = false; + mac_params_v1530_present = false; + phy_layer_params_v1530_present = false; + rf_params_v1530_present = false; + pdcp_params_v1530_present = false; + ue_category_dl_v1530_present = false; + ue_based_netw_perf_meas_params_v1530_present = false; + rlc_params_v1530_present = false; + sl_params_v1530_present = false; + extended_nof_drbs_r15_present = false; + reduced_cp_latency_r15_present = false; + laa_params_v1530_present = false; + ue_category_ul_v1530_present = false; + fdd_add_ue_eutra_capabilities_v1530_present = false; + tdd_add_ue_eutra_capabilities_v1530_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(other_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(neigh_cell_si_acquisition_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(mac_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(pdcp_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(ue_category_dl_v1530_present, 1)); + HANDLE_CODE(bref.pack(ue_based_netw_perf_meas_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(rlc_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(sl_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(extended_nof_drbs_r15_present, 1)); + HANDLE_CODE(bref.pack(reduced_cp_latency_r15_present, 1)); + HANDLE_CODE(bref.pack(laa_params_v1530_present, 1)); + HANDLE_CODE(bref.pack(ue_category_ul_v1530_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1530_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1530_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_params_v1530_present) { + HANDLE_CODE(meas_params_v1530.pack(bref)); + } + if (other_params_v1530_present) { + HANDLE_CODE(other_params_v1530.pack(bref)); + } + if (neigh_cell_si_acquisition_params_v1530_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1530.pack(bref)); + } + if (mac_params_v1530_present) { + HANDLE_CODE(mac_params_v1530.pack(bref)); + } + if (phy_layer_params_v1530_present) { + HANDLE_CODE(phy_layer_params_v1530.pack(bref)); + } + if (rf_params_v1530_present) { + HANDLE_CODE(rf_params_v1530.pack(bref)); + } + if (pdcp_params_v1530_present) { + HANDLE_CODE(pdcp_params_v1530.pack(bref)); + } + if (ue_category_dl_v1530_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_dl_v1530, (uint8_t)22, (uint8_t)26)); + } + if (ue_based_netw_perf_meas_params_v1530_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_v1530.pack(bref)); + } + if (rlc_params_v1530_present) { + HANDLE_CODE(rlc_params_v1530.pack(bref)); + } + if (sl_params_v1530_present) { + HANDLE_CODE(sl_params_v1530.pack(bref)); + } + if (laa_params_v1530_present) { + HANDLE_CODE(laa_params_v1530.pack(bref)); + } + if (ue_category_ul_v1530_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_ul_v1530, (uint8_t)22, (uint8_t)26)); + } + if (fdd_add_ue_eutra_capabilities_v1530_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1530.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1530_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1530.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(other_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(neigh_cell_si_acquisition_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(mac_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_dl_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ue_based_netw_perf_meas_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(rlc_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(sl_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(extended_nof_drbs_r15_present, 1)); + HANDLE_CODE(bref.unpack(reduced_cp_latency_r15_present, 1)); + HANDLE_CODE(bref.unpack(laa_params_v1530_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_ul_v1530_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1530_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1530_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_params_v1530_present) { + HANDLE_CODE(meas_params_v1530.unpack(bref)); + } + if (other_params_v1530_present) { + HANDLE_CODE(other_params_v1530.unpack(bref)); + } + if (neigh_cell_si_acquisition_params_v1530_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_v1530.unpack(bref)); + } + if (mac_params_v1530_present) { + HANDLE_CODE(mac_params_v1530.unpack(bref)); + } + if (phy_layer_params_v1530_present) { + HANDLE_CODE(phy_layer_params_v1530.unpack(bref)); + } + if (rf_params_v1530_present) { + HANDLE_CODE(rf_params_v1530.unpack(bref)); + } + if (pdcp_params_v1530_present) { + HANDLE_CODE(pdcp_params_v1530.unpack(bref)); + } + if (ue_category_dl_v1530_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_dl_v1530, bref, (uint8_t)22, (uint8_t)26)); + } + if (ue_based_netw_perf_meas_params_v1530_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_v1530.unpack(bref)); + } + if (rlc_params_v1530_present) { + HANDLE_CODE(rlc_params_v1530.unpack(bref)); + } + if (sl_params_v1530_present) { + HANDLE_CODE(sl_params_v1530.unpack(bref)); + } + if (laa_params_v1530_present) { + HANDLE_CODE(laa_params_v1530.unpack(bref)); + } + if (ue_category_ul_v1530_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_ul_v1530, bref, (uint8_t)22, (uint8_t)26)); + } + if (fdd_add_ue_eutra_capabilities_v1530_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1530.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1530_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1530.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_params_v1530_present) { + j.write_fieldname("measParameters-v1530"); + meas_params_v1530.to_json(j); + } + if (other_params_v1530_present) { + j.write_fieldname("otherParameters-v1530"); + other_params_v1530.to_json(j); + } + if (neigh_cell_si_acquisition_params_v1530_present) { + j.write_fieldname("neighCellSI-AcquisitionParameters-v1530"); + neigh_cell_si_acquisition_params_v1530.to_json(j); + } + if (mac_params_v1530_present) { + j.write_fieldname("mac-Parameters-v1530"); + mac_params_v1530.to_json(j); + } + if (phy_layer_params_v1530_present) { + j.write_fieldname("phyLayerParameters-v1530"); + phy_layer_params_v1530.to_json(j); + } + if (rf_params_v1530_present) { + j.write_fieldname("rf-Parameters-v1530"); + rf_params_v1530.to_json(j); + } + if (pdcp_params_v1530_present) { + j.write_fieldname("pdcp-Parameters-v1530"); + pdcp_params_v1530.to_json(j); + } + if (ue_category_dl_v1530_present) { + j.write_int("ue-CategoryDL-v1530", ue_category_dl_v1530); + } + if (ue_based_netw_perf_meas_params_v1530_present) { + j.write_fieldname("ue-BasedNetwPerfMeasParameters-v1530"); + ue_based_netw_perf_meas_params_v1530.to_json(j); + } + if (rlc_params_v1530_present) { + j.write_fieldname("rlc-Parameters-v1530"); + rlc_params_v1530.to_json(j); + } + if (sl_params_v1530_present) { + j.write_fieldname("sl-Parameters-v1530"); + sl_params_v1530.to_json(j); + } + if (extended_nof_drbs_r15_present) { + j.write_str("extendedNumberOfDRBs-r15", "supported"); + } + if (reduced_cp_latency_r15_present) { + j.write_str("reducedCP-Latency-r15", "supported"); + } + if (laa_params_v1530_present) { + j.write_fieldname("laa-Parameters-v1530"); + laa_params_v1530.to_json(j); + } + if (ue_category_ul_v1530_present) { + j.write_int("ue-CategoryUL-v1530", ue_category_ul_v1530); + } + if (fdd_add_ue_eutra_capabilities_v1530_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1530"); + fdd_add_ue_eutra_capabilities_v1530.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1530_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1530"); + tdd_add_ue_eutra_capabilities_v1530.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1520-IEs ::= SEQUENCE +ue_eutra_cap_v1520_ies_s::ue_eutra_cap_v1520_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1520_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_params_v1520.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1520_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_params_v1520.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1520_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measParameters-v1520"); + meas_params_v1520.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1510 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1510_s::ue_eutra_cap_add_xdd_mode_v1510_s() +{ + pdcp_params_nr_r15_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1510_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdcp_params_nr_r15_present, 1)); + + if (pdcp_params_nr_r15_present) { + HANDLE_CODE(pdcp_params_nr_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1510_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pdcp_params_nr_r15_present, 1)); + + if (pdcp_params_nr_r15_present) { + HANDLE_CODE(pdcp_params_nr_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1510_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdcp_params_nr_r15_present) { + j.write_fieldname("pdcp-ParametersNR-r15"); + pdcp_params_nr_r15.to_json(j); + } + j.end_obj(); +} + +// Other-Parameters-v1460 ::= SEQUENCE +other_params_v1460_s::other_params_v1460_s() +{ + non_csg_si_report_r14_present = false; +} +SRSASN_CODE other_params_v1460_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_csg_si_report_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v1460_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_csg_si_report_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v1460_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (non_csg_si_report_r14_present) { + j.write_str("nonCSG-SI-Reporting-r14", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1510-IEs ::= SEQUENCE +ue_eutra_cap_v1510_ies_s::ue_eutra_cap_v1510_ies_s() +{ + irat_params_nr_r15_present = false; + feature_sets_eutra_r15_present = false; + pdcp_params_nr_r15_present = false; + fdd_add_ue_eutra_capabilities_v1510_present = false; + tdd_add_ue_eutra_capabilities_v1510_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1510_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(irat_params_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(feature_sets_eutra_r15_present, 1)); + HANDLE_CODE(bref.pack(pdcp_params_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1510_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1510_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (irat_params_nr_r15_present) { + HANDLE_CODE(irat_params_nr_r15.pack(bref)); + } + if (feature_sets_eutra_r15_present) { + HANDLE_CODE(feature_sets_eutra_r15.pack(bref)); + } + if (pdcp_params_nr_r15_present) { + HANDLE_CODE(pdcp_params_nr_r15.pack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1510_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1510.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1510_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1510.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1510_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(irat_params_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(feature_sets_eutra_r15_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_params_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1510_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1510_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (irat_params_nr_r15_present) { + HANDLE_CODE(irat_params_nr_r15.unpack(bref)); + } + if (feature_sets_eutra_r15_present) { + HANDLE_CODE(feature_sets_eutra_r15.unpack(bref)); + } + if (pdcp_params_nr_r15_present) { + HANDLE_CODE(pdcp_params_nr_r15.unpack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1510_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1510.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1510_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1510.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1510_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (irat_params_nr_r15_present) { + j.write_fieldname("irat-ParametersNR-r15"); + irat_params_nr_r15.to_json(j); + } + if (feature_sets_eutra_r15_present) { + j.write_fieldname("featureSetsEUTRA-r15"); + feature_sets_eutra_r15.to_json(j); + } + if (pdcp_params_nr_r15_present) { + j.write_fieldname("pdcp-ParametersNR-r15"); + pdcp_params_nr_r15.to_json(j); + } + if (fdd_add_ue_eutra_capabilities_v1510_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1510"); + fdd_add_ue_eutra_capabilities_v1510.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1510_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1510"); + tdd_add_ue_eutra_capabilities_v1510.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// OtherParameters-v1450 ::= SEQUENCE +other_params_v1450_s::other_params_v1450_s() +{ + overheat_ind_r14_present = false; +} +SRSASN_CODE other_params_v1450_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(overheat_ind_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v1450_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(overheat_ind_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v1450_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (overheat_ind_r14_present) { + j.write_str("overheatingInd-r14", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1450 ::= SEQUENCE +phy_layer_params_v1450_s::phy_layer_params_v1450_s() +{ + ce_srs_enhancement_without_comb4_r14_present = false; + crs_less_dw_pts_r14_present = false; +} +SRSASN_CODE phy_layer_params_v1450_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_srs_enhancement_without_comb4_r14_present, 1)); + HANDLE_CODE(bref.pack(crs_less_dw_pts_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1450_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_srs_enhancement_without_comb4_r14_present, 1)); + HANDLE_CODE(bref.unpack(crs_less_dw_pts_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1450_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_srs_enhancement_without_comb4_r14_present) { + j.write_str("ce-SRS-EnhancementWithoutComb4-r14", "supported"); + } + if (crs_less_dw_pts_r14_present) { + j.write_str("crs-LessDwPTS-r14", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1460-IEs ::= SEQUENCE +ue_eutra_cap_v1460_ies_s::ue_eutra_cap_v1460_ies_s() +{ + ue_category_dl_v1460_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1460_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_dl_v1460_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1460_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_dl_v1460, (uint8_t)21, (uint8_t)21)); + } + HANDLE_CODE(other_params_v1460.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1460_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_dl_v1460_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1460_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_dl_v1460, bref, (uint8_t)21, (uint8_t)21)); + } + HANDLE_CODE(other_params_v1460.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1460_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_dl_v1460_present) { + j.write_int("ue-CategoryDL-v1460", ue_category_dl_v1460); + } + j.write_fieldname("otherParameters-v1460"); + other_params_v1460.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LWA-Parameters-v1440 ::= SEQUENCE +lwa_params_v1440_s::lwa_params_v1440_s() +{ + lwa_rlc_um_r14_present = false; +} +SRSASN_CODE lwa_params_v1440_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(lwa_rlc_um_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE lwa_params_v1440_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(lwa_rlc_um_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void lwa_params_v1440_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwa_rlc_um_r14_present) { + j.write_str("lwa-RLC-UM-r14", "supported"); + } + j.end_obj(); +} + +// MAC-Parameters-v1440 ::= SEQUENCE +mac_params_v1440_s::mac_params_v1440_s() +{ + rai_support_r14_present = false; +} +SRSASN_CODE mac_params_v1440_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rai_support_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_params_v1440_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rai_support_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void mac_params_v1440_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rai_support_r14_present) { + j.write_str("rai-Support-r14", "supported"); + } + j.end_obj(); +} + +// MMTEL-Parameters-r14 ::= SEQUENCE +mmtel_params_r14_s::mmtel_params_r14_s() +{ + delay_budget_report_r14_present = false; + pusch_enhance_r14_present = false; + recommended_bit_rate_r14_present = false; + recommended_bit_rate_query_r14_present = false; +} +SRSASN_CODE mmtel_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delay_budget_report_r14_present, 1)); + HANDLE_CODE(bref.pack(pusch_enhance_r14_present, 1)); + HANDLE_CODE(bref.pack(recommended_bit_rate_r14_present, 1)); + HANDLE_CODE(bref.pack(recommended_bit_rate_query_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mmtel_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delay_budget_report_r14_present, 1)); + HANDLE_CODE(bref.unpack(pusch_enhance_r14_present, 1)); + HANDLE_CODE(bref.unpack(recommended_bit_rate_r14_present, 1)); + HANDLE_CODE(bref.unpack(recommended_bit_rate_query_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void mmtel_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (delay_budget_report_r14_present) { + j.write_str("delayBudgetReporting-r14", "supported"); + } + if (pusch_enhance_r14_present) { + j.write_str("pusch-Enhancements-r14", "supported"); + } + if (recommended_bit_rate_r14_present) { + j.write_str("recommendedBitRate-r14", "supported"); + } + if (recommended_bit_rate_query_r14_present) { + j.write_str("recommendedBitRateQuery-r14", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1450-IEs ::= SEQUENCE +ue_eutra_cap_v1450_ies_s::ue_eutra_cap_v1450_ies_s() +{ + phy_layer_params_v1450_present = false; + rf_params_v1450_present = false; + ue_category_dl_v1450_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1450_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1450_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1450_present, 1)); + HANDLE_CODE(bref.pack(ue_category_dl_v1450_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1450_present) { + HANDLE_CODE(phy_layer_params_v1450.pack(bref)); + } + if (rf_params_v1450_present) { + HANDLE_CODE(rf_params_v1450.pack(bref)); + } + HANDLE_CODE(other_params_v1450.pack(bref)); + if (ue_category_dl_v1450_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_dl_v1450, (uint8_t)20, (uint8_t)20)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1450_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1450_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1450_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_dl_v1450_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1450_present) { + HANDLE_CODE(phy_layer_params_v1450.unpack(bref)); + } + if (rf_params_v1450_present) { + HANDLE_CODE(rf_params_v1450.unpack(bref)); + } + HANDLE_CODE(other_params_v1450.unpack(bref)); + if (ue_category_dl_v1450_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_dl_v1450, bref, (uint8_t)20, (uint8_t)20)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1450_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1450_present) { + j.write_fieldname("phyLayerParameters-v1450"); + phy_layer_params_v1450.to_json(j); + } + if (rf_params_v1450_present) { + j.write_fieldname("rf-Parameters-v1450"); + rf_params_v1450.to_json(j); + } + j.write_fieldname("otherParameters-v1450"); + other_params_v1450.to_json(j); + if (ue_category_dl_v1450_present) { + j.write_int("ue-CategoryDL-v1450", ue_category_dl_v1450); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CE-Parameters-v1430 ::= SEQUENCE +ce_params_v1430_s::ce_params_v1430_s() +{ + ce_switch_without_ho_r14_present = false; +} +SRSASN_CODE ce_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_switch_without_ho_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ce_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_switch_without_ho_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void ce_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_switch_without_ho_r14_present) { + j.write_str("ce-SwitchWithoutHO-r14", "supported"); + } + j.end_obj(); +} + +// HighSpeedEnhParameters-r14 ::= SEQUENCE +high_speed_enh_params_r14_s::high_speed_enh_params_r14_s() +{ + meas_enhance_r14_present = false; + demod_enhance_r14_present = false; + prach_enhance_r14_present = false; +} +SRSASN_CODE high_speed_enh_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_enhance_r14_present, 1)); + HANDLE_CODE(bref.pack(demod_enhance_r14_present, 1)); + HANDLE_CODE(bref.pack(prach_enhance_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE high_speed_enh_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_enhance_r14_present, 1)); + HANDLE_CODE(bref.unpack(demod_enhance_r14_present, 1)); + HANDLE_CODE(bref.unpack(prach_enhance_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void high_speed_enh_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_enhance_r14_present) { + j.write_str("measurementEnhancements-r14", "supported"); + } + if (demod_enhance_r14_present) { + j.write_str("demodulationEnhancements-r14", "supported"); + } + if (prach_enhance_r14_present) { + j.write_str("prach-Enhancements-r14", "supported"); + } + j.end_obj(); +} + +// LAA-Parameters-v1430 ::= SEQUENCE +laa_params_v1430_s::laa_params_v1430_s() +{ + cross_carrier_sched_laa_ul_r14_present = false; + ul_laa_r14_present = false; + two_step_sched_timing_info_r14_present = false; + uss_blind_decoding_adjustment_r14_present = false; + uss_blind_decoding_reduction_r14_present = false; + out_of_seq_grant_handling_r14_present = false; +} +SRSASN_CODE laa_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cross_carrier_sched_laa_ul_r14_present, 1)); + HANDLE_CODE(bref.pack(ul_laa_r14_present, 1)); + HANDLE_CODE(bref.pack(two_step_sched_timing_info_r14_present, 1)); + HANDLE_CODE(bref.pack(uss_blind_decoding_adjustment_r14_present, 1)); + HANDLE_CODE(bref.pack(uss_blind_decoding_reduction_r14_present, 1)); + HANDLE_CODE(bref.pack(out_of_seq_grant_handling_r14_present, 1)); + + if (two_step_sched_timing_info_r14_present) { + HANDLE_CODE(pack_enum(bref, two_step_sched_timing_info_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cross_carrier_sched_laa_ul_r14_present, 1)); + HANDLE_CODE(bref.unpack(ul_laa_r14_present, 1)); + HANDLE_CODE(bref.unpack(two_step_sched_timing_info_r14_present, 1)); + HANDLE_CODE(bref.unpack(uss_blind_decoding_adjustment_r14_present, 1)); + HANDLE_CODE(bref.unpack(uss_blind_decoding_reduction_r14_present, 1)); + HANDLE_CODE(bref.unpack(out_of_seq_grant_handling_r14_present, 1)); + + if (two_step_sched_timing_info_r14_present) { + HANDLE_CODE(unpack_enum(two_step_sched_timing_info_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void laa_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cross_carrier_sched_laa_ul_r14_present) { + j.write_str("crossCarrierSchedulingLAA-UL-r14", "supported"); + } + if (ul_laa_r14_present) { + j.write_str("uplinkLAA-r14", "supported"); + } + if (two_step_sched_timing_info_r14_present) { + j.write_str("twoStepSchedulingTimingInfo-r14", two_step_sched_timing_info_r14.to_string()); + } + if (uss_blind_decoding_adjustment_r14_present) { + j.write_str("uss-BlindDecodingAdjustment-r14", "supported"); + } + if (uss_blind_decoding_reduction_r14_present) { + j.write_str("uss-BlindDecodingReduction-r14", "supported"); + } + if (out_of_seq_grant_handling_r14_present) { + j.write_str("outOfSequenceGrantHandling-r14", "supported"); + } + j.end_obj(); +} + +// LWA-Parameters-v1430 ::= SEQUENCE +lwa_params_v1430_s::lwa_params_v1430_s() +{ + lwa_ho_without_wt_change_r14_present = false; + lwa_ul_r14_present = false; + wlan_periodic_meas_r14_present = false; + wlan_report_any_wlan_r14_present = false; + wlan_supported_data_rate_r14_present = false; +} +SRSASN_CODE lwa_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(lwa_ho_without_wt_change_r14_present, 1)); + HANDLE_CODE(bref.pack(lwa_ul_r14_present, 1)); + HANDLE_CODE(bref.pack(wlan_periodic_meas_r14_present, 1)); + HANDLE_CODE(bref.pack(wlan_report_any_wlan_r14_present, 1)); + HANDLE_CODE(bref.pack(wlan_supported_data_rate_r14_present, 1)); + + if (wlan_supported_data_rate_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, wlan_supported_data_rate_r14, (uint16_t)1, (uint16_t)2048)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE lwa_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(lwa_ho_without_wt_change_r14_present, 1)); + HANDLE_CODE(bref.unpack(lwa_ul_r14_present, 1)); + HANDLE_CODE(bref.unpack(wlan_periodic_meas_r14_present, 1)); + HANDLE_CODE(bref.unpack(wlan_report_any_wlan_r14_present, 1)); + HANDLE_CODE(bref.unpack(wlan_supported_data_rate_r14_present, 1)); + + if (wlan_supported_data_rate_r14_present) { + HANDLE_CODE(unpack_unalign_integer(wlan_supported_data_rate_r14, bref, (uint16_t)1, (uint16_t)2048)); + } + + return SRSASN_SUCCESS; +} +void lwa_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwa_ho_without_wt_change_r14_present) { + j.write_str("lwa-HO-WithoutWT-Change-r14", "supported"); + } + if (lwa_ul_r14_present) { + j.write_str("lwa-UL-r14", "supported"); + } + if (wlan_periodic_meas_r14_present) { + j.write_str("wlan-PeriodicMeas-r14", "supported"); + } + if (wlan_report_any_wlan_r14_present) { + j.write_str("wlan-ReportAnyWLAN-r14", "supported"); + } + if (wlan_supported_data_rate_r14_present) { + j.write_int("wlan-SupportedDataRate-r14", wlan_supported_data_rate_r14); + } + j.end_obj(); +} + +// LWIP-Parameters-v1430 ::= SEQUENCE +lwip_params_v1430_s::lwip_params_v1430_s() +{ + lwip_aggregation_dl_r14_present = false; + lwip_aggregation_ul_r14_present = false; +} +SRSASN_CODE lwip_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(lwip_aggregation_dl_r14_present, 1)); + HANDLE_CODE(bref.pack(lwip_aggregation_ul_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE lwip_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(lwip_aggregation_dl_r14_present, 1)); + HANDLE_CODE(bref.unpack(lwip_aggregation_ul_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void lwip_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwip_aggregation_dl_r14_present) { + j.write_str("lwip-Aggregation-DL-r14", "supported"); + } + if (lwip_aggregation_ul_r14_present) { + j.write_str("lwip-Aggregation-UL-r14", "supported"); + } + j.end_obj(); +} + +// MAC-Parameters-v1430 ::= SEQUENCE +mac_params_v1430_s::mac_params_v1430_s() +{ + short_sps_interv_fdd_r14_present = false; + short_sps_interv_tdd_r14_present = false; + skip_ul_dynamic_r14_present = false; + skip_ul_sps_r14_present = false; + multiple_ul_sps_r14_present = false; + data_inact_mon_r14_present = false; +} +SRSASN_CODE mac_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(short_sps_interv_fdd_r14_present, 1)); + HANDLE_CODE(bref.pack(short_sps_interv_tdd_r14_present, 1)); + HANDLE_CODE(bref.pack(skip_ul_dynamic_r14_present, 1)); + HANDLE_CODE(bref.pack(skip_ul_sps_r14_present, 1)); + HANDLE_CODE(bref.pack(multiple_ul_sps_r14_present, 1)); + HANDLE_CODE(bref.pack(data_inact_mon_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(short_sps_interv_fdd_r14_present, 1)); + HANDLE_CODE(bref.unpack(short_sps_interv_tdd_r14_present, 1)); + HANDLE_CODE(bref.unpack(skip_ul_dynamic_r14_present, 1)); + HANDLE_CODE(bref.unpack(skip_ul_sps_r14_present, 1)); + HANDLE_CODE(bref.unpack(multiple_ul_sps_r14_present, 1)); + HANDLE_CODE(bref.unpack(data_inact_mon_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void mac_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (short_sps_interv_fdd_r14_present) { + j.write_str("shortSPS-IntervalFDD-r14", "supported"); + } + if (short_sps_interv_tdd_r14_present) { + j.write_str("shortSPS-IntervalTDD-r14", "supported"); + } + if (skip_ul_dynamic_r14_present) { + j.write_str("skipUplinkDynamic-r14", "supported"); + } + if (skip_ul_sps_r14_present) { + j.write_str("skipUplinkSPS-r14", "supported"); + } + if (multiple_ul_sps_r14_present) { + j.write_str("multipleUplinkSPS-r14", "supported"); + } + if (data_inact_mon_r14_present) { + j.write_str("dataInactMon-r14", "supported"); + } + j.end_obj(); +} + +// MBMS-Parameters-v1430 ::= SEQUENCE +mbms_params_v1430_s::mbms_params_v1430_s() +{ + fembms_ded_cell_r14_present = false; + fembms_mixed_cell_r14_present = false; + subcarrier_spacing_mbms_khz7dot5_r14_present = false; + subcarrier_spacing_mbms_khz1dot25_r14_present = false; +} +SRSASN_CODE mbms_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fembms_ded_cell_r14_present, 1)); + HANDLE_CODE(bref.pack(fembms_mixed_cell_r14_present, 1)); + HANDLE_CODE(bref.pack(subcarrier_spacing_mbms_khz7dot5_r14_present, 1)); + HANDLE_CODE(bref.pack(subcarrier_spacing_mbms_khz1dot25_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fembms_ded_cell_r14_present, 1)); + HANDLE_CODE(bref.unpack(fembms_mixed_cell_r14_present, 1)); + HANDLE_CODE(bref.unpack(subcarrier_spacing_mbms_khz7dot5_r14_present, 1)); + HANDLE_CODE(bref.unpack(subcarrier_spacing_mbms_khz1dot25_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void mbms_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fembms_ded_cell_r14_present) { + j.write_str("fembmsDedicatedCell-r14", "supported"); + } + if (fembms_mixed_cell_r14_present) { + j.write_str("fembmsMixedCell-r14", "supported"); + } + if (subcarrier_spacing_mbms_khz7dot5_r14_present) { + j.write_str("subcarrierSpacingMBMS-khz7dot5-r14", "supported"); + } + if (subcarrier_spacing_mbms_khz1dot25_r14_present) { + j.write_str("subcarrierSpacingMBMS-khz1dot25-r14", "supported"); + } + j.end_obj(); +} + +// MeasParameters-v1430 ::= SEQUENCE +meas_params_v1430_s::meas_params_v1430_s() +{ + ce_meass_r14_present = false; + ncsg_r14_present = false; + short_meas_gap_r14_present = false; + per_serving_cell_meas_gap_r14_present = false; + non_uniform_gap_r14_present = false; +} +SRSASN_CODE meas_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_meass_r14_present, 1)); + HANDLE_CODE(bref.pack(ncsg_r14_present, 1)); + HANDLE_CODE(bref.pack(short_meas_gap_r14_present, 1)); + HANDLE_CODE(bref.pack(per_serving_cell_meas_gap_r14_present, 1)); + HANDLE_CODE(bref.pack(non_uniform_gap_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_meass_r14_present, 1)); + HANDLE_CODE(bref.unpack(ncsg_r14_present, 1)); + HANDLE_CODE(bref.unpack(short_meas_gap_r14_present, 1)); + HANDLE_CODE(bref.unpack(per_serving_cell_meas_gap_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_uniform_gap_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_meass_r14_present) { + j.write_str("ceMeasurements-r14", "supported"); + } + if (ncsg_r14_present) { + j.write_str("ncsg-r14", "supported"); + } + if (short_meas_gap_r14_present) { + j.write_str("shortMeasurementGap-r14", "supported"); + } + if (per_serving_cell_meas_gap_r14_present) { + j.write_str("perServingCellMeasurementGap-r14", "supported"); + } + if (non_uniform_gap_r14_present) { + j.write_str("nonUniformGap-r14", "supported"); + } + j.end_obj(); +} + +// MobilityParameters-r14 ::= SEQUENCE +mob_params_r14_s::mob_params_r14_s() +{ + make_before_break_r14_present = false; + rach_less_r14_present = false; +} +SRSASN_CODE mob_params_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(make_before_break_r14_present, 1)); + HANDLE_CODE(bref.pack(rach_less_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_params_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(make_before_break_r14_present, 1)); + HANDLE_CODE(bref.unpack(rach_less_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void mob_params_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (make_before_break_r14_present) { + j.write_str("makeBeforeBreak-r14", "supported"); + } + if (rach_less_r14_present) { + j.write_str("rach-Less-r14", "supported"); + } + j.end_obj(); +} + +// Other-Parameters-v1430 ::= SEQUENCE +other_params_v1430_s::other_params_v1430_s() +{ + bw_pref_ind_r14_present = false; + rlm_report_support_r14_present = false; +} +SRSASN_CODE other_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(bw_pref_ind_r14_present, 1)); + HANDLE_CODE(bref.pack(rlm_report_support_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(bw_pref_ind_r14_present, 1)); + HANDLE_CODE(bref.unpack(rlm_report_support_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (bw_pref_ind_r14_present) { + j.write_str("bwPrefInd-r14", "supported"); + } + if (rlm_report_support_r14_present) { + j.write_str("rlm-ReportSupport-r14", "supported"); + } + j.end_obj(); +} + +// PDCP-Parameters-v1430 ::= SEQUENCE +pdcp_params_v1430_s::pdcp_params_v1430_s() +{ + max_num_rohc_context_sessions_r14_present = false; +} +SRSASN_CODE pdcp_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_num_rohc_context_sessions_r14_present, 1)); + + HANDLE_CODE(bref.pack(supported_ul_only_rohc_profiles_r14.profile0x0006_r14, 1)); + if (max_num_rohc_context_sessions_r14_present) { + HANDLE_CODE(pack_enum(bref, max_num_rohc_context_sessions_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_num_rohc_context_sessions_r14_present, 1)); + + HANDLE_CODE(bref.unpack(supported_ul_only_rohc_profiles_r14.profile0x0006_r14, 1)); + if (max_num_rohc_context_sessions_r14_present) { + HANDLE_CODE(unpack_enum(max_num_rohc_context_sessions_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void pdcp_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("supportedUplinkOnlyROHC-Profiles-r14"); + j.start_obj(); + j.write_bool("profile0x0006-r14", supported_ul_only_rohc_profiles_r14.profile0x0006_r14); + j.end_obj(); + if (max_num_rohc_context_sessions_r14_present) { + j.write_str("maxNumberROHC-ContextSessions-r14", max_num_rohc_context_sessions_r14.to_string()); + } + j.end_obj(); +} + +// RLC-Parameters-v1430 ::= SEQUENCE +rlc_params_v1430_s::rlc_params_v1430_s() +{ + extended_poll_byte_r14_present = false; +} +SRSASN_CODE rlc_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(extended_poll_byte_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(extended_poll_byte_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void rlc_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (extended_poll_byte_r14_present) { + j.write_str("extendedPollByte-r14", "supported"); + } + j.end_obj(); +} + +// UE-BasedNetwPerfMeasParameters-v1430 ::= SEQUENCE +ue_based_netw_perf_meas_params_v1430_s::ue_based_netw_perf_meas_params_v1430_s() +{ + location_report_r14_present = false; +} +SRSASN_CODE ue_based_netw_perf_meas_params_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(location_report_r14_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_based_netw_perf_meas_params_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(location_report_r14_present, 1)); + + return SRSASN_SUCCESS; +} +void ue_based_netw_perf_meas_params_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (location_report_r14_present) { + j.write_str("locationReport-r14", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1440-IEs ::= SEQUENCE +ue_eutra_cap_v1440_ies_s::ue_eutra_cap_v1440_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1440_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(lwa_params_v1440.pack(bref)); + HANDLE_CODE(mac_params_v1440.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1440_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(lwa_params_v1440.unpack(bref)); + HANDLE_CODE(mac_params_v1440.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1440_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("lwa-Parameters-v1440"); + lwa_params_v1440.to_json(j); + j.write_fieldname("mac-Parameters-v1440"); + mac_params_v1440.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1430 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1430_s::ue_eutra_cap_add_xdd_mode_v1430_s() +{ + phy_layer_params_v1430_present = false; + mmtel_params_r14_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(mmtel_params_r14_present, 1)); + + if (phy_layer_params_v1430_present) { + HANDLE_CODE(phy_layer_params_v1430.pack(bref)); + } + if (mmtel_params_r14_present) { + HANDLE_CODE(mmtel_params_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(mmtel_params_r14_present, 1)); + + if (phy_layer_params_v1430_present) { + HANDLE_CODE(phy_layer_params_v1430.unpack(bref)); + } + if (mmtel_params_r14_present) { + HANDLE_CODE(mmtel_params_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1430_present) { + j.write_fieldname("phyLayerParameters-v1430"); + phy_layer_params_v1430.to_json(j); + } + if (mmtel_params_r14_present) { + j.write_fieldname("mmtel-Parameters-r14"); + mmtel_params_r14.to_json(j); + } + j.end_obj(); +} + +// MBMS-Parameters-v1470 ::= SEQUENCE +mbms_params_v1470_s::mbms_params_v1470_s() +{ + mbms_scaling_factor1dot25_r14_present = false; + mbms_scaling_factor7dot5_r14_present = false; +} +SRSASN_CODE mbms_params_v1470_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbms_scaling_factor1dot25_r14_present, 1)); + HANDLE_CODE(bref.pack(mbms_scaling_factor7dot5_r14_present, 1)); + + HANDLE_CODE(mbms_max_bw_r14.pack(bref)); + if (mbms_scaling_factor1dot25_r14_present) { + HANDLE_CODE(pack_enum(bref, mbms_scaling_factor1dot25_r14)); + } + if (mbms_scaling_factor7dot5_r14_present) { + HANDLE_CODE(pack_enum(bref, mbms_scaling_factor7dot5_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_params_v1470_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbms_scaling_factor1dot25_r14_present, 1)); + HANDLE_CODE(bref.unpack(mbms_scaling_factor7dot5_r14_present, 1)); + + HANDLE_CODE(mbms_max_bw_r14.unpack(bref)); + if (mbms_scaling_factor1dot25_r14_present) { + HANDLE_CODE(unpack_enum(mbms_scaling_factor1dot25_r14, bref)); + } + if (mbms_scaling_factor7dot5_r14_present) { + HANDLE_CODE(unpack_enum(mbms_scaling_factor7dot5_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void mbms_params_v1470_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mbms-MaxBW-r14"); + mbms_max_bw_r14.to_json(j); + if (mbms_scaling_factor1dot25_r14_present) { + j.write_str("mbms-ScalingFactor1dot25-r14", mbms_scaling_factor1dot25_r14.to_string()); + } + if (mbms_scaling_factor7dot5_r14_present) { + j.write_str("mbms-ScalingFactor7dot5-r14", mbms_scaling_factor7dot5_r14.to_string()); + } + j.end_obj(); +} + +void mbms_params_v1470_s::mbms_max_bw_r14_c_::set(types::options e) +{ + type_ = e; +} +void mbms_params_v1470_s::mbms_max_bw_r14_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::implicit_value: + break; + case types::explicit_value: + j.write_int("explicitValue", c); + break; + default: + log_invalid_choice_id(type_, "mbms_params_v1470_s::mbms_max_bw_r14_c_"); + } + j.end_obj(); +} +SRSASN_CODE mbms_params_v1470_s::mbms_max_bw_r14_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::implicit_value: + break; + case types::explicit_value: + HANDLE_CODE(pack_unalign_integer(bref, c, (uint8_t)2, (uint8_t)20)); + break; + default: + log_invalid_choice_id(type_, "mbms_params_v1470_s::mbms_max_bw_r14_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_params_v1470_s::mbms_max_bw_r14_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::implicit_value: + break; + case types::explicit_value: + HANDLE_CODE(unpack_unalign_integer(c, bref, (uint8_t)2, (uint8_t)20)); + break; + default: + log_invalid_choice_id(type_, "mbms_params_v1470_s::mbms_max_bw_r14_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// Other-Parameters-v1360 ::= SEQUENCE +other_params_v1360_s::other_params_v1360_s() +{ + in_dev_coex_ind_hardware_sharing_ind_r13_present = false; +} +SRSASN_CODE other_params_v1360_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(in_dev_coex_ind_hardware_sharing_ind_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v1360_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(in_dev_coex_ind_hardware_sharing_ind_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v1360_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (in_dev_coex_ind_hardware_sharing_ind_r13_present) { + j.write_str("inDeviceCoexInd-HardwareSharingInd-r13", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1430-IEs ::= SEQUENCE +ue_eutra_cap_v1430_ies_s::ue_eutra_cap_v1430_ies_s() +{ + ue_category_dl_v1430_present = false; + ue_category_ul_v1430_present = false; + ue_category_ul_v1430b_present = false; + mac_params_v1430_present = false; + meas_params_v1430_present = false; + pdcp_params_v1430_present = false; + rf_params_v1430_present = false; + laa_params_v1430_present = false; + lwa_params_v1430_present = false; + lwip_params_v1430_present = false; + mmtel_params_r14_present = false; + mob_params_r14_present = false; + fdd_add_ue_eutra_capabilities_v1430_present = false; + tdd_add_ue_eutra_capabilities_v1430_present = false; + mbms_params_v1430_present = false; + sl_params_v1430_present = false; + ue_based_netw_perf_meas_params_v1430_present = false; + high_speed_enh_params_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_dl_v1430_present, 1)); + HANDLE_CODE(bref.pack(ue_category_ul_v1430_present, 1)); + HANDLE_CODE(bref.pack(ue_category_ul_v1430b_present, 1)); + HANDLE_CODE(bref.pack(mac_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(pdcp_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(laa_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(lwa_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(lwip_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(mmtel_params_r14_present, 1)); + HANDLE_CODE(bref.pack(mob_params_r14_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1430_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1430_present, 1)); + HANDLE_CODE(bref.pack(mbms_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(sl_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(ue_based_netw_perf_meas_params_v1430_present, 1)); + HANDLE_CODE(bref.pack(high_speed_enh_params_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v1430.pack(bref)); + if (ue_category_ul_v1430_present) { + HANDLE_CODE(pack_enum(bref, ue_category_ul_v1430)); + } + if (mac_params_v1430_present) { + HANDLE_CODE(mac_params_v1430.pack(bref)); + } + if (meas_params_v1430_present) { + HANDLE_CODE(meas_params_v1430.pack(bref)); + } + if (pdcp_params_v1430_present) { + HANDLE_CODE(pdcp_params_v1430.pack(bref)); + } + HANDLE_CODE(rlc_params_v1430.pack(bref)); + if (rf_params_v1430_present) { + HANDLE_CODE(rf_params_v1430.pack(bref)); + } + if (laa_params_v1430_present) { + HANDLE_CODE(laa_params_v1430.pack(bref)); + } + if (lwa_params_v1430_present) { + HANDLE_CODE(lwa_params_v1430.pack(bref)); + } + if (lwip_params_v1430_present) { + HANDLE_CODE(lwip_params_v1430.pack(bref)); + } + HANDLE_CODE(other_params_v1430.pack(bref)); + if (mmtel_params_r14_present) { + HANDLE_CODE(mmtel_params_r14.pack(bref)); + } + if (mob_params_r14_present) { + HANDLE_CODE(mob_params_r14.pack(bref)); + } + HANDLE_CODE(ce_params_v1430.pack(bref)); + if (fdd_add_ue_eutra_capabilities_v1430_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1430.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1430_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1430.pack(bref)); + } + if (mbms_params_v1430_present) { + HANDLE_CODE(mbms_params_v1430.pack(bref)); + } + if (sl_params_v1430_present) { + HANDLE_CODE(sl_params_v1430.pack(bref)); + } + if (ue_based_netw_perf_meas_params_v1430_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_v1430.pack(bref)); + } + if (high_speed_enh_params_r14_present) { + HANDLE_CODE(high_speed_enh_params_r14.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_dl_v1430_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_ul_v1430_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_ul_v1430b_present, 1)); + HANDLE_CODE(bref.unpack(mac_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(laa_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(lwa_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(lwip_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(mmtel_params_r14_present, 1)); + HANDLE_CODE(bref.unpack(mob_params_r14_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1430_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1430_present, 1)); + HANDLE_CODE(bref.unpack(mbms_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(sl_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(ue_based_netw_perf_meas_params_v1430_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_enh_params_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v1430.unpack(bref)); + if (ue_category_ul_v1430_present) { + HANDLE_CODE(unpack_enum(ue_category_ul_v1430, bref)); + } + if (mac_params_v1430_present) { + HANDLE_CODE(mac_params_v1430.unpack(bref)); + } + if (meas_params_v1430_present) { + HANDLE_CODE(meas_params_v1430.unpack(bref)); + } + if (pdcp_params_v1430_present) { + HANDLE_CODE(pdcp_params_v1430.unpack(bref)); + } + HANDLE_CODE(rlc_params_v1430.unpack(bref)); + if (rf_params_v1430_present) { + HANDLE_CODE(rf_params_v1430.unpack(bref)); + } + if (laa_params_v1430_present) { + HANDLE_CODE(laa_params_v1430.unpack(bref)); + } + if (lwa_params_v1430_present) { + HANDLE_CODE(lwa_params_v1430.unpack(bref)); + } + if (lwip_params_v1430_present) { + HANDLE_CODE(lwip_params_v1430.unpack(bref)); + } + HANDLE_CODE(other_params_v1430.unpack(bref)); + if (mmtel_params_r14_present) { + HANDLE_CODE(mmtel_params_r14.unpack(bref)); + } + if (mob_params_r14_present) { + HANDLE_CODE(mob_params_r14.unpack(bref)); + } + HANDLE_CODE(ce_params_v1430.unpack(bref)); + if (fdd_add_ue_eutra_capabilities_v1430_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1430.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1430_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1430.unpack(bref)); + } + if (mbms_params_v1430_present) { + HANDLE_CODE(mbms_params_v1430.unpack(bref)); + } + if (sl_params_v1430_present) { + HANDLE_CODE(sl_params_v1430.unpack(bref)); + } + if (ue_based_netw_perf_meas_params_v1430_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_v1430.unpack(bref)); + } + if (high_speed_enh_params_r14_present) { + HANDLE_CODE(high_speed_enh_params_r14.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("phyLayerParameters-v1430"); + phy_layer_params_v1430.to_json(j); + if (ue_category_dl_v1430_present) { + j.write_str("ue-CategoryDL-v1430", "m2"); + } + if (ue_category_ul_v1430_present) { + j.write_str("ue-CategoryUL-v1430", ue_category_ul_v1430.to_string()); + } + if (ue_category_ul_v1430b_present) { + j.write_str("ue-CategoryUL-v1430b", "n21"); + } + if (mac_params_v1430_present) { + j.write_fieldname("mac-Parameters-v1430"); + mac_params_v1430.to_json(j); + } + if (meas_params_v1430_present) { + j.write_fieldname("measParameters-v1430"); + meas_params_v1430.to_json(j); + } + if (pdcp_params_v1430_present) { + j.write_fieldname("pdcp-Parameters-v1430"); + pdcp_params_v1430.to_json(j); + } + j.write_fieldname("rlc-Parameters-v1430"); + rlc_params_v1430.to_json(j); + if (rf_params_v1430_present) { + j.write_fieldname("rf-Parameters-v1430"); + rf_params_v1430.to_json(j); + } + if (laa_params_v1430_present) { + j.write_fieldname("laa-Parameters-v1430"); + laa_params_v1430.to_json(j); + } + if (lwa_params_v1430_present) { + j.write_fieldname("lwa-Parameters-v1430"); + lwa_params_v1430.to_json(j); + } + if (lwip_params_v1430_present) { + j.write_fieldname("lwip-Parameters-v1430"); + lwip_params_v1430.to_json(j); + } + j.write_fieldname("otherParameters-v1430"); + other_params_v1430.to_json(j); + if (mmtel_params_r14_present) { + j.write_fieldname("mmtel-Parameters-r14"); + mmtel_params_r14.to_json(j); + } + if (mob_params_r14_present) { + j.write_fieldname("mobilityParameters-r14"); + mob_params_r14.to_json(j); + } + j.write_fieldname("ce-Parameters-v1430"); + ce_params_v1430.to_json(j); + if (fdd_add_ue_eutra_capabilities_v1430_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1430"); + fdd_add_ue_eutra_capabilities_v1430.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1430_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1430"); + tdd_add_ue_eutra_capabilities_v1430.to_json(j); + } + if (mbms_params_v1430_present) { + j.write_fieldname("mbms-Parameters-v1430"); + mbms_params_v1430.to_json(j); + } + if (sl_params_v1430_present) { + j.write_fieldname("sl-Parameters-v1430"); + sl_params_v1430.to_json(j); + } + if (ue_based_netw_perf_meas_params_v1430_present) { + j.write_fieldname("ue-BasedNetwPerfMeasParameters-v1430"); + ue_based_netw_perf_meas_params_v1430.to_json(j); + } + if (high_speed_enh_params_r14_present) { + j.write_fieldname("highSpeedEnhParameters-r14"); + high_speed_enh_params_r14.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CE-Parameters-v1350 ::= SEQUENCE +ce_params_v1350_s::ce_params_v1350_s() +{ + unicast_freq_hop_r13_present = false; +} +SRSASN_CODE ce_params_v1350_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(unicast_freq_hop_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ce_params_v1350_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(unicast_freq_hop_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void ce_params_v1350_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (unicast_freq_hop_r13_present) { + j.write_str("unicastFrequencyHopping-r13", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1360-IEs ::= SEQUENCE +ue_eutra_cap_v1360_ies_s::ue_eutra_cap_v1360_ies_s() +{ + other_params_v1360_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1360_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(other_params_v1360_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (other_params_v1360_present) { + HANDLE_CODE(other_params_v1360.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1360_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(other_params_v1360_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (other_params_v1360_present) { + HANDLE_CODE(other_params_v1360.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1360_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (other_params_v1360_present) { + j.write_fieldname("other-Parameters-v1360"); + other_params_v1360.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1470-IEs ::= SEQUENCE +ue_eutra_cap_v1470_ies_s::ue_eutra_cap_v1470_ies_s() +{ + mbms_params_v1470_present = false; + phy_layer_params_v1470_present = false; + rf_params_v1470_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1470_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbms_params_v1470_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1470_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1470_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mbms_params_v1470_present) { + HANDLE_CODE(mbms_params_v1470.pack(bref)); + } + if (phy_layer_params_v1470_present) { + HANDLE_CODE(phy_layer_params_v1470.pack(bref)); + } + if (rf_params_v1470_present) { + HANDLE_CODE(rf_params_v1470.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1470_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbms_params_v1470_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1470_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1470_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mbms_params_v1470_present) { + HANDLE_CODE(mbms_params_v1470.unpack(bref)); + } + if (phy_layer_params_v1470_present) { + HANDLE_CODE(phy_layer_params_v1470.unpack(bref)); + } + if (rf_params_v1470_present) { + HANDLE_CODE(rf_params_v1470.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1470_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbms_params_v1470_present) { + j.write_fieldname("mbms-Parameters-v1470"); + mbms_params_v1470.to_json(j); + } + if (phy_layer_params_v1470_present) { + j.write_fieldname("phyLayerParameters-v1470"); + phy_layer_params_v1470.to_json(j); + } + if (rf_params_v1470_present) { + j.write_fieldname("rf-Parameters-v1470"); + rf_params_v1470.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CE-Parameters-v1380 ::= SEQUENCE +ce_params_v1380_s::ce_params_v1380_s() +{ + tm6_ce_mode_a_r13_present = false; +} +SRSASN_CODE ce_params_v1380_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tm6_ce_mode_a_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ce_params_v1380_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tm6_ce_mode_a_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void ce_params_v1380_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tm6_ce_mode_a_r13_present) { + j.write_str("tm6-CE-ModeA-r13", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1350-IEs ::= SEQUENCE +ue_eutra_cap_v1350_ies_s::ue_eutra_cap_v1350_ies_s() +{ + ue_category_dl_v1350_present = false; + ue_category_ul_v1350_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1350_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_dl_v1350_present, 1)); + HANDLE_CODE(bref.pack(ue_category_ul_v1350_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ce_params_v1350.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1350_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_dl_v1350_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_ul_v1350_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ce_params_v1350.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1350_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_dl_v1350_present) { + j.write_str("ue-CategoryDL-v1350", "oneBis"); + } + if (ue_category_ul_v1350_present) { + j.write_str("ue-CategoryUL-v1350", "oneBis"); + } + j.write_fieldname("ce-Parameters-v1350"); + ce_params_v1350.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v13x0-IEs ::= SEQUENCE +ue_eutra_cap_v13x0_ies_s::ue_eutra_cap_v13x0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v13x0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v13x0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v13x0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CE-Parameters-v1370 ::= SEQUENCE +ce_params_v1370_s::ce_params_v1370_s() +{ + tm9_ce_mode_a_r13_present = false; + tm9_ce_mode_b_r13_present = false; +} +SRSASN_CODE ce_params_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tm9_ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(tm9_ce_mode_b_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ce_params_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tm9_ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(tm9_ce_mode_b_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void ce_params_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tm9_ce_mode_a_r13_present) { + j.write_str("tm9-CE-ModeA-r13", "supported"); + } + if (tm9_ce_mode_b_r13_present) { + j.write_str("tm9-CE-ModeB-r13", "supported"); + } + j.end_obj(); +} + +// SCPTM-Parameters-r13 ::= SEQUENCE +scptm_params_r13_s::scptm_params_r13_s() +{ + scptm_parallel_reception_r13_present = false; + scptm_scell_r13_present = false; + scptm_non_serving_cell_r13_present = false; + scptm_async_dc_r13_present = false; +} +SRSASN_CODE scptm_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scptm_parallel_reception_r13_present, 1)); + HANDLE_CODE(bref.pack(scptm_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(scptm_non_serving_cell_r13_present, 1)); + HANDLE_CODE(bref.pack(scptm_async_dc_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scptm_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scptm_parallel_reception_r13_present, 1)); + HANDLE_CODE(bref.unpack(scptm_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(scptm_non_serving_cell_r13_present, 1)); + HANDLE_CODE(bref.unpack(scptm_async_dc_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void scptm_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scptm_parallel_reception_r13_present) { + j.write_str("scptm-ParallelReception-r13", "supported"); + } + if (scptm_scell_r13_present) { + j.write_str("scptm-SCell-r13", "supported"); + } + if (scptm_non_serving_cell_r13_present) { + j.write_str("scptm-NonServingCell-r13", "supported"); + } + if (scptm_async_dc_r13_present) { + j.write_str("scptm-AsyncDC-r13", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1340-IEs ::= SEQUENCE +ue_eutra_cap_v1340_ies_s::ue_eutra_cap_v1340_ies_s() +{ + ue_category_ul_v1340_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1340_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_ul_v1340_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_ul_v1340_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_ul_v1340, (uint8_t)15, (uint8_t)15)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1340_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_ul_v1340_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_ul_v1340_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_ul_v1340, bref, (uint8_t)15, (uint8_t)15)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1340_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_ul_v1340_present) { + j.write_int("ue-CategoryUL-v1340", ue_category_ul_v1340); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1390-IEs ::= SEQUENCE +ue_eutra_cap_v1390_ies_s::ue_eutra_cap_v1390_ies_s() +{ + rf_params_v1390_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1390_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v1390_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v1390_present) { + HANDLE_CODE(rf_params_v1390.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1390_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v1390_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v1390_present) { + HANDLE_CODE(rf_params_v1390.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1390_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v1390_present) { + j.write_fieldname("rf-Parameters-v1390"); + rf_params_v1390.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1380 ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1380_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ce_params_v1380.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1380_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(ce_params_v1380.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1380_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ce-Parameters-v1380"); + ce_params_v1380.to_json(j); + j.end_obj(); +} + +// CE-Parameters-v1320 ::= SEQUENCE +ce_params_v1320_s::ce_params_v1320_s() +{ + intra_freq_a3_ce_mode_a_r13_present = false; + intra_freq_a3_ce_mode_b_r13_present = false; + intra_freq_ho_ce_mode_a_r13_present = false; + intra_freq_ho_ce_mode_b_r13_present = false; +} +SRSASN_CODE ce_params_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(intra_freq_a3_ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_a3_ce_mode_b_r13_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_ho_ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_ho_ce_mode_b_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ce_params_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(intra_freq_a3_ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_a3_ce_mode_b_r13_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_ho_ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_ho_ce_mode_b_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void ce_params_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (intra_freq_a3_ce_mode_a_r13_present) { + j.write_str("intraFreqA3-CE-ModeA-r13", "supported"); + } + if (intra_freq_a3_ce_mode_b_r13_present) { + j.write_str("intraFreqA3-CE-ModeB-r13", "supported"); + } + if (intra_freq_ho_ce_mode_a_r13_present) { + j.write_str("intraFreqHO-CE-ModeA-r13", "supported"); + } + if (intra_freq_ho_ce_mode_b_r13_present) { + j.write_str("intraFreqHO-CE-ModeB-r13", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1310 ::= SEQUENCE +phy_layer_params_v1310_s::phy_layer_params_v1310_s() +{ + aperiodic_csi_report_r13_present = false; + codebook_harq_ack_r13_present = false; + cross_carrier_sched_b5_c_r13_present = false; + fdd_harq_timing_tdd_r13_present = false; + max_num_updated_csi_proc_r13_present = false; + pucch_format4_r13_present = false; + pucch_format5_r13_present = false; + pucch_scell_r13_present = false; + spatial_bundling_harq_ack_r13_present = false; + supported_blind_decoding_r13_present = false; + uci_pusch_ext_r13_present = false; + crs_interf_mitigation_tm10_r13_present = false; + pdsch_collision_handling_r13_present = false; +} +SRSASN_CODE phy_layer_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(aperiodic_csi_report_r13_present, 1)); + HANDLE_CODE(bref.pack(codebook_harq_ack_r13_present, 1)); + HANDLE_CODE(bref.pack(cross_carrier_sched_b5_c_r13_present, 1)); + HANDLE_CODE(bref.pack(fdd_harq_timing_tdd_r13_present, 1)); + HANDLE_CODE(bref.pack(max_num_updated_csi_proc_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_format4_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_format5_r13_present, 1)); + HANDLE_CODE(bref.pack(pucch_scell_r13_present, 1)); + HANDLE_CODE(bref.pack(spatial_bundling_harq_ack_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_blind_decoding_r13_present, 1)); + HANDLE_CODE(bref.pack(uci_pusch_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(crs_interf_mitigation_tm10_r13_present, 1)); + HANDLE_CODE(bref.pack(pdsch_collision_handling_r13_present, 1)); + + if (aperiodic_csi_report_r13_present) { + HANDLE_CODE(aperiodic_csi_report_r13.pack(bref)); + } + if (codebook_harq_ack_r13_present) { + HANDLE_CODE(codebook_harq_ack_r13.pack(bref)); + } + if (max_num_updated_csi_proc_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, max_num_updated_csi_proc_r13, (uint8_t)5, (uint8_t)32)); + } + if (supported_blind_decoding_r13_present) { + HANDLE_CODE(bref.pack(supported_blind_decoding_r13.max_num_decoding_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_blind_decoding_r13.pdcch_candidate_reductions_r13_present, 1)); + HANDLE_CODE(bref.pack(supported_blind_decoding_r13.skip_monitoring_dci_format0_minus1_a_r13_present, 1)); + if (supported_blind_decoding_r13.max_num_decoding_r13_present) { + HANDLE_CODE( + pack_unalign_integer(bref, supported_blind_decoding_r13.max_num_decoding_r13, (uint8_t)1, (uint8_t)32)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(aperiodic_csi_report_r13_present, 1)); + HANDLE_CODE(bref.unpack(codebook_harq_ack_r13_present, 1)); + HANDLE_CODE(bref.unpack(cross_carrier_sched_b5_c_r13_present, 1)); + HANDLE_CODE(bref.unpack(fdd_harq_timing_tdd_r13_present, 1)); + HANDLE_CODE(bref.unpack(max_num_updated_csi_proc_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_format4_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_format5_r13_present, 1)); + HANDLE_CODE(bref.unpack(pucch_scell_r13_present, 1)); + HANDLE_CODE(bref.unpack(spatial_bundling_harq_ack_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_blind_decoding_r13_present, 1)); + HANDLE_CODE(bref.unpack(uci_pusch_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(crs_interf_mitigation_tm10_r13_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_collision_handling_r13_present, 1)); + + if (aperiodic_csi_report_r13_present) { + HANDLE_CODE(aperiodic_csi_report_r13.unpack(bref)); + } + if (codebook_harq_ack_r13_present) { + HANDLE_CODE(codebook_harq_ack_r13.unpack(bref)); + } + if (max_num_updated_csi_proc_r13_present) { + HANDLE_CODE(unpack_unalign_integer(max_num_updated_csi_proc_r13, bref, (uint8_t)5, (uint8_t)32)); + } + if (supported_blind_decoding_r13_present) { + HANDLE_CODE(bref.unpack(supported_blind_decoding_r13.max_num_decoding_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_blind_decoding_r13.pdcch_candidate_reductions_r13_present, 1)); + HANDLE_CODE(bref.unpack(supported_blind_decoding_r13.skip_monitoring_dci_format0_minus1_a_r13_present, 1)); + if (supported_blind_decoding_r13.max_num_decoding_r13_present) { + HANDLE_CODE( + unpack_unalign_integer(supported_blind_decoding_r13.max_num_decoding_r13, bref, (uint8_t)1, (uint8_t)32)); + } + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (aperiodic_csi_report_r13_present) { + j.write_str("aperiodicCSI-Reporting-r13", aperiodic_csi_report_r13.to_string()); + } + if (codebook_harq_ack_r13_present) { + j.write_str("codebook-HARQ-ACK-r13", codebook_harq_ack_r13.to_string()); + } + if (cross_carrier_sched_b5_c_r13_present) { + j.write_str("crossCarrierScheduling-B5C-r13", "supported"); + } + if (fdd_harq_timing_tdd_r13_present) { + j.write_str("fdd-HARQ-TimingTDD-r13", "supported"); + } + if (max_num_updated_csi_proc_r13_present) { + j.write_int("maxNumberUpdatedCSI-Proc-r13", max_num_updated_csi_proc_r13); + } + if (pucch_format4_r13_present) { + j.write_str("pucch-Format4-r13", "supported"); + } + if (pucch_format5_r13_present) { + j.write_str("pucch-Format5-r13", "supported"); + } + if (pucch_scell_r13_present) { + j.write_str("pucch-SCell-r13", "supported"); + } + if (spatial_bundling_harq_ack_r13_present) { + j.write_str("spatialBundling-HARQ-ACK-r13", "supported"); + } + if (supported_blind_decoding_r13_present) { + j.write_fieldname("supportedBlindDecoding-r13"); + j.start_obj(); + if (supported_blind_decoding_r13.max_num_decoding_r13_present) { + j.write_int("maxNumberDecoding-r13", supported_blind_decoding_r13.max_num_decoding_r13); + } + if (supported_blind_decoding_r13.pdcch_candidate_reductions_r13_present) { + j.write_str("pdcch-CandidateReductions-r13", "supported"); + } + if (supported_blind_decoding_r13.skip_monitoring_dci_format0_minus1_a_r13_present) { + j.write_str("skipMonitoringDCI-Format0-1A-r13", "supported"); + } + j.end_obj(); + } + if (uci_pusch_ext_r13_present) { + j.write_str("uci-PUSCH-Ext-r13", "supported"); + } + if (crs_interf_mitigation_tm10_r13_present) { + j.write_str("crs-InterfMitigationTM10-r13", "supported"); + } + if (pdsch_collision_handling_r13_present) { + j.write_str("pdsch-CollisionHandling-r13", "supported"); + } + j.end_obj(); +} + +phy_layer_params_v1310_s::supported_blind_decoding_r13_s_::supported_blind_decoding_r13_s_() +{ + max_num_decoding_r13_present = false; + pdcch_candidate_reductions_r13_present = false; + skip_monitoring_dci_format0_minus1_a_r13_present = false; +} + +// UE-EUTRA-Capability-v1330-IEs ::= SEQUENCE +ue_eutra_cap_v1330_ies_s::ue_eutra_cap_v1330_ies_s() +{ + ue_category_dl_v1330_present = false; + phy_layer_params_v1330_present = false; + ue_ce_need_ul_gaps_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1330_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_dl_v1330_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1330_present, 1)); + HANDLE_CODE(bref.pack(ue_ce_need_ul_gaps_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1330_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_dl_v1330, (uint8_t)18, (uint8_t)19)); + } + if (phy_layer_params_v1330_present) { + HANDLE_CODE(phy_layer_params_v1330.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1330_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_dl_v1330_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1330_present, 1)); + HANDLE_CODE(bref.unpack(ue_ce_need_ul_gaps_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1330_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_dl_v1330, bref, (uint8_t)18, (uint8_t)19)); + } + if (phy_layer_params_v1330_present) { + HANDLE_CODE(phy_layer_params_v1330.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1330_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_dl_v1330_present) { + j.write_int("ue-CategoryDL-v1330", ue_category_dl_v1330); + } + if (phy_layer_params_v1330_present) { + j.write_fieldname("phyLayerParameters-v1330"); + phy_layer_params_v1330.to_json(j); + } + if (ue_ce_need_ul_gaps_r13_present) { + j.write_str("ue-CE-NeedULGaps-r13", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1380-IEs ::= SEQUENCE +ue_eutra_cap_v1380_ies_s::ue_eutra_cap_v1380_ies_s() +{ + rf_params_v1380_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1380_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v1380_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v1380_present) { + HANDLE_CODE(rf_params_v1380.pack(bref)); + } + HANDLE_CODE(ce_params_v1380.pack(bref)); + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1380.pack(bref)); + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1380.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1380_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v1380_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v1380_present) { + HANDLE_CODE(rf_params_v1380.unpack(bref)); + } + HANDLE_CODE(ce_params_v1380.unpack(bref)); + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1380.unpack(bref)); + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1380.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1380_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v1380_present) { + j.write_fieldname("rf-Parameters-v1380"); + rf_params_v1380.to_json(j); + } + j.write_fieldname("ce-Parameters-v1380"); + ce_params_v1380.to_json(j); + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1380"); + fdd_add_ue_eutra_capabilities_v1380.to_json(j); + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1380"); + tdd_add_ue_eutra_capabilities_v1380.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1320 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1320_s::ue_eutra_cap_add_xdd_mode_v1320_s() +{ + phy_layer_params_v1320_present = false; + scptm_params_r13_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1320_present, 1)); + HANDLE_CODE(bref.pack(scptm_params_r13_present, 1)); + + if (phy_layer_params_v1320_present) { + HANDLE_CODE(phy_layer_params_v1320.pack(bref)); + } + if (scptm_params_r13_present) { + HANDLE_CODE(scptm_params_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1320_present, 1)); + HANDLE_CODE(bref.unpack(scptm_params_r13_present, 1)); + + if (phy_layer_params_v1320_present) { + HANDLE_CODE(phy_layer_params_v1320.unpack(bref)); + } + if (scptm_params_r13_present) { + HANDLE_CODE(scptm_params_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1320_present) { + j.write_fieldname("phyLayerParameters-v1320"); + phy_layer_params_v1320.to_json(j); + } + if (scptm_params_r13_present) { + j.write_fieldname("scptm-Parameters-r13"); + scptm_params_r13.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1370 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1370_s::ue_eutra_cap_add_xdd_mode_v1370_s() +{ + ce_params_v1370_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1370_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_params_v1370_present, 1)); + + if (ce_params_v1370_present) { + HANDLE_CODE(ce_params_v1370.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1370_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_params_v1370_present, 1)); + + if (ce_params_v1370_present) { + HANDLE_CODE(ce_params_v1370.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1370_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_params_v1370_present) { + j.write_fieldname("ce-Parameters-v1370"); + ce_params_v1370.to_json(j); + } + j.end_obj(); +} + +// CE-Parameters-r13 ::= SEQUENCE +ce_params_r13_s::ce_params_r13_s() +{ + ce_mode_a_r13_present = false; + ce_mode_b_r13_present = false; +} +SRSASN_CODE ce_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.pack(ce_mode_b_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ce_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_mode_a_r13_present, 1)); + HANDLE_CODE(bref.unpack(ce_mode_b_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void ce_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_mode_a_r13_present) { + j.write_str("ce-ModeA-r13", "supported"); + } + if (ce_mode_b_r13_present) { + j.write_str("ce-ModeB-r13", "supported"); + } + j.end_obj(); +} + +// DC-Parameters-v1310 ::= SEQUENCE +dc_params_v1310_s::dc_params_v1310_s() +{ + pdcp_transfer_split_ul_r13_present = false; + ue_sstd_meas_r13_present = false; +} +SRSASN_CODE dc_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdcp_transfer_split_ul_r13_present, 1)); + HANDLE_CODE(bref.pack(ue_sstd_meas_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dc_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pdcp_transfer_split_ul_r13_present, 1)); + HANDLE_CODE(bref.unpack(ue_sstd_meas_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void dc_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdcp_transfer_split_ul_r13_present) { + j.write_str("pdcp-TransferSplitUL-r13", "supported"); + } + if (ue_sstd_meas_r13_present) { + j.write_str("ue-SSTD-Meas-r13", "supported"); + } + j.end_obj(); +} + +// LAA-Parameters-r13 ::= SEQUENCE +laa_params_r13_s::laa_params_r13_s() +{ + cross_carrier_sched_laa_dl_r13_present = false; + csi_rs_drs_rrm_meass_laa_r13_present = false; + dl_laa_r13_present = false; + ending_dw_pts_r13_present = false; + second_slot_start_position_r13_present = false; + tm9_laa_r13_present = false; + tm10_laa_r13_present = false; +} +SRSASN_CODE laa_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cross_carrier_sched_laa_dl_r13_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_drs_rrm_meass_laa_r13_present, 1)); + HANDLE_CODE(bref.pack(dl_laa_r13_present, 1)); + HANDLE_CODE(bref.pack(ending_dw_pts_r13_present, 1)); + HANDLE_CODE(bref.pack(second_slot_start_position_r13_present, 1)); + HANDLE_CODE(bref.pack(tm9_laa_r13_present, 1)); + HANDLE_CODE(bref.pack(tm10_laa_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE laa_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cross_carrier_sched_laa_dl_r13_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_drs_rrm_meass_laa_r13_present, 1)); + HANDLE_CODE(bref.unpack(dl_laa_r13_present, 1)); + HANDLE_CODE(bref.unpack(ending_dw_pts_r13_present, 1)); + HANDLE_CODE(bref.unpack(second_slot_start_position_r13_present, 1)); + HANDLE_CODE(bref.unpack(tm9_laa_r13_present, 1)); + HANDLE_CODE(bref.unpack(tm10_laa_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void laa_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cross_carrier_sched_laa_dl_r13_present) { + j.write_str("crossCarrierSchedulingLAA-DL-r13", "supported"); + } + if (csi_rs_drs_rrm_meass_laa_r13_present) { + j.write_str("csi-RS-DRS-RRM-MeasurementsLAA-r13", "supported"); + } + if (dl_laa_r13_present) { + j.write_str("downlinkLAA-r13", "supported"); + } + if (ending_dw_pts_r13_present) { + j.write_str("endingDwPTS-r13", "supported"); + } + if (second_slot_start_position_r13_present) { + j.write_str("secondSlotStartingPosition-r13", "supported"); + } + if (tm9_laa_r13_present) { + j.write_str("tm9-LAA-r13", "supported"); + } + if (tm10_laa_r13_present) { + j.write_str("tm10-LAA-r13", "supported"); + } + j.end_obj(); +} + +// LWA-Parameters-r13 ::= SEQUENCE +lwa_params_r13_s::lwa_params_r13_s() +{ + lwa_r13_present = false; + lwa_split_bearer_r13_present = false; + wlan_mac_address_r13_present = false; + lwa_buffer_size_r13_present = false; +} +SRSASN_CODE lwa_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(lwa_r13_present, 1)); + HANDLE_CODE(bref.pack(lwa_split_bearer_r13_present, 1)); + HANDLE_CODE(bref.pack(wlan_mac_address_r13_present, 1)); + HANDLE_CODE(bref.pack(lwa_buffer_size_r13_present, 1)); + + if (wlan_mac_address_r13_present) { + HANDLE_CODE(wlan_mac_address_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE lwa_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(lwa_r13_present, 1)); + HANDLE_CODE(bref.unpack(lwa_split_bearer_r13_present, 1)); + HANDLE_CODE(bref.unpack(wlan_mac_address_r13_present, 1)); + HANDLE_CODE(bref.unpack(lwa_buffer_size_r13_present, 1)); + + if (wlan_mac_address_r13_present) { + HANDLE_CODE(wlan_mac_address_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void lwa_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwa_r13_present) { + j.write_str("lwa-r13", "supported"); + } + if (lwa_split_bearer_r13_present) { + j.write_str("lwa-SplitBearer-r13", "supported"); + } + if (wlan_mac_address_r13_present) { + j.write_str("wlan-MAC-Address-r13", wlan_mac_address_r13.to_string()); + } + if (lwa_buffer_size_r13_present) { + j.write_str("lwa-BufferSize-r13", "supported"); + } + j.end_obj(); +} + +// LWIP-Parameters-r13 ::= SEQUENCE +lwip_params_r13_s::lwip_params_r13_s() +{ + lwip_r13_present = false; +} +SRSASN_CODE lwip_params_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(lwip_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE lwip_params_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(lwip_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void lwip_params_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lwip_r13_present) { + j.write_str("lwip-r13", "supported"); + } + j.end_obj(); +} + +// MAC-Parameters-v1310 ::= SEQUENCE +mac_params_v1310_s::mac_params_v1310_s() +{ + extended_mac_len_field_r13_present = false; + extended_long_drx_r13_present = false; +} +SRSASN_CODE mac_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(extended_mac_len_field_r13_present, 1)); + HANDLE_CODE(bref.pack(extended_long_drx_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(extended_mac_len_field_r13_present, 1)); + HANDLE_CODE(bref.unpack(extended_long_drx_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void mac_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (extended_mac_len_field_r13_present) { + j.write_str("extendedMAC-LengthField-r13", "supported"); + } + if (extended_long_drx_r13_present) { + j.write_str("extendedLongDRX-r13", "supported"); + } + j.end_obj(); +} + +// MeasParameters-v1310 ::= SEQUENCE +meas_params_v1310_s::meas_params_v1310_s() +{ + rs_sinr_meas_r13_present = false; + white_cell_list_r13_present = false; + extended_max_obj_id_r13_present = false; + ul_pdcp_delay_r13_present = false; + extended_freq_priorities_r13_present = false; + multi_band_info_report_r13_present = false; + rssi_and_ch_occupancy_report_r13_present = false; +} +SRSASN_CODE meas_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rs_sinr_meas_r13_present, 1)); + HANDLE_CODE(bref.pack(white_cell_list_r13_present, 1)); + HANDLE_CODE(bref.pack(extended_max_obj_id_r13_present, 1)); + HANDLE_CODE(bref.pack(ul_pdcp_delay_r13_present, 1)); + HANDLE_CODE(bref.pack(extended_freq_priorities_r13_present, 1)); + HANDLE_CODE(bref.pack(multi_band_info_report_r13_present, 1)); + HANDLE_CODE(bref.pack(rssi_and_ch_occupancy_report_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rs_sinr_meas_r13_present, 1)); + HANDLE_CODE(bref.unpack(white_cell_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(extended_max_obj_id_r13_present, 1)); + HANDLE_CODE(bref.unpack(ul_pdcp_delay_r13_present, 1)); + HANDLE_CODE(bref.unpack(extended_freq_priorities_r13_present, 1)); + HANDLE_CODE(bref.unpack(multi_band_info_report_r13_present, 1)); + HANDLE_CODE(bref.unpack(rssi_and_ch_occupancy_report_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rs_sinr_meas_r13_present) { + j.write_str("rs-SINR-Meas-r13", "supported"); + } + if (white_cell_list_r13_present) { + j.write_str("whiteCellList-r13", "supported"); + } + if (extended_max_obj_id_r13_present) { + j.write_str("extendedMaxObjectId-r13", "supported"); + } + if (ul_pdcp_delay_r13_present) { + j.write_str("ul-PDCP-Delay-r13", "supported"); + } + if (extended_freq_priorities_r13_present) { + j.write_str("extendedFreqPriorities-r13", "supported"); + } + if (multi_band_info_report_r13_present) { + j.write_str("multiBandInfoReport-r13", "supported"); + } + if (rssi_and_ch_occupancy_report_r13_present) { + j.write_str("rssi-AndChannelOccupancyReporting-r13", "supported"); + } + j.end_obj(); +} + +// PDCP-Parameters-v1310 ::= SEQUENCE +pdcp_params_v1310_s::pdcp_params_v1310_s() +{ + pdcp_sn_ext_minus18bits_r13_present = false; +} +SRSASN_CODE pdcp_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdcp_sn_ext_minus18bits_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pdcp_sn_ext_minus18bits_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void pdcp_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdcp_sn_ext_minus18bits_r13_present) { + j.write_str("pdcp-SN-Extension-18bits-r13", "supported"); + } + j.end_obj(); +} + +// RLC-Parameters-v1310 ::= SEQUENCE +rlc_params_v1310_s::rlc_params_v1310_s() +{ + extended_rlc_sn_so_field_r13_present = false; +} +SRSASN_CODE rlc_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(extended_rlc_sn_so_field_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(extended_rlc_sn_so_field_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void rlc_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (extended_rlc_sn_so_field_r13_present) { + j.write_str("extendedRLC-SN-SO-Field-r13", "supported"); + } + j.end_obj(); +} + +// SL-Parameters-v1310 ::= SEQUENCE +sl_params_v1310_s::sl_params_v1310_s() +{ + disc_sys_info_report_r13_present = false; + comm_multiple_tx_r13_present = false; + disc_inter_freq_tx_r13_present = false; + disc_periodic_slss_r13_present = false; +} +SRSASN_CODE sl_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(disc_sys_info_report_r13_present, 1)); + HANDLE_CODE(bref.pack(comm_multiple_tx_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_inter_freq_tx_r13_present, 1)); + HANDLE_CODE(bref.pack(disc_periodic_slss_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(disc_sys_info_report_r13_present, 1)); + HANDLE_CODE(bref.unpack(comm_multiple_tx_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_inter_freq_tx_r13_present, 1)); + HANDLE_CODE(bref.unpack(disc_periodic_slss_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void sl_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (disc_sys_info_report_r13_present) { + j.write_str("discSysInfoReporting-r13", "supported"); + } + if (comm_multiple_tx_r13_present) { + j.write_str("commMultipleTx-r13", "supported"); + } + if (disc_inter_freq_tx_r13_present) { + j.write_str("discInterFreqTx-r13", "supported"); + } + if (disc_periodic_slss_r13_present) { + j.write_str("discPeriodicSLSS-r13", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1320-IEs ::= SEQUENCE +ue_eutra_cap_v1320_ies_s::ue_eutra_cap_v1320_ies_s() +{ + ce_params_v1320_present = false; + phy_layer_params_v1320_present = false; + rf_params_v1320_present = false; + fdd_add_ue_eutra_capabilities_v1320_present = false; + tdd_add_ue_eutra_capabilities_v1320_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1320_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_params_v1320_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1320_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1320_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1320_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1320_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ce_params_v1320_present) { + HANDLE_CODE(ce_params_v1320.pack(bref)); + } + if (phy_layer_params_v1320_present) { + HANDLE_CODE(phy_layer_params_v1320.pack(bref)); + } + if (rf_params_v1320_present) { + HANDLE_CODE(rf_params_v1320.pack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1320_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1320.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1320_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1320.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1320_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_params_v1320_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1320_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1320_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1320_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1320_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ce_params_v1320_present) { + HANDLE_CODE(ce_params_v1320.unpack(bref)); + } + if (phy_layer_params_v1320_present) { + HANDLE_CODE(phy_layer_params_v1320.unpack(bref)); + } + if (rf_params_v1320_present) { + HANDLE_CODE(rf_params_v1320.unpack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1320_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1320.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1320_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1320.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1320_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_params_v1320_present) { + j.write_fieldname("ce-Parameters-v1320"); + ce_params_v1320.to_json(j); + } + if (phy_layer_params_v1320_present) { + j.write_fieldname("phyLayerParameters-v1320"); + phy_layer_params_v1320.to_json(j); + } + if (rf_params_v1320_present) { + j.write_fieldname("rf-Parameters-v1320"); + rf_params_v1320.to_json(j); + } + if (fdd_add_ue_eutra_capabilities_v1320_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1320"); + fdd_add_ue_eutra_capabilities_v1320.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1320_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1320"); + tdd_add_ue_eutra_capabilities_v1320.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1370-IEs ::= SEQUENCE +ue_eutra_cap_v1370_ies_s::ue_eutra_cap_v1370_ies_s() +{ + ce_params_v1370_present = false; + fdd_add_ue_eutra_capabilities_v1370_present = false; + tdd_add_ue_eutra_capabilities_v1370_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1370_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ce_params_v1370_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1370_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1370_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ce_params_v1370_present) { + HANDLE_CODE(ce_params_v1370.pack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1370_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1370.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1370_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1370.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1370_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ce_params_v1370_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1370_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1370_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ce_params_v1370_present) { + HANDLE_CODE(ce_params_v1370.unpack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1370_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1370.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1370_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1370.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1370_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ce_params_v1370_present) { + j.write_fieldname("ce-Parameters-v1370"); + ce_params_v1370.to_json(j); + } + if (fdd_add_ue_eutra_capabilities_v1370_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1370"); + fdd_add_ue_eutra_capabilities_v1370.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1370_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1370"); + tdd_add_ue_eutra_capabilities_v1370.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1310 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1310_s::ue_eutra_cap_add_xdd_mode_v1310_s() +{ + phy_layer_params_v1310_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1310_present, 1)); + + if (phy_layer_params_v1310_present) { + HANDLE_CODE(phy_layer_params_v1310.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1310_present, 1)); + + if (phy_layer_params_v1310_present) { + HANDLE_CODE(phy_layer_params_v1310.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1310_present) { + j.write_fieldname("phyLayerParameters-v1310"); + phy_layer_params_v1310.to_json(j); + } + j.end_obj(); +} + +// WLAN-IW-Parameters-v1310 ::= SEQUENCE +wlan_iw_params_v1310_s::wlan_iw_params_v1310_s() +{ + rclwi_r13_present = false; +} +SRSASN_CODE wlan_iw_params_v1310_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rclwi_r13_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_iw_params_v1310_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rclwi_r13_present, 1)); + + return SRSASN_SUCCESS; +} +void wlan_iw_params_v1310_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rclwi_r13_present) { + j.write_str("rclwi-r13", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1280 ::= SEQUENCE +phy_layer_params_v1280_s::phy_layer_params_v1280_s() +{ + alternative_tbs_indices_r12_present = false; +} +SRSASN_CODE phy_layer_params_v1280_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(alternative_tbs_indices_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1280_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(alternative_tbs_indices_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1280_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (alternative_tbs_indices_r12_present) { + j.write_str("alternativeTBS-Indices-r12", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v12b0 ::= SEQUENCE +rf_params_v12b0_s::rf_params_v12b0_s() +{ + max_layers_mimo_ind_r12_present = false; +} +SRSASN_CODE rf_params_v12b0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_layers_mimo_ind_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v12b0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_layers_mimo_ind_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void rf_params_v12b0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (max_layers_mimo_ind_r12_present) { + j.write_str("maxLayersMIMO-Indication-r12", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v12x0-IEs ::= SEQUENCE +ue_eutra_cap_v12x0_ies_s::ue_eutra_cap_v12x0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v12x0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v12x0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v12x0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1310-IEs ::= SEQUENCE +ue_eutra_cap_v1310_ies_s::ue_eutra_cap_v1310_ies_s() +{ + ue_category_dl_v1310_present = false; + ue_category_ul_v1310_present = false; + mac_params_v1310_present = false; + phy_layer_params_v1310_present = false; + rf_params_v1310_present = false; + meas_params_v1310_present = false; + dc_params_v1310_present = false; + sl_params_v1310_present = false; + scptm_params_r13_present = false; + ce_params_r13_present = false; + laa_params_r13_present = false; + lwa_params_r13_present = false; + fdd_add_ue_eutra_capabilities_v1310_present = false; + tdd_add_ue_eutra_capabilities_v1310_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_dl_v1310_present, 1)); + HANDLE_CODE(bref.pack(ue_category_ul_v1310_present, 1)); + HANDLE_CODE(bref.pack(mac_params_v1310_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1310_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1310_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v1310_present, 1)); + HANDLE_CODE(bref.pack(dc_params_v1310_present, 1)); + HANDLE_CODE(bref.pack(sl_params_v1310_present, 1)); + HANDLE_CODE(bref.pack(scptm_params_r13_present, 1)); + HANDLE_CODE(bref.pack(ce_params_r13_present, 1)); + HANDLE_CODE(bref.pack(laa_params_r13_present, 1)); + HANDLE_CODE(bref.pack(lwa_params_r13_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1310_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1310_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1310_present) { + HANDLE_CODE(pack_enum(bref, ue_category_dl_v1310)); + } + if (ue_category_ul_v1310_present) { + HANDLE_CODE(pack_enum(bref, ue_category_ul_v1310)); + } + HANDLE_CODE(pdcp_params_v1310.pack(bref)); + HANDLE_CODE(rlc_params_v1310.pack(bref)); + if (mac_params_v1310_present) { + HANDLE_CODE(mac_params_v1310.pack(bref)); + } + if (phy_layer_params_v1310_present) { + HANDLE_CODE(phy_layer_params_v1310.pack(bref)); + } + if (rf_params_v1310_present) { + HANDLE_CODE(rf_params_v1310.pack(bref)); + } + if (meas_params_v1310_present) { + HANDLE_CODE(meas_params_v1310.pack(bref)); + } + if (dc_params_v1310_present) { + HANDLE_CODE(dc_params_v1310.pack(bref)); + } + if (sl_params_v1310_present) { + HANDLE_CODE(sl_params_v1310.pack(bref)); + } + if (scptm_params_r13_present) { + HANDLE_CODE(scptm_params_r13.pack(bref)); + } + if (ce_params_r13_present) { + HANDLE_CODE(ce_params_r13.pack(bref)); + } + HANDLE_CODE(inter_rat_params_wlan_r13.pack(bref)); + if (laa_params_r13_present) { + HANDLE_CODE(laa_params_r13.pack(bref)); + } + if (lwa_params_r13_present) { + HANDLE_CODE(lwa_params_r13.pack(bref)); + } + HANDLE_CODE(wlan_iw_params_v1310.pack(bref)); + HANDLE_CODE(lwip_params_r13.pack(bref)); + if (fdd_add_ue_eutra_capabilities_v1310_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1310.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1310_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1310.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_dl_v1310_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_ul_v1310_present, 1)); + HANDLE_CODE(bref.unpack(mac_params_v1310_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1310_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1310_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v1310_present, 1)); + HANDLE_CODE(bref.unpack(dc_params_v1310_present, 1)); + HANDLE_CODE(bref.unpack(sl_params_v1310_present, 1)); + HANDLE_CODE(bref.unpack(scptm_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(ce_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(laa_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(lwa_params_r13_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1310_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1310_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1310_present) { + HANDLE_CODE(unpack_enum(ue_category_dl_v1310, bref)); + } + if (ue_category_ul_v1310_present) { + HANDLE_CODE(unpack_enum(ue_category_ul_v1310, bref)); + } + HANDLE_CODE(pdcp_params_v1310.unpack(bref)); + HANDLE_CODE(rlc_params_v1310.unpack(bref)); + if (mac_params_v1310_present) { + HANDLE_CODE(mac_params_v1310.unpack(bref)); + } + if (phy_layer_params_v1310_present) { + HANDLE_CODE(phy_layer_params_v1310.unpack(bref)); + } + if (rf_params_v1310_present) { + HANDLE_CODE(rf_params_v1310.unpack(bref)); + } + if (meas_params_v1310_present) { + HANDLE_CODE(meas_params_v1310.unpack(bref)); + } + if (dc_params_v1310_present) { + HANDLE_CODE(dc_params_v1310.unpack(bref)); + } + if (sl_params_v1310_present) { + HANDLE_CODE(sl_params_v1310.unpack(bref)); + } + if (scptm_params_r13_present) { + HANDLE_CODE(scptm_params_r13.unpack(bref)); + } + if (ce_params_r13_present) { + HANDLE_CODE(ce_params_r13.unpack(bref)); + } + HANDLE_CODE(inter_rat_params_wlan_r13.unpack(bref)); + if (laa_params_r13_present) { + HANDLE_CODE(laa_params_r13.unpack(bref)); + } + if (lwa_params_r13_present) { + HANDLE_CODE(lwa_params_r13.unpack(bref)); + } + HANDLE_CODE(wlan_iw_params_v1310.unpack(bref)); + HANDLE_CODE(lwip_params_r13.unpack(bref)); + if (fdd_add_ue_eutra_capabilities_v1310_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1310.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1310_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1310.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_dl_v1310_present) { + j.write_str("ue-CategoryDL-v1310", ue_category_dl_v1310.to_string()); + } + if (ue_category_ul_v1310_present) { + j.write_str("ue-CategoryUL-v1310", ue_category_ul_v1310.to_string()); + } + j.write_fieldname("pdcp-Parameters-v1310"); + pdcp_params_v1310.to_json(j); + j.write_fieldname("rlc-Parameters-v1310"); + rlc_params_v1310.to_json(j); + if (mac_params_v1310_present) { + j.write_fieldname("mac-Parameters-v1310"); + mac_params_v1310.to_json(j); + } + if (phy_layer_params_v1310_present) { + j.write_fieldname("phyLayerParameters-v1310"); + phy_layer_params_v1310.to_json(j); + } + if (rf_params_v1310_present) { + j.write_fieldname("rf-Parameters-v1310"); + rf_params_v1310.to_json(j); + } + if (meas_params_v1310_present) { + j.write_fieldname("measParameters-v1310"); + meas_params_v1310.to_json(j); + } + if (dc_params_v1310_present) { + j.write_fieldname("dc-Parameters-v1310"); + dc_params_v1310.to_json(j); + } + if (sl_params_v1310_present) { + j.write_fieldname("sl-Parameters-v1310"); + sl_params_v1310.to_json(j); + } + if (scptm_params_r13_present) { + j.write_fieldname("scptm-Parameters-r13"); + scptm_params_r13.to_json(j); + } + if (ce_params_r13_present) { + j.write_fieldname("ce-Parameters-r13"); + ce_params_r13.to_json(j); + } + j.write_fieldname("interRAT-ParametersWLAN-r13"); + inter_rat_params_wlan_r13.to_json(j); + if (laa_params_r13_present) { + j.write_fieldname("laa-Parameters-r13"); + laa_params_r13.to_json(j); + } + if (lwa_params_r13_present) { + j.write_fieldname("lwa-Parameters-r13"); + lwa_params_r13.to_json(j); + } + j.write_fieldname("wlan-IW-Parameters-v1310"); + wlan_iw_params_v1310.to_json(j); + j.write_fieldname("lwip-Parameters-r13"); + lwip_params_r13.to_json(j); + if (fdd_add_ue_eutra_capabilities_v1310_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1310"); + fdd_add_ue_eutra_capabilities_v1310.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1310_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1310"); + tdd_add_ue_eutra_capabilities_v1310.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1280-IEs ::= SEQUENCE +ue_eutra_cap_v1280_ies_s::ue_eutra_cap_v1280_ies_s() +{ + phy_layer_params_v1280_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1280_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1280_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1280_present) { + HANDLE_CODE(phy_layer_params_v1280.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1280_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1280_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1280_present) { + HANDLE_CODE(phy_layer_params_v1280.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1280_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1280_present) { + j.write_fieldname("phyLayerParameters-v1280"); + phy_layer_params_v1280.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v12b0-IEs ::= SEQUENCE +ue_eutra_cap_v12b0_ies_s::ue_eutra_cap_v12b0_ies_s() +{ + rf_params_v12b0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v12b0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v12b0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v12b0_present) { + HANDLE_CODE(rf_params_v12b0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v12b0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v12b0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v12b0_present) { + HANDLE_CODE(rf_params_v12b0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v12b0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v12b0_present) { + j.write_fieldname("rf-Parameters-v12b0"); + rf_params_v12b0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MeasParameters-v1250 ::= SEQUENCE +meas_params_v1250_s::meas_params_v1250_s() +{ + timer_t312_r12_present = false; + alternative_time_to_trigger_r12_present = false; + inc_mon_eutra_r12_present = false; + inc_mon_utra_r12_present = false; + extended_max_meas_id_r12_present = false; + extended_rsrq_lower_range_r12_present = false; + rsrq_on_all_symbols_r12_present = false; + crs_discovery_signals_meas_r12_present = false; + csi_rs_discovery_signals_meas_r12_present = false; +} +SRSASN_CODE meas_params_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(timer_t312_r12_present, 1)); + HANDLE_CODE(bref.pack(alternative_time_to_trigger_r12_present, 1)); + HANDLE_CODE(bref.pack(inc_mon_eutra_r12_present, 1)); + HANDLE_CODE(bref.pack(inc_mon_utra_r12_present, 1)); + HANDLE_CODE(bref.pack(extended_max_meas_id_r12_present, 1)); + HANDLE_CODE(bref.pack(extended_rsrq_lower_range_r12_present, 1)); + HANDLE_CODE(bref.pack(rsrq_on_all_symbols_r12_present, 1)); + HANDLE_CODE(bref.pack(crs_discovery_signals_meas_r12_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_discovery_signals_meas_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(timer_t312_r12_present, 1)); + HANDLE_CODE(bref.unpack(alternative_time_to_trigger_r12_present, 1)); + HANDLE_CODE(bref.unpack(inc_mon_eutra_r12_present, 1)); + HANDLE_CODE(bref.unpack(inc_mon_utra_r12_present, 1)); + HANDLE_CODE(bref.unpack(extended_max_meas_id_r12_present, 1)); + HANDLE_CODE(bref.unpack(extended_rsrq_lower_range_r12_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_on_all_symbols_r12_present, 1)); + HANDLE_CODE(bref.unpack(crs_discovery_signals_meas_r12_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_discovery_signals_meas_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_params_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (timer_t312_r12_present) { + j.write_str("timerT312-r12", "supported"); + } + if (alternative_time_to_trigger_r12_present) { + j.write_str("alternativeTimeToTrigger-r12", "supported"); + } + if (inc_mon_eutra_r12_present) { + j.write_str("incMonEUTRA-r12", "supported"); + } + if (inc_mon_utra_r12_present) { + j.write_str("incMonUTRA-r12", "supported"); + } + if (extended_max_meas_id_r12_present) { + j.write_str("extendedMaxMeasId-r12", "supported"); + } + if (extended_rsrq_lower_range_r12_present) { + j.write_str("extendedRSRQ-LowerRange-r12", "supported"); + } + if (rsrq_on_all_symbols_r12_present) { + j.write_str("rsrq-OnAllSymbols-r12", "supported"); + } + if (crs_discovery_signals_meas_r12_present) { + j.write_str("crs-DiscoverySignalsMeas-r12", "supported"); + } + if (csi_rs_discovery_signals_meas_r12_present) { + j.write_str("csi-RS-DiscoverySignalsMeas-r12", "supported"); + } + j.end_obj(); +} + +// Other-Parameters-v11d0 ::= SEQUENCE +other_params_v11d0_s::other_params_v11d0_s() +{ + in_dev_coex_ind_ul_ca_r11_present = false; +} +SRSASN_CODE other_params_v11d0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(in_dev_coex_ind_ul_ca_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_v11d0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(in_dev_coex_ind_ul_ca_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_v11d0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (in_dev_coex_ind_ul_ca_r11_present) { + j.write_str("inDeviceCoexInd-UL-CA-r11", "supported"); + } + j.end_obj(); +} + +// RF-Parameters-v10j0 ::= SEQUENCE +rf_params_v10j0_s::rf_params_v10j0_s() +{ + multi_ns_pmax_r10_present = false; +} +SRSASN_CODE rf_params_v10j0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(multi_ns_pmax_r10_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v10j0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(multi_ns_pmax_r10_present, 1)); + + return SRSASN_SUCCESS; +} +void rf_params_v10j0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (multi_ns_pmax_r10_present) { + j.write_str("multiNS-Pmax-r10", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v11x0-IEs ::= SEQUENCE +ue_eutra_cap_v11x0_ies_s::ue_eutra_cap_v11x0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v11x0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v11x0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v11x0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1270-IEs ::= SEQUENCE +ue_eutra_cap_v1270_ies_s::ue_eutra_cap_v1270_ies_s() +{ + rf_params_v1270_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1270_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v1270_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v1270_present) { + HANDLE_CODE(rf_params_v1270.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1270_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v1270_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v1270_present) { + HANDLE_CODE(rf_params_v1270.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1270_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v1270_present) { + j.write_fieldname("rf-Parameters-v1270"); + rf_params_v1270.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// DC-Parameters-r12 ::= SEQUENCE +dc_params_r12_s::dc_params_r12_s() +{ + drb_type_split_r12_present = false; + drb_type_scg_r12_present = false; +} +SRSASN_CODE dc_params_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drb_type_split_r12_present, 1)); + HANDLE_CODE(bref.pack(drb_type_scg_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dc_params_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drb_type_split_r12_present, 1)); + HANDLE_CODE(bref.unpack(drb_type_scg_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void dc_params_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drb_type_split_r12_present) { + j.write_str("drb-TypeSplit-r12", "supported"); + } + if (drb_type_scg_r12_present) { + j.write_str("drb-TypeSCG-r12", "supported"); + } + j.end_obj(); +} + +// MAC-Parameters-r12 ::= SEQUENCE +mac_params_r12_s::mac_params_r12_s() +{ + lc_ch_sr_prohibit_timer_r12_present = false; + long_drx_cmd_r12_present = false; +} +SRSASN_CODE mac_params_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(lc_ch_sr_prohibit_timer_r12_present, 1)); + HANDLE_CODE(bref.pack(long_drx_cmd_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mac_params_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(lc_ch_sr_prohibit_timer_r12_present, 1)); + HANDLE_CODE(bref.unpack(long_drx_cmd_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void mac_params_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (lc_ch_sr_prohibit_timer_r12_present) { + j.write_str("logicalChannelSR-ProhibitTimer-r12", "supported"); + } + if (long_drx_cmd_r12_present) { + j.write_str("longDRX-Command-r12", "supported"); + } + j.end_obj(); +} + +// MBMS-Parameters-v1250 ::= SEQUENCE +mbms_params_v1250_s::mbms_params_v1250_s() +{ + mbms_async_dc_r12_present = false; +} +SRSASN_CODE mbms_params_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbms_async_dc_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_params_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbms_async_dc_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void mbms_params_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbms_async_dc_r12_present) { + j.write_str("mbms-AsyncDC-r12", "supported"); + } + j.end_obj(); +} + +// RLC-Parameters-r12 ::= SEQUENCE +SRSASN_CODE rlc_params_r12_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE rlc_params_r12_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void rlc_params_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("extended-RLC-LI-Field-r12", "supported"); + j.end_obj(); +} + +// UE-BasedNetwPerfMeasParameters-v1250 ::= SEQUENCE +SRSASN_CODE ue_based_netw_perf_meas_params_v1250_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_based_netw_perf_meas_params_v1250_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void ue_based_netw_perf_meas_params_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("loggedMBSFNMeasurements-r12", "supported"); + j.end_obj(); +} + +// UE-EUTRA-Capability-v10j0-IEs ::= SEQUENCE +ue_eutra_cap_v10j0_ies_s::ue_eutra_cap_v10j0_ies_s() +{ + rf_params_v10j0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v10j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v10j0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v10j0_present) { + HANDLE_CODE(rf_params_v10j0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v10j0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v10j0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v10j0_present) { + HANDLE_CODE(rf_params_v10j0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v10j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v10j0_present) { + j.write_fieldname("rf-Parameters-v10j0"); + rf_params_v10j0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v11d0-IEs ::= SEQUENCE +ue_eutra_cap_v11d0_ies_s::ue_eutra_cap_v11d0_ies_s() +{ + rf_params_v11d0_present = false; + other_params_v11d0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v11d0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v11d0_present, 1)); + HANDLE_CODE(bref.pack(other_params_v11d0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v11d0_present) { + HANDLE_CODE(rf_params_v11d0.pack(bref)); + } + if (other_params_v11d0_present) { + HANDLE_CODE(other_params_v11d0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v11d0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v11d0_present, 1)); + HANDLE_CODE(bref.unpack(other_params_v11d0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v11d0_present) { + HANDLE_CODE(rf_params_v11d0.unpack(bref)); + } + if (other_params_v11d0_present) { + HANDLE_CODE(other_params_v11d0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v11d0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v11d0_present) { + j.write_fieldname("rf-Parameters-v11d0"); + rf_params_v11d0.to_json(j); + } + if (other_params_v11d0_present) { + j.write_fieldname("otherParameters-v11d0"); + other_params_v11d0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1260-IEs ::= SEQUENCE +ue_eutra_cap_v1260_ies_s::ue_eutra_cap_v1260_ies_s() +{ + ue_category_dl_v1260_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1260_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_dl_v1260_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1260_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_dl_v1260, (uint8_t)15, (uint8_t)16)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1260_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_dl_v1260_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_dl_v1260_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_dl_v1260, bref, (uint8_t)15, (uint8_t)16)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1260_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_dl_v1260_present) { + j.write_int("ue-CategoryDL-v1260", ue_category_dl_v1260); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1250 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1250_s::ue_eutra_cap_add_xdd_mode_v1250_s() +{ + phy_layer_params_v1250_present = false; + meas_params_v1250_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1250_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v1250_present, 1)); + + if (phy_layer_params_v1250_present) { + HANDLE_CODE(phy_layer_params_v1250.pack(bref)); + } + if (meas_params_v1250_present) { + HANDLE_CODE(meas_params_v1250.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1250_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v1250_present, 1)); + + if (phy_layer_params_v1250_present) { + HANDLE_CODE(phy_layer_params_v1250.unpack(bref)); + } + if (meas_params_v1250_present) { + HANDLE_CODE(meas_params_v1250.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1250_present) { + j.write_fieldname("phyLayerParameters-v1250"); + phy_layer_params_v1250.to_json(j); + } + if (meas_params_v1250_present) { + j.write_fieldname("measParameters-v1250"); + meas_params_v1250.to_json(j); + } + j.end_obj(); +} + +// WLAN-IW-Parameters-r12 ::= SEQUENCE +wlan_iw_params_r12_s::wlan_iw_params_r12_s() +{ + wlan_iw_ran_rules_r12_present = false; + wlan_iw_andsf_policies_r12_present = false; +} +SRSASN_CODE wlan_iw_params_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(wlan_iw_ran_rules_r12_present, 1)); + HANDLE_CODE(bref.pack(wlan_iw_andsf_policies_r12_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_iw_params_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(wlan_iw_ran_rules_r12_present, 1)); + HANDLE_CODE(bref.unpack(wlan_iw_andsf_policies_r12_present, 1)); + + return SRSASN_SUCCESS; +} +void wlan_iw_params_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_iw_ran_rules_r12_present) { + j.write_str("wlan-IW-RAN-Rules-r12", "supported"); + } + if (wlan_iw_andsf_policies_r12_present) { + j.write_str("wlan-IW-ANDSF-Policies-r12", "supported"); + } + j.end_obj(); +} + +// MBMS-Parameters-r11 ::= SEQUENCE +mbms_params_r11_s::mbms_params_r11_s() +{ + mbms_scell_r11_present = false; + mbms_non_serving_cell_r11_present = false; +} +SRSASN_CODE mbms_params_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbms_scell_r11_present, 1)); + HANDLE_CODE(bref.pack(mbms_non_serving_cell_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbms_params_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mbms_scell_r11_present, 1)); + HANDLE_CODE(bref.unpack(mbms_non_serving_cell_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void mbms_params_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbms_scell_r11_present) { + j.write_str("mbms-SCell-r11", "supported"); + } + if (mbms_non_serving_cell_r11_present) { + j.write_str("mbms-NonServingCell-r11", "supported"); + } + j.end_obj(); +} + +// MeasParameters-v11a0 ::= SEQUENCE +meas_params_v11a0_s::meas_params_v11a0_s() +{ + benefits_from_interruption_r11_present = false; +} +SRSASN_CODE meas_params_v11a0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(benefits_from_interruption_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v11a0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(benefits_from_interruption_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_params_v11a0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (benefits_from_interruption_r11_present) { + j.write_str("benefitsFromInterruption-r11", "true"); + } + j.end_obj(); +} + +// RF-Parameters-v10f0 ::= SEQUENCE +rf_params_v10f0_s::rf_params_v10f0_s() +{ + modified_mpr_behavior_r10_present = false; +} +SRSASN_CODE rf_params_v10f0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(modified_mpr_behavior_r10_present, 1)); + + if (modified_mpr_behavior_r10_present) { + HANDLE_CODE(modified_mpr_behavior_r10.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_v10f0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(modified_mpr_behavior_r10_present, 1)); + + if (modified_mpr_behavior_r10_present) { + HANDLE_CODE(modified_mpr_behavior_r10.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rf_params_v10f0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (modified_mpr_behavior_r10_present) { + j.write_str("modifiedMPR-Behavior-r10", modified_mpr_behavior_r10.to_string()); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v10i0-IEs ::= SEQUENCE +ue_eutra_cap_v10i0_ies_s::ue_eutra_cap_v10i0_ies_s() +{ + rf_params_v10i0_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v10i0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v10i0_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v10i0_present) { + HANDLE_CODE(rf_params_v10i0.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v10i0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v10i0_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v10i0_present) { + HANDLE_CODE(rf_params_v10i0.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_eutra_cap_v10i0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v10i0_present) { + j.write_fieldname("rf-Parameters-v10i0"); + rf_params_v10i0.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1250-IEs ::= SEQUENCE +ue_eutra_cap_v1250_ies_s::ue_eutra_cap_v1250_ies_s() +{ + phy_layer_params_v1250_present = false; + rf_params_v1250_present = false; + rlc_params_r12_present = false; + ue_based_netw_perf_meas_params_v1250_present = false; + ue_category_dl_r12_present = false; + ue_category_ul_r12_present = false; + wlan_iw_params_r12_present = false; + meas_params_v1250_present = false; + dc_params_r12_present = false; + mbms_params_v1250_present = false; + mac_params_r12_present = false; + fdd_add_ue_eutra_capabilities_v1250_present = false; + tdd_add_ue_eutra_capabilities_v1250_present = false; + sl_params_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1250_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1250_present, 1)); + HANDLE_CODE(bref.pack(rlc_params_r12_present, 1)); + HANDLE_CODE(bref.pack(ue_based_netw_perf_meas_params_v1250_present, 1)); + HANDLE_CODE(bref.pack(ue_category_dl_r12_present, 1)); + HANDLE_CODE(bref.pack(ue_category_ul_r12_present, 1)); + HANDLE_CODE(bref.pack(wlan_iw_params_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v1250_present, 1)); + HANDLE_CODE(bref.pack(dc_params_r12_present, 1)); + HANDLE_CODE(bref.pack(mbms_params_v1250_present, 1)); + HANDLE_CODE(bref.pack(mac_params_r12_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1250_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1250_present, 1)); + HANDLE_CODE(bref.pack(sl_params_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1250_present) { + HANDLE_CODE(phy_layer_params_v1250.pack(bref)); + } + if (rf_params_v1250_present) { + HANDLE_CODE(rf_params_v1250.pack(bref)); + } + if (rlc_params_r12_present) { + HANDLE_CODE(rlc_params_r12.pack(bref)); + } + if (ue_based_netw_perf_meas_params_v1250_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_v1250.pack(bref)); + } + if (ue_category_dl_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_dl_r12, (uint8_t)0, (uint8_t)14)); + } + if (ue_category_ul_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_ul_r12, (uint8_t)0, (uint8_t)13)); + } + if (wlan_iw_params_r12_present) { + HANDLE_CODE(wlan_iw_params_r12.pack(bref)); + } + if (meas_params_v1250_present) { + HANDLE_CODE(meas_params_v1250.pack(bref)); + } + if (dc_params_r12_present) { + HANDLE_CODE(dc_params_r12.pack(bref)); + } + if (mbms_params_v1250_present) { + HANDLE_CODE(mbms_params_v1250.pack(bref)); + } + if (mac_params_r12_present) { + HANDLE_CODE(mac_params_r12.pack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1250_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1250.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1250_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1250.pack(bref)); + } + if (sl_params_r12_present) { + HANDLE_CODE(sl_params_r12.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1250_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1250_present, 1)); + HANDLE_CODE(bref.unpack(rlc_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(ue_based_netw_perf_meas_params_v1250_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_dl_r12_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_ul_r12_present, 1)); + HANDLE_CODE(bref.unpack(wlan_iw_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v1250_present, 1)); + HANDLE_CODE(bref.unpack(dc_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(mbms_params_v1250_present, 1)); + HANDLE_CODE(bref.unpack(mac_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1250_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1250_present, 1)); + HANDLE_CODE(bref.unpack(sl_params_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1250_present) { + HANDLE_CODE(phy_layer_params_v1250.unpack(bref)); + } + if (rf_params_v1250_present) { + HANDLE_CODE(rf_params_v1250.unpack(bref)); + } + if (rlc_params_r12_present) { + HANDLE_CODE(rlc_params_r12.unpack(bref)); + } + if (ue_based_netw_perf_meas_params_v1250_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_v1250.unpack(bref)); + } + if (ue_category_dl_r12_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_dl_r12, bref, (uint8_t)0, (uint8_t)14)); + } + if (ue_category_ul_r12_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_ul_r12, bref, (uint8_t)0, (uint8_t)13)); + } + if (wlan_iw_params_r12_present) { + HANDLE_CODE(wlan_iw_params_r12.unpack(bref)); + } + if (meas_params_v1250_present) { + HANDLE_CODE(meas_params_v1250.unpack(bref)); + } + if (dc_params_r12_present) { + HANDLE_CODE(dc_params_r12.unpack(bref)); + } + if (mbms_params_v1250_present) { + HANDLE_CODE(mbms_params_v1250.unpack(bref)); + } + if (mac_params_r12_present) { + HANDLE_CODE(mac_params_r12.unpack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1250_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1250.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1250_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1250.unpack(bref)); + } + if (sl_params_r12_present) { + HANDLE_CODE(sl_params_r12.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1250_present) { + j.write_fieldname("phyLayerParameters-v1250"); + phy_layer_params_v1250.to_json(j); + } + if (rf_params_v1250_present) { + j.write_fieldname("rf-Parameters-v1250"); + rf_params_v1250.to_json(j); + } + if (rlc_params_r12_present) { + j.write_fieldname("rlc-Parameters-r12"); + rlc_params_r12.to_json(j); + } + if (ue_based_netw_perf_meas_params_v1250_present) { + j.write_fieldname("ue-BasedNetwPerfMeasParameters-v1250"); + ue_based_netw_perf_meas_params_v1250.to_json(j); + } + if (ue_category_dl_r12_present) { + j.write_int("ue-CategoryDL-r12", ue_category_dl_r12); + } + if (ue_category_ul_r12_present) { + j.write_int("ue-CategoryUL-r12", ue_category_ul_r12); + } + if (wlan_iw_params_r12_present) { + j.write_fieldname("wlan-IW-Parameters-r12"); + wlan_iw_params_r12.to_json(j); + } + if (meas_params_v1250_present) { + j.write_fieldname("measParameters-v1250"); + meas_params_v1250.to_json(j); + } + if (dc_params_r12_present) { + j.write_fieldname("dc-Parameters-r12"); + dc_params_r12.to_json(j); + } + if (mbms_params_v1250_present) { + j.write_fieldname("mbms-Parameters-v1250"); + mbms_params_v1250.to_json(j); + } + if (mac_params_r12_present) { + j.write_fieldname("mac-Parameters-r12"); + mac_params_r12.to_json(j); + } + if (fdd_add_ue_eutra_capabilities_v1250_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1250"); + fdd_add_ue_eutra_capabilities_v1250.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1250_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1250"); + tdd_add_ue_eutra_capabilities_v1250.to_json(j); + } + if (sl_params_r12_present) { + j.write_fieldname("sl-Parameters-r12"); + sl_params_r12.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// OTDOA-PositioningCapabilities-r10 ::= SEQUENCE +otdoa_positioning_capabilities_r10_s::otdoa_positioning_capabilities_r10_s() +{ + inter_freq_rstd_meas_r10_present = false; +} +SRSASN_CODE otdoa_positioning_capabilities_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_rstd_meas_r10_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE otdoa_positioning_capabilities_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_freq_rstd_meas_r10_present, 1)); + + return SRSASN_SUCCESS; +} +void otdoa_positioning_capabilities_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("otdoa-UE-Assisted-r10", "supported"); + if (inter_freq_rstd_meas_r10_present) { + j.write_str("interFreqRSTD-Measurement-r10", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v10f0-IEs ::= SEQUENCE +ue_eutra_cap_v10f0_ies_s::ue_eutra_cap_v10f0_ies_s() +{ + rf_params_v10f0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v10f0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v10f0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v10f0_present) { + HANDLE_CODE(rf_params_v10f0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v10f0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v10f0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v10f0_present) { + HANDLE_CODE(rf_params_v10f0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v10f0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v10f0_present) { + j.write_fieldname("rf-Parameters-v10f0"); + rf_params_v10f0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v11a0-IEs ::= SEQUENCE +ue_eutra_cap_v11a0_ies_s::ue_eutra_cap_v11a0_ies_s() +{ + ue_category_v11a0_present = false; + meas_params_v11a0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v11a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_v11a0_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v11a0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_v11a0_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_v11a0, (uint8_t)11, (uint8_t)12)); + } + if (meas_params_v11a0_present) { + HANDLE_CODE(meas_params_v11a0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v11a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_v11a0_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v11a0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_v11a0_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_v11a0, bref, (uint8_t)11, (uint8_t)12)); + } + if (meas_params_v11a0_present) { + HANDLE_CODE(meas_params_v11a0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v11a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_v11a0_present) { + j.write_int("ue-Category-v11a0", ue_category_v11a0); + } + if (meas_params_v11a0_present) { + j.write_fieldname("measParameters-v11a0"); + meas_params_v11a0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1180 ::= SEQUENCE +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1180_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(mbms_params_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1180_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(mbms_params_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1180_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mbms-Parameters-r11"); + mbms_params_r11.to_json(j); + j.end_obj(); +} + +// IRAT-ParametersUTRA-v9h0 ::= SEQUENCE +SRSASN_CODE irat_params_utra_v9h0_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_v9h0_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void irat_params_utra_v9h0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("mfbi-UTRA-r9", "supported"); + j.end_obj(); +} + +// MeasParameters-v1130 ::= SEQUENCE +meas_params_v1130_s::meas_params_v1130_s() +{ + rsrq_meas_wideband_r11_present = false; +} +SRSASN_CODE meas_params_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rsrq_meas_wideband_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_params_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rsrq_meas_wideband_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void meas_params_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrq_meas_wideband_r11_present) { + j.write_str("rsrqMeasWideband-r11", "supported"); + } + j.end_obj(); +} + +// Other-Parameters-r11 ::= SEQUENCE +other_params_r11_s::other_params_r11_s() +{ + in_dev_coex_ind_r11_present = false; + pwr_pref_ind_r11_present = false; + ue_rx_tx_time_diff_meass_r11_present = false; +} +SRSASN_CODE other_params_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(in_dev_coex_ind_r11_present, 1)); + HANDLE_CODE(bref.pack(pwr_pref_ind_r11_present, 1)); + HANDLE_CODE(bref.pack(ue_rx_tx_time_diff_meass_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_params_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(in_dev_coex_ind_r11_present, 1)); + HANDLE_CODE(bref.unpack(pwr_pref_ind_r11_present, 1)); + HANDLE_CODE(bref.unpack(ue_rx_tx_time_diff_meass_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void other_params_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (in_dev_coex_ind_r11_present) { + j.write_str("inDeviceCoexInd-r11", "supported"); + } + if (pwr_pref_ind_r11_present) { + j.write_str("powerPrefInd-r11", "supported"); + } + if (ue_rx_tx_time_diff_meass_r11_present) { + j.write_str("ue-Rx-TxTimeDiffMeasurements-r11", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1130 ::= SEQUENCE +phy_layer_params_v1130_s::phy_layer_params_v1130_s() +{ + crs_interf_handl_r11_present = false; + e_pdcch_r11_present = false; + multi_ack_csi_report_r11_present = false; + ss_cch_interf_handl_r11_present = false; + tdd_special_sf_r11_present = false; + tx_div_pucch1b_ch_select_r11_present = false; + ul_co_mp_r11_present = false; +} +SRSASN_CODE phy_layer_params_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(crs_interf_handl_r11_present, 1)); + HANDLE_CODE(bref.pack(e_pdcch_r11_present, 1)); + HANDLE_CODE(bref.pack(multi_ack_csi_report_r11_present, 1)); + HANDLE_CODE(bref.pack(ss_cch_interf_handl_r11_present, 1)); + HANDLE_CODE(bref.pack(tdd_special_sf_r11_present, 1)); + HANDLE_CODE(bref.pack(tx_div_pucch1b_ch_select_r11_present, 1)); + HANDLE_CODE(bref.pack(ul_co_mp_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(crs_interf_handl_r11_present, 1)); + HANDLE_CODE(bref.unpack(e_pdcch_r11_present, 1)); + HANDLE_CODE(bref.unpack(multi_ack_csi_report_r11_present, 1)); + HANDLE_CODE(bref.unpack(ss_cch_interf_handl_r11_present, 1)); + HANDLE_CODE(bref.unpack(tdd_special_sf_r11_present, 1)); + HANDLE_CODE(bref.unpack(tx_div_pucch1b_ch_select_r11_present, 1)); + HANDLE_CODE(bref.unpack(ul_co_mp_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (crs_interf_handl_r11_present) { + j.write_str("crs-InterfHandl-r11", "supported"); + } + if (e_pdcch_r11_present) { + j.write_str("ePDCCH-r11", "supported"); + } + if (multi_ack_csi_report_r11_present) { + j.write_str("multiACK-CSI-Reporting-r11", "supported"); + } + if (ss_cch_interf_handl_r11_present) { + j.write_str("ss-CCH-InterfHandl-r11", "supported"); + } + if (tdd_special_sf_r11_present) { + j.write_str("tdd-SpecialSubframe-r11", "supported"); + } + if (tx_div_pucch1b_ch_select_r11_present) { + j.write_str("txDiv-PUCCH1b-ChSelect-r11", "supported"); + } + if (ul_co_mp_r11_present) { + j.write_str("ul-CoMP-r11", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v1170 ::= SEQUENCE +phy_layer_params_v1170_s::phy_layer_params_v1170_s() +{ + inter_band_tdd_ca_with_different_cfg_r11_present = false; +} +SRSASN_CODE phy_layer_params_v1170_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_band_tdd_ca_with_different_cfg_r11_present, 1)); + + if (inter_band_tdd_ca_with_different_cfg_r11_present) { + HANDLE_CODE(inter_band_tdd_ca_with_different_cfg_r11.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v1170_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_band_tdd_ca_with_different_cfg_r11_present, 1)); + + if (inter_band_tdd_ca_with_different_cfg_r11_present) { + HANDLE_CODE(inter_band_tdd_ca_with_different_cfg_r11.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void phy_layer_params_v1170_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_band_tdd_ca_with_different_cfg_r11_present) { + j.write_str("interBandTDD-CA-WithDifferentConfig-r11", inter_band_tdd_ca_with_different_cfg_r11.to_string()); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v10c0-IEs ::= SEQUENCE +ue_eutra_cap_v10c0_ies_s::ue_eutra_cap_v10c0_ies_s() +{ + otdoa_positioning_capabilities_r10_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v10c0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(otdoa_positioning_capabilities_r10_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (otdoa_positioning_capabilities_r10_present) { + HANDLE_CODE(otdoa_positioning_capabilities_r10.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v10c0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(otdoa_positioning_capabilities_r10_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (otdoa_positioning_capabilities_r10_present) { + HANDLE_CODE(otdoa_positioning_capabilities_r10.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v10c0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (otdoa_positioning_capabilities_r10_present) { + j.write_fieldname("otdoa-PositioningCapabilities-r10"); + otdoa_positioning_capabilities_r10.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1180-IEs ::= SEQUENCE +ue_eutra_cap_v1180_ies_s::ue_eutra_cap_v1180_ies_s() +{ + rf_params_v1180_present = false; + mbms_params_r11_present = false; + fdd_add_ue_eutra_capabilities_v1180_present = false; + tdd_add_ue_eutra_capabilities_v1180_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1180_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v1180_present, 1)); + HANDLE_CODE(bref.pack(mbms_params_r11_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1180_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1180_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v1180_present) { + HANDLE_CODE(rf_params_v1180.pack(bref)); + } + if (mbms_params_r11_present) { + HANDLE_CODE(mbms_params_r11.pack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1180_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1180.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1180_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1180.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1180_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v1180_present, 1)); + HANDLE_CODE(bref.unpack(mbms_params_r11_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1180_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1180_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v1180_present) { + HANDLE_CODE(rf_params_v1180.unpack(bref)); + } + if (mbms_params_r11_present) { + HANDLE_CODE(mbms_params_r11.unpack(bref)); + } + if (fdd_add_ue_eutra_capabilities_v1180_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1180.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1180_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1180.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1180_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v1180_present) { + j.write_fieldname("rf-Parameters-v1180"); + rf_params_v1180.to_json(j); + } + if (mbms_params_r11_present) { + j.write_fieldname("mbms-Parameters-r11"); + mbms_params_r11.to_json(j); + } + if (fdd_add_ue_eutra_capabilities_v1180_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1180"); + fdd_add_ue_eutra_capabilities_v1180.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1180_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1180"); + tdd_add_ue_eutra_capabilities_v1180.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// IRAT-ParametersCDMA2000-v1130 ::= SEQUENCE +irat_params_cdma2000_v1130_s::irat_params_cdma2000_v1130_s() +{ + cdma2000_nw_sharing_r11_present = false; +} +SRSASN_CODE irat_params_cdma2000_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cdma2000_nw_sharing_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_cdma2000_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cdma2000_nw_sharing_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_cdma2000_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cdma2000_nw_sharing_r11_present) { + j.write_str("cdma2000-NW-Sharing-r11", "supported"); + } + j.end_obj(); +} + +// PDCP-Parameters-v1130 ::= SEQUENCE +pdcp_params_v1130_s::pdcp_params_v1130_s() +{ + pdcp_sn_ext_r11_present = false; + support_rohc_context_continue_r11_present = false; +} +SRSASN_CODE pdcp_params_v1130_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdcp_sn_ext_r11_present, 1)); + HANDLE_CODE(bref.pack(support_rohc_context_continue_r11_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_v1130_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pdcp_sn_ext_r11_present, 1)); + HANDLE_CODE(bref.unpack(support_rohc_context_continue_r11_present, 1)); + + return SRSASN_SUCCESS; +} +void pdcp_params_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdcp_sn_ext_r11_present) { + j.write_str("pdcp-SN-Extension-r11", "supported"); + } + if (support_rohc_context_continue_r11_present) { + j.write_str("supportRohcContextContinue-r11", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1170-IEs ::= SEQUENCE +ue_eutra_cap_v1170_ies_s::ue_eutra_cap_v1170_ies_s() +{ + phy_layer_params_v1170_present = false; + ue_category_v1170_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1170_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1170_present, 1)); + HANDLE_CODE(bref.pack(ue_category_v1170_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1170_present) { + HANDLE_CODE(phy_layer_params_v1170.pack(bref)); + } + if (ue_category_v1170_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_v1170, (uint8_t)9, (uint8_t)10)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1170_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1170_present, 1)); + HANDLE_CODE(bref.unpack(ue_category_v1170_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (phy_layer_params_v1170_present) { + HANDLE_CODE(phy_layer_params_v1170.unpack(bref)); + } + if (ue_category_v1170_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_v1170, bref, (uint8_t)9, (uint8_t)10)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1170_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1170_present) { + j.write_fieldname("phyLayerParameters-v1170"); + phy_layer_params_v1170.to_json(j); + } + if (ue_category_v1170_present) { + j.write_int("ue-Category-v1170", ue_category_v1170); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v9h0-IEs ::= SEQUENCE +ue_eutra_cap_v9h0_ies_s::ue_eutra_cap_v9h0_ies_s() +{ + inter_rat_params_utra_v9h0_present = false; + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v9h0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_rat_params_utra_v9h0_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (inter_rat_params_utra_v9h0_present) { + HANDLE_CODE(inter_rat_params_utra_v9h0.pack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v9h0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_rat_params_utra_v9h0_present, 1)); + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (inter_rat_params_utra_v9h0_present) { + HANDLE_CODE(inter_rat_params_utra_v9h0.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_eutra_cap_v9h0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_rat_params_utra_v9h0_present) { + j.write_fieldname("interRAT-ParametersUTRA-v9h0"); + inter_rat_params_utra_v9h0.to_json(j); + } + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1130 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1130_s::ue_eutra_cap_add_xdd_mode_v1130_s() +{ + ext = false; + phy_layer_params_v1130_present = false; + meas_params_v1130_present = false; + other_params_r11_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1130_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(phy_layer_params_v1130_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v1130_present, 1)); + HANDLE_CODE(bref.pack(other_params_r11_present, 1)); + + if (phy_layer_params_v1130_present) { + HANDLE_CODE(phy_layer_params_v1130.pack(bref)); + } + if (meas_params_v1130_present) { + HANDLE_CODE(meas_params_v1130.pack(bref)); + } + if (other_params_r11_present) { + HANDLE_CODE(other_params_r11.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1130_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(phy_layer_params_v1130_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v1130_present, 1)); + HANDLE_CODE(bref.unpack(other_params_r11_present, 1)); + + if (phy_layer_params_v1130_present) { + HANDLE_CODE(phy_layer_params_v1130.unpack(bref)); + } + if (meas_params_v1130_present) { + HANDLE_CODE(meas_params_v1130.unpack(bref)); + } + if (other_params_r11_present) { + HANDLE_CODE(other_params_r11.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1130_present) { + j.write_fieldname("phyLayerParameters-v1130"); + phy_layer_params_v1130.to_json(j); + } + if (meas_params_v1130_present) { + j.write_fieldname("measParameters-v1130"); + meas_params_v1130.to_json(j); + } + if (other_params_r11_present) { + j.write_fieldname("otherParameters-r11"); + other_params_r11.to_json(j); + } + j.end_obj(); +} + +// IRAT-ParametersCDMA2000-1XRTT-v1020 ::= SEQUENCE +SRSASN_CODE irat_params_cdma2000_minus1_xrtt_v1020_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_cdma2000_minus1_xrtt_v1020_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void irat_params_cdma2000_minus1_xrtt_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("e-CSFB-dual-1XRTT-r10", "supported"); + j.end_obj(); +} + +// IRAT-ParametersUTRA-TDD-v1020 ::= SEQUENCE +SRSASN_CODE irat_params_utra_tdd_v1020_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_tdd_v1020_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void irat_params_utra_tdd_v1020_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("e-RedirectionUTRA-TDD-r10", "supported"); + j.end_obj(); +} + +// PhyLayerParameters-v9d0 ::= SEQUENCE +phy_layer_params_v9d0_s::phy_layer_params_v9d0_s() +{ + tm5_fdd_r9_present = false; + tm5_tdd_r9_present = false; +} +SRSASN_CODE phy_layer_params_v9d0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tm5_fdd_r9_present, 1)); + HANDLE_CODE(bref.pack(tm5_tdd_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v9d0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tm5_fdd_r9_present, 1)); + HANDLE_CODE(bref.unpack(tm5_tdd_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v9d0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tm5_fdd_r9_present) { + j.write_str("tm5-FDD-r9", "supported"); + } + if (tm5_tdd_r9_present) { + j.write_str("tm5-TDD-r9", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1130-IEs ::= SEQUENCE +ue_eutra_cap_v1130_ies_s::ue_eutra_cap_v1130_ies_s() +{ + phy_layer_params_v1130_present = false; + fdd_add_ue_eutra_capabilities_v1130_present = false; + tdd_add_ue_eutra_capabilities_v1130_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v1130_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1130_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1130_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pdcp_params_v1130.pack(bref)); + if (phy_layer_params_v1130_present) { + HANDLE_CODE(phy_layer_params_v1130.pack(bref)); + } + HANDLE_CODE(rf_params_v1130.pack(bref)); + HANDLE_CODE(meas_params_v1130.pack(bref)); + HANDLE_CODE(inter_rat_params_cdma2000_v1130.pack(bref)); + HANDLE_CODE(other_params_r11.pack(bref)); + if (fdd_add_ue_eutra_capabilities_v1130_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1130.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1130_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1130.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v1130_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1130_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1130_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(pdcp_params_v1130.unpack(bref)); + if (phy_layer_params_v1130_present) { + HANDLE_CODE(phy_layer_params_v1130.unpack(bref)); + } + HANDLE_CODE(rf_params_v1130.unpack(bref)); + HANDLE_CODE(meas_params_v1130.unpack(bref)); + HANDLE_CODE(inter_rat_params_cdma2000_v1130.unpack(bref)); + HANDLE_CODE(other_params_r11.unpack(bref)); + if (fdd_add_ue_eutra_capabilities_v1130_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1130.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1130_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1130.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("pdcp-Parameters-v1130"); + pdcp_params_v1130.to_json(j); + if (phy_layer_params_v1130_present) { + j.write_fieldname("phyLayerParameters-v1130"); + phy_layer_params_v1130.to_json(j); + } + j.write_fieldname("rf-Parameters-v1130"); + rf_params_v1130.to_json(j); + j.write_fieldname("measParameters-v1130"); + meas_params_v1130.to_json(j); + j.write_fieldname("interRAT-ParametersCDMA2000-v1130"); + inter_rat_params_cdma2000_v1130.to_json(j); + j.write_fieldname("otherParameters-r11"); + other_params_r11.to_json(j); + if (fdd_add_ue_eutra_capabilities_v1130_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1130"); + fdd_add_ue_eutra_capabilities_v1130.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1130_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1130"); + tdd_add_ue_eutra_capabilities_v1130.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v9e0-IEs ::= SEQUENCE +ue_eutra_cap_v9e0_ies_s::ue_eutra_cap_v9e0_ies_s() +{ + rf_params_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v9e0_present) { + HANDLE_CODE(rf_params_v9e0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v9e0_present) { + HANDLE_CODE(rf_params_v9e0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v9e0_present) { + j.write_fieldname("rf-Parameters-v9e0"); + rf_params_v9e0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// IRAT-ParametersCDMA2000-1XRTT-v920 ::= SEQUENCE +irat_params_cdma2000_minus1_xrtt_v920_s::irat_params_cdma2000_minus1_xrtt_v920_s() +{ + e_csfb_conc_ps_mob1_xrtt_r9_present = false; +} +SRSASN_CODE irat_params_cdma2000_minus1_xrtt_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(e_csfb_conc_ps_mob1_xrtt_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_cdma2000_minus1_xrtt_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(e_csfb_conc_ps_mob1_xrtt_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_cdma2000_minus1_xrtt_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("e-CSFB-1XRTT-r9", "supported"); + if (e_csfb_conc_ps_mob1_xrtt_r9_present) { + j.write_str("e-CSFB-ConcPS-Mob1XRTT-r9", "supported"); + } + j.end_obj(); +} + +// IRAT-ParametersUTRA-v920 ::= SEQUENCE +SRSASN_CODE irat_params_utra_v920_s::pack(bit_ref& bref) const +{ + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_v920_s::unpack(bit_ref& bref) +{ + return SRSASN_SUCCESS; +} +void irat_params_utra_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("e-RedirectionUTRA-r9", "supported"); + j.end_obj(); +} + +// IRAT-ParametersUTRA-v9c0 ::= SEQUENCE +irat_params_utra_v9c0_s::irat_params_utra_v9c0_s() +{ + voice_over_ps_hs_utra_fdd_r9_present = false; + voice_over_ps_hs_utra_tdd128_r9_present = false; + srvcc_from_utra_fdd_to_utra_fdd_r9_present = false; + srvcc_from_utra_fdd_to_geran_r9_present = false; + srvcc_from_utra_tdd128_to_utra_tdd128_r9_present = false; + srvcc_from_utra_tdd128_to_geran_r9_present = false; +} +SRSASN_CODE irat_params_utra_v9c0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(voice_over_ps_hs_utra_fdd_r9_present, 1)); + HANDLE_CODE(bref.pack(voice_over_ps_hs_utra_tdd128_r9_present, 1)); + HANDLE_CODE(bref.pack(srvcc_from_utra_fdd_to_utra_fdd_r9_present, 1)); + HANDLE_CODE(bref.pack(srvcc_from_utra_fdd_to_geran_r9_present, 1)); + HANDLE_CODE(bref.pack(srvcc_from_utra_tdd128_to_utra_tdd128_r9_present, 1)); + HANDLE_CODE(bref.pack(srvcc_from_utra_tdd128_to_geran_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_utra_v9c0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(voice_over_ps_hs_utra_fdd_r9_present, 1)); + HANDLE_CODE(bref.unpack(voice_over_ps_hs_utra_tdd128_r9_present, 1)); + HANDLE_CODE(bref.unpack(srvcc_from_utra_fdd_to_utra_fdd_r9_present, 1)); + HANDLE_CODE(bref.unpack(srvcc_from_utra_fdd_to_geran_r9_present, 1)); + HANDLE_CODE(bref.unpack(srvcc_from_utra_tdd128_to_utra_tdd128_r9_present, 1)); + HANDLE_CODE(bref.unpack(srvcc_from_utra_tdd128_to_geran_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_utra_v9c0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (voice_over_ps_hs_utra_fdd_r9_present) { + j.write_str("voiceOverPS-HS-UTRA-FDD-r9", "supported"); + } + if (voice_over_ps_hs_utra_tdd128_r9_present) { + j.write_str("voiceOverPS-HS-UTRA-TDD128-r9", "supported"); + } + if (srvcc_from_utra_fdd_to_utra_fdd_r9_present) { + j.write_str("srvcc-FromUTRA-FDD-ToUTRA-FDD-r9", "supported"); + } + if (srvcc_from_utra_fdd_to_geran_r9_present) { + j.write_str("srvcc-FromUTRA-FDD-ToGERAN-r9", "supported"); + } + if (srvcc_from_utra_tdd128_to_utra_tdd128_r9_present) { + j.write_str("srvcc-FromUTRA-TDD128-ToUTRA-TDD128-r9", "supported"); + } + if (srvcc_from_utra_tdd128_to_geran_r9_present) { + j.write_str("srvcc-FromUTRA-TDD128-ToGERAN-r9", "supported"); + } + j.end_obj(); +} + +// NeighCellSI-AcquisitionParameters-r9 ::= SEQUENCE +neigh_cell_si_acquisition_params_r9_s::neigh_cell_si_acquisition_params_r9_s() +{ + intra_freq_si_acquisition_for_ho_r9_present = false; + inter_freq_si_acquisition_for_ho_r9_present = false; + utran_si_acquisition_for_ho_r9_present = false; +} +SRSASN_CODE neigh_cell_si_acquisition_params_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(intra_freq_si_acquisition_for_ho_r9_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_si_acquisition_for_ho_r9_present, 1)); + HANDLE_CODE(bref.pack(utran_si_acquisition_for_ho_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neigh_cell_si_acquisition_params_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(intra_freq_si_acquisition_for_ho_r9_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_si_acquisition_for_ho_r9_present, 1)); + HANDLE_CODE(bref.unpack(utran_si_acquisition_for_ho_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void neigh_cell_si_acquisition_params_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (intra_freq_si_acquisition_for_ho_r9_present) { + j.write_str("intraFreqSI-AcquisitionForHO-r9", "supported"); + } + if (inter_freq_si_acquisition_for_ho_r9_present) { + j.write_str("interFreqSI-AcquisitionForHO-r9", "supported"); + } + if (utran_si_acquisition_for_ho_r9_present) { + j.write_str("utran-SI-AcquisitionForHO-r9", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters ::= SEQUENCE +SRSASN_CODE phy_layer_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_tx_ant_sel_supported, 1)); + HANDLE_CODE(bref.pack(ue_specific_ref_sigs_supported, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_tx_ant_sel_supported, 1)); + HANDLE_CODE(bref.unpack(ue_specific_ref_sigs_supported, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("ue-TxAntennaSelectionSupported", ue_tx_ant_sel_supported); + j.write_bool("ue-SpecificRefSigsSupported", ue_specific_ref_sigs_supported); + j.end_obj(); +} + +// UE-EUTRA-Capability-v1090-IEs ::= SEQUENCE +ue_eutra_cap_v1090_ies_s::ue_eutra_cap_v1090_ies_s() +{ + rf_params_v1090_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1090_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_v1090_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v1090_present) { + HANDLE_CODE(rf_params_v1090.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1090_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_v1090_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v1090_present) { + HANDLE_CODE(rf_params_v1090.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1090_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_v1090_present) { + j.write_fieldname("rf-Parameters-v1090"); + rf_params_v1090.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v9d0-IEs ::= SEQUENCE +ue_eutra_cap_v9d0_ies_s::ue_eutra_cap_v9d0_ies_s() +{ + phy_layer_params_v9d0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v9d0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(phy_layer_params_v9d0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (phy_layer_params_v9d0_present) { + HANDLE_CODE(phy_layer_params_v9d0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v9d0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(phy_layer_params_v9d0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (phy_layer_params_v9d0_present) { + HANDLE_CODE(phy_layer_params_v9d0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v9d0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v9d0_present) { + j.write_fieldname("phyLayerParameters-v9d0"); + phy_layer_params_v9d0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-v1060 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_v1060_s::ue_eutra_cap_add_xdd_mode_v1060_s() +{ + ext = false; + phy_layer_params_v1060_present = false; + feature_group_ind_rel10_v1060_present = false; + inter_rat_params_cdma2000_v1060_present = false; + inter_rat_params_utra_tdd_v1060_present = false; + otdoa_positioning_capabilities_r10_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1060_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(phy_layer_params_v1060_present, 1)); + HANDLE_CODE(bref.pack(feature_group_ind_rel10_v1060_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_cdma2000_v1060_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_utra_tdd_v1060_present, 1)); + + if (phy_layer_params_v1060_present) { + HANDLE_CODE(phy_layer_params_v1060.pack(bref)); + } + if (feature_group_ind_rel10_v1060_present) { + HANDLE_CODE(feature_group_ind_rel10_v1060.pack(bref)); + } + if (inter_rat_params_cdma2000_v1060_present) { + HANDLE_CODE(inter_rat_params_cdma2000_v1060.pack(bref)); + } + if (inter_rat_params_utra_tdd_v1060_present) { + HANDLE_CODE(inter_rat_params_utra_tdd_v1060.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(otdoa_positioning_capabilities_r10_present != + (otdoa_positioning_capabilities_r10.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= otdoa_positioning_capabilities_r10_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(otdoa_positioning_capabilities_r10_present, 1)); + if (otdoa_positioning_capabilities_r10_present) { + HANDLE_CODE(otdoa_positioning_capabilities_r10->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_v1060_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(phy_layer_params_v1060_present, 1)); + HANDLE_CODE(bref.unpack(feature_group_ind_rel10_v1060_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_cdma2000_v1060_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_utra_tdd_v1060_present, 1)); + + if (phy_layer_params_v1060_present) { + HANDLE_CODE(phy_layer_params_v1060.unpack(bref)); + } + if (feature_group_ind_rel10_v1060_present) { + HANDLE_CODE(feature_group_ind_rel10_v1060.unpack(bref)); + } + if (inter_rat_params_cdma2000_v1060_present) { + HANDLE_CODE(inter_rat_params_cdma2000_v1060.unpack(bref)); + } + if (inter_rat_params_utra_tdd_v1060_present) { + HANDLE_CODE(inter_rat_params_utra_tdd_v1060.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(otdoa_positioning_capabilities_r10_present, 1)); + if (otdoa_positioning_capabilities_r10_present) { + otdoa_positioning_capabilities_r10 = make_copy_ptr(otdoa_positioning_capabilities_r10_s()); + HANDLE_CODE(otdoa_positioning_capabilities_r10->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_v1060_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_v1060_present) { + j.write_fieldname("phyLayerParameters-v1060"); + phy_layer_params_v1060.to_json(j); + } + if (feature_group_ind_rel10_v1060_present) { + j.write_str("featureGroupIndRel10-v1060", feature_group_ind_rel10_v1060.to_string()); + } + if (inter_rat_params_cdma2000_v1060_present) { + j.write_fieldname("interRAT-ParametersCDMA2000-v1060"); + inter_rat_params_cdma2000_v1060.to_json(j); + } + if (inter_rat_params_utra_tdd_v1060_present) { + j.write_fieldname("interRAT-ParametersUTRA-TDD-v1060"); + inter_rat_params_utra_tdd_v1060.to_json(j); + } + if (otdoa_positioning_capabilities_r10_present) { + j.write_fieldname("otdoa-PositioningCapabilities-r10"); + otdoa_positioning_capabilities_r10->to_json(j); + } + j.end_obj(); +} + +// UE-BasedNetwPerfMeasParameters-r10 ::= SEQUENCE +ue_based_netw_perf_meas_params_r10_s::ue_based_netw_perf_meas_params_r10_s() +{ + logged_meass_idle_r10_present = false; + standalone_gnss_location_r10_present = false; +} +SRSASN_CODE ue_based_netw_perf_meas_params_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(logged_meass_idle_r10_present, 1)); + HANDLE_CODE(bref.pack(standalone_gnss_location_r10_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_based_netw_perf_meas_params_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(logged_meass_idle_r10_present, 1)); + HANDLE_CODE(bref.unpack(standalone_gnss_location_r10_present, 1)); + + return SRSASN_SUCCESS; +} +void ue_based_netw_perf_meas_params_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (logged_meass_idle_r10_present) { + j.write_str("loggedMeasurementsIdle-r10", "supported"); + } + if (standalone_gnss_location_r10_present) { + j.write_str("standaloneGNSS-Location-r10", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1060-IEs ::= SEQUENCE +ue_eutra_cap_v1060_ies_s::ue_eutra_cap_v1060_ies_s() +{ + fdd_add_ue_eutra_capabilities_v1060_present = false; + tdd_add_ue_eutra_capabilities_v1060_present = false; + rf_params_v1060_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1060_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_v1060_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_v1060_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1060_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fdd_add_ue_eutra_capabilities_v1060_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1060.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1060_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1060.pack(bref)); + } + if (rf_params_v1060_present) { + HANDLE_CODE(rf_params_v1060.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1060_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_v1060_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_v1060_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1060_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fdd_add_ue_eutra_capabilities_v1060_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_v1060.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_v1060_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_v1060.unpack(bref)); + } + if (rf_params_v1060_present) { + HANDLE_CODE(rf_params_v1060.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1060_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fdd_add_ue_eutra_capabilities_v1060_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-v1060"); + fdd_add_ue_eutra_capabilities_v1060.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_v1060_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-v1060"); + tdd_add_ue_eutra_capabilities_v1060.to_json(j); + } + if (rf_params_v1060_present) { + j.write_fieldname("rf-Parameters-v1060"); + rf_params_v1060.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v9c0-IEs ::= SEQUENCE +ue_eutra_cap_v9c0_ies_s::ue_eutra_cap_v9c0_ies_s() +{ + inter_rat_params_utra_v9c0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v9c0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_rat_params_utra_v9c0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (inter_rat_params_utra_v9c0_present) { + HANDLE_CODE(inter_rat_params_utra_v9c0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v9c0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_rat_params_utra_v9c0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (inter_rat_params_utra_v9c0_present) { + HANDLE_CODE(inter_rat_params_utra_v9c0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v9c0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_rat_params_utra_v9c0_present) { + j.write_fieldname("interRAT-ParametersUTRA-v9c0"); + inter_rat_params_utra_v9c0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-CapabilityAddXDD-Mode-r9 ::= SEQUENCE +ue_eutra_cap_add_xdd_mode_r9_s::ue_eutra_cap_add_xdd_mode_r9_s() +{ + ext = false; + phy_layer_params_r9_present = false; + feature_group_inds_r9_present = false; + feature_group_ind_rel9_add_r9_present = false; + inter_rat_params_geran_r9_present = false; + inter_rat_params_utra_r9_present = false; + inter_rat_params_cdma2000_r9_present = false; + neigh_cell_si_acquisition_params_r9_present = false; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_r9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(phy_layer_params_r9_present, 1)); + HANDLE_CODE(bref.pack(feature_group_inds_r9_present, 1)); + HANDLE_CODE(bref.pack(feature_group_ind_rel9_add_r9_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_geran_r9_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_utra_r9_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_cdma2000_r9_present, 1)); + HANDLE_CODE(bref.pack(neigh_cell_si_acquisition_params_r9_present, 1)); + + if (phy_layer_params_r9_present) { + HANDLE_CODE(phy_layer_params_r9.pack(bref)); + } + if (feature_group_inds_r9_present) { + HANDLE_CODE(feature_group_inds_r9.pack(bref)); + } + if (feature_group_ind_rel9_add_r9_present) { + HANDLE_CODE(feature_group_ind_rel9_add_r9.pack(bref)); + } + if (inter_rat_params_geran_r9_present) { + HANDLE_CODE(inter_rat_params_geran_r9.pack(bref)); + } + if (inter_rat_params_utra_r9_present) { + HANDLE_CODE(inter_rat_params_utra_r9.pack(bref)); + } + if (inter_rat_params_cdma2000_r9_present) { + HANDLE_CODE(inter_rat_params_cdma2000_r9.pack(bref)); + } + if (neigh_cell_si_acquisition_params_r9_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_r9.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_add_xdd_mode_r9_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(phy_layer_params_r9_present, 1)); + HANDLE_CODE(bref.unpack(feature_group_inds_r9_present, 1)); + HANDLE_CODE(bref.unpack(feature_group_ind_rel9_add_r9_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_geran_r9_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_utra_r9_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_cdma2000_r9_present, 1)); + HANDLE_CODE(bref.unpack(neigh_cell_si_acquisition_params_r9_present, 1)); + + if (phy_layer_params_r9_present) { + HANDLE_CODE(phy_layer_params_r9.unpack(bref)); + } + if (feature_group_inds_r9_present) { + HANDLE_CODE(feature_group_inds_r9.unpack(bref)); + } + if (feature_group_ind_rel9_add_r9_present) { + HANDLE_CODE(feature_group_ind_rel9_add_r9.unpack(bref)); + } + if (inter_rat_params_geran_r9_present) { + HANDLE_CODE(inter_rat_params_geran_r9.unpack(bref)); + } + if (inter_rat_params_utra_r9_present) { + HANDLE_CODE(inter_rat_params_utra_r9.unpack(bref)); + } + if (inter_rat_params_cdma2000_r9_present) { + HANDLE_CODE(inter_rat_params_cdma2000_r9.unpack(bref)); + } + if (neigh_cell_si_acquisition_params_r9_present) { + HANDLE_CODE(neigh_cell_si_acquisition_params_r9.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_add_xdd_mode_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_layer_params_r9_present) { + j.write_fieldname("phyLayerParameters-r9"); + phy_layer_params_r9.to_json(j); + } + if (feature_group_inds_r9_present) { + j.write_str("featureGroupIndicators-r9", feature_group_inds_r9.to_string()); + } + if (feature_group_ind_rel9_add_r9_present) { + j.write_str("featureGroupIndRel9Add-r9", feature_group_ind_rel9_add_r9.to_string()); + } + if (inter_rat_params_geran_r9_present) { + j.write_fieldname("interRAT-ParametersGERAN-r9"); + inter_rat_params_geran_r9.to_json(j); + } + if (inter_rat_params_utra_r9_present) { + j.write_fieldname("interRAT-ParametersUTRA-r9"); + inter_rat_params_utra_r9.to_json(j); + } + if (inter_rat_params_cdma2000_r9_present) { + j.write_fieldname("interRAT-ParametersCDMA2000-r9"); + inter_rat_params_cdma2000_r9.to_json(j); + } + if (neigh_cell_si_acquisition_params_r9_present) { + j.write_fieldname("neighCellSI-AcquisitionParameters-r9"); + neigh_cell_si_acquisition_params_r9.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v1020-IEs ::= SEQUENCE +ue_eutra_cap_v1020_ies_s::ue_eutra_cap_v1020_ies_s() +{ + ue_category_v1020_present = false; + phy_layer_params_v1020_present = false; + rf_params_v1020_present = false; + meas_params_v1020_present = false; + feature_group_ind_rel10_r10_present = false; + inter_rat_params_cdma2000_v1020_present = false; + ue_based_netw_perf_meas_params_r10_present = false; + inter_rat_params_utra_tdd_v1020_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v1020_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_category_v1020_present, 1)); + HANDLE_CODE(bref.pack(phy_layer_params_v1020_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v1020_present, 1)); + HANDLE_CODE(bref.pack(meas_params_v1020_present, 1)); + HANDLE_CODE(bref.pack(feature_group_ind_rel10_r10_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_cdma2000_v1020_present, 1)); + HANDLE_CODE(bref.pack(ue_based_netw_perf_meas_params_r10_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_utra_tdd_v1020_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_category_v1020_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_category_v1020, (uint8_t)6, (uint8_t)8)); + } + if (phy_layer_params_v1020_present) { + HANDLE_CODE(phy_layer_params_v1020.pack(bref)); + } + if (rf_params_v1020_present) { + HANDLE_CODE(rf_params_v1020.pack(bref)); + } + if (meas_params_v1020_present) { + HANDLE_CODE(meas_params_v1020.pack(bref)); + } + if (feature_group_ind_rel10_r10_present) { + HANDLE_CODE(feature_group_ind_rel10_r10.pack(bref)); + } + if (inter_rat_params_cdma2000_v1020_present) { + HANDLE_CODE(inter_rat_params_cdma2000_v1020.pack(bref)); + } + if (ue_based_netw_perf_meas_params_r10_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_r10.pack(bref)); + } + if (inter_rat_params_utra_tdd_v1020_present) { + HANDLE_CODE(inter_rat_params_utra_tdd_v1020.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v1020_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_category_v1020_present, 1)); + HANDLE_CODE(bref.unpack(phy_layer_params_v1020_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v1020_present, 1)); + HANDLE_CODE(bref.unpack(meas_params_v1020_present, 1)); + HANDLE_CODE(bref.unpack(feature_group_ind_rel10_r10_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_cdma2000_v1020_present, 1)); + HANDLE_CODE(bref.unpack(ue_based_netw_perf_meas_params_r10_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_utra_tdd_v1020_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_category_v1020_present) { + HANDLE_CODE(unpack_unalign_integer(ue_category_v1020, bref, (uint8_t)6, (uint8_t)8)); + } + if (phy_layer_params_v1020_present) { + HANDLE_CODE(phy_layer_params_v1020.unpack(bref)); + } + if (rf_params_v1020_present) { + HANDLE_CODE(rf_params_v1020.unpack(bref)); + } + if (meas_params_v1020_present) { + HANDLE_CODE(meas_params_v1020.unpack(bref)); + } + if (feature_group_ind_rel10_r10_present) { + HANDLE_CODE(feature_group_ind_rel10_r10.unpack(bref)); + } + if (inter_rat_params_cdma2000_v1020_present) { + HANDLE_CODE(inter_rat_params_cdma2000_v1020.unpack(bref)); + } + if (ue_based_netw_perf_meas_params_r10_present) { + HANDLE_CODE(ue_based_netw_perf_meas_params_r10.unpack(bref)); + } + if (inter_rat_params_utra_tdd_v1020_present) { + HANDLE_CODE(inter_rat_params_utra_tdd_v1020.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v1020_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_category_v1020_present) { + j.write_int("ue-Category-v1020", ue_category_v1020); + } + if (phy_layer_params_v1020_present) { + j.write_fieldname("phyLayerParameters-v1020"); + phy_layer_params_v1020.to_json(j); + } + if (rf_params_v1020_present) { + j.write_fieldname("rf-Parameters-v1020"); + rf_params_v1020.to_json(j); + } + if (meas_params_v1020_present) { + j.write_fieldname("measParameters-v1020"); + meas_params_v1020.to_json(j); + } + if (feature_group_ind_rel10_r10_present) { + j.write_str("featureGroupIndRel10-r10", feature_group_ind_rel10_r10.to_string()); + } + if (inter_rat_params_cdma2000_v1020_present) { + j.write_fieldname("interRAT-ParametersCDMA2000-v1020"); + inter_rat_params_cdma2000_v1020.to_json(j); + } + if (ue_based_netw_perf_meas_params_r10_present) { + j.write_fieldname("ue-BasedNetwPerfMeasParameters-r10"); + ue_based_netw_perf_meas_params_r10.to_json(j); + } + if (inter_rat_params_utra_tdd_v1020_present) { + j.write_fieldname("interRAT-ParametersUTRA-TDD-v1020"); + inter_rat_params_utra_tdd_v1020.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v9a0-IEs ::= SEQUENCE +ue_eutra_cap_v9a0_ies_s::ue_eutra_cap_v9a0_ies_s() +{ + feature_group_ind_rel9_add_r9_present = false; + fdd_add_ue_eutra_capabilities_r9_present = false; + tdd_add_ue_eutra_capabilities_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v9a0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(feature_group_ind_rel9_add_r9_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_eutra_capabilities_r9_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_eutra_capabilities_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (feature_group_ind_rel9_add_r9_present) { + HANDLE_CODE(feature_group_ind_rel9_add_r9.pack(bref)); + } + if (fdd_add_ue_eutra_capabilities_r9_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_r9.pack(bref)); + } + if (tdd_add_ue_eutra_capabilities_r9_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_r9.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v9a0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(feature_group_ind_rel9_add_r9_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_eutra_capabilities_r9_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_eutra_capabilities_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (feature_group_ind_rel9_add_r9_present) { + HANDLE_CODE(feature_group_ind_rel9_add_r9.unpack(bref)); + } + if (fdd_add_ue_eutra_capabilities_r9_present) { + HANDLE_CODE(fdd_add_ue_eutra_capabilities_r9.unpack(bref)); + } + if (tdd_add_ue_eutra_capabilities_r9_present) { + HANDLE_CODE(tdd_add_ue_eutra_capabilities_r9.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v9a0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (feature_group_ind_rel9_add_r9_present) { + j.write_str("featureGroupIndRel9Add-r9", feature_group_ind_rel9_add_r9.to_string()); + } + if (fdd_add_ue_eutra_capabilities_r9_present) { + j.write_fieldname("fdd-Add-UE-EUTRA-Capabilities-r9"); + fdd_add_ue_eutra_capabilities_r9.to_json(j); + } + if (tdd_add_ue_eutra_capabilities_r9_present) { + j.write_fieldname("tdd-Add-UE-EUTRA-Capabilities-r9"); + tdd_add_ue_eutra_capabilities_r9.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CSG-ProximityIndicationParameters-r9 ::= SEQUENCE +csg_proximity_ind_params_r9_s::csg_proximity_ind_params_r9_s() +{ + intra_freq_proximity_ind_r9_present = false; + inter_freq_proximity_ind_r9_present = false; + utran_proximity_ind_r9_present = false; +} +SRSASN_CODE csg_proximity_ind_params_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(intra_freq_proximity_ind_r9_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_proximity_ind_r9_present, 1)); + HANDLE_CODE(bref.pack(utran_proximity_ind_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE csg_proximity_ind_params_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(intra_freq_proximity_ind_r9_present, 1)); + HANDLE_CODE(bref.unpack(inter_freq_proximity_ind_r9_present, 1)); + HANDLE_CODE(bref.unpack(utran_proximity_ind_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void csg_proximity_ind_params_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (intra_freq_proximity_ind_r9_present) { + j.write_str("intraFreqProximityIndication-r9", "supported"); + } + if (inter_freq_proximity_ind_r9_present) { + j.write_str("interFreqProximityIndication-r9", "supported"); + } + if (utran_proximity_ind_r9_present) { + j.write_str("utran-ProximityIndication-r9", "supported"); + } + j.end_obj(); +} + +// IRAT-ParametersGERAN-v920 ::= SEQUENCE +irat_params_geran_v920_s::irat_params_geran_v920_s() +{ + dtm_r9_present = false; + e_redirection_geran_r9_present = false; +} +SRSASN_CODE irat_params_geran_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dtm_r9_present, 1)); + HANDLE_CODE(bref.pack(e_redirection_geran_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE irat_params_geran_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dtm_r9_present, 1)); + HANDLE_CODE(bref.unpack(e_redirection_geran_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void irat_params_geran_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dtm_r9_present) { + j.write_str("dtm-r9", "supported"); + } + if (e_redirection_geran_r9_present) { + j.write_str("e-RedirectionGERAN-r9", "supported"); + } + j.end_obj(); +} + +// PhyLayerParameters-v920 ::= SEQUENCE +phy_layer_params_v920_s::phy_layer_params_v920_s() +{ + enhanced_dual_layer_fdd_r9_present = false; + enhanced_dual_layer_tdd_r9_present = false; +} +SRSASN_CODE phy_layer_params_v920_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(enhanced_dual_layer_fdd_r9_present, 1)); + HANDLE_CODE(bref.pack(enhanced_dual_layer_tdd_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_layer_params_v920_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(enhanced_dual_layer_fdd_r9_present, 1)); + HANDLE_CODE(bref.unpack(enhanced_dual_layer_tdd_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void phy_layer_params_v920_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (enhanced_dual_layer_fdd_r9_present) { + j.write_str("enhancedDualLayerFDD-r9", "supported"); + } + if (enhanced_dual_layer_tdd_r9_present) { + j.write_str("enhancedDualLayerTDD-r9", "supported"); + } + j.end_obj(); +} + +// SON-Parameters-r9 ::= SEQUENCE +son_params_r9_s::son_params_r9_s() +{ + rach_report_r9_present = false; +} +SRSASN_CODE son_params_r9_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rach_report_r9_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE son_params_r9_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rach_report_r9_present, 1)); + + return SRSASN_SUCCESS; +} +void son_params_r9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rach_report_r9_present) { + j.write_str("rach-Report-r9", "supported"); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v940-IEs ::= SEQUENCE +ue_eutra_cap_v940_ies_s::ue_eutra_cap_v940_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v940_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v940_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v940_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability-v920-IEs ::= SEQUENCE +ue_eutra_cap_v920_ies_s::ue_eutra_cap_v920_ies_s() +{ + inter_rat_params_utra_v920_present = false; + inter_rat_params_cdma2000_v920_present = false; + dev_type_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_rat_params_utra_v920_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params_cdma2000_v920_present, 1)); + HANDLE_CODE(bref.pack(dev_type_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v920.pack(bref)); + HANDLE_CODE(inter_rat_params_geran_v920.pack(bref)); + if (inter_rat_params_utra_v920_present) { + HANDLE_CODE(inter_rat_params_utra_v920.pack(bref)); + } + if (inter_rat_params_cdma2000_v920_present) { + HANDLE_CODE(inter_rat_params_cdma2000_v920.pack(bref)); + } + HANDLE_CODE(csg_proximity_ind_params_r9.pack(bref)); + HANDLE_CODE(neigh_cell_si_acquisition_params_r9.pack(bref)); + HANDLE_CODE(son_params_r9.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(inter_rat_params_utra_v920_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params_cdma2000_v920_present, 1)); + HANDLE_CODE(bref.unpack(dev_type_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(phy_layer_params_v920.unpack(bref)); + HANDLE_CODE(inter_rat_params_geran_v920.unpack(bref)); + if (inter_rat_params_utra_v920_present) { + HANDLE_CODE(inter_rat_params_utra_v920.unpack(bref)); + } + if (inter_rat_params_cdma2000_v920_present) { + HANDLE_CODE(inter_rat_params_cdma2000_v920.unpack(bref)); + } + HANDLE_CODE(csg_proximity_ind_params_r9.unpack(bref)); + HANDLE_CODE(neigh_cell_si_acquisition_params_r9.unpack(bref)); + HANDLE_CODE(son_params_r9.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("phyLayerParameters-v920"); + phy_layer_params_v920.to_json(j); + j.write_fieldname("interRAT-ParametersGERAN-v920"); + inter_rat_params_geran_v920.to_json(j); + if (inter_rat_params_utra_v920_present) { + j.write_fieldname("interRAT-ParametersUTRA-v920"); + inter_rat_params_utra_v920.to_json(j); + } + if (inter_rat_params_cdma2000_v920_present) { + j.write_fieldname("interRAT-ParametersCDMA2000-v920"); + inter_rat_params_cdma2000_v920.to_json(j); + } + if (dev_type_r9_present) { + j.write_str("deviceType-r9", "noBenFromBatConsumpOpt"); + } + j.write_fieldname("csg-ProximityIndicationParameters-r9"); + csg_proximity_ind_params_r9.to_json(j); + j.write_fieldname("neighCellSI-AcquisitionParameters-r9"); + neigh_cell_si_acquisition_params_r9.to_json(j); + j.write_fieldname("son-Parameters-r9"); + son_params_r9.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-EUTRA-Capability ::= SEQUENCE +ue_eutra_cap_s::ue_eutra_cap_s() +{ + feature_group_inds_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_eutra_cap_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(feature_group_inds_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_enum(bref, access_stratum_release)); + HANDLE_CODE(pack_unalign_integer(bref, ue_category, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(pdcp_params.pack(bref)); + HANDLE_CODE(phy_layer_params.pack(bref)); + HANDLE_CODE(rf_params.pack(bref)); + HANDLE_CODE(meas_params.pack(bref)); + if (feature_group_inds_present) { + HANDLE_CODE(feature_group_inds.pack(bref)); + } + HANDLE_CODE(bref.pack(inter_rat_params.utra_fdd_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params.utra_tdd128_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params.utra_tdd384_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params.utra_tdd768_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params.geran_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params.cdma2000_hrpd_present, 1)); + HANDLE_CODE(bref.pack(inter_rat_params.cdma2000_minus1x_rtt_present, 1)); + if (inter_rat_params.utra_fdd_present) { + HANDLE_CODE(inter_rat_params.utra_fdd.pack(bref)); + } + if (inter_rat_params.utra_tdd128_present) { + HANDLE_CODE(inter_rat_params.utra_tdd128.pack(bref)); + } + if (inter_rat_params.utra_tdd384_present) { + HANDLE_CODE(inter_rat_params.utra_tdd384.pack(bref)); + } + if (inter_rat_params.utra_tdd768_present) { + HANDLE_CODE(inter_rat_params.utra_tdd768.pack(bref)); + } + if (inter_rat_params.geran_present) { + HANDLE_CODE(inter_rat_params.geran.pack(bref)); + } + if (inter_rat_params.cdma2000_hrpd_present) { + HANDLE_CODE(inter_rat_params.cdma2000_hrpd.pack(bref)); + } + if (inter_rat_params.cdma2000_minus1x_rtt_present) { + HANDLE_CODE(inter_rat_params.cdma2000_minus1x_rtt.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_eutra_cap_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(feature_group_inds_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_enum(access_stratum_release, bref)); + HANDLE_CODE(unpack_unalign_integer(ue_category, bref, (uint8_t)1, (uint8_t)5)); + HANDLE_CODE(pdcp_params.unpack(bref)); + HANDLE_CODE(phy_layer_params.unpack(bref)); + HANDLE_CODE(rf_params.unpack(bref)); + HANDLE_CODE(meas_params.unpack(bref)); + if (feature_group_inds_present) { + HANDLE_CODE(feature_group_inds.unpack(bref)); + } + HANDLE_CODE(bref.unpack(inter_rat_params.utra_fdd_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params.utra_tdd128_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params.utra_tdd384_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params.utra_tdd768_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params.geran_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params.cdma2000_hrpd_present, 1)); + HANDLE_CODE(bref.unpack(inter_rat_params.cdma2000_minus1x_rtt_present, 1)); + if (inter_rat_params.utra_fdd_present) { + HANDLE_CODE(inter_rat_params.utra_fdd.unpack(bref)); + } + if (inter_rat_params.utra_tdd128_present) { + HANDLE_CODE(inter_rat_params.utra_tdd128.unpack(bref)); + } + if (inter_rat_params.utra_tdd384_present) { + HANDLE_CODE(inter_rat_params.utra_tdd384.unpack(bref)); + } + if (inter_rat_params.utra_tdd768_present) { + HANDLE_CODE(inter_rat_params.utra_tdd768.unpack(bref)); + } + if (inter_rat_params.geran_present) { + HANDLE_CODE(inter_rat_params.geran.unpack(bref)); + } + if (inter_rat_params.cdma2000_hrpd_present) { + HANDLE_CODE(inter_rat_params.cdma2000_hrpd.unpack(bref)); + } + if (inter_rat_params.cdma2000_minus1x_rtt_present) { + HANDLE_CODE(inter_rat_params.cdma2000_minus1x_rtt.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_eutra_cap_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("accessStratumRelease", access_stratum_release.to_string()); + j.write_int("ue-Category", ue_category); + j.write_fieldname("pdcp-Parameters"); + pdcp_params.to_json(j); + j.write_fieldname("phyLayerParameters"); + phy_layer_params.to_json(j); + j.write_fieldname("rf-Parameters"); + rf_params.to_json(j); + j.write_fieldname("measParameters"); + meas_params.to_json(j); + if (feature_group_inds_present) { + j.write_str("featureGroupIndicators", feature_group_inds.to_string()); + } + j.write_fieldname("interRAT-Parameters"); + j.start_obj(); + if (inter_rat_params.utra_fdd_present) { + j.write_fieldname("utraFDD"); + inter_rat_params.utra_fdd.to_json(j); + } + if (inter_rat_params.utra_tdd128_present) { + j.write_fieldname("utraTDD128"); + inter_rat_params.utra_tdd128.to_json(j); + } + if (inter_rat_params.utra_tdd384_present) { + j.write_fieldname("utraTDD384"); + inter_rat_params.utra_tdd384.to_json(j); + } + if (inter_rat_params.utra_tdd768_present) { + j.write_fieldname("utraTDD768"); + inter_rat_params.utra_tdd768.to_json(j); + } + if (inter_rat_params.geran_present) { + j.write_fieldname("geran"); + inter_rat_params.geran.to_json(j); + } + if (inter_rat_params.cdma2000_hrpd_present) { + j.write_fieldname("cdma2000-HRPD"); + inter_rat_params.cdma2000_hrpd.to_json(j); + } + if (inter_rat_params.cdma2000_minus1x_rtt_present) { + j.write_fieldname("cdma2000-1xRTT"); + inter_rat_params.cdma2000_minus1x_rtt.to_json(j); + } + j.end_obj(); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +ue_eutra_cap_s::inter_rat_params_s_::inter_rat_params_s_() +{ + utra_fdd_present = false; + utra_tdd128_present = false; + utra_tdd384_present = false; + utra_tdd768_present = false; + geran_present = false; + cdma2000_hrpd_present = false; + cdma2000_minus1x_rtt_present = false; +} + +// SCG-Config-r12-IEs ::= SEQUENCE +scg_cfg_r12_ies_s::scg_cfg_r12_ies_s() +{ + scg_radio_cfg_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_cfg_r12_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scg_radio_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (scg_radio_cfg_r12_present) { + HANDLE_CODE(scg_radio_cfg_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_r12_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scg_radio_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (scg_radio_cfg_r12_present) { + HANDLE_CODE(scg_radio_cfg_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_r12_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scg_radio_cfg_r12_present) { + j.write_fieldname("scg-RadioConfig-r12"); + scg_radio_cfg_r12.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// AS-ConfigNR-r15 ::= SEQUENCE +as_cfg_nr_r15_s::as_cfg_nr_r15_s() +{ + source_rb_cfg_nr_r15_present = false; + source_rb_cfg_sn_nr_r15_present = false; + source_other_cfg_sn_nr_r15_present = false; +} +SRSASN_CODE as_cfg_nr_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(source_rb_cfg_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(source_rb_cfg_sn_nr_r15_present, 1)); + HANDLE_CODE(bref.pack(source_other_cfg_sn_nr_r15_present, 1)); + + if (source_rb_cfg_nr_r15_present) { + HANDLE_CODE(source_rb_cfg_nr_r15.pack(bref)); + } + if (source_rb_cfg_sn_nr_r15_present) { + HANDLE_CODE(source_rb_cfg_sn_nr_r15.pack(bref)); + } + if (source_other_cfg_sn_nr_r15_present) { + HANDLE_CODE(source_other_cfg_sn_nr_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_nr_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(source_rb_cfg_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(source_rb_cfg_sn_nr_r15_present, 1)); + HANDLE_CODE(bref.unpack(source_other_cfg_sn_nr_r15_present, 1)); + + if (source_rb_cfg_nr_r15_present) { + HANDLE_CODE(source_rb_cfg_nr_r15.unpack(bref)); + } + if (source_rb_cfg_sn_nr_r15_present) { + HANDLE_CODE(source_rb_cfg_sn_nr_r15.unpack(bref)); + } + if (source_other_cfg_sn_nr_r15_present) { + HANDLE_CODE(source_other_cfg_sn_nr_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void as_cfg_nr_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (source_rb_cfg_nr_r15_present) { + j.write_str("sourceRB-ConfigNR-r15", source_rb_cfg_nr_r15.to_string()); + } + if (source_rb_cfg_sn_nr_r15_present) { + j.write_str("sourceRB-ConfigSN-NR-r15", source_rb_cfg_sn_nr_r15.to_string()); + } + if (source_other_cfg_sn_nr_r15_present) { + j.write_str("sourceOtherConfigSN-NR-r15", source_other_cfg_sn_nr_r15.to_string()); + } + j.end_obj(); +} + +// SCG-Config-r12 ::= SEQUENCE +SRSASN_CODE scg_cfg_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void scg_cfg_r12_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void scg_cfg_r12_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_"); + } +} +scg_cfg_r12_s::crit_exts_c_::crit_exts_c_(const scg_cfg_r12_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_"); + } +} +scg_cfg_r12_s::crit_exts_c_& scg_cfg_r12_s::crit_exts_c_::operator=(const scg_cfg_r12_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_"); + } + + return *this; +} +void scg_cfg_r12_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_cfg_r12_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_r12_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void scg_cfg_r12_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void scg_cfg_r12_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scg_cfg_r12: + j.write_fieldname("scg-Config-r12"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_cfg_r12_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::scg_cfg_r12: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_r12_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::scg_cfg_r12: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// AS-Config ::= SEQUENCE +as_cfg_s::as_cfg_s() +{ + ext = false; + source_sib_type1_ext_present = false; + source_scell_cfg_list_r10_present = false; + source_cfg_scg_r12_present = false; + as_cfg_nr_r15_present = false; +} +SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(source_meas_cfg.pack(bref)); + HANDLE_CODE(source_rr_cfg.pack(bref)); + HANDLE_CODE(source_security_algorithm_cfg.pack(bref)); + HANDLE_CODE(source_ue_id.pack(bref)); + HANDLE_CODE(source_mib.pack(bref)); + HANDLE_CODE(source_sib_type1.pack(bref)); + HANDLE_CODE(source_sib_type2.pack(bref)); + HANDLE_CODE(ant_info_common.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, source_dl_carrier_freq, (uint16_t)0, (uint16_t)65535)); + + if (ext) { + ext_groups_header group_flags(4); + group_flags[0] |= source_sib_type1_ext_present; + group_flags[0] |= source_other_cfg_r9.get() != NULL; + rrc_asn1_warn_assert(source_scell_cfg_list_r10_present != (source_scell_cfg_list_r10.get() != NULL), __FILE__, + __LINE__); + group_flags[1] |= source_scell_cfg_list_r10_present; + rrc_asn1_warn_assert(source_cfg_scg_r12_present != (source_cfg_scg_r12.get() != NULL), __FILE__, __LINE__); + group_flags[2] |= source_cfg_scg_r12_present; + rrc_asn1_warn_assert(as_cfg_nr_r15_present != (as_cfg_nr_r15.get() != NULL), __FILE__, __LINE__); + group_flags[3] |= as_cfg_nr_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(source_sib_type1_ext_present, 1)); + if (source_sib_type1_ext_present) { + HANDLE_CODE(source_sib_type1_ext.pack(bref)); + } + HANDLE_CODE(source_other_cfg_r9->pack(bref)); + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(source_scell_cfg_list_r10_present, 1)); + if (source_scell_cfg_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *source_scell_cfg_list_r10, 1, 4)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(source_cfg_scg_r12_present, 1)); + if (source_cfg_scg_r12_present) { + HANDLE_CODE(source_cfg_scg_r12->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(as_cfg_nr_r15_present, 1)); + if (as_cfg_nr_r15_present) { + HANDLE_CODE(as_cfg_nr_r15->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(source_meas_cfg.unpack(bref)); + HANDLE_CODE(source_rr_cfg.unpack(bref)); + HANDLE_CODE(source_security_algorithm_cfg.unpack(bref)); + HANDLE_CODE(source_ue_id.unpack(bref)); + HANDLE_CODE(source_mib.unpack(bref)); + HANDLE_CODE(source_sib_type1.unpack(bref)); + HANDLE_CODE(source_sib_type2.unpack(bref)); + HANDLE_CODE(ant_info_common.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(source_dl_carrier_freq, bref, (uint16_t)0, (uint16_t)65535)); + + if (ext) { + ext_groups_header group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(source_sib_type1_ext_present, 1)); + if (source_sib_type1_ext_present) { + HANDLE_CODE(source_sib_type1_ext.unpack(bref)); + } + source_other_cfg_r9 = make_copy_ptr(other_cfg_r9_s()); + HANDLE_CODE(source_other_cfg_r9->unpack(bref)); + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(source_scell_cfg_list_r10_present, 1)); + if (source_scell_cfg_list_r10_present) { + source_scell_cfg_list_r10 = make_copy_ptr(scell_to_add_mod_list_r10_l()); + HANDLE_CODE(unpack_dyn_seq_of(*source_scell_cfg_list_r10, bref, 1, 4)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(source_cfg_scg_r12_present, 1)); + if (source_cfg_scg_r12_present) { + source_cfg_scg_r12 = make_copy_ptr(scg_cfg_r12_s()); + HANDLE_CODE(source_cfg_scg_r12->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(as_cfg_nr_r15_present, 1)); + if (as_cfg_nr_r15_present) { + as_cfg_nr_r15 = make_copy_ptr(as_cfg_nr_r15_s()); + HANDLE_CODE(as_cfg_nr_r15->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void as_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sourceMeasConfig"); + source_meas_cfg.to_json(j); + j.write_fieldname("sourceRadioResourceConfig"); + source_rr_cfg.to_json(j); + j.write_fieldname("sourceSecurityAlgorithmConfig"); + source_security_algorithm_cfg.to_json(j); + j.write_str("sourceUE-Identity", source_ue_id.to_string()); + j.write_fieldname("sourceMasterInformationBlock"); + source_mib.to_json(j); + j.write_fieldname("sourceSystemInformationBlockType1"); + source_sib_type1.to_json(j); + j.write_fieldname("sourceSystemInformationBlockType2"); + source_sib_type2.to_json(j); + j.write_fieldname("antennaInfoCommon"); + ant_info_common.to_json(j); + j.write_int("sourceDl-CarrierFreq", source_dl_carrier_freq); + if (source_sib_type1_ext_present) { + j.write_str("sourceSystemInformationBlockType1Ext", source_sib_type1_ext.to_string()); + } + j.write_fieldname("sourceOtherConfig-r9"); + source_other_cfg_r9->to_json(j); + if (source_scell_cfg_list_r10_present) { + j.start_array("sourceSCellConfigList-r10"); + for (uint32_t i1 = 0; i1 < source_scell_cfg_list_r10->size(); ++i1) { + ((*source_scell_cfg_list_r10)[i1]).to_json(j); + } + j.end_array(); + } + if (source_cfg_scg_r12_present) { + j.write_fieldname("sourceConfigSCG-r12"); + source_cfg_scg_r12->to_json(j); + } + if (as_cfg_nr_r15_present) { + j.write_fieldname("as-ConfigNR-r15"); + as_cfg_nr_r15->to_json(j); + } + j.end_obj(); +} + +// AS-Config-v10j0 ::= SEQUENCE +as_cfg_v10j0_s::as_cfg_v10j0_s() +{ + ant_info_ded_pcell_v10i0_present = false; +} +SRSASN_CODE as_cfg_v10j0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ant_info_ded_pcell_v10i0_present, 1)); + + if (ant_info_ded_pcell_v10i0_present) { + HANDLE_CODE(ant_info_ded_pcell_v10i0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_v10j0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ant_info_ded_pcell_v10i0_present, 1)); + + if (ant_info_ded_pcell_v10i0_present) { + HANDLE_CODE(ant_info_ded_pcell_v10i0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void as_cfg_v10j0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ant_info_ded_pcell_v10i0_present) { + j.write_fieldname("antennaInfoDedicatedPCell-v10i0"); + ant_info_ded_pcell_v10i0.to_json(j); + } + j.end_obj(); +} + +// AS-Config-v1250 ::= SEQUENCE +as_cfg_v1250_s::as_cfg_v1250_s() +{ + source_wlan_offload_cfg_r12_present = false; + source_sl_comm_cfg_r12_present = false; + source_sl_disc_cfg_r12_present = false; +} +SRSASN_CODE as_cfg_v1250_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(source_wlan_offload_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(source_sl_comm_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(source_sl_disc_cfg_r12_present, 1)); + + if (source_wlan_offload_cfg_r12_present) { + HANDLE_CODE(source_wlan_offload_cfg_r12.pack(bref)); + } + if (source_sl_comm_cfg_r12_present) { + HANDLE_CODE(source_sl_comm_cfg_r12.pack(bref)); + } + if (source_sl_disc_cfg_r12_present) { + HANDLE_CODE(source_sl_disc_cfg_r12.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_v1250_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(source_wlan_offload_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(source_sl_comm_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(source_sl_disc_cfg_r12_present, 1)); + + if (source_wlan_offload_cfg_r12_present) { + HANDLE_CODE(source_wlan_offload_cfg_r12.unpack(bref)); + } + if (source_sl_comm_cfg_r12_present) { + HANDLE_CODE(source_sl_comm_cfg_r12.unpack(bref)); + } + if (source_sl_disc_cfg_r12_present) { + HANDLE_CODE(source_sl_disc_cfg_r12.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void as_cfg_v1250_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (source_wlan_offload_cfg_r12_present) { + j.write_fieldname("sourceWlan-OffloadConfig-r12"); + source_wlan_offload_cfg_r12.to_json(j); + } + if (source_sl_comm_cfg_r12_present) { + j.write_fieldname("sourceSL-CommConfig-r12"); + source_sl_comm_cfg_r12.to_json(j); + } + if (source_sl_disc_cfg_r12_present) { + j.write_fieldname("sourceSL-DiscConfig-r12"); + source_sl_disc_cfg_r12.to_json(j); + } + j.end_obj(); +} + +// AS-Config-v1320 ::= SEQUENCE +as_cfg_v1320_s::as_cfg_v1320_s() +{ + source_scell_cfg_list_r13_present = false; + source_rclwi_cfg_r13_present = false; +} +SRSASN_CODE as_cfg_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(source_scell_cfg_list_r13_present, 1)); + HANDLE_CODE(bref.pack(source_rclwi_cfg_r13_present, 1)); + + if (source_scell_cfg_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, source_scell_cfg_list_r13, 1, 31)); + } + if (source_rclwi_cfg_r13_present) { + HANDLE_CODE(source_rclwi_cfg_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(source_scell_cfg_list_r13_present, 1)); + HANDLE_CODE(bref.unpack(source_rclwi_cfg_r13_present, 1)); + + if (source_scell_cfg_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(source_scell_cfg_list_r13, bref, 1, 31)); + } + if (source_rclwi_cfg_r13_present) { + HANDLE_CODE(source_rclwi_cfg_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void as_cfg_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (source_scell_cfg_list_r13_present) { + j.start_array("sourceSCellConfigList-r13"); + for (uint32_t i1 = 0; i1 < source_scell_cfg_list_r13.size(); ++i1) { + source_scell_cfg_list_r13[i1].to_json(j); + } + j.end_array(); + } + if (source_rclwi_cfg_r13_present) { + j.write_fieldname("sourceRCLWI-Configuration-r13"); + source_rclwi_cfg_r13.to_json(j); + } + j.end_obj(); +} + +// AS-Config-v1430 ::= SEQUENCE +as_cfg_v1430_s::as_cfg_v1430_s() +{ + source_sl_v2x_comm_cfg_r14_present = false; + source_lwa_cfg_r14_present = false; + source_wlan_meas_result_r14_present = false; +} +SRSASN_CODE as_cfg_v1430_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(source_sl_v2x_comm_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(source_lwa_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(source_wlan_meas_result_r14_present, 1)); + + if (source_sl_v2x_comm_cfg_r14_present) { + HANDLE_CODE(source_sl_v2x_comm_cfg_r14.pack(bref)); + } + if (source_lwa_cfg_r14_present) { + HANDLE_CODE(source_lwa_cfg_r14.pack(bref)); + } + if (source_wlan_meas_result_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, source_wlan_meas_result_r14, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_v1430_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(source_sl_v2x_comm_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(source_lwa_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(source_wlan_meas_result_r14_present, 1)); + + if (source_sl_v2x_comm_cfg_r14_present) { + HANDLE_CODE(source_sl_v2x_comm_cfg_r14.unpack(bref)); + } + if (source_lwa_cfg_r14_present) { + HANDLE_CODE(source_lwa_cfg_r14.unpack(bref)); + } + if (source_wlan_meas_result_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(source_wlan_meas_result_r14, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void as_cfg_v1430_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (source_sl_v2x_comm_cfg_r14_present) { + j.write_fieldname("sourceSL-V2X-CommConfig-r14"); + source_sl_v2x_comm_cfg_r14.to_json(j); + } + if (source_lwa_cfg_r14_present) { + j.write_fieldname("sourceLWA-Config-r14"); + source_lwa_cfg_r14.to_json(j); + } + if (source_wlan_meas_result_r14_present) { + j.start_array("sourceWLAN-MeasResult-r14"); + for (uint32_t i1 = 0; i1 < source_wlan_meas_result_r14.size(); ++i1) { + source_wlan_meas_result_r14[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// AS-Config-v9e0 ::= SEQUENCE +SRSASN_CODE as_cfg_v9e0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, source_dl_carrier_freq_v9e0, (uint32_t)65536, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_cfg_v9e0_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(source_dl_carrier_freq_v9e0, bref, (uint32_t)65536, (uint32_t)262143)); + + return SRSASN_SUCCESS; +} +void as_cfg_v9e0_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sourceDl-CarrierFreq-v9e0", source_dl_carrier_freq_v9e0); + j.end_obj(); +} + +// AdditionalReestabInfo ::= SEQUENCE +SRSASN_CODE add_reestab_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cell_id.pack(bref)); + HANDLE_CODE(key_e_node_b_star.pack(bref)); + HANDLE_CODE(short_mac_i.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE add_reestab_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(cell_id.unpack(bref)); + HANDLE_CODE(key_e_node_b_star.unpack(bref)); + HANDLE_CODE(short_mac_i.unpack(bref)); + + return SRSASN_SUCCESS; +} +void add_reestab_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cellIdentity", cell_id.to_string()); + j.write_str("key-eNodeB-Star", key_e_node_b_star.to_string()); + j.write_str("shortMAC-I", short_mac_i.to_string()); + j.end_obj(); +} + +// ReestablishmentInfo ::= SEQUENCE +reest_info_s::reest_info_s() +{ + ext = false; + add_reestab_info_list_present = false; +} +SRSASN_CODE reest_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(add_reestab_info_list_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, source_pci, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(target_cell_short_mac_i.pack(bref)); + if (add_reestab_info_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, add_reestab_info_list, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE reest_info_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(add_reestab_info_list_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(source_pci, bref, (uint16_t)0, (uint16_t)503)); + 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_present) { + j.start_array("additionalReestabInfoList"); + for (uint32_t i1 = 0; i1 < add_reestab_info_list.size(); ++i1) { + add_reestab_info_list[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// AS-Context ::= SEQUENCE +as_context_s::as_context_s() +{ + reest_info_present = false; +} +SRSASN_CODE as_context_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reest_info_present, 1)); + + if (reest_info_present) { + HANDLE_CODE(reest_info.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_context_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reest_info_present, 1)); + + if (reest_info_present) { + HANDLE_CODE(reest_info.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); + } + j.end_obj(); +} + +// AS-Context-v1130 ::= SEQUENCE +as_context_v1130_s::as_context_v1130_s() +{ + ext = false; + idc_ind_r11_present = false; + mbms_interest_ind_r11_present = false; + pwr_pref_ind_r11_present = false; + sidelink_ue_info_r12_present = false; + source_context_en_dc_r15_present = false; +} +SRSASN_CODE as_context_v1130_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(idc_ind_r11_present, 1)); + HANDLE_CODE(bref.pack(mbms_interest_ind_r11_present, 1)); + HANDLE_CODE(bref.pack(pwr_pref_ind_r11_present, 1)); + + if (idc_ind_r11_present) { + HANDLE_CODE(idc_ind_r11.pack(bref)); + } + if (mbms_interest_ind_r11_present) { + HANDLE_CODE(mbms_interest_ind_r11.pack(bref)); + } + if (pwr_pref_ind_r11_present) { + HANDLE_CODE(pwr_pref_ind_r11.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags[0] |= sidelink_ue_info_r12_present; + group_flags[1] |= source_context_en_dc_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sidelink_ue_info_r12_present, 1)); + if (sidelink_ue_info_r12_present) { + HANDLE_CODE(sidelink_ue_info_r12.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(source_context_en_dc_r15_present, 1)); + if (source_context_en_dc_r15_present) { + HANDLE_CODE(source_context_en_dc_r15.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE as_context_v1130_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(idc_ind_r11_present, 1)); + HANDLE_CODE(bref.unpack(mbms_interest_ind_r11_present, 1)); + HANDLE_CODE(bref.unpack(pwr_pref_ind_r11_present, 1)); + + if (idc_ind_r11_present) { + HANDLE_CODE(idc_ind_r11.unpack(bref)); + } + if (mbms_interest_ind_r11_present) { + HANDLE_CODE(mbms_interest_ind_r11.unpack(bref)); + } + if (pwr_pref_ind_r11_present) { + HANDLE_CODE(pwr_pref_ind_r11.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sidelink_ue_info_r12_present, 1)); + if (sidelink_ue_info_r12_present) { + HANDLE_CODE(sidelink_ue_info_r12.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(source_context_en_dc_r15_present, 1)); + if (source_context_en_dc_r15_present) { + HANDLE_CODE(source_context_en_dc_r15.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void as_context_v1130_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idc_ind_r11_present) { + j.write_str("idc-Indication-r11", idc_ind_r11.to_string()); + } + if (mbms_interest_ind_r11_present) { + j.write_str("mbmsInterestIndication-r11", mbms_interest_ind_r11.to_string()); + } + if (pwr_pref_ind_r11_present) { + j.write_str("powerPrefIndication-r11", pwr_pref_ind_r11.to_string()); + } + if (sidelink_ue_info_r12_present) { + j.write_str("sidelinkUEInformation-r12", sidelink_ue_info_r12.to_string()); + } + if (source_context_en_dc_r15_present) { + j.write_str("sourceContextEN-DC-r15", source_context_en_dc_r15.to_string()); + } + j.end_obj(); +} + +// AS-Context-v1320 ::= SEQUENCE +as_context_v1320_s::as_context_v1320_s() +{ + wlan_conn_status_report_r13_present = false; +} +SRSASN_CODE as_context_v1320_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(wlan_conn_status_report_r13_present, 1)); + + if (wlan_conn_status_report_r13_present) { + HANDLE_CODE(wlan_conn_status_report_r13.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE as_context_v1320_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(wlan_conn_status_report_r13_present, 1)); + + if (wlan_conn_status_report_r13_present) { + HANDLE_CODE(wlan_conn_status_report_r13.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void as_context_v1320_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_conn_status_report_r13_present) { + j.write_str("wlanConnectionStatusReport-r13", wlan_conn_status_report_r13.to_string()); + } + j.end_obj(); +} + +// CandidateCellInfo-r10 ::= SEQUENCE +candidate_cell_info_r10_s::candidate_cell_info_r10_s() +{ + ext = false; + rsrp_result_r10_present = false; + rsrq_result_r10_present = false; + dl_carrier_freq_v1090_present = false; + rsrq_result_v1250_present = false; + rs_sinr_result_r13_present = false; +} +SRSASN_CODE candidate_cell_info_r10_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rsrp_result_r10_present, 1)); + HANDLE_CODE(bref.pack(rsrq_result_r10_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, pci_r10, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_r10, (uint16_t)0, (uint16_t)65535)); + if (rsrp_result_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrp_result_r10, (uint8_t)0, (uint8_t)97)); + } + if (rsrq_result_r10_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrq_result_r10, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags[0] |= dl_carrier_freq_v1090_present; + group_flags[1] |= rsrq_result_v1250_present; + group_flags[2] |= rs_sinr_result_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(dl_carrier_freq_v1090_present, 1)); + if (dl_carrier_freq_v1090_present) { + HANDLE_CODE(pack_unalign_integer(bref, dl_carrier_freq_v1090, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rsrq_result_v1250_present, 1)); + if (rsrq_result_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, rsrq_result_v1250, (int8_t)-30, (int8_t)46)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(rs_sinr_result_r13_present, 1)); + if (rs_sinr_result_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE candidate_cell_info_r10_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rsrp_result_r10_present, 1)); + HANDLE_CODE(bref.unpack(rsrq_result_r10_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(pci_r10, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_r10, bref, (uint16_t)0, (uint16_t)65535)); + if (rsrp_result_r10_present) { + HANDLE_CODE(unpack_unalign_integer(rsrp_result_r10, bref, (uint8_t)0, (uint8_t)97)); + } + if (rsrq_result_r10_present) { + HANDLE_CODE(unpack_unalign_integer(rsrq_result_r10, bref, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(dl_carrier_freq_v1090_present, 1)); + if (dl_carrier_freq_v1090_present) { + HANDLE_CODE(unpack_unalign_integer(dl_carrier_freq_v1090, bref, (uint32_t)65536, (uint32_t)262143)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rsrq_result_v1250_present, 1)); + if (rsrq_result_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(rsrq_result_v1250, bref, (int8_t)-30, (int8_t)46)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(rs_sinr_result_r13_present, 1)); + if (rs_sinr_result_r13_present) { + HANDLE_CODE(unpack_unalign_integer(rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +void candidate_cell_info_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r10", pci_r10); + j.write_int("dl-CarrierFreq-r10", dl_carrier_freq_r10); + if (rsrp_result_r10_present) { + j.write_int("rsrpResult-r10", rsrp_result_r10); + } + if (rsrq_result_r10_present) { + j.write_int("rsrqResult-r10", rsrq_result_r10); + } + if (dl_carrier_freq_v1090_present) { + j.write_int("dl-CarrierFreq-v1090", dl_carrier_freq_v1090); + } + if (rsrq_result_v1250_present) { + j.write_int("rsrqResult-v1250", rsrq_result_v1250); + } + if (rs_sinr_result_r13_present) { + j.write_int("rs-sinr-Result-r13", rs_sinr_result_r13); + } + j.end_obj(); +} + +// Cell-ToAddMod-r12 ::= SEQUENCE +cell_to_add_mod_r12_s::cell_to_add_mod_r12_s() +{ + ext = false; + cell_identif_r12_present = false; + meas_result_cell_to_add_r12_present = false; + s_cell_idx_r13_present = false; + meas_result_cell_to_add_v1310_present = false; +} +SRSASN_CODE cell_to_add_mod_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_identif_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_cell_to_add_r12_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, s_cell_idx_r12, (uint8_t)1, (uint8_t)7)); + if (cell_identif_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r12.pci_r12, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(pack_unalign_integer(bref, cell_identif_r12.dl_carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + } + if (meas_result_cell_to_add_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_result_cell_to_add_r12.rsrp_result_r12, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_cell_to_add_r12.rsrq_result_r12, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= s_cell_idx_r13_present; + rrc_asn1_warn_assert(meas_result_cell_to_add_v1310_present != (meas_result_cell_to_add_v1310.get() != NULL), + __FILE__, __LINE__); + group_flags[0] |= meas_result_cell_to_add_v1310_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(s_cell_idx_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_cell_to_add_v1310_present, 1)); + if (s_cell_idx_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, s_cell_idx_r13, (uint8_t)1, (uint8_t)31)); + } + if (meas_result_cell_to_add_v1310_present) { + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_cell_to_add_v1310->rs_sinr_result_r13, (uint8_t)0, (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_to_add_mod_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_identif_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_cell_to_add_r12_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(s_cell_idx_r12, bref, (uint8_t)1, (uint8_t)7)); + if (cell_identif_r12_present) { + HANDLE_CODE(unpack_unalign_integer(cell_identif_r12.pci_r12, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(unpack_unalign_integer(cell_identif_r12.dl_carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + } + if (meas_result_cell_to_add_r12_present) { + HANDLE_CODE(unpack_unalign_integer(meas_result_cell_to_add_r12.rsrp_result_r12, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_cell_to_add_r12.rsrq_result_r12, bref, (uint8_t)0, (uint8_t)34)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(s_cell_idx_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_cell_to_add_v1310_present, 1)); + if (s_cell_idx_r13_present) { + HANDLE_CODE(unpack_unalign_integer(s_cell_idx_r13, bref, (uint8_t)1, (uint8_t)31)); + } + if (meas_result_cell_to_add_v1310_present) { + meas_result_cell_to_add_v1310 = make_copy_ptr(meas_result_cell_to_add_v1310_s_()); + HANDLE_CODE( + unpack_unalign_integer(meas_result_cell_to_add_v1310->rs_sinr_result_r13, bref, (uint8_t)0, (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +void cell_to_add_mod_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sCellIndex-r12", s_cell_idx_r12); + if (cell_identif_r12_present) { + j.write_fieldname("cellIdentification-r12"); + j.start_obj(); + j.write_int("physCellId-r12", cell_identif_r12.pci_r12); + j.write_int("dl-CarrierFreq-r12", cell_identif_r12.dl_carrier_freq_r12); + j.end_obj(); + } + if (meas_result_cell_to_add_r12_present) { + j.write_fieldname("measResultCellToAdd-r12"); + j.start_obj(); + j.write_int("rsrpResult-r12", meas_result_cell_to_add_r12.rsrp_result_r12); + j.write_int("rsrqResult-r12", meas_result_cell_to_add_r12.rsrq_result_r12); + j.end_obj(); + } + if (s_cell_idx_r13_present) { + j.write_int("sCellIndex-r13", s_cell_idx_r13); + } + if (meas_result_cell_to_add_v1310_present) { + j.write_fieldname("measResultCellToAdd-v1310"); + j.start_obj(); + j.write_int("rs-sinr-Result-r13", meas_result_cell_to_add_v1310->rs_sinr_result_r13); + j.end_obj(); + } + j.end_obj(); +} + +void cells_triggered_list_item_c_::destroy_() +{ + switch (type_) { + case types::pci_utra: + c.destroy(); + break; + case types::pci_geran: + c.destroy(); + break; + case types::wlan_ids_r13: + c.destroy(); + break; + case types::pci_nr_r15: + c.destroy(); + break; + default: + break; + } +} +void cells_triggered_list_item_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::pci_eutra: + break; + case types::pci_utra: + c.init(); + break; + case types::pci_geran: + c.init(); + break; + case types::pci_cdma2000: + break; + case types::wlan_ids_r13: + c.init(); + break; + case types::pci_nr_r15: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_"); + } +} +cells_triggered_list_item_c_::cells_triggered_list_item_c_(const cells_triggered_list_item_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::pci_eutra: + c.init(other.c.get()); + break; + case types::pci_utra: + c.init(other.c.get()); + break; + case types::pci_geran: + c.init(other.c.get()); + break; + case types::pci_cdma2000: + c.init(other.c.get()); + break; + case types::wlan_ids_r13: + c.init(other.c.get()); + break; + case types::pci_nr_r15: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_"); + } +} +cells_triggered_list_item_c_& cells_triggered_list_item_c_::operator=(const cells_triggered_list_item_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pci_eutra: + c.set(other.c.get()); + break; + case types::pci_utra: + c.set(other.c.get()); + break; + case types::pci_geran: + c.set(other.c.get()); + break; + case types::pci_cdma2000: + c.set(other.c.get()); + break; + case types::wlan_ids_r13: + c.set(other.c.get()); + break; + case types::pci_nr_r15: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_"); + } + + return *this; +} +void cells_triggered_list_item_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pci_eutra: + j.write_int("physCellIdEUTRA", c.get()); + break; + case types::pci_utra: + j.write_fieldname("physCellIdUTRA"); + c.get().to_json(j); + break; + case types::pci_geran: + j.write_fieldname("physCellIdGERAN"); + j.start_obj(); + j.write_fieldname("carrierFreq"); + c.get().carrier_freq.to_json(j); + j.write_fieldname("physCellId"); + c.get().pci.to_json(j); + j.end_obj(); + break; + case types::pci_cdma2000: + j.write_int("physCellIdCDMA2000", c.get()); + break; + case types::wlan_ids_r13: + j.write_fieldname("wlan-Identifiers-r13"); + c.get().to_json(j); + break; + case types::pci_nr_r15: + j.write_fieldname("physCellIdNR-r15"); + j.start_obj(); + j.write_int("carrierFreq", c.get().carrier_freq); + j.write_int("physCellId", c.get().pci); + if (c.get().rs_idx_list_r15_present) { + j.start_array("rs-IndexList-r15"); + for (uint32_t i1 = 0; i1 < c.get().rs_idx_list_r15.size(); ++i1) { + j.write_int(c.get().rs_idx_list_r15[i1]); + } + j.end_array(); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_"); + } + j.end_obj(); +} +SRSASN_CODE cells_triggered_list_item_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::pci_eutra: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)503)); + break; + case types::pci_utra: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_geran: + HANDLE_CODE(c.get().carrier_freq.pack(bref)); + HANDLE_CODE(c.get().pci.pack(bref)); + break; + case types::pci_cdma2000: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::wlan_ids_r13: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_nr_r15: + HANDLE_CODE(bref.pack(c.get().rs_idx_list_r15_present, 1)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().carrier_freq, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(pack_unalign_integer(bref, c.get().pci, (uint16_t)0, (uint16_t)1007)); + if (c.get().rs_idx_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().rs_idx_list_r15, 1, 64, + UnalignedIntegerPacker(0, 63))); + } + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_triggered_list_item_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::pci_eutra: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)503)); + break; + case types::pci_utra: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_geran: + HANDLE_CODE(c.get().carrier_freq.unpack(bref)); + HANDLE_CODE(c.get().pci.unpack(bref)); + break; + case types::pci_cdma2000: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::wlan_ids_r13: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_nr_r15: + HANDLE_CODE(bref.unpack(c.get().rs_idx_list_r15_present, 1)); + HANDLE_CODE(unpack_unalign_integer(c.get().carrier_freq, bref, (uint32_t)0, (uint32_t)3279165)); + HANDLE_CODE(unpack_unalign_integer(c.get().pci, bref, (uint16_t)0, (uint16_t)1007)); + if (c.get().rs_idx_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().rs_idx_list_r15, bref, 1, 64, + UnalignedIntegerPacker(0, 63))); + } + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void cells_triggered_list_item_c_::pci_utra_c_::destroy_() {} +void cells_triggered_list_item_c_::pci_utra_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +cells_triggered_list_item_c_::pci_utra_c_::pci_utra_c_(const cells_triggered_list_item_c_::pci_utra_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdd: + c.init(other.c.get()); + break; + case types::tdd: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_::pci_utra_c_"); + } +} +cells_triggered_list_item_c_::pci_utra_c_& cells_triggered_list_item_c_::pci_utra_c_:: + operator=(const cells_triggered_list_item_c_::pci_utra_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdd: + c.set(other.c.get()); + break; + case types::tdd: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_::pci_utra_c_"); + } + + return *this; +} +void cells_triggered_list_item_c_::pci_utra_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdd: + j.write_int("fdd", c.get()); + break; + case types::tdd: + j.write_int("tdd", c.get()); + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_::pci_utra_c_"); + } + j.end_obj(); +} +SRSASN_CODE cells_triggered_list_item_c_::pci_utra_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::fdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint16_t)0, (uint16_t)511)); + break; + case types::tdd: + HANDLE_CODE(pack_unalign_integer(bref, c.get(), (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_::pci_utra_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_triggered_list_item_c_::pci_utra_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::fdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint16_t)0, (uint16_t)511)); + break; + case types::tdd: + HANDLE_CODE(unpack_unalign_integer(c.get(), bref, (uint8_t)0, (uint8_t)127)); + break; + default: + log_invalid_choice_id(type_, "cells_triggered_list_item_c_::pci_utra_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +cells_triggered_list_item_c_::pci_nr_r15_s_::pci_nr_r15_s_() +{ + rs_idx_list_r15_present = false; +} + +// DRB-InfoSCG-r12 ::= SEQUENCE +drb_info_scg_r12_s::drb_info_scg_r12_s() +{ + ext = false; + eps_bearer_id_r12_present = false; + drb_type_r12_present = false; +} +SRSASN_CODE drb_info_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(eps_bearer_id_r12_present, 1)); + HANDLE_CODE(bref.pack(drb_type_r12_present, 1)); + + if (eps_bearer_id_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, eps_bearer_id_r12, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(pack_unalign_integer(bref, drb_id_r12, (uint8_t)1, (uint8_t)32)); + if (drb_type_r12_present) { + HANDLE_CODE(pack_enum(bref, drb_type_r12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_info_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(eps_bearer_id_r12_present, 1)); + HANDLE_CODE(bref.unpack(drb_type_r12_present, 1)); + + if (eps_bearer_id_r12_present) { + HANDLE_CODE(unpack_unalign_integer(eps_bearer_id_r12, bref, (uint8_t)0, (uint8_t)15)); + } + HANDLE_CODE(unpack_unalign_integer(drb_id_r12, bref, (uint8_t)1, (uint8_t)32)); + if (drb_type_r12_present) { + HANDLE_CODE(unpack_enum(drb_type_r12, bref)); + } + + return SRSASN_SUCCESS; +} +void drb_info_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eps_bearer_id_r12_present) { + j.write_int("eps-BearerIdentity-r12", eps_bearer_id_r12); + } + j.write_int("drb-Identity-r12", drb_id_r12); + if (drb_type_r12_present) { + j.write_str("drb-Type-r12", drb_type_r12.to_string()); + } + j.end_obj(); +} + +// HandoverCommand-r8-IEs ::= SEQUENCE +ho_cmd_r8_ies_s::ho_cmd_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ho_cmd_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ho_cmd_msg.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_cmd_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ho_cmd_msg.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ho_cmd_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("handoverCommandMessage", ho_cmd_msg.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// HandoverCommand ::= SEQUENCE +SRSASN_CODE ho_cmd_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_cmd_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ho_cmd_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ho_cmd_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ho_cmd_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_"); + } +} +ho_cmd_s::crit_exts_c_::crit_exts_c_(const ho_cmd_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_"); + } +} +ho_cmd_s::crit_exts_c_& ho_cmd_s::crit_exts_c_::operator=(const ho_cmd_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_"); + } + + return *this; +} +void ho_cmd_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ho_cmd_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_cmd_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ho_cmd_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ho_cmd_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ho_cmd_r8: + j.write_fieldname("handoverCommand-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ho_cmd_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ho_cmd_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_cmd_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ho_cmd_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_cmd_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// HandoverPreparationInformation-v1430-IEs ::= SEQUENCE +ho_prep_info_v1430_ies_s::ho_prep_info_v1430_ies_s() +{ + as_cfg_v1430_present = false; + make_before_break_req_r14_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(as_cfg_v1430_present, 1)); + HANDLE_CODE(bref.pack(make_before_break_req_r14_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (as_cfg_v1430_present) { + HANDLE_CODE(as_cfg_v1430.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(as_cfg_v1430_present, 1)); + HANDLE_CODE(bref.unpack(make_before_break_req_r14_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (as_cfg_v1430_present) { + HANDLE_CODE(as_cfg_v1430.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (as_cfg_v1430_present) { + j.write_fieldname("as-Config-v1430"); + as_cfg_v1430.to_json(j); + } + if (make_before_break_req_r14_present) { + j.write_str("makeBeforeBreakReq-r14", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v1320-IEs ::= SEQUENCE +ho_prep_info_v1320_ies_s::ho_prep_info_v1320_ies_s() +{ + as_cfg_v1320_present = false; + as_context_v1320_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v1320_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(as_cfg_v1320_present, 1)); + HANDLE_CODE(bref.pack(as_context_v1320_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (as_cfg_v1320_present) { + HANDLE_CODE(as_cfg_v1320.pack(bref)); + } + if (as_context_v1320_present) { + HANDLE_CODE(as_context_v1320.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v1320_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(as_cfg_v1320_present, 1)); + HANDLE_CODE(bref.unpack(as_context_v1320_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (as_cfg_v1320_present) { + HANDLE_CODE(as_cfg_v1320.unpack(bref)); + } + if (as_context_v1320_present) { + HANDLE_CODE(as_context_v1320.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v1320_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (as_cfg_v1320_present) { + j.write_fieldname("as-Config-v1320"); + as_cfg_v1320.to_json(j); + } + if (as_context_v1320_present) { + j.write_fieldname("as-Context-v1320"); + as_context_v1320.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v1250-IEs ::= SEQUENCE +ho_prep_info_v1250_ies_s::ho_prep_info_v1250_ies_s() +{ + ue_supported_earfcn_r12_present = false; + as_cfg_v1250_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v1250_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_supported_earfcn_r12_present, 1)); + HANDLE_CODE(bref.pack(as_cfg_v1250_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_supported_earfcn_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, ue_supported_earfcn_r12, (uint32_t)0, (uint32_t)262143)); + } + if (as_cfg_v1250_present) { + HANDLE_CODE(as_cfg_v1250.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v1250_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_supported_earfcn_r12_present, 1)); + HANDLE_CODE(bref.unpack(as_cfg_v1250_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_supported_earfcn_r12_present) { + HANDLE_CODE(unpack_unalign_integer(ue_supported_earfcn_r12, bref, (uint32_t)0, (uint32_t)262143)); + } + if (as_cfg_v1250_present) { + HANDLE_CODE(as_cfg_v1250.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v1250_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_supported_earfcn_r12_present) { + j.write_int("ue-SupportedEARFCN-r12", ue_supported_earfcn_r12); + } + if (as_cfg_v1250_present) { + j.write_fieldname("as-Config-v1250"); + as_cfg_v1250.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE +ho_prep_info_v10j0_ies_s::ho_prep_info_v10j0_ies_s() +{ + as_cfg_v10j0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v10j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(as_cfg_v10j0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (as_cfg_v10j0_present) { + HANDLE_CODE(as_cfg_v10j0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v10j0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(as_cfg_v10j0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (as_cfg_v10j0_present) { + HANDLE_CODE(as_cfg_v10j0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v10j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (as_cfg_v10j0_present) { + j.write_fieldname("as-Config-v10j0"); + as_cfg_v10j0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v1130-IEs ::= SEQUENCE +ho_prep_info_v1130_ies_s::ho_prep_info_v1130_ies_s() +{ + as_context_v1130_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v1130_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(as_context_v1130_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (as_context_v1130_present) { + HANDLE_CODE(as_context_v1130.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v1130_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(as_context_v1130_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (as_context_v1130_present) { + HANDLE_CODE(as_context_v1130.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v1130_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (as_context_v1130_present) { + j.write_fieldname("as-Context-v1130"); + as_context_v1130.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v9e0-IEs ::= SEQUENCE +ho_prep_info_v9e0_ies_s::ho_prep_info_v9e0_ies_s() +{ + as_cfg_v9e0_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v9e0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(as_cfg_v9e0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (as_cfg_v9e0_present) { + HANDLE_CODE(as_cfg_v9e0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v9e0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(as_cfg_v9e0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (as_cfg_v9e0_present) { + HANDLE_CODE(as_cfg_v9e0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v9e0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (as_cfg_v9e0_present) { + j.write_fieldname("as-Config-v9e0"); + as_cfg_v9e0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE +ho_prep_info_v9j0_ies_s::ho_prep_info_v9j0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v9j0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v9j0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v9j0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE +ho_prep_info_v9d0_ies_s::ho_prep_info_v9d0_ies_s() +{ + late_non_crit_ext_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v9d0_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v9d0_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v9d0_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext_present) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation-v920-IEs ::= SEQUENCE +ho_prep_info_v920_ies_s::ho_prep_info_v920_ies_s() +{ + ue_cfg_release_r9_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v920_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_cfg_release_r9_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_cfg_release_r9_present) { + HANDLE_CODE(pack_enum(bref, ue_cfg_release_r9)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v920_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_cfg_release_r9_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_cfg_release_r9_present) { + HANDLE_CODE(unpack_enum(ue_cfg_release_r9, bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v920_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_cfg_release_r9_present) { + j.write_str("ue-ConfigRelease-r9", ue_cfg_release_r9.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRM-Config ::= SEQUENCE +rrm_cfg_s::rrm_cfg_s() +{ + ext = false; + ue_inactive_time_present = false; + candidate_cell_info_list_r10_present = false; + candidate_cell_info_list_nr_r15_present = false; +} +SRSASN_CODE rrm_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ue_inactive_time_present, 1)); + + if (ue_inactive_time_present) { + HANDLE_CODE(pack_enum(bref, ue_inactive_time)); + } + + if (ext) { + ext_groups_header group_flags(2); + rrc_asn1_warn_assert(candidate_cell_info_list_r10_present != (candidate_cell_info_list_r10.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= candidate_cell_info_list_r10_present; + rrc_asn1_warn_assert(candidate_cell_info_list_nr_r15_present != (candidate_cell_info_list_nr_r15.get() != NULL), + __FILE__, __LINE__); + group_flags[1] |= candidate_cell_info_list_nr_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(candidate_cell_info_list_r10_present, 1)); + if (candidate_cell_info_list_r10_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *candidate_cell_info_list_r10, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(candidate_cell_info_list_nr_r15_present, 1)); + if (candidate_cell_info_list_nr_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *candidate_cell_info_list_nr_r15, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrm_cfg_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ue_inactive_time_present, 1)); + + if (ue_inactive_time_present) { + HANDLE_CODE(unpack_enum(ue_inactive_time, bref)); + } + + if (ext) { + ext_groups_header group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(candidate_cell_info_list_r10_present, 1)); + if (candidate_cell_info_list_r10_present) { + candidate_cell_info_list_r10 = make_copy_ptr(candidate_cell_info_list_r10_l()); + HANDLE_CODE(unpack_dyn_seq_of(*candidate_cell_info_list_r10, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(candidate_cell_info_list_nr_r15_present, 1)); + if (candidate_cell_info_list_nr_r15_present) { + candidate_cell_info_list_nr_r15 = make_copy_ptr(meas_result_serv_freq_list_nr_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*candidate_cell_info_list_nr_r15, bref, 1, 32)); + } + } + } + return SRSASN_SUCCESS; +} +void rrm_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_inactive_time_present) { + j.write_str("ue-InactiveTime", ue_inactive_time.to_string()); + } + if (candidate_cell_info_list_r10_present) { + j.start_array("candidateCellInfoList-r10"); + for (uint32_t i1 = 0; i1 < candidate_cell_info_list_r10->size(); ++i1) { + ((*candidate_cell_info_list_r10)[i1]).to_json(j); + } + j.end_array(); + } + if (candidate_cell_info_list_nr_r15_present) { + j.start_array("candidateCellInfoListNR-r15"); + for (uint32_t i1 = 0; i1 < candidate_cell_info_list_nr_r15->size(); ++i1) { + ((*candidate_cell_info_list_nr_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// HandoverPreparationInformation-r8-IEs ::= SEQUENCE +ho_prep_info_r8_ies_s::ho_prep_info_r8_ies_s() +{ + as_cfg_present = false; + rrm_cfg_present = false; + as_context_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(as_cfg_present, 1)); + HANDLE_CODE(bref.pack(rrm_cfg_present, 1)); + HANDLE_CODE(bref.pack(as_context_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, ue_radio_access_cap_info, 0, 8)); + if (as_cfg_present) { + HANDLE_CODE(as_cfg.pack(bref)); + } + if (rrm_cfg_present) { + HANDLE_CODE(rrm_cfg.pack(bref)); + } + if (as_context_present) { + HANDLE_CODE(as_context.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(as_cfg_present, 1)); + HANDLE_CODE(bref.unpack(rrm_cfg_present, 1)); + HANDLE_CODE(bref.unpack(as_context_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(ue_radio_access_cap_info, bref, 0, 8)); + if (as_cfg_present) { + HANDLE_CODE(as_cfg.unpack(bref)); + } + if (rrm_cfg_present) { + HANDLE_CODE(rrm_cfg.unpack(bref)); + } + if (as_context_present) { + HANDLE_CODE(as_context.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("ue-RadioAccessCapabilityInfo"); + for (uint32_t i1 = 0; i1 < ue_radio_access_cap_info.size(); ++i1) { + ue_radio_access_cap_info[i1].to_json(j); + } + j.end_array(); + if (as_cfg_present) { + j.write_fieldname("as-Config"); + as_cfg.to_json(j); + } + if (rrm_cfg_present) { + j.write_fieldname("rrm-Config"); + rrm_cfg.to_json(j); + } + if (as_context_present) { + j.write_fieldname("as-Context"); + as_context.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// HandoverPreparationInformation ::= SEQUENCE +SRSASN_CODE ho_prep_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ho_prep_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ho_prep_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ho_prep_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_"); + } +} +ho_prep_info_s::crit_exts_c_::crit_exts_c_(const ho_prep_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_"); + } +} +ho_prep_info_s::crit_exts_c_& ho_prep_info_s::crit_exts_c_::operator=(const ho_prep_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_"); + } + + return *this; +} +void ho_prep_info_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ho_prep_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ho_prep_info_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ho_prep_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ho_prep_info_r8: + j.write_fieldname("handoverPreparationInformation-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ho_prep_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ho_prep_info_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ho_prep_info_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ho_prep_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// HandoverPreparationInformation-v1530-IEs ::= SEQUENCE +ho_prep_info_v1530_ies_s::ho_prep_info_v1530_ies_s() +{ + ran_notif_area_info_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ho_prep_info_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ran_notif_area_info_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ran_notif_area_info_r15_present) { + HANDLE_CODE(ran_notif_area_info_r15.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ho_prep_info_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ran_notif_area_info_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ran_notif_area_info_r15_present) { + HANDLE_CODE(ran_notif_area_info_r15.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ho_prep_info_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ran_notif_area_info_r15_present) { + j.write_fieldname("ran-NotificationAreaInfo-r15"); + ran_notif_area_info_r15.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// TDD-ConfigSL-r12 ::= SEQUENCE +SRSASN_CODE tdd_cfg_sl_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sf_assign_sl_r12)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tdd_cfg_sl_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sf_assign_sl_r12, bref)); + + return SRSASN_SUCCESS; +} +void tdd_cfg_sl_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("subframeAssignmentSL-r12", sf_assign_sl_r12.to_string()); + j.end_obj(); +} + +// MasterInformationBlock-SL ::= SEQUENCE +SRSASN_CODE mib_sl_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sl_bw_r12)); + HANDLE_CODE(tdd_cfg_sl_r12.pack(bref)); + HANDLE_CODE(direct_frame_num_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, direct_sf_num_r12, (uint8_t)0, (uint8_t)9)); + HANDLE_CODE(bref.pack(in_coverage_r12, 1)); + HANDLE_CODE(reserved_r12.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mib_sl_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sl_bw_r12, bref)); + HANDLE_CODE(tdd_cfg_sl_r12.unpack(bref)); + HANDLE_CODE(direct_frame_num_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(direct_sf_num_r12, bref, (uint8_t)0, (uint8_t)9)); + HANDLE_CODE(bref.unpack(in_coverage_r12, 1)); + HANDLE_CODE(reserved_r12.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mib_sl_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-Bandwidth-r12", sl_bw_r12.to_string()); + j.write_fieldname("tdd-ConfigSL-r12"); + tdd_cfg_sl_r12.to_json(j); + j.write_str("directFrameNumber-r12", direct_frame_num_r12.to_string()); + j.write_int("directSubframeNumber-r12", direct_sf_num_r12); + j.write_bool("inCoverage-r12", in_coverage_r12); + j.write_str("reserved-r12", reserved_r12.to_string()); + j.end_obj(); +} + +// MasterInformationBlock-SL-V2X-r14 ::= SEQUENCE +SRSASN_CODE mib_sl_v2x_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_enum(bref, sl_bw_r14)); + HANDLE_CODE(tdd_cfg_sl_r14.pack(bref)); + HANDLE_CODE(direct_frame_num_r14.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, direct_sf_num_r14, (uint8_t)0, (uint8_t)9)); + HANDLE_CODE(bref.pack(in_coverage_r14, 1)); + HANDLE_CODE(reserved_r14.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mib_sl_v2x_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_enum(sl_bw_r14, bref)); + HANDLE_CODE(tdd_cfg_sl_r14.unpack(bref)); + HANDLE_CODE(direct_frame_num_r14.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(direct_sf_num_r14, bref, (uint8_t)0, (uint8_t)9)); + HANDLE_CODE(bref.unpack(in_coverage_r14, 1)); + HANDLE_CODE(reserved_r14.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mib_sl_v2x_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-Bandwidth-r14", sl_bw_r14.to_string()); + j.write_fieldname("tdd-ConfigSL-r14"); + tdd_cfg_sl_r14.to_json(j); + j.write_str("directFrameNumber-r14", direct_frame_num_r14.to_string()); + j.write_int("directSubframeNumber-r14", direct_sf_num_r14); + j.write_bool("inCoverage-r14", in_coverage_r14); + j.write_str("reserved-r14", reserved_r14.to_string()); + j.end_obj(); +} + +// MeasResultRSSI-SCG-r13 ::= SEQUENCE +SRSASN_CODE meas_result_rssi_scg_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, serv_cell_id_r13, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(meas_result_for_rssi_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_rssi_scg_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(serv_cell_id_r13, bref, (uint8_t)0, (uint8_t)31)); + HANDLE_CODE(meas_result_for_rssi_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_result_rssi_scg_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellId-r13", serv_cell_id_r13); + j.write_fieldname("measResultForRSSI-r13"); + meas_result_for_rssi_r13.to_json(j); + j.end_obj(); +} + +// MeasResultServCellSCG-r12 ::= SEQUENCE +meas_result_serv_cell_scg_r12_s::meas_result_serv_cell_scg_r12_s() +{ + ext = false; + serv_cell_id_r13_present = false; + meas_result_scell_v1310_present = false; +} +SRSASN_CODE meas_result_serv_cell_scg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_unalign_integer(bref, serv_cell_id_r12, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r12.rsrp_result_scell_r12, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(pack_unalign_integer(bref, meas_result_scell_r12.rsrq_result_scell_r12, (uint8_t)0, (uint8_t)34)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= serv_cell_id_r13_present; + rrc_asn1_warn_assert(meas_result_scell_v1310_present != (meas_result_scell_v1310.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= meas_result_scell_v1310_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(serv_cell_id_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_scell_v1310_present, 1)); + if (serv_cell_id_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, serv_cell_id_r13, (uint8_t)0, (uint8_t)31)); + } + if (meas_result_scell_v1310_present) { + HANDLE_CODE( + pack_unalign_integer(bref, meas_result_scell_v1310->rs_sinr_result_scell_r13, (uint8_t)0, (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_serv_cell_scg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_unalign_integer(serv_cell_id_r12, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r12.rsrp_result_scell_r12, bref, (uint8_t)0, (uint8_t)97)); + HANDLE_CODE(unpack_unalign_integer(meas_result_scell_r12.rsrq_result_scell_r12, bref, (uint8_t)0, (uint8_t)34)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(serv_cell_id_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_scell_v1310_present, 1)); + if (serv_cell_id_r13_present) { + HANDLE_CODE(unpack_unalign_integer(serv_cell_id_r13, bref, (uint8_t)0, (uint8_t)31)); + } + if (meas_result_scell_v1310_present) { + meas_result_scell_v1310 = make_copy_ptr(meas_result_scell_v1310_s_()); + HANDLE_CODE( + unpack_unalign_integer(meas_result_scell_v1310->rs_sinr_result_scell_r13, bref, (uint8_t)0, (uint8_t)127)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_result_serv_cell_scg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellId-r12", serv_cell_id_r12); + j.write_fieldname("measResultSCell-r12"); + j.start_obj(); + j.write_int("rsrpResultSCell-r12", meas_result_scell_r12.rsrp_result_scell_r12); + j.write_int("rsrqResultSCell-r12", meas_result_scell_r12.rsrq_result_scell_r12); + j.end_obj(); + if (serv_cell_id_r13_present) { + j.write_int("servCellId-r13", serv_cell_id_r13); + } + if (meas_result_scell_v1310_present) { + j.write_fieldname("measResultSCell-v1310"); + j.start_obj(); + j.write_int("rs-sinr-ResultSCell-r13", meas_result_scell_v1310->rs_sinr_result_scell_r13); + j.end_obj(); + } + j.end_obj(); +} + +// SBCCH-SL-BCH-Message ::= SEQUENCE +SRSASN_CODE sbcch_sl_bch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sbcch_sl_bch_msg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void sbcch_sl_bch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("SBCCH-SL-BCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// SBCCH-SL-BCH-Message-V2X-r14 ::= SEQUENCE +SRSASN_CODE sbcch_sl_bch_msg_v2x_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sbcch_sl_bch_msg_v2x_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void sbcch_sl_bch_msg_v2x_r14_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("SBCCH-SL-BCH-Message-V2X-r14"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} + +// SCG-ConfigInfo-v1530-IEs ::= SEQUENCE +scg_cfg_info_v1530_ies_s::scg_cfg_info_v1530_ies_s() +{ + drb_to_add_mod_list_scg_r15_present = false; + drb_to_release_list_scg_r15_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_cfg_info_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drb_to_add_mod_list_scg_r15_present, 1)); + HANDLE_CODE(bref.pack(drb_to_release_list_scg_r15_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (drb_to_add_mod_list_scg_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list_scg_r15, 1, 15)); + } + if (drb_to_release_list_scg_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_release_list_scg_r15, 1, 15, UnalignedIntegerPacker(1, 32))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_v1530_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_scg_r15_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_release_list_scg_r15_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (drb_to_add_mod_list_scg_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_add_mod_list_scg_r15, bref, 1, 15)); + } + if (drb_to_release_list_scg_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_release_list_scg_r15, bref, 1, 15, UnalignedIntegerPacker(1, 32))); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_info_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drb_to_add_mod_list_scg_r15_present) { + j.start_array("drb-ToAddModListSCG-r15"); + for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r15.size(); ++i1) { + drb_to_add_mod_list_scg_r15[i1].to_json(j); + } + j.end_array(); + } + if (drb_to_release_list_scg_r15_present) { + j.start_array("drb-ToReleaseListSCG-r15"); + for (uint32_t i1 = 0; i1 < drb_to_release_list_scg_r15.size(); ++i1) { + j.write_int(drb_to_release_list_scg_r15[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// SCG-ConfigInfo-v1430-IEs ::= SEQUENCE +scg_cfg_info_v1430_ies_s::scg_cfg_info_v1430_ies_s() +{ + make_before_break_scg_req_r14_present = false; + meas_gap_cfg_per_cc_list_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_cfg_info_v1430_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(make_before_break_scg_req_r14_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_cfg_per_cc_list_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_gap_cfg_per_cc_list_present) { + HANDLE_CODE(meas_gap_cfg_per_cc_list.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_v1430_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(make_before_break_scg_req_r14_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_cfg_per_cc_list_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_gap_cfg_per_cc_list_present) { + HANDLE_CODE(meas_gap_cfg_per_cc_list.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_info_v1430_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (make_before_break_scg_req_r14_present) { + j.write_str("makeBeforeBreakSCG-Req-r14", "true"); + } + if (meas_gap_cfg_per_cc_list_present) { + j.write_fieldname("measGapConfigPerCC-List"); + meas_gap_cfg_per_cc_list.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SCG-ConfigInfo-v1330-IEs ::= SEQUENCE +scg_cfg_info_v1330_ies_s::scg_cfg_info_v1330_ies_s() +{ + meas_result_list_rssi_scg_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_cfg_info_v1330_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_list_rssi_scg_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_result_list_rssi_scg_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_rssi_scg_r13, 1, 32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_v1330_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_list_rssi_scg_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_result_list_rssi_scg_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_rssi_scg_r13, bref, 1, 32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_info_v1330_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_result_list_rssi_scg_r13_present) { + j.start_array("measResultListRSSI-SCG-r13"); + for (uint32_t i1 = 0; i1 < meas_result_list_rssi_scg_r13.size(); ++i1) { + meas_result_list_rssi_scg_r13[i1].to_json(j); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SCG-ConfigInfo-v1310-IEs ::= SEQUENCE +scg_cfg_info_v1310_ies_s::scg_cfg_info_v1310_ies_s() +{ + meas_result_sstd_r13_present = false; + s_cell_to_add_mod_list_mcg_ext_r13_present = false; + meas_result_serv_cell_list_scg_ext_r13_present = false; + s_cell_to_add_mod_list_scg_ext_r13_present = false; + s_cell_to_release_list_scg_ext_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_cfg_info_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_sstd_r13_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_mcg_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serv_cell_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_release_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_result_sstd_r13_present) { + HANDLE_CODE(meas_result_sstd_r13.pack(bref)); + } + if (s_cell_to_add_mod_list_mcg_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_mcg_ext_r13, 1, 31)); + } + if (meas_result_serv_cell_list_scg_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serv_cell_list_scg_ext_r13, 1, 32)); + } + if (s_cell_to_add_mod_list_scg_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_scg_ext_r13, 1, 31)); + } + if (s_cell_to_release_list_scg_ext_r13_present) { + HANDLE_CODE( + pack_dyn_seq_of(bref, s_cell_to_release_list_scg_ext_r13, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_sstd_r13_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_mcg_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serv_cell_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_release_list_scg_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_result_sstd_r13_present) { + HANDLE_CODE(meas_result_sstd_r13.unpack(bref)); + } + if (s_cell_to_add_mod_list_mcg_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_mcg_ext_r13, bref, 1, 31)); + } + if (meas_result_serv_cell_list_scg_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_serv_cell_list_scg_ext_r13, bref, 1, 32)); + } + if (s_cell_to_add_mod_list_scg_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_scg_ext_r13, bref, 1, 31)); + } + if (s_cell_to_release_list_scg_ext_r13_present) { + HANDLE_CODE( + unpack_dyn_seq_of(s_cell_to_release_list_scg_ext_r13, bref, 1, 31, UnalignedIntegerPacker(1, 31))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_info_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_result_sstd_r13_present) { + j.write_fieldname("measResultSSTD-r13"); + meas_result_sstd_r13.to_json(j); + } + if (s_cell_to_add_mod_list_mcg_ext_r13_present) { + j.start_array("sCellToAddModListMCG-Ext-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_mcg_ext_r13.size(); ++i1) { + s_cell_to_add_mod_list_mcg_ext_r13[i1].to_json(j); + } + j.end_array(); + } + if (meas_result_serv_cell_list_scg_ext_r13_present) { + j.start_array("measResultServCellListSCG-Ext-r13"); + for (uint32_t i1 = 0; i1 < meas_result_serv_cell_list_scg_ext_r13.size(); ++i1) { + meas_result_serv_cell_list_scg_ext_r13[i1].to_json(j); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_scg_ext_r13_present) { + j.start_array("sCellToAddModListSCG-Ext-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_scg_ext_r13.size(); ++i1) { + s_cell_to_add_mod_list_scg_ext_r13[i1].to_json(j); + } + j.end_array(); + } + if (s_cell_to_release_list_scg_ext_r13_present) { + j.start_array("sCellToReleaseListSCG-Ext-r13"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_scg_ext_r13.size(); ++i1) { + j.write_int(s_cell_to_release_list_scg_ext_r13[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SCG-ConfigRestrictInfo-r12 ::= SEQUENCE +SRSASN_CODE scg_cfg_restrict_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, max_sch_tb_bits_dl_r12, (uint8_t)1, (uint8_t)100)); + HANDLE_CODE(pack_unalign_integer(bref, max_sch_tb_bits_ul_r12, (uint8_t)1, (uint8_t)100)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_restrict_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(max_sch_tb_bits_dl_r12, bref, (uint8_t)1, (uint8_t)100)); + HANDLE_CODE(unpack_unalign_integer(max_sch_tb_bits_ul_r12, bref, (uint8_t)1, (uint8_t)100)); + + return SRSASN_SUCCESS; +} +void scg_cfg_restrict_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("maxSCH-TB-BitsDL-r12", max_sch_tb_bits_dl_r12); + j.write_int("maxSCH-TB-BitsUL-r12", max_sch_tb_bits_ul_r12); + j.end_obj(); +} + +// SCG-ConfigInfo-r12-IEs ::= SEQUENCE +scg_cfg_info_r12_ies_s::scg_cfg_info_r12_ies_s() +{ + rr_cfg_ded_mcg_r12_present = false; + s_cell_to_add_mod_list_mcg_r12_present = false; + meas_gap_cfg_r12_present = false; + pwr_coordination_info_r12_present = false; + scg_radio_cfg_r12_present = false; + eutra_cap_info_r12_present = false; + scg_cfg_restrict_info_r12_present = false; + mbms_interest_ind_r12_present = false; + meas_result_serv_cell_list_scg_r12_present = false; + drb_to_add_mod_list_scg_r12_present = false; + drb_to_release_list_scg_r12_present = false; + s_cell_to_add_mod_list_scg_r12_present = false; + s_cell_to_release_list_scg_r12_present = false; + p_max_r12_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE scg_cfg_info_r12_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rr_cfg_ded_mcg_r12_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_mcg_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_gap_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(pwr_coordination_info_r12_present, 1)); + HANDLE_CODE(bref.pack(scg_radio_cfg_r12_present, 1)); + HANDLE_CODE(bref.pack(eutra_cap_info_r12_present, 1)); + HANDLE_CODE(bref.pack(scg_cfg_restrict_info_r12_present, 1)); + HANDLE_CODE(bref.pack(mbms_interest_ind_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serv_cell_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(drb_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(drb_to_release_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(s_cell_to_release_list_scg_r12_present, 1)); + HANDLE_CODE(bref.pack(p_max_r12_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rr_cfg_ded_mcg_r12_present) { + HANDLE_CODE(rr_cfg_ded_mcg_r12.pack(bref)); + } + if (s_cell_to_add_mod_list_mcg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_mcg_r12, 1, 4)); + } + if (meas_gap_cfg_r12_present) { + HANDLE_CODE(meas_gap_cfg_r12.pack(bref)); + } + if (pwr_coordination_info_r12_present) { + HANDLE_CODE(pwr_coordination_info_r12.pack(bref)); + } + if (scg_radio_cfg_r12_present) { + HANDLE_CODE(scg_radio_cfg_r12.pack(bref)); + } + if (eutra_cap_info_r12_present) { + HANDLE_CODE(eutra_cap_info_r12.pack(bref)); + } + if (scg_cfg_restrict_info_r12_present) { + HANDLE_CODE(scg_cfg_restrict_info_r12.pack(bref)); + } + if (mbms_interest_ind_r12_present) { + HANDLE_CODE(mbms_interest_ind_r12.pack(bref)); + } + if (meas_result_serv_cell_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serv_cell_list_scg_r12, 1, 5)); + } + if (drb_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list_scg_r12, 1, 11)); + } + if (drb_to_release_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_release_list_scg_r12, 1, 11, UnalignedIntegerPacker(1, 32))); + } + if (s_cell_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_add_mod_list_scg_r12, 1, 4)); + } + if (s_cell_to_release_list_scg_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_cell_to_release_list_scg_r12, 1, 4, UnalignedIntegerPacker(1, 7))); + } + if (p_max_r12_present) { + HANDLE_CODE(pack_unalign_integer(bref, p_max_r12, (int8_t)-30, (int8_t)33)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_r12_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rr_cfg_ded_mcg_r12_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_mcg_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(pwr_coordination_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(scg_radio_cfg_r12_present, 1)); + HANDLE_CODE(bref.unpack(eutra_cap_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(scg_cfg_restrict_info_r12_present, 1)); + HANDLE_CODE(bref.unpack(mbms_interest_ind_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serv_cell_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(drb_to_release_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_add_mod_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(s_cell_to_release_list_scg_r12_present, 1)); + HANDLE_CODE(bref.unpack(p_max_r12_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rr_cfg_ded_mcg_r12_present) { + HANDLE_CODE(rr_cfg_ded_mcg_r12.unpack(bref)); + } + if (s_cell_to_add_mod_list_mcg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_mcg_r12, bref, 1, 4)); + } + if (meas_gap_cfg_r12_present) { + HANDLE_CODE(meas_gap_cfg_r12.unpack(bref)); + } + if (pwr_coordination_info_r12_present) { + HANDLE_CODE(pwr_coordination_info_r12.unpack(bref)); + } + if (scg_radio_cfg_r12_present) { + HANDLE_CODE(scg_radio_cfg_r12.unpack(bref)); + } + if (eutra_cap_info_r12_present) { + HANDLE_CODE(eutra_cap_info_r12.unpack(bref)); + } + if (scg_cfg_restrict_info_r12_present) { + HANDLE_CODE(scg_cfg_restrict_info_r12.unpack(bref)); + } + if (mbms_interest_ind_r12_present) { + HANDLE_CODE(mbms_interest_ind_r12.unpack(bref)); + } + if (meas_result_serv_cell_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_serv_cell_list_scg_r12, bref, 1, 5)); + } + if (drb_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_add_mod_list_scg_r12, bref, 1, 11)); + } + if (drb_to_release_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(drb_to_release_list_scg_r12, bref, 1, 11, UnalignedIntegerPacker(1, 32))); + } + if (s_cell_to_add_mod_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_add_mod_list_scg_r12, bref, 1, 4)); + } + if (s_cell_to_release_list_scg_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_cell_to_release_list_scg_r12, bref, 1, 4, UnalignedIntegerPacker(1, 7))); + } + if (p_max_r12_present) { + HANDLE_CODE(unpack_unalign_integer(p_max_r12, bref, (int8_t)-30, (int8_t)33)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_cfg_info_r12_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rr_cfg_ded_mcg_r12_present) { + j.write_fieldname("radioResourceConfigDedMCG-r12"); + rr_cfg_ded_mcg_r12.to_json(j); + } + if (s_cell_to_add_mod_list_mcg_r12_present) { + j.start_array("sCellToAddModListMCG-r12"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_mcg_r12.size(); ++i1) { + s_cell_to_add_mod_list_mcg_r12[i1].to_json(j); + } + j.end_array(); + } + if (meas_gap_cfg_r12_present) { + j.write_fieldname("measGapConfig-r12"); + meas_gap_cfg_r12.to_json(j); + } + if (pwr_coordination_info_r12_present) { + j.write_fieldname("powerCoordinationInfo-r12"); + pwr_coordination_info_r12.to_json(j); + } + if (scg_radio_cfg_r12_present) { + j.write_fieldname("scg-RadioConfig-r12"); + scg_radio_cfg_r12.to_json(j); + } + if (eutra_cap_info_r12_present) { + j.write_str("eutra-CapabilityInfo-r12", eutra_cap_info_r12.to_string()); + } + if (scg_cfg_restrict_info_r12_present) { + j.write_fieldname("scg-ConfigRestrictInfo-r12"); + scg_cfg_restrict_info_r12.to_json(j); + } + if (mbms_interest_ind_r12_present) { + j.write_str("mbmsInterestIndication-r12", mbms_interest_ind_r12.to_string()); + } + if (meas_result_serv_cell_list_scg_r12_present) { + j.start_array("measResultServCellListSCG-r12"); + for (uint32_t i1 = 0; i1 < meas_result_serv_cell_list_scg_r12.size(); ++i1) { + meas_result_serv_cell_list_scg_r12[i1].to_json(j); + } + j.end_array(); + } + if (drb_to_add_mod_list_scg_r12_present) { + j.start_array("drb-ToAddModListSCG-r12"); + for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r12.size(); ++i1) { + drb_to_add_mod_list_scg_r12[i1].to_json(j); + } + j.end_array(); + } + if (drb_to_release_list_scg_r12_present) { + j.start_array("drb-ToReleaseListSCG-r12"); + for (uint32_t i1 = 0; i1 < drb_to_release_list_scg_r12.size(); ++i1) { + j.write_int(drb_to_release_list_scg_r12[i1]); + } + j.end_array(); + } + if (s_cell_to_add_mod_list_scg_r12_present) { + j.start_array("sCellToAddModListSCG-r12"); + for (uint32_t i1 = 0; i1 < s_cell_to_add_mod_list_scg_r12.size(); ++i1) { + s_cell_to_add_mod_list_scg_r12[i1].to_json(j); + } + j.end_array(); + } + if (s_cell_to_release_list_scg_r12_present) { + j.start_array("sCellToReleaseListSCG-r12"); + for (uint32_t i1 = 0; i1 < s_cell_to_release_list_scg_r12.size(); ++i1) { + j.write_int(s_cell_to_release_list_scg_r12[i1]); + } + j.end_array(); + } + if (p_max_r12_present) { + j.write_int("p-Max-r12", p_max_r12); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SCG-ConfigInfo-r12 ::= SEQUENCE +SRSASN_CODE scg_cfg_info_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_cfg_info_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void scg_cfg_info_r12_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void scg_cfg_info_r12_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_"); + } +} +scg_cfg_info_r12_s::crit_exts_c_::crit_exts_c_(const scg_cfg_info_r12_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_"); + } +} +scg_cfg_info_r12_s::crit_exts_c_& scg_cfg_info_r12_s::crit_exts_c_:: + operator=(const scg_cfg_info_r12_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_"); + } + + return *this; +} +void scg_cfg_info_r12_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_cfg_info_r12_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_r12_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void scg_cfg_info_r12_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void scg_cfg_info_r12_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scg_cfg_info_r12: + j.write_fieldname("scg-ConfigInfo-r12"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE scg_cfg_info_r12_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::scg_cfg_info_r12: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_cfg_info_r12_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::scg_cfg_info_r12: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "scg_cfg_info_r12_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// SL-PPPP-TxPreconfigIndex-r14 ::= SEQUENCE +SRSASN_CODE sl_pppp_tx_precfg_idx_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_unalign_integer(bref, prio_thres_r14, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(pack_unalign_integer(bref, default_tx_cfg_idx_r14, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(pack_unalign_integer(bref, cbr_cfg_idx_r14, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(pack_dyn_seq_of(bref, tx_cfg_idx_list_r14, 1, 16, UnalignedIntegerPacker(0, 127))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pppp_tx_precfg_idx_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_unalign_integer(prio_thres_r14, bref, (uint8_t)1, (uint8_t)8)); + HANDLE_CODE(unpack_unalign_integer(default_tx_cfg_idx_r14, bref, (uint8_t)0, (uint8_t)15)); + HANDLE_CODE(unpack_unalign_integer(cbr_cfg_idx_r14, bref, (uint8_t)0, (uint8_t)7)); + HANDLE_CODE(unpack_dyn_seq_of(tx_cfg_idx_list_r14, bref, 1, 16, UnalignedIntegerPacker(0, 127))); + + return SRSASN_SUCCESS; +} +void sl_pppp_tx_precfg_idx_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("priorityThreshold-r14", prio_thres_r14); + j.write_int("defaultTxConfigIndex-r14", default_tx_cfg_idx_r14); + j.write_int("cbr-ConfigIndex-r14", cbr_cfg_idx_r14); + j.start_array("tx-ConfigIndexList-r14"); + for (uint32_t i1 = 0; i1 < tx_cfg_idx_list_r14.size(); ++i1) { + j.write_int(tx_cfg_idx_list_r14[i1]); + } + j.end_array(); + j.end_obj(); +} + +// SL-PPPP-TxPreconfigIndex-v1530 ::= SEQUENCE +sl_pppp_tx_precfg_idx_v1530_s::sl_pppp_tx_precfg_idx_v1530_s() +{ + mcs_pssch_range_r15_present = false; +} +SRSASN_CODE sl_pppp_tx_precfg_idx_v1530_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mcs_pssch_range_r15_present, 1)); + + if (mcs_pssch_range_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mcs_pssch_range_r15, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_pppp_tx_precfg_idx_v1530_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mcs_pssch_range_r15_present, 1)); + + if (mcs_pssch_range_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(mcs_pssch_range_r15, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void sl_pppp_tx_precfg_idx_v1530_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mcs_pssch_range_r15_present) { + j.start_array("mcs-PSSCH-Range-r15"); + for (uint32_t i1 = 0; i1 < mcs_pssch_range_r15.size(); ++i1) { + mcs_pssch_range_r15[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-CBR-PreconfigTxConfigList-r14 ::= SEQUENCE +SRSASN_CODE sl_cbr_precfg_tx_cfg_list_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE( + pack_dyn_seq_of(bref, cbr_range_common_cfg_list_r14, 1, 8, + SeqOfPacker >(1, 16, UnalignedIntegerPacker(0, 100)))); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_cbr_pssch_tx_cfg_list_r14, 1, 128)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_cbr_precfg_tx_cfg_list_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE( + unpack_dyn_seq_of(cbr_range_common_cfg_list_r14, bref, 1, 8, + SeqOfPacker >(1, 16, UnalignedIntegerPacker(0, 100)))); + HANDLE_CODE(unpack_dyn_seq_of(sl_cbr_pssch_tx_cfg_list_r14, bref, 1, 128)); + + return SRSASN_SUCCESS; +} +void sl_cbr_precfg_tx_cfg_list_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("cbr-RangeCommonConfigList-r14"); + for (uint32_t i1 = 0; i1 < cbr_range_common_cfg_list_r14.size(); ++i1) { + j.start_array(); + for (uint32_t i2 = 0; i2 < cbr_range_common_cfg_list_r14[i1].size(); ++i2) { + j.write_int(cbr_range_common_cfg_list_r14[i1][i2]); + } + j.end_array(); + } + j.end_array(); + j.start_array("sl-CBR-PSSCH-TxConfigList-r14"); + for (uint32_t i1 = 0; i1 < sl_cbr_pssch_tx_cfg_list_r14.size(); ++i1) { + sl_cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// SL-PreconfigCommPool-r12 ::= SEQUENCE +sl_precfg_comm_pool_r12_s::sl_precfg_comm_pool_r12_s() +{ + ext = false; + prio_list_r13_present = false; +} +SRSASN_CODE sl_precfg_comm_pool_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, sc_cp_len_r12)); + HANDLE_CODE(pack_enum(bref, sc_period_r12)); + HANDLE_CODE(sc_tf_res_cfg_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, sc_tx_params_r12, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(pack_enum(bref, data_cp_len_r12)); + HANDLE_CODE(data_tf_res_cfg_r12.pack(bref)); + HANDLE_CODE(data_hop_cfg_r12.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, data_tx_params_r12, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(trpt_subset_r12.pack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(prio_list_r13_present != (prio_list_r13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= prio_list_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(prio_list_r13_present, 1)); + if (prio_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *prio_list_r13, 1, 8, UnalignedIntegerPacker(1, 8))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_comm_pool_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(sc_cp_len_r12, bref)); + HANDLE_CODE(unpack_enum(sc_period_r12, bref)); + HANDLE_CODE(sc_tf_res_cfg_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(sc_tx_params_r12, bref, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(unpack_enum(data_cp_len_r12, bref)); + HANDLE_CODE(data_tf_res_cfg_r12.unpack(bref)); + HANDLE_CODE(data_hop_cfg_r12.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(data_tx_params_r12, bref, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(trpt_subset_r12.unpack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(prio_list_r13_present, 1)); + if (prio_list_r13_present) { + prio_list_r13 = make_copy_ptr(sl_prio_list_r13_l()); + HANDLE_CODE(unpack_dyn_seq_of(*prio_list_r13, bref, 1, 8, UnalignedIntegerPacker(1, 8))); + } + } + } + return SRSASN_SUCCESS; +} +void sl_precfg_comm_pool_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sc-CP-Len-r12", sc_cp_len_r12.to_string()); + j.write_str("sc-Period-r12", sc_period_r12.to_string()); + j.write_fieldname("sc-TF-ResourceConfig-r12"); + sc_tf_res_cfg_r12.to_json(j); + j.write_int("sc-TxParameters-r12", sc_tx_params_r12); + j.write_str("data-CP-Len-r12", data_cp_len_r12.to_string()); + j.write_fieldname("data-TF-ResourceConfig-r12"); + data_tf_res_cfg_r12.to_json(j); + j.write_fieldname("dataHoppingConfig-r12"); + data_hop_cfg_r12.to_json(j); + j.write_int("dataTxParameters-r12", data_tx_params_r12); + j.write_str("trpt-Subset-r12", trpt_subset_r12.to_string()); + if (prio_list_r13_present) { + j.start_array("priorityList-r13"); + for (uint32_t i1 = 0; i1 < prio_list_r13->size(); ++i1) { + j.write_int(((*prio_list_r13)[i1])); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-PreconfigDiscPool-r13 ::= SEQUENCE +sl_precfg_disc_pool_r13_s::sl_precfg_disc_pool_r13_s() +{ + ext = false; + tx_params_r13_present = false; +} +SRSASN_CODE sl_precfg_disc_pool_r13_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tx_params_r13_present, 1)); + + HANDLE_CODE(pack_enum(bref, cp_len_r13)); + HANDLE_CODE(pack_enum(bref, disc_period_r13)); + HANDLE_CODE(pack_unalign_integer(bref, num_retx_r13, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(pack_unalign_integer(bref, num_repeat_r13, (uint8_t)1, (uint8_t)50)); + HANDLE_CODE(tf_res_cfg_r13.pack(bref)); + if (tx_params_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, tx_params_r13.tx_params_general_r13, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(pack_enum(bref, tx_params_r13.tx_probability_r13)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_disc_pool_r13_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(tx_params_r13_present, 1)); + + HANDLE_CODE(unpack_enum(cp_len_r13, bref)); + HANDLE_CODE(unpack_enum(disc_period_r13, bref)); + HANDLE_CODE(unpack_unalign_integer(num_retx_r13, bref, (uint8_t)0, (uint8_t)3)); + HANDLE_CODE(unpack_unalign_integer(num_repeat_r13, bref, (uint8_t)1, (uint8_t)50)); + HANDLE_CODE(tf_res_cfg_r13.unpack(bref)); + if (tx_params_r13_present) { + HANDLE_CODE(unpack_unalign_integer(tx_params_r13.tx_params_general_r13, bref, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(unpack_enum(tx_params_r13.tx_probability_r13, bref)); + } + + return SRSASN_SUCCESS; +} +void sl_precfg_disc_pool_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cp-Len-r13", cp_len_r13.to_string()); + j.write_str("discPeriod-r13", disc_period_r13.to_string()); + j.write_int("numRetx-r13", num_retx_r13); + j.write_int("numRepetition-r13", num_repeat_r13); + j.write_fieldname("tf-ResourceConfig-r13"); + tf_res_cfg_r13.to_json(j); + if (tx_params_r13_present) { + j.write_fieldname("txParameters-r13"); + j.start_obj(); + j.write_int("txParametersGeneral-r13", tx_params_r13.tx_params_general_r13); + j.write_str("txProbability-r13", tx_params_r13.tx_probability_r13.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +// SL-PreconfigGeneral-r12 ::= SEQUENCE +sl_precfg_general_r12_s::sl_precfg_general_r12_s() +{ + ext = false; + add_spec_emission_v1440_present = false; +} +SRSASN_CODE sl_precfg_general_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0001_r12, 1)); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0002_r12, 1)); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0004_r12, 1)); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0006_r12, 1)); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0101_r12, 1)); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0102_r12, 1)); + HANDLE_CODE(bref.pack(rohc_profiles_r12.profile0x0104_r12, 1)); + HANDLE_CODE(pack_unalign_integer(bref, carrier_freq_r12, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(pack_unalign_integer(bref, max_tx_pwr_r12, (int8_t)-30, (int8_t)33)); + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission_r12, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(pack_enum(bref, sl_bw_r12)); + HANDLE_CODE(tdd_cfg_sl_r12.pack(bref)); + HANDLE_CODE(reserved_r12.pack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= add_spec_emission_v1440_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(add_spec_emission_v1440_present, 1)); + if (add_spec_emission_v1440_present) { + HANDLE_CODE(pack_unalign_integer(bref, add_spec_emission_v1440, (uint16_t)33, (uint16_t)288)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_general_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0001_r12, 1)); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0002_r12, 1)); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0004_r12, 1)); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0006_r12, 1)); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0101_r12, 1)); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0102_r12, 1)); + HANDLE_CODE(bref.unpack(rohc_profiles_r12.profile0x0104_r12, 1)); + HANDLE_CODE(unpack_unalign_integer(carrier_freq_r12, bref, (uint32_t)0, (uint32_t)262143)); + HANDLE_CODE(unpack_unalign_integer(max_tx_pwr_r12, bref, (int8_t)-30, (int8_t)33)); + HANDLE_CODE(unpack_unalign_integer(add_spec_emission_r12, bref, (uint8_t)1, (uint8_t)32)); + HANDLE_CODE(unpack_enum(sl_bw_r12, bref)); + HANDLE_CODE(tdd_cfg_sl_r12.unpack(bref)); + HANDLE_CODE(reserved_r12.unpack(bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(add_spec_emission_v1440_present, 1)); + if (add_spec_emission_v1440_present) { + HANDLE_CODE(unpack_unalign_integer(add_spec_emission_v1440, bref, (uint16_t)33, (uint16_t)288)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_precfg_general_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rohc-Profiles-r12"); + j.start_obj(); + j.write_bool("profile0x0001-r12", rohc_profiles_r12.profile0x0001_r12); + j.write_bool("profile0x0002-r12", rohc_profiles_r12.profile0x0002_r12); + j.write_bool("profile0x0004-r12", rohc_profiles_r12.profile0x0004_r12); + j.write_bool("profile0x0006-r12", rohc_profiles_r12.profile0x0006_r12); + j.write_bool("profile0x0101-r12", rohc_profiles_r12.profile0x0101_r12); + j.write_bool("profile0x0102-r12", rohc_profiles_r12.profile0x0102_r12); + j.write_bool("profile0x0104-r12", rohc_profiles_r12.profile0x0104_r12); + j.end_obj(); + j.write_int("carrierFreq-r12", carrier_freq_r12); + j.write_int("maxTxPower-r12", max_tx_pwr_r12); + j.write_int("additionalSpectrumEmission-r12", add_spec_emission_r12); + j.write_str("sl-bandwidth-r12", sl_bw_r12.to_string()); + j.write_fieldname("tdd-ConfigSL-r12"); + tdd_cfg_sl_r12.to_json(j); + j.write_str("reserved-r12", reserved_r12.to_string()); + if (add_spec_emission_v1440_present) { + j.write_int("additionalSpectrumEmission-v1440", add_spec_emission_v1440); + } + j.end_obj(); +} + +// SL-PreconfigRelay-r13 ::= SEQUENCE +SRSASN_CODE sl_precfg_relay_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(resel_info_oo_c_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_relay_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(resel_info_oo_c_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_precfg_relay_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("reselectionInfoOoC-r13"); + resel_info_oo_c_r13.to_json(j); + j.end_obj(); +} + +// SL-PreconfigSync-r12 ::= SEQUENCE +sl_precfg_sync_r12_s::sl_precfg_sync_r12_s() +{ + ext = false; + sync_tx_periodic_r13_present = false; +} +SRSASN_CODE sl_precfg_sync_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_enum(bref, sync_cp_len_r12)); + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind1_r12, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind2_r12, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(pack_unalign_integer(bref, sync_tx_params_r12, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, sync_tx_thresh_oo_c_r12, (uint8_t)0, (uint8_t)11)); + HANDLE_CODE(pack_enum(bref, filt_coef_r12)); + HANDLE_CODE(pack_enum(bref, sync_ref_min_hyst_r12)); + HANDLE_CODE(pack_enum(bref, sync_ref_diff_hyst_r12)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= sync_tx_periodic_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sync_tx_periodic_r13_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_sync_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_enum(sync_cp_len_r12, bref)); + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind1_r12, bref, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind2_r12, bref, (uint8_t)0, (uint8_t)39)); + HANDLE_CODE(unpack_unalign_integer(sync_tx_params_r12, bref, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(unpack_unalign_integer(sync_tx_thresh_oo_c_r12, bref, (uint8_t)0, (uint8_t)11)); + HANDLE_CODE(unpack_enum(filt_coef_r12, bref)); + HANDLE_CODE(unpack_enum(sync_ref_min_hyst_r12, bref)); + HANDLE_CODE(unpack_enum(sync_ref_diff_hyst_r12, bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sync_tx_periodic_r13_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sl_precfg_sync_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("syncCP-Len-r12", sync_cp_len_r12.to_string()); + j.write_int("syncOffsetIndicator1-r12", sync_offset_ind1_r12); + j.write_int("syncOffsetIndicator2-r12", sync_offset_ind2_r12); + j.write_int("syncTxParameters-r12", sync_tx_params_r12); + j.write_int("syncTxThreshOoC-r12", sync_tx_thresh_oo_c_r12); + j.write_str("filterCoefficient-r12", filt_coef_r12.to_string()); + j.write_str("syncRefMinHyst-r12", sync_ref_min_hyst_r12.to_string()); + j.write_str("syncRefDiffHyst-r12", sync_ref_diff_hyst_r12.to_string()); + if (sync_tx_periodic_r13_present) { + j.write_str("syncTxPeriodic-r13", "true"); + } + j.end_obj(); +} + +// SL-V2X-PreconfigCommPool-r14 ::= SEQUENCE +sl_v2x_precfg_comm_pool_r14_s::sl_v2x_precfg_comm_pool_r14_s() +{ + ext = false; + sl_offset_ind_r14_present = false; + start_rb_pscch_pool_r14_present = false; + zone_id_r14_present = false; + thresh_s_rssi_cbr_r14_present = false; + cbr_pssch_tx_cfg_list_r14_present = false; + res_sel_cfg_p2_x_r14_present = false; + sync_allowed_r14_present = false; + restrict_res_reserv_period_r14_present = false; + sl_min_t2_value_list_r15_present = false; + cbr_pssch_tx_cfg_list_v1530_present = false; +} +SRSASN_CODE sl_v2x_precfg_comm_pool_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_offset_ind_r14_present, 1)); + HANDLE_CODE(bref.pack(start_rb_pscch_pool_r14_present, 1)); + HANDLE_CODE(bref.pack(zone_id_r14_present, 1)); + HANDLE_CODE(bref.pack(thresh_s_rssi_cbr_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_pssch_tx_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.pack(res_sel_cfg_p2_x_r14_present, 1)); + HANDLE_CODE(bref.pack(sync_allowed_r14_present, 1)); + HANDLE_CODE(bref.pack(restrict_res_reserv_period_r14_present, 1)); + + if (sl_offset_ind_r14_present) { + HANDLE_CODE(sl_offset_ind_r14.pack(bref)); + } + HANDLE_CODE(sl_sf_r14.pack(bref)); + HANDLE_CODE(bref.pack(adjacency_pscch_pssch_r14, 1)); + HANDLE_CODE(pack_enum(bref, size_subch_r14)); + HANDLE_CODE(pack_enum(bref, num_subch_r14)); + HANDLE_CODE(pack_unalign_integer(bref, start_rb_subch_r14, (uint8_t)0, (uint8_t)99)); + if (start_rb_pscch_pool_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, start_rb_pscch_pool_r14, (uint8_t)0, (uint8_t)99)); + } + HANDLE_CODE(pack_unalign_integer(bref, data_tx_params_r14, (int8_t)-126, (int8_t)31)); + if (zone_id_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, zone_id_r14, (uint8_t)0, (uint8_t)7)); + } + if (thresh_s_rssi_cbr_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, thresh_s_rssi_cbr_r14, (uint8_t)0, (uint8_t)45)); + } + if (cbr_pssch_tx_cfg_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cbr_pssch_tx_cfg_list_r14, 1, 8)); + } + if (res_sel_cfg_p2_x_r14_present) { + HANDLE_CODE(res_sel_cfg_p2_x_r14.pack(bref)); + } + if (sync_allowed_r14_present) { + HANDLE_CODE(sync_allowed_r14.pack(bref)); + } + if (restrict_res_reserv_period_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, restrict_res_reserv_period_r14, 1, 16, EnumPacker())); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(sl_min_t2_value_list_r15_present != (sl_min_t2_value_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= sl_min_t2_value_list_r15_present; + rrc_asn1_warn_assert(cbr_pssch_tx_cfg_list_v1530_present != (cbr_pssch_tx_cfg_list_v1530.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= cbr_pssch_tx_cfg_list_v1530_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(sl_min_t2_value_list_r15_present, 1)); + HANDLE_CODE(bref.pack(cbr_pssch_tx_cfg_list_v1530_present, 1)); + if (sl_min_t2_value_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sl_min_t2_value_list_r15, 1, 8)); + } + if (cbr_pssch_tx_cfg_list_v1530_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cbr_pssch_tx_cfg_list_v1530, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_precfg_comm_pool_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_offset_ind_r14_present, 1)); + HANDLE_CODE(bref.unpack(start_rb_pscch_pool_r14_present, 1)); + HANDLE_CODE(bref.unpack(zone_id_r14_present, 1)); + HANDLE_CODE(bref.unpack(thresh_s_rssi_cbr_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_pssch_tx_cfg_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(res_sel_cfg_p2_x_r14_present, 1)); + HANDLE_CODE(bref.unpack(sync_allowed_r14_present, 1)); + HANDLE_CODE(bref.unpack(restrict_res_reserv_period_r14_present, 1)); + + if (sl_offset_ind_r14_present) { + HANDLE_CODE(sl_offset_ind_r14.unpack(bref)); + } + HANDLE_CODE(sl_sf_r14.unpack(bref)); + HANDLE_CODE(bref.unpack(adjacency_pscch_pssch_r14, 1)); + HANDLE_CODE(unpack_enum(size_subch_r14, bref)); + HANDLE_CODE(unpack_enum(num_subch_r14, bref)); + HANDLE_CODE(unpack_unalign_integer(start_rb_subch_r14, bref, (uint8_t)0, (uint8_t)99)); + if (start_rb_pscch_pool_r14_present) { + HANDLE_CODE(unpack_unalign_integer(start_rb_pscch_pool_r14, bref, (uint8_t)0, (uint8_t)99)); + } + HANDLE_CODE(unpack_unalign_integer(data_tx_params_r14, bref, (int8_t)-126, (int8_t)31)); + if (zone_id_r14_present) { + HANDLE_CODE(unpack_unalign_integer(zone_id_r14, bref, (uint8_t)0, (uint8_t)7)); + } + if (thresh_s_rssi_cbr_r14_present) { + HANDLE_CODE(unpack_unalign_integer(thresh_s_rssi_cbr_r14, bref, (uint8_t)0, (uint8_t)45)); + } + if (cbr_pssch_tx_cfg_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(cbr_pssch_tx_cfg_list_r14, bref, 1, 8)); + } + if (res_sel_cfg_p2_x_r14_present) { + HANDLE_CODE(res_sel_cfg_p2_x_r14.unpack(bref)); + } + if (sync_allowed_r14_present) { + HANDLE_CODE(sync_allowed_r14.unpack(bref)); + } + if (restrict_res_reserv_period_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(restrict_res_reserv_period_r14, bref, 1, 16, EnumPacker())); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(sl_min_t2_value_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(cbr_pssch_tx_cfg_list_v1530_present, 1)); + if (sl_min_t2_value_list_r15_present) { + sl_min_t2_value_list_r15 = make_copy_ptr(sl_min_t2_value_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*sl_min_t2_value_list_r15, bref, 1, 8)); + } + if (cbr_pssch_tx_cfg_list_v1530_present) { + cbr_pssch_tx_cfg_list_v1530 = make_copy_ptr(sl_cbr_pppp_tx_precfg_list_v1530_l()); + HANDLE_CODE(unpack_dyn_seq_of(*cbr_pssch_tx_cfg_list_v1530, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_v2x_precfg_comm_pool_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_offset_ind_r14_present) { + j.write_fieldname("sl-OffsetIndicator-r14"); + sl_offset_ind_r14.to_json(j); + } + j.write_fieldname("sl-Subframe-r14"); + sl_sf_r14.to_json(j); + j.write_bool("adjacencyPSCCH-PSSCH-r14", adjacency_pscch_pssch_r14); + j.write_str("sizeSubchannel-r14", size_subch_r14.to_string()); + j.write_str("numSubchannel-r14", num_subch_r14.to_string()); + j.write_int("startRB-Subchannel-r14", start_rb_subch_r14); + if (start_rb_pscch_pool_r14_present) { + j.write_int("startRB-PSCCH-Pool-r14", start_rb_pscch_pool_r14); + } + j.write_int("dataTxParameters-r14", data_tx_params_r14); + if (zone_id_r14_present) { + j.write_int("zoneID-r14", zone_id_r14); + } + if (thresh_s_rssi_cbr_r14_present) { + j.write_int("threshS-RSSI-CBR-r14", thresh_s_rssi_cbr_r14); + } + if (cbr_pssch_tx_cfg_list_r14_present) { + j.start_array("cbr-pssch-TxConfigList-r14"); + for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_r14.size(); ++i1) { + cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + } + j.end_array(); + } + if (res_sel_cfg_p2_x_r14_present) { + j.write_fieldname("resourceSelectionConfigP2X-r14"); + res_sel_cfg_p2_x_r14.to_json(j); + } + if (sync_allowed_r14_present) { + j.write_fieldname("syncAllowed-r14"); + sync_allowed_r14.to_json(j); + } + if (restrict_res_reserv_period_r14_present) { + j.start_array("restrictResourceReservationPeriod-r14"); + for (uint32_t i1 = 0; i1 < restrict_res_reserv_period_r14.size(); ++i1) { + j.write_str(restrict_res_reserv_period_r14[i1].to_string()); + } + j.end_array(); + } + if (sl_min_t2_value_list_r15_present) { + j.start_array("sl-MinT2ValueList-r15"); + for (uint32_t i1 = 0; i1 < sl_min_t2_value_list_r15->size(); ++i1) { + ((*sl_min_t2_value_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + if (cbr_pssch_tx_cfg_list_v1530_present) { + j.start_array("cbr-pssch-TxConfigList-v1530"); + for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_v1530->size(); ++i1) { + ((*cbr_pssch_tx_cfg_list_v1530)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-V2X-SyncOffsetIndicators-r14 ::= SEQUENCE +sl_v2x_sync_offset_inds_r14_s::sl_v2x_sync_offset_inds_r14_s() +{ + sync_offset_ind3_r14_present = false; +} +SRSASN_CODE sl_v2x_sync_offset_inds_r14_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sync_offset_ind3_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind1_r14, (uint8_t)0, (uint8_t)159)); + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind2_r14, (uint8_t)0, (uint8_t)159)); + if (sync_offset_ind3_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, sync_offset_ind3_r14, (uint8_t)0, (uint8_t)159)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_sync_offset_inds_r14_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sync_offset_ind3_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind1_r14, bref, (uint8_t)0, (uint8_t)159)); + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind2_r14, bref, (uint8_t)0, (uint8_t)159)); + if (sync_offset_ind3_r14_present) { + HANDLE_CODE(unpack_unalign_integer(sync_offset_ind3_r14, bref, (uint8_t)0, (uint8_t)159)); + } + + return SRSASN_SUCCESS; +} +void sl_v2x_sync_offset_inds_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("syncOffsetIndicator1-r14", sync_offset_ind1_r14); + j.write_int("syncOffsetIndicator2-r14", sync_offset_ind2_r14); + if (sync_offset_ind3_r14_present) { + j.write_int("syncOffsetIndicator3-r14", sync_offset_ind3_r14); + } + j.end_obj(); +} + +// SL-PreconfigV2X-Sync-r14 ::= SEQUENCE +sl_precfg_v2x_sync_r14_s::sl_precfg_v2x_sync_r14_s() +{ + ext = false; + slss_tx_disabled_r15_present = false; +} +SRSASN_CODE sl_precfg_v2x_sync_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(sync_offset_inds_r14.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, sync_tx_params_r14, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(pack_unalign_integer(bref, sync_tx_thresh_oo_c_r14, (uint8_t)0, (uint8_t)11)); + HANDLE_CODE(pack_enum(bref, filt_coef_r14)); + HANDLE_CODE(pack_enum(bref, sync_ref_min_hyst_r14)); + HANDLE_CODE(pack_enum(bref, sync_ref_diff_hyst_r14)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags[0] |= slss_tx_disabled_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(slss_tx_disabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_v2x_sync_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(sync_offset_inds_r14.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(sync_tx_params_r14, bref, (int8_t)-126, (int8_t)31)); + HANDLE_CODE(unpack_unalign_integer(sync_tx_thresh_oo_c_r14, bref, (uint8_t)0, (uint8_t)11)); + HANDLE_CODE(unpack_enum(filt_coef_r14, bref)); + HANDLE_CODE(unpack_enum(sync_ref_min_hyst_r14, bref)); + HANDLE_CODE(unpack_enum(sync_ref_diff_hyst_r14, bref)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(slss_tx_disabled_r15_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sl_precfg_v2x_sync_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("syncOffsetIndicators-r14"); + sync_offset_inds_r14.to_json(j); + j.write_int("syncTxParameters-r14", sync_tx_params_r14); + j.write_int("syncTxThreshOoC-r14", sync_tx_thresh_oo_c_r14); + j.write_str("filterCoefficient-r14", filt_coef_r14.to_string()); + j.write_str("syncRefMinHyst-r14", sync_ref_min_hyst_r14.to_string()); + j.write_str("syncRefDiffHyst-r14", sync_ref_diff_hyst_r14.to_string()); + if (slss_tx_disabled_r15_present) { + j.write_str("slss-TxDisabled-r15", "true"); + } + j.end_obj(); +} + +// SL-Preconfiguration-r12 ::= SEQUENCE +sl_precfg_r12_s::sl_precfg_r12_s() +{ + ext = false; + precfg_comm_v1310_present = false; + precfg_disc_r13_present = false; + precfg_relay_r13_present = false; +} +SRSASN_CODE sl_precfg_r12_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(precfg_general_r12.pack(bref)); + HANDLE_CODE(precfg_sync_r12.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, precfg_comm_r12, 1, 4)); + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(precfg_comm_v1310_present != (precfg_comm_v1310.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= precfg_comm_v1310_present; + rrc_asn1_warn_assert(precfg_disc_r13_present != (precfg_disc_r13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= precfg_disc_r13_present; + rrc_asn1_warn_assert(precfg_relay_r13_present != (precfg_relay_r13.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= precfg_relay_r13_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(precfg_comm_v1310_present, 1)); + HANDLE_CODE(bref.pack(precfg_disc_r13_present, 1)); + HANDLE_CODE(bref.pack(precfg_relay_r13_present, 1)); + if (precfg_comm_v1310_present) { + HANDLE_CODE(bref.pack(precfg_comm_v1310->comm_tx_pool_list_r13_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, precfg_comm_v1310->comm_rx_pool_list_r13, 1, 12)); + if (precfg_comm_v1310->comm_tx_pool_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, precfg_comm_v1310->comm_tx_pool_list_r13, 1, 7)); + } + } + if (precfg_disc_r13_present) { + HANDLE_CODE(bref.pack(precfg_disc_r13->disc_tx_pool_list_r13_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, precfg_disc_r13->disc_rx_pool_list_r13, 1, 16)); + if (precfg_disc_r13->disc_tx_pool_list_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, precfg_disc_r13->disc_tx_pool_list_r13, 1, 4)); + } + } + if (precfg_relay_r13_present) { + HANDLE_CODE(precfg_relay_r13->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_precfg_r12_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(precfg_general_r12.unpack(bref)); + HANDLE_CODE(precfg_sync_r12.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(precfg_comm_r12, bref, 1, 4)); + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(precfg_comm_v1310_present, 1)); + HANDLE_CODE(bref.unpack(precfg_disc_r13_present, 1)); + HANDLE_CODE(bref.unpack(precfg_relay_r13_present, 1)); + if (precfg_comm_v1310_present) { + precfg_comm_v1310 = make_copy_ptr(precfg_comm_v1310_s_()); + HANDLE_CODE(bref.unpack(precfg_comm_v1310->comm_tx_pool_list_r13_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(precfg_comm_v1310->comm_rx_pool_list_r13, bref, 1, 12)); + if (precfg_comm_v1310->comm_tx_pool_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(precfg_comm_v1310->comm_tx_pool_list_r13, bref, 1, 7)); + } + } + if (precfg_disc_r13_present) { + precfg_disc_r13 = make_copy_ptr(precfg_disc_r13_s_()); + HANDLE_CODE(bref.unpack(precfg_disc_r13->disc_tx_pool_list_r13_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(precfg_disc_r13->disc_rx_pool_list_r13, bref, 1, 16)); + if (precfg_disc_r13->disc_tx_pool_list_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(precfg_disc_r13->disc_tx_pool_list_r13, bref, 1, 4)); + } + } + if (precfg_relay_r13_present) { + precfg_relay_r13 = make_copy_ptr(sl_precfg_relay_r13_s()); + HANDLE_CODE(precfg_relay_r13->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_precfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("preconfigGeneral-r12"); + precfg_general_r12.to_json(j); + j.write_fieldname("preconfigSync-r12"); + precfg_sync_r12.to_json(j); + j.start_array("preconfigComm-r12"); + for (uint32_t i1 = 0; i1 < precfg_comm_r12.size(); ++i1) { + precfg_comm_r12[i1].to_json(j); + } + j.end_array(); + if (precfg_comm_v1310_present) { + j.write_fieldname("preconfigComm-v1310"); + j.start_obj(); + j.start_array("commRxPoolList-r13"); + for (uint32_t i1 = 0; i1 < precfg_comm_v1310->comm_rx_pool_list_r13.size(); ++i1) { + precfg_comm_v1310->comm_rx_pool_list_r13[i1].to_json(j); + } + j.end_array(); + if (precfg_comm_v1310->comm_tx_pool_list_r13_present) { + j.start_array("commTxPoolList-r13"); + for (uint32_t i1 = 0; i1 < precfg_comm_v1310->comm_tx_pool_list_r13.size(); ++i1) { + precfg_comm_v1310->comm_tx_pool_list_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (precfg_disc_r13_present) { + j.write_fieldname("preconfigDisc-r13"); + j.start_obj(); + j.start_array("discRxPoolList-r13"); + for (uint32_t i1 = 0; i1 < precfg_disc_r13->disc_rx_pool_list_r13.size(); ++i1) { + precfg_disc_r13->disc_rx_pool_list_r13[i1].to_json(j); + } + j.end_array(); + if (precfg_disc_r13->disc_tx_pool_list_r13_present) { + j.start_array("discTxPoolList-r13"); + for (uint32_t i1 = 0; i1 < precfg_disc_r13->disc_tx_pool_list_r13.size(); ++i1) { + precfg_disc_r13->disc_tx_pool_list_r13[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (precfg_relay_r13_present) { + j.write_fieldname("preconfigRelay-r13"); + precfg_relay_r13->to_json(j); + } + j.end_obj(); +} + +sl_precfg_r12_s::precfg_comm_v1310_s_::precfg_comm_v1310_s_() +{ + comm_tx_pool_list_r13_present = false; +} + +sl_precfg_r12_s::precfg_disc_r13_s_::precfg_disc_r13_s_() +{ + disc_tx_pool_list_r13_present = false; +} + +// SL-V2X-PreconfigFreqInfo-r14 ::= SEQUENCE +sl_v2x_precfg_freq_info_r14_s::sl_v2x_precfg_freq_info_r14_s() +{ + ext = false; + v2x_comm_precfg_sync_r14_present = false; + v2x_res_sel_cfg_r14_present = false; + zone_cfg_r14_present = false; + thres_sl_tx_prioritization_r14_present = false; + offset_dfn_r14_present = false; + v2x_freq_sel_cfg_list_r15_present = false; +} +SRSASN_CODE sl_v2x_precfg_freq_info_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(v2x_comm_precfg_sync_r14_present, 1)); + HANDLE_CODE(bref.pack(v2x_res_sel_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(zone_cfg_r14_present, 1)); + HANDLE_CODE(bref.pack(thres_sl_tx_prioritization_r14_present, 1)); + HANDLE_CODE(bref.pack(offset_dfn_r14_present, 1)); + + HANDLE_CODE(v2x_comm_precfg_general_r14.pack(bref)); + if (v2x_comm_precfg_sync_r14_present) { + HANDLE_CODE(v2x_comm_precfg_sync_r14.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_rx_pool_list_r14, 1, 16)); + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_comm_tx_pool_list_r14, 1, 8)); + HANDLE_CODE(pack_dyn_seq_of(bref, p2x_comm_tx_pool_list_r14, 1, 8)); + if (v2x_res_sel_cfg_r14_present) { + HANDLE_CODE(v2x_res_sel_cfg_r14.pack(bref)); + } + if (zone_cfg_r14_present) { + HANDLE_CODE(zone_cfg_r14.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, sync_prio_r14)); + if (thres_sl_tx_prioritization_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, thres_sl_tx_prioritization_r14, (uint8_t)1, (uint8_t)8)); + } + if (offset_dfn_r14_present) { + HANDLE_CODE(pack_unalign_integer(bref, offset_dfn_r14, (uint16_t)0, (uint16_t)1000)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(v2x_freq_sel_cfg_list_r15_present != (v2x_freq_sel_cfg_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= v2x_freq_sel_cfg_list_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(v2x_freq_sel_cfg_list_r15_present, 1)); + if (v2x_freq_sel_cfg_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *v2x_freq_sel_cfg_list_r15, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_precfg_freq_info_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(v2x_comm_precfg_sync_r14_present, 1)); + HANDLE_CODE(bref.unpack(v2x_res_sel_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(zone_cfg_r14_present, 1)); + HANDLE_CODE(bref.unpack(thres_sl_tx_prioritization_r14_present, 1)); + HANDLE_CODE(bref.unpack(offset_dfn_r14_present, 1)); + + HANDLE_CODE(v2x_comm_precfg_general_r14.unpack(bref)); + if (v2x_comm_precfg_sync_r14_present) { + HANDLE_CODE(v2x_comm_precfg_sync_r14.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_rx_pool_list_r14, bref, 1, 16)); + HANDLE_CODE(unpack_dyn_seq_of(v2x_comm_tx_pool_list_r14, bref, 1, 8)); + HANDLE_CODE(unpack_dyn_seq_of(p2x_comm_tx_pool_list_r14, bref, 1, 8)); + if (v2x_res_sel_cfg_r14_present) { + HANDLE_CODE(v2x_res_sel_cfg_r14.unpack(bref)); + } + if (zone_cfg_r14_present) { + HANDLE_CODE(zone_cfg_r14.unpack(bref)); + } + HANDLE_CODE(unpack_enum(sync_prio_r14, bref)); + if (thres_sl_tx_prioritization_r14_present) { + HANDLE_CODE(unpack_unalign_integer(thres_sl_tx_prioritization_r14, bref, (uint8_t)1, (uint8_t)8)); + } + if (offset_dfn_r14_present) { + HANDLE_CODE(unpack_unalign_integer(offset_dfn_r14, bref, (uint16_t)0, (uint16_t)1000)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(v2x_freq_sel_cfg_list_r15_present, 1)); + if (v2x_freq_sel_cfg_list_r15_present) { + v2x_freq_sel_cfg_list_r15 = make_copy_ptr(sl_v2x_freq_sel_cfg_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*v2x_freq_sel_cfg_list_r15, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sl_v2x_precfg_freq_info_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("v2x-CommPreconfigGeneral-r14"); + v2x_comm_precfg_general_r14.to_json(j); + if (v2x_comm_precfg_sync_r14_present) { + j.write_fieldname("v2x-CommPreconfigSync-r14"); + v2x_comm_precfg_sync_r14.to_json(j); + } + j.start_array("v2x-CommRxPoolList-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_list_r14.size(); ++i1) { + v2x_comm_rx_pool_list_r14[i1].to_json(j); + } + j.end_array(); + j.start_array("v2x-CommTxPoolList-r14"); + for (uint32_t i1 = 0; i1 < v2x_comm_tx_pool_list_r14.size(); ++i1) { + v2x_comm_tx_pool_list_r14[i1].to_json(j); + } + j.end_array(); + j.start_array("p2x-CommTxPoolList-r14"); + for (uint32_t i1 = 0; i1 < p2x_comm_tx_pool_list_r14.size(); ++i1) { + p2x_comm_tx_pool_list_r14[i1].to_json(j); + } + j.end_array(); + if (v2x_res_sel_cfg_r14_present) { + j.write_fieldname("v2x-ResourceSelectionConfig-r14"); + v2x_res_sel_cfg_r14.to_json(j); + } + if (zone_cfg_r14_present) { + j.write_fieldname("zoneConfig-r14"); + zone_cfg_r14.to_json(j); + } + j.write_str("syncPriority-r14", sync_prio_r14.to_string()); + if (thres_sl_tx_prioritization_r14_present) { + j.write_int("thresSL-TxPrioritization-r14", thres_sl_tx_prioritization_r14); + } + if (offset_dfn_r14_present) { + j.write_int("offsetDFN-r14", offset_dfn_r14); + } + if (v2x_freq_sel_cfg_list_r15_present) { + j.start_array("v2x-FreqSelectionConfigList-r15"); + for (uint32_t i1 = 0; i1 < v2x_freq_sel_cfg_list_r15->size(); ++i1) { + ((*v2x_freq_sel_cfg_list_r15)[i1]).to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-V2X-Preconfiguration-r14 ::= SEQUENCE +sl_v2x_precfg_r14_s::sl_v2x_precfg_r14_s() +{ + ext = false; + anchor_carrier_freq_list_r14_present = false; + cbr_precfg_list_r14_present = false; + v2x_packet_dupl_cfg_r15_present = false; + sync_freq_list_r15_present = false; + slss_tx_multi_freq_r15_present = false; + v2x_tx_profile_list_r15_present = false; +} +SRSASN_CODE sl_v2x_precfg_r14_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(anchor_carrier_freq_list_r14_present, 1)); + HANDLE_CODE(bref.pack(cbr_precfg_list_r14_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, v2x_precfg_freq_list_r14, 1, 8)); + if (anchor_carrier_freq_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, anchor_carrier_freq_list_r14, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (cbr_precfg_list_r14_present) { + HANDLE_CODE(cbr_precfg_list_r14.pack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + rrc_asn1_warn_assert(v2x_packet_dupl_cfg_r15_present != (v2x_packet_dupl_cfg_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= v2x_packet_dupl_cfg_r15_present; + rrc_asn1_warn_assert(sync_freq_list_r15_present != (sync_freq_list_r15.get() != NULL), __FILE__, __LINE__); + group_flags[0] |= sync_freq_list_r15_present; + group_flags[0] |= slss_tx_multi_freq_r15_present; + rrc_asn1_warn_assert(v2x_tx_profile_list_r15_present != (v2x_tx_profile_list_r15.get() != NULL), __FILE__, + __LINE__); + group_flags[0] |= v2x_tx_profile_list_r15_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard packer(bref); + + HANDLE_CODE(bref.pack(v2x_packet_dupl_cfg_r15_present, 1)); + HANDLE_CODE(bref.pack(sync_freq_list_r15_present, 1)); + HANDLE_CODE(bref.pack(slss_tx_multi_freq_r15_present, 1)); + HANDLE_CODE(bref.pack(v2x_tx_profile_list_r15_present, 1)); + if (v2x_packet_dupl_cfg_r15_present) { + HANDLE_CODE(v2x_packet_dupl_cfg_r15->pack(bref)); + } + if (sync_freq_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sync_freq_list_r15, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (v2x_tx_profile_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, *v2x_tx_profile_list_r15, 1, 256, EnumPacker())); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_v2x_precfg_r14_s::unpack(bit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(anchor_carrier_freq_list_r14_present, 1)); + HANDLE_CODE(bref.unpack(cbr_precfg_list_r14_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(v2x_precfg_freq_list_r14, bref, 1, 8)); + if (anchor_carrier_freq_list_r14_present) { + HANDLE_CODE( + unpack_dyn_seq_of(anchor_carrier_freq_list_r14, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (cbr_precfg_list_r14_present) { + HANDLE_CODE(cbr_precfg_list_r14.unpack(bref)); + } + + if (ext) { + ext_groups_header group_flags(1); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard unpacker(bref); + + HANDLE_CODE(bref.unpack(v2x_packet_dupl_cfg_r15_present, 1)); + HANDLE_CODE(bref.unpack(sync_freq_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(slss_tx_multi_freq_r15_present, 1)); + HANDLE_CODE(bref.unpack(v2x_tx_profile_list_r15_present, 1)); + if (v2x_packet_dupl_cfg_r15_present) { + v2x_packet_dupl_cfg_r15 = make_copy_ptr(sl_v2x_packet_dupl_cfg_r15_s()); + HANDLE_CODE(v2x_packet_dupl_cfg_r15->unpack(bref)); + } + if (sync_freq_list_r15_present) { + sync_freq_list_r15 = make_copy_ptr(sl_v2x_sync_freq_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*sync_freq_list_r15, bref, 1, 8, UnalignedIntegerPacker(0, 262143))); + } + if (v2x_tx_profile_list_r15_present) { + v2x_tx_profile_list_r15 = make_copy_ptr(sl_v2x_tx_profile_list_r15_l()); + HANDLE_CODE(unpack_dyn_seq_of(*v2x_tx_profile_list_r15, bref, 1, 256, EnumPacker())); + } + } + } + return SRSASN_SUCCESS; +} +void sl_v2x_precfg_r14_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("v2x-PreconfigFreqList-r14"); + for (uint32_t i1 = 0; i1 < v2x_precfg_freq_list_r14.size(); ++i1) { + v2x_precfg_freq_list_r14[i1].to_json(j); + } + j.end_array(); + if (anchor_carrier_freq_list_r14_present) { + j.start_array("anchorCarrierFreqList-r14"); + for (uint32_t i1 = 0; i1 < anchor_carrier_freq_list_r14.size(); ++i1) { + j.write_int(anchor_carrier_freq_list_r14[i1]); + } + j.end_array(); + } + if (cbr_precfg_list_r14_present) { + j.write_fieldname("cbr-PreconfigList-r14"); + cbr_precfg_list_r14.to_json(j); + } + if (v2x_packet_dupl_cfg_r15_present) { + j.write_fieldname("v2x-PacketDuplicationConfig-r15"); + v2x_packet_dupl_cfg_r15->to_json(j); + } + if (sync_freq_list_r15_present) { + j.start_array("syncFreqList-r15"); + for (uint32_t i1 = 0; i1 < sync_freq_list_r15->size(); ++i1) { + j.write_int(((*sync_freq_list_r15)[i1])); + } + j.end_array(); + } + if (slss_tx_multi_freq_r15_present) { + j.write_str("slss-TxMultiFreq-r15", "true"); + } + if (v2x_tx_profile_list_r15_present) { + j.start_array("v2x-TxProfileList-r15"); + for (uint32_t i1 = 0; i1 < v2x_tx_profile_list_r15->size(); ++i1) { + j.write_str(((*v2x_tx_profile_list_r15)[i1]).to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// UEPagingCoverageInformation-r13-IEs ::= SEQUENCE +ue_paging_coverage_info_r13_ies_s::ue_paging_coverage_info_r13_ies_s() +{ + mpdcch_num_repeat_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_paging_coverage_info_r13_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mpdcch_num_repeat_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mpdcch_num_repeat_r13_present) { + HANDLE_CODE(pack_unalign_integer(bref, mpdcch_num_repeat_r13, (uint16_t)1, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_paging_coverage_info_r13_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mpdcch_num_repeat_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mpdcch_num_repeat_r13_present) { + HANDLE_CODE(unpack_unalign_integer(mpdcch_num_repeat_r13, bref, (uint16_t)1, (uint16_t)256)); + } + + return SRSASN_SUCCESS; +} +void ue_paging_coverage_info_r13_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mpdcch_num_repeat_r13_present) { + j.write_int("mpdcch-NumRepetition-r13", mpdcch_num_repeat_r13); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UEPagingCoverageInformation ::= SEQUENCE +SRSASN_CODE ue_paging_coverage_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_paging_coverage_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_paging_coverage_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_paging_coverage_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_paging_coverage_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_"); + } +} +ue_paging_coverage_info_s::crit_exts_c_::crit_exts_c_(const ue_paging_coverage_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_"); + } +} +ue_paging_coverage_info_s::crit_exts_c_& ue_paging_coverage_info_s::crit_exts_c_:: + operator=(const ue_paging_coverage_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_"); + } + + return *this; +} +void ue_paging_coverage_info_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_paging_coverage_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_paging_coverage_info_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ue_paging_coverage_info_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_paging_coverage_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_paging_coverage_info_r13: + j.write_fieldname("uePagingCoverageInformation-r13"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_paging_coverage_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_paging_coverage_info_r13: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_paging_coverage_info_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_paging_coverage_info_r13: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_paging_coverage_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UERadioAccessCapabilityInformation-r8-IEs ::= SEQUENCE +ue_radio_access_cap_info_r8_ies_s::ue_radio_access_cap_info_r8_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_radio_access_cap_info_r8_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ue_radio_access_cap_info.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_access_cap_info_r8_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ue_radio_access_cap_info.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_radio_access_cap_info_r8_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ue-RadioAccessCapabilityInfo", ue_radio_access_cap_info.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UERadioAccessCapabilityInformation ::= SEQUENCE +SRSASN_CODE ue_radio_access_cap_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_access_cap_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_radio_access_cap_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_radio_access_cap_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_radio_access_cap_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); + } +} +ue_radio_access_cap_info_s::crit_exts_c_::crit_exts_c_(const ue_radio_access_cap_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); + } +} +ue_radio_access_cap_info_s::crit_exts_c_& ue_radio_access_cap_info_s::crit_exts_c_:: + operator=(const ue_radio_access_cap_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); + } + + return *this; +} +void ue_radio_access_cap_info_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_radio_access_cap_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_access_cap_info_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_radio_access_cap_info_r8: + j.write_fieldname("ueRadioAccessCapabilityInformation-r8"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_radio_access_cap_info_r8: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_radio_access_cap_info_r8: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_radio_access_cap_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// UERadioPagingInformation-v1310-IEs ::= SEQUENCE +ue_radio_paging_info_v1310_ies_s::ue_radio_paging_info_v1310_ies_s() +{ + supported_band_list_eutra_for_paging_r13_present = false; + non_crit_ext_present = false; +} +SRSASN_CODE ue_radio_paging_info_v1310_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_list_eutra_for_paging_r13_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (supported_band_list_eutra_for_paging_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_eutra_for_paging_r13, 1, 64, + UnalignedIntegerPacker(1, 256))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_paging_info_v1310_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_band_list_eutra_for_paging_r13_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (supported_band_list_eutra_for_paging_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_eutra_for_paging_r13, bref, 1, 64, + UnalignedIntegerPacker(1, 256))); + } + + return SRSASN_SUCCESS; +} +void ue_radio_paging_info_v1310_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_list_eutra_for_paging_r13_present) { + j.start_array("supportedBandListEUTRAForPaging-r13"); + for (uint32_t i1 = 0; i1 < supported_band_list_eutra_for_paging_r13.size(); ++i1) { + j.write_int(supported_band_list_eutra_for_paging_r13[i1]); + } + j.end_array(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UERadioPagingInformation-r12-IEs ::= SEQUENCE +ue_radio_paging_info_r12_ies_s::ue_radio_paging_info_r12_ies_s() +{ + non_crit_ext_present = false; +} +SRSASN_CODE ue_radio_paging_info_r12_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ue_radio_paging_info_r12.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_paging_info_r12_ies_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ue_radio_paging_info_r12.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_radio_paging_info_r12_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ue-RadioPagingInfo-r12", ue_radio_paging_info_r12.to_string()); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UERadioPagingInformation ::= SEQUENCE +SRSASN_CODE ue_radio_paging_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_paging_info_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_radio_paging_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_radio_paging_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::c1: + c.destroy(); + break; + default: + break; + } +} +void ue_radio_paging_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::c1: + c.init(); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); + } +} +ue_radio_paging_info_s::crit_exts_c_::crit_exts_c_(const ue_radio_paging_info_s::crit_exts_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::c1: + c.init(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); + } +} +ue_radio_paging_info_s::crit_exts_c_& ue_radio_paging_info_s::crit_exts_c_:: + operator=(const ue_radio_paging_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::c1: + c.set(other.c.get()); + break; + case types::crit_exts_future: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); + } + + return *this; +} +void ue_radio_paging_info_s::crit_exts_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::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_radio_paging_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_paging_info_s::crit_exts_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ue_radio_paging_info_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +void ue_radio_paging_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_radio_paging_info_r12: + j.write_fieldname("ueRadioPagingInformation-r12"); + c.to_json(j); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_radio_paging_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::ue_radio_paging_info_r12: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_radio_paging_info_s::crit_exts_c_::c1_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::ue_radio_paging_info_r12: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare7: + break; + case types::spare6: + break; + case types::spare5: + break; + case types::spare4: + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ue_radio_paging_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// VarConnEstFailReport-r11 ::= SEQUENCE +SRSASN_CODE var_conn_est_fail_report_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(conn_est_fail_report_r11.pack(bref)); + HANDLE_CODE(plmn_id_r11.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_conn_est_fail_report_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(conn_est_fail_report_r11.unpack(bref)); + HANDLE_CODE(plmn_id_r11.unpack(bref)); + + return SRSASN_SUCCESS; +} +void var_conn_est_fail_report_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("connEstFailReport-r11"); + conn_est_fail_report_r11.to_json(j); + j.write_fieldname("plmn-Identity-r11"); + plmn_id_r11.to_json(j); + j.end_obj(); +} + +// VarLogMeasConfig-r10 ::= SEQUENCE +var_log_meas_cfg_r10_s::var_log_meas_cfg_r10_s() +{ + area_cfg_r10_present = false; +} +SRSASN_CODE var_log_meas_cfg_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r10_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, logging_dur_r10)); + HANDLE_CODE(pack_enum(bref, logging_interv_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_log_meas_cfg_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r10_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.unpack(bref)); + } + HANDLE_CODE(unpack_enum(logging_dur_r10, bref)); + HANDLE_CODE(unpack_enum(logging_interv_r10, bref)); + + return SRSASN_SUCCESS; +} +void var_log_meas_cfg_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (area_cfg_r10_present) { + j.write_fieldname("areaConfiguration-r10"); + area_cfg_r10.to_json(j); + } + j.write_str("loggingDuration-r10", logging_dur_r10.to_string()); + j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); + j.end_obj(); +} + +// VarLogMeasConfig-r11 ::= SEQUENCE +var_log_meas_cfg_r11_s::var_log_meas_cfg_r11_s() +{ + area_cfg_r10_present = false; + area_cfg_v1130_present = false; +} +SRSASN_CODE var_log_meas_cfg_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(area_cfg_v1130_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.pack(bref)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, logging_dur_r10)); + HANDLE_CODE(pack_enum(bref, logging_interv_r10)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_log_meas_cfg_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(area_cfg_v1130_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.unpack(bref)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.unpack(bref)); + } + HANDLE_CODE(unpack_enum(logging_dur_r10, bref)); + HANDLE_CODE(unpack_enum(logging_interv_r10, bref)); + + return SRSASN_SUCCESS; +} +void var_log_meas_cfg_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (area_cfg_r10_present) { + j.write_fieldname("areaConfiguration-r10"); + area_cfg_r10.to_json(j); + } + if (area_cfg_v1130_present) { + j.write_fieldname("areaConfiguration-v1130"); + area_cfg_v1130.to_json(j); + } + j.write_str("loggingDuration-r10", logging_dur_r10.to_string()); + j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); + j.end_obj(); +} + +// VarLogMeasConfig-r12 ::= SEQUENCE +var_log_meas_cfg_r12_s::var_log_meas_cfg_r12_s() +{ + area_cfg_r10_present = false; + area_cfg_v1130_present = false; + target_mbsfn_area_list_r12_present = false; +} +SRSASN_CODE var_log_meas_cfg_r12_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(area_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(target_mbsfn_area_list_r12_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.pack(bref)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, logging_dur_r10)); + HANDLE_CODE(pack_enum(bref, logging_interv_r10)); + if (target_mbsfn_area_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, target_mbsfn_area_list_r12, 0, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_log_meas_cfg_r12_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(area_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(target_mbsfn_area_list_r12_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.unpack(bref)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.unpack(bref)); + } + HANDLE_CODE(unpack_enum(logging_dur_r10, bref)); + HANDLE_CODE(unpack_enum(logging_interv_r10, bref)); + if (target_mbsfn_area_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(target_mbsfn_area_list_r12, bref, 0, 8)); + } + + return SRSASN_SUCCESS; +} +void var_log_meas_cfg_r12_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (area_cfg_r10_present) { + j.write_fieldname("areaConfiguration-r10"); + area_cfg_r10.to_json(j); + } + if (area_cfg_v1130_present) { + j.write_fieldname("areaConfiguration-v1130"); + area_cfg_v1130.to_json(j); + } + j.write_str("loggingDuration-r10", logging_dur_r10.to_string()); + j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); + if (target_mbsfn_area_list_r12_present) { + j.start_array("targetMBSFN-AreaList-r12"); + for (uint32_t i1 = 0; i1 < target_mbsfn_area_list_r12.size(); ++i1) { + target_mbsfn_area_list_r12[i1].to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// VarLogMeasConfig-r15 ::= SEQUENCE +var_log_meas_cfg_r15_s::var_log_meas_cfg_r15_s() +{ + area_cfg_r10_present = false; + area_cfg_v1130_present = false; + target_mbsfn_area_list_r12_present = false; + bt_name_list_r15_present = false; + wlan_name_list_r15_present = false; +} +SRSASN_CODE var_log_meas_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.pack(area_cfg_v1130_present, 1)); + HANDLE_CODE(bref.pack(target_mbsfn_area_list_r12_present, 1)); + HANDLE_CODE(bref.pack(bt_name_list_r15_present, 1)); + HANDLE_CODE(bref.pack(wlan_name_list_r15_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.pack(bref)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.pack(bref)); + } + HANDLE_CODE(pack_enum(bref, logging_dur_r10)); + HANDLE_CODE(pack_enum(bref, logging_interv_r10)); + if (target_mbsfn_area_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, target_mbsfn_area_list_r12, 0, 8)); + } + if (bt_name_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, bt_name_list_r15, 1, 4)); + } + if (wlan_name_list_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_name_list_r15, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_log_meas_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r10_present, 1)); + HANDLE_CODE(bref.unpack(area_cfg_v1130_present, 1)); + HANDLE_CODE(bref.unpack(target_mbsfn_area_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(bt_name_list_r15_present, 1)); + HANDLE_CODE(bref.unpack(wlan_name_list_r15_present, 1)); + + if (area_cfg_r10_present) { + HANDLE_CODE(area_cfg_r10.unpack(bref)); + } + if (area_cfg_v1130_present) { + HANDLE_CODE(area_cfg_v1130.unpack(bref)); + } + HANDLE_CODE(unpack_enum(logging_dur_r10, bref)); + HANDLE_CODE(unpack_enum(logging_interv_r10, bref)); + if (target_mbsfn_area_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(target_mbsfn_area_list_r12, bref, 0, 8)); + } + if (bt_name_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(bt_name_list_r15, bref, 1, 4)); + } + if (wlan_name_list_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_name_list_r15, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void var_log_meas_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (area_cfg_r10_present) { + j.write_fieldname("areaConfiguration-r10"); + area_cfg_r10.to_json(j); + } + if (area_cfg_v1130_present) { + j.write_fieldname("areaConfiguration-v1130"); + area_cfg_v1130.to_json(j); + } + j.write_str("loggingDuration-r10", logging_dur_r10.to_string()); + j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); + if (target_mbsfn_area_list_r12_present) { + j.start_array("targetMBSFN-AreaList-r12"); + for (uint32_t i1 = 0; i1 < target_mbsfn_area_list_r12.size(); ++i1) { + target_mbsfn_area_list_r12[i1].to_json(j); + } + j.end_array(); + } + if (bt_name_list_r15_present) { + j.start_array("bt-NameList-r15"); + for (uint32_t i1 = 0; i1 < bt_name_list_r15.size(); ++i1) { + j.write_str(bt_name_list_r15[i1].to_string()); + } + j.end_array(); + } + if (wlan_name_list_r15_present) { + j.start_array("wlan-NameList-r15"); + for (uint32_t i1 = 0; i1 < wlan_name_list_r15.size(); ++i1) { + j.write_str(wlan_name_list_r15[i1].to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// VarLogMeasReport-r10 ::= SEQUENCE +SRSASN_CODE var_log_meas_report_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(trace_ref_r10.pack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.pack(bref)); + HANDLE_CODE(tce_id_r10.pack(bref)); + HANDLE_CODE(plmn_id_r10.pack(bref)); + HANDLE_CODE(absolute_time_info_r10.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, log_meas_info_list_r10, 1, 4060)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_log_meas_report_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(trace_ref_r10.unpack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.unpack(bref)); + HANDLE_CODE(tce_id_r10.unpack(bref)); + HANDLE_CODE(plmn_id_r10.unpack(bref)); + HANDLE_CODE(absolute_time_info_r10.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(log_meas_info_list_r10, bref, 1, 4060)); + + return SRSASN_SUCCESS; +} +void var_log_meas_report_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("traceReference-r10"); + trace_ref_r10.to_json(j); + j.write_str("traceRecordingSessionRef-r10", trace_recording_session_ref_r10.to_string()); + j.write_str("tce-Id-r10", tce_id_r10.to_string()); + j.write_fieldname("plmn-Identity-r10"); + plmn_id_r10.to_json(j); + j.write_str("absoluteTimeInfo-r10", absolute_time_info_r10.to_string()); + j.start_array("logMeasInfoList-r10"); + for (uint32_t i1 = 0; i1 < log_meas_info_list_r10.size(); ++i1) { + log_meas_info_list_r10[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// VarLogMeasReport-r11 ::= SEQUENCE +SRSASN_CODE var_log_meas_report_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(trace_ref_r10.pack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.pack(bref)); + HANDLE_CODE(tce_id_r10.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r11, 1, 16)); + HANDLE_CODE(absolute_time_info_r10.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, log_meas_info_list_r10, 1, 4060)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_log_meas_report_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(trace_ref_r10.unpack(bref)); + HANDLE_CODE(trace_recording_session_ref_r10.unpack(bref)); + HANDLE_CODE(tce_id_r10.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r11, bref, 1, 16)); + HANDLE_CODE(absolute_time_info_r10.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(log_meas_info_list_r10, bref, 1, 4060)); + + return SRSASN_SUCCESS; +} +void var_log_meas_report_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("traceReference-r10"); + trace_ref_r10.to_json(j); + j.write_str("traceRecordingSessionRef-r10", trace_recording_session_ref_r10.to_string()); + j.write_str("tce-Id-r10", tce_id_r10.to_string()); + j.start_array("plmn-IdentityList-r11"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r11.size(); ++i1) { + plmn_id_list_r11[i1].to_json(j); + } + j.end_array(); + j.write_str("absoluteTimeInfo-r10", absolute_time_info_r10.to_string()); + j.start_array("logMeasInfoList-r10"); + for (uint32_t i1 = 0; i1 < log_meas_info_list_r10.size(); ++i1) { + log_meas_info_list_r10[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// VarMeasConfig ::= SEQUENCE +var_meas_cfg_s::var_meas_cfg_s() +{ + meas_id_list_present = false; + meas_id_list_ext_r12_present = false; + meas_id_list_v1310_present = false; + meas_id_list_ext_v1310_present = false; + meas_obj_list_present = false; + meas_obj_list_ext_r13_present = false; + meas_obj_list_v9i0_present = false; + report_cfg_list_present = false; + quant_cfg_present = false; + meas_scale_factor_r12_present = false; + s_measure_present = false; + speed_state_pars_present = false; + allow_interruptions_r11_present = false; +} +SRSASN_CODE var_meas_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_id_list_present, 1)); + HANDLE_CODE(bref.pack(meas_id_list_ext_r12_present, 1)); + HANDLE_CODE(bref.pack(meas_id_list_v1310_present, 1)); + HANDLE_CODE(bref.pack(meas_id_list_ext_v1310_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_list_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_list_ext_r13_present, 1)); + HANDLE_CODE(bref.pack(meas_obj_list_v9i0_present, 1)); + HANDLE_CODE(bref.pack(report_cfg_list_present, 1)); + HANDLE_CODE(bref.pack(quant_cfg_present, 1)); + HANDLE_CODE(bref.pack(meas_scale_factor_r12_present, 1)); + HANDLE_CODE(bref.pack(s_measure_present, 1)); + HANDLE_CODE(bref.pack(speed_state_pars_present, 1)); + HANDLE_CODE(bref.pack(allow_interruptions_r11_present, 1)); + + if (meas_id_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_list, 1, 32)); + } + if (meas_id_list_ext_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_list_ext_r12, 1, 32)); + } + if (meas_id_list_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_list_v1310, 1, 32)); + } + if (meas_id_list_ext_v1310_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_id_list_ext_v1310, 1, 32)); + } + if (meas_obj_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_list, 1, 32)); + } + if (meas_obj_list_ext_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_list_ext_r13, 1, 32)); + } + if (meas_obj_list_v9i0_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_list_v9i0, 1, 32)); + } + if (report_cfg_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_list, 1, 32)); + } + if (quant_cfg_present) { + HANDLE_CODE(quant_cfg.pack(bref)); + } + if (meas_scale_factor_r12_present) { + HANDLE_CODE(pack_enum(bref, meas_scale_factor_r12)); + } + if (s_measure_present) { + HANDLE_CODE(pack_unalign_integer(bref, s_measure, (int16_t)-140, (int16_t)-44)); + } + if (speed_state_pars_present) { + HANDLE_CODE(speed_state_pars.pack(bref)); + } + if (allow_interruptions_r11_present) { + HANDLE_CODE(bref.pack(allow_interruptions_r11, 1)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_meas_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_id_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_list_ext_r12_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_list_v1310_present, 1)); + HANDLE_CODE(bref.unpack(meas_id_list_ext_v1310_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_list_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_list_ext_r13_present, 1)); + HANDLE_CODE(bref.unpack(meas_obj_list_v9i0_present, 1)); + HANDLE_CODE(bref.unpack(report_cfg_list_present, 1)); + HANDLE_CODE(bref.unpack(quant_cfg_present, 1)); + HANDLE_CODE(bref.unpack(meas_scale_factor_r12_present, 1)); + HANDLE_CODE(bref.unpack(s_measure_present, 1)); + HANDLE_CODE(bref.unpack(speed_state_pars_present, 1)); + HANDLE_CODE(bref.unpack(allow_interruptions_r11_present, 1)); + + if (meas_id_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_list, bref, 1, 32)); + } + if (meas_id_list_ext_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_list_ext_r12, bref, 1, 32)); + } + if (meas_id_list_v1310_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_list_v1310, bref, 1, 32)); + } + if (meas_id_list_ext_v1310_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_id_list_ext_v1310, bref, 1, 32)); + } + if (meas_obj_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_list, bref, 1, 32)); + } + if (meas_obj_list_ext_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_list_ext_r13, bref, 1, 32)); + } + if (meas_obj_list_v9i0_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_obj_list_v9i0, bref, 1, 32)); + } + if (report_cfg_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(report_cfg_list, bref, 1, 32)); + } + if (quant_cfg_present) { + HANDLE_CODE(quant_cfg.unpack(bref)); + } + if (meas_scale_factor_r12_present) { + HANDLE_CODE(unpack_enum(meas_scale_factor_r12, bref)); + } + if (s_measure_present) { + HANDLE_CODE(unpack_unalign_integer(s_measure, bref, (int16_t)-140, (int16_t)-44)); + } + if (speed_state_pars_present) { + HANDLE_CODE(speed_state_pars.unpack(bref)); + } + if (allow_interruptions_r11_present) { + HANDLE_CODE(bref.unpack(allow_interruptions_r11, 1)); + } + + return SRSASN_SUCCESS; +} +void var_meas_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_id_list_present) { + j.start_array("measIdList"); + for (uint32_t i1 = 0; i1 < meas_id_list.size(); ++i1) { + meas_id_list[i1].to_json(j); + } + j.end_array(); + } + if (meas_id_list_ext_r12_present) { + j.start_array("measIdListExt-r12"); + for (uint32_t i1 = 0; i1 < meas_id_list_ext_r12.size(); ++i1) { + meas_id_list_ext_r12[i1].to_json(j); + } + j.end_array(); + } + if (meas_id_list_v1310_present) { + j.start_array("measIdList-v1310"); + for (uint32_t i1 = 0; i1 < meas_id_list_v1310.size(); ++i1) { + meas_id_list_v1310[i1].to_json(j); + } + j.end_array(); + } + if (meas_id_list_ext_v1310_present) { + j.start_array("measIdListExt-v1310"); + for (uint32_t i1 = 0; i1 < meas_id_list_ext_v1310.size(); ++i1) { + meas_id_list_ext_v1310[i1].to_json(j); + } + j.end_array(); + } + if (meas_obj_list_present) { + j.start_array("measObjectList"); + for (uint32_t i1 = 0; i1 < meas_obj_list.size(); ++i1) { + meas_obj_list[i1].to_json(j); + } + j.end_array(); + } + if (meas_obj_list_ext_r13_present) { + j.start_array("measObjectListExt-r13"); + for (uint32_t i1 = 0; i1 < meas_obj_list_ext_r13.size(); ++i1) { + meas_obj_list_ext_r13[i1].to_json(j); + } + j.end_array(); + } + if (meas_obj_list_v9i0_present) { + j.start_array("measObjectList-v9i0"); + for (uint32_t i1 = 0; i1 < meas_obj_list_v9i0.size(); ++i1) { + meas_obj_list_v9i0[i1].to_json(j); + } + j.end_array(); + } + if (report_cfg_list_present) { + j.start_array("reportConfigList"); + for (uint32_t i1 = 0; i1 < report_cfg_list.size(); ++i1) { + report_cfg_list[i1].to_json(j); + } + j.end_array(); + } + if (quant_cfg_present) { + j.write_fieldname("quantityConfig"); + quant_cfg.to_json(j); + } + if (meas_scale_factor_r12_present) { + j.write_str("measScaleFactor-r12", meas_scale_factor_r12.to_string()); + } + if (s_measure_present) { + j.write_int("s-Measure", s_measure); + } + if (speed_state_pars_present) { + j.write_fieldname("speedStatePars"); + speed_state_pars.to_json(j); + } + if (allow_interruptions_r11_present) { + j.write_bool("allowInterruptions-r11", allow_interruptions_r11); + } + j.end_obj(); +} + +void var_meas_cfg_s::speed_state_pars_c_::set(types::options e) +{ + type_ = e; +} +void var_meas_cfg_s::speed_state_pars_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::release: + break; + case types::setup: + j.write_fieldname("setup"); + j.start_obj(); + j.write_fieldname("mobilityStateParameters"); + c.mob_state_params.to_json(j); + j.write_fieldname("timeToTrigger-SF"); + c.time_to_trigger_sf.to_json(j); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "var_meas_cfg_s::speed_state_pars_c_"); + } + j.end_obj(); +} +SRSASN_CODE var_meas_cfg_s::speed_state_pars_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type_); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.mob_state_params.pack(bref)); + HANDLE_CODE(c.time_to_trigger_sf.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "var_meas_cfg_s::speed_state_pars_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE var_meas_cfg_s::speed_state_pars_c_::unpack(bit_ref& bref) +{ + types e; + unpack_enum(e, bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.mob_state_params.unpack(bref)); + HANDLE_CODE(c.time_to_trigger_sf.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "var_meas_cfg_s::speed_state_pars_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +// VarMeasIdleConfig-r15 ::= SEQUENCE +var_meas_idle_cfg_r15_s::var_meas_idle_cfg_r15_s() +{ + meas_idle_carrier_list_eutra_r15_present = false; +} +SRSASN_CODE var_meas_idle_cfg_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_idle_carrier_list_eutra_r15_present, 1)); + + if (meas_idle_carrier_list_eutra_r15_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r15, 1, 8)); + } + HANDLE_CODE(pack_enum(bref, meas_idle_dur_r15)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_meas_idle_cfg_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_idle_carrier_list_eutra_r15_present, 1)); + + if (meas_idle_carrier_list_eutra_r15_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r15, bref, 1, 8)); + } + HANDLE_CODE(unpack_enum(meas_idle_dur_r15, bref)); + + return SRSASN_SUCCESS; +} +void var_meas_idle_cfg_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_idle_carrier_list_eutra_r15_present) { + j.start_array("measIdleCarrierListEUTRA-r15"); + for (uint32_t i1 = 0; i1 < meas_idle_carrier_list_eutra_r15.size(); ++i1) { + meas_idle_carrier_list_eutra_r15[i1].to_json(j); + } + j.end_array(); + } + j.write_str("measIdleDuration-r15", meas_idle_dur_r15.to_string()); + j.end_obj(); +} + +// VarMeasIdleReport-r15 ::= SEQUENCE +SRSASN_CODE var_meas_idle_report_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, meas_report_idle_r15, 1, 3)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_meas_idle_report_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(meas_report_idle_r15, bref, 1, 3)); + + return SRSASN_SUCCESS; +} +void var_meas_idle_report_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measReportIdle-r15"); + for (uint32_t i1 = 0; i1 < meas_report_idle_r15.size(); ++i1) { + meas_report_idle_r15[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// VarMeasReport ::= SEQUENCE +var_meas_report_s::var_meas_report_s() +{ + meas_id_v1250_present = false; + cells_triggered_list_present = false; + csi_rs_triggered_list_r12_present = false; + pools_triggered_list_r14_present = false; +} +SRSASN_CODE var_meas_report_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_id_v1250_present, 1)); + HANDLE_CODE(bref.pack(cells_triggered_list_present, 1)); + HANDLE_CODE(bref.pack(csi_rs_triggered_list_r12_present, 1)); + HANDLE_CODE(bref.pack(pools_triggered_list_r14_present, 1)); + + HANDLE_CODE(pack_unalign_integer(bref, meas_id, (uint8_t)1, (uint8_t)32)); + if (meas_id_v1250_present) { + HANDLE_CODE(pack_unalign_integer(bref, meas_id_v1250, (uint8_t)33, (uint8_t)64)); + } + if (cells_triggered_list_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_triggered_list, 1, 32)); + } + if (csi_rs_triggered_list_r12_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, csi_rs_triggered_list_r12, 1, 96, UnalignedIntegerPacker(1, 96))); + } + if (pools_triggered_list_r14_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, pools_triggered_list_r14, 1, 72, UnalignedIntegerPacker(1, 72))); + } + HANDLE_CODE(pack_unconstrained_integer(bref, nof_reports_sent)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_meas_report_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_id_v1250_present, 1)); + HANDLE_CODE(bref.unpack(cells_triggered_list_present, 1)); + HANDLE_CODE(bref.unpack(csi_rs_triggered_list_r12_present, 1)); + HANDLE_CODE(bref.unpack(pools_triggered_list_r14_present, 1)); + + HANDLE_CODE(unpack_unalign_integer(meas_id, bref, (uint8_t)1, (uint8_t)32)); + if (meas_id_v1250_present) { + HANDLE_CODE(unpack_unalign_integer(meas_id_v1250, bref, (uint8_t)33, (uint8_t)64)); + } + if (cells_triggered_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_triggered_list, bref, 1, 32)); + } + if (csi_rs_triggered_list_r12_present) { + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_triggered_list_r12, bref, 1, 96, UnalignedIntegerPacker(1, 96))); + } + if (pools_triggered_list_r14_present) { + HANDLE_CODE(unpack_dyn_seq_of(pools_triggered_list_r14, bref, 1, 72, UnalignedIntegerPacker(1, 72))); + } + HANDLE_CODE(unpack_unconstrained_integer(nof_reports_sent, bref)); + + return SRSASN_SUCCESS; +} +void var_meas_report_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measId", meas_id); + if (meas_id_v1250_present) { + j.write_int("measId-v1250", meas_id_v1250); + } + if (cells_triggered_list_present) { + j.start_array("cellsTriggeredList"); + for (uint32_t i1 = 0; i1 < cells_triggered_list.size(); ++i1) { + cells_triggered_list[i1].to_json(j); + } + j.end_array(); + } + if (csi_rs_triggered_list_r12_present) { + j.start_array("csi-RS-TriggeredList-r12"); + for (uint32_t i1 = 0; i1 < csi_rs_triggered_list_r12.size(); ++i1) { + j.write_int(csi_rs_triggered_list_r12[i1]); + } + j.end_array(); + } + if (pools_triggered_list_r14_present) { + j.start_array("poolsTriggeredList-r14"); + for (uint32_t i1 = 0; i1 < pools_triggered_list_r14.size(); ++i1) { + j.write_int(pools_triggered_list_r14[i1]); + } + j.end_array(); + } + j.write_int("numberOfReportsSent", nof_reports_sent); + j.end_obj(); +} + +// VarRLF-Report-r10 ::= SEQUENCE +SRSASN_CODE var_rlf_report_r10_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rlf_report_r10.pack(bref)); + HANDLE_CODE(plmn_id_r10.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_rlf_report_r10_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(rlf_report_r10.unpack(bref)); + HANDLE_CODE(plmn_id_r10.unpack(bref)); + + return SRSASN_SUCCESS; +} +void var_rlf_report_r10_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rlf-Report-r10"); + rlf_report_r10.to_json(j); + j.write_fieldname("plmn-Identity-r10"); + plmn_id_r10.to_json(j); + j.end_obj(); +} + +// VarRLF-Report-r11 ::= SEQUENCE +SRSASN_CODE var_rlf_report_r11_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rlf_report_r10.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r11, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_rlf_report_r11_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(rlf_report_r10.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r11, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void var_rlf_report_r11_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rlf-Report-r10"); + rlf_report_r10.to_json(j); + j.start_array("plmn-IdentityList-r11"); + for (uint32_t i1 = 0; i1 < plmn_id_list_r11.size(); ++i1) { + plmn_id_list_r11[i1].to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// VarShortINACTIVE-MAC-Input-r15 ::= SEQUENCE +SRSASN_CODE var_short_inactive_mac_input_r15_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cell_id_r15.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, pci_r15, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(c_rnti_r15.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_short_inactive_mac_input_r15_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(cell_id_r15.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(pci_r15, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(c_rnti_r15.unpack(bref)); + + return SRSASN_SUCCESS; +} +void var_short_inactive_mac_input_r15_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cellIdentity-r15", cell_id_r15.to_string()); + j.write_int("physCellId-r15", pci_r15); + j.write_str("c-RNTI-r15", c_rnti_r15.to_string()); + j.end_obj(); +} + +// VarShortMAC-Input ::= SEQUENCE +SRSASN_CODE var_short_mac_input_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cell_id.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, pci, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(c_rnti.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_short_mac_input_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(cell_id.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(pci, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(c_rnti.unpack(bref)); + + return SRSASN_SUCCESS; +} +void var_short_mac_input_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cellIdentity", cell_id.to_string()); + j.write_int("physCellId", pci); + j.write_str("c-RNTI", c_rnti.to_string()); + j.end_obj(); +} + +// VarShortResumeMAC-Input-r13 ::= SEQUENCE +SRSASN_CODE var_short_resume_mac_input_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cell_id_r13.pack(bref)); + HANDLE_CODE(pack_unalign_integer(bref, pci_r13, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(c_rnti_r13.pack(bref)); + HANDLE_CODE(resume_discriminator_r13.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_short_resume_mac_input_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(cell_id_r13.unpack(bref)); + HANDLE_CODE(unpack_unalign_integer(pci_r13, bref, (uint16_t)0, (uint16_t)503)); + HANDLE_CODE(c_rnti_r13.unpack(bref)); + HANDLE_CODE(resume_discriminator_r13.unpack(bref)); + + return SRSASN_SUCCESS; +} +void var_short_resume_mac_input_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cellIdentity-r13", cell_id_r13.to_string()); + j.write_int("physCellId-r13", pci_r13); + j.write_str("c-RNTI-r13", c_rnti_r13.to_string()); + j.write_str("resumeDiscriminator-r13", resume_discriminator_r13.to_string()); + j.end_obj(); +} + +// VarWLAN-MobilityConfig ::= SEQUENCE +var_wlan_mob_cfg_s::var_wlan_mob_cfg_s() +{ + wlan_mob_set_r13_present = false; + success_report_requested_present = false; + wlan_suspend_cfg_r14_present = false; +} +SRSASN_CODE var_wlan_mob_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(wlan_mob_set_r13_present, 1)); + HANDLE_CODE(bref.pack(success_report_requested_present, 1)); + HANDLE_CODE(bref.pack(wlan_suspend_cfg_r14_present, 1)); + + if (wlan_mob_set_r13_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_mob_set_r13, 1, 32)); + } + if (wlan_suspend_cfg_r14_present) { + HANDLE_CODE(wlan_suspend_cfg_r14.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_wlan_mob_cfg_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(wlan_mob_set_r13_present, 1)); + HANDLE_CODE(bref.unpack(success_report_requested_present, 1)); + HANDLE_CODE(bref.unpack(wlan_suspend_cfg_r14_present, 1)); + + if (wlan_mob_set_r13_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_mob_set_r13, bref, 1, 32)); + } + if (wlan_suspend_cfg_r14_present) { + HANDLE_CODE(wlan_suspend_cfg_r14.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void var_wlan_mob_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wlan_mob_set_r13_present) { + j.start_array("wlan-MobilitySet-r13"); + for (uint32_t i1 = 0; i1 < wlan_mob_set_r13.size(); ++i1) { + wlan_mob_set_r13[i1].to_json(j); + } + j.end_array(); + } + if (success_report_requested_present) { + j.write_str("successReportRequested", "true"); + } + if (wlan_suspend_cfg_r14_present) { + j.write_fieldname("wlan-SuspendConfig-r14"); + wlan_suspend_cfg_r14.to_json(j); + } + j.end_obj(); +} + +// VarWLAN-Status-r13 ::= SEQUENCE +var_wlan_status_r13_s::var_wlan_status_r13_s() +{ + status_r14_present = false; +} +SRSASN_CODE var_wlan_status_r13_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(status_r14_present, 1)); + + HANDLE_CODE(pack_enum(bref, status_r13)); + if (status_r14_present) { + HANDLE_CODE(pack_enum(bref, status_r14)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE var_wlan_status_r13_s::unpack(bit_ref& bref) +{ + HANDLE_CODE(bref.unpack(status_r14_present, 1)); + + HANDLE_CODE(unpack_enum(status_r13, bref)); + if (status_r14_present) { + HANDLE_CODE(unpack_enum(status_r14, bref)); + } + + return SRSASN_SUCCESS; +} +void var_wlan_status_r13_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("status-r13", status_r13.to_string()); + if (status_r14_present) { + j.write_str("status-r14", status_r14.to_string()); + } + j.end_obj(); +} diff --git a/lib/src/asn1/rrc_asn1_enum.cc b/lib/src/asn1/rrc_asn1_enum.cc new file mode 100644 index 000000000..df0886ede --- /dev/null +++ b/lib/src/asn1/rrc_asn1_enum.cc @@ -0,0 +1,23518 @@ +/* +Copyright 2013-2017 Software Radio Systems Limited + +This file is part of srsLTE + +srsASN1 is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +srsASN1 is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +A copy of the GNU Affero General Public License can be found in +the LICENSE file in the top-level directory of this distribution +and at http://www.gnu.org/licenses/. +*/ + +#include "srslte/asn1/rrc_asn1.h" +#include + +using namespace asn1; +using namespace asn1::rrc; + +static void invalid_enum_value(int value, const char* name) +{ + rrc_log_print(LOG_LEVEL_ERROR, "The provided enum value=%d of type %s is not recognized\n", value, name); +} + +static void invalid_enum_number(int value, const char* name) +{ + rrc_log_print(LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be translated into a number\n", value, + name); +} + +/******************************************************************************* +/* Struct Methods +/******************************************************************************/ + +std::string phich_cfg_s::phich_dur_e_::to_string() const +{ + switch (value) { + case normal: + return "normal"; + case extended: + return "extended"; + default: + invalid_enum_value(value, "phich_cfg_s::phich_dur_e_"); + } + return ""; +} + +std::string phich_cfg_s::phich_res_e_::to_string() const +{ + switch (value) { + case one_sixth: + return "oneSixth"; + case half: + return "half"; + case one: + return "one"; + case two: + return "two"; + default: + invalid_enum_value(value, "phich_cfg_s::phich_res_e_"); + } + return ""; +} +float phich_cfg_s::phich_res_e_::to_number() const +{ + const static float options[] = {0.16666666666666666, 0.5, 1.0, 2.0}; + return get_enum_number(options, 4, value, "phich_cfg_s::phich_res_e_"); +} +std::string phich_cfg_s::phich_res_e_::to_number_string() const +{ + switch (value) { + case one_sixth: + return "1/6"; + case half: + return "0.5"; + case one: + return "1"; + case two: + return "2"; + default: + invalid_enum_number(value, "phich_cfg_s::phich_res_e_"); + } + return ""; +} + +std::string mib_s::dl_bw_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "mib_s::dl_bw_e_"); + } + return ""; +} +uint8_t mib_s::dl_bw_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "mib_s::dl_bw_e_"); +} + +std::string mib_mbms_r14_s::dl_bw_mbms_r14_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "mib_mbms_r14_s::dl_bw_mbms_r14_e_"); + } + return ""; +} +uint8_t mib_mbms_r14_s::dl_bw_mbms_r14_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "mib_mbms_r14_s::dl_bw_mbms_r14_e_"); +} + +std::string gnss_id_r15_s::gnss_id_r15_e_::to_string() const +{ + switch (value) { + case gps: + return "gps"; + case sbas: + return "sbas"; + case qzss: + return "qzss"; + case galileo: + return "galileo"; + case glonass: + return "glonass"; + case bds: + return "bds"; + default: + invalid_enum_value(value, "gnss_id_r15_s::gnss_id_r15_e_"); + } + return ""; +} + +std::string sbas_id_r15_s::sbas_id_r15_e_::to_string() const +{ + switch (value) { + case waas: + return "waas"; + case egnos: + return "egnos"; + case msas: + return "msas"; + case gagan: + return "gagan"; + default: + invalid_enum_value(value, "sbas_id_r15_s::sbas_id_r15_e_"); + } + return ""; +} + +std::string pos_sib_type_r15_s::pos_sib_type_r15_e_::to_string() const +{ + switch (value) { + case pos_sib_type1_minus1: + return "posSibType1-1"; + case pos_sib_type1_minus2: + return "posSibType1-2"; + case pos_sib_type1_minus3: + return "posSibType1-3"; + case pos_sib_type1_minus4: + return "posSibType1-4"; + case pos_sib_type1_minus5: + return "posSibType1-5"; + case pos_sib_type1_minus6: + return "posSibType1-6"; + case pos_sib_type1_minus7: + return "posSibType1-7"; + case pos_sib_type2_minus1: + return "posSibType2-1"; + case pos_sib_type2_minus2: + return "posSibType2-2"; + case pos_sib_type2_minus3: + return "posSibType2-3"; + case pos_sib_type2_minus4: + return "posSibType2-4"; + case pos_sib_type2_minus5: + return "posSibType2-5"; + case pos_sib_type2_minus6: + return "posSibType2-6"; + case pos_sib_type2_minus7: + return "posSibType2-7"; + case pos_sib_type2_minus8: + return "posSibType2-8"; + case pos_sib_type2_minus9: + return "posSibType2-9"; + case pos_sib_type2_minus10: + return "posSibType2-10"; + case pos_sib_type2_minus11: + return "posSibType2-11"; + case pos_sib_type2_minus12: + return "posSibType2-12"; + case pos_sib_type2_minus13: + return "posSibType2-13"; + case pos_sib_type2_minus14: + return "posSibType2-14"; + case pos_sib_type2_minus15: + return "posSibType2-15"; + case pos_sib_type2_minus16: + return "posSibType2-16"; + case pos_sib_type2_minus17: + return "posSibType2-17"; + case pos_sib_type2_minus18: + return "posSibType2-18"; + case pos_sib_type2_minus19: + return "posSibType2-19"; + case pos_sib_type3_minus1: + return "posSibType3-1"; + default: + invalid_enum_value(value, "pos_sib_type_r15_s::pos_sib_type_r15_e_"); + } + return ""; +} + +std::string plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::types::to_string() const +{ + switch (value) { + case plmn_id_r15: + return "plmn-Identity-r15"; + case plmn_idx_r15: + return "plmn-Index-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::types"); + } + return ""; +} + +std::string plmn_id_info_r15_s::cell_reserved_for_oper_r15_e_::to_string() const +{ + switch (value) { + case reserved: + return "reserved"; + case not_reserved: + return "notReserved"; + default: + invalid_enum_value(value, "plmn_id_info_r15_s::cell_reserved_for_oper_r15_e_"); + } + return ""; +} + +std::string plmn_id_info_r15_s::cell_reserved_for_oper_crs_r15_e_::to_string() const +{ + switch (value) { + case reserved: + return "reserved"; + case not_reserved: + return "notReserved"; + default: + invalid_enum_value(value, "plmn_id_info_r15_s::cell_reserved_for_oper_crs_r15_e_"); + } + return ""; +} + +std::string cell_id_minus5_gc_r15_c::types::to_string() const +{ + switch (value) { + case cell_id_r15: + return "cellIdentity-r15"; + case cell_id_idx_r15: + return "cellId-Index-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cell_id_minus5_gc_r15_c::types"); + } + return ""; +} + +std::string plmn_id_info_v1530_s::cell_reserved_for_oper_crs_r15_e_::to_string() const +{ + switch (value) { + case reserved: + return "reserved"; + case not_reserved: + return "notReserved"; + default: + invalid_enum_value(value, "plmn_id_info_v1530_s::cell_reserved_for_oper_crs_r15_e_"); + } + return ""; +} + +std::string pos_sched_info_r15_s::pos_si_periodicity_r15_e_::to_string() const +{ + switch (value) { + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + default: + invalid_enum_value(value, "pos_sched_info_r15_s::pos_si_periodicity_r15_e_"); + } + return ""; +} +uint16_t pos_sched_info_r15_s::pos_si_periodicity_r15_e_::to_number() const +{ + const static uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 7, value, "pos_sched_info_r15_s::pos_si_periodicity_r15_e_"); +} + +std::string cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus3: + return "dB-3"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + default: + invalid_enum_value(value, "cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_"); + } + return ""; +} +int8_t cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_::to_number() const +{ + const static int8_t options[] = {-6, -3, 3, 6, 9, 12}; + return get_enum_number(options, 6, value, "cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_"); +} + +std::string plmn_id_info_s::cell_reserved_for_oper_e_::to_string() const +{ + switch (value) { + case reserved: + return "reserved"; + case not_reserved: + return "notReserved"; + default: + invalid_enum_value(value, "plmn_id_info_s::cell_reserved_for_oper_e_"); + } + return ""; +} + +std::string sl_tx_pwr_r14_c::types::to_string() const +{ + switch (value) { + case minusinfinity_r14: + return "minusinfinity-r14"; + case tx_pwr_r14: + return "txPower-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_tx_pwr_r14_c::types"); + } + return ""; +} +int8_t sl_tx_pwr_r14_c::types::to_number() const +{ + const static int8_t options[] = {-1}; + return get_enum_number(options, 1, value, "sl_tx_pwr_r14_c::types"); +} + +// Alpha-r12 ::= ENUMERATED +std::string alpha_r12_e::to_string() const +{ + switch (value) { + case al0: + return "al0"; + case al04: + return "al04"; + case al05: + return "al05"; + case al06: + return "al06"; + case al07: + return "al07"; + case al08: + return "al08"; + case al09: + return "al09"; + case al1: + return "al1"; + default: + invalid_enum_value(value, "alpha_r12_e"); + } + return ""; +} +float alpha_r12_e::to_number() const +{ + const static float options[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; + return get_enum_number(options, 8, value, "alpha_r12_e"); +} +std::string alpha_r12_e::to_number_string() const +{ + switch (value) { + case al0: + return "0"; + case al04: + return "0.4"; + case al05: + return "0.5"; + case al06: + return "0.6"; + case al07: + return "0.7"; + case al08: + return "0.8"; + case al09: + return "0.9"; + case al1: + return "1"; + default: + invalid_enum_number(value, "alpha_r12_e"); + } + return ""; +} + +std::string sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + case both: + return "both"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_"); + } + return ""; +} +uint8_t sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_::to_number() const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number(options, 2, value, "sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_"); +} + +// SL-RestrictResourceReservationPeriod-r14 ::= ENUMERATED +std::string sl_restrict_res_reserv_period_r14_e::to_string() const +{ + switch (value) { + case v0dot2: + return "v0dot2"; + case v0dot5: + return "v0dot5"; + case v1: + return "v1"; + case v2: + return "v2"; + case v3: + return "v3"; + case v4: + return "v4"; + case v5: + return "v5"; + case v6: + return "v6"; + case v7: + return "v7"; + case v8: + return "v8"; + case v9: + return "v9"; + case v10: + return "v10"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_restrict_res_reserv_period_r14_e"); + } + return ""; +} +float sl_restrict_res_reserv_period_r14_e::to_number() const +{ + const static float options[] = {0.2, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + return get_enum_number(options, 12, value, "sl_restrict_res_reserv_period_r14_e"); +} +std::string sl_restrict_res_reserv_period_r14_e::to_number_string() const +{ + switch (value) { + case v0dot2: + return "0.2"; + case v0dot5: + return "0.5"; + case v1: + return "1"; + case v2: + return "2"; + case v3: + return "3"; + case v4: + return "4"; + case v5: + return "5"; + case v6: + return "6"; + case v7: + return "7"; + case v8: + return "8"; + case v9: + return "9"; + case v10: + return "10"; + default: + invalid_enum_number(value, "sl_restrict_res_reserv_period_r14_e"); + } + return ""; +} + +// SL-TypeTxSync-r14 ::= ENUMERATED +std::string sl_type_tx_sync_r14_e::to_string() const +{ + switch (value) { + case gnss: + return "gnss"; + case enb: + return "enb"; + case ue: + return "ue"; + default: + invalid_enum_value(value, "sl_type_tx_sync_r14_e"); + } + return ""; +} + +std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n24: + return "n24"; + default: + invalid_enum_value(value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_"); + } + return ""; +} +uint8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_::to_number() const +{ + const static uint8_t options[] = {6, 24}; + return get_enum_number(options, 2, value, + "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_"); +} + +std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types::to_string() const +{ + switch (value) { + case crs_intf_mitig_enabled_minus15: + return "crs-IntfMitigEnabled-15"; + case crs_intf_mitig_num_prbs_r15: + return "crs-IntfMitigNumPRBs-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types"); + } + return ""; +} +int8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types::to_number() const +{ + const static int8_t options[] = {-15}; + return get_enum_number(options, 1, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types"); +} + +std::string sib_type1_v1530_ies_s::cell_barred_crs_r15_e_::to_string() const +{ + switch (value) { + case barred: + return "barred"; + case not_barred: + return "notBarred"; + default: + invalid_enum_value(value, "sib_type1_v1530_ies_s::cell_barred_crs_r15_e_"); + } + return ""; +} + +std::string +sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_minus5_gc_r15_e_::to_string() const +{ + switch (value) { + case barred: + return "barred"; + case not_barred: + return "notBarred"; + default: + invalid_enum_value( + value, "sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_minus5_gc_r15_e_"); + } + return ""; +} + +std::string +sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_minus5_gc_crs_r15_e_::to_string() const +{ + switch (value) { + case barred: + return "barred"; + case not_barred: + return "notBarred"; + default: + invalid_enum_value( + value, "sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_minus5_gc_crs_r15_e_"); + } + return ""; +} + +// SL-CP-Len-r12 ::= ENUMERATED +std::string sl_cp_len_r12_e::to_string() const +{ + switch (value) { + case normal: + return "normal"; + case extended: + return "extended"; + default: + invalid_enum_value(value, "sl_cp_len_r12_e"); + } + return ""; +} + +std::string sl_offset_ind_r12_c::types::to_string() const +{ + switch (value) { + case small_r12: + return "small-r12"; + case large_r12: + return "large-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_offset_ind_r12_c::types"); + } + return ""; +} + +std::string sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_::to_string() const +{ + switch (value) { + case kmph60: + return "kmph60"; + case kmph80: + return "kmph80"; + case kmph100: + return "kmph100"; + case kmph120: + return "kmph120"; + case kmph140: + return "kmph140"; + case kmph160: + return "kmph160"; + case kmph180: + return "kmph180"; + case kmph200: + return "kmph200"; + default: + invalid_enum_value(value, "sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_"); + } + return ""; +} +uint8_t sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_::to_number() const +{ + const static uint8_t options[] = {60, 80, 100, 120, 140, 160, 180, 200}; + return get_enum_number(options, 8, value, "sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_"); +} + +std::string sf_bitmap_sl_r12_c::types::to_string() const +{ + switch (value) { + case bs4_r12: + return "bs4-r12"; + case bs8_r12: + return "bs8-r12"; + case bs12_r12: + return "bs12-r12"; + case bs16_r12: + return "bs16-r12"; + case bs30_r12: + return "bs30-r12"; + case bs40_r12: + return "bs40-r12"; + case bs42_r12: + return "bs42-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sf_bitmap_sl_r12_c::types"); + } + return ""; +} +uint8_t sf_bitmap_sl_r12_c::types::to_number() const +{ + const static uint8_t options[] = {4, 8, 12, 16, 30, 40, 42}; + return get_enum_number(options, 7, value, "sf_bitmap_sl_r12_c::types"); +} + +std::string sf_bitmap_sl_r14_c::types::to_string() const +{ + switch (value) { + case bs10_r14: + return "bs10-r14"; + case bs16_r14: + return "bs16-r14"; + case bs20_r14: + return "bs20-r14"; + case bs30_r14: + return "bs30-r14"; + case bs40_r14: + return "bs40-r14"; + case bs50_r14: + return "bs50-r14"; + case bs60_r14: + return "bs60-r14"; + case bs100_r14: + return "bs100-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sf_bitmap_sl_r14_c::types"); + } + return ""; +} +uint8_t sf_bitmap_sl_r14_c::types::to_number() const +{ + const static uint8_t options[] = {10, 16, 20, 30, 40, 50, 60, 100}; + return get_enum_number(options, 8, value, "sf_bitmap_sl_r14_c::types"); +} + +std::string tdd_cfg_s::sf_assign_e_::to_string() const +{ + switch (value) { + case sa0: + return "sa0"; + case sa1: + return "sa1"; + case sa2: + return "sa2"; + case sa3: + return "sa3"; + case sa4: + return "sa4"; + case sa5: + return "sa5"; + case sa6: + return "sa6"; + default: + invalid_enum_value(value, "tdd_cfg_s::sf_assign_e_"); + } + return ""; +} +uint8_t tdd_cfg_s::sf_assign_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 7, value, "tdd_cfg_s::sf_assign_e_"); +} + +std::string tdd_cfg_s::special_sf_patterns_e_::to_string() const +{ + switch (value) { + case ssp0: + return "ssp0"; + case ssp1: + return "ssp1"; + case ssp2: + return "ssp2"; + case ssp3: + return "ssp3"; + case ssp4: + return "ssp4"; + case ssp5: + return "ssp5"; + case ssp6: + return "ssp6"; + case ssp7: + return "ssp7"; + case ssp8: + return "ssp8"; + default: + invalid_enum_value(value, "tdd_cfg_s::special_sf_patterns_e_"); + } + return ""; +} +uint8_t tdd_cfg_s::special_sf_patterns_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; + return get_enum_number(options, 9, value, "tdd_cfg_s::special_sf_patterns_e_"); +} + +// BandclassCDMA2000 ::= ENUMERATED +std::string bandclass_cdma2000_e::to_string() const +{ + switch (value) { + case bc0: + return "bc0"; + case bc1: + return "bc1"; + case bc2: + return "bc2"; + case bc3: + return "bc3"; + case bc4: + return "bc4"; + case bc5: + return "bc5"; + case bc6: + return "bc6"; + case bc7: + return "bc7"; + case bc8: + return "bc8"; + case bc9: + return "bc9"; + case bc10: + return "bc10"; + case bc11: + return "bc11"; + case bc12: + return "bc12"; + case bc13: + return "bc13"; + case bc14: + return "bc14"; + case bc15: + return "bc15"; + case bc16: + return "bc16"; + case bc17: + return "bc17"; + case bc18_v9a0: + return "bc18-v9a0"; + case bc19_v9a0: + return "bc19-v9a0"; + case bc20_v9a0: + return "bc20-v9a0"; + case bc21_v9a0: + return "bc21-v9a0"; + case spare10: + return "spare10"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "bandclass_cdma2000_e"); + } + return ""; +} +uint8_t bandclass_cdma2000_e::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}; + return get_enum_number(options, 22, value, "bandclass_cdma2000_e"); +} + +std::string sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n8: + return "n8"; + case n9: + return "n9"; + case n10: + return "n10"; + case n12: + return "n12"; + case n15: + return "n15"; + case n16: + return "n16"; + case n18: + return "n18"; + case n20: + return "n20"; + case n25: + return "n25"; + case n30: + return "n30"; + case n48: + return "n48"; + case n50: + return "n50"; + case n72: + return "n72"; + case n75: + return "n75"; + case n96: + return "n96"; + case n100: + return "n100"; + case spare13: + return "spare13"; + case spare12: + return "spare12"; + case spare11: + return "spare11"; + case spare10: + return "spare10"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_"); + } + return ""; +} +uint8_t sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_::to_number() const +{ + const static uint8_t options[] = {4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 25, 30, 48, 50, 72, 75, 96, 100}; + return get_enum_number(options, 19, value, "sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_"); +} + +std::string sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n5: + return "n5"; + case n8: + return "n8"; + case n10: + return "n10"; + case n15: + return "n15"; + case n20: + return "n20"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_"); + } + return ""; +} +uint8_t sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 5, 8, 10, 15, 20}; + return get_enum_number(options, 7, value, "sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_"); +} + +std::string sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_::to_string() const +{ + switch (value) { + case w1: + return "w1"; + case w2: + return "w2"; + default: + invalid_enum_value(value, "sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_"); + } + return ""; +} +uint8_t sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_"); +} + +std::string tdd_cfg_v1130_s::special_sf_patterns_v1130_e_::to_string() const +{ + switch (value) { + case ssp7: + return "ssp7"; + case ssp9: + return "ssp9"; + default: + invalid_enum_value(value, "tdd_cfg_v1130_s::special_sf_patterns_v1130_e_"); + } + return ""; +} +uint8_t tdd_cfg_v1130_s::special_sf_patterns_v1130_e_::to_number() const +{ + const static uint8_t options[] = {7, 9}; + return get_enum_number(options, 2, value, "tdd_cfg_v1130_s::special_sf_patterns_v1130_e_"); +} + +std::string sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_::to_string() const +{ + switch (value) { + case v0: + return "v0"; + case v0dot2: + return "v0dot2"; + case v0dot4: + return "v0dot4"; + case v0dot6: + return "v0dot6"; + case v0dot8: + return "v0dot8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); + } + return ""; +} +float sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.2, 0.4, 0.6, 0.8}; + return get_enum_number(options, 5, value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); +} +std::string sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_::to_number_string() const +{ + switch (value) { + case v0: + return "0"; + case v0dot2: + return "0.2"; + case v0dot4: + return "0.4"; + case v0dot6: + return "0.6"; + case v0dot8: + return "0.8"; + default: + invalid_enum_number(value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); + } + return ""; +} + +std::string sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + case n8: + return "n8"; + case n9: + return "n9"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_"); + } + return ""; +} +uint8_t sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + return get_enum_number(options, 9, value, "sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_"); +} + +std::string setup_e::to_string() const +{ + switch (value) { + case release: + return "release"; + case setup: + return "setup"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "setup_e"); + } + return ""; +} + +std::string sl_disc_res_pool_r12_s::disc_period_r12_e_::to_string() const +{ + switch (value) { + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + case rf16_v1310: + return "rf16-v1310"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "sl_disc_res_pool_r12_s::disc_period_r12_e_"); + } + return ""; +} +uint16_t sl_disc_res_pool_r12_s::disc_period_r12_e_::to_number() const +{ + const static uint16_t options[] = {32, 64, 128, 256, 512, 1024, 16}; + return get_enum_number(options, 7, value, "sl_disc_res_pool_r12_s::disc_period_r12_e_"); +} + +std::string sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::types::to_string() const +{ + switch (value) { + case rsrp_based_r12: + return "rsrpBased-r12"; + case random_r12: + return "random-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, + "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::types"); + } + return ""; +} + +std::string sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_e_::to_string() const +{ + switch (value) { + case p25: + return "p25"; + case p50: + return "p50"; + case p75: + return "p75"; + case p100: + return "p100"; + default: + invalid_enum_value(value, + "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_e_"); + } + return ""; +} +uint8_t sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_e_::to_number() const +{ + const static uint8_t options[] = {25, 50, 75, 100}; + return get_enum_number(options, 4, value, + "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_e_"); +} + +std::string sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_::to_string() const +{ + switch (value) { + case rf4: + return "rf4"; + case rf6: + return "rf6"; + case rf7: + return "rf7"; + case rf8: + return "rf8"; + case rf12: + return "rf12"; + case rf14: + return "rf14"; + case rf24: + return "rf24"; + case rf28: + return "rf28"; + default: + invalid_enum_value(value, "sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_"); + } + return ""; +} +uint8_t sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_::to_number() const +{ + const static uint8_t options[] = {4, 6, 7, 8, 12, 14, 24, 28}; + return get_enum_number(options, 8, value, "sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_"); +} + +std::string sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, + "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_e_"); + } + return ""; +} +uint8_t sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, + "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_e_"); +} + +std::string sl_zone_cfg_r14_s::zone_len_r14_e_::to_string() const +{ + switch (value) { + case m5: + return "m5"; + case m10: + return "m10"; + case m20: + return "m20"; + case m50: + return "m50"; + case m100: + return "m100"; + case m200: + return "m200"; + case m500: + return "m500"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_zone_cfg_r14_s::zone_len_r14_e_"); + } + return ""; +} +uint16_t sl_zone_cfg_r14_s::zone_len_r14_e_::to_number() const +{ + const static uint16_t options[] = {5, 10, 20, 50, 100, 200, 500}; + return get_enum_number(options, 7, value, "sl_zone_cfg_r14_s::zone_len_r14_e_"); +} + +std::string sl_zone_cfg_r14_s::zone_width_r14_e_::to_string() const +{ + switch (value) { + case m5: + return "m5"; + case m10: + return "m10"; + case m20: + return "m20"; + case m50: + return "m50"; + case m100: + return "m100"; + case m200: + return "m200"; + case m500: + return "m500"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_zone_cfg_r14_s::zone_width_r14_e_"); + } + return ""; +} +uint16_t sl_zone_cfg_r14_s::zone_width_r14_e_::to_number() const +{ + const static uint16_t options[] = {5, 10, 20, 50, 100, 200, 500}; + return get_enum_number(options, 7, value, "sl_zone_cfg_r14_s::zone_width_r14_e_"); +} + +std::string pci_range_s::range_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n12: + return "n12"; + case n16: + return "n16"; + case n24: + return "n24"; + case n32: + return "n32"; + case n48: + return "n48"; + case n64: + return "n64"; + case n84: + return "n84"; + case n96: + return "n96"; + case n128: + return "n128"; + case n168: + return "n168"; + case n252: + return "n252"; + case n504: + return "n504"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pci_range_s::range_e_"); + } + return ""; +} +uint16_t pci_range_s::range_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; + return get_enum_number(options, 14, value, "pci_range_s::range_e_"); +} + +// Q-OffsetRange ::= ENUMERATED +std::string q_offset_range_e::to_string() const +{ + switch (value) { + case db_minus24: + return "dB-24"; + case db_minus22: + return "dB-22"; + case db_minus20: + return "dB-20"; + case db_minus18: + return "dB-18"; + case db_minus16: + return "dB-16"; + case db_minus14: + return "dB-14"; + case db_minus12: + return "dB-12"; + case db_minus10: + return "dB-10"; + case db_minus8: + return "dB-8"; + case db_minus6: + return "dB-6"; + case db_minus5: + return "dB-5"; + case db_minus4: + return "dB-4"; + case db_minus3: + return "dB-3"; + case db_minus2: + return "dB-2"; + case db_minus1: + return "dB-1"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + case db4: + return "dB4"; + case db5: + return "dB5"; + case db6: + return "dB6"; + case db8: + return "dB8"; + case db10: + return "dB10"; + case db12: + return "dB12"; + case db14: + return "dB14"; + case db16: + return "dB16"; + case db18: + return "dB18"; + case db20: + return "dB20"; + case db22: + return "dB22"; + case db24: + return "dB24"; + default: + invalid_enum_value(value, "q_offset_range_e"); + } + return ""; +} +int8_t q_offset_range_e::to_number() const +{ + const static int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return get_enum_number(options, 31, value, "q_offset_range_e"); +} + +std::string sched_info_br_r13_s::si_tbs_r13_e_::to_string() const +{ + switch (value) { + case b152: + return "b152"; + case b208: + return "b208"; + case b256: + return "b256"; + case b328: + return "b328"; + case b408: + return "b408"; + case b504: + return "b504"; + case b600: + return "b600"; + case b712: + return "b712"; + case b808: + return "b808"; + case b936: + return "b936"; + default: + invalid_enum_value(value, "sched_info_br_r13_s::si_tbs_r13_e_"); + } + return ""; +} +uint16_t sched_info_br_r13_s::si_tbs_r13_e_::to_number() const +{ + const static uint16_t options[] = {152, 208, 256, 328, 408, 504, 600, 712, 808, 936}; + return get_enum_number(options, 10, value, "sched_info_br_r13_s::si_tbs_r13_e_"); +} + +std::string speed_state_scale_factors_s::sf_medium_e_::to_string() const +{ + switch (value) { + case o_dot25: + return "oDot25"; + case o_dot5: + return "oDot5"; + case o_dot75: + return "oDot75"; + case l_dot0: + return "lDot0"; + default: + invalid_enum_value(value, "speed_state_scale_factors_s::sf_medium_e_"); + } + return ""; +} +float speed_state_scale_factors_s::sf_medium_e_::to_number() const +{ + const static float options[] = {0.25, 0.5, 0.75, 1.0}; + return get_enum_number(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); +} +std::string speed_state_scale_factors_s::sf_medium_e_::to_number_string() const +{ + switch (value) { + case o_dot25: + return "0.25"; + case o_dot5: + return "0.5"; + case o_dot75: + return "0.75"; + case l_dot0: + return "1.0"; + default: + invalid_enum_number(value, "speed_state_scale_factors_s::sf_medium_e_"); + } + return ""; +} + +std::string speed_state_scale_factors_s::sf_high_e_::to_string() const +{ + switch (value) { + case o_dot25: + return "oDot25"; + case o_dot5: + return "oDot5"; + case o_dot75: + return "oDot75"; + case l_dot0: + return "lDot0"; + default: + invalid_enum_value(value, "speed_state_scale_factors_s::sf_high_e_"); + } + return ""; +} +float speed_state_scale_factors_s::sf_high_e_::to_number() const +{ + const static float options[] = {0.25, 0.5, 0.75, 1.0}; + return get_enum_number(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); +} +std::string speed_state_scale_factors_s::sf_high_e_::to_number_string() const +{ + switch (value) { + case o_dot25: + return "0.25"; + case o_dot5: + return "0.5"; + case o_dot75: + return "0.75"; + case l_dot0: + return "1.0"; + default: + invalid_enum_number(value, "speed_state_scale_factors_s::sf_high_e_"); + } + return ""; +} + +// AllowedMeasBandwidth ::= ENUMERATED +std::string allowed_meas_bw_e::to_string() const +{ + switch (value) { + case mbw6: + return "mbw6"; + case mbw15: + return "mbw15"; + case mbw25: + return "mbw25"; + case mbw50: + return "mbw50"; + case mbw75: + return "mbw75"; + case mbw100: + return "mbw100"; + default: + invalid_enum_value(value, "allowed_meas_bw_e"); + } + return ""; +} +uint8_t allowed_meas_bw_e::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "allowed_meas_bw_e"); +} + +// BandIndicatorGERAN ::= ENUMERATED +std::string band_ind_geran_e::to_string() const +{ + switch (value) { + case dcs1800: + return "dcs1800"; + case pcs1900: + return "pcs1900"; + default: + invalid_enum_value(value, "band_ind_geran_e"); + } + return ""; +} +uint16_t band_ind_geran_e::to_number() const +{ + const static uint16_t options[] = {1800, 1900}; + return get_enum_number(options, 2, value, "band_ind_geran_e"); +} + +std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_::to_string() const +{ + switch (value) { + case p00: + return "p00"; + case p05: + return "p05"; + case p10: + return "p10"; + case p15: + return "p15"; + case p20: + return "p20"; + case p25: + return "p25"; + case p30: + return "p30"; + case p40: + return "p40"; + case p50: + return "p50"; + case p60: + return "p60"; + case p70: + return "p70"; + case p75: + return "p75"; + case p80: + return "p80"; + case p85: + return "p85"; + case p90: + return "p90"; + case p95: + return "p95"; + default: + invalid_enum_value(value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_"); + } + return ""; +} +float barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return get_enum_number(options, 16, value, + "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_"); +} +std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_::to_number_string() const +{ + switch (value) { + case p00: + return "0.0"; + case p05: + return "0.5"; + case p10: + return "1.0"; + case p15: + return "1.5"; + case p20: + return "2.0"; + case p25: + return "2.5"; + case p30: + return "3.0"; + case p40: + return "4.0"; + case p50: + return "5.0"; + case p60: + return "6.0"; + case p70: + return "7.0"; + case p75: + return "7.5"; + case p80: + return "8.0"; + case p85: + return "8.5"; + case p90: + return "9.0"; + case p95: + return "9.5"; + default: + invalid_enum_number(value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_"); + } + return ""; +} + +std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_::to_string() const +{ + switch (value) { + case s4: + return "s4"; + case s8: + return "s8"; + case s16: + return "s16"; + case s32: + return "s32"; + case s64: + return "s64"; + case s128: + return "s128"; + case s256: + return "s256"; + case s512: + return "s512"; + default: + invalid_enum_value(value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_"); + } + return ""; +} +uint16_t barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 8, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_"); +} + +std::string cell_sel_info_nfreq_r13_s::q_hyst_r13_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + case db4: + return "dB4"; + case db5: + return "dB5"; + case db6: + return "dB6"; + case db8: + return "dB8"; + case db10: + return "dB10"; + case db12: + return "dB12"; + case db14: + return "dB14"; + case db16: + return "dB16"; + case db18: + return "dB18"; + case db20: + return "dB20"; + case db22: + return "dB22"; + case db24: + return "dB24"; + default: + invalid_enum_value(value, "cell_sel_info_nfreq_r13_s::q_hyst_r13_e_"); + } + return ""; +} +uint8_t cell_sel_info_nfreq_r13_s::q_hyst_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return get_enum_number(options, 16, value, "cell_sel_info_nfreq_r13_s::q_hyst_r13_e_"); +} + +std::string plmn_id_info2_r12_c::types::to_string() const +{ + switch (value) { + case plmn_idx_r12: + return "plmn-Index-r12"; + case plmn_id_r12: + return "plmnIdentity-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "plmn_id_info2_r12_c::types"); + } + return ""; +} + +std::string prach_params_ce_r13_s::prach_start_sf_r13_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf4: + return "sf4"; + case sf8: + return "sf8"; + case sf16: + return "sf16"; + case sf32: + return "sf32"; + case sf64: + return "sf64"; + case sf128: + return "sf128"; + case sf256: + return "sf256"; + default: + invalid_enum_value(value, "prach_params_ce_r13_s::prach_start_sf_r13_e_"); + } + return ""; +} +uint16_t prach_params_ce_r13_s::prach_start_sf_r13_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 8, value, "prach_params_ce_r13_s::prach_start_sf_r13_e_"); +} + +std::string prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_::to_string() const +{ + switch (value) { + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + case n8: + return "n8"; + case n10: + return "n10"; + default: + invalid_enum_value(value, "prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_"); + } + return ""; +} +uint8_t prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_::to_number() const +{ + const static uint8_t options[] = {3, 4, 5, 6, 7, 8, 10}; + return get_enum_number(options, 7, value, "prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_"); +} + +std::string prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + case n64: + return "n64"; + case n128: + return "n128"; + default: + invalid_enum_value(value, "prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_"); + } + return ""; +} +uint8_t prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8, 16, 32, 64, 128}; + return get_enum_number(options, 8, value, "prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_"); +} + +std::string prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case r128: + return "r128"; + case r256: + return "r256"; + default: + invalid_enum_value(value, "prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_"); + } + return ""; +} +uint16_t prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 9, value, "prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_"); +} + +std::string prach_params_ce_r13_s::prach_hop_cfg_r13_e_::to_string() const +{ + switch (value) { + case on: + return "on"; + case off: + return "off"; + default: + invalid_enum_value(value, "prach_params_ce_r13_s::prach_hop_cfg_r13_e_"); + } + return ""; +} + +std::string rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_::to_string() const +{ + switch (value) { + case sf20: + return "sf20"; + case sf50: + return "sf50"; + case sf80: + return "sf80"; + case sf120: + return "sf120"; + case sf180: + return "sf180"; + case sf240: + return "sf240"; + case sf320: + return "sf320"; + case sf400: + return "sf400"; + default: + invalid_enum_value(value, "rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_"); + } + return ""; +} +uint16_t rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_::to_number() const +{ + const static uint16_t options[] = {20, 50, 80, 120, 180, 240, 320, 400}; + return get_enum_number(options, 8, value, "rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_"); +} + +std::string rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_::to_string() const +{ + switch (value) { + case sf80: + return "sf80"; + case sf100: + return "sf100"; + case sf120: + return "sf120"; + case sf160: + return "sf160"; + case sf200: + return "sf200"; + case sf240: + return "sf240"; + case sf480: + return "sf480"; + case sf960: + return "sf960"; + default: + invalid_enum_value(value, "rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_"); + } + return ""; +} +uint16_t rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_::to_number() const +{ + const static uint16_t options[] = {80, 100, 120, 160, 200, 240, 480, 960}; + return get_enum_number(options, 8, value, "rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_"); +} + +std::string rach_ce_level_info_r13_s::rar_hop_cfg_r13_e_::to_string() const +{ + switch (value) { + case on: + return "on"; + case off: + return "off"; + default: + invalid_enum_value(value, "rach_ce_level_info_r13_s::rar_hop_cfg_r13_e_"); + } + return ""; +} + +std::string rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_::to_string() const +{ + switch (value) { + case b328: + return "b328"; + case b408: + return "b408"; + case b504: + return "b504"; + case b600: + return "b600"; + case b712: + return "b712"; + case b808: + return "b808"; + case b936: + return "b936"; + case b1000or456: + return "b1000or456"; + default: + invalid_enum_value(value, "rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_"); + } + return ""; +} +uint16_t rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_::to_number() const +{ + const static uint16_t options[] = {328, 408, 504, 600, 712, 808, 936, 1000}; + return get_enum_number(options, 8, value, "rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_"); +} + +std::string rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_e_::to_string() const +{ + switch (value) { + case sf240: + return "sf240"; + case sf480: + return "sf480"; + case sf960: + return "sf960"; + case sf1920: + return "sf1920"; + case sf3840: + return "sf3840"; + case sf5760: + return "sf5760"; + case sf7680: + return "sf7680"; + case sf10240: + return "sf10240"; + default: + invalid_enum_value(value, "rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_e_"); + } + return ""; +} +uint16_t rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_e_::to_number() const +{ + const static uint16_t options[] = {240, 480, 960, 1920, 3840, 5760, 7680, 10240}; + return get_enum_number(options, 8, value, + "rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_e_"); +} + +std::string sl_disc_tx_res_inter_freq_r13_c::types::to_string() const +{ + switch (value) { + case acquire_si_from_carrier_r13: + return "acquireSI-FromCarrier-r13"; + case disc_tx_pool_common_r13: + return "discTxPoolCommon-r13"; + case request_ded_r13: + return "requestDedicated-r13"; + case no_tx_on_carrier_r13: + return "noTxOnCarrier-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_disc_tx_res_inter_freq_r13_c::types"); + } + return ""; +} + +std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_e_::to_string() const +{ + switch (value) { + case nb2: + return "nb2"; + case nb4: + return "nb4"; + default: + invalid_enum_value(value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_e_"); + } + return ""; +} +uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_e_"); +} + +std::string +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_::to_string() + const +{ + switch (value) { + case int1: + return "int1"; + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + default: + invalid_enum_value(value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_" + "c_::interv_fdd_r13_e_"); + } + return ""; +} +uint8_t +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_::to_number() + const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number( + options, 4, value, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_"); +} + +std::string +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_::to_string() + const +{ + switch (value) { + case int1: + return "int1"; + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + default: + invalid_enum_value(value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_" + "c_::interv_tdd_r13_e_"); + } + return ""; +} +uint8_t +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_::to_number() + const +{ + const static uint8_t options[] = {1, 5, 10, 20}; + return get_enum_number( + options, 4, value, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_"); +} + +std::string +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_r13: + return "interval-FDD-r13"; + case interv_tdd_r13: + return "interval-TDD-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value( + value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::types"); + } + return ""; +} + +std::string +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_::to_string() + const +{ + switch (value) { + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + case int16: + return "int16"; + default: + invalid_enum_value(value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_" + "c_::interv_fdd_r13_e_"); + } + return ""; +} +uint8_t +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_::to_number() + const +{ + const static uint8_t options[] = {2, 4, 8, 16}; + return get_enum_number( + options, 4, value, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_"); +} + +std::string +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_::to_string() + const +{ + switch (value) { + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + case int40: + return "int40"; + default: + invalid_enum_value(value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_" + "c_::interv_tdd_r13_e_"); + } + return ""; +} +uint8_t +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_::to_number() + const +{ + const static uint8_t options[] = {5, 10, 20, 40}; + return get_enum_number( + options, 4, value, + "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_"); +} + +std::string +sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_r13: + return "interval-FDD-r13"; + case interv_tdd_r13: + return "interval-TDD-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value( + value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::types"); + } + return ""; +} + +std::string sys_time_info_cdma2000_s::cdma_sys_time_c_::types::to_string() const +{ + switch (value) { + case sync_sys_time: + return "synchronousSystemTime"; + case async_sys_time: + return "asynchronousSystemTime"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sys_time_info_cdma2000_s::cdma_sys_time_c_::types"); + } + return ""; +} + +std::string ac_barr_cfg_s::ac_barr_factor_e_::to_string() const +{ + switch (value) { + case p00: + return "p00"; + case p05: + return "p05"; + case p10: + return "p10"; + case p15: + return "p15"; + case p20: + return "p20"; + case p25: + return "p25"; + case p30: + return "p30"; + case p40: + return "p40"; + case p50: + return "p50"; + case p60: + return "p60"; + case p70: + return "p70"; + case p75: + return "p75"; + case p80: + return "p80"; + case p85: + return "p85"; + case p90: + return "p90"; + case p95: + return "p95"; + default: + invalid_enum_value(value, "ac_barr_cfg_s::ac_barr_factor_e_"); + } + return ""; +} +float ac_barr_cfg_s::ac_barr_factor_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return get_enum_number(options, 16, value, "ac_barr_cfg_s::ac_barr_factor_e_"); +} +std::string ac_barr_cfg_s::ac_barr_factor_e_::to_number_string() const +{ + switch (value) { + case p00: + return "0.0"; + case p05: + return "0.5"; + case p10: + return "1.0"; + case p15: + return "1.5"; + case p20: + return "2.0"; + case p25: + return "2.5"; + case p30: + return "3.0"; + case p40: + return "4.0"; + case p50: + return "5.0"; + case p60: + return "6.0"; + case p70: + return "7.0"; + case p75: + return "7.5"; + case p80: + return "8.0"; + case p85: + return "8.5"; + case p90: + return "9.0"; + case p95: + return "9.5"; + default: + invalid_enum_number(value, "ac_barr_cfg_s::ac_barr_factor_e_"); + } + return ""; +} + +std::string ac_barr_cfg_s::ac_barr_time_e_::to_string() const +{ + switch (value) { + case s4: + return "s4"; + case s8: + return "s8"; + case s16: + return "s16"; + case s32: + return "s32"; + case s64: + return "s64"; + case s128: + return "s128"; + case s256: + return "s256"; + case s512: + return "s512"; + default: + invalid_enum_value(value, "ac_barr_cfg_s::ac_barr_time_e_"); + } + return ""; +} +uint16_t ac_barr_cfg_s::ac_barr_time_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 8, value, "ac_barr_cfg_s::ac_barr_time_e_"); +} + +std::string carrier_freqs_geran_s::following_arfcns_c_::types::to_string() const +{ + switch (value) { + case explicit_list_of_arfcns: + return "explicitListOfARFCNs"; + case equally_spaced_arfcns: + return "equallySpacedARFCNs"; + case variable_bit_map_of_arfcns: + return "variableBitMapOfARFCNs"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "carrier_freqs_geran_s::following_arfcns_c_::types"); + } + return ""; +} + +// CellReselectionSubPriority-r13 ::= ENUMERATED +std::string cell_resel_sub_prio_r13_e::to_string() const +{ + switch (value) { + case o_dot2: + return "oDot2"; + case o_dot4: + return "oDot4"; + case o_dot6: + return "oDot6"; + case o_dot8: + return "oDot8"; + default: + invalid_enum_value(value, "cell_resel_sub_prio_r13_e"); + } + return ""; +} +float cell_resel_sub_prio_r13_e::to_number() const +{ + const static float options[] = {0.2, 0.4, 0.6, 0.8}; + return get_enum_number(options, 4, value, "cell_resel_sub_prio_r13_e"); +} +std::string cell_resel_sub_prio_r13_e::to_number_string() const +{ + switch (value) { + case o_dot2: + return "0.2"; + case o_dot4: + return "0.4"; + case o_dot6: + return "0.6"; + case o_dot8: + return "0.8"; + default: + invalid_enum_number(value, "cell_resel_sub_prio_r13_e"); + } + return ""; +} + +std::string delta_flist_pucch_s::delta_f_pucch_format1_e_::to_string() const +{ + switch (value) { + case delta_f_minus2: + return "deltaF-2"; + case delta_f0: + return "deltaF0"; + case delta_f2: + return "deltaF2"; + default: + invalid_enum_value(value, "delta_flist_pucch_s::delta_f_pucch_format1_e_"); + } + return ""; +} +int8_t delta_flist_pucch_s::delta_f_pucch_format1_e_::to_number() const +{ + const static int8_t options[] = {-2, 0, 2}; + return get_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1_e_"); +} + +std::string delta_flist_pucch_s::delta_f_pucch_format1b_e_::to_string() const +{ + switch (value) { + case delta_f1: + return "deltaF1"; + case delta_f3: + return "deltaF3"; + case delta_f5: + return "deltaF5"; + default: + invalid_enum_value(value, "delta_flist_pucch_s::delta_f_pucch_format1b_e_"); + } + return ""; +} +uint8_t delta_flist_pucch_s::delta_f_pucch_format1b_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 5}; + return get_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1b_e_"); +} + +std::string delta_flist_pucch_s::delta_f_pucch_format2_e_::to_string() const +{ + switch (value) { + case delta_f_minus2: + return "deltaF-2"; + case delta_f0: + return "deltaF0"; + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + default: + invalid_enum_value(value, "delta_flist_pucch_s::delta_f_pucch_format2_e_"); + } + return ""; +} +int8_t delta_flist_pucch_s::delta_f_pucch_format2_e_::to_number() const +{ + const static int8_t options[] = {-2, 0, 1, 2}; + return get_enum_number(options, 4, value, "delta_flist_pucch_s::delta_f_pucch_format2_e_"); +} + +std::string delta_flist_pucch_s::delta_f_pucch_format2a_e_::to_string() const +{ + switch (value) { + case delta_f_minus2: + return "deltaF-2"; + case delta_f0: + return "deltaF0"; + case delta_f2: + return "deltaF2"; + default: + invalid_enum_value(value, "delta_flist_pucch_s::delta_f_pucch_format2a_e_"); + } + return ""; +} +int8_t delta_flist_pucch_s::delta_f_pucch_format2a_e_::to_number() const +{ + const static int8_t options[] = {-2, 0, 2}; + return get_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2a_e_"); +} + +std::string delta_flist_pucch_s::delta_f_pucch_format2b_e_::to_string() const +{ + switch (value) { + case delta_f_minus2: + return "deltaF-2"; + case delta_f0: + return "deltaF0"; + case delta_f2: + return "deltaF2"; + default: + invalid_enum_value(value, "delta_flist_pucch_s::delta_f_pucch_format2b_e_"); + } + return ""; +} +int8_t delta_flist_pucch_s::delta_f_pucch_format2b_e_::to_number() const +{ + const static int8_t options[] = {-2, 0, 2}; + return get_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2b_e_"); +} + +std::string edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf4: + return "sf4"; + case sf8: + return "sf8"; + case sf16: + return "sf16"; + case sf32: + return "sf32"; + case sf64: + return "sf64"; + case sf128: + return "sf128"; + case sf256: + return "sf256"; + default: + invalid_enum_value(value, "edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_e_"); + } + return ""; +} +uint16_t edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 8, value, + "edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_e_"); +} + +// FilterCoefficient ::= ENUMERATED +std::string filt_coef_e::to_string() const +{ + switch (value) { + case fc0: + return "fc0"; + case fc1: + return "fc1"; + case fc2: + return "fc2"; + case fc3: + return "fc3"; + case fc4: + return "fc4"; + case fc5: + return "fc5"; + case fc6: + return "fc6"; + case fc7: + return "fc7"; + case fc8: + return "fc8"; + case fc9: + return "fc9"; + case fc11: + return "fc11"; + case fc13: + return "fc13"; + case fc15: + return "fc15"; + case fc17: + return "fc17"; + case fc19: + return "fc19"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "filt_coef_e"); + } + return ""; +} +uint8_t filt_coef_e::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19}; + return get_enum_number(options, 15, value, "filt_coef_e"); +} + +std::string mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types::to_string() const +{ + switch (value) { + case sf5_r15: + return "sf5-r15"; + case sf10_r15: + return "sf10-r15"; + case sf20_r15: + return "sf20-r15"; + case sf40_r15: + return "sf40-r15"; + case sf80_r15: + return "sf80-r15"; + case sf160_r15: + return "sf160-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types"); + } + return ""; +} +uint8_t mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types::to_number() const +{ + const static uint8_t options[] = {5, 10, 20, 40, 80, 160}; + return get_enum_number(options, 6, value, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types"); +} + +std::string mtc_ssb_nr_r15_s::ssb_dur_r15_e_::to_string() const +{ + switch (value) { + case sf1: + return "sf1"; + case sf2: + return "sf2"; + case sf3: + return "sf3"; + case sf4: + return "sf4"; + case sf5: + return "sf5"; + default: + invalid_enum_value(value, "mtc_ssb_nr_r15_s::ssb_dur_r15_e_"); + } + return ""; +} +uint8_t mtc_ssb_nr_r15_s::ssb_dur_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5}; + return get_enum_number(options, 5, value, "mtc_ssb_nr_r15_s::ssb_dur_r15_e_"); +} + +std::string meas_idle_carrier_eutra_r15_s::report_quantities_e_::to_string() const +{ + switch (value) { + case rsrp: + return "rsrp"; + case rsrq: + return "rsrq"; + case both: + return "both"; + default: + invalid_enum_value(value, "meas_idle_carrier_eutra_r15_s::report_quantities_e_"); + } + return ""; +} + +std::string params_cdma2000_r11_s::sys_time_info_r11_c_::types::to_string() const +{ + switch (value) { + case explicit_value: + return "explicitValue"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "params_cdma2000_r11_s::sys_time_info_r11_c_::types"); + } + return ""; +} + +std::string pwr_ramp_params_s::pwr_ramp_step_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db2: + return "dB2"; + case db4: + return "dB4"; + case db6: + return "dB6"; + default: + invalid_enum_value(value, "pwr_ramp_params_s::pwr_ramp_step_e_"); + } + return ""; +} +uint8_t pwr_ramp_params_s::pwr_ramp_step_e_::to_number() const +{ + const static uint8_t options[] = {0, 2, 4, 6}; + return get_enum_number(options, 4, value, "pwr_ramp_params_s::pwr_ramp_step_e_"); +} + +std::string pwr_ramp_params_s::preamb_init_rx_target_pwr_e_::to_string() const +{ + switch (value) { + case dbm_minus120: + return "dBm-120"; + case dbm_minus118: + return "dBm-118"; + case dbm_minus116: + return "dBm-116"; + case dbm_minus114: + return "dBm-114"; + case dbm_minus112: + return "dBm-112"; + case dbm_minus110: + return "dBm-110"; + case dbm_minus108: + return "dBm-108"; + case dbm_minus106: + return "dBm-106"; + case dbm_minus104: + return "dBm-104"; + case dbm_minus102: + return "dBm-102"; + case dbm_minus100: + return "dBm-100"; + case dbm_minus98: + return "dBm-98"; + case dbm_minus96: + return "dBm-96"; + case dbm_minus94: + return "dBm-94"; + case dbm_minus92: + return "dBm-92"; + case dbm_minus90: + return "dBm-90"; + default: + invalid_enum_value(value, "pwr_ramp_params_s::preamb_init_rx_target_pwr_e_"); + } + return ""; +} +int8_t pwr_ramp_params_s::preamb_init_rx_target_pwr_e_::to_number() const +{ + const static int8_t options[] = {-120, -118, -116, -114, -112, -110, -108, -106, + -104, -102, -100, -98, -96, -94, -92, -90}; + return get_enum_number(options, 16, value, "pwr_ramp_params_s::preamb_init_rx_target_pwr_e_"); +} + +// PreambleTransMax ::= ENUMERATED +std::string preamb_trans_max_e::to_string() const +{ + switch (value) { + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + case n8: + return "n8"; + case n10: + return "n10"; + case n20: + return "n20"; + case n50: + return "n50"; + case n100: + return "n100"; + case n200: + return "n200"; + default: + invalid_enum_value(value, "preamb_trans_max_e"); + } + return ""; +} +uint8_t preamb_trans_max_e::to_number() const +{ + const static uint8_t options[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; + return get_enum_number(options, 11, value, "preamb_trans_max_e"); +} + +std::string sl_hop_cfg_comm_r12_s::num_subbands_r12_e_::to_string() const +{ + switch (value) { + case ns1: + return "ns1"; + case ns2: + return "ns2"; + case ns4: + return "ns4"; + default: + invalid_enum_value(value, "sl_hop_cfg_comm_r12_s::num_subbands_r12_e_"); + } + return ""; +} +uint8_t sl_hop_cfg_comm_r12_s::num_subbands_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "sl_hop_cfg_comm_r12_s::num_subbands_r12_e_"); +} + +std::string sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_"); + } + return ""; +} +uint8_t sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_"); +} + +std::string sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types::to_string() const +{ + switch (value) { + case add_spec_emission_r14: + return "additionalSpectrumEmission-r14"; + case add_spec_emission_v1440: + return "additionalSpectrumEmission-v1440"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types"); + } + return ""; +} + +// SL-PeriodComm-r12 ::= ENUMERATED +std::string sl_period_comm_r12_e::to_string() const +{ + switch (value) { + case sf40: + return "sf40"; + case sf60: + return "sf60"; + case sf70: + return "sf70"; + case sf80: + return "sf80"; + case sf120: + return "sf120"; + case sf140: + return "sf140"; + case sf160: + return "sf160"; + case sf240: + return "sf240"; + case sf280: + return "sf280"; + case sf320: + return "sf320"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "sl_period_comm_r12_e"); + } + return ""; +} +uint16_t sl_period_comm_r12_e::to_number() const +{ + const static uint16_t options[] = {40, 60, 70, 80, 120, 140, 160, 240, 280, 320}; + return get_enum_number(options, 10, value, "sl_period_comm_r12_e"); +} + +std::string sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_::to_string() const +{ + switch (value) { + case w1: + return "w1"; + case w2: + return "w2"; + default: + invalid_enum_value(value, "sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_"); + } + return ""; +} +uint8_t sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_"); +} + +std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_e_::to_string() const +{ + switch (value) { + case ms20: + return "ms20"; + case ms40: + return "ms40"; + case ms60: + return "ms60"; + case ms80: + return "ms80"; + case ms120: + return "ms120"; + case ms160: + return "ms160"; + case ms200: + return "ms200"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_e_"); + } + return ""; +} +uint8_t sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_e_::to_number() const +{ + const static uint8_t options[] = {20, 40, 60, 80, 120, 160, 200}; + return get_enum_number(options, 7, value, + "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_e_"); +} + +std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_repeat_pattern_r13_e_::to_string() const +{ + switch (value) { + case every_rf: + return "everyRF"; + case every2nd_rf: + return "every2ndRF"; + case every4th_rf: + return "every4thRF"; + case every8th_rf: + return "every8thRF"; + default: + invalid_enum_value(value, + "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_repeat_pattern_r13_e_"); + } + return ""; +} +uint8_t sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_repeat_pattern_r13_e_::to_number() const +{ + switch (value) { + case every2nd_rf: + return 2; + case every4th_rf: + return 4; + case every8th_rf: + return 8; + default: + invalid_enum_number(value, + "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_repeat_pattern_r13_e_"); + } + return 0; +} + +std::string +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types::to_string() + const +{ + switch (value) { + case sf_pattern10_r13: + return "subframePattern10-r13"; + case sf_pattern40_r13: + return "subframePattern40-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value( + value, + "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types"); + } + return ""; +} +uint8_t +sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types::to_number() + const +{ + const static uint8_t options[] = {10, 40}; + return get_enum_number( + options, 2, value, + "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types"); +} + +std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_hop_cfg_common_r13_e_::to_string() const +{ + switch (value) { + case on: + return "on"; + case off: + return "off"; + default: + invalid_enum_value(value, + "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_hop_cfg_common_r13_e_"); + } + return ""; +} + +std::string udt_restricting_r13_s::udt_restricting_time_r13_e_::to_string() const +{ + switch (value) { + case s4: + return "s4"; + case s8: + return "s8"; + case s16: + return "s16"; + case s32: + return "s32"; + case s64: + return "s64"; + case s128: + return "s128"; + case s256: + return "s256"; + case s512: + return "s512"; + default: + invalid_enum_value(value, "udt_restricting_r13_s::udt_restricting_time_r13_e_"); + } + return ""; +} +uint16_t udt_restricting_r13_s::udt_restricting_time_r13_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 8, value, "udt_restricting_r13_s::udt_restricting_time_r13_e_"); +} + +// WLAN-backhaulRate-r12 ::= ENUMERATED +std::string wlan_backhaul_rate_r12_e::to_string() const +{ + switch (value) { + case r0: + return "r0"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case r128: + return "r128"; + case r256: + return "r256"; + case r512: + return "r512"; + case r1024: + return "r1024"; + case r2048: + return "r2048"; + case r4096: + return "r4096"; + case r8192: + return "r8192"; + case r16384: + return "r16384"; + case r32768: + return "r32768"; + case r65536: + return "r65536"; + case r131072: + return "r131072"; + case r262144: + return "r262144"; + case r524288: + return "r524288"; + case r1048576: + return "r1048576"; + case r2097152: + return "r2097152"; + case r4194304: + return "r4194304"; + case r8388608: + return "r8388608"; + case r16777216: + return "r16777216"; + case r33554432: + return "r33554432"; + case r67108864: + return "r67108864"; + case r134217728: + return "r134217728"; + case r268435456: + return "r268435456"; + case r536870912: + return "r536870912"; + case r1073741824: + return "r1073741824"; + case r2147483648: + return "r2147483648"; + case r4294967296: + return "r4294967296"; + default: + invalid_enum_value(value, "wlan_backhaul_rate_r12_e"); + } + return ""; +} +uint64_t wlan_backhaul_rate_r12_e::to_number() const +{ + const static uint64_t options[] = {0, 4, 8, 16, 32, 64, 128, + 256, 512, 1024, 2048, 4096, 8192, 16384, + 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, + 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, + 536870912, 1073741824, 2147483648, 4294967296}; + return get_enum_number(options, 32, value, "wlan_backhaul_rate_r12_e"); +} + +std::string bcch_cfg_s::mod_period_coeff_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + default: + invalid_enum_value(value, "bcch_cfg_s::mod_period_coeff_e_"); + } + return ""; +} +uint8_t bcch_cfg_s::mod_period_coeff_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8, 16}; + return get_enum_number(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); +} + +std::string carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_::to_string() const +{ + switch (value) { + case k_hz15: + return "kHz15"; + case k_hz30: + return "kHz30"; + case k_hz120: + return "kHz120"; + case k_hz240: + return "kHz240"; + default: + invalid_enum_value(value, "carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); + } + return ""; +} +uint8_t carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_::to_number() const +{ + const static uint8_t options[] = {15, 30, 120, 240}; + return get_enum_number(options, 4, value, "carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); +} + +std::string eab_cfg_r11_s::eab_category_r11_e_::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + default: + invalid_enum_value(value, "eab_cfg_r11_s::eab_category_r11_e_"); + } + return ""; +} + +std::string freq_hop_params_r13_s::dummy_e_::to_string() const +{ + switch (value) { + case nb2: + return "nb2"; + case nb4: + return "nb4"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::dummy_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "freq_hop_params_r13_s::dummy_e_"); +} + +std::string freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_::to_string() const +{ + switch (value) { + case int1: + return "int1"; + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_::to_string() const +{ + switch (value) { + case int1: + return "int1"; + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 5, 10, 20}; + return get_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::dummy2_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_r13: + return "interval-FDD-r13"; + case interv_tdd_r13: + return "interval-TDD-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy2_c_::types"); + } + return ""; +} + +std::string freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_::to_string() const +{ + switch (value) { + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + case int16: + return "int16"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8, 16}; + return get_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_::to_string() const +{ + switch (value) { + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + case int40: + return "int40"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {5, 10, 20, 40}; + return get_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::dummy3_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_r13: + return "interval-FDD-r13"; + case interv_tdd_r13: + return "interval-TDD-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::dummy3_c_::types"); + } + return ""; +} + +std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_::to_string() const +{ + switch (value) { + case int1: + return "int1"; + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number(options, 4, value, + "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_::to_string() const +{ + switch (value) { + case int1: + return "int1"; + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 5, 10, 20}; + return get_enum_number(options, 4, value, + "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_r13: + return "interval-FDD-r13"; + case interv_tdd_r13: + return "interval-TDD-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::types"); + } + return ""; +} + +std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_::to_string() const +{ + switch (value) { + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + case int16: + return "int16"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8, 16}; + return get_enum_number(options, 4, value, + "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_::to_string() const +{ + switch (value) { + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + case int40: + return "int40"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_"); + } + return ""; +} +uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {5, 10, 20, 40}; + return get_enum_number(options, 4, value, + "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_"); +} + +std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_r13: + return "interval-FDD-r13"; + case interv_tdd_r13: + return "interval-TDD-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::types"); + } + return ""; +} + +std::string mbms_carrier_type_r14_s::carrier_type_r14_e_::to_string() const +{ + switch (value) { + case mbms: + return "mbms"; + case fembms_mixed: + return "fembmsMixed"; + case fembms_ded: + return "fembmsDedicated"; + default: + invalid_enum_value(value, "mbms_carrier_type_r14_s::carrier_type_r14_e_"); + } + return ""; +} + +std::string mbsfn_area_info_r9_s::non_mbsfn_region_len_e_::to_string() const +{ + switch (value) { + case s1: + return "s1"; + case s2: + return "s2"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::non_mbsfn_region_len_e_"); + } + return ""; +} +uint8_t mbsfn_area_info_r9_s::non_mbsfn_region_len_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "mbsfn_area_info_r9_s::non_mbsfn_region_len_e_"); +} + +std::string mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_::to_string() const +{ + switch (value) { + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_"); + } + return ""; +} +uint16_t mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_::to_number() const +{ + const static uint16_t options[] = {32, 64, 128, 256}; + return get_enum_number(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_"); +} + +std::string mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_::to_string() const +{ + switch (value) { + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_"); + } + return ""; +} +uint16_t mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_::to_number() const +{ + const static uint16_t options[] = {512, 1024}; + return get_enum_number(options, 2, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_"); +} + +std::string mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n7: + return "n7"; + case n13: + return "n13"; + case n19: + return "n19"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_"); + } + return ""; +} +uint8_t mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_::to_number() const +{ + const static uint8_t options[] = {2, 7, 13, 19}; + return get_enum_number(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_"); +} + +std::string mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_::to_string() const +{ + switch (value) { + case rf1: + return "rf1"; + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_"); + } + return ""; +} +uint8_t mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8, 16}; + return get_enum_number(options, 5, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_"); +} + +std::string mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_::to_string() const +{ + switch (value) { + case rf1: + return "rf1"; + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case spare7: + return "spare7"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_"); + } + return ""; +} +uint16_t mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 9, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_"); +} + +std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_::to_string() const +{ + switch (value) { + case khz_minus7dot5: + return "khz-7dot5"; + case khz_minus1dot25: + return "khz-1dot25"; + default: + invalid_enum_value(value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); + } + return ""; +} +float mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_::to_number() const +{ + const static float options[] = {-7.5, -1.25}; + return get_enum_number(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); +} +std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_::to_number_string() const +{ + switch (value) { + case khz_minus7dot5: + return "-7.5"; + case khz_minus1dot25: + return "-1.25"; + default: + invalid_enum_number(value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); + } + return ""; +} + +std::string mbsfn_sf_cfg_s::radioframe_alloc_period_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + default: + invalid_enum_value(value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); + } + return ""; +} +uint8_t mbsfn_sf_cfg_s::radioframe_alloc_period_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return get_enum_number(options, 6, value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); +} + +std::string mbsfn_sf_cfg_s::sf_alloc_c_::types::to_string() const +{ + switch (value) { + case one_frame: + return "oneFrame"; + case four_frames: + return "fourFrames"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mbsfn_sf_cfg_s::sf_alloc_c_::types"); + } + return ""; +} +uint8_t mbsfn_sf_cfg_s::sf_alloc_c_::types::to_number() const +{ + const static uint8_t options[] = {1, 4}; + return get_enum_number(options, 2, value, "mbsfn_sf_cfg_s::sf_alloc_c_::types"); +} + +std::string mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types::to_string() const +{ + switch (value) { + case one_frame_v1430: + return "oneFrame-v1430"; + case four_frames_v1430: + return "fourFrames-v1430"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types"); + } + return ""; +} +uint8_t mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types::to_number() const +{ + const static uint8_t options[] = {1, 4}; + return get_enum_number(options, 2, value, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types"); +} + +std::string pcch_cfg_s::default_paging_cycle_e_::to_string() const +{ + switch (value) { + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + default: + invalid_enum_value(value, "pcch_cfg_s::default_paging_cycle_e_"); + } + return ""; +} +uint16_t pcch_cfg_s::default_paging_cycle_e_::to_number() const +{ + const static uint16_t options[] = {32, 64, 128, 256}; + return get_enum_number(options, 4, value, "pcch_cfg_s::default_paging_cycle_e_"); +} + +std::string pcch_cfg_s::nb_e_::to_string() const +{ + switch (value) { + case four_t: + return "fourT"; + case two_t: + return "twoT"; + case one_t: + return "oneT"; + case half_t: + return "halfT"; + case quarter_t: + return "quarterT"; + case one_eighth_t: + return "oneEighthT"; + case one_sixteenth_t: + return "oneSixteenthT"; + case one_thirty_second_t: + return "oneThirtySecondT"; + default: + invalid_enum_value(value, "pcch_cfg_s::nb_e_"); + } + return ""; +} +float pcch_cfg_s::nb_e_::to_number() const +{ + const static float options[] = {4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625, 0.03125}; + return get_enum_number(options, 8, value, "pcch_cfg_s::nb_e_"); +} +std::string pcch_cfg_s::nb_e_::to_number_string() const +{ + switch (value) { + case four_t: + return "4"; + case two_t: + return "2"; + case one_t: + return "1"; + case half_t: + return "0.5"; + case quarter_t: + return "0.25"; + case one_eighth_t: + return "1/8"; + case one_sixteenth_t: + return "1/16"; + case one_thirty_second_t: + return "1/32"; + default: + invalid_enum_number(value, "pcch_cfg_s::nb_e_"); + } + return ""; +} + +std::string pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case r128: + return "r128"; + case r256: + return "r256"; + default: + invalid_enum_value(value, "pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_"); + } + return ""; +} +uint16_t pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 9, value, "pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_"); +} + +std::string pcch_cfg_v1310_s::nb_v1310_e_::to_string() const +{ + switch (value) { + case one64th_t: + return "one64thT"; + case one128th_t: + return "one128thT"; + case one256th_t: + return "one256thT"; + default: + invalid_enum_value(value, "pcch_cfg_v1310_s::nb_v1310_e_"); + } + return ""; +} +uint16_t pcch_cfg_v1310_s::nb_v1310_e_::to_number() const +{ + const static uint16_t options[] = {64, 128, 256}; + return get_enum_number(options, 3, value, "pcch_cfg_v1310_s::nb_v1310_e_"); +} + +std::string pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_::to_string() const +{ + switch (value) { + case r16: + return "r16"; + case r32: + return "r32"; + default: + invalid_enum_value(value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_"); + } + return ""; +} +uint8_t pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_::to_number() const +{ + const static uint8_t options[] = {16, 32}; + return get_enum_number(options, 2, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_"); +} + +std::string pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_::to_string() const +{ + switch (value) { + case r192: + return "r192"; + case r256: + return "r256"; + case r384: + return "r384"; + case r512: + return "r512"; + case r768: + return "r768"; + case r1024: + return "r1024"; + case r1536: + return "r1536"; + case r2048: + return "r2048"; + default: + invalid_enum_value(value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_"); + } + return ""; +} +uint16_t pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_::to_number() const +{ + const static uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; + return get_enum_number(options, 8, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_"); +} + +std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v1dot5: + return "v1dot5"; + case v2: + return "v2"; + case v2dot5: + return "v2dot5"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + default: + invalid_enum_value(value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); + } + return ""; +} +float prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_::to_number() const +{ + const static float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return get_enum_number(options, 8, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); +} +std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_::to_number_string() const +{ + switch (value) { + case v1: + return "1"; + case v1dot5: + return "1.5"; + case v2: + return "2"; + case v2dot5: + return "2.5"; + case v4: + return "4"; + case v5: + return "5"; + case v8: + return "8"; + case v10: + return "10"; + default: + invalid_enum_number(value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); + } + return ""; +} + +std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v2: + return "v2"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + case v20: + return "v20"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); + } + return ""; +} +uint8_t prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return get_enum_number(options, 7, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); +} + +std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types::to_string() const +{ + switch (value) { + case fdd_r13: + return "fdd-r13"; + case tdd_r13: + return "tdd-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types"); + } + return ""; +} + +std::string pucch_cfg_common_s::delta_pucch_shift_e_::to_string() const +{ + switch (value) { + case ds1: + return "ds1"; + case ds2: + return "ds2"; + case ds3: + return "ds3"; + default: + invalid_enum_value(value, "pucch_cfg_common_s::delta_pucch_shift_e_"); + } + return ""; +} +uint8_t pucch_cfg_common_s::delta_pucch_shift_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3}; + return get_enum_number(options, 3, value, "pucch_cfg_common_s::delta_pucch_shift_e_"); +} + +std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_"); + } + return ""; +} +uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_"); +} + +std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_"); + } + return ""; +} +uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_"); +} + +std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + default: + invalid_enum_value(value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_"); + } + return ""; +} +uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 16, 32}; + return get_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_"); +} + +std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + default: + invalid_enum_value(value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_"); + } + return ""; +} +uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 16, 32}; + return get_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_"); +} + +std::string pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_::to_string() const +{ + switch (value) { + case n64: + return "n64"; + case n128: + return "n128"; + default: + invalid_enum_value(value, "pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_"); + } + return ""; +} +uint8_t pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_::to_number() const +{ + const static uint8_t options[] = {64, 128}; + return get_enum_number(options, 2, value, "pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_"); +} + +std::string pusch_cfg_common_s::pusch_cfg_basic_s_::hop_mode_e_::to_string() const +{ + switch (value) { + case inter_sub_frame: + return "interSubFrame"; + case intra_and_inter_sub_frame: + return "intraAndInterSubFrame"; + default: + invalid_enum_value(value, "pusch_cfg_common_s::pusch_cfg_basic_s_::hop_mode_e_"); + } + return ""; +} + +std::string pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_::to_string() const +{ + switch (value) { + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + default: + invalid_enum_value(value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_"); + } + return ""; +} +uint8_t pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_::to_number() const +{ + const static uint8_t options[] = {8, 16, 32}; + return get_enum_number(options, 3, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_"); +} + +std::string pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_::to_string() const +{ + switch (value) { + case r192: + return "r192"; + case r256: + return "r256"; + case r384: + return "r384"; + case r512: + return "r512"; + case r768: + return "r768"; + case r1024: + return "r1024"; + case r1536: + return "r1536"; + case r2048: + return "r2048"; + default: + invalid_enum_value(value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_"); + } + return ""; +} +uint16_t pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_::to_number() const +{ + const static uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; + return get_enum_number(options, 8, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_"); +} + +std::string rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n12: + return "n12"; + case n16: + return "n16"; + case n20: + return "n20"; + case n24: + return "n24"; + case n28: + return "n28"; + case n32: + return "n32"; + case n36: + return "n36"; + case n40: + return "n40"; + case n44: + return "n44"; + case n48: + return "n48"; + case n52: + return "n52"; + case n56: + return "n56"; + case n60: + return "n60"; + case n64: + return "n64"; + default: + invalid_enum_value(value, "rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_"); + } + return ""; +} +uint8_t rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return get_enum_number(options, 16, value, "rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_"); +} + +std::string rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n12: + return "n12"; + case n16: + return "n16"; + case n20: + return "n20"; + case n24: + return "n24"; + case n28: + return "n28"; + case n32: + return "n32"; + case n36: + return "n36"; + case n40: + return "n40"; + case n44: + return "n44"; + case n48: + return "n48"; + case n52: + return "n52"; + case n56: + return "n56"; + case n60: + return "n60"; + default: + invalid_enum_value(value, + "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_e_"); + } + return ""; +} +uint8_t rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}; + return get_enum_number(options, 15, value, + "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_e_"); +} + +std::string rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_e_::to_string() const +{ + switch (value) { + case b56: + return "b56"; + case b144: + return "b144"; + case b208: + return "b208"; + case b256: + return "b256"; + default: + invalid_enum_value(value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_e_"); + } + return ""; +} +uint16_t rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_e_::to_number() const +{ + const static uint16_t options[] = {56, 144, 208, 256}; + return get_enum_number(options, 4, value, + "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_e_"); +} + +std::string rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_e_::to_string() const +{ + switch (value) { + case minusinfinity: + return "minusinfinity"; + case db0: + return "dB0"; + case db5: + return "dB5"; + case db8: + return "dB8"; + case db10: + return "dB10"; + case db12: + return "dB12"; + case db15: + return "dB15"; + case db18: + return "dB18"; + default: + invalid_enum_value(value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_e_"); + } + return ""; +} +int8_t rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_e_::to_number() const +{ + const static int8_t options[] = {-1, 0, 5, 8, 10, 12, 15, 18}; + return get_enum_number(options, 8, value, + "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_e_"); +} + +std::string rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf3: + return "sf3"; + case sf4: + return "sf4"; + case sf5: + return "sf5"; + case sf6: + return "sf6"; + case sf7: + return "sf7"; + case sf8: + return "sf8"; + case sf10: + return "sf10"; + default: + invalid_enum_value(value, "rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_"); + } + return ""; +} +uint8_t rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 10}; + return get_enum_number(options, 8, value, "rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_"); +} + +std::string rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_e_::to_string() const +{ + switch (value) { + case sf8: + return "sf8"; + case sf16: + return "sf16"; + case sf24: + return "sf24"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf48: + return "sf48"; + case sf56: + return "sf56"; + case sf64: + return "sf64"; + default: + invalid_enum_value(value, "rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_e_"); + } + return ""; +} +uint8_t rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_e_::to_number() const +{ + const static uint8_t options[] = {8, 16, 24, 32, 40, 48, 56, 64}; + return get_enum_number(options, 8, value, + "rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_e_"); +} + +std::string rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_e_"); + } + return ""; +} +uint8_t rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4}; + return get_enum_number(options, 4, value, + "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_e_"); +} + +std::string rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_e_::to_string() const +{ + switch (value) { + case s30: + return "s30"; + case s60: + return "s60"; + case s120: + return "s120"; + case s240: + return "s240"; + case s300: + return "s300"; + case s420: + return "s420"; + case s600: + return "s600"; + case s900: + return "s900"; + default: + invalid_enum_value(value, "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_e_"); + } + return ""; +} +uint16_t rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_e_::to_number() const +{ + const static uint16_t options[] = {30, 60, 120, 240, 300, 420, 600, 900}; + return get_enum_number(options, 8, value, + "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_e_"); +} + +std::string rss_cfg_r15_s::dur_r15_e_::to_string() const +{ + switch (value) { + case sf8: + return "sf8"; + case sf16: + return "sf16"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + default: + invalid_enum_value(value, "rss_cfg_r15_s::dur_r15_e_"); + } + return ""; +} +uint8_t rss_cfg_r15_s::dur_r15_e_::to_number() const +{ + const static uint8_t options[] = {8, 16, 32, 40}; + return get_enum_number(options, 4, value, "rss_cfg_r15_s::dur_r15_e_"); +} + +std::string rss_cfg_r15_s::periodicity_r15_e_::to_string() const +{ + switch (value) { + case ms160: + return "ms160"; + case ms320: + return "ms320"; + case ms640: + return "ms640"; + case ms1280: + return "ms1280"; + default: + invalid_enum_value(value, "rss_cfg_r15_s::periodicity_r15_e_"); + } + return ""; +} +uint16_t rss_cfg_r15_s::periodicity_r15_e_::to_number() const +{ + const static uint16_t options[] = {160, 320, 640, 1280}; + return get_enum_number(options, 4, value, "rss_cfg_r15_s::periodicity_r15_e_"); +} + +std::string rss_cfg_r15_s::pwr_boost_r15_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db4dot8: + return "dB4dot8"; + case db6: + return "dB6"; + default: + invalid_enum_value(value, "rss_cfg_r15_s::pwr_boost_r15_e_"); + } + return ""; +} +float rss_cfg_r15_s::pwr_boost_r15_e_::to_number() const +{ + const static float options[] = {0.0, 3.0, 4.8, 6.0}; + return get_enum_number(options, 4, value, "rss_cfg_r15_s::pwr_boost_r15_e_"); +} +std::string rss_cfg_r15_s::pwr_boost_r15_e_::to_number_string() const +{ + switch (value) { + case db0: + return "0"; + case db3: + return "3"; + case db4dot8: + return "4.8"; + case db6: + return "6"; + default: + invalid_enum_number(value, "rss_cfg_r15_s::pwr_boost_r15_e_"); + } + return ""; +} + +std::string resel_info_relay_r13_s::min_hyst_r13_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + case dbinf: + return "dBinf"; + default: + invalid_enum_value(value, "resel_info_relay_r13_s::min_hyst_r13_e_"); + } + return ""; +} +uint8_t resel_info_relay_r13_s::min_hyst_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "resel_info_relay_r13_s::min_hyst_r13_e_"); +} + +// SIB-Type ::= ENUMERATED +std::string sib_type_e::to_string() const +{ + switch (value) { + case sib_type3: + return "sibType3"; + case sib_type4: + return "sibType4"; + case sib_type5: + return "sibType5"; + case sib_type6: + return "sibType6"; + case sib_type7: + return "sibType7"; + case sib_type8: + return "sibType8"; + case sib_type9: + return "sibType9"; + case sib_type10: + return "sibType10"; + case sib_type11: + return "sibType11"; + case sib_type12_v920: + return "sibType12-v920"; + case sib_type13_v920: + return "sibType13-v920"; + case sib_type14_v1130: + return "sibType14-v1130"; + case sib_type15_v1130: + return "sibType15-v1130"; + case sib_type16_v1130: + return "sibType16-v1130"; + case sib_type17_v1250: + return "sibType17-v1250"; + case sib_type18_v1250: + return "sibType18-v1250"; + case sib_type19_v1250: + return "sibType19-v1250"; + case sib_type20_v1310: + return "sibType20-v1310"; + case sib_type21_v1430: + return "sibType21-v1430"; + case sib_type24_v1530: + return "sibType24-v1530"; + case sib_type25_v1530: + return "sibType25-v1530"; + case sib_type26_v1530: + return "sibType26-v1530"; + default: + invalid_enum_value(value, "sib_type_e"); + } + return ""; +} +uint8_t sib_type_e::to_number() const +{ + const static uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26}; + return get_enum_number(options, 22, value, "sib_type_e"); +} + +std::string sib8_per_plmn_r11_s::params_cdma2000_r11_c_::types::to_string() const +{ + switch (value) { + case explicit_value: + return "explicitValue"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sib8_per_plmn_r11_s::params_cdma2000_r11_c_::types"); + } + return ""; +} + +std::string srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_::to_string() const +{ + switch (value) { + case bw0: + return "bw0"; + case bw1: + return "bw1"; + case bw2: + return "bw2"; + case bw3: + return "bw3"; + case bw4: + return "bw4"; + case bw5: + return "bw5"; + case bw6: + return "bw6"; + case bw7: + return "bw7"; + default: + invalid_enum_value(value, "srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return get_enum_number(options, 8, value, "srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_"); +} + +std::string srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_::to_string() const +{ + switch (value) { + case sc0: + return "sc0"; + case sc1: + return "sc1"; + case sc2: + return "sc2"; + case sc3: + return "sc3"; + case sc4: + return "sc4"; + case sc5: + return "sc5"; + case sc6: + return "sc6"; + case sc7: + return "sc7"; + case sc8: + return "sc8"; + case sc9: + return "sc9"; + case sc10: + return "sc10"; + case sc11: + return "sc11"; + case sc12: + return "sc12"; + case sc13: + return "sc13"; + case sc14: + return "sc14"; + case sc15: + return "sc15"; + default: + invalid_enum_value(value, "srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; + return get_enum_number(options, 16, value, "srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_"); +} + +std::string uac_barr_info_set_r15_s::uac_barr_factor_r15_e_::to_string() const +{ + switch (value) { + case p00: + return "p00"; + case p05: + return "p05"; + case p10: + return "p10"; + case p15: + return "p15"; + case p20: + return "p20"; + case p25: + return "p25"; + case p30: + return "p30"; + case p40: + return "p40"; + case p50: + return "p50"; + case p60: + return "p60"; + case p70: + return "p70"; + case p75: + return "p75"; + case p80: + return "p80"; + case p85: + return "p85"; + case p90: + return "p90"; + case p95: + return "p95"; + default: + invalid_enum_value(value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); + } + return ""; +} +float uac_barr_info_set_r15_s::uac_barr_factor_r15_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return get_enum_number(options, 16, value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); +} +std::string uac_barr_info_set_r15_s::uac_barr_factor_r15_e_::to_number_string() const +{ + switch (value) { + case p00: + return "0.0"; + case p05: + return "0.5"; + case p10: + return "1.0"; + case p15: + return "1.5"; + case p20: + return "2.0"; + case p25: + return "2.5"; + case p30: + return "3.0"; + case p40: + return "4.0"; + case p50: + return "5.0"; + case p60: + return "6.0"; + case p70: + return "7.0"; + case p75: + return "7.5"; + case p80: + return "8.0"; + case p85: + return "8.5"; + case p90: + return "9.0"; + case p95: + return "9.5"; + default: + invalid_enum_number(value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); + } + return ""; +} + +std::string uac_barr_info_set_r15_s::uac_barr_time_r15_e_::to_string() const +{ + switch (value) { + case s4: + return "s4"; + case s8: + return "s8"; + case s16: + return "s16"; + case s32: + return "s32"; + case s64: + return "s64"; + case s128: + return "s128"; + case s256: + return "s256"; + case s512: + return "s512"; + default: + invalid_enum_value(value, "uac_barr_info_set_r15_s::uac_barr_time_r15_e_"); + } + return ""; +} +uint16_t uac_barr_info_set_r15_s::uac_barr_time_r15_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 8, value, "uac_barr_info_set_r15_s::uac_barr_time_r15_e_"); +} + +std::string uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::types::to_string() const +{ + switch (value) { + case uac_implicit_ac_barr_list_r15: + return "uac-ImplicitAC-BarringList-r15"; + case uac_explicit_ac_barr_list_r15: + return "uac-ExplicitAC-BarringList-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::types"); + } + return ""; +} + +// UL-CyclicPrefixLength ::= ENUMERATED +std::string ul_cp_len_e::to_string() const +{ + switch (value) { + case len1: + return "len1"; + case len2: + return "len2"; + default: + invalid_enum_value(value, "ul_cp_len_e"); + } + return ""; +} +uint8_t ul_cp_len_e::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ul_cp_len_e"); +} + +std::string ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_::to_string() const +{ + switch (value) { + case delta_f_minus1: + return "deltaF-1"; + case delta_f0: + return "deltaF0"; + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case delta_f3: + return "deltaF3"; + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_"); + } + return ""; +} +int8_t ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_::to_number() const +{ + const static int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 8, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_"); +} + +std::string ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_::to_string() const +{ + switch (value) { + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_"); +} + +std::string wus_cfg_r15_s::max_dur_factor_r15_e_::to_string() const +{ + switch (value) { + case one32th: + return "one32th"; + case one16th: + return "one16th"; + case one8th: + return "one8th"; + case one4th: + return "one4th"; + default: + invalid_enum_value(value, "wus_cfg_r15_s::max_dur_factor_r15_e_"); + } + return ""; +} +uint8_t wus_cfg_r15_s::max_dur_factor_r15_e_::to_number() const +{ + const static uint8_t options[] = {32, 16, 8, 4}; + return get_enum_number(options, 4, value, "wus_cfg_r15_s::max_dur_factor_r15_e_"); +} + +std::string wus_cfg_r15_s::num_pos_r15_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "wus_cfg_r15_s::num_pos_r15_e_"); + } + return ""; +} +uint8_t wus_cfg_r15_s::num_pos_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "wus_cfg_r15_s::num_pos_r15_e_"); +} + +std::string wus_cfg_r15_s::freq_location_r15_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n2: + return "n2"; + case n4: + return "n4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "wus_cfg_r15_s::freq_location_r15_e_"); + } + return ""; +} +uint8_t wus_cfg_r15_s::freq_location_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 2, 4}; + return get_enum_number(options, 3, value, "wus_cfg_r15_s::freq_location_r15_e_"); +} + +std::string wus_cfg_r15_s::time_offset_drx_r15_e_::to_string() const +{ + switch (value) { + case ms40: + return "ms40"; + case ms80: + return "ms80"; + case ms160: + return "ms160"; + case ms240: + return "ms240"; + default: + invalid_enum_value(value, "wus_cfg_r15_s::time_offset_drx_r15_e_"); + } + return ""; +} +uint8_t wus_cfg_r15_s::time_offset_drx_r15_e_::to_number() const +{ + const static uint8_t options[] = {40, 80, 160, 240}; + return get_enum_number(options, 4, value, "wus_cfg_r15_s::time_offset_drx_r15_e_"); +} + +std::string wus_cfg_r15_s::time_offset_e_drx_short_r15_e_::to_string() const +{ + switch (value) { + case ms40: + return "ms40"; + case ms80: + return "ms80"; + case ms160: + return "ms160"; + case ms240: + return "ms240"; + default: + invalid_enum_value(value, "wus_cfg_r15_s::time_offset_e_drx_short_r15_e_"); + } + return ""; +} +uint8_t wus_cfg_r15_s::time_offset_e_drx_short_r15_e_::to_number() const +{ + const static uint8_t options[] = {40, 80, 160, 240}; + return get_enum_number(options, 4, value, "wus_cfg_r15_s::time_offset_e_drx_short_r15_e_"); +} + +std::string wus_cfg_r15_s::time_offset_e_drx_long_r15_e_::to_string() const +{ + switch (value) { + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_"); + } + return ""; +} +uint16_t wus_cfg_r15_s::time_offset_e_drx_long_r15_e_::to_number() const +{ + const static uint16_t options[] = {1000, 2000}; + return get_enum_number(options, 2, value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_"); +} + +std::string cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_::to_string() const +{ + switch (value) { + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + case db15: + return "dB15"; + default: + invalid_enum_value(value, "cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_"); + } + return ""; +} +uint8_t cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_::to_number() const +{ + const static uint8_t options[] = {6, 9, 12, 15}; + return get_enum_number(options, 4, value, "cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_"); +} + +std::string mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_"); + } + return ""; +} +uint8_t mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_"); +} + +std::string mob_state_params_s::t_eval_e_::to_string() const +{ + switch (value) { + case s30: + return "s30"; + case s60: + return "s60"; + case s120: + return "s120"; + case s180: + return "s180"; + case s240: + return "s240"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "mob_state_params_s::t_eval_e_"); + } + return ""; +} +uint8_t mob_state_params_s::t_eval_e_::to_number() const +{ + const static uint8_t options[] = {30, 60, 120, 180, 240}; + return get_enum_number(options, 5, value, "mob_state_params_s::t_eval_e_"); +} + +std::string mob_state_params_s::t_hyst_normal_e_::to_string() const +{ + switch (value) { + case s30: + return "s30"; + case s60: + return "s60"; + case s120: + return "s120"; + case s180: + return "s180"; + case s240: + return "s240"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "mob_state_params_s::t_hyst_normal_e_"); + } + return ""; +} +uint8_t mob_state_params_s::t_hyst_normal_e_::to_number() const +{ + const static uint8_t options[] = {30, 60, 120, 180, 240}; + return get_enum_number(options, 5, value, "mob_state_params_s::t_hyst_normal_e_"); +} + +std::string redist_serving_info_r13_s::t360_r13_e_::to_string() const +{ + switch (value) { + case min4: + return "min4"; + case min8: + return "min8"; + case min16: + return "min16"; + case min32: + return "min32"; + case infinity: + return "infinity"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "redist_serving_info_r13_s::t360_r13_e_"); + } + return ""; +} +int8_t redist_serving_info_r13_s::t360_r13_e_::to_number() const +{ + const static int8_t options[] = {4, 8, 16, 32, -1}; + return get_enum_number(options, 5, value, "redist_serving_info_r13_s::t360_r13_e_"); +} + +std::string sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_::to_string() const +{ + switch (value) { + case psf10: + return "psf10"; + case psf20: + return "psf20"; + case psf100: + return "psf100"; + case psf300: + return "psf300"; + case psf500: + return "psf500"; + case psf1000: + return "psf1000"; + case psf1200: + return "psf1200"; + case psf1600: + return "psf1600"; + default: + invalid_enum_value(value, "sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_"); + } + return ""; +} +uint16_t sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_::to_number() const +{ + const static uint16_t options[] = {10, 20, 100, 300, 500, 1000, 1200, 1600}; + return get_enum_number(options, 8, value, "sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_"); +} + +std::string sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_::to_string() const +{ + switch (value) { + case psf0: + return "psf0"; + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf4: + return "psf4"; + case psf8: + return "psf8"; + case psf16: + return "psf16"; + case psf32: + return "psf32"; + case psf64: + return "psf64"; + case psf128: + return "psf128"; + case psf256: + return "psf256"; + case ps512: + return "ps512"; + case psf1024: + return "psf1024"; + case psf2048: + return "psf2048"; + case psf4096: + return "psf4096"; + case psf8192: + return "psf8192"; + case psf16384: + return "psf16384"; + default: + invalid_enum_value(value, "sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_"); + } + return ""; +} +uint16_t sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_::to_number() const +{ + const static uint16_t options[] = {0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}; + return get_enum_number(options, 16, value, "sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_"); +} + +std::string sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case sf320: + return "sf320"; + case sf512: + return "sf512"; + case sf640: + return "sf640"; + case sf1024: + return "sf1024"; + case sf2048: + return "sf2048"; + case sf4096: + return "sf4096"; + case sf8192: + return "sf8192"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types"); + } + return ""; +} +uint16_t sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types::to_number() const +{ + const static uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; + return get_enum_number(options, 16, value, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types"); +} + +std::string sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + case dbinf: + return "dBinf"; + default: + invalid_enum_value(value, "sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_"); + } + return ""; +} +uint8_t sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_"); +} + +std::string sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + default: + invalid_enum_value(value, "sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_"); + } + return ""; +} +uint8_t sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_"); +} + +std::string sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + default: + invalid_enum_value(value, "sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_"); + } + return ""; +} +uint8_t sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_"); +} + +// TimeAlignmentTimer ::= ENUMERATED +std::string time_align_timer_e::to_string() const +{ + switch (value) { + case sf500: + return "sf500"; + case sf750: + return "sf750"; + case sf1280: + return "sf1280"; + case sf1920: + return "sf1920"; + case sf2560: + return "sf2560"; + case sf5120: + return "sf5120"; + case sf10240: + return "sf10240"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "time_align_timer_e"); + } + return ""; +} +int16_t time_align_timer_e::to_number() const +{ + const static int16_t options[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; + return get_enum_number(options, 8, value, "time_align_timer_e"); +} + +// UAC-AC1-SelectAssistInfo-r15 ::= ENUMERATED +std::string uac_ac1_select_assist_info_r15_e::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + default: + invalid_enum_value(value, "uac_ac1_select_assist_info_r15_e"); + } + return ""; +} + +std::string ue_timers_and_consts_s::t300_e_::to_string() const +{ + switch (value) { + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms400: + return "ms400"; + case ms600: + return "ms600"; + case ms1000: + return "ms1000"; + case ms1500: + return "ms1500"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t300_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t300_e_::to_number() const +{ + const static uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_e_"); +} + +std::string ue_timers_and_consts_s::t301_e_::to_string() const +{ + switch (value) { + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms400: + return "ms400"; + case ms600: + return "ms600"; + case ms1000: + return "ms1000"; + case ms1500: + return "ms1500"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t301_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t301_e_::to_number() const +{ + const static uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::t301_e_"); +} + +std::string ue_timers_and_consts_s::t310_e_::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t310_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t310_e_::to_number() const +{ + const static uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return get_enum_number(options, 7, value, "ue_timers_and_consts_s::t310_e_"); +} + +std::string ue_timers_and_consts_s::n310_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n6: + return "n6"; + case n8: + return "n8"; + case n10: + return "n10"; + case n20: + return "n20"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::n310_e_"); + } + return ""; +} +uint8_t ue_timers_and_consts_s::n310_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::n310_e_"); +} + +std::string ue_timers_and_consts_s::t311_e_::to_string() const +{ + switch (value) { + case ms1000: + return "ms1000"; + case ms3000: + return "ms3000"; + case ms5000: + return "ms5000"; + case ms10000: + return "ms10000"; + case ms15000: + return "ms15000"; + case ms20000: + return "ms20000"; + case ms30000: + return "ms30000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t311_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t311_e_::to_number() const +{ + const static uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return get_enum_number(options, 7, value, "ue_timers_and_consts_s::t311_e_"); +} + +std::string ue_timers_and_consts_s::n311_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n8: + return "n8"; + case n10: + return "n10"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::n311_e_"); + } + return ""; +} +uint8_t ue_timers_and_consts_s::n311_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::n311_e_"); +} + +std::string ue_timers_and_consts_s::t300_v1310_e_::to_string() const +{ + switch (value) { + case ms2500: + return "ms2500"; + case ms3000: + return "ms3000"; + case ms3500: + return "ms3500"; + case ms4000: + return "ms4000"; + case ms5000: + return "ms5000"; + case ms6000: + return "ms6000"; + case ms8000: + return "ms8000"; + case ms10000: + return "ms10000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t300_v1310_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t300_v1310_e_::to_number() const +{ + const static uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_v1310_e_"); +} + +std::string ue_timers_and_consts_s::t301_v1310_e_::to_string() const +{ + switch (value) { + case ms2500: + return "ms2500"; + case ms3000: + return "ms3000"; + case ms3500: + return "ms3500"; + case ms4000: + return "ms4000"; + case ms5000: + return "ms5000"; + case ms6000: + return "ms6000"; + case ms8000: + return "ms8000"; + case ms10000: + return "ms10000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t301_v1310_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t301_v1310_e_::to_number() const +{ + const static uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::t301_v1310_e_"); +} + +std::string ue_timers_and_consts_s::t310_v1330_e_::to_string() const +{ + switch (value) { + case ms4000: + return "ms4000"; + case ms6000: + return "ms6000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t310_v1330_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t310_v1330_e_::to_number() const +{ + const static uint16_t options[] = {4000, 6000}; + return get_enum_number(options, 2, value, "ue_timers_and_consts_s::t310_v1330_e_"); +} + +std::string ue_timers_and_consts_s::t300_r15_e_::to_string() const +{ + switch (value) { + case ms4000: + return "ms4000"; + case ms6000: + return "ms6000"; + case ms8000: + return "ms8000"; + case ms10000: + return "ms10000"; + case ms15000: + return "ms15000"; + case ms25000: + return "ms25000"; + case ms40000: + return "ms40000"; + case ms60000: + return "ms60000"; + default: + invalid_enum_value(value, "ue_timers_and_consts_s::t300_r15_e_"); + } + return ""; +} +uint16_t ue_timers_and_consts_s::t300_r15_e_::to_number() const +{ + const static uint16_t options[] = {4000, 6000, 8000, 10000, 15000, 25000, 40000, 60000}; + return get_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_r15_e_"); +} + +std::string sched_info_s::si_periodicity_e_::to_string() const +{ + switch (value) { + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + default: + invalid_enum_value(value, "sched_info_s::si_periodicity_e_"); + } + return ""; +} +uint16_t sched_info_s::si_periodicity_e_::to_number() const +{ + const static uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 7, value, "sched_info_s::si_periodicity_e_"); +} + +std::string sib_type11_s::warning_msg_segment_type_e_::to_string() const +{ + switch (value) { + case not_last_segment: + return "notLastSegment"; + case last_segment: + return "lastSegment"; + default: + invalid_enum_value(value, "sib_type11_s::warning_msg_segment_type_e_"); + } + return ""; +} + +std::string sib_type12_r9_s::warning_msg_segment_type_r9_e_::to_string() const +{ + switch (value) { + case not_last_segment: + return "notLastSegment"; + case last_segment: + return "lastSegment"; + default: + invalid_enum_value(value, "sib_type12_r9_s::warning_msg_segment_type_r9_e_"); + } + return ""; +} + +std::string sib_type14_r11_s::eab_param_r11_c_::types::to_string() const +{ + switch (value) { + case eab_common_r11: + return "eab-Common-r11"; + case eab_per_plmn_list_r11: + return "eab-PerPLMN-List-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sib_type14_r11_s::eab_param_r11_c_::types"); + } + return ""; +} + +std::string sib_type14_r11_s::eab_per_rsrp_r15_e_::to_string() const +{ + switch (value) { + case thresh0: + return "thresh0"; + case thresh1: + return "thresh1"; + case thresh2: + return "thresh2"; + case thresh3: + return "thresh3"; + default: + invalid_enum_value(value, "sib_type14_r11_s::eab_per_rsrp_r15_e_"); + } + return ""; +} +uint8_t sib_type14_r11_s::eab_per_rsrp_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "sib_type14_r11_s::eab_per_rsrp_r15_e_"); +} + +std::string sib_type2_s::freq_info_s_::ul_bw_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "sib_type2_s::freq_info_s_::ul_bw_e_"); + } + return ""; +} +uint8_t sib_type2_s::freq_info_s_::ul_bw_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "sib_type2_s::freq_info_s_::ul_bw_e_"); +} + +std::string sib_type20_r13_s::sc_mcch_repeat_period_r13_e_::to_string() const +{ + switch (value) { + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + default: + invalid_enum_value(value, "sib_type20_r13_s::sc_mcch_repeat_period_r13_e_"); + } + return ""; +} +uint16_t sib_type20_r13_s::sc_mcch_repeat_period_r13_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 8, value, "sib_type20_r13_s::sc_mcch_repeat_period_r13_e_"); +} + +std::string sib_type20_r13_s::sc_mcch_mod_period_r13_e_::to_string() const +{ + switch (value) { + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + case r2048: + return "r2048"; + case rf4096: + return "rf4096"; + case rf8192: + return "rf8192"; + case rf16384: + return "rf16384"; + case rf32768: + return "rf32768"; + case rf65536: + return "rf65536"; + default: + invalid_enum_value(value, "sib_type20_r13_s::sc_mcch_mod_period_r13_e_"); + } + return ""; +} +uint32_t sib_type20_r13_s::sc_mcch_mod_period_r13_e_::to_number() const +{ + const static uint32_t options[] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; + return get_enum_number(options, 16, value, "sib_type20_r13_s::sc_mcch_mod_period_r13_e_"); +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case r128: + return "r128"; + case r256: + return "r256"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_"); + } + return ""; +} +uint16_t sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 9, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_"); +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v1dot5: + return "v1dot5"; + case v2: + return "v2"; + case v2dot5: + return "v2dot5"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_"); + } + return ""; +} +float sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_::to_number() const +{ + const static float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return get_enum_number(options, 8, value, + "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_"); +} +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_::to_number_string() const +{ + switch (value) { + case v1: + return "1"; + case v1dot5: + return "1.5"; + case v2: + return "2"; + case v2dot5: + return "2.5"; + case v4: + return "4"; + case v5: + return "5"; + case v8: + return "8"; + case v10: + return "10"; + default: + invalid_enum_number(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_"); + } + return ""; +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v2: + return "v2"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + case v20: + return "v20"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_e_"); + } + return ""; +} +uint8_t sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return get_enum_number(options, 7, value, + "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_e_"); +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::types::to_string() const +{ + switch (value) { + case fdd_r14: + return "fdd-r14"; + case tdd_r14: + return "tdd-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::types"); + } + return ""; +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_::to_string() const +{ + switch (value) { + case off: + return "off"; + case ce_mode_a: + return "ce-ModeA"; + case ce_mode_b: + return "ce-ModeB"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_"); + } + return ""; +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_::to_string() const +{ + switch (value) { + case rf32: + return "rf32"; + case rf128: + return "rf128"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + case rf2048: + return "rf2048"; + case rf4096: + return "rf4096"; + case rf8192: + return "rf8192"; + case rf16384: + return "rf16384"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_"); + } + return ""; +} +uint16_t sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_::to_number() const +{ + const static uint16_t options[] = {32, 128, 512, 1024, 2048, 4096, 8192, 16384}; + return get_enum_number(options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_"); +} + +std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_::to_string() const +{ + switch (value) { + case rf32: + return "rf32"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + case rf2048: + return "rf2048"; + case rf4096: + return "rf4096"; + case rf8192: + return "rf8192"; + case rf16384: + return "rf16384"; + case rf32768: + return "rf32768"; + case rf65536: + return "rf65536"; + case rf131072: + return "rf131072"; + case rf262144: + return "rf262144"; + case rf524288: + return "rf524288"; + case rf1048576: + return "rf1048576"; + default: + invalid_enum_value(value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_"); + } + return ""; +} +uint32_t sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_::to_number() const +{ + const static uint32_t options[] = {32, 128, 256, 512, 1024, 2048, 4096, 8192, + 16384, 32768, 65536, 131072, 262144, 524288, 1048576}; + return get_enum_number(options, 15, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_"); +} + +std::string sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case r16: + return "r16"; + case r32: + return "r32"; + default: + invalid_enum_value(value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_"); + } + return ""; +} +uint8_t sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_::to_number() const +{ + const static uint8_t options[] = {16, 32}; + return get_enum_number(options, 2, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_"); +} + +std::string sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case r192: + return "r192"; + case r256: + return "r256"; + case r384: + return "r384"; + case r512: + return "r512"; + case r768: + return "r768"; + case r1024: + return "r1024"; + case r1536: + return "r1536"; + case r2048: + return "r2048"; + default: + invalid_enum_value(value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_"); + } + return ""; +} +uint16_t sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_::to_number() const +{ + const static uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; + return get_enum_number(options, 8, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_"); +} + +std::string sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::types::to_string() const +{ + switch (value) { + case plmn_common_r15: + return "plmnCommon-r15"; + case individual_plmn_list_r15: + return "individualPLMNList-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::types"); + } + return ""; +} + +std::string sib_type3_s::cell_resel_info_common_s_::q_hyst_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + case db4: + return "dB4"; + case db5: + return "dB5"; + case db6: + return "dB6"; + case db8: + return "dB8"; + case db10: + return "dB10"; + case db12: + return "dB12"; + case db14: + return "dB14"; + case db16: + return "dB16"; + case db18: + return "dB18"; + case db20: + return "dB20"; + case db22: + return "dB22"; + case db24: + return "dB24"; + default: + invalid_enum_value(value, "sib_type3_s::cell_resel_info_common_s_::q_hyst_e_"); + } + return ""; +} +uint8_t sib_type3_s::cell_resel_info_common_s_::q_hyst_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return get_enum_number(options, 16, value, "sib_type3_s::cell_resel_info_common_s_::q_hyst_e_"); +} + +std::string +sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4: + return "dB-4"; + case db_minus2: + return "dB-2"; + case db0: + return "dB0"; + default: + invalid_enum_value( + value, "sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); + } + return ""; +} +int8_t sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_::to_number() const +{ + const static int8_t options[] = {-6, -4, -2, 0}; + return get_enum_number( + options, 4, value, + "sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); +} + +std::string +sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4: + return "dB-4"; + case db_minus2: + return "dB-2"; + case db0: + return "dB0"; + default: + invalid_enum_value(value, + "sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); + } + return ""; +} +int8_t sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_::to_number() const +{ + const static int8_t options[] = {-6, -4, -2, 0}; + return get_enum_number(options, 4, value, + "sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); +} + +std::string sib_info_item_c::types::to_string() const +{ + switch (value) { + case sib2: + return "sib2"; + case sib3: + return "sib3"; + case sib4: + return "sib4"; + case sib5: + return "sib5"; + case sib6: + return "sib6"; + case sib7: + return "sib7"; + case sib8: + return "sib8"; + case sib9: + return "sib9"; + case sib10: + return "sib10"; + case sib11: + return "sib11"; + case sib12_v920: + return "sib12-v920"; + case sib13_v920: + return "sib13-v920"; + case sib14_v1130: + return "sib14-v1130"; + case sib15_v1130: + return "sib15-v1130"; + case sib16_v1130: + return "sib16-v1130"; + case sib17_v1250: + return "sib17-v1250"; + case sib18_v1250: + return "sib18-v1250"; + case sib19_v1250: + return "sib19-v1250"; + case sib20_v1310: + return "sib20-v1310"; + case sib21_v1430: + return "sib21-v1430"; + case sib24_v1530: + return "sib24-v1530"; + case sib25_v1530: + return "sib25-v1530"; + case sib26_v1530: + return "sib26-v1530"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sib_info_item_c::types"); + } + return ""; +} +uint8_t sib_info_item_c::types::to_number() const +{ + const static uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26}; + return get_enum_number(options, 23, value, "sib_info_item_c::types"); +} + +std::string sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::types::to_string() const +{ + switch (value) { + case pos_sys_info_r15: + return "posSystemInformation-r15"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::types"); + } + return ""; +} + +std::string sys_info_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case sys_info_r8: + return "systemInformation-r8"; + case crit_exts_future_r15: + return "criticalExtensionsFuture-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sys_info_s::crit_exts_c_::types"); + } + return ""; +} + +std::string sib_type1_s::cell_access_related_info_s_::cell_barred_e_::to_string() const +{ + switch (value) { + case barred: + return "barred"; + case not_barred: + return "notBarred"; + default: + invalid_enum_value(value, "sib_type1_s::cell_access_related_info_s_::cell_barred_e_"); + } + return ""; +} + +std::string sib_type1_s::cell_access_related_info_s_::intra_freq_resel_e_::to_string() const +{ + switch (value) { + case allowed: + return "allowed"; + case not_allowed: + return "notAllowed"; + default: + invalid_enum_value(value, "sib_type1_s::cell_access_related_info_s_::intra_freq_resel_e_"); + } + return ""; +} + +std::string sib_type1_s::si_win_len_e_::to_string() const +{ + switch (value) { + case ms1: + return "ms1"; + case ms2: + return "ms2"; + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms15: + return "ms15"; + case ms20: + return "ms20"; + case ms40: + return "ms40"; + default: + invalid_enum_value(value, "sib_type1_s::si_win_len_e_"); + } + return ""; +} +uint8_t sib_type1_s::si_win_len_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 5, 10, 15, 20, 40}; + return get_enum_number(options, 7, value, "sib_type1_s::si_win_len_e_"); +} + +std::string bcch_dl_sch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case sys_info: + return "systemInformation"; + case sib_type1: + return "systemInformationBlockType1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); + } + return ""; +} +uint8_t bcch_dl_sch_msg_type_c::c1_c_::types::to_number() const +{ + switch (value) { + case sib_type1: + return 1; + default: + invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); + } + return 0; +} + +std::string bcch_dl_sch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "bcch_dl_sch_msg_type_c::types"); + } + return ""; +} +uint8_t bcch_dl_sch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "bcch_dl_sch_msg_type_c::types"); +} + +std::string bcch_dl_sch_msg_type_br_r13_c::c1_c_::types::to_string() const +{ + switch (value) { + case sys_info_br_r13: + return "systemInformation-BR-r13"; + case sib_type1_br_r13: + return "systemInformationBlockType1-BR-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "bcch_dl_sch_msg_type_br_r13_c::c1_c_::types"); + } + return ""; +} +uint8_t bcch_dl_sch_msg_type_br_r13_c::c1_c_::types::to_number() const +{ + switch (value) { + case sib_type1_br_r13: + return 1; + default: + invalid_enum_number(value, "bcch_dl_sch_msg_type_br_r13_c::c1_c_::types"); + } + return 0; +} + +std::string bcch_dl_sch_msg_type_br_r13_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "bcch_dl_sch_msg_type_br_r13_c::types"); + } + return ""; +} +uint8_t bcch_dl_sch_msg_type_br_r13_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "bcch_dl_sch_msg_type_br_r13_c::types"); +} + +// SIB-Type-MBMS-r14 ::= ENUMERATED +std::string sib_type_mbms_r14_e::to_string() const +{ + switch (value) { + case sib_type10: + return "sibType10"; + case sib_type11: + return "sibType11"; + case sib_type12_v920: + return "sibType12-v920"; + case sib_type13_v920: + return "sibType13-v920"; + case sib_type15_v1130: + return "sibType15-v1130"; + case sib_type16_v1130: + return "sibType16-v1130"; + default: + invalid_enum_value(value, "sib_type_mbms_r14_e"); + } + return ""; +} +uint8_t sib_type_mbms_r14_e::to_number() const +{ + const static uint8_t options[] = {10, 11, 12, 13, 15, 16}; + return get_enum_number(options, 6, value, "sib_type_mbms_r14_e"); +} + +std::string sched_info_mbms_r14_s::si_periodicity_r14_e_::to_string() const +{ + switch (value) { + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + default: + invalid_enum_value(value, "sched_info_mbms_r14_s::si_periodicity_r14_e_"); + } + return ""; +} +uint16_t sched_info_mbms_r14_s::si_periodicity_r14_e_::to_number() const +{ + const static uint16_t options[] = {16, 32, 64, 128, 256, 512}; + return get_enum_number(options, 6, value, "sched_info_mbms_r14_s::si_periodicity_r14_e_"); +} + +std::string non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_::to_string() const +{ + switch (value) { + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf512: + return "rf512"; + default: + invalid_enum_value(value, "non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_"); + } + return ""; +} +uint16_t non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 512}; + return get_enum_number(options, 7, value, "non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_"); +} + +std::string sib_type1_mbms_r14_s::si_win_len_r14_e_::to_string() const +{ + switch (value) { + case ms1: + return "ms1"; + case ms2: + return "ms2"; + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms15: + return "ms15"; + case ms20: + return "ms20"; + case ms40: + return "ms40"; + case ms80: + return "ms80"; + default: + invalid_enum_value(value, "sib_type1_mbms_r14_s::si_win_len_r14_e_"); + } + return ""; +} +uint8_t sib_type1_mbms_r14_s::si_win_len_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 5, 10, 15, 20, 40, 80}; + return get_enum_number(options, 8, value, "sib_type1_mbms_r14_s::si_win_len_r14_e_"); +} + +std::string bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types::to_string() const +{ + switch (value) { + case sys_info_mbms_r14: + return "systemInformation-MBMS-r14"; + case sib_type1_mbms_r14: + return "systemInformationBlockType1-MBMS-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types"); + } + return ""; +} +uint8_t bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types::to_number() const +{ + switch (value) { + case sib_type1_mbms_r14: + return 1; + default: + invalid_enum_number(value, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types"); + } + return 0; +} + +std::string bcch_dl_sch_msg_type_mbms_r14_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "bcch_dl_sch_msg_type_mbms_r14_c::types"); + } + return ""; +} +uint8_t bcch_dl_sch_msg_type_mbms_r14_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "bcch_dl_sch_msg_type_mbms_r14_c::types"); +} + +// NZP-FrequencyDensity-r14 ::= ENUMERATED +std::string nzp_freq_density_r14_e::to_string() const +{ + switch (value) { + case d1: + return "d1"; + case d2: + return "d2"; + case d3: + return "d3"; + default: + invalid_enum_value(value, "nzp_freq_density_r14_e"); + } + return ""; +} +uint8_t nzp_freq_density_r14_e::to_number() const +{ + const static uint8_t options[] = {1, 2, 3}; + return get_enum_number(options, 3, value, "nzp_freq_density_r14_e"); +} + +std::string p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types::to_string() const +{ + switch (value) { + case non_precoded_r13: + return "nonPrecoded-r13"; + case beamformed_k1a_r13: + return "beamformedK1a-r13"; + case beamformed_kn_r13: + return "beamformedKN-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types"); + } + return ""; +} +uint8_t p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types::to_number() const +{ + switch (value) { + case beamformed_k1a_r13: + return 1; + default: + invalid_enum_number(value, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types"); + } + return 0; +} + +std::string csi_rs_cfg_nzp_activation_r14_s::csi_rs_nzp_mode_r14_e_::to_string() const +{ + switch (value) { + case semi_persistent: + return "semiPersistent"; + case aperiodic: + return "aperiodic"; + default: + invalid_enum_value(value, "csi_rs_cfg_nzp_activation_r14_s::csi_rs_nzp_mode_r14_e_"); + } + return ""; +} + +std::string csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_::to_string() const +{ + switch (value) { + case an1: + return "an1"; + case an2: + return "an2"; + case an4: + return "an4"; + case an8: + return "an8"; + default: + invalid_enum_value(value, "csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number(options, 4, value, "csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_"); +} + +std::string csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_"); +} + +std::string csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_::to_string() const +{ + switch (value) { + case cdm2: + return "cdm2"; + case cdm4: + return "cdm4"; + default: + invalid_enum_value(value, "csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_"); +} + +// CQI-ReportModeAperiodic ::= ENUMERATED +std::string cqi_report_mode_aperiodic_e::to_string() const +{ + switch (value) { + case rm12: + return "rm12"; + case rm20: + return "rm20"; + case rm22: + return "rm22"; + case rm30: + return "rm30"; + case rm31: + return "rm31"; + case rm32_v1250: + return "rm32-v1250"; + case rm10_v1310: + return "rm10-v1310"; + case rm11_v1310: + return "rm11-v1310"; + default: + invalid_enum_value(value, "cqi_report_mode_aperiodic_e"); + } + return ""; +} +uint8_t cqi_report_mode_aperiodic_e::to_number() const +{ + const static uint8_t options[] = {12, 20, 22, 30, 31, 32, 10, 11}; + return get_enum_number(options, 8, value, "cqi_report_mode_aperiodic_e"); +} + +std::string csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 8}; + return get_enum_number(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_"); +} + +std::string csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 8}; + return get_enum_number(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_"); +} + +std::string csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_::to_number() const +{ + const static uint8_t options[] = {4, 8}; + return get_enum_number(options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_"); +} + +std::string csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_::to_number() const +{ + const static uint8_t options[] = {4, 8}; + return get_enum_number(options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_"); +} + +std::string csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_::to_string() const +{ + switch (value) { + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + case n10: + return "n10"; + case n12: + return "n12"; + case n14: + return "n14"; + case n16: + return "n16"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_::to_number() const +{ + const static uint8_t options[] = {5, 6, 7, 10, 12, 14, 16}; + return get_enum_number(options, 7, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_"); +} + +std::string csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_::to_string() const +{ + switch (value) { + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_::to_number() const +{ + const static uint8_t options[] = {5, 6, 7}; + return get_enum_number(options, 3, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_"); +} + +std::string csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_::to_string() const +{ + switch (value) { + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + case n10: + return "n10"; + case n12: + return "n12"; + case n14: + return "n14"; + case n16: + return "n16"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_::to_number() const +{ + const static uint8_t options[] = {5, 6, 7, 10, 12, 14, 16}; + return get_enum_number(options, 7, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_"); +} + +std::string csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_::to_string() const +{ + switch (value) { + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + default: + invalid_enum_value(value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_::to_number() const +{ + const static uint8_t options[] = {5, 6, 7}; + return get_enum_number(options, 3, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_"); +} + +std::string csi_rs_cfg_emimo_r13_c::setup_c_::types::to_string() const +{ + switch (value) { + case non_precoded_r13: + return "nonPrecoded-r13"; + case beamformed_r13: + return "beamformed-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "csi_rs_cfg_emimo_r13_c::setup_c_::types"); + } + return ""; +} + +std::string csi_rs_cfg_emimo_v1430_c::setup_c_::types::to_string() const +{ + switch (value) { + case non_precoded_v1430: + return "nonPrecoded-v1430"; + case beamformed_v1430: + return "beamformed-v1430"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "csi_rs_cfg_emimo_v1430_c::setup_c_::types"); + } + return ""; +} + +std::string csi_rs_cfg_emimo_v1480_c::setup_c_::types::to_string() const +{ + switch (value) { + case non_precoded_v1480: + return "nonPrecoded-v1480"; + case beamformed_v1480: + return "beamformed-v1480"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "csi_rs_cfg_emimo_v1480_c::setup_c_::types"); + } + return ""; +} + +std::string csi_rs_cfg_emimo_v1530_c::setup_c_::types::to_string() const +{ + switch (value) { + case non_precoded_v1530: + return "nonPrecoded-v1530"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "csi_rs_cfg_emimo_v1530_c::setup_c_::types"); + } + return ""; +} + +std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_:: + csi_report_mode_r11_e_::to_string() const +{ + switch (value) { + case submode1: + return "submode1"; + case submode2: + return "submode2"; + default: + invalid_enum_value(value, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_" + "s_::csi_report_mode_r11_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_:: + csi_report_mode_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_::csi_" + "report_mode_r11_e_"); +} + +std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_:: + periodicity_factor_r11_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_" + "::periodicity_factor_r11_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_:: + periodicity_factor_r11_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, + "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_::" + "periodicity_factor_r11_e_"); +} + +std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::types::to_string() const +{ + switch (value) { + case wideband_cqi_r11: + return "widebandCQI-r11"; + case subband_cqi_r11: + return "subbandCQI-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::types"); + } + return ""; +} + +std::string cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_"); +} + +// PollByte-r14 ::= ENUMERATED +std::string poll_byte_r14_e::to_string() const +{ + switch (value) { + case kb1: + return "kB1"; + case kb2: + return "kB2"; + case kb5: + return "kB5"; + case kb8: + return "kB8"; + case kb10: + return "kB10"; + case kb15: + return "kB15"; + case kb3500: + return "kB3500"; + case kb4000: + return "kB4000"; + case kb4500: + return "kB4500"; + case kb5000: + return "kB5000"; + case kb5500: + return "kB5500"; + case kb6000: + return "kB6000"; + case kb6500: + return "kB6500"; + case kb7000: + return "kB7000"; + case kb7500: + return "kB7500"; + case kb8000: + return "kB8000"; + case kb9000: + return "kB9000"; + case kb10000: + return "kB10000"; + case kb11000: + return "kB11000"; + case kb12000: + return "kB12000"; + case kb13000: + return "kB13000"; + case kb14000: + return "kB14000"; + case kb15000: + return "kB15000"; + case kb16000: + return "kB16000"; + case kb17000: + return "kB17000"; + case kb18000: + return "kB18000"; + case kb19000: + return "kB19000"; + case kb20000: + return "kB20000"; + case kb25000: + return "kB25000"; + case kb30000: + return "kB30000"; + case kb35000: + return "kB35000"; + case kb40000: + return "kB40000"; + default: + invalid_enum_value(value, "poll_byte_r14_e"); + } + return ""; +} +uint16_t poll_byte_r14_e::to_number() const +{ + const static uint16_t options[] = {1, 2, 5, 8, 10, 15, 3500, 4000, 4500, 5000, 5500, + 6000, 6500, 7000, 7500, 8000, 9000, 10000, 11000, 12000, 13000, 14000, + 15000, 16000, 17000, 18000, 19000, 20000, 25000, 30000, 35000, 40000}; + return get_enum_number(options, 32, value, "poll_byte_r14_e"); +} + +// PollPDU-r15 ::= ENUMERATED +std::string poll_pdu_r15_e::to_string() const +{ + switch (value) { + case p4: + return "p4"; + case p8: + return "p8"; + case p16: + return "p16"; + case p32: + return "p32"; + case p64: + return "p64"; + case p128: + return "p128"; + case p256: + return "p256"; + case p512: + return "p512"; + case p1024: + return "p1024"; + case p2048_r15: + return "p2048-r15"; + case p4096_r15: + return "p4096-r15"; + case p6144_r15: + return "p6144-r15"; + case p8192_r15: + return "p8192-r15"; + case p12288_r15: + return "p12288-r15"; + case p16384_r15: + return "p16384-r15"; + case p_infinity: + return "pInfinity"; + default: + invalid_enum_value(value, "poll_pdu_r15_e"); + } + return ""; +} +int16_t poll_pdu_r15_e::to_number() const +{ + const static int16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144, 8192, 12288, 16384, -1}; + return get_enum_number(options, 16, value, "poll_pdu_r15_e"); +} + +// SN-FieldLength ::= ENUMERATED +std::string sn_field_len_e::to_string() const +{ + switch (value) { + case size5: + return "size5"; + case size10: + return "size10"; + default: + invalid_enum_value(value, "sn_field_len_e"); + } + return ""; +} +uint8_t sn_field_len_e::to_number() const +{ + const static uint8_t options[] = {5, 10}; + return get_enum_number(options, 2, value, "sn_field_len_e"); +} + +// SN-FieldLength-r15 ::= ENUMERATED +std::string sn_field_len_r15_e::to_string() const +{ + switch (value) { + case size5: + return "size5"; + case size10: + return "size10"; + case size16_r15: + return "size16-r15"; + default: + invalid_enum_value(value, "sn_field_len_r15_e"); + } + return ""; +} +uint8_t sn_field_len_r15_e::to_number() const +{ + const static uint8_t options[] = {5, 10, 16}; + return get_enum_number(options, 3, value, "sn_field_len_r15_e"); +} + +// T-PollRetransmit ::= ENUMERATED +std::string t_poll_retx_e::to_string() const +{ + switch (value) { + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms15: + return "ms15"; + case ms20: + return "ms20"; + case ms25: + return "ms25"; + case ms30: + return "ms30"; + case ms35: + return "ms35"; + case ms40: + return "ms40"; + case ms45: + return "ms45"; + case ms50: + return "ms50"; + case ms55: + return "ms55"; + case ms60: + return "ms60"; + case ms65: + return "ms65"; + case ms70: + return "ms70"; + case ms75: + return "ms75"; + case ms80: + return "ms80"; + case ms85: + return "ms85"; + case ms90: + return "ms90"; + case ms95: + return "ms95"; + case ms100: + return "ms100"; + case ms105: + return "ms105"; + case ms110: + return "ms110"; + case ms115: + return "ms115"; + case ms120: + return "ms120"; + case ms125: + return "ms125"; + case ms130: + return "ms130"; + case ms135: + return "ms135"; + case ms140: + return "ms140"; + case ms145: + return "ms145"; + case ms150: + return "ms150"; + case ms155: + return "ms155"; + case ms160: + return "ms160"; + case ms165: + return "ms165"; + case ms170: + return "ms170"; + case ms175: + return "ms175"; + case ms180: + return "ms180"; + case ms185: + return "ms185"; + case ms190: + return "ms190"; + case ms195: + return "ms195"; + case ms200: + return "ms200"; + case ms205: + return "ms205"; + case ms210: + return "ms210"; + case ms215: + return "ms215"; + case ms220: + return "ms220"; + case ms225: + return "ms225"; + case ms230: + return "ms230"; + case ms235: + return "ms235"; + case ms240: + return "ms240"; + case ms245: + return "ms245"; + case ms250: + return "ms250"; + case ms300: + return "ms300"; + case ms350: + return "ms350"; + case ms400: + return "ms400"; + case ms450: + return "ms450"; + case ms500: + return "ms500"; + case ms800_v1310: + return "ms800-v1310"; + case ms1000_v1310: + return "ms1000-v1310"; + case ms2000_v1310: + return "ms2000-v1310"; + case ms4000_v1310: + return "ms4000-v1310"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "t_poll_retx_e"); + } + return ""; +} +uint16_t t_poll_retx_e::to_number() const +{ + const static uint16_t options[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, + 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, + 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000}; + return get_enum_number(options, 59, value, "t_poll_retx_e"); +} + +// T-Reordering ::= ENUMERATED +std::string t_reordering_e::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms15: + return "ms15"; + case ms20: + return "ms20"; + case ms25: + return "ms25"; + case ms30: + return "ms30"; + case ms35: + return "ms35"; + case ms40: + return "ms40"; + case ms45: + return "ms45"; + case ms50: + return "ms50"; + case ms55: + return "ms55"; + case ms60: + return "ms60"; + case ms65: + return "ms65"; + case ms70: + return "ms70"; + case ms75: + return "ms75"; + case ms80: + return "ms80"; + case ms85: + return "ms85"; + case ms90: + return "ms90"; + case ms95: + return "ms95"; + case ms100: + return "ms100"; + case ms110: + return "ms110"; + case ms120: + return "ms120"; + case ms130: + return "ms130"; + case ms140: + return "ms140"; + case ms150: + return "ms150"; + case ms160: + return "ms160"; + case ms170: + return "ms170"; + case ms180: + return "ms180"; + case ms190: + return "ms190"; + case ms200: + return "ms200"; + case ms1600_v1310: + return "ms1600-v1310"; + default: + invalid_enum_value(value, "t_reordering_e"); + } + return ""; +} +uint16_t t_reordering_e::to_number() const +{ + const static uint16_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 1600}; + return get_enum_number(options, 32, value, "t_reordering_e"); +} + +// T-StatusProhibit ::= ENUMERATED +std::string t_status_prohibit_e::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms15: + return "ms15"; + case ms20: + return "ms20"; + case ms25: + return "ms25"; + case ms30: + return "ms30"; + case ms35: + return "ms35"; + case ms40: + return "ms40"; + case ms45: + return "ms45"; + case ms50: + return "ms50"; + case ms55: + return "ms55"; + case ms60: + return "ms60"; + case ms65: + return "ms65"; + case ms70: + return "ms70"; + case ms75: + return "ms75"; + case ms80: + return "ms80"; + case ms85: + return "ms85"; + case ms90: + return "ms90"; + case ms95: + return "ms95"; + case ms100: + return "ms100"; + case ms105: + return "ms105"; + case ms110: + return "ms110"; + case ms115: + return "ms115"; + case ms120: + return "ms120"; + case ms125: + return "ms125"; + case ms130: + return "ms130"; + case ms135: + return "ms135"; + case ms140: + return "ms140"; + case ms145: + return "ms145"; + case ms150: + return "ms150"; + case ms155: + return "ms155"; + case ms160: + return "ms160"; + case ms165: + return "ms165"; + case ms170: + return "ms170"; + case ms175: + return "ms175"; + case ms180: + return "ms180"; + case ms185: + return "ms185"; + case ms190: + return "ms190"; + case ms195: + return "ms195"; + case ms200: + return "ms200"; + case ms205: + return "ms205"; + case ms210: + return "ms210"; + case ms215: + return "ms215"; + case ms220: + return "ms220"; + case ms225: + return "ms225"; + case ms230: + return "ms230"; + case ms235: + return "ms235"; + case ms240: + return "ms240"; + case ms245: + return "ms245"; + case ms250: + return "ms250"; + case ms300: + return "ms300"; + case ms350: + return "ms350"; + case ms400: + return "ms400"; + case ms450: + return "ms450"; + case ms500: + return "ms500"; + case ms800_v1310: + return "ms800-v1310"; + case ms1000_v1310: + return "ms1000-v1310"; + case ms1200_v1310: + return "ms1200-v1310"; + case ms1600_v1310: + return "ms1600-v1310"; + case ms2000_v1310: + return "ms2000-v1310"; + case ms2400_v1310: + return "ms2400-v1310"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "t_status_prohibit_e"); + } + return ""; +} +uint16_t t_status_prohibit_e::to_number() const +{ + const static uint16_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, + 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, + 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400}; + return get_enum_number(options, 62, value, "t_status_prohibit_e"); +} + +std::string +cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_sf_set_ind_r12_e_::to_string() const +{ + switch (value) { + case s1: + return "s1"; + case s2: + return "s2"; + default: + invalid_enum_value( + value, "cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_sf_set_ind_r12_e_"); + } + return ""; +} +uint8_t +cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_sf_set_ind_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number( + options, 2, value, + "cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_sf_set_ind_r12_e_"); +} + +std::string cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types::to_string() const +{ + switch (value) { + case one_bit_r14: + return "oneBit-r14"; + case two_bit_r14: + return "twoBit-r14"; + case three_bit_r14: + return "threeBit-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types"); + } + return ""; +} +uint8_t cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types::to_number() const +{ + const static uint8_t options[] = {1, 2, 3}; + return get_enum_number(options, 3, value, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types"); +} + +std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_:: + csi_report_mode_r10_e_::to_string() const +{ + switch (value) { + case submode1: + return "submode1"; + case submode2: + return "submode2"; + default: + invalid_enum_value(value, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_" + "s_::csi_report_mode_r10_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_:: + csi_report_mode_r10_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_::" + "csi_report_mode_r10_e_"); +} + +std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_:: + periodicity_factor_r10_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_" + "s_::periodicity_factor_r10_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_:: + periodicity_factor_r10_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, + "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_::" + "periodicity_factor_r10_e_"); +} + +std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::types::to_string() const +{ + switch (value) { + case wideband_cqi_r10: + return "widebandCQI-r10"; + case subband_cqi_r10: + return "subbandCQI-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::types"); + } + return ""; +} + +std::string cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_"); +} + +std::string meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types::to_string() const +{ + switch (value) { + case sf_cfg1_minus5_r10: + return "subframeConfig1-5-r10"; + case sf_cfg0_r10: + return "subframeConfig0-r10"; + case sf_cfg6_r10: + return "subframeConfig6-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types"); + } + return ""; +} +uint8_t meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types::to_number() const +{ + const static uint8_t options[] = {1, 0, 6}; + return get_enum_number(options, 3, value, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types"); +} + +std::string meas_sf_pattern_r10_c::types::to_string() const +{ + switch (value) { + case sf_pattern_fdd_r10: + return "subframePatternFDD-r10"; + case sf_pattern_tdd_r10: + return "subframePatternTDD-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_sf_pattern_r10_c::types"); + } + return ""; +} + +// PollByte ::= ENUMERATED +std::string poll_byte_e::to_string() const +{ + switch (value) { + case kb25: + return "kB25"; + case kb50: + return "kB50"; + case kb75: + return "kB75"; + case kb100: + return "kB100"; + case kb125: + return "kB125"; + case kb250: + return "kB250"; + case kb375: + return "kB375"; + case kb500: + return "kB500"; + case kb750: + return "kB750"; + case kb1000: + return "kB1000"; + case kb1250: + return "kB1250"; + case kb1500: + return "kB1500"; + case kb2000: + return "kB2000"; + case kb3000: + return "kB3000"; + case kbinfinity: + return "kBinfinity"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "poll_byte_e"); + } + return ""; +} +int16_t poll_byte_e::to_number() const +{ + const static int16_t options[] = {25, 50, 75, 100, 125, 250, 375, 500, 750, 1000, 1250, 1500, 2000, 3000, -1}; + return get_enum_number(options, 15, value, "poll_byte_e"); +} + +// PollPDU ::= ENUMERATED +std::string poll_pdu_e::to_string() const +{ + switch (value) { + case p4: + return "p4"; + case p8: + return "p8"; + case p16: + return "p16"; + case p32: + return "p32"; + case p64: + return "p64"; + case p128: + return "p128"; + case p256: + return "p256"; + case p_infinity: + return "pInfinity"; + default: + invalid_enum_value(value, "poll_pdu_e"); + } + return ""; +} +int16_t poll_pdu_e::to_number() const +{ + const static int16_t options[] = {4, 8, 16, 32, 64, 128, 256, -1}; + return get_enum_number(options, 8, value, "poll_pdu_e"); +} + +std::string spdcch_elems_r15_c::setup_s_::spdcch_set_ref_sig_r15_e_::to_string() const +{ + switch (value) { + case crs: + return "crs"; + case dmrs: + return "dmrs"; + default: + invalid_enum_value(value, "spdcch_elems_r15_c::setup_s_::spdcch_set_ref_sig_r15_e_"); + } + return ""; +} + +std::string spdcch_elems_r15_c::setup_s_::tx_type_r15_e_::to_string() const +{ + switch (value) { + case localised: + return "localised"; + case distributed: + return "distributed"; + default: + invalid_enum_value(value, "spdcch_elems_r15_c::setup_s_::tx_type_r15_e_"); + } + return ""; +} + +std::string spdcch_elems_r15_c::setup_s_::sf_type_r15_e_::to_string() const +{ + switch (value) { + case mbsfn: + return "mbsfn"; + case nonmbsfn: + return "nonmbsfn"; + case all: + return "all"; + default: + invalid_enum_value(value, "spdcch_elems_r15_c::setup_s_::sf_type_r15_e_"); + } + return ""; +} + +std::string spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_::to_string() const +{ + switch (value) { + case m1: + return "m1"; + case m2: + return "m2"; + case m3: + return "m3"; + case m4: + return "m4"; + default: + invalid_enum_value(value, "spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_"); + } + return ""; +} +uint8_t spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4}; + return get_enum_number(options, 4, value, "spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_"); +} + +std::string tpc_idx_c::types::to_string() const +{ + switch (value) { + case idx_of_format3: + return "indexOfFormat3"; + case idx_of_format3_a: + return "indexOfFormat3A"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "tpc_idx_c::types"); + } + return ""; +} + +std::string ul_am_rlc_r15_s::max_retx_thres_r15_e_::to_string() const +{ + switch (value) { + case t1: + return "t1"; + case t2: + return "t2"; + case t3: + return "t3"; + case t4: + return "t4"; + case t6: + return "t6"; + case t8: + return "t8"; + case t16: + return "t16"; + case t32: + return "t32"; + default: + invalid_enum_value(value, "ul_am_rlc_r15_s::max_retx_thres_r15_e_"); + } + return ""; +} +uint8_t ul_am_rlc_r15_s::max_retx_thres_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return get_enum_number(options, 8, value, "ul_am_rlc_r15_s::max_retx_thres_r15_e_"); +} + +std::string cqi_report_cfg_v1250_s::alt_cqi_table_r12_e_::to_string() const +{ + switch (value) { + case all_sfs: + return "allSubframes"; + case csi_sf_set1: + return "csi-SubframeSet1"; + case csi_sf_set2: + return "csi-SubframeSet2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "cqi_report_cfg_v1250_s::alt_cqi_table_r12_e_"); + } + return ""; +} +uint8_t cqi_report_cfg_v1250_s::alt_cqi_table_r12_e_::to_number() const +{ + switch (value) { + case csi_sf_set1: + return 1; + case csi_sf_set2: + return 2; + default: + invalid_enum_number(value, "cqi_report_cfg_v1250_s::alt_cqi_table_r12_e_"); + } + return 0; +} + +std::string csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_::to_string() const +{ + switch (value) { + case an1: + return "an1"; + case an2: + return "an2"; + case an4: + return "an4"; + case an8: + return "an8"; + default: + invalid_enum_value(value, "csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_"); + } + return ""; +} +uint8_t csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number(options, 4, value, "csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_"); +} + +std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_e_"); +} + +std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_e_"); +} + +std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_e_"); +} + +std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_e_"); +} + +std::string epdcch_set_cfg_r11_s::tx_type_r11_e_::to_string() const +{ + switch (value) { + case localised: + return "localised"; + case distributed: + return "distributed"; + default: + invalid_enum_value(value, "epdcch_set_cfg_r11_s::tx_type_r11_e_"); + } + return ""; +} + +std::string epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + case n8: + return "n8"; + default: + invalid_enum_value(value, "epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_"); + } + return ""; +} +uint8_t epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8}; + return get_enum_number(options, 3, value, "epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_"); +} + +std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_e_::to_string() const +{ + switch (value) { + case sf1: + return "sf1"; + case sf2: + return "sf2"; + case sf4: + return "sf4"; + case sf8: + return "sf8"; + case sf16: + return "sf16"; + case sf32: + return "sf32"; + default: + invalid_enum_value(value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_e_"); + } + return ""; +} +uint8_t epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return get_enum_number(options, 6, value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_e_"); +} + +std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_pdsch_hop_cfg_r13_e_::to_string() const +{ + switch (value) { + case on: + return "on"; + case off: + return "off"; + default: + invalid_enum_value(value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_pdsch_hop_cfg_r13_e_"); + } + return ""; +} + +std::string +epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v1dot5: + return "v1dot5"; + case v2: + return "v2"; + case v2dot5: + return "v2dot5"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + default: + invalid_enum_value(value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_"); + } + return ""; +} +float epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_::to_number() const +{ + const static float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return get_enum_number(options, 8, value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_"); +} +std::string +epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_::to_number_string() const +{ + switch (value) { + case v1: + return "1"; + case v1dot5: + return "1.5"; + case v2: + return "2"; + case v2dot5: + return "2.5"; + case v4: + return "4"; + case v5: + return "5"; + case v8: + return "8"; + case v10: + return "10"; + default: + invalid_enum_number(value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_"); + } + return ""; +} + +std::string +epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v2: + return "v2"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + case v20: + return "v20"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_e_"); + } + return ""; +} +uint8_t epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return get_enum_number(options, 7, value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_e_"); +} + +std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::types::to_string() const +{ + switch (value) { + case fdd_r13: + return "fdd-r13"; + case tdd_r13: + return "tdd-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::types"); + } + return ""; +} + +std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case r128: + return "r128"; + case r256: + return "r256"; + default: + invalid_enum_value(value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_e_"); + } + return ""; +} +uint16_t epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 9, value, + "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_e_"); +} + +std::string enable256_qam_r14_c::setup_c_::types::to_string() const +{ + switch (value) { + case tpc_sf_set_cfgured_r14: + return "tpc-SubframeSet-Configured-r14"; + case tpc_sf_set_not_cfgured_r14: + return "tpc-SubframeSet-NotConfigured-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "enable256_qam_r14_c::setup_c_::types"); + } + return ""; +} + +std::string lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_::to_string() const +{ + switch (value) { + case kbps0: + return "kBps0"; + case kbps8: + return "kBps8"; + case kbps16: + return "kBps16"; + case kbps32: + return "kBps32"; + case kbps64: + return "kBps64"; + case kbps128: + return "kBps128"; + case kbps256: + return "kBps256"; + case infinity: + return "infinity"; + case kbps512_v1020: + return "kBps512-v1020"; + case kbps1024_v1020: + return "kBps1024-v1020"; + case kbps2048_v1020: + return "kBps2048-v1020"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); + } + return ""; +} +int16_t lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_::to_number() const +{ + const static int16_t options[] = {0, 8, 16, 32, 64, 128, 256, -1, 512, 1024, 2048}; + return get_enum_number(options, 11, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); +} + +std::string lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_::to_string() const +{ + switch (value) { + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms300: + return "ms300"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); + } + return ""; +} +uint16_t lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_::to_number() const +{ + const static uint16_t options[] = {50, 100, 150, 300, 500, 1000}; + return get_enum_number(options, 6, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); +} + +std::string lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s0dot4: + return "s0dot4"; + case s0dot8: + return "s0dot8"; + case s1dot6: + return "s1dot6"; + case s3: + return "s3"; + case s6: + return "s6"; + case s12: + return "s12"; + case s30: + return "s30"; + default: + invalid_enum_value(value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); + } + return ""; +} +float lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return get_enum_number(options, 8, value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); +} +std::string lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_::to_number_string() const +{ + switch (value) { + case s0: + return "0"; + case s0dot4: + return "0.4"; + case s0dot8: + return "0.8"; + case s1dot6: + return "1.6"; + case s3: + return "3"; + case s6: + return "6"; + case s12: + return "12"; + case s30: + return "30"; + default: + invalid_enum_number(value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); + } + return ""; +} + +std::string lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_e_::to_string() const +{ + switch (value) { + case spucch: + return "spucch"; + case pucch: + return "pucch"; + default: + invalid_enum_value(value, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_e_"); + } + return ""; +} + +// P-a ::= ENUMERATED +std::string p_a_e::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4dot77: + return "dB-4dot77"; + case db_minus3: + return "dB-3"; + case db_minus1dot77: + return "dB-1dot77"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + default: + invalid_enum_value(value, "p_a_e"); + } + return ""; +} +float p_a_e::to_number() const +{ + const static float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return get_enum_number(options, 8, value, "p_a_e"); +} +std::string p_a_e::to_number_string() const +{ + switch (value) { + case db_minus6: + return "-6"; + case db_minus4dot77: + return "-4.77"; + case db_minus3: + return "-3"; + case db_minus1dot77: + return "-1.77"; + case db0: + return "0"; + case db1: + return "1"; + case db2: + return "2"; + case db3: + return "3"; + default: + invalid_enum_number(value, "p_a_e"); + } + return ""; +} + +std::string pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_e_"); + } + return ""; +} +uint8_t pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, + "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_e_"); +} + +std::string pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r11_e_::to_string() const +{ + switch (value) { + case reserved: + return "reserved"; + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case assigned: + return "assigned"; + default: + invalid_enum_value(value, "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r11_e_"); + } + return ""; +} +uint8_t pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r11_e_::to_number() const +{ + switch (value) { + case n1: + return 1; + case n2: + return 2; + case n3: + return 3; + case n4: + return 4; + default: + invalid_enum_number(value, "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r11_e_"); + } + return 0; +} + +std::string pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, + "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_e_"); + } + return ""; +} +uint8_t pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, + "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_e_"); +} + +std::string pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_start_v1530_e_::to_string() const +{ + switch (value) { + case reserved: + return "reserved"; + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case assigned: + return "assigned"; + default: + invalid_enum_value(value, + "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_start_v1530_e_"); + } + return ""; +} +uint8_t pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_start_v1530_e_::to_number() const +{ + switch (value) { + case n1: + return 1; + case n2: + return 2; + case n3: + return 3; + case n4: + return 4; + default: + invalid_enum_number(value, + "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_start_v1530_e_"); + } + return 0; +} + +// PollPDU-v1310 ::= ENUMERATED +std::string poll_pdu_v1310_e::to_string() const +{ + switch (value) { + case p512: + return "p512"; + case p1024: + return "p1024"; + case p2048: + return "p2048"; + case p4096: + return "p4096"; + case p6144: + return "p6144"; + case p8192: + return "p8192"; + case p12288: + return "p12288"; + case p16384: + return "p16384"; + default: + invalid_enum_value(value, "poll_pdu_v1310_e"); + } + return ""; +} +uint16_t poll_pdu_v1310_e::to_number() const +{ + const static uint16_t options[] = {512, 1024, 2048, 4096, 6144, 8192, 12288, 16384}; + return get_enum_number(options, 8, value, "poll_pdu_v1310_e"); +} + +std::string rlc_cfg_r15_s::mode_r15_c_::types::to_string() const +{ + switch (value) { + case am_r15: + return "am-r15"; + case um_bi_dir_r15: + return "um-Bi-Directional-r15"; + case um_uni_dir_ul_r15: + return "um-Uni-Directional-UL-r15"; + case um_uni_dir_dl_r15: + return "um-Uni-Directional-DL-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rlc_cfg_r15_s::mode_r15_c_::types"); + } + return ""; +} + +// SRS-AntennaPort ::= ENUMERATED +std::string srs_ant_port_e::to_string() const +{ + switch (value) { + case an1: + return "an1"; + case an2: + return "an2"; + case an4: + return "an4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "srs_ant_port_e"); + } + return ""; +} +uint8_t srs_ant_port_e::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "srs_ant_port_e"); +} + +// ShortTTI-Length-r15 ::= ENUMERATED +std::string short_tti_len_r15_e::to_string() const +{ + switch (value) { + case slot: + return "slot"; + case subslot: + return "subslot"; + default: + invalid_enum_value(value, "short_tti_len_r15_e"); + } + return ""; +} + +std::string ul_am_rlc_s::max_retx_thres_e_::to_string() const +{ + switch (value) { + case t1: + return "t1"; + case t2: + return "t2"; + case t3: + return "t3"; + case t4: + return "t4"; + case t6: + return "t6"; + case t8: + return "t8"; + case t16: + return "t16"; + case t32: + return "t32"; + default: + invalid_enum_value(value, "ul_am_rlc_s::max_retx_thres_e_"); + } + return ""; +} +uint8_t ul_am_rlc_s::max_retx_thres_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return get_enum_number(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); +} + +std::string ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_::to_string() const +{ + switch (value) { + case tm9: + return "tm9"; + case tm10: + return "tm10"; + default: + invalid_enum_value(value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_"); + } + return ""; +} +uint8_t ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_::to_number() const +{ + const static uint8_t options[] = {9, 10}; + return get_enum_number(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_"); +} + +std::string ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_::to_string() const +{ + switch (value) { + case tm1: + return "tm1"; + case tm2: + return "tm2"; + case tm3: + return "tm3"; + case tm4: + return "tm4"; + case tm6: + return "tm6"; + case tm8: + return "tm8"; + case tm9: + return "tm9"; + case tm10: + return "tm10"; + default: + invalid_enum_value(value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_"); + } + return ""; +} +uint8_t ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 9, 10}; + return get_enum_number(options, 8, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_"); +} + +std::string ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::types::to_string() const +{ + switch (value) { + case n2_tx_ant_tm3_r15: + return "n2TxAntenna-tm3-r15"; + case n4_tx_ant_tm3_r15: + return "n4TxAntenna-tm3-r15"; + case n2_tx_ant_tm4_r15: + return "n2TxAntenna-tm4-r15"; + case n4_tx_ant_tm4_r15: + return "n4TxAntenna-tm4-r15"; + case n2_tx_ant_tm5_r15: + return "n2TxAntenna-tm5-r15"; + case n4_tx_ant_tm5_r15: + return "n4TxAntenna-tm5-r15"; + case n2_tx_ant_tm6_r15: + return "n2TxAntenna-tm6-r15"; + case n4_tx_ant_tm6_r15: + return "n4TxAntenna-tm6-r15"; + case n2_tx_ant_tm8_r15: + return "n2TxAntenna-tm8-r15"; + case n4_tx_ant_tm8_r15: + return "n4TxAntenna-tm8-r15"; + case n2_tx_ant_tm9and10_r15: + return "n2TxAntenna-tm9and10-r15"; + case n4_tx_ant_tm9and10_r15: + return "n4TxAntenna-tm9and10-r15"; + case n8_tx_ant_tm9and10_r15: + return "n8TxAntenna-tm9and10-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::types"); + } + return ""; +} + +std::string ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_::to_string() const +{ + switch (value) { + case two_layers: + return "twoLayers"; + case four_layers: + return "fourLayers"; + default: + invalid_enum_value(value, "ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_"); + } + return ""; +} +uint8_t ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_"); +} + +std::string ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_::to_string() const +{ + switch (value) { + case tm1: + return "tm1"; + case tm2: + return "tm2"; + default: + invalid_enum_value(value, "ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_"); + } + return ""; +} +uint8_t ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_"); +} + +std::string cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_e_::to_string() const +{ + switch (value) { + case all_sfs: + return "allSubframes"; + case csi_sf_set1: + return "csi-SubframeSet1"; + case csi_sf_set2: + return "csi-SubframeSet2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_e_"); + } + return ""; +} +uint8_t cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_e_::to_number() const +{ + switch (value) { + case csi_sf_set1: + return 1; + case csi_sf_set2: + return 2; + default: + invalid_enum_number(value, "cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_e_"); + } + return 0; +} + +std::string cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types::to_string() const +{ + switch (value) { + case wideband_cqi: + return "widebandCQI"; + case subband_cqi: + return "subbandCQI"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types"); + } + return ""; +} + +std::string crs_assist_info_r11_s::ant_ports_count_r11_e_::to_string() const +{ + switch (value) { + case an1: + return "an1"; + case an2: + return "an2"; + case an4: + return "an4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "crs_assist_info_r11_s::ant_ports_count_r11_e_"); + } + return ""; +} +uint8_t crs_assist_info_r11_s::ant_ports_count_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "crs_assist_info_r11_s::ant_ports_count_r11_e_"); +} + +std::string crs_assist_info_r13_s::ant_ports_count_r13_e_::to_string() const +{ + switch (value) { + case an1: + return "an1"; + case an2: + return "an2"; + case an4: + return "an4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "crs_assist_info_r13_s::ant_ports_count_r13_e_"); + } + return ""; +} +uint8_t crs_assist_info_r13_s::ant_ports_count_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "crs_assist_info_r13_s::ant_ports_count_r13_e_"); +} + +std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_e_"); +} + +std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_e_"); +} + +std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_e_"); +} + +std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus2: + return "dB-2"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_e_::to_number() const +{ + const static int8_t options[] = {0, -2}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_e_"); +} + +std::string delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db_minus1: + return "dB-1"; + default: + invalid_enum_value(value, "delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_e_"); + } + return ""; +} +int8_t delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_e_::to_number() const +{ + const static int8_t options[] = {0, -1}; + return get_enum_number(options, 2, value, + "delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_e_"); +} + +std::string eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf40: + return "sf40"; + case sf80: + return "sf80"; + default: + invalid_enum_value(value, "eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_"); + } + return ""; +} +uint8_t eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_::to_number() const +{ + const static uint8_t options[] = {10, 20, 40, 80}; + return get_enum_number(options, 4, value, "eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_"); +} + +std::string eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_::to_string() const +{ + switch (value) { + case sa2: + return "sa2"; + case sa4: + return "sa4"; + case sa5: + return "sa5"; + default: + invalid_enum_value(value, "eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_"); + } + return ""; +} +uint8_t eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 5}; + return get_enum_number(options, 3, value, "eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_"); +} + +std::string neigh_cells_info_r12_s::crs_ports_count_r12_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n4: + return "n4"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "neigh_cells_info_r12_s::crs_ports_count_r12_e_"); + } + return ""; +} +uint8_t neigh_cells_info_r12_s::crs_ports_count_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "neigh_cells_info_r12_s::crs_ports_count_r12_e_"); +} + +// PDCCH-CandidateReductionValue-r13 ::= ENUMERATED +std::string pdcch_candidate_reduction_value_r13_e::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n33: + return "n33"; + case n66: + return "n66"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "pdcch_candidate_reduction_value_r13_e"); + } + return ""; +} +uint8_t pdcch_candidate_reduction_value_r13_e::to_number() const +{ + const static uint8_t options[] = {0, 33, 66, 100}; + return get_enum_number(options, 4, value, "pdcch_candidate_reduction_value_r13_e"); +} + +std::string pdcp_cfg_s::discard_timer_e_::to_string() const +{ + switch (value) { + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms300: + return "ms300"; + case ms500: + return "ms500"; + case ms750: + return "ms750"; + case ms1500: + return "ms1500"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "pdcp_cfg_s::discard_timer_e_"); + } + return ""; +} +int16_t pdcp_cfg_s::discard_timer_e_::to_number() const +{ + const static int16_t options[] = {50, 100, 150, 300, 500, 750, 1500, -1}; + return get_enum_number(options, 8, value, "pdcp_cfg_s::discard_timer_e_"); +} + +std::string pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::to_string() const +{ + switch (value) { + case len7bits: + return "len7bits"; + case len12bits: + return "len12bits"; + default: + invalid_enum_value(value, "pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_"); + } + return ""; +} +uint8_t pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::to_number() const +{ + const static uint8_t options[] = {7, 12}; + return get_enum_number(options, 2, value, "pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_"); +} + +std::string pdcp_cfg_s::hdr_compress_c_::types::to_string() const +{ + switch (value) { + case not_used: + return "notUsed"; + case rohc: + return "rohc"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pdcp_cfg_s::hdr_compress_c_::types"); + } + return ""; +} + +std::string pdcp_cfg_s::t_reordering_r12_e_::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms20: + return "ms20"; + case ms40: + return "ms40"; + case ms60: + return "ms60"; + case ms80: + return "ms80"; + case ms100: + return "ms100"; + case ms120: + return "ms120"; + case ms140: + return "ms140"; + case ms160: + return "ms160"; + case ms180: + return "ms180"; + case ms200: + return "ms200"; + case ms220: + return "ms220"; + case ms240: + return "ms240"; + case ms260: + return "ms260"; + case ms280: + return "ms280"; + case ms300: + return "ms300"; + case ms500: + return "ms500"; + case ms750: + return "ms750"; + case spare14: + return "spare14"; + case spare13: + return "spare13"; + case spare12: + return "spare12"; + case spare11: + return "spare11"; + case spare10: + return "spare10"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdcp_cfg_s::t_reordering_r12_e_"); + } + return ""; +} +uint16_t pdcp_cfg_s::t_reordering_r12_e_::to_number() const +{ + const static uint16_t options[] = {0, 20, 40, 60, 80, 100, 120, 140, 160, + 180, 200, 220, 240, 260, 280, 300, 500, 750}; + return get_enum_number(options, 18, value, "pdcp_cfg_s::t_reordering_r12_e_"); +} + +std::string pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_::to_string() const +{ + switch (value) { + case b0: + return "b0"; + case b100: + return "b100"; + case b200: + return "b200"; + case b400: + return "b400"; + case b800: + return "b800"; + case b1600: + return "b1600"; + case b3200: + return "b3200"; + case b6400: + return "b6400"; + case b12800: + return "b12800"; + case b25600: + return "b25600"; + case b51200: + return "b51200"; + case b102400: + return "b102400"; + case b204800: + return "b204800"; + case b409600: + return "b409600"; + case b819200: + return "b819200"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_"); + } + return ""; +} +uint32_t pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_::to_number() const +{ + const static uint32_t options[] = {0, 100, 200, 400, 800, 1600, 3200, 6400, + 12800, 25600, 51200, 102400, 204800, 409600, 819200}; + return get_enum_number(options, 15, value, "pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_"); +} + +std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_e_::to_string() const +{ + switch (value) { + case type1: + return "type1"; + case type2: + return "type2"; + default: + invalid_enum_value(value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_e_"); + } + return ""; +} +uint8_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_e_"); +} + +std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_e_::to_string() const +{ + switch (value) { + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms20: + return "ms20"; + case ms30: + return "ms30"; + case ms40: + return "ms40"; + case ms50: + return "ms50"; + case ms60: + return "ms60"; + case ms70: + return "ms70"; + case ms80: + return "ms80"; + case ms90: + return "ms90"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + case ms5000: + return "ms5000"; + case ms10000: + return "ms10000"; + case ms20000: + return "ms20000"; + case ms50000: + return "ms50000"; + default: + invalid_enum_value(value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_e_"); + } + return ""; +} +uint16_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_e_::to_number() const +{ + const static uint16_t options[] = {5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, + 150, 200, 300, 500, 1000, 2000, 5000, 10000, 20000, 50000}; + return get_enum_number(options, 21, value, + "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_e_"); +} + +std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_e_::to_string() const +{ + switch (value) { + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms20: + return "ms20"; + case ms30: + return "ms30"; + case ms40: + return "ms40"; + case ms50: + return "ms50"; + case ms60: + return "ms60"; + case ms70: + return "ms70"; + case ms80: + return "ms80"; + case ms90: + return "ms90"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + case ms5000: + return "ms5000"; + case ms10000: + return "ms10000"; + case ms20000: + return "ms20000"; + case ms50000: + return "ms50000"; + default: + invalid_enum_value(value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_e_"); + } + return ""; +} +uint16_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_e_::to_number() const +{ + const static uint16_t options[] = {5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, + 150, 200, 300, 500, 1000, 2000, 5000, 10000, 20000, 50000}; + return get_enum_number(options, 21, value, + "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_e_"); +} + +std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_e_::to_string() const +{ + switch (value) { + case ms1: + return "ms1"; + case ms2: + return "ms2"; + case ms5: + return "ms5"; + case ms10: + return "ms10"; + case ms25: + return "ms25"; + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms250: + return "ms250"; + case ms500: + return "ms500"; + case ms2500: + return "ms2500"; + case ms5000: + return "ms5000"; + case ms25000: + return "ms25000"; + default: + invalid_enum_value(value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_e_"); + } + return ""; +} +uint16_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 5, 10, 25, 50, 100, 250, 500, 2500, 5000, 25000}; + return get_enum_number(options, 12, value, + "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_e_"); +} + +std::string pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_::to_string() const +{ + switch (value) { + case b0: + return "b0"; + case b100: + return "b100"; + case b200: + return "b200"; + case b400: + return "b400"; + case b800: + return "b800"; + case b1600: + return "b1600"; + case b3200: + return "b3200"; + case b6400: + return "b6400"; + case b12800: + return "b12800"; + case b25600: + return "b25600"; + case b51200: + return "b51200"; + case b102400: + return "b102400"; + case b204800: + return "b204800"; + case b409600: + return "b409600"; + case b819200: + return "b819200"; + default: + invalid_enum_value(value, "pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_"); + } + return ""; +} +uint32_t pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_::to_number() const +{ + const static uint32_t options[] = {0, 100, 200, 400, 800, 1600, 3200, 6400, + 12800, 25600, 51200, 102400, 204800, 409600, 819200}; + return get_enum_number(options, 15, value, "pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_"); +} + +std::string pdcp_cfg_s::ul_only_hdr_compress_r14_c_::types::to_string() const +{ + switch (value) { + case not_used_r14: + return "notUsed-r14"; + case rohc_r14: + return "rohc-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pdcp_cfg_s::ul_only_hdr_compress_r14_c_::types"); + } + return ""; +} + +std::string pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_::to_string() const +{ + switch (value) { + case kbyte2: + return "kbyte2"; + case kbyte4: + return "kbyte4"; + case kbyte8: + return "kbyte8"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_"); + } + return ""; +} +uint8_t pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8}; + return get_enum_number(options, 3, value, "pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_"); +} + +std::string pdcp_cfg_s::ul_data_compress_r15_s_::dictionary_r15_e_::to_string() const +{ + switch (value) { + case sip_sdp: + return "sip-SDP"; + case operator_type: + return "operator"; + default: + invalid_enum_value(value, "pdcp_cfg_s::ul_data_compress_r15_s_::dictionary_r15_e_"); + } + return ""; +} + +std::string pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::setup_s_::pdcp_dupl_r15_e_::to_string() const +{ + switch (value) { + case cfgured: + return "configured"; + case activ: + return "activated"; + default: + invalid_enum_value(value, "pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::setup_s_::pdcp_dupl_r15_e_"); + } + return ""; +} + +std::string pucch_cfg_ded_v1530_s::codebooksize_determination_stti_r15_e_::to_string() const +{ + switch (value) { + case dai: + return "dai"; + case cc: + return "cc"; + default: + invalid_enum_value(value, "pucch_cfg_ded_v1530_s::codebooksize_determination_stti_r15_e_"); + } + return ""; +} + +std::string rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::types::to_string() const +{ + switch (value) { + case lc_ch_id_r15: + return "logicalChannelIdentity-r15"; + case lc_ch_id_ext_r15: + return "logicalChannelIdentityExt-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::types"); + } + return ""; +} + +std::string rlc_cfg_c::types::to_string() const +{ + switch (value) { + case am: + return "am"; + case um_bi_dir: + return "um-Bi-Directional"; + case um_uni_dir_ul: + return "um-Uni-Directional-UL"; + case um_uni_dir_dl: + return "um-Uni-Directional-DL"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rlc_cfg_c::types"); + } + return ""; +} + +std::string spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + case n2: + return "n2"; + default: + invalid_enum_value(value, "spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_"); + } + return ""; +} +uint8_t spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2}; + return get_enum_number(options, 3, value, "spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_"); +} + +std::string sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_::to_string() const +{ + switch (value) { + case sf20: + return "sf20"; + case sf50: + return "sf50"; + case sf100: + return "sf100"; + case sf200: + return "sf200"; + case sf300: + return "sf300"; + case sf400: + return "sf400"; + case sf500: + return "sf500"; + case sf600: + return "sf600"; + case sf700: + return "sf700"; + case sf800: + return "sf800"; + case sf900: + return "sf900"; + case sf1000: + return "sf1000"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_"); + } + return ""; +} +uint16_t sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_::to_number() const +{ + const static uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return get_enum_number(options, 12, value, "sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_"); +} + +std::string sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf320: + return "sf320"; + case sf640: + return "sf640"; + case sf1_v1430: + return "sf1-v1430"; + case sf2_v1430: + return "sf2-v1430"; + case sf3_v1430: + return "sf3-v1430"; + case sf4_v1430: + return "sf4-v1430"; + case sf5_v1430: + return "sf5-v1430"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_"); + } + return ""; +} +uint16_t sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_::to_number() const +{ + const static uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1, 2, 3, 4, 5}; + return get_enum_number(options, 15, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_"); +} + +std::string sps_cfg_ul_c::setup_s_::implicit_release_after_e_::to_string() const +{ + switch (value) { + case e2: + return "e2"; + case e3: + return "e3"; + case e4: + return "e4"; + case e8: + return "e8"; + default: + invalid_enum_value(value, "sps_cfg_ul_c::setup_s_::implicit_release_after_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_c::setup_s_::implicit_release_after_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4, 8}; + return get_enum_number(options, 4, value, "sps_cfg_ul_c::setup_s_::implicit_release_after_e_"); +} + +std::string sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_::to_string() const +{ + switch (value) { + case sf50: + return "sf50"; + case sf100: + return "sf100"; + case sf200: + return "sf200"; + case sf300: + return "sf300"; + case sf400: + return "sf400"; + case sf500: + return "sf500"; + case sf600: + return "sf600"; + case sf700: + return "sf700"; + case sf800: + return "sf800"; + case sf900: + return "sf900"; + case sf1000: + return "sf1000"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_"); + } + return ""; +} +uint16_t sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_::to_number() const +{ + const static uint16_t options[] = {50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return get_enum_number(options, 11, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_"); +} + +std::string sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_::to_string() const +{ + switch (value) { + case cs0: + return "cs0"; + case cs1: + return "cs1"; + case cs2: + return "cs2"; + case cs3: + return "cs3"; + case cs4: + return "cs4"; + case cs5: + return "cs5"; + case cs6: + return "cs6"; + case cs7: + return "cs7"; + default: + invalid_enum_value(value, "sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return get_enum_number(options, 8, value, "sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_"); +} + +std::string sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_::to_string() const +{ + switch (value) { + case ulrvseq1: + return "ulrvseq1"; + case ulrvseq2: + return "ulrvseq2"; + case ulrvseq3: + return "ulrvseq3"; + default: + invalid_enum_value(value, "sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3}; + return get_enum_number(options, 3, value, "sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_"); +} + +std::string sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n6: + return "n6"; + default: + invalid_enum_value(value, "sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4, 6}; + return get_enum_number(options, 4, value, "sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_"); +} + +std::string sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_e_::to_string() const +{ + switch (value) { + case s_tti1: + return "sTTI1"; + case s_tti2: + return "sTTI2"; + case s_tti3: + return "sTTI3"; + case s_tti4: + return "sTTI4"; + case s_tti6: + return "sTTI6"; + case s_tti8: + return "sTTI8"; + case s_tti12: + return "sTTI12"; + case s_tti16: + return "sTTI16"; + case s_tti20: + return "sTTI20"; + case s_tti40: + return "sTTI40"; + case s_tti60: + return "sTTI60"; + case s_tti80: + return "sTTI80"; + case s_tti120: + return "sTTI120"; + case s_tti240: + return "sTTI240"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 12, 16, 20, 40, 60, 80, 120, 240}; + return get_enum_number(options, 14, value, + "sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_e_"); +} + +std::string sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_::to_string() const +{ + switch (value) { + case e2: + return "e2"; + case e3: + return "e3"; + case e4: + return "e4"; + case e8: + return "e8"; + default: + invalid_enum_value(value, "sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4, 8}; + return get_enum_number(options, 4, value, "sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_"); +} + +std::string sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_::to_string() const +{ + switch (value) { + case cs0: + return "cs0"; + case cs1: + return "cs1"; + case cs2: + return "cs2"; + case cs3: + return "cs3"; + case cs4: + return "cs4"; + case cs5: + return "cs5"; + case cs6: + return "cs6"; + case cs7: + return "cs7"; + default: + invalid_enum_value(value, "sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return get_enum_number(options, 8, value, "sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_"); +} + +std::string sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_::to_string() const +{ + switch (value) { + case ulrvseq1: + return "ulrvseq1"; + case ulrvseq2: + return "ulrvseq2"; + case ulrvseq3: + return "ulrvseq3"; + default: + invalid_enum_value(value, "sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3}; + return get_enum_number(options, 3, value, "sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_"); +} + +std::string sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n12: + return "n12"; + default: + invalid_enum_value(value, "sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {6, 12}; + return get_enum_number(options, 2, value, + "sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_"); +} + +std::string sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n6: + return "n6"; + default: + invalid_enum_value(value, "sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4, 6}; + return get_enum_number(options, 4, value, + "sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_e_"); +} + +std::string srs_cfg_ap_r10_s::srs_bw_ap_r10_e_::to_string() const +{ + switch (value) { + case bw0: + return "bw0"; + case bw1: + return "bw1"; + case bw2: + return "bw2"; + case bw3: + return "bw3"; + default: + invalid_enum_value(value, "srs_cfg_ap_r10_s::srs_bw_ap_r10_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_r10_s::srs_bw_ap_r10_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "srs_cfg_ap_r10_s::srs_bw_ap_r10_e_"); +} + +std::string srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_::to_string() const +{ + switch (value) { + case cs0: + return "cs0"; + case cs1: + return "cs1"; + case cs2: + return "cs2"; + case cs3: + return "cs3"; + case cs4: + return "cs4"; + case cs5: + return "cs5"; + case cs6: + return "cs6"; + case cs7: + return "cs7"; + default: + invalid_enum_value(value, "srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return get_enum_number(options, 8, value, "srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_"); +} + +std::string srs_cfg_ap_r13_s::srs_bw_ap_r13_e_::to_string() const +{ + switch (value) { + case bw0: + return "bw0"; + case bw1: + return "bw1"; + case bw2: + return "bw2"; + case bw3: + return "bw3"; + default: + invalid_enum_value(value, "srs_cfg_ap_r13_s::srs_bw_ap_r13_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_r13_s::srs_bw_ap_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "srs_cfg_ap_r13_s::srs_bw_ap_r13_e_"); +} + +std::string srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_::to_string() const +{ + switch (value) { + case cs0: + return "cs0"; + case cs1: + return "cs1"; + case cs2: + return "cs2"; + case cs3: + return "cs3"; + case cs4: + return "cs4"; + case cs5: + return "cs5"; + case cs6: + return "cs6"; + case cs7: + return "cs7"; + case cs8: + return "cs8"; + case cs9: + return "cs9"; + case cs10: + return "cs10"; + case cs11: + return "cs11"; + default: + invalid_enum_value(value, "srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + return get_enum_number(options, 12, value, "srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_"); +} + +std::string srs_cfg_ap_r13_s::tx_comb_num_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "srs_cfg_ap_r13_s::tx_comb_num_r13_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_r13_s::tx_comb_num_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "srs_cfg_ap_r13_s::tx_comb_num_r13_e_"); +} + +std::string srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_::to_string() const +{ + switch (value) { + case cs8: + return "cs8"; + case cs9: + return "cs9"; + case cs10: + return "cs10"; + case cs11: + return "cs11"; + default: + invalid_enum_value(value, "srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_::to_number() const +{ + const static uint8_t options[] = {8, 9, 10, 11}; + return get_enum_number(options, 4, value, "srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_"); +} + +std::string srs_cfg_ap_v1310_s::tx_comb_num_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "srs_cfg_ap_v1310_s::tx_comb_num_r13_e_"); + } + return ""; +} +uint8_t srs_cfg_ap_v1310_s::tx_comb_num_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "srs_cfg_ap_v1310_s::tx_comb_num_r13_e_"); +} + +std::string sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + case n64: + return "n64"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_"); + } + return ""; +} +uint8_t sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 16, 32, 64}; + return get_enum_number(options, 5, value, "sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_"); +} + +std::string slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_e_::to_string() const +{ + switch (value) { + case all_sfs: + return "allSubframes"; + case csi_sf_set1: + return "csi-SubframeSet1"; + case csi_sf_set2: + return "csi-SubframeSet2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_e_"); + } + return ""; +} +uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_e_::to_number() const +{ + switch (value) { + case csi_sf_set1: + return 1; + case csi_sf_set2: + return 2; + default: + invalid_enum_number(value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_e_"); + } + return 0; +} + +std::string slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r15_e_::to_string() const +{ + switch (value) { + case all_sfs: + return "allSubframes"; + case csi_sf_set1: + return "csi-SubframeSet1"; + case csi_sf_set2: + return "csi-SubframeSet2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r15_e_"); + } + return ""; +} +uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r15_e_::to_number() const +{ + switch (value) { + case csi_sf_set1: + return 1; + case csi_sf_set2: + return 2; + default: + invalid_enum_number(value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r15_e_"); + } + return 0; +} + +std::string slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_::to_string() const +{ + switch (value) { + case res_alloc_type0: + return "resourceAllocationType0"; + case res_alloc_type2: + return "resourceAllocationType2"; + default: + invalid_enum_value(value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_"); + } + return ""; +} +uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 2}; + return get_enum_number(options, 2, value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_"); +} + +std::string tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_::to_string() const +{ + switch (value) { + case sym1: + return "sym1"; + case sym2: + return "sym2"; + case sym3: + return "sym3"; + case sym4: + return "sym4"; + case sym5: + return "sym5"; + case sym6: + return "sym6"; + default: + invalid_enum_value(value, "tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_"); + } + return ""; +} +uint8_t tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 6, value, "tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_"); +} + +std::string ant_info_ded_s::tx_mode_e_::to_string() const +{ + switch (value) { + case tm1: + return "tm1"; + case tm2: + return "tm2"; + case tm3: + return "tm3"; + case tm4: + return "tm4"; + case tm5: + return "tm5"; + case tm6: + return "tm6"; + case tm7: + return "tm7"; + case tm8_v920: + return "tm8-v920"; + default: + invalid_enum_value(value, "ant_info_ded_s::tx_mode_e_"); + } + return ""; +} +uint8_t ant_info_ded_s::tx_mode_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; + return get_enum_number(options, 8, value, "ant_info_ded_s::tx_mode_e_"); +} + +std::string ant_info_ded_s::codebook_subset_restrict_c_::types::to_string() const +{ + switch (value) { + case n2_tx_ant_tm3: + return "n2TxAntenna-tm3"; + case n4_tx_ant_tm3: + return "n4TxAntenna-tm3"; + case n2_tx_ant_tm4: + return "n2TxAntenna-tm4"; + case n4_tx_ant_tm4: + return "n4TxAntenna-tm4"; + case n2_tx_ant_tm5: + return "n2TxAntenna-tm5"; + case n4_tx_ant_tm5: + return "n4TxAntenna-tm5"; + case n2_tx_ant_tm6: + return "n2TxAntenna-tm6"; + case n4_tx_ant_tm6: + return "n4TxAntenna-tm6"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ant_info_ded_s::codebook_subset_restrict_c_::types"); + } + return ""; +} + +std::string ant_info_ded_s::ue_tx_ant_sel_c_::setup_e_::to_string() const +{ + switch (value) { + case closed_loop: + return "closedLoop"; + case open_loop: + return "openLoop"; + default: + invalid_enum_value(value, "ant_info_ded_s::ue_tx_ant_sel_c_::setup_e_"); + } + return ""; +} + +std::string ant_info_ded_r10_s::tx_mode_r10_e_::to_string() const +{ + switch (value) { + case tm1: + return "tm1"; + case tm2: + return "tm2"; + case tm3: + return "tm3"; + case tm4: + return "tm4"; + case tm5: + return "tm5"; + case tm6: + return "tm6"; + case tm7: + return "tm7"; + case tm8_v920: + return "tm8-v920"; + case tm9_v1020: + return "tm9-v1020"; + case tm10_v1130: + return "tm10-v1130"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ant_info_ded_r10_s::tx_mode_r10_e_"); + } + return ""; +} +uint8_t ant_info_ded_r10_s::tx_mode_r10_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + return get_enum_number(options, 10, value, "ant_info_ded_r10_s::tx_mode_r10_e_"); +} + +std::string ant_info_ded_r10_s::ue_tx_ant_sel_c_::setup_e_::to_string() const +{ + switch (value) { + case closed_loop: + return "closedLoop"; + case open_loop: + return "openLoop"; + default: + invalid_enum_value(value, "ant_info_ded_r10_s::ue_tx_ant_sel_c_::setup_e_"); + } + return ""; +} + +std::string ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_::to_string() const +{ + switch (value) { + case two: + return "two"; + case three: + return "three"; + default: + invalid_enum_value(value, "ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_"); + } + return ""; +} +uint8_t ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 3}; + return get_enum_number(options, 2, value, + "ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_"); +} + +std::string ant_info_ded_v1530_c::setup_c_::types::to_string() const +{ + switch (value) { + case ue_tx_ant_sel_srs_minus1_t4_r_cfg_r15: + return "ue-TxAntennaSelection-SRS-1T4R-Config-r15"; + case ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15: + return "ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ant_info_ded_v1530_c::setup_c_::types"); + } + return ""; +} +int8_t ant_info_ded_v1530_c::setup_c_::types::to_number() const +{ + const static int8_t options[] = {-1, -2}; + return get_enum_number(options, 2, value, "ant_info_ded_v1530_c::setup_c_::types"); +} + +std::string ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types::to_string() const +{ + switch (value) { + case n2_tx_ant_tm8_r9: + return "n2TxAntenna-tm8-r9"; + case n4_tx_ant_tm8_r9: + return "n4TxAntenna-tm8-r9"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types"); + } + return ""; +} +uint8_t ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types"); +} + +std::string ant_info_ul_r10_s::tx_mode_ul_r10_e_::to_string() const +{ + switch (value) { + case tm1: + return "tm1"; + case tm2: + return "tm2"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ant_info_ul_r10_s::tx_mode_ul_r10_e_"); + } + return ""; +} +uint8_t ant_info_ul_r10_s::tx_mode_ul_r10_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ant_info_ul_r10_s::tx_mode_ul_r10_e_"); +} + +std::string cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_e_::to_string() const +{ + switch (value) { + case all_sfs: + return "allSubframes"; + case csi_sf_set1: + return "csi-SubframeSet1"; + case csi_sf_set2: + return "csi-SubframeSet2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_e_"); + } + return ""; +} +uint8_t cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_e_::to_number() const +{ + switch (value) { + case csi_sf_set1: + return 1; + case csi_sf_set2: + return 2; + default: + invalid_enum_number(value, "cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_e_"); + } + return 0; +} + +std::string drb_to_add_mod_s::drb_type_lwip_r13_e_::to_string() const +{ + switch (value) { + case lwip: + return "lwip"; + case lwip_dl_only: + return "lwip-DL-only"; + case lwip_ul_only: + return "lwip-UL-only"; + case eutran: + return "eutran"; + default: + invalid_enum_value(value, "drb_to_add_mod_s::drb_type_lwip_r13_e_"); + } + return ""; +} + +std::string drb_to_add_mod_s::lwa_wlan_ac_r14_e_::to_string() const +{ + switch (value) { + case ac_bk: + return "ac-bk"; + case ac_be: + return "ac-be"; + case ac_vi: + return "ac-vi"; + case ac_vo: + return "ac-vo"; + default: + invalid_enum_value(value, "drb_to_add_mod_s::lwa_wlan_ac_r14_e_"); + } + return ""; +} + +std::string drx_cfg_c::setup_s_::on_dur_timer_e_::to_string() const +{ + switch (value) { + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf3: + return "psf3"; + case psf4: + return "psf4"; + case psf5: + return "psf5"; + case psf6: + return "psf6"; + case psf8: + return "psf8"; + case psf10: + return "psf10"; + case psf20: + return "psf20"; + case psf30: + return "psf30"; + case psf40: + return "psf40"; + case psf50: + return "psf50"; + case psf60: + return "psf60"; + case psf80: + return "psf80"; + case psf100: + return "psf100"; + case psf200: + return "psf200"; + default: + invalid_enum_value(value, "drx_cfg_c::setup_s_::on_dur_timer_e_"); + } + return ""; +} +uint8_t drx_cfg_c::setup_s_::on_dur_timer_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, 60, 80, 100, 200}; + return get_enum_number(options, 16, value, "drx_cfg_c::setup_s_::on_dur_timer_e_"); +} + +std::string drx_cfg_c::setup_s_::drx_inactivity_timer_e_::to_string() const +{ + switch (value) { + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf3: + return "psf3"; + case psf4: + return "psf4"; + case psf5: + return "psf5"; + case psf6: + return "psf6"; + case psf8: + return "psf8"; + case psf10: + return "psf10"; + case psf20: + return "psf20"; + case psf30: + return "psf30"; + case psf40: + return "psf40"; + case psf50: + return "psf50"; + case psf60: + return "psf60"; + case psf80: + return "psf80"; + case psf100: + return "psf100"; + case psf200: + return "psf200"; + case psf300: + return "psf300"; + case psf500: + return "psf500"; + case psf750: + return "psf750"; + case psf1280: + return "psf1280"; + case psf1920: + return "psf1920"; + case psf2560: + return "psf2560"; + case psf0_v1020: + return "psf0-v1020"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "drx_cfg_c::setup_s_::drx_inactivity_timer_e_"); + } + return ""; +} +uint16_t drx_cfg_c::setup_s_::drx_inactivity_timer_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, + 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560, 0}; + return get_enum_number(options, 23, value, "drx_cfg_c::setup_s_::drx_inactivity_timer_e_"); +} + +std::string drx_cfg_c::setup_s_::drx_retx_timer_e_::to_string() const +{ + switch (value) { + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf4: + return "psf4"; + case psf6: + return "psf6"; + case psf8: + return "psf8"; + case psf16: + return "psf16"; + case psf24: + return "psf24"; + case psf33: + return "psf33"; + default: + invalid_enum_value(value, "drx_cfg_c::setup_s_::drx_retx_timer_e_"); + } + return ""; +} +uint8_t drx_cfg_c::setup_s_::drx_retx_timer_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 6, 8, 16, 24, 33}; + return get_enum_number(options, 8, value, "drx_cfg_c::setup_s_::drx_retx_timer_e_"); +} + +std::string drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case sf320: + return "sf320"; + case sf512: + return "sf512"; + case sf640: + return "sf640"; + case sf1024: + return "sf1024"; + case sf1280: + return "sf1280"; + case sf2048: + return "sf2048"; + case sf2560: + return "sf2560"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types"); + } + return ""; +} +uint16_t drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types::to_number() const +{ + const static uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 2048, 2560}; + return get_enum_number(options, 16, value, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types"); +} + +std::string drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf5: + return "sf5"; + case sf8: + return "sf8"; + case sf10: + return "sf10"; + case sf16: + return "sf16"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case sf320: + return "sf320"; + case sf512: + return "sf512"; + case sf640: + return "sf640"; + default: + invalid_enum_value(value, "drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_"); + } + return ""; +} +uint16_t drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_::to_number() const +{ + const static uint16_t options[] = {2, 5, 8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640}; + return get_enum_number(options, 16, value, "drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_"); +} + +std::string drx_cfg_r13_s::on_dur_timer_v1310_e_::to_string() const +{ + switch (value) { + case psf300: + return "psf300"; + case psf400: + return "psf400"; + case psf500: + return "psf500"; + case psf600: + return "psf600"; + case psf800: + return "psf800"; + case psf1000: + return "psf1000"; + case psf1200: + return "psf1200"; + case psf1600: + return "psf1600"; + default: + invalid_enum_value(value, "drx_cfg_r13_s::on_dur_timer_v1310_e_"); + } + return ""; +} +uint16_t drx_cfg_r13_s::on_dur_timer_v1310_e_::to_number() const +{ + const static uint16_t options[] = {300, 400, 500, 600, 800, 1000, 1200, 1600}; + return get_enum_number(options, 8, value, "drx_cfg_r13_s::on_dur_timer_v1310_e_"); +} + +std::string drx_cfg_r13_s::drx_retx_timer_v1310_e_::to_string() const +{ + switch (value) { + case psf40: + return "psf40"; + case psf64: + return "psf64"; + case psf80: + return "psf80"; + case psf96: + return "psf96"; + case psf112: + return "psf112"; + case psf128: + return "psf128"; + case psf160: + return "psf160"; + case psf320: + return "psf320"; + default: + invalid_enum_value(value, "drx_cfg_r13_s::drx_retx_timer_v1310_e_"); + } + return ""; +} +uint16_t drx_cfg_r13_s::drx_retx_timer_v1310_e_::to_number() const +{ + const static uint16_t options[] = {40, 64, 80, 96, 112, 128, 160, 320}; + return get_enum_number(options, 8, value, "drx_cfg_r13_s::drx_retx_timer_v1310_e_"); +} + +std::string drx_cfg_r13_s::drx_ul_retx_timer_r13_e_::to_string() const +{ + switch (value) { + case psf0: + return "psf0"; + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf4: + return "psf4"; + case psf6: + return "psf6"; + case psf8: + return "psf8"; + case psf16: + return "psf16"; + case psf24: + return "psf24"; + case psf33: + return "psf33"; + case psf40: + return "psf40"; + case psf64: + return "psf64"; + case psf80: + return "psf80"; + case psf96: + return "psf96"; + case psf112: + return "psf112"; + case psf128: + return "psf128"; + case psf160: + return "psf160"; + case psf320: + return "psf320"; + default: + invalid_enum_value(value, "drx_cfg_r13_s::drx_ul_retx_timer_r13_e_"); + } + return ""; +} +uint16_t drx_cfg_r13_s::drx_ul_retx_timer_r13_e_::to_number() const +{ + const static uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return get_enum_number(options, 17, value, "drx_cfg_r13_s::drx_ul_retx_timer_r13_e_"); +} + +std::string drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_::to_string() const +{ + switch (value) { + case tti10: + return "tti10"; + case tti20: + return "tti20"; + case tti40: + return "tti40"; + case tti64: + return "tti64"; + case tti80: + return "tti80"; + case tti96: + return "tti96"; + case tti112: + return "tti112"; + case tti128: + return "tti128"; + case tti160: + return "tti160"; + case tti320: + return "tti320"; + default: + invalid_enum_value(value, "drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_"); + } + return ""; +} +uint16_t drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_::to_number() const +{ + const static uint16_t options[] = {10, 20, 40, 64, 80, 96, 112, 128, 160, 320}; + return get_enum_number(options, 10, value, "drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_"); +} + +std::string drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_::to_string() const +{ + switch (value) { + case tti0: + return "tti0"; + case tti1: + return "tti1"; + case tti2: + return "tti2"; + case tti4: + return "tti4"; + case tti6: + return "tti6"; + case tti8: + return "tti8"; + case tti16: + return "tti16"; + case tti24: + return "tti24"; + case tti33: + return "tti33"; + case tti40: + return "tti40"; + case tti64: + return "tti64"; + case tti80: + return "tti80"; + case tti96: + return "tti96"; + case tti112: + return "tti112"; + case tti128: + return "tti128"; + case tti160: + return "tti160"; + case tti320: + return "tti320"; + default: + invalid_enum_value(value, "drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_"); + } + return ""; +} +uint16_t drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_::to_number() const +{ + const static uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return get_enum_number(options, 17, value, "drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_"); +} + +std::string drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types::to_string() const +{ + switch (value) { + case sf60_v1130: + return "sf60-v1130"; + case sf70_v1130: + return "sf70-v1130"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types"); + } + return ""; +} +uint8_t drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types::to_number() const +{ + const static uint8_t options[] = {60, 70}; + return get_enum_number(options, 2, value, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types"); +} + +// DataInactivityTimer-r14 ::= ENUMERATED +std::string data_inactivity_timer_r14_e::to_string() const +{ + switch (value) { + case s1: + return "s1"; + case s2: + return "s2"; + case s3: + return "s3"; + case s5: + return "s5"; + case s7: + return "s7"; + case s10: + return "s10"; + case s15: + return "s15"; + case s20: + return "s20"; + case s40: + return "s40"; + case s50: + return "s50"; + case s60: + return "s60"; + case s80: + return "s80"; + case s100: + return "s100"; + case s120: + return "s120"; + case s150: + return "s150"; + case s180: + return "s180"; + default: + invalid_enum_value(value, "data_inactivity_timer_r14_e"); + } + return ""; +} +uint8_t data_inactivity_timer_r14_e::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; + return get_enum_number(options, 16, value, "data_inactivity_timer_r14_e"); +} + +std::string pdsch_cfg_ded_s::p_a_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4dot77: + return "dB-4dot77"; + case db_minus3: + return "dB-3"; + case db_minus1dot77: + return "dB-1dot77"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + default: + invalid_enum_value(value, "pdsch_cfg_ded_s::p_a_e_"); + } + return ""; +} +float pdsch_cfg_ded_s::p_a_e_::to_number() const +{ + const static float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return get_enum_number(options, 8, value, "pdsch_cfg_ded_s::p_a_e_"); +} +std::string pdsch_cfg_ded_s::p_a_e_::to_number_string() const +{ + switch (value) { + case db_minus6: + return "-6"; + case db_minus4dot77: + return "-4.77"; + case db_minus3: + return "-3"; + case db_minus1dot77: + return "-1.77"; + case db0: + return "0"; + case db1: + return "1"; + case db2: + return "2"; + case db3: + return "3"; + default: + invalid_enum_number(value, "pdsch_cfg_ded_s::p_a_e_"); + } + return ""; +} + +std::string pdsch_cfg_ded_v1130_s::qcl_operation_e_::to_string() const +{ + switch (value) { + case type_a: + return "typeA"; + case type_b: + return "typeB"; + default: + invalid_enum_value(value, "pdsch_cfg_ded_v1130_s::qcl_operation_e_"); + } + return ""; +} + +std::string pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_::to_string() const +{ + switch (value) { + case a26: + return "a26"; + case a33: + return "a33"; + default: + invalid_enum_value(value, "pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_"); + } + return ""; +} +uint8_t pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_::to_number() const +{ + const static uint8_t options[] = {26, 33}; + return get_enum_number(options, 2, value, "pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_"); +} + +std::string pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_::to_string() const +{ + switch (value) { + case bw5: + return "bw5"; + case bw20: + return "bw20"; + default: + invalid_enum_value(value, "pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_"); + } + return ""; +} +uint8_t pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_::to_number() const +{ + const static uint8_t options[] = {5, 20}; + return get_enum_number(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_"); +} + +std::string pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_::to_string() const +{ + switch (value) { + case range1: + return "range1"; + case range2: + return "range2"; + default: + invalid_enum_value(value, "pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_"); + } + return ""; +} +uint8_t pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_"); +} + +std::string pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_::to_string() const +{ + switch (value) { + case o_dot5: + return "oDot5"; + case o_dot625: + return "oDot625"; + case o_dot75: + return "oDot75"; + case o_dot875: + return "oDot875"; + default: + invalid_enum_value(value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); + } + return ""; +} +float pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_::to_number() const +{ + const static float options[] = {0.5, 0.625, 0.75, 0.875}; + return get_enum_number(options, 4, value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); +} +std::string pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_::to_number_string() const +{ + switch (value) { + case o_dot5: + return "0.5"; + case o_dot625: + return "0.625"; + case o_dot75: + return "0.75"; + case o_dot875: + return "0.875"; + default: + invalid_enum_number(value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); + } + return ""; +} + +std::string pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + case n6: + return "n6"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_"); + } + return ""; +} +uint8_t pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 6}; + return get_enum_number(options, 3, value, "pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_"); +} + +std::string pucch_cfg_ded_s::tdd_ack_nack_feedback_mode_e_::to_string() const +{ + switch (value) { + case bundling: + return "bundling"; + case mux: + return "multiplexing"; + default: + invalid_enum_value(value, "pucch_cfg_ded_s::tdd_ack_nack_feedback_mode_e_"); + } + return ""; +} + +std::string pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + case n6: + return "n6"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_e_"); + } + return ""; +} +uint8_t pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 6}; + return get_enum_number(options, 3, value, + "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_e_"); +} + +std::string pucch_cfg_ded_r13_s::tdd_ack_nack_feedback_mode_r13_e_::to_string() const +{ + switch (value) { + case bundling: + return "bundling"; + case mux: + return "multiplexing"; + default: + invalid_enum_value(value, "pucch_cfg_ded_r13_s::tdd_ack_nack_feedback_mode_r13_e_"); + } + return ""; +} + +std::string pucch_cfg_ded_r13_s::pucch_format_r13_c_::types::to_string() const +{ + switch (value) { + case format3_r13: + return "format3-r13"; + case ch_sel_r13: + return "channelSelection-r13"; + case format4_r13: + return "format4-r13"; + case format5_r13: + return "format5-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::types"); + } + return ""; +} +uint8_t pucch_cfg_ded_r13_s::pucch_format_r13_c_::types::to_number() const +{ + switch (value) { + case format3_r13: + return 3; + case format4_r13: + return 4; + case format5_r13: + return 5; + default: + invalid_enum_number(value, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::types"); + } + return 0; +} + +std::string pucch_cfg_ded_r13_s::codebooksize_determination_r13_e_::to_string() const +{ + switch (value) { + case dai: + return "dai"; + case cc: + return "cc"; + default: + invalid_enum_value(value, "pucch_cfg_ded_r13_s::codebooksize_determination_r13_e_"); + } + return ""; +} + +std::string +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format1_r13_e_::to_string() + const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + default: + invalid_enum_value( + value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format1_r13_e_"); + } + return ""; +} +uint8_t +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format1_r13_e_::to_number() + const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number( + options, 4, value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format1_r13_e_"); +} + +std::string +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format2_r13_e_::to_string() + const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + default: + invalid_enum_value( + value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format2_r13_e_"); + } + return ""; +} +uint8_t +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format2_r13_e_::to_number() + const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number( + options, 4, value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format2_r13_e_"); +} + +std::string +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format1_r13_e_::to_string() + const +{ + switch (value) { + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + default: + invalid_enum_value( + value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format1_r13_e_"); + } + return ""; +} +uint8_t +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format1_r13_e_::to_number() + const +{ + const static uint8_t options[] = {4, 8, 16, 32}; + return get_enum_number( + options, 4, value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format1_r13_e_"); +} + +std::string +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format2_r13_e_::to_string() + const +{ + switch (value) { + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + default: + invalid_enum_value( + value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format2_r13_e_"); + } + return ""; +} +uint8_t +pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format2_r13_e_::to_number() + const +{ + const static uint8_t options[] = {4, 8, 16, 32}; + return get_enum_number( + options, 4, value, + "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format2_r13_e_"); +} + +std::string pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::types::to_string() const +{ + switch (value) { + case mode_a: + return "modeA"; + case mode_b: + return "modeB"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::types"); + } + return ""; +} + +std::string pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types::to_string() const +{ + switch (value) { + case format3_r10: + return "format3-r10"; + case ch_sel_r10: + return "channelSelection-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types"); + } + return ""; +} +uint8_t pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types::to_number() const +{ + const static uint8_t options[] = {3}; + return get_enum_number(options, 1, value, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types"); +} + +std::string pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_::to_string() const +{ + switch (value) { + case r64: + return "r64"; + case r128: + return "r128"; + default: + invalid_enum_value(value, "pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_"); + } + return ""; +} +uint8_t pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_::to_number() const +{ + const static uint8_t options[] = {64, 128}; + return get_enum_number(options, 2, value, "pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_"); +} + +std::string +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pusch_enh_r14_e_::to_string() const +{ + switch (value) { + case int1: + return "int1"; + case int2: + return "int2"; + case int4: + return "int4"; + case int8: + return "int8"; + default: + invalid_enum_value( + value, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pusch_enh_r14_e_"); + } + return ""; +} +uint8_t +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pusch_enh_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 8}; + return get_enum_number( + options, 4, value, + "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pusch_enh_r14_e_"); +} + +std::string +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pusch_enh_r14_e_::to_string() const +{ + switch (value) { + case int1: + return "int1"; + case int5: + return "int5"; + case int10: + return "int10"; + case int20: + return "int20"; + default: + invalid_enum_value( + value, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pusch_enh_r14_e_"); + } + return ""; +} +uint8_t +pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pusch_enh_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 5, 10, 20}; + return get_enum_number( + options, 4, value, + "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pusch_enh_r14_e_"); +} + +std::string pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::types::to_string() const +{ + switch (value) { + case interv_fdd_pusch_enh_r14: + return "interval-FDD-PUSCH-Enh-r14"; + case interv_tdd_pusch_enh_r14: + return "interval-TDD-PUSCH-Enh-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::types"); + } + return ""; +} + +// PeriodicBSR-Timer-r12 ::= ENUMERATED +std::string periodic_bsr_timer_r12_e::to_string() const +{ + switch (value) { + case sf5: + return "sf5"; + case sf10: + return "sf10"; + case sf16: + return "sf16"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf320: + return "sf320"; + case sf640: + return "sf640"; + case sf1280: + return "sf1280"; + case sf2560: + return "sf2560"; + case infinity: + return "infinity"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "periodic_bsr_timer_r12_e"); + } + return ""; +} +int16_t periodic_bsr_timer_r12_e::to_number() const +{ + const static int16_t options[] = {5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; + return get_enum_number(options, 15, value, "periodic_bsr_timer_r12_e"); +} + +std::string rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_type_r11_e_::to_string() const +{ + switch (value) { + case freq: + return "frequency"; + case e_utra: + return "e-utra"; + default: + invalid_enum_value(value, "rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_type_r11_e_"); + } + return ""; +} + +std::string rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_e_::to_string() const +{ + switch (value) { + case min5: + return "min5"; + case min10: + return "min10"; + case min15: + return "min15"; + case min30: + return "min30"; + default: + invalid_enum_value(value, "rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_e_"); + } + return ""; +} +uint8_t rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_e_::to_number() const +{ + const static uint8_t options[] = {5, 10, 15, 30}; + return get_enum_number(options, 4, value, + "rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_e_"); +} + +// RetxBSR-Timer-r12 ::= ENUMERATED +std::string retx_bsr_timer_r12_e::to_string() const +{ + switch (value) { + case sf320: + return "sf320"; + case sf640: + return "sf640"; + case sf1280: + return "sf1280"; + case sf2560: + return "sf2560"; + case sf5120: + return "sf5120"; + case sf10240: + return "sf10240"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "retx_bsr_timer_r12_e"); + } + return ""; +} +uint16_t retx_bsr_timer_r12_e::to_number() const +{ + const static uint16_t options[] = {320, 640, 1280, 2560, 5120, 10240}; + return get_enum_number(options, 6, value, "retx_bsr_timer_r12_e"); +} + +std::string sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf320: + return "sf320"; + case sf640: + return "sf640"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_"); + } + return ""; +} +uint16_t sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_::to_number() const +{ + const static uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; + return get_enum_number(options, 10, value, "sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_"); +} + +std::string srb_to_add_mod_s::rlc_cfg_c_::types::to_string() const +{ + switch (value) { + case explicit_value: + return "explicitValue"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "srb_to_add_mod_s::rlc_cfg_c_::types"); + } + return ""; +} + +std::string srb_to_add_mod_s::lc_ch_cfg_c_::types::to_string() const +{ + switch (value) { + case explicit_value: + return "explicitValue"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "srb_to_add_mod_s::lc_ch_cfg_c_::types"); + } + return ""; +} + +std::string sched_request_cfg_c::setup_s_::dsr_trans_max_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + case n64: + return "n64"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sched_request_cfg_c::setup_s_::dsr_trans_max_e_"); + } + return ""; +} +uint8_t sched_request_cfg_c::setup_s_::dsr_trans_max_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 16, 32, 64}; + return get_enum_number(options, 5, value, "sched_request_cfg_c::setup_s_::dsr_trans_max_e_"); +} + +std::string srs_ul_cfg_ded_c::setup_s_::srs_bw_e_::to_string() const +{ + switch (value) { + case bw0: + return "bw0"; + case bw1: + return "bw1"; + case bw2: + return "bw2"; + case bw3: + return "bw3"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_c::setup_s_::srs_bw_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_c::setup_s_::srs_bw_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_bw_e_"); +} + +std::string srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_::to_string() const +{ + switch (value) { + case hbw0: + return "hbw0"; + case hbw1: + return "hbw1"; + case hbw2: + return "hbw2"; + case hbw3: + return "hbw3"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_"); +} + +std::string srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_::to_string() const +{ + switch (value) { + case cs0: + return "cs0"; + case cs1: + return "cs1"; + case cs2: + return "cs2"; + case cs3: + return "cs3"; + case cs4: + return "cs4"; + case cs5: + return "cs5"; + case cs6: + return "cs6"; + case cs7: + return "cs7"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return get_enum_number(options, 8, value, "srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_"); +} + +std::string srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_::to_string() const +{ + switch (value) { + case cs8: + return "cs8"; + case cs9: + return "cs9"; + case cs10: + return "cs10"; + case cs11: + return "cs11"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_::to_number() const +{ + const static uint8_t options[] = {8, 9, 10, 11}; + return get_enum_number(options, 4, value, "srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_"); +} + +std::string srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_"); +} + +std::string srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_::to_string() const +{ + switch (value) { + case sym2: + return "sym2"; + case sym4: + return "sym4"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, + "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); +} + +std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_::to_string() const +{ + switch (value) { + case sym2: + return "sym2"; + case sym4: + return "sym4"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); +} + +std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_::to_string() const +{ + switch (value) { + case bw0: + return "bw0"; + case bw1: + return "bw1"; + case bw2: + return "bw2"; + case bw3: + return "bw3"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_"); +} + +std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_::to_string() const +{ + switch (value) { + case hbw0: + return "hbw0"; + case hbw1: + return "hbw1"; + case hbw2: + return "hbw2"; + case hbw3: + return "hbw3"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_"); +} + +std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_::to_string() const +{ + switch (value) { + case cs0: + return "cs0"; + case cs1: + return "cs1"; + case cs2: + return "cs2"; + case cs3: + return "cs3"; + case cs4: + return "cs4"; + case cs5: + return "cs5"; + case cs6: + return "cs6"; + case cs7: + return "cs7"; + case cs8: + return "cs8"; + case cs9: + return "cs9"; + case cs10: + return "cs10"; + case cs11: + return "cs11"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + return get_enum_number(options, 12, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_"); +} + +std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_"); + } + return ""; +} +uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_"); +} + +std::string ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_::to_string() const +{ + switch (value) { + case en0: + return "en0"; + case en1: + return "en1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_::to_number() const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number(options, 2, value, "ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_"); +} + +std::string mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n7: + return "n7"; + case n8: + return "n8"; + case n10: + return "n10"; + case n12: + return "n12"; + case n16: + return "n16"; + case n20: + return "n20"; + case n24: + return "n24"; + case n28: + return "n28"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_"); + } + return ""; +} +uint8_t mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 28}; + return get_enum_number(options, 14, value, "mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_"); +} + +std::string mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf50: + return "sf50"; + case sf100: + return "sf100"; + case sf200: + return "sf200"; + case sf500: + return "sf500"; + case sf1000: + return "sf1000"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_"); + } + return ""; +} +int16_t mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_::to_number() const +{ + const static int16_t options[] = {10, 20, 50, 100, 200, 500, 1000, -1}; + return get_enum_number(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_"); +} + +std::string mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_::to_string() const +{ + switch (value) { + case sf0: + return "sf0"; + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf50: + return "sf50"; + case sf100: + return "sf100"; + case sf200: + return "sf200"; + case sf500: + return "sf500"; + case sf1000: + return "sf1000"; + default: + invalid_enum_value(value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_"); + } + return ""; +} +uint16_t mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_::to_number() const +{ + const static uint16_t options[] = {0, 10, 20, 50, 100, 200, 500, 1000}; + return get_enum_number(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_"); +} + +std::string mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_::to_string() const +{ + switch (value) { + case db1: + return "dB1"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_"); + } + return ""; +} +int8_t mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_::to_number() const +{ + const static int8_t options[] = {1, 3, 6, -1}; + return get_enum_number(options, 4, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_"); +} + +std::string mac_main_cfg_s::mac_main_cfg_v1020_s_::s_cell_deactivation_timer_r10_e_::to_string() const +{ + switch (value) { + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "mac_main_cfg_s::mac_main_cfg_v1020_s_::s_cell_deactivation_timer_r10_e_"); + } + return ""; +} +uint8_t mac_main_cfg_s::mac_main_cfg_v1020_s_::s_cell_deactivation_timer_r10_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8, 16, 32, 64, 128}; + return get_enum_number(options, 7, value, "mac_main_cfg_s::mac_main_cfg_v1020_s_::s_cell_deactivation_timer_r10_e_"); +} + +std::string mac_main_cfg_s::dual_connect_phr_c_::setup_s_::phr_mode_other_cg_r12_e_::to_string() const +{ + switch (value) { + case real: + return "real"; + case virtual_type: + return "virtual"; + default: + invalid_enum_value(value, "mac_main_cfg_s::dual_connect_phr_c_::setup_s_::phr_mode_other_cg_r12_e_"); + } + return ""; +} + +std::string mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_e_::to_string() const +{ + switch (value) { + case sf20: + return "sf20"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf128: + return "sf128"; + case sf512: + return "sf512"; + case sf1024: + return "sf1024"; + case sf2560: + return "sf2560"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_e_"); + } + return ""; +} +uint16_t mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_e_::to_number() const +{ + const static uint16_t options[] = {20, 40, 64, 128, 512, 1024, 2560}; + return get_enum_number(options, 7, value, + "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_e_"); +} + +std::string mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sf5120: + return "sf5120"; + case sf10240: + return "sf10240"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::types"); + } + return ""; +} +uint16_t mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::types::to_number() const +{ + const static uint16_t options[] = {5120, 10240}; + return get_enum_number(options, 2, value, "mac_main_cfg_s::e_drx_cfg_cycle_start_offset_r13_c_::setup_c_::types"); +} + +std::string mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_e_::to_string() const +{ + switch (value) { + case sf1: + return "sf1"; + case sf5: + return "sf5"; + case sf10: + return "sf10"; + case sf16: + return "sf16"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf320: + return "sf320"; + case sf640: + return "sf640"; + case sf1280: + return "sf1280"; + case sf2560: + return "sf2560"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_e_"); + } + return ""; +} +int16_t mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_e_::to_number() const +{ + const static int16_t options[] = {1, 5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; + return get_enum_number(options, 16, value, + "mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_e_"); +} + +std::string mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::proc_timeline_r15_e_::to_string() const +{ + switch (value) { + case nplus4set1: + return "nplus4set1"; + case nplus6set1: + return "nplus6set1"; + case nplus6set2: + return "nplus6set2"; + case nplus8set2: + return "nplus8set2"; + default: + invalid_enum_value(value, "mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::proc_timeline_r15_e_"); + } + return ""; +} + +std::string mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::s_cell_hibernation_timer_r15_e_::to_string() const +{ + switch (value) { + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case spare: + return "spare"; + default: + invalid_enum_value(value, + "mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::s_cell_hibernation_timer_r15_e_"); + } + return ""; +} +uint8_t mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::s_cell_hibernation_timer_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8, 16, 32, 64, 128}; + return get_enum_number(options, 7, value, + "mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::s_cell_hibernation_timer_r15_e_"); +} + +std::string +mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivation_timer_r15_e_::to_string() const +{ + switch (value) { + case rf2: + return "rf2"; + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf320: + return "rf320"; + case rf640: + return "rf640"; + case rf1280: + return "rf1280"; + case rf2560: + return "rf2560"; + case rf5120: + return "rf5120"; + case rf10240: + return "rf10240"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value( + value, "mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivation_timer_r15_e_"); + } + return ""; +} +uint16_t +mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivation_timer_r15_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 320, 640, 1280, 2560, 5120, 10240}; + return get_enum_number( + options, 13, value, + "mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivation_timer_r15_e_"); +} + +std::string phys_cfg_ded_s::ant_info_c_::types::to_string() const +{ + switch (value) { + case explicit_value: + return "explicitValue"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::ant_info_c_::types"); + } + return ""; +} + +std::string phys_cfg_ded_s::ant_info_r10_c_::types::to_string() const +{ + switch (value) { + case explicit_value_r10: + return "explicitValue-r10"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::ant_info_r10_c_::types"); + } + return ""; +} + +std::string phys_cfg_ded_s::ce_mode_r13_c_::setup_e_::to_string() const +{ + switch (value) { + case ce_mode_a: + return "ce-ModeA"; + case ce_mode_b: + return "ce-ModeB"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::ce_mode_r13_c_::setup_e_"); + } + return ""; +} + +std::string phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_::to_string() const +{ + switch (value) { + case l1: + return "l1"; + case l3: + return "l3"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 3}; + return get_enum_number(options, 2, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); +} + +std::string phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4dot77: + return "dB-4dot77"; + case db_minus3: + return "dB-3"; + case db_minus1dot77: + return "dB-1dot77"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); + } + return ""; +} +float phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_::to_number() const +{ + const static float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return get_enum_number(options, 8, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); +} +std::string phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_::to_number_string() const +{ + switch (value) { + case db_minus6: + return "-6"; + case db_minus4dot77: + return "-4.77"; + case db_minus3: + return "-3"; + case db_minus1dot77: + return "-1.77"; + case db0: + return "0"; + case db1: + return "1"; + case db2: + return "2"; + case db3: + return "3"; + default: + invalid_enum_number(value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); + } + return ""; +} + +std::string phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::types::to_string() const +{ + switch (value) { + case cfi_cfg_r15: + return "cfi-Config-r15"; + case cfi_pattern_cfg_r15: + return "cfi-PatternConfig-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::types"); + } + return ""; +} + +std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n6: + return "n6"; + default: + invalid_enum_value(value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {4, 6}; + return get_enum_number(options, 2, value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n6: + return "n6"; + default: + invalid_enum_value( + value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {4, 6}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_e_"); +} + +std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case dlrvseq1: + return "dlrvseq1"; + case dlrvseq2: + return "dlrvseq2"; + default: + invalid_enum_value(value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case dlrvseq1: + return "dlrvseq1"; + case dlrvseq2: + return "dlrvseq2"; + default: + invalid_enum_value(value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + default: + invalid_enum_value( + value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_pdsch_repeats_r15_e_::to_string() + const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + default: + invalid_enum_value( + value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t +phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_pdsch_repeats_r15_e_::to_number() + const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_pdsch_repeats_r15_e_"); +} + +std::string rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_::to_string() const +{ + switch (value) { + case ms2500: + return "ms2500"; + case ms3000: + return "ms3000"; + case ms3500: + return "ms3500"; + case ms4000: + return "ms4000"; + case ms5000: + return "ms5000"; + case ms6000: + return "ms6000"; + case ms8000: + return "ms8000"; + case ms10000: + return "ms10000"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_"); + } + return ""; +} +uint16_t rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_::to_number() const +{ + const static uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; + return get_enum_number(options, 8, value, "rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_"); +} + +std::string rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_::to_string() const +{ + switch (value) { + case ms4000: + return "ms4000"; + case ms6000: + return "ms6000"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_"); + } + return ""; +} +uint16_t rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_::to_number() const +{ + const static uint16_t options[] = {4000, 6000}; + return get_enum_number(options, 2, value, "rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_"); +} + +std::string rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_::to_string() const +{ + switch (value) { + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms400: + return "ms400"; + case ms600: + return "ms600"; + case ms1000: + return "ms1000"; + case ms1500: + return "ms1500"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_"); + } + return ""; +} +uint16_t rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_::to_number() const +{ + const static uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return get_enum_number(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_"); +} + +std::string rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_"); + } + return ""; +} +uint16_t rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_::to_number() const +{ + const static uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return get_enum_number(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_"); +} + +std::string rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n6: + return "n6"; + case n8: + return "n8"; + case n10: + return "n10"; + case n20: + return "n20"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_"); + } + return ""; +} +uint8_t rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return get_enum_number(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_"); +} + +std::string rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_::to_string() const +{ + switch (value) { + case ms1000: + return "ms1000"; + case ms3000: + return "ms3000"; + case ms5000: + return "ms5000"; + case ms10000: + return "ms10000"; + case ms15000: + return "ms15000"; + case ms20000: + return "ms20000"; + case ms30000: + return "ms30000"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_"); + } + return ""; +} +uint16_t rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_::to_number() const +{ + const static uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return get_enum_number(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_"); +} + +std::string rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n8: + return "n8"; + case n10: + return "n10"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_"); + } + return ""; +} +uint8_t rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return get_enum_number(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_"); +} + +std::string idle_mode_mob_ctrl_info_s::t320_e_::to_string() const +{ + switch (value) { + case min5: + return "min5"; + case min10: + return "min10"; + case min20: + return "min20"; + case min30: + return "min30"; + case min60: + return "min60"; + case min120: + return "min120"; + case min180: + return "min180"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "idle_mode_mob_ctrl_info_s::t320_e_"); + } + return ""; +} +uint8_t idle_mode_mob_ctrl_info_s::t320_e_::to_number() const +{ + const static uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; + return get_enum_number(options, 7, value, "idle_mode_mob_ctrl_info_s::t320_e_"); +} + +std::string rr_cfg_ded_s::mac_main_cfg_c_::types::to_string() const +{ + switch (value) { + case explicit_value: + return "explicitValue"; + case default_value: + return "defaultValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rr_cfg_ded_s::mac_main_cfg_c_::types"); + } + return ""; +} + +std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n24: + return "n24"; + default: + invalid_enum_value(value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_"); + } + return ""; +} +uint8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_::to_number() const +{ + const static uint8_t options[] = {6, 24}; + return get_enum_number(options, 2, value, + "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_"); +} + +std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types::to_string() const +{ + switch (value) { + case crs_intf_mitig_enabled_minus15: + return "crs-IntfMitigEnabled-15"; + case crs_intf_mitig_num_prbs_r15: + return "crs-IntfMitigNumPRBs-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types"); + } + return ""; +} +int8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types::to_number() const +{ + const static int8_t options[] = {-15}; + return get_enum_number(options, 1, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types"); +} + +std::string redirected_carrier_info_r15_ies_c::types::to_string() const +{ + switch (value) { + case eutra_r15: + return "eutra-r15"; + case geran_r15: + return "geran-r15"; + case utra_fdd_r15: + return "utra-FDD-r15"; + case cdma2000_hrpd_r15: + return "cdma2000-HRPD-r15"; + case cdma2000_minus1x_rtt_r15: + return "cdma2000-1xRTT-r15"; + case utra_tdd_r15: + return "utra-TDD-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "redirected_carrier_info_r15_ies_c::types"); + } + return ""; +} + +std::string c1_or_crit_ext_e::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "c1_or_crit_ext_e"); + } + return ""; +} +uint8_t c1_or_crit_ext_e::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "c1_or_crit_ext_e"); +} + +std::string rrc_conn_reest_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reest_r8: + return "rrcConnectionReestablishment-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_reest_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_conn_reest_reject_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reest_reject_r8: + return "rrcConnectionReestablishmentReject-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_reest_reject_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_conn_reject_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reject_r8: + return "rrcConnectionReject-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_reject_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_conn_setup_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_setup_r8: + return "rrcConnectionSetup-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_setup_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_early_data_complete_r15_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_early_data_complete_r15: + return "rrcEarlyDataComplete-r15"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_early_data_complete_r15_s::crit_exts_c_::types"); + } + return ""; +} + +std::string dl_ccch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reest: + return "rrcConnectionReestablishment"; + case rrc_conn_reest_reject: + return "rrcConnectionReestablishmentReject"; + case rrc_conn_reject: + return "rrcConnectionReject"; + case rrc_conn_setup: + return "rrcConnectionSetup"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_ccch_msg_type_c::c1_c_::types"); + } + return ""; +} + +std::string dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types::to_string() const +{ + switch (value) { + case rrc_early_data_complete_r15: + return "rrcEarlyDataComplete-r15"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types"); + } + return ""; +} + +std::string dl_ccch_msg_type_c::msg_class_ext_c_::types::to_string() const +{ + switch (value) { + case c2: + return "c2"; + case msg_class_ext_future_r15: + return "messageClassExtensionFuture-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_ccch_msg_type_c::msg_class_ext_c_::types"); + } + return ""; +} +uint8_t dl_ccch_msg_type_c::msg_class_ext_c_::types::to_number() const +{ + const static uint8_t options[] = {2}; + return get_enum_number(options, 1, value, "dl_ccch_msg_type_c::msg_class_ext_c_::types"); +} + +std::string dl_ccch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_ccch_msg_type_c::types"); + } + return ""; +} +uint8_t dl_ccch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "dl_ccch_msg_type_c::types"); +} + +// PDCCH-CandidateReductionValue-r14 ::= ENUMERATED +std::string pdcch_candidate_reduction_value_r14_e::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n50: + return "n50"; + case n100: + return "n100"; + case n150: + return "n150"; + default: + invalid_enum_value(value, "pdcch_candidate_reduction_value_r14_e"); + } + return ""; +} +uint8_t pdcch_candidate_reduction_value_r14_e::to_number() const +{ + const static uint8_t options[] = {0, 50, 100, 150}; + return get_enum_number(options, 4, value, "pdcch_candidate_reduction_value_r14_e"); +} + +std::string aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_::to_string() const +{ + switch (value) { + case tm1: + return "tm1"; + case tm2: + return "tm2"; + default: + invalid_enum_value(value, "aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_"); + } + return ""; +} +uint8_t aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_"); +} + +std::string aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_::to_string() const +{ + switch (value) { + case o34: + return "o34"; + case o43: + return "o43"; + case o52: + return "o52"; + case o61: + return "o61"; + case o_os1: + return "oOS1"; + default: + invalid_enum_value(value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_"); + } + return ""; +} +uint8_t aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_::to_number() const +{ + const static uint8_t options[] = {34, 43, 52, 61, 1}; + return get_enum_number(options, 5, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_"); +} + +std::string aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_::to_string() const +{ + switch (value) { + case o16: + return "o16"; + case o25: + return "o25"; + case o34: + return "o34"; + case o43: + return "o43"; + case o52: + return "o52"; + case o61: + return "o61"; + case o_os1: + return "oOS1"; + default: + invalid_enum_value(value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_"); + } + return ""; +} +uint8_t aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_::to_number() const +{ + const static uint8_t options[] = {16, 25, 34, 43, 52, 61, 1}; + return get_enum_number(options, 7, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_"); +} + +std::string aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_::to_string() const +{ + switch (value) { + case psf4: + return "psf4"; + case psf5: + return "psf5"; + case psf6: + return "psf6"; + case psf8: + return "psf8"; + case psf10: + return "psf10"; + case psf12: + return "psf12"; + case psf20: + return "psf20"; + case psf28: + return "psf28"; + case psf37: + return "psf37"; + case psf44: + return "psf44"; + case psf68: + return "psf68"; + case psf84: + return "psf84"; + case psf100: + return "psf100"; + case psf116: + return "psf116"; + case psf132: + return "psf132"; + case psf164: + return "psf164"; + case psf324: + return "psf324"; + default: + invalid_enum_value(value, "aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_"); + } + return ""; +} +uint16_t aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_::to_number() const +{ + const static uint16_t options[] = {4, 5, 6, 8, 10, 12, 20, 28, 37, 44, 68, 84, 100, 116, 132, 164, 324}; + return get_enum_number(options, 17, value, "aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_"); +} + +std::string aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n5: + return "n5"; + case n10: + return "n10"; + default: + invalid_enum_value(value, "aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_"); + } + return ""; +} +uint8_t aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 5, 10}; + return get_enum_number(options, 3, value, "aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_"); +} + +std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_:: + csi_report_mode_r15_e_::to_string() const +{ + switch (value) { + case submode1: + return "submode1"; + case submode2: + return "submode2"; + default: + invalid_enum_value(value, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_" + "cqi_r15_s_::csi_report_mode_r15_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_:: + csi_report_mode_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_" + "::csi_report_mode_r15_e_"); +} + +std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_:: + periodicity_factor_r15_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_" + "r15_s_::periodicity_factor_r15_e_"); + } + return ""; +} +uint8_t cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_:: + periodicity_factor_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, + "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_:" + ":periodicity_factor_r15_e_"); +} + +std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::types::to_string() const +{ + switch (value) { + case wideband_cqi_r15: + return "widebandCQI-r15"; + case subband_cqi_r15: + return "subbandCQI-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::types"); + } + return ""; +} + +std::string lbt_cfg_r14_c::types::to_string() const +{ + switch (value) { + case max_energy_detection_thres_r14: + return "maxEnergyDetectionThreshold-r14"; + case energy_detection_thres_offset_r14: + return "energyDetectionThresholdOffset-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "lbt_cfg_r14_c::types"); + } + return ""; +} + +std::string pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf3: + return "sf3"; + case sf4: + return "sf4"; + default: + invalid_enum_value(value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_"); + } + return ""; +} +uint8_t pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4}; + return get_enum_number(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_"); +} + +std::string pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf3: + return "sf3"; + case sf4: + return "sf4"; + default: + invalid_enum_value(value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_"); + } + return ""; +} +uint8_t pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_::to_number() const +{ + const static uint8_t options[] = {2, 3, 4}; + return get_enum_number(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_"); +} + +std::string cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_e_::to_string() const +{ + switch (value) { + case all_sfs: + return "allSubframes"; + case csi_sf_set1: + return "csi-SubframeSet1"; + case csi_sf_set2: + return "csi-SubframeSet2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_e_"); + } + return ""; +} +uint8_t cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_e_::to_number() const +{ + switch (value) { + case csi_sf_set1: + return 1; + case csi_sf_set2: + return 2; + default: + invalid_enum_number(value, "cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_e_"); + } + return 0; +} + +std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_:: + csi_report_mode_short_r15_e_::to_string() const +{ + switch (value) { + case submode1: + return "submode1"; + case submode2: + return "submode2"; + default: + invalid_enum_value(value, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_" + "r15_s_::csi_report_mode_short_r15_e_"); + } + return ""; +} +uint8_t cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_:: + csi_report_mode_short_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, + "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_::" + "csi_report_mode_short_r15_e_"); +} + +std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_:: + periodicity_factor_r15_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_" + "r15_s_::periodicity_factor_r15_e_"); + } + return ""; +} +uint8_t cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_:: + periodicity_factor_r15_e_::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, + "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_::" + "periodicity_factor_r15_e_"); +} + +std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::types::to_string() const +{ + switch (value) { + case wideband_cqi_short_r15: + return "widebandCQI-Short-r15"; + case subband_cqi_short_r15: + return "subbandCQI-Short-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::types"); + } + return ""; +} + +std::string cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::types::to_string() const +{ + switch (value) { + case own_r10: + return "own-r10"; + case other_r10: + return "other-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::types"); + } + return ""; +} + +std::string cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::types::to_string() const +{ + switch (value) { + case own_r13: + return "own-r13"; + case other_r13: + return "other-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::types"); + } + return ""; +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_::to_string() const +{ + switch (value) { + case delta_f_minus1: + return "deltaF-1"; + case delta_f0: + return "deltaF0"; + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case delta_f3: + return "deltaF3"; + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_"); + } + return ""; +} +int8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_::to_number() const +{ + const static int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_::to_string() const +{ + switch (value) { + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case delta_f3: + return "deltaF3"; + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + case delta_f7: + return "deltaF7"; + case delta_f8: + return "deltaF8"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; + return get_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_::to_string() const +{ + switch (value) { + case delta_f3: + return "deltaF3"; + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + case delta_f7: + return "deltaF7"; + case delta_f8: + return "deltaF8"; + case delta_f9: + return "deltaF9"; + case delta_f10: + return "deltaF10"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_::to_number() const +{ + const static uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10}; + return get_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_::to_string() const +{ + switch (value) { + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + case delta_f7: + return "deltaF7"; + case delta_f8: + return "deltaF8"; + case delta_f9: + return "deltaF9"; + case delta_f10: + return "deltaF10"; + case delta_f11: + return "deltaF11"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_::to_number() const +{ + const static uint8_t options[] = {4, 5, 6, 7, 8, 9, 10, 11}; + return get_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_e_::to_string() const +{ + switch (value) { + case delta_f13: + return "deltaF13"; + case delta_f14: + return "deltaF14"; + case delta_f15: + return "deltaF15"; + case delta_f16: + return "deltaF16"; + case delta_f17: + return "deltaF17"; + case delta_f18: + return "deltaF18"; + case delta_f19: + return "deltaF19"; + case delta_f20: + return "deltaF20"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_e_::to_number() const +{ + const static uint8_t options[] = {13, 14, 15, 16, 17, 18, 19, 20}; + return get_enum_number(options, 8, value, + "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_e_::to_string() const +{ + switch (value) { + case delta_f10: + return "deltaF10"; + case delta_f11: + return "deltaF11"; + case delta_f12: + return "deltaF12"; + case delta_f13: + return "deltaF13"; + case delta_f14: + return "deltaF14"; + case delta_f15: + return "deltaF15"; + case delta_f16: + return "deltaF16"; + case delta_f17: + return "deltaF17"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_e_::to_number() const +{ + const static uint8_t options[] = {10, 11, 12, 13, 14, 15, 16, 17}; + return get_enum_number(options, 8, value, + "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_e_::to_string() const +{ + switch (value) { + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + case delta_f7: + return "deltaF7"; + case delta_f8: + return "deltaF8"; + case delta_f9: + return "deltaF9"; + case delta_f10: + return "deltaF10"; + case delta_f11: + return "deltaF11"; + case delta_f12: + return "deltaF12"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_e_::to_number() const +{ + const static uint8_t options[] = {5, 6, 7, 8, 9, 10, 11, 12}; + return get_enum_number(options, 8, value, + "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_e_::to_string() const +{ + switch (value) { + case delta_f6: + return "deltaF6"; + case delta_f7: + return "deltaF7"; + case delta_f8: + return "deltaF8"; + case delta_f9: + return "deltaF9"; + case delta_f10: + return "deltaF10"; + case delta_f11: + return "deltaF11"; + case delta_f12: + return "deltaF12"; + case delta_f13: + return "deltaF13"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_e_::to_number() const +{ + const static uint8_t options[] = {6, 7, 8, 9, 10, 11, 12, 13}; + return get_enum_number(options, 8, value, + "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_e_::to_string() const +{ + switch (value) { + case delta_f15: + return "deltaF15"; + case delta_f16: + return "deltaF16"; + case delta_f17: + return "deltaF17"; + case delta_f18: + return "deltaF18"; + case delta_f19: + return "deltaF19"; + case delta_f20: + return "deltaF20"; + case delta_f21: + return "deltaF21"; + case delta_f22: + return "deltaF22"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_e_::to_number() const +{ + const static uint8_t options[] = {15, 16, 17, 18, 19, 20, 21, 22}; + return get_enum_number(options, 8, value, + "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_e_"); +} + +std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_e_::to_string() const +{ + switch (value) { + case delta_f10: + return "deltaF10"; + case delta_f11: + return "deltaF11"; + case delta_f12: + return "deltaF12"; + case delta_f13: + return "deltaF13"; + case delta_f14: + return "deltaF14"; + case delta_f15: + return "deltaF15"; + case delta_f16: + return "deltaF16"; + case delta_f17: + return "deltaF17"; + default: + invalid_enum_value(value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_e_"); + } + return ""; +} +uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_e_::to_number() const +{ + const static uint8_t options[] = {10, 11, 12, 13, 14, 15, 16, 17}; + return get_enum_number(options, 8, value, + "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_e_"); +} + +std::string laa_scell_cfg_r13_s::sf_start_position_r13_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s07: + return "s07"; + default: + invalid_enum_value(value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); + } + return ""; +} +float laa_scell_cfg_r13_s::sf_start_position_r13_e_::to_number() const +{ + const static float options[] = {0.0, 0.7}; + return get_enum_number(options, 2, value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); +} +std::string laa_scell_cfg_r13_s::sf_start_position_r13_e_::to_number_string() const +{ + switch (value) { + case s0: + return "0"; + case s07: + return "0.7"; + default: + invalid_enum_number(value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); + } + return ""; +} + +std::string sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n8: + return "n8"; + case n16: + return "n16"; + case n32: + return "n32"; + case n64: + return "n64"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_"); + } + return ""; +} +uint8_t sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_::to_number() const +{ + const static uint8_t options[] = {4, 8, 16, 32, 64}; + return get_enum_number(options, 5, value, "sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_"); +} + +std::string ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_::to_string() const +{ + switch (value) { + case en0: + return "en0"; + case en1: + return "en1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_::to_number() const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number(options, 2, value, "ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_"); +} + +std::string ul_pwr_ctrl_ded_scell_r10_s::pathloss_ref_linking_r10_e_::to_string() const +{ + switch (value) { + case p_cell: + return "pCell"; + case s_cell: + return "sCell"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_ded_scell_r10_s::pathloss_ref_linking_r10_e_"); + } + return ""; +} + +std::string ant_info_common_s::ant_ports_count_e_::to_string() const +{ + switch (value) { + case an1: + return "an1"; + case an2: + return "an2"; + case an4: + return "an4"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ant_info_common_s::ant_ports_count_e_"); + } + return ""; +} +uint8_t ant_info_common_s::ant_ports_count_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "ant_info_common_s::ant_ports_count_e_"); +} + +std::string phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_::to_string() const +{ + switch (value) { + case l1: + return "l1"; + case l3: + return "l3"; + default: + invalid_enum_value(value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 3}; + return get_enum_number(options, 2, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); +} + +std::string phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4dot77: + return "dB-4dot77"; + case db_minus3: + return "dB-3"; + case db_minus1dot77: + return "dB-1dot77"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + default: + invalid_enum_value(value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); + } + return ""; +} +float phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_::to_number() const +{ + const static float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return get_enum_number(options, 8, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); +} +std::string phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_::to_number_string() const +{ + switch (value) { + case db_minus6: + return "-6"; + case db_minus4dot77: + return "-4.77"; + case db_minus3: + return "-3"; + case db_minus1dot77: + return "-1.77"; + case db0: + return "0"; + case db1: + return "1"; + case db2: + return "2"; + case db3: + return "3"; + default: + invalid_enum_number(value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); + } + return ""; +} + +std::string phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::types::to_string() const +{ + switch (value) { + case cfi_cfg_r15: + return "cfi-Config-r15"; + case cfi_pattern_cfg_r15: + return "cfi-PatternConfig-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::types"); + } + return ""; +} + +std::string +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n6: + return "n6"; + default: + invalid_enum_value( + value, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {4, 6}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_"); +} + +std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: + max_num_slot_subslot_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n6: + return "n6"; + default: + invalid_enum_value(value, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_" + "subslot_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_e_:: + to_number() const +{ + const static uint8_t options[] = {4, 6}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case dlrvseq1: + return "dlrvseq1"; + case dlrvseq2: + return "dlrvseq2"; + default: + invalid_enum_value( + value, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case dlrvseq1: + return "dlrvseq1"; + case dlrvseq2: + return "dlrvseq2"; + default: + invalid_enum_value( + value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_"); +} + +std::string +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_::to_string() + const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + default: + invalid_enum_value( + value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t +phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_::to_number() + const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number( + options, 2, value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_e_"); +} + +std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + default: + invalid_enum_value(value, "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_" + "subslot_pdsch_repeats_r15_e_"); + } + return ""; +} +uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: + mcs_restrict_slot_subslot_pdsch_repeats_r15_e_::to_number() const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number(options, 2, value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_" + "pdsch_repeats_r15_e_"); +} + +std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_::to_string() const +{ + switch (value) { + case delta_f_minus1: + return "deltaF-1"; + case delta_f0: + return "deltaF0"; + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case delta_f3: + return "deltaF3"; + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_"); + } + return ""; +} +int8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_::to_number() const +{ + const static int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 8, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_"); +} + +std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_::to_string() const +{ + switch (value) { + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_"); +} + +std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_::to_string() const +{ + switch (value) { + case delta_f16: + return "deltaF16"; + case delta_f15: + return "deltaF15"; + case delta_f14: + return "deltaF14"; + case delta_f13: + return "deltaF13"; + case delta_f12: + return "deltaF12"; + case delta_f11: + return "deltaF11"; + case delta_f10: + return "deltaF10"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_::to_number() const +{ + const static uint8_t options[] = {16, 15, 14, 13, 12, 11, 10}; + return get_enum_number(options, 7, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_"); +} + +std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_::to_string() const +{ + switch (value) { + case delta_f13: + return "deltaF13"; + case delta_f12: + return "deltaF12"; + case delta_f11: + return "deltaF11"; + case delta_f10: + return "deltaF10"; + case delta_f9: + return "deltaF9"; + case delta_f8: + return "deltaF8"; + case delta_f7: + return "deltaF7"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_::to_number() const +{ + const static uint8_t options[] = {13, 12, 11, 10, 9, 8, 7}; + return get_enum_number(options, 7, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_"); +} + +std::string ant_info_ded_v10i0_s::max_layers_mimo_r10_e_::to_string() const +{ + switch (value) { + case two_layers: + return "twoLayers"; + case four_layers: + return "fourLayers"; + case eight_layers: + return "eightLayers"; + default: + invalid_enum_value(value, "ant_info_ded_v10i0_s::max_layers_mimo_r10_e_"); + } + return ""; +} +uint8_t ant_info_ded_v10i0_s::max_layers_mimo_r10_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 8}; + return get_enum_number(options, 3, value, "ant_info_ded_v10i0_s::max_layers_mimo_r10_e_"); +} + +std::string rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_"); + } + return ""; +} +uint8_t rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_"); +} + +std::string rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_e_"); + } + return ""; +} +uint8_t rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, + "rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_e_"); +} + +std::string rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_e_"); + } + return ""; +} +uint8_t rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, + "rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_e_"); +} + +std::string rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_::to_string() const +{ + switch (value) { + case sa2: + return "sa2"; + case sa4: + return "sa4"; + case sa5: + return "sa5"; + default: + invalid_enum_value(value, "rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_"); + } + return ""; +} +uint8_t rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_::to_number() const +{ + const static uint8_t options[] = {2, 4, 5}; + return get_enum_number(options, 3, value, "rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_"); +} + +// CipheringAlgorithm-r12 ::= ENUMERATED +std::string ciphering_algorithm_r12_e::to_string() const +{ + switch (value) { + case eea0: + return "eea0"; + case eea1: + return "eea1"; + case eea2: + return "eea2"; + case eea3_v1130: + return "eea3-v1130"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ciphering_algorithm_r12_e"); + } + return ""; +} +uint8_t ciphering_algorithm_r12_e::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "ciphering_algorithm_r12_e"); +} + +std::string sl_hop_cfg_disc_r12_s::c_r12_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n5: + return "n5"; + default: + invalid_enum_value(value, "sl_hop_cfg_disc_r12_s::c_r12_e_"); + } + return ""; +} +uint8_t sl_hop_cfg_disc_r12_s::c_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 5}; + return get_enum_number(options, 2, value, "sl_hop_cfg_disc_r12_s::c_r12_e_"); +} + +std::string security_algorithm_cfg_s::integrity_prot_algorithm_e_::to_string() const +{ + switch (value) { + case eia0_v920: + return "eia0-v920"; + case eia1: + return "eia1"; + case eia2: + return "eia2"; + case eia3_v1130: + return "eia3-v1130"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "security_algorithm_cfg_s::integrity_prot_algorithm_e_"); + } + return ""; +} +uint8_t security_algorithm_cfg_s::integrity_prot_algorithm_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3}; + return get_enum_number(options, 4, value, "security_algorithm_cfg_s::integrity_prot_algorithm_e_"); +} + +std::string drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types::to_string() const +{ + switch (value) { + case split_r12: + return "split-r12"; + case scg_r12: + return "scg-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types"); + } + return ""; +} + +std::string ip_address_r13_c::types::to_string() const +{ + switch (value) { + case ipv4_r13: + return "ipv4-r13"; + case ipv6_r13: + return "ipv6-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ip_address_r13_c::types"); + } + return ""; +} +uint8_t ip_address_r13_c::types::to_number() const +{ + const static uint8_t options[] = {4, 6}; + return get_enum_number(options, 2, value, "ip_address_r13_c::types"); +} + +std::string security_cfg_ho_v1530_s::ho_type_v1530_c_::types::to_string() const +{ + switch (value) { + case intra5_gc_r15: + return "intra5GC-r15"; + case ngc_to_epc_r15: + return "ngc-ToEPC-r15"; + case epc_to_ngc_r15: + return "epc-ToNGC-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "security_cfg_ho_v1530_s::ho_type_v1530_c_::types"); + } + return ""; +} +uint8_t security_cfg_ho_v1530_s::ho_type_v1530_c_::types::to_number() const +{ + const static uint8_t options[] = {5}; + return get_enum_number(options, 1, value, "security_cfg_ho_v1530_s::ho_type_v1530_c_::types"); +} + +std::string ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_::to_string() const +{ + switch (value) { + case delta_f16: + return "deltaF16"; + case delta_f15: + return "deltaF15"; + case delta_f14: + return "deltaF14"; + case delta_f13: + return "deltaF13"; + case delta_f12: + return "deltaF12"; + case delta_f11: + return "deltaF11"; + case delta_f10: + return "deltaF10"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_::to_number() const +{ + const static uint8_t options[] = {16, 15, 14, 13, 12, 11, 10}; + return get_enum_number(options, 7, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_"); +} + +std::string ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_::to_string() const +{ + switch (value) { + case delta_f13: + return "deltaF13"; + case delta_f12: + return "deltaF12"; + case delta_f11: + return "deltaF11"; + case delta_f10: + return "deltaF10"; + case delta_f9: + return "deltaF9"; + case delta_f8: + return "deltaF8"; + case delta_f7: + return "deltaF7"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_::to_number() const +{ + const static uint8_t options[] = {13, 12, 11, 10, 9, 8, 7}; + return get_enum_number(options, 7, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_"); +} + +std::string ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_::to_string() const +{ + switch (value) { + case delta_f_minus1: + return "deltaF-1"; + case delta_f0: + return "deltaF0"; + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case delta_f3: + return "deltaF3"; + case delta_f4: + return "deltaF4"; + case delta_f5: + return "deltaF5"; + case delta_f6: + return "deltaF6"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_"); + } + return ""; +} +int8_t ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_::to_number() const +{ + const static int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 8, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_"); +} + +std::string ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_::to_string() const +{ + switch (value) { + case delta_f1: + return "deltaF1"; + case delta_f2: + return "deltaF2"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_"); + } + return ""; +} +uint8_t ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_"); +} + +std::string rach_skip_r14_s::target_ta_r14_c_::types::to_string() const +{ + switch (value) { + case ta0_r14: + return "ta0-r14"; + case mcg_ptag_r14: + return "mcg-PTAG-r14"; + case scg_ptag_r14: + return "scg-PTAG-r14"; + case mcg_stag_r14: + return "mcg-STAG-r14"; + case scg_stag_r14: + return "scg-STAG-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rach_skip_r14_s::target_ta_r14_c_::types"); + } + return ""; +} +uint8_t rach_skip_r14_s::target_ta_r14_c_::types::to_number() const +{ + const static uint8_t options[] = {0}; + return get_enum_number(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types"); +} + +std::string rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_::to_string() const +{ + switch (value) { + case sf2: + return "sf2"; + case sf5: + return "sf5"; + case sf10: + return "sf10"; + default: + invalid_enum_value(value, "rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_"); + } + return ""; +} +uint8_t rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_::to_number() const +{ + const static uint8_t options[] = {2, 5, 10}; + return get_enum_number(options, 3, value, "rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_"); +} + +std::string rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_"); + } + return ""; +} +uint16_t rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_::to_number() const +{ + const static uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return get_enum_number(options, 7, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_"); +} + +std::string rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n6: + return "n6"; + case n8: + return "n8"; + case n10: + return "n10"; + case n20: + return "n20"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_"); + } + return ""; +} +uint8_t rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return get_enum_number(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_"); +} + +std::string rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n8: + return "n8"; + case n10: + return "n10"; + default: + invalid_enum_value(value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_"); + } + return ""; +} +uint8_t rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return get_enum_number(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_"); +} + +std::string scell_to_add_mod_r10_s::s_cell_state_r15_e_::to_string() const +{ + switch (value) { + case activ: + return "activated"; + case dormant: + return "dormant"; + default: + invalid_enum_value(value, "scell_to_add_mod_r10_s::s_cell_state_r15_e_"); + } + return ""; +} + +std::string scell_to_add_mod_ext_v1430_s::s_cell_state_r15_e_::to_string() const +{ + switch (value) { + case activ: + return "activated"; + case dormant: + return "dormant"; + default: + invalid_enum_value(value, "scell_to_add_mod_ext_v1430_s::s_cell_state_r15_e_"); + } + return ""; +} + +std::string sl_disc_tx_ref_carrier_ded_r13_c::types::to_string() const +{ + switch (value) { + case p_cell: + return "pCell"; + case s_cell: + return "sCell"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_disc_tx_ref_carrier_ded_r13_c::types"); + } + return ""; +} + +std::string sl_disc_tx_res_r13_c::setup_c_::types::to_string() const +{ + switch (value) { + case sched_r13: + return "scheduled-r13"; + case ue_sel_r13: + return "ue-Selected-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_disc_tx_res_r13_c::setup_c_::types"); + } + return ""; +} + +std::string sl_gap_pattern_r13_s::gap_period_r13_e_::to_string() const +{ + switch (value) { + case sf40: + return "sf40"; + case sf60: + return "sf60"; + case sf70: + return "sf70"; + case sf80: + return "sf80"; + case sf120: + return "sf120"; + case sf140: + return "sf140"; + case sf160: + return "sf160"; + case sf240: + return "sf240"; + case sf280: + return "sf280"; + case sf320: + return "sf320"; + case sf640: + return "sf640"; + case sf1280: + return "sf1280"; + case sf2560: + return "sf2560"; + case sf5120: + return "sf5120"; + case sf10240: + return "sf10240"; + default: + invalid_enum_value(value, "sl_gap_pattern_r13_s::gap_period_r13_e_"); + } + return ""; +} +uint16_t sl_gap_pattern_r13_s::gap_period_r13_e_::to_number() const +{ + const static uint16_t options[] = {40, 60, 70, 80, 120, 140, 160, 240, 280, 320, 640, 1280, 2560, 5120, 10240}; + return get_enum_number(options, 15, value, "sl_gap_pattern_r13_s::gap_period_r13_e_"); +} + +// SubframeAssignment-r15 ::= ENUMERATED +std::string sf_assign_r15_e::to_string() const +{ + switch (value) { + case sa0: + return "sa0"; + case sa1: + return "sa1"; + case sa2: + return "sa2"; + case sa3: + return "sa3"; + case sa4: + return "sa4"; + case sa5: + return "sa5"; + case sa6: + return "sa6"; + default: + invalid_enum_value(value, "sf_assign_r15_e"); + } + return ""; +} +uint8_t sf_assign_r15_e::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; + return get_enum_number(options, 7, value, "sf_assign_r15_e"); +} + +std::string wlan_mob_cfg_r13_s::association_timer_r13_e_::to_string() const +{ + switch (value) { + case s10: + return "s10"; + case s30: + return "s30"; + case s60: + return "s60"; + case s120: + return "s120"; + case s240: + return "s240"; + default: + invalid_enum_value(value, "wlan_mob_cfg_r13_s::association_timer_r13_e_"); + } + return ""; +} +uint8_t wlan_mob_cfg_r13_s::association_timer_r13_e_::to_number() const +{ + const static uint8_t options[] = {10, 30, 60, 120, 240}; + return get_enum_number(options, 5, value, "wlan_mob_cfg_r13_s::association_timer_r13_e_"); +} + +// CA-BandwidthClass-r10 ::= ENUMERATED +std::string ca_bw_class_r10_e::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + case d: + return "d"; + case e: + return "e"; + case f: + return "f"; + default: + invalid_enum_value(value, "ca_bw_class_r10_e"); + } + return ""; +} + +std::string mob_ctrl_info_scg_r12_s::t307_r12_e_::to_string() const +{ + switch (value) { + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms200: + return "ms200"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "mob_ctrl_info_scg_r12_s::t307_r12_e_"); + } + return ""; +} +uint16_t mob_ctrl_info_scg_r12_s::t307_r12_e_::to_number() const +{ + const static uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000}; + return get_enum_number(options, 7, value, "mob_ctrl_info_scg_r12_s::t307_r12_e_"); +} + +std::string rclwi_cfg_r13_s::cmd_c_::types::to_string() const +{ + switch (value) { + case steer_to_wlan_r13: + return "steerToWLAN-r13"; + case steer_to_lte_r13: + return "steerToLTE-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rclwi_cfg_r13_s::cmd_c_::types"); + } + return ""; +} + +std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sched_r14: + return "scheduled-r14"; + case ue_sel_r14: + return "ue-Selected-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types"); + } + return ""; +} + +std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sched_v1530: + return "scheduled-v1530"; + case ue_sel_v1530: + return "ue-Selected-v1530"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types"); + } + return ""; +} + +std::string ran_notif_area_info_r15_c::types::to_string() const +{ + switch (value) { + case cell_list_r15: + return "cellList-r15"; + case ran_area_cfg_list_r15: + return "ran-AreaConfigList-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ran_notif_area_info_r15_c::types"); + } + return ""; +} + +std::string meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_::to_string() const +{ + switch (value) { + case sec10: + return "sec10"; + case sec30: + return "sec30"; + case sec60: + return "sec60"; + case sec120: + return "sec120"; + case sec180: + return "sec180"; + case sec240: + return "sec240"; + case sec300: + return "sec300"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_"); + } + return ""; +} +uint16_t meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_::to_number() const +{ + const static uint16_t options[] = {10, 30, 60, 120, 180, 240, 300}; + return get_enum_number(options, 7, value, "meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_"); +} + +std::string rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_::to_string() const +{ + switch (value) { + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + default: + invalid_enum_value(value, "rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_"); + } + return ""; +} +uint16_t rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_::to_number() const +{ + const static uint16_t options[] = {32, 64, 128, 256}; + return get_enum_number(options, 4, value, "rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_"); +} + +std::string rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_::to_string() const +{ + switch (value) { + case min5: + return "min5"; + case min10: + return "min10"; + case min20: + return "min20"; + case min30: + return "min30"; + case min60: + return "min60"; + case min120: + return "min120"; + case min360: + return "min360"; + case min720: + return "min720"; + default: + invalid_enum_value(value, "rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_"); + } + return ""; +} +uint16_t rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_::to_number() const +{ + const static uint16_t options[] = {5, 10, 20, 30, 60, 120, 360, 720}; + return get_enum_number(options, 8, value, "rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_"); +} + +std::string sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sched_r12: + return "scheduled-r12"; + case ue_sel_r12: + return "ue-Selected-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types"); + } + return ""; +} + +std::string sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sched_v1310: + return "scheduled-v1310"; + case ue_sel_v1310: + return "ue-Selected-v1310"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types"); + } + return ""; +} + +std::string sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sched_r12: + return "scheduled-r12"; + case ue_sel_r12: + return "ue-Selected-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types"); + } + return ""; +} + +std::string sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types::to_string() const +{ + switch (value) { + case sched_r13: + return "scheduled-r13"; + case ue_sel_r13: + return "ue-Selected-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types"); + } + return ""; +} + +std::string sl_sync_tx_ctrl_r12_s::network_ctrl_sync_tx_r12_e_::to_string() const +{ + switch (value) { + case on: + return "on"; + case off: + return "off"; + default: + invalid_enum_value(value, "sl_sync_tx_ctrl_r12_s::network_ctrl_sync_tx_r12_e_"); + } + return ""; +} + +// CDMA2000-Type ::= ENUMERATED +std::string cdma2000_type_e::to_string() const +{ + switch (value) { + case type1_xrtt: + return "type1XRTT"; + case type_hrpd: + return "typeHRPD"; + default: + invalid_enum_value(value, "cdma2000_type_e"); + } + return ""; +} +uint8_t cdma2000_type_e::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "cdma2000_type_e"); +} + +// MeasCycleSCell-r10 ::= ENUMERATED +std::string meas_cycle_scell_r10_e::to_string() const +{ + switch (value) { + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case sf320: + return "sf320"; + case sf512: + return "sf512"; + case sf640: + return "sf640"; + case sf1024: + return "sf1024"; + case sf1280: + return "sf1280"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "meas_cycle_scell_r10_e"); + } + return ""; +} +uint16_t meas_cycle_scell_r10_e::to_number() const +{ + const static uint16_t options[] = {160, 256, 320, 512, 640, 1024, 1280}; + return get_enum_number(options, 7, value, "meas_cycle_scell_r10_e"); +} + +std::string meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types::to_string() const +{ + switch (value) { + case ms40_r12: + return "ms40-r12"; + case ms80_r12: + return "ms80-r12"; + case ms160_r12: + return "ms160-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types"); + } + return ""; +} +uint8_t meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types::to_number() const +{ + const static uint8_t options[] = {40, 80, 160}; + return get_enum_number(options, 3, value, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types"); +} + +std::string meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::types::to_string() const +{ + switch (value) { + case dur_fdd_r12: + return "durationFDD-r12"; + case dur_tdd_r12: + return "durationTDD-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::types"); + } + return ""; +} + +std::string meas_gap_cfg_c::setup_s_::gap_offset_c_::types::to_string() const +{ + switch (value) { + case gp0: + return "gp0"; + case gp1: + return "gp1"; + case gp2_r14: + return "gp2-r14"; + case gp3_r14: + return "gp3-r14"; + case gp_ncsg0_r14: + return "gp-ncsg0-r14"; + case gp_ncsg1_r14: + return "gp-ncsg1-r14"; + case gp_ncsg2_r14: + return "gp-ncsg2-r14"; + case gp_ncsg3_r14: + return "gp-ncsg3-r14"; + case gp_non_uniform1_r14: + return "gp-nonUniform1-r14"; + case gp_non_uniform2_r14: + return "gp-nonUniform2-r14"; + case gp_non_uniform3_r14: + return "gp-nonUniform3-r14"; + case gp_non_uniform4_r14: + return "gp-nonUniform4-r14"; + case gp4_r15: + return "gp4-r15"; + case gp5_r15: + return "gp5-r15"; + case gp6_r15: + return "gp6-r15"; + case gp7_r15: + return "gp7-r15"; + case gp8_r15: + return "gp8-r15"; + case gp9_r15: + return "gp9-r15"; + case gp10_r15: + return "gp10-r15"; + case gp11_r15: + return "gp11-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_gap_cfg_c::setup_s_::gap_offset_c_::types"); + } + return ""; +} + +std::string meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_::to_string() const +{ + switch (value) { + case ms20: + return "ms20"; + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms400: + return "ms400"; + case ms500: + return "ms500"; + case ms600: + return "ms600"; + case ms700: + return "ms700"; + case ms800: + return "ms800"; + case ms900: + return "ms900"; + case ms1000: + return "ms1000"; + default: + invalid_enum_value(value, "meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_"); + } + return ""; +} +uint16_t meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_::to_number() const +{ + const static uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return get_enum_number(options, 12, value, "meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_"); +} + +std::string rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_::to_string() const +{ + switch (value) { + case ms40: + return "ms40"; + case ms80: + return "ms80"; + case ms160: + return "ms160"; + case ms320: + return "ms320"; + case ms640: + return "ms640"; + default: + invalid_enum_value(value, "rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_"); + } + return ""; +} +uint16_t rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_::to_number() const +{ + const static uint16_t options[] = {40, 80, 160, 320, 640}; + return get_enum_number(options, 5, value, "rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_"); +} + +std::string rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_::to_string() const +{ + switch (value) { + case sym1: + return "sym1"; + case sym14: + return "sym14"; + case sym28: + return "sym28"; + case sym42: + return "sym42"; + case sym70: + return "sym70"; + default: + invalid_enum_value(value, "rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_"); + } + return ""; +} +uint8_t rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 14, 28, 42, 70}; + return get_enum_number(options, 5, value, "rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_"); +} + +std::string rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_e_::to_string() const +{ + switch (value) { + case min5: + return "min5"; + case min10: + return "min10"; + case min20: + return "min20"; + case min30: + return "min30"; + case min60: + return "min60"; + case min120: + return "min120"; + case min180: + return "min180"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_e_"); + } + return ""; +} +uint8_t rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_e_::to_number() const +{ + const static uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; + return get_enum_number(options, 7, value, + "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_e_"); +} + +std::string rrc_conn_release_v1530_ies_s::cn_type_r15_e_::to_string() const +{ + switch (value) { + case epc: + return "epc"; + case fivegc: + return "fivegc"; + default: + invalid_enum_value(value, "rrc_conn_release_v1530_ies_s::cn_type_r15_e_"); + } + return ""; +} +uint8_t rrc_conn_release_v1530_ies_s::cn_type_r15_e_::to_number() const +{ + switch (value) { + case fivegc: + return 5; + default: + invalid_enum_number(value, "rrc_conn_release_v1530_ies_s::cn_type_r15_e_"); + } + return 0; +} + +std::string rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_::to_string() const +{ + switch (value) { + case k_hz15: + return "kHz15"; + case k_hz30: + return "kHz30"; + case k_hz120: + return "kHz120"; + case k_hz240: + return "kHz240"; + default: + invalid_enum_value(value, "rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); + } + return ""; +} +uint8_t rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_::to_number() const +{ + const static uint8_t options[] = {15, 30, 120, 240}; + return get_enum_number(options, 4, value, "rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); +} + +// ReportInterval ::= ENUMERATED +std::string report_interv_e::to_string() const +{ + switch (value) { + case ms120: + return "ms120"; + case ms240: + return "ms240"; + case ms480: + return "ms480"; + case ms640: + return "ms640"; + case ms1024: + return "ms1024"; + case ms2048: + return "ms2048"; + case ms5120: + return "ms5120"; + case ms10240: + return "ms10240"; + case min1: + return "min1"; + case min6: + return "min6"; + case min12: + return "min12"; + case min30: + return "min30"; + case min60: + return "min60"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "report_interv_e"); + } + return ""; +} +uint16_t report_interv_e::to_number() const +{ + const static uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 1, 6, 12, 30, 60}; + return get_enum_number(options, 13, value, "report_interv_e"); +} + +std::string thres_eutra_c::types::to_string() const +{ + switch (value) { + case thres_rsrp: + return "threshold-RSRP"; + case thres_rsrq: + return "threshold-RSRQ"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "thres_eutra_c::types"); + } + return ""; +} + +std::string thres_nr_r15_c::types::to_string() const +{ + switch (value) { + case nr_rsrp_r15: + return "nr-RSRP-r15"; + case nr_rsrq_r15: + return "nr-RSRQ-r15"; + case nr_sinr_r15: + return "nr-SINR-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "thres_nr_r15_c::types"); + } + return ""; +} + +std::string thres_utra_c::types::to_string() const +{ + switch (value) { + case utra_rscp: + return "utra-RSCP"; + case utra_ec_n0: + return "utra-EcN0"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "thres_utra_c::types"); + } + return ""; +} +uint8_t thres_utra_c::types::to_number() const +{ + switch (value) { + case utra_ec_n0: + return 0; + default: + invalid_enum_number(value, "thres_utra_c::types"); + } + return 0; +} + +// TimeToTrigger ::= ENUMERATED +std::string time_to_trigger_e::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms40: + return "ms40"; + case ms64: + return "ms64"; + case ms80: + return "ms80"; + case ms100: + return "ms100"; + case ms128: + return "ms128"; + case ms160: + return "ms160"; + case ms256: + return "ms256"; + case ms320: + return "ms320"; + case ms480: + return "ms480"; + case ms512: + return "ms512"; + case ms640: + return "ms640"; + case ms1024: + return "ms1024"; + case ms1280: + return "ms1280"; + case ms2560: + return "ms2560"; + case ms5120: + return "ms5120"; + default: + invalid_enum_value(value, "time_to_trigger_e"); + } + return ""; +} +uint16_t time_to_trigger_e::to_number() const +{ + const static uint16_t options[] = {0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}; + return get_enum_number(options, 16, value, "time_to_trigger_e"); +} + +std::string ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_::to_string() const +{ + switch (value) { + case ms30: + return "ms30"; + case ms40: + return "ms40"; + case ms50: + return "ms50"; + case ms60: + return "ms60"; + case ms70: + return "ms70"; + case ms80: + return "ms80"; + case ms90: + return "ms90"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms300: + return "ms300"; + case ms500: + return "ms500"; + case ms750: + return "ms750"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_"); + } + return ""; +} +uint16_t ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_::to_number() const +{ + const static uint16_t options[] = {30, 40, 50, 60, 70, 80, 90, 100, 150, 300, 500, 750}; + return get_enum_number(options, 12, value, "ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_"); +} + +// WLAN-BandIndicator-r13 ::= ENUMERATED +std::string wlan_band_ind_r13_e::to_string() const +{ + switch (value) { + case band2dot4: + return "band2dot4"; + case band5: + return "band5"; + case band60_v1430: + return "band60-v1430"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "wlan_band_ind_r13_e"); + } + return ""; +} +float wlan_band_ind_r13_e::to_number() const +{ + const static float options[] = {2.4, 5.0, 60.0}; + return get_enum_number(options, 3, value, "wlan_band_ind_r13_e"); +} +std::string wlan_band_ind_r13_e::to_number_string() const +{ + switch (value) { + case band2dot4: + return "2.4"; + case band5: + return "5"; + case band60_v1430: + return "60"; + default: + invalid_enum_number(value, "wlan_band_ind_r13_e"); + } + return ""; +} + +std::string wlan_carrier_info_r13_s::country_code_r13_e_::to_string() const +{ + switch (value) { + case united_states: + return "unitedStates"; + case europe: + return "europe"; + case japan: + return "japan"; + case global: + return "global"; + default: + invalid_enum_value(value, "wlan_carrier_info_r13_s::country_code_r13_e_"); + } + return ""; +} + +std::string idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_e_::to_string() const +{ + switch (value) { + case n2: + return "n2"; + case n5: + return "n5"; + case n10: + return "n10"; + case n15: + return "n15"; + case n20: + return "n20"; + case n30: + return "n30"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_e_"); + } + return ""; +} +uint8_t idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_e_::to_number() const +{ + const static uint8_t options[] = {2, 5, 10, 15, 20, 30}; + return get_enum_number(options, 6, value, + "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_e_"); +} + +std::string idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_e_::to_string() const +{ + switch (value) { + case sf200: + return "sf200"; + case sf500: + return "sf500"; + case sf1000: + return "sf1000"; + case sf2000: + return "sf2000"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_e_"); + } + return ""; +} +uint16_t idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_e_::to_number() const +{ + const static uint16_t options[] = {200, 500, 1000, 2000}; + return get_enum_number(options, 4, value, + "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_e_"); +} + +std::string meas_obj_eutra_s::t312_r12_c_::setup_e_::to_string() const +{ + switch (value) { + case ms0: + return "ms0"; + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms300: + return "ms300"; + case ms400: + return "ms400"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + default: + invalid_enum_value(value, "meas_obj_eutra_s::t312_r12_c_::setup_e_"); + } + return ""; +} +uint16_t meas_obj_eutra_s::t312_r12_c_::setup_e_::to_number() const +{ + const static uint16_t options[] = {0, 50, 100, 200, 300, 400, 500, 1000}; + return get_enum_number(options, 8, value, "meas_obj_eutra_s::t312_r12_c_::setup_e_"); +} + +std::string meas_obj_utra_s::cells_to_add_mod_list_c_::types::to_string() const +{ + switch (value) { + case cells_to_add_mod_list_utra_fdd: + return "cellsToAddModListUTRA-FDD"; + case cells_to_add_mod_list_utra_tdd: + return "cellsToAddModListUTRA-TDD"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_obj_utra_s::cells_to_add_mod_list_c_::types"); + } + return ""; +} + +std::string meas_obj_utra_s::cell_for_which_to_report_cgi_c_::types::to_string() const +{ + switch (value) { + case utra_fdd: + return "utra-FDD"; + case utra_tdd: + return "utra-TDD"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_::types"); + } + return ""; +} + +std::string meas_obj_wlan_r13_s::carrier_freq_r13_c_::types::to_string() const +{ + switch (value) { + case band_ind_list_wlan_r13: + return "bandIndicatorListWLAN-r13"; + case carrier_info_list_wlan_r13: + return "carrierInfoListWLAN-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_obj_wlan_r13_s::carrier_freq_r13_c_::types"); + } + return ""; +} + +std::string pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s0dot5: + return "s0dot5"; + case s1: + return "s1"; + case s2: + return "s2"; + case s5: + return "s5"; + case s10: + return "s10"; + case s20: + return "s20"; + case s30: + return "s30"; + case s60: + return "s60"; + case s90: + return "s90"; + case s120: + return "s120"; + case s300: + return "s300"; + case s600: + return "s600"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); + } + return ""; +} +float pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return get_enum_number(options, 13, value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); +} +std::string pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_::to_number_string() const +{ + switch (value) { + case s0: + return "0"; + case s0dot5: + return "0.5"; + case s1: + return "1"; + case s2: + return "2"; + case s5: + return "5"; + case s10: + return "10"; + case s20: + return "20"; + case s30: + return "30"; + case s60: + return "60"; + case s90: + return "90"; + case s120: + return "120"; + case s300: + return "300"; + case s600: + return "600"; + default: + invalid_enum_number(value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); + } + return ""; +} + +std::string report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_::types::to_string() const +{ + switch (value) { + case event_a1: + return "eventA1"; + case event_a2: + return "eventA2"; + case event_a3: + return "eventA3"; + case event_a4: + return "eventA4"; + case event_a5: + return "eventA5"; + case event_a6_r10: + return "eventA6-r10"; + case event_c1_r12: + return "eventC1-r12"; + case event_c2_r12: + return "eventC2-r12"; + case event_v1_r14: + return "eventV1-r14"; + case event_v2_r14: + return "eventV2-r14"; + case event_h1_r15: + return "eventH1-r15"; + case event_h2_r15: + return "eventH2-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::trigger_type_c_::event_s_::event_id_c_::types"); + } + return ""; +} + +std::string report_cfg_eutra_s::trigger_type_c_::periodical_s_::purpose_e_::to_string() const +{ + switch (value) { + case report_strongest_cells: + return "reportStrongestCells"; + case report_cgi: + return "reportCGI"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::trigger_type_c_::periodical_s_::purpose_e_"); + } + return ""; +} + +std::string report_cfg_eutra_s::trigger_type_c_::types::to_string() const +{ + switch (value) { + case event: + return "event"; + case periodical: + return "periodical"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::trigger_type_c_::types"); + } + return ""; +} + +std::string report_cfg_eutra_s::trigger_quant_e_::to_string() const +{ + switch (value) { + case rsrp: + return "rsrp"; + case rsrq: + return "rsrq"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::trigger_quant_e_"); + } + return ""; +} + +std::string report_cfg_eutra_s::report_quant_e_::to_string() const +{ + switch (value) { + case same_as_trigger_quant: + return "sameAsTriggerQuantity"; + case both: + return "both"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::report_quant_e_"); + } + return ""; +} + +std::string report_cfg_eutra_s::report_amount_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::report_amount_e_"); + } + return ""; +} +int8_t report_cfg_eutra_s::report_amount_e_::to_number() const +{ + const static int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return get_enum_number(options, 8, value, "report_cfg_eutra_s::report_amount_e_"); +} + +std::string report_cfg_eutra_s::rs_sinr_cfg_r13_c_::setup_s_::report_quant_v1310_e_::to_string() const +{ + switch (value) { + case rsrp_andsinr: + return "rsrpANDsinr"; + case rsrq_andsinr: + return "rsrqANDsinr"; + case all: + return "all"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::rs_sinr_cfg_r13_c_::setup_s_::report_quant_v1310_e_"); + } + return ""; +} + +std::string report_cfg_eutra_s::purpose_v1430_e_::to_string() const +{ + switch (value) { + case report_location: + return "reportLocation"; + case sidelink: + return "sidelink"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "report_cfg_eutra_s::purpose_v1430_e_"); + } + return ""; +} + +std::string +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::types::to_string() const +{ + switch (value) { + case b1_thres_utra: + return "b1-ThresholdUTRA"; + case b1_thres_geran: + return "b1-ThresholdGERAN"; + case b1_thres_cdma2000: + return "b1-ThresholdCDMA2000"; + case nulltype: + return "NULL"; + default: + invalid_enum_value( + value, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::types"); + } + return ""; +} + +std::string +report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::types::to_string() const +{ + switch (value) { + case b2_thres2_utra: + return "b2-Threshold2UTRA"; + case b2_thres2_geran: + return "b2-Threshold2GERAN"; + case b2_thres2_cdma2000: + return "b2-Threshold2CDMA2000"; + case nulltype: + return "NULL"; + default: + invalid_enum_value( + value, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::types"); + } + return ""; +} + +std::string report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::types::to_string() const +{ + switch (value) { + case event_b1: + return "eventB1"; + case event_b2: + return "eventB2"; + case event_w1_r13: + return "eventW1-r13"; + case event_w2_r13: + return "eventW2-r13"; + case event_w3_r13: + return "eventW3-r13"; + case event_b1_nr_r15: + return "eventB1-NR-r15"; + case event_b2_nr_r15: + return "eventB2-NR-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::types"); + } + return ""; +} + +std::string report_cfg_inter_rat_s::trigger_type_c_::periodical_s_::purpose_e_::to_string() const +{ + switch (value) { + case report_strongest_cells: + return "reportStrongestCells"; + case report_strongest_cells_for_son: + return "reportStrongestCellsForSON"; + case report_cgi: + return "reportCGI"; + default: + invalid_enum_value(value, "report_cfg_inter_rat_s::trigger_type_c_::periodical_s_::purpose_e_"); + } + return ""; +} + +std::string report_cfg_inter_rat_s::trigger_type_c_::types::to_string() const +{ + switch (value) { + case event: + return "event"; + case periodical: + return "periodical"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "report_cfg_inter_rat_s::trigger_type_c_::types"); + } + return ""; +} + +std::string report_cfg_inter_rat_s::report_amount_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case infinity: + return "infinity"; + default: + invalid_enum_value(value, "report_cfg_inter_rat_s::report_amount_e_"); + } + return ""; +} +int8_t report_cfg_inter_rat_s::report_amount_e_::to_number() const +{ + const static int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return get_enum_number(options, 8, value, "report_cfg_inter_rat_s::report_amount_e_"); +} + +std::string report_cfg_inter_rat_s::report_sftd_meas_r15_e_::to_string() const +{ + switch (value) { + case p_scell: + return "pSCell"; + case neighbor_cells: + return "neighborCells"; + default: + invalid_enum_value(value, "report_cfg_inter_rat_s::report_sftd_meas_r15_e_"); + } + return ""; +} + +std::string meas_obj_to_add_mod_s::meas_obj_c_::types::to_string() const +{ + switch (value) { + case meas_obj_eutra: + return "measObjectEUTRA"; + case meas_obj_utra: + return "measObjectUTRA"; + case meas_obj_geran: + return "measObjectGERAN"; + case meas_obj_cdma2000: + return "measObjectCDMA2000"; + case meas_obj_wlan_r13: + return "measObjectWLAN-r13"; + case meas_obj_nr_r15: + return "measObjectNR-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); + } + return ""; +} +uint16_t meas_obj_to_add_mod_s::meas_obj_c_::types::to_number() const +{ + switch (value) { + case meas_obj_cdma2000: + return 2000; + default: + invalid_enum_number(value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); + } + return 0; +} + +std::string meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types::to_string() const +{ + switch (value) { + case meas_obj_eutra_r13: + return "measObjectEUTRA-r13"; + case meas_obj_utra_r13: + return "measObjectUTRA-r13"; + case meas_obj_geran_r13: + return "measObjectGERAN-r13"; + case meas_obj_cdma2000_r13: + return "measObjectCDMA2000-r13"; + case meas_obj_wlan_v1320: + return "measObjectWLAN-v1320"; + case meas_obj_nr_r15: + return "measObjectNR-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types"); + } + return ""; +} +uint16_t meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types::to_number() const +{ + switch (value) { + case meas_obj_cdma2000_r13: + return 2000; + default: + invalid_enum_number(value, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types"); + } + return 0; +} + +std::string other_cfg_r9_s::bw_pref_ind_timer_r14_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s0dot5: + return "s0dot5"; + case s1: + return "s1"; + case s2: + return "s2"; + case s5: + return "s5"; + case s10: + return "s10"; + case s20: + return "s20"; + case s30: + return "s30"; + case s60: + return "s60"; + case s90: + return "s90"; + case s120: + return "s120"; + case s300: + return "s300"; + case s600: + return "s600"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); + } + return ""; +} +float other_cfg_r9_s::bw_pref_ind_timer_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return get_enum_number(options, 13, value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); +} +std::string other_cfg_r9_s::bw_pref_ind_timer_r14_e_::to_number_string() const +{ + switch (value) { + case s0: + return "0"; + case s0dot5: + return "0.5"; + case s1: + return "1"; + case s2: + return "2"; + case s5: + return "5"; + case s10: + return "10"; + case s20: + return "20"; + case s30: + return "30"; + case s60: + return "60"; + case s90: + return "90"; + case s120: + return "120"; + case s300: + return "300"; + case s600: + return "600"; + default: + invalid_enum_number(value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); + } + return ""; +} + +std::string +other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s0dot4: + return "s0dot4"; + case s0dot8: + return "s0dot8"; + case s1dot6: + return "s1dot6"; + case s3: + return "s3"; + case s6: + return "s6"; + case s12: + return "s12"; + case s30: + return "s30"; + default: + invalid_enum_value( + value, "other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_e_"); + } + return ""; +} +float other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_e_::to_number() + const +{ + const static float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return get_enum_number( + options, 8, value, + "other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_e_"); +} +std::string +other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_e_::to_number_string() + const +{ + switch (value) { + case s0: + return "0"; + case s0dot4: + return "0.4"; + case s0dot8: + return "0.8"; + case s1dot6: + return "1.6"; + case s3: + return "3"; + case s6: + return "6"; + case s12: + return "12"; + case s30: + return "30"; + default: + invalid_enum_number( + value, "other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_e_"); + } + return ""; +} + +std::string other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s0dot5: + return "s0dot5"; + case s1: + return "s1"; + case s2: + return "s2"; + case s5: + return "s5"; + case s10: + return "s10"; + case s20: + return "s20"; + case s30: + return "s30"; + case s60: + return "s60"; + case s90: + return "s90"; + case s120: + return "s120"; + case s300: + return "s300"; + case s600: + return "s600"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_"); + } + return ""; +} +float other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return get_enum_number(options, 13, value, + "other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_"); +} +std::string other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_::to_number_string() const +{ + switch (value) { + case s0: + return "0"; + case s0dot5: + return "0.5"; + case s1: + return "1"; + case s2: + return "2"; + case s5: + return "5"; + case s10: + return "10"; + case s20: + return "20"; + case s30: + return "30"; + case s60: + return "60"; + case s90: + return "90"; + case s120: + return "120"; + case s300: + return "300"; + case s600: + return "600"; + default: + invalid_enum_number(value, "other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_"); + } + return ""; +} + +std::string other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_::to_string() const +{ + switch (value) { + case s0: + return "s0"; + case s0dot5: + return "s0dot5"; + case s1: + return "s1"; + case s2: + return "s2"; + case s5: + return "s5"; + case s10: + return "s10"; + case s20: + return "s20"; + case s30: + return "s30"; + case s60: + return "s60"; + case s90: + return "s90"; + case s120: + return "s120"; + case s300: + return "s300"; + case s600: + return "s600"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, + "other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_"); + } + return ""; +} +float other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return get_enum_number(options, 13, value, + "other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_"); +} +std::string +other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_::to_number_string() const +{ + switch (value) { + case s0: + return "0"; + case s0dot5: + return "0.5"; + case s1: + return "1"; + case s2: + return "2"; + case s5: + return "5"; + case s10: + return "10"; + case s20: + return "20"; + case s30: + return "30"; + case s60: + return "60"; + case s90: + return "90"; + case s120: + return "120"; + case s300: + return "300"; + case s600: + return "600"; + default: + invalid_enum_number(value, + "other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_"); + } + return ""; +} + +std::string other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_e_::to_string() const +{ + switch (value) { + case qoe: + return "qoe"; + case qoemtsi: + return "qoemtsi"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_e_"); + } + return ""; +} + +std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v1dot5: + return "v1dot5"; + case v2: + return "v2"; + case v2dot5: + return "v2dot5"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + default: + invalid_enum_value(value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); + } + return ""; +} +float prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_::to_number() const +{ + const static float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return get_enum_number(options, 8, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); +} +std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_::to_number_string() const +{ + switch (value) { + case v1: + return "1"; + case v1dot5: + return "1.5"; + case v2: + return "2"; + case v2dot5: + return "2.5"; + case v4: + return "4"; + case v5: + return "5"; + case v8: + return "8"; + case v10: + return "10"; + default: + invalid_enum_number(value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); + } + return ""; +} + +std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v2: + return "v2"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + case v20: + return "v20"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); + } + return ""; +} +uint8_t prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return get_enum_number(options, 7, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); +} + +std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types::to_string() const +{ + switch (value) { + case fdd_r13: + return "fdd-r13"; + case tdd_r13: + return "tdd-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types"); + } + return ""; +} + +std::string quant_cfg_cdma2000_s::meas_quant_cdma2000_e_::to_string() const +{ + switch (value) { + case pilot_strength: + return "pilotStrength"; + case pilot_pn_phase_and_pilot_strength: + return "pilotPnPhaseAndPilotStrength"; + default: + invalid_enum_value(value, "quant_cfg_cdma2000_s::meas_quant_cdma2000_e_"); + } + return ""; +} + +std::string quant_cfg_utra_s::meas_quant_utra_fdd_e_::to_string() const +{ + switch (value) { + case cpich_rscp: + return "cpich-RSCP"; + case cpich_ec_n0: + return "cpich-EcN0"; + default: + invalid_enum_value(value, "quant_cfg_utra_s::meas_quant_utra_fdd_e_"); + } + return ""; +} +uint8_t quant_cfg_utra_s::meas_quant_utra_fdd_e_::to_number() const +{ + switch (value) { + case cpich_ec_n0: + return 0; + default: + invalid_enum_number(value, "quant_cfg_utra_s::meas_quant_utra_fdd_e_"); + } + return 0; +} + +std::string report_cfg_to_add_mod_s::report_cfg_c_::types::to_string() const +{ + switch (value) { + case report_cfg_eutra: + return "reportConfigEUTRA"; + case report_cfg_inter_rat: + return "reportConfigInterRAT"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); + } + return ""; +} + +std::string carrier_bw_eutra_s::dl_bw_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + case spare10: + return "spare10"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "carrier_bw_eutra_s::dl_bw_e_"); + } + return ""; +} +uint8_t carrier_bw_eutra_s::dl_bw_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "carrier_bw_eutra_s::dl_bw_e_"); +} + +std::string carrier_bw_eutra_s::ul_bw_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + case spare10: + return "spare10"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "carrier_bw_eutra_s::ul_bw_e_"); + } + return ""; +} +uint8_t carrier_bw_eutra_s::ul_bw_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "carrier_bw_eutra_s::ul_bw_e_"); +} + +std::string carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_::to_string() const +{ + switch (value) { + case k_hz15: + return "kHz15"; + case k_hz30: + return "kHz30"; + case k_hz120: + return "kHz120"; + case k_hz240: + return "kHz240"; + default: + invalid_enum_value(value, "carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); + } + return ""; +} +uint8_t carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_::to_number() const +{ + const static uint8_t options[] = {15, 30, 120, 240}; + return get_enum_number(options, 4, value, "carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); +} + +std::string meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types::to_string() const +{ + switch (value) { + case rstd0_r15: + return "rstd0-r15"; + case rstd1_r15: + return "rstd1-r15"; + case rstd2_r15: + return "rstd2-r15"; + case rstd3_r15: + return "rstd3-r15"; + case rstd4_r15: + return "rstd4-r15"; + case rstd5_r15: + return "rstd5-r15"; + case rstd6_r15: + return "rstd6-r15"; + case rstd7_r15: + return "rstd7-r15"; + case rstd8_r15: + return "rstd8-r15"; + case rstd9_r15: + return "rstd9-r15"; + case rstd10_r15: + return "rstd10-r15"; + case rstd11_r15: + return "rstd11-r15"; + case rstd12_r15: + return "rstd12-r15"; + case rstd13_r15: + return "rstd13-r15"; + case rstd14_r15: + return "rstd14-r15"; + case rstd15_r15: + return "rstd15-r15"; + case rstd16_r15: + return "rstd16-r15"; + case rstd17_r15: + return "rstd17-r15"; + case rstd18_r15: + return "rstd18-r15"; + case rstd19_r15: + return "rstd19-r15"; + case rstd20_r15: + return "rstd20-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types"); + } + return ""; +} +uint8_t meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; + return get_enum_number(options, 21, value, + "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types"); +} + +std::string meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_::to_string() const +{ + switch (value) { + case scheme00: + return "scheme00"; + case scheme01: + return "scheme01"; + case scheme10: + return "scheme10"; + case scheme11: + return "scheme11"; + default: + invalid_enum_value(value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); + } + return ""; +} +float meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.1, 1.0, 1.1}; + return get_enum_number(options, 4, value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); +} +std::string meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_::to_number_string() const +{ + switch (value) { + case scheme00: + return "0.0"; + case scheme01: + return "0.1"; + case scheme10: + return "1.0"; + case scheme11: + return "1.1"; + default: + invalid_enum_number(value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); + } + return ""; +} + +// MeasScaleFactor-r12 ::= ENUMERATED +std::string meas_scale_factor_r12_e::to_string() const +{ + switch (value) { + case sf_eutra_cf1: + return "sf-EUTRA-cf1"; + case sf_eutra_cf2: + return "sf-EUTRA-cf2"; + default: + invalid_enum_value(value, "meas_scale_factor_r12_e"); + } + return ""; +} +uint8_t meas_scale_factor_r12_e::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "meas_scale_factor_r12_e"); +} + +// RAT-Type ::= ENUMERATED +std::string rat_type_e::to_string() const +{ + switch (value) { + case eutra: + return "eutra"; + case utra: + return "utra"; + case geran_cs: + return "geran-cs"; + case geran_ps: + return "geran-ps"; + case cdma2000_minus1_xrtt: + return "cdma2000-1XRTT"; + case nr: + return "nr"; + case eutra_nr: + return "eutra-nr"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "rat_type_e"); + } + return ""; +} +uint16_t rat_type_e::to_number() const +{ + switch (value) { + case cdma2000_minus1_xrtt: + return 2000; + default: + invalid_enum_number(value, "rat_type_e"); + } + return 0; +} + +std::string rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::types::to_string() const +{ + switch (value) { + case geran_r9: + return "geran-r9"; + case utra_fdd_r9: + return "utra-FDD-r9"; + case utra_tdd_r9: + return "utra-TDD-r9"; + case utra_tdd_r10: + return "utra-TDD-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::types"); + } + return ""; +} + +std::string si_or_psi_geran_c::types::to_string() const +{ + switch (value) { + case si: + return "si"; + case psi: + return "psi"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "si_or_psi_geran_c::types"); + } + return ""; +} + +std::string area_cfg_r10_c::types::to_string() const +{ + switch (value) { + case cell_global_id_list_r10: + return "cellGlobalIdList-r10"; + case tac_list_r10: + return "trackingAreaCodeList-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "area_cfg_r10_c::types"); + } + return ""; +} + +std::string cell_change_order_s::t304_e_::to_string() const +{ + switch (value) { + case ms100: + return "ms100"; + case ms200: + return "ms200"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + case ms4000: + return "ms4000"; + case ms8000: + return "ms8000"; + case ms10000_v1310: + return "ms10000-v1310"; + default: + invalid_enum_value(value, "cell_change_order_s::t304_e_"); + } + return ""; +} +uint16_t cell_change_order_s::t304_e_::to_number() const +{ + const static uint16_t options[] = {100, 200, 500, 1000, 2000, 4000, 8000, 10000}; + return get_enum_number(options, 8, value, "cell_change_order_s::t304_e_"); +} + +std::string cell_change_order_s::target_rat_type_c_::types::to_string() const +{ + switch (value) { + case geran: + return "geran"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cell_change_order_s::target_rat_type_c_::types"); + } + return ""; +} + +std::string e_csfb_r9_s::mob_cdma2000_hrpd_r9_e_::to_string() const +{ + switch (value) { + case ho: + return "handover"; + case redirection: + return "redirection"; + default: + invalid_enum_value(value, "e_csfb_r9_s::mob_cdma2000_hrpd_r9_e_"); + } + return ""; +} + +std::string ho_s::target_rat_type_e_::to_string() const +{ + switch (value) { + case utra: + return "utra"; + case geran: + return "geran"; + case cdma2000_minus1_xrtt: + return "cdma2000-1XRTT"; + case cdma2000_hrpd: + return "cdma2000-HRPD"; + case nr: + return "nr"; + case eutra: + return "eutra"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ho_s::target_rat_type_e_"); + } + return ""; +} + +// LoggingDuration-r10 ::= ENUMERATED +std::string logging_dur_r10_e::to_string() const +{ + switch (value) { + case min10: + return "min10"; + case min20: + return "min20"; + case min40: + return "min40"; + case min60: + return "min60"; + case min90: + return "min90"; + case min120: + return "min120"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "logging_dur_r10_e"); + } + return ""; +} +uint8_t logging_dur_r10_e::to_number() const +{ + const static uint8_t options[] = {10, 20, 40, 60, 90, 120}; + return get_enum_number(options, 6, value, "logging_dur_r10_e"); +} + +// LoggingInterval-r10 ::= ENUMERATED +std::string logging_interv_r10_e::to_string() const +{ + switch (value) { + case ms1280: + return "ms1280"; + case ms2560: + return "ms2560"; + case ms5120: + return "ms5120"; + case ms10240: + return "ms10240"; + case ms20480: + return "ms20480"; + case ms30720: + return "ms30720"; + case ms40960: + return "ms40960"; + case ms61440: + return "ms61440"; + default: + invalid_enum_value(value, "logging_interv_r10_e"); + } + return ""; +} +uint16_t logging_interv_r10_e::to_number() const +{ + const static uint16_t options[] = {1280, 2560, 5120, 10240, 20480, 30720, 40960, 61440}; + return get_enum_number(options, 8, value, "logging_interv_r10_e"); +} + +std::string mob_ctrl_info_s::t304_e_::to_string() const +{ + switch (value) { + case ms50: + return "ms50"; + case ms100: + return "ms100"; + case ms150: + return "ms150"; + case ms200: + return "ms200"; + case ms500: + return "ms500"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + case ms10000_v1310: + return "ms10000-v1310"; + default: + invalid_enum_value(value, "mob_ctrl_info_s::t304_e_"); + } + return ""; +} +uint16_t mob_ctrl_info_s::t304_e_::to_number() const +{ + const static uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000, 10000}; + return get_enum_number(options, 8, value, "mob_ctrl_info_s::t304_e_"); +} + +std::string mob_ctrl_info_s::ho_without_wt_change_r14_e_::to_string() const +{ + switch (value) { + case keep_lwa_cfg: + return "keepLWA-Config"; + case send_end_marker: + return "sendEndMarker"; + default: + invalid_enum_value(value, "mob_ctrl_info_s::ho_without_wt_change_r14_e_"); + } + return ""; +} + +std::string rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::types::to_string() const +{ + switch (value) { + case sf_cfg_pattern_fdd_r10: + return "subframeConfigPatternFDD-r10"; + case sf_cfg_pattern_tdd_r10: + return "subframeConfigPatternTDD-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::types"); + } + return ""; +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_alloc_type_r10_e_::to_string() const +{ + switch (value) { + case type0: + return "type0"; + case type1: + return "type1"; + case type2_localized: + return "type2Localized"; + case type2_distributed: + return "type2Distributed"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_alloc_type_r10_e_"); + } + return ""; +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types::to_string() const +{ + switch (value) { + case nrb6_r10: + return "nrb6-r10"; + case nrb15_r10: + return "nrb15-r10"; + case nrb25_r10: + return "nrb25-r10"; + case nrb50_r10: + return "nrb50-r10"; + case nrb75_r10: + return "nrb75-r10"; + case nrb100_r10: + return "nrb100-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types"); + } + return ""; +} +uint8_t rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, + "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types"); +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types::to_string() const +{ + switch (value) { + case nrb6_r10: + return "nrb6-r10"; + case nrb15_r10: + return "nrb15-r10"; + case nrb25_r10: + return "nrb25-r10"; + case nrb50_r10: + return "nrb50-r10"; + case nrb75_r10: + return "nrb75-r10"; + case nrb100_r10: + return "nrb100-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types"); + } + return ""; +} +uint8_t rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, + "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types"); +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types::to_string() const +{ + switch (value) { + case type01_r10: + return "type01-r10"; + case type2_r10: + return "type2-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); + } + return ""; +} +float rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types::to_number() const +{ + const static float options[] = {0.1, 2.0}; + return get_enum_number(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); +} +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types::to_number_string() const +{ + switch (value) { + case type01_r10: + return "0.1"; + case type2_r10: + return "2"; + default: + invalid_enum_number(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); + } + return ""; +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::no_interleaving_r10_e_::to_string() const +{ + switch (value) { + case crs: + return "crs"; + case dmrs: + return "dmrs"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::no_interleaving_r10_e_"); + } + return ""; +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::types::to_string() const +{ + switch (value) { + case interleaving_r10: + return "interleaving-r10"; + case no_interleaving_r10: + return "noInterleaving-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::types"); + } + return ""; +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types::to_string() const +{ + switch (value) { + case ch_sel_mux_bundling: + return "channelSelectionMultiplexingBundling"; + case fallback_for_format3: + return "fallbackForFormat3"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types"); + } + return ""; +} +uint8_t rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types::to_number() const +{ + switch (value) { + case fallback_for_format3: + return 3; + default: + invalid_enum_number(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types"); + } + return 0; +} + +std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::types::to_string() const +{ + switch (value) { + case tdd: + return "tdd"; + case fdd: + return "fdd"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::types"); + } + return ""; +} + +std::string redirected_carrier_info_c::types::to_string() const +{ + switch (value) { + case eutra: + return "eutra"; + case geran: + return "geran"; + case utra_fdd: + return "utra-FDD"; + case utra_tdd: + return "utra-TDD"; + case cdma2000_hrpd: + return "cdma2000-HRPD"; + case cdma2000_minus1x_rtt: + return "cdma2000-1xRTT"; + case utra_tdd_r10: + return "utra-TDD-r10"; + case nr_r15: + return "nr-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "redirected_carrier_info_c::types"); + } + return ""; +} + +// ReleaseCause ::= ENUMERATED +std::string release_cause_e::to_string() const +{ + switch (value) { + case load_balancing_ta_urequired: + return "loadBalancingTAUrequired"; + case other: + return "other"; + case cs_fallback_high_prio_v1020: + return "cs-FallbackHighPriority-v1020"; + case rrc_suspend_v1320: + return "rrc-Suspend-v1320"; + default: + invalid_enum_value(value, "release_cause_e"); + } + return ""; +} + +std::string security_cfg_ho_s::ho_type_c_::types::to_string() const +{ + switch (value) { + case intra_lte: + return "intraLTE"; + case inter_rat: + return "interRAT"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "security_cfg_ho_s::ho_type_c_::types"); + } + return ""; +} + +std::string dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::types::to_string() const +{ + switch (value) { + case ded_info_nas_r15: + return "dedicatedInfoNAS-r15"; + case ded_info_cdma2000_minus1_xrtt_r15: + return "dedicatedInfoCDMA2000-1XRTT-r15"; + case ded_info_cdma2000_hrpd_r15: + return "dedicatedInfoCDMA2000-HRPD-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::types"); + } + return ""; +} + +std::string dl_info_transfer_r8_ies_s::ded_info_type_c_::types::to_string() const +{ + switch (value) { + case ded_info_nas: + return "dedicatedInfoNAS"; + case ded_info_cdma2000_minus1_xrtt: + return "dedicatedInfoCDMA2000-1XRTT"; + case ded_info_cdma2000_hrpd: + return "dedicatedInfoCDMA2000-HRPD"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_info_transfer_r8_ies_s::ded_info_type_c_::types"); + } + return ""; +} + +std::string mob_from_eutra_cmd_r8_ies_s::purpose_c_::types::to_string() const +{ + switch (value) { + case ho: + return "handover"; + case cell_change_order: + return "cellChangeOrder"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mob_from_eutra_cmd_r8_ies_s::purpose_c_::types"); + } + return ""; +} + +std::string mob_from_eutra_cmd_r9_ies_s::purpose_c_::types::to_string() const +{ + switch (value) { + case ho: + return "handover"; + case cell_change_order: + return "cellChangeOrder"; + case e_csfb_r9: + return "e-CSFB-r9"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mob_from_eutra_cmd_r9_ies_s::purpose_c_::types"); + } + return ""; +} + +std::string csfb_params_resp_cdma2000_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case csfb_params_resp_cdma2000_r8: + return "csfbParametersResponseCDMA2000-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "csfb_params_resp_cdma2000_s::crit_exts_c_::types"); + } + return ""; +} +uint16_t csfb_params_resp_cdma2000_s::crit_exts_c_::types::to_number() const +{ + const static uint16_t options[] = {2000}; + return get_enum_number(options, 1, value, "csfb_params_resp_cdma2000_s::crit_exts_c_::types"); +} + +std::string counter_check_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case counter_check_r8: + return "counterCheck-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "counter_check_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string dl_info_transfer_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case dl_info_transfer_r8: + return "dlInformationTransfer-r8"; + case dl_info_transfer_r15: + return "dlInformationTransfer-r15"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_info_transfer_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ho_from_eutra_prep_request_r8: + return "handoverFromEUTRAPreparationRequest-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case logged_meas_cfg_r10: + return "loggedMeasurementConfiguration-r10"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case mob_from_eutra_cmd_r8: + return "mobilityFromEUTRACommand-r8"; + case mob_from_eutra_cmd_r9: + return "mobilityFromEUTRACommand-r9"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rn_recfg_r10_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rn_recfg_r10: + return "rnReconfiguration-r10"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_recfg_r10_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_conn_recfg_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_recfg_r8: + return "rrcConnectionReconfiguration-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_recfg_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_conn_release_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_release_r8: + return "rrcConnectionRelease-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_release_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_resume_r13: + return "rrcConnectionResume-r13"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string security_mode_cmd_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case security_mode_cmd_r8: + return "securityModeCommand-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "security_mode_cmd_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ue_cap_enquiry_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_cap_enquiry_r8: + return "ueCapabilityEnquiry-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_cap_enquiry_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ue_info_request_r9_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_info_request_r9: + return "ueInformationRequest-r9"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_info_request_r9_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string dl_dcch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case csfb_params_resp_cdma2000: + return "csfbParametersResponseCDMA2000"; + case dl_info_transfer: + return "dlInformationTransfer"; + case ho_from_eutra_prep_request: + return "handoverFromEUTRAPreparationRequest"; + case mob_from_eutra_cmd: + return "mobilityFromEUTRACommand"; + case rrc_conn_recfg: + return "rrcConnectionReconfiguration"; + case rrc_conn_release: + return "rrcConnectionRelease"; + case security_mode_cmd: + return "securityModeCommand"; + case ue_cap_enquiry: + return "ueCapabilityEnquiry"; + case counter_check: + return "counterCheck"; + case ue_info_request_r9: + return "ueInformationRequest-r9"; + case logged_meas_cfg_r10: + return "loggedMeasurementConfiguration-r10"; + case rn_recfg_r10: + return "rnReconfiguration-r10"; + case rrc_conn_resume_r13: + return "rrcConnectionResume-r13"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_dcch_msg_type_c::c1_c_::types"); + } + return ""; +} +uint16_t dl_dcch_msg_type_c::c1_c_::types::to_number() const +{ + const static uint16_t options[] = {2000}; + return get_enum_number(options, 1, value, "dl_dcch_msg_type_c::c1_c_::types"); +} + +std::string dl_dcch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "dl_dcch_msg_type_c::types"); + } + return ""; +} +uint8_t dl_dcch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "dl_dcch_msg_type_c::types"); +} + +std::string tmgi_r9_s::plmn_id_r9_c_::types::to_string() const +{ + switch (value) { + case plmn_idx_r9: + return "plmn-Index-r9"; + case explicit_value_r9: + return "explicitValue-r9"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "tmgi_r9_s::plmn_id_r9_c_::types"); + } + return ""; +} + +std::string pmch_cfg_r12_s::data_mcs_r12_c_::types::to_string() const +{ + switch (value) { + case normal_r12: + return "normal-r12"; + case higer_order_r12: + return "higerOrder-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pmch_cfg_r12_s::data_mcs_r12_c_::types"); + } + return ""; +} + +std::string pmch_cfg_r12_s::mch_sched_period_r12_e_::to_string() const +{ + switch (value) { + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + default: + invalid_enum_value(value, "pmch_cfg_r12_s::mch_sched_period_r12_e_"); + } + return ""; +} +uint16_t pmch_cfg_r12_s::mch_sched_period_r12_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, 1024}; + return get_enum_number(options, 9, value, "pmch_cfg_r12_s::mch_sched_period_r12_e_"); +} + +std::string pmch_cfg_r12_s::mch_sched_period_v1430_e_::to_string() const +{ + switch (value) { + case rf1: + return "rf1"; + case rf2: + return "rf2"; + default: + invalid_enum_value(value, "pmch_cfg_r12_s::mch_sched_period_v1430_e_"); + } + return ""; +} +uint8_t pmch_cfg_r12_s::mch_sched_period_v1430_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "pmch_cfg_r12_s::mch_sched_period_v1430_e_"); +} + +std::string pmch_cfg_r9_s::mch_sched_period_r9_e_::to_string() const +{ + switch (value) { + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + default: + invalid_enum_value(value, "pmch_cfg_r9_s::mch_sched_period_r9_e_"); + } + return ""; +} +uint16_t pmch_cfg_r9_s::mch_sched_period_r9_e_::to_number() const +{ + const static uint16_t options[] = {8, 16, 32, 64, 128, 256, 512, 1024}; + return get_enum_number(options, 8, value, "pmch_cfg_r9_s::mch_sched_period_r9_e_"); +} + +std::string mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_::to_string() const +{ + switch (value) { + case rf4: + return "rf4"; + case rf8: + return "rf8"; + case rf16: + return "rf16"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + default: + invalid_enum_value(value, "mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_"); + } + return ""; +} +uint16_t mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_::to_number() const +{ + const static uint16_t options[] = {4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 7, value, "mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_"); +} + +std::string mcch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case mbsfn_area_cfg_r9: + return "mbsfnAreaConfiguration-r9"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mcch_msg_type_c::c1_c_::types"); + } + return ""; +} + +std::string mcch_msg_type_c::later_c_::c2_c_::types::to_string() const +{ + switch (value) { + case mbms_count_request_r10: + return "mbmsCountingRequest-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mcch_msg_type_c::later_c_::c2_c_::types"); + } + return ""; +} + +std::string mcch_msg_type_c::later_c_::types::to_string() const +{ + switch (value) { + case c2: + return "c2"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mcch_msg_type_c::later_c_::types"); + } + return ""; +} +uint8_t mcch_msg_type_c::later_c_::types::to_number() const +{ + const static uint8_t options[] = {2}; + return get_enum_number(options, 1, value, "mcch_msg_type_c::later_c_::types"); +} + +std::string mcch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case later: + return "later"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mcch_msg_type_c::types"); + } + return ""; +} +uint8_t mcch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "mcch_msg_type_c::types"); +} + +std::string paging_ue_id_c::types::to_string() const +{ + switch (value) { + case s_tmsi: + return "s-TMSI"; + case imsi: + return "imsi"; + case ng_minus5_g_s_tmsi_r15: + return "ng-5G-S-TMSI-r15"; + case i_rnti_r15: + return "i-RNTI-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "paging_ue_id_c::types"); + } + return ""; +} +int8_t paging_ue_id_c::types::to_number() const +{ + switch (value) { + case ng_minus5_g_s_tmsi_r15: + return -5; + default: + invalid_enum_number(value, "paging_ue_id_c::types"); + } + return 0; +} + +std::string paging_record_s::cn_domain_e_::to_string() const +{ + switch (value) { + case ps: + return "ps"; + case cs: + return "cs"; + default: + invalid_enum_value(value, "paging_record_s::cn_domain_e_"); + } + return ""; +} + +std::string pcch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case paging: + return "paging"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pcch_msg_type_c::c1_c_::types"); + } + return ""; +} + +std::string pcch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "pcch_msg_type_c::types"); + } + return ""; +} +uint8_t pcch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "pcch_msg_type_c::types"); +} + +std::string sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_::to_string() const +{ + switch (value) { + case psf300: + return "psf300"; + case psf400: + return "psf400"; + case psf500: + return "psf500"; + case psf600: + return "psf600"; + case psf800: + return "psf800"; + case psf1000: + return "psf1000"; + case psf1200: + return "psf1200"; + case psf1600: + return "psf1600"; + default: + invalid_enum_value(value, "sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_"); + } + return ""; +} +uint16_t sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_::to_number() const +{ + const static uint16_t options[] = {300, 400, 500, 600, 800, 1000, 1200, 1600}; + return get_enum_number(options, 8, value, "sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_"); +} + +std::string sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_::to_string() const +{ + switch (value) { + case psf0: + return "psf0"; + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf4: + return "psf4"; + case psf8: + return "psf8"; + case psf16: + return "psf16"; + case psf32: + return "psf32"; + case psf64: + return "psf64"; + case psf128: + return "psf128"; + case psf256: + return "psf256"; + case ps512: + return "ps512"; + case psf1024: + return "psf1024"; + case psf2048: + return "psf2048"; + case psf4096: + return "psf4096"; + case psf8192: + return "psf8192"; + case psf16384: + return "psf16384"; + default: + invalid_enum_value(value, "sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_"); + } + return ""; +} +uint16_t sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_::to_number() const +{ + const static uint16_t options[] = {0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}; + return get_enum_number(options, 16, value, "sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_"); +} + +std::string sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case sf320: + return "sf320"; + case sf512: + return "sf512"; + case sf640: + return "sf640"; + case sf1024: + return "sf1024"; + case sf2048: + return "sf2048"; + case sf4096: + return "sf4096"; + case sf8192: + return "sf8192"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types"); + } + return ""; +} +uint16_t sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types::to_number() const +{ + const static uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; + return get_enum_number(options, 16, value, + "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types"); +} + +std::string sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_::to_string() const +{ + switch (value) { + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf3: + return "psf3"; + case psf4: + return "psf4"; + case psf5: + return "psf5"; + case psf6: + return "psf6"; + case psf8: + return "psf8"; + case psf10: + return "psf10"; + case psf20: + return "psf20"; + case psf30: + return "psf30"; + case psf40: + return "psf40"; + case psf50: + return "psf50"; + case psf60: + return "psf60"; + case psf80: + return "psf80"; + case psf100: + return "psf100"; + case psf200: + return "psf200"; + default: + invalid_enum_value(value, "sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_"); + } + return ""; +} +uint8_t sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, 60, 80, 100, 200}; + return get_enum_number(options, 16, value, "sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_"); +} + +std::string sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_::to_string() const +{ + switch (value) { + case psf0: + return "psf0"; + case psf1: + return "psf1"; + case psf2: + return "psf2"; + case psf4: + return "psf4"; + case psf8: + return "psf8"; + case psf10: + return "psf10"; + case psf20: + return "psf20"; + case psf40: + return "psf40"; + case psf80: + return "psf80"; + case psf160: + return "psf160"; + case ps320: + return "ps320"; + case psf640: + return "psf640"; + case psf960: + return "psf960"; + case psf1280: + return "psf1280"; + case psf1920: + return "psf1920"; + case psf2560: + return "psf2560"; + default: + invalid_enum_value(value, "sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_"); + } + return ""; +} +uint16_t sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_::to_number() const +{ + const static uint16_t options[] = {0, 1, 2, 4, 8, 10, 20, 40, 80, 160, 320, 640, 960, 1280, 1920, 2560}; + return get_enum_number(options, 16, value, "sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_"); +} + +std::string sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types::to_string() const +{ + switch (value) { + case sf10: + return "sf10"; + case sf20: + return "sf20"; + case sf32: + return "sf32"; + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case sf320: + return "sf320"; + case sf512: + return "sf512"; + case sf640: + return "sf640"; + case sf1024: + return "sf1024"; + case sf2048: + return "sf2048"; + case sf4096: + return "sf4096"; + case sf8192: + return "sf8192"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types"); + } + return ""; +} +uint16_t sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types::to_number() const +{ + const static uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; + return get_enum_number(options, 16, value, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types"); +} + +std::string sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case r1: + return "r1"; + case r2: + return "r2"; + case r4: + return "r4"; + case r8: + return "r8"; + case r16: + return "r16"; + case r32: + return "r32"; + case r64: + return "r64"; + case r128: + return "r128"; + case r256: + return "r256"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_"); + } + return ""; +} +uint16_t sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_::to_number() const +{ + const static uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return get_enum_number(options, 9, value, "sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_"); +} + +std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v1dot5: + return "v1dot5"; + case v2: + return "v2"; + case v2dot5: + return "v2dot5"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); + } + return ""; +} +float sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_::to_number() const +{ + const static float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return get_enum_number(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); +} +std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_::to_number_string() const +{ + switch (value) { + case v1: + return "1"; + case v1dot5: + return "1.5"; + case v2: + return "2"; + case v2dot5: + return "2.5"; + case v4: + return "4"; + case v5: + return "5"; + case v8: + return "8"; + case v10: + return "10"; + default: + invalid_enum_number(value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); + } + return ""; +} + +std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_::to_string() const +{ + switch (value) { + case v1: + return "v1"; + case v2: + return "v2"; + case v4: + return "v4"; + case v5: + return "v5"; + case v8: + return "v8"; + case v10: + return "v10"; + case v20: + return "v20"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_"); + } + return ""; +} +uint8_t sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return get_enum_number(options, 7, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_"); +} + +std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::types::to_string() const +{ + switch (value) { + case fdd_r14: + return "fdd-r14"; + case tdd_r14: + return "tdd-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::types"); + } + return ""; +} + +std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case on: + return "on"; + case off: + return "off"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_"); + } + return ""; +} + +std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case ce_mode_a: + return "ce-ModeA"; + case ce_mode_b: + return "ce-ModeB"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_"); + } + return ""; +} + +std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case bw1dot4: + return "bw1dot4"; + case bw5: + return "bw5"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); + } + return ""; +} +float sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_::to_number() const +{ + const static float options[] = {1.4, 5.0}; + return get_enum_number(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); +} +std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_::to_number_string() const +{ + switch (value) { + case bw1dot4: + return "1.4"; + case bw5: + return "5"; + default: + invalid_enum_number(value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); + } + return ""; +} + +std::string sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_::to_string() const +{ + switch (value) { + case zero: + return "zero"; + case one_eighth: + return "oneEighth"; + case one_quarter: + return "oneQuarter"; + case three_eighth: + return "threeEighth"; + case one_half: + return "oneHalf"; + case five_eighth: + return "fiveEighth"; + case three_quarter: + return "threeQuarter"; + case seven_eighth: + return "sevenEighth"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); + } + return ""; +} +float sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875}; + return get_enum_number(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); +} +std::string sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_::to_number_string() const +{ + switch (value) { + case zero: + return "0"; + case one_eighth: + return "1/8"; + case one_quarter: + return "1/4"; + case three_eighth: + return "3/8"; + case one_half: + return "1/2"; + case five_eighth: + return "5/8"; + case three_quarter: + return "3/4"; + case seven_eighth: + return "7/8"; + default: + invalid_enum_number(value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); + } + return ""; +} + +std::string sc_mtch_info_br_r14_s::p_a_r14_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4dot77: + return "dB-4dot77"; + case db_minus3: + return "dB-3"; + case db_minus1dot77: + return "dB-1dot77"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + default: + invalid_enum_value(value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); + } + return ""; +} +float sc_mtch_info_br_r14_s::p_a_r14_e_::to_number() const +{ + const static float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return get_enum_number(options, 8, value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); +} +std::string sc_mtch_info_br_r14_s::p_a_r14_e_::to_number_string() const +{ + switch (value) { + case db_minus6: + return "-6"; + case db_minus4dot77: + return "-4.77"; + case db_minus3: + return "-3"; + case db_minus1dot77: + return "-1.77"; + case db0: + return "0"; + case db1: + return "1"; + case db2: + return "2"; + case db3: + return "3"; + default: + invalid_enum_number(value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); + } + return ""; +} + +std::string sc_mtch_info_r13_s::p_a_r13_e_::to_string() const +{ + switch (value) { + case db_minus6: + return "dB-6"; + case db_minus4dot77: + return "dB-4dot77"; + case db_minus3: + return "dB-3"; + case db_minus1dot77: + return "dB-1dot77"; + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + default: + invalid_enum_value(value, "sc_mtch_info_r13_s::p_a_r13_e_"); + } + return ""; +} +float sc_mtch_info_r13_s::p_a_r13_e_::to_number() const +{ + const static float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return get_enum_number(options, 8, value, "sc_mtch_info_r13_s::p_a_r13_e_"); +} +std::string sc_mtch_info_r13_s::p_a_r13_e_::to_number_string() const +{ + switch (value) { + case db_minus6: + return "-6"; + case db_minus4dot77: + return "-4.77"; + case db_minus3: + return "-3"; + case db_minus1dot77: + return "-1.77"; + case db0: + return "0"; + case db1: + return "1"; + case db2: + return "2"; + case db3: + return "3"; + default: + invalid_enum_number(value, "sc_mtch_info_r13_s::p_a_r13_e_"); + } + return ""; +} + +std::string sc_mcch_msg_type_r13_c::c1_c_::types::to_string() const +{ + switch (value) { + case scptm_cfg_r13: + return "scptmConfiguration-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mcch_msg_type_r13_c::c1_c_::types"); + } + return ""; +} + +std::string sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::types::to_string() const +{ + switch (value) { + case scptm_cfg_br_r14: + return "scptmConfiguration-BR-r14"; + case spare: + return "spare"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::types"); + } + return ""; +} + +std::string sc_mcch_msg_type_r13_c::msg_class_ext_c_::types::to_string() const +{ + switch (value) { + case c2: + return "c2"; + case msg_class_ext_future_r14: + return "messageClassExtensionFuture-r14"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::types"); + } + return ""; +} +uint8_t sc_mcch_msg_type_r13_c::msg_class_ext_c_::types::to_number() const +{ + const static uint8_t options[] = {2}; + return get_enum_number(options, 1, value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::types"); +} + +std::string sc_mcch_msg_type_r13_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sc_mcch_msg_type_r13_c::types"); + } + return ""; +} +uint8_t sc_mcch_msg_type_r13_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "sc_mcch_msg_type_r13_c::types"); +} + +// EstablishmentCause ::= ENUMERATED +std::string establishment_cause_e::to_string() const +{ + switch (value) { + case emergency: + return "emergency"; + case high_prio_access: + return "highPriorityAccess"; + case mt_access: + return "mt-Access"; + case mo_sig: + return "mo-Signalling"; + case mo_data: + return "mo-Data"; + case delay_tolerant_access_v1020: + return "delayTolerantAccess-v1020"; + case mo_voice_call_v1280: + return "mo-VoiceCall-v1280"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "establishment_cause_e"); + } + return ""; +} + +std::string init_ue_id_c::types::to_string() const +{ + switch (value) { + case s_tmsi: + return "s-TMSI"; + case random_value: + return "randomValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "init_ue_id_c::types"); + } + return ""; +} + +// ReestablishmentCause ::= ENUMERATED +std::string reest_cause_e::to_string() const +{ + switch (value) { + case recfg_fail: + return "reconfigurationFailure"; + case ho_fail: + return "handoverFailure"; + case other_fail: + return "otherFailure"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "reest_cause_e"); + } + return ""; +} + +// ResumeCause ::= ENUMERATED +std::string resume_cause_e::to_string() const +{ + switch (value) { + case emergency: + return "emergency"; + case high_prio_access: + return "highPriorityAccess"; + case mt_access: + return "mt-Access"; + case mo_sig: + return "mo-Signalling"; + case mo_data: + return "mo-Data"; + case delay_tolerant_access_v1020: + return "delayTolerantAccess-v1020"; + case mo_voice_call_v1280: + return "mo-VoiceCall-v1280"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "resume_cause_e"); + } + return ""; +} + +// ResumeCause-r15 ::= ENUMERATED +std::string resume_cause_r15_e::to_string() const +{ + switch (value) { + case emergency: + return "emergency"; + case high_prio_access: + return "highPriorityAccess"; + case mt_access: + return "mt-Access"; + case mo_sig: + return "mo-Signalling"; + case mo_data: + return "mo-Data"; + case rna_update: + return "rna-Update"; + case mo_voice_call: + return "mo-VoiceCall"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "resume_cause_r15_e"); + } + return ""; +} + +std::string rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::types::to_string() const +{ + switch (value) { + case full_i_rnti_r15: + return "fullI-RNTI-r15"; + case short_i_rnti_r15: + return "shortI-RNTI-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::types"); + } + return ""; +} + +std::string rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::types::to_string() const +{ + switch (value) { + case resume_id_r13: + return "resumeID-r13"; + case truncated_resume_id_r13: + return "truncatedResumeID-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::types"); + } + return ""; +} + +std::string rrc_early_data_request_r15_ies_s::establishment_cause_r15_e_::to_string() const +{ + switch (value) { + case mo_data_r15: + return "mo-Data-r15"; + case delay_tolerant_access_r15: + return "delayTolerantAccess-r15"; + default: + invalid_enum_value(value, "rrc_early_data_request_r15_ies_s::establishment_cause_r15_e_"); + } + return ""; +} + +std::string rrc_conn_reest_request_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reest_request_r8: + return "rrcConnectionReestablishmentRequest-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_reest_request_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_conn_request_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_request_r8: + return "rrcConnectionRequest-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_request_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_conn_resume_request_r13_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_resume_request_r13: + return "rrcConnectionResumeRequest-r13"; + case rrc_conn_resume_request_r15: + return "rrcConnectionResumeRequest-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_resume_request_r13_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_early_data_request_r15_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_early_data_request_r15: + return "rrcEarlyDataRequest-r15"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_early_data_request_r15_s::crit_exts_c_::types"); + } + return ""; +} + +std::string ul_ccch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reest_request: + return "rrcConnectionReestablishmentRequest"; + case rrc_conn_request: + return "rrcConnectionRequest"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ccch_msg_type_c::c1_c_::types"); + } + return ""; +} + +std::string ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_resume_request_r13: + return "rrcConnectionResumeRequest-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types"); + } + return ""; +} + +std::string ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::types::to_string() const +{ + switch (value) { + case rrc_early_data_request_r15: + return "rrcEarlyDataRequest-r15"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::types"); + } + return ""; +} + +std::string ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types::to_string() const +{ + switch (value) { + case c3: + return "c3"; + case msg_class_ext_future_r15: + return "messageClassExtensionFuture-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types"); + } + return ""; +} +uint8_t ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types::to_number() const +{ + const static uint8_t options[] = {3}; + return get_enum_number(options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types"); +} + +std::string ul_ccch_msg_type_c::msg_class_ext_c_::types::to_string() const +{ + switch (value) { + case c2: + return "c2"; + case msg_class_ext_future_r13: + return "messageClassExtensionFuture-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ccch_msg_type_c::msg_class_ext_c_::types"); + } + return ""; +} +uint8_t ul_ccch_msg_type_c::msg_class_ext_c_::types::to_number() const +{ + const static uint8_t options[] = {2}; + return get_enum_number(options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::types"); +} + +std::string ul_ccch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ccch_msg_type_c::types"); + } + return ""; +} +uint8_t ul_ccch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "ul_ccch_msg_type_c::types"); +} + +std::string cell_global_id_cdma2000_c::types::to_string() const +{ + switch (value) { + case cell_global_id1_xrtt: + return "cellGlobalId1XRTT"; + case cell_global_id_hrpd: + return "cellGlobalIdHRPD"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cell_global_id_cdma2000_c::types"); + } + return ""; +} +uint8_t cell_global_id_cdma2000_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "cell_global_id_cdma2000_c::types"); +} + +std::string meas_result_utra_s::pci_c_::types::to_string() const +{ + switch (value) { + case fdd: + return "fdd"; + case tdd: + return "tdd"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_result_utra_s::pci_c_::types"); + } + return ""; +} + +std::string s_nssai_r15_c::types::to_string() const +{ + switch (value) { + case sst: + return "sst"; + case sst_sd: + return "sst-SD"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "s_nssai_r15_c::types"); + } + return ""; +} + +std::string location_info_r10_s::location_coordinates_r10_c_::types::to_string() const +{ + switch (value) { + case ellipsoid_point_r10: + return "ellipsoid-Point-r10"; + case ellipsoid_point_with_altitude_r10: + return "ellipsoidPointWithAltitude-r10"; + case ellipsoid_point_with_uncertainty_circle_r11: + return "ellipsoidPointWithUncertaintyCircle-r11"; + case ellipsoid_point_with_uncertainty_ellipse_r11: + return "ellipsoidPointWithUncertaintyEllipse-r11"; + case ellipsoid_point_with_altitude_and_uncertainty_ellipsoid_r11: + return "ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11"; + case ellipsoid_arc_r11: + return "ellipsoidArc-r11"; + case polygon_r11: + return "polygon-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "location_info_r10_s::location_coordinates_r10_c_::types"); + } + return ""; +} + +std::string location_info_r10_s::vertical_velocity_info_r15_c_::types::to_string() const +{ + switch (value) { + case vertical_velocity_r15: + return "verticalVelocity-r15"; + case vertical_velocity_and_uncertainty_r15: + return "verticalVelocityAndUncertainty-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "location_info_r10_s::vertical_velocity_info_r15_c_::types"); + } + return ""; +} + +std::string rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::types::to_string() const +{ + switch (value) { + case ng_minus5_g_s_tmsi_r15: + return "ng-5G-S-TMSI-r15"; + case ng_minus5_g_s_tmsi_part2_r15: + return "ng-5G-S-TMSI-Part2-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::types"); + } + return ""; +} + +std::string wlan_rtt_r15_s::rtt_units_r15_e_::to_string() const +{ + switch (value) { + case microseconds: + return "microseconds"; + case hundredsofnanoseconds: + return "hundredsofnanoseconds"; + case tensofnanoseconds: + return "tensofnanoseconds"; + case nanoseconds: + return "nanoseconds"; + case tenthsofnanoseconds: + return "tenthsofnanoseconds"; + default: + invalid_enum_value(value, "wlan_rtt_r15_s::rtt_units_r15_e_"); + } + return ""; +} + +std::string meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::types::to_string() const +{ + switch (value) { + case meas_result_idle_list_eutra_r15: + return "measResultIdleListEUTRA-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::types"); + } + return ""; +} + +std::string per_cc_gap_ind_r14_s::gap_ind_r14_e_::to_string() const +{ + switch (value) { + case gap: + return "gap"; + case ncsg: + return "ncsg"; + case nogap_no_ncsg: + return "nogap-noNcsg"; + default: + invalid_enum_value(value, "per_cc_gap_ind_r14_s::gap_ind_r14_e_"); + } + return ""; +} + +std::string visited_cell_info_r12_s::visited_cell_id_r12_c_::types::to_string() const +{ + switch (value) { + case cell_global_id_r12: + return "cellGlobalId-r12"; + case pci_arfcn_r12: + return "pci-arfcn-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "visited_cell_info_r12_s::visited_cell_id_r12_c_::types"); + } + return ""; +} + +std::string affected_carrier_freq_comb_info_mrdc_r15_s::interference_direction_mrdc_r15_e_::to_string() const +{ + switch (value) { + case eutra_nr: + return "eutra-nr"; + case nr: + return "nr"; + case other: + return "other"; + case eutra_nr_other: + return "eutra-nr-other"; + case nr_other: + return "nr-other"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "affected_carrier_freq_comb_info_mrdc_r15_s::interference_direction_mrdc_r15_e_"); + } + return ""; +} + +std::string rrc_conn_setup_complete_v1250_ies_s::mob_state_r12_e_::to_string() const +{ + switch (value) { + case normal: + return "normal"; + case medium: + return "medium"; + case high: + return "high"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "rrc_conn_setup_complete_v1250_ies_s::mob_state_r12_e_"); + } + return ""; +} + +std::string idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types::to_string() const +{ + switch (value) { + case sf_cfg0_r11: + return "subframeConfig0-r11"; + case sf_cfg1_minus5_r11: + return "subframeConfig1-5-r11"; + case sf_cfg6_r11: + return "subframeConfig6-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types"); + } + return ""; +} +uint8_t idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types::to_number() const +{ + const static uint8_t options[] = {0, 1, 6}; + return get_enum_number(options, 3, value, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types"); +} + +std::string idc_sf_pattern_r11_c::types::to_string() const +{ + switch (value) { + case sf_pattern_fdd_r11: + return "subframePatternFDD-r11"; + case sf_pattern_tdd_r11: + return "subframePatternTDD-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "idc_sf_pattern_r11_c::types"); + } + return ""; +} + +std::string sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db1: + return "dB1"; + case db2: + return "dB2"; + case db3: + return "dB3"; + case db4: + return "dB4"; + case db5: + return "dB5"; + case db6: + return "dB6"; + case db8: + return "dB8"; + case db10: + return "dB10"; + case db12: + return "dB12"; + case db14: + return "dB14"; + case db16: + return "dB16"; + case db18: + return "dB18"; + case db20: + return "dB20"; + case db22: + return "dB22"; + case db24: + return "dB24"; + default: + invalid_enum_value(value, "sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_"); + } + return ""; +} +uint8_t sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return get_enum_number(options, 16, value, "sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_"); +} + +std::string sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_"); + } + return ""; +} +uint8_t sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_"); +} + +std::string traffic_pattern_info_r14_s::traffic_periodicity_r14_e_::to_string() const +{ + switch (value) { + case sf20: + return "sf20"; + case sf50: + return "sf50"; + case sf100: + return "sf100"; + case sf200: + return "sf200"; + case sf300: + return "sf300"; + case sf400: + return "sf400"; + case sf500: + return "sf500"; + case sf600: + return "sf600"; + case sf700: + return "sf700"; + case sf800: + return "sf800"; + case sf900: + return "sf900"; + case sf1000: + return "sf1000"; + default: + invalid_enum_value(value, "traffic_pattern_info_r14_s::traffic_periodicity_r14_e_"); + } + return ""; +} +uint16_t traffic_pattern_info_r14_s::traffic_periodicity_r14_e_::to_number() const +{ + const static uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return get_enum_number(options, 12, value, "traffic_pattern_info_r14_s::traffic_periodicity_r14_e_"); +} + +std::string ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_::to_string() const +{ + switch (value) { + case ms40: + return "ms40"; + case ms240: + return "ms240"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_"); + } + return ""; +} +uint16_t ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_::to_number() const +{ + const static uint16_t options[] = {40, 240, 1000, 2000}; + return get_enum_number(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_"); +} + +std::string ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_::to_string() const +{ + switch (value) { + case ms40: + return "ms40"; + case ms240: + return "ms240"; + case ms1000: + return "ms1000"; + case ms2000: + return "ms2000"; + default: + invalid_enum_value(value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_"); + } + return ""; +} +uint16_t ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_::to_number() const +{ + const static uint16_t options[] = {40, 240, 1000, 2000}; + return get_enum_number(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_"); +} + +std::string ul_pdcp_delay_result_r13_s::qci_id_r13_e_::to_string() const +{ + switch (value) { + case qci1: + return "qci1"; + case qci2: + return "qci2"; + case qci3: + return "qci3"; + case qci4: + return "qci4"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "ul_pdcp_delay_result_r13_s::qci_id_r13_e_"); + } + return ""; +} +uint8_t ul_pdcp_delay_result_r13_s::qci_id_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4}; + return get_enum_number(options, 4, value, "ul_pdcp_delay_result_r13_s::qci_id_r13_e_"); +} + +std::string affected_carrier_freq_r11_s::interference_direction_r11_e_::to_string() const +{ + switch (value) { + case eutra: + return "eutra"; + case other: + return "other"; + case both: + return "both"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "affected_carrier_freq_r11_s::interference_direction_r11_e_"); + } + return ""; +} + +std::string bw_pref_r14_s::dl_pref_r14_e_::to_string() const +{ + switch (value) { + case mhz1dot4: + return "mhz1dot4"; + case mhz5: + return "mhz5"; + case mhz20: + return "mhz20"; + default: + invalid_enum_value(value, "bw_pref_r14_s::dl_pref_r14_e_"); + } + return ""; +} +float bw_pref_r14_s::dl_pref_r14_e_::to_number() const +{ + const static float options[] = {1.4, 5.0, 20.0}; + return get_enum_number(options, 3, value, "bw_pref_r14_s::dl_pref_r14_e_"); +} +std::string bw_pref_r14_s::dl_pref_r14_e_::to_number_string() const +{ + switch (value) { + case mhz1dot4: + return "1.4"; + case mhz5: + return "5"; + case mhz20: + return "20"; + default: + invalid_enum_number(value, "bw_pref_r14_s::dl_pref_r14_e_"); + } + return ""; +} + +std::string bw_pref_r14_s::ul_pref_r14_e_::to_string() const +{ + switch (value) { + case mhz1dot4: + return "mhz1dot4"; + case mhz5: + return "mhz5"; + default: + invalid_enum_value(value, "bw_pref_r14_s::ul_pref_r14_e_"); + } + return ""; +} +float bw_pref_r14_s::ul_pref_r14_e_::to_number() const +{ + const static float options[] = {1.4, 5.0}; + return get_enum_number(options, 2, value, "bw_pref_r14_s::ul_pref_r14_e_"); +} +std::string bw_pref_r14_s::ul_pref_r14_e_::to_number_string() const +{ + switch (value) { + case mhz1dot4: + return "1.4"; + case mhz5: + return "5"; + default: + invalid_enum_number(value, "bw_pref_r14_s::ul_pref_r14_e_"); + } + return ""; +} + +std::string delay_budget_report_r14_c::type1_e_::to_string() const +{ + switch (value) { + case ms_minus1280: + return "msMinus1280"; + case ms_minus640: + return "msMinus640"; + case ms_minus320: + return "msMinus320"; + case ms_minus160: + return "msMinus160"; + case ms_minus80: + return "msMinus80"; + case ms_minus60: + return "msMinus60"; + case ms_minus40: + return "msMinus40"; + case ms_minus20: + return "msMinus20"; + case ms0: + return "ms0"; + case ms20: + return "ms20"; + case ms40: + return "ms40"; + case ms60: + return "ms60"; + case ms80: + return "ms80"; + case ms160: + return "ms160"; + case ms320: + return "ms320"; + case ms640: + return "ms640"; + case ms1280: + return "ms1280"; + default: + invalid_enum_value(value, "delay_budget_report_r14_c::type1_e_"); + } + return ""; +} +int16_t delay_budget_report_r14_c::type1_e_::to_number() const +{ + const static int16_t options[] = {-1280, -640, -320, -160, -80, -60, -40, -20, 0, + 20, 40, 60, 80, 160, 320, 640, 1280}; + return get_enum_number(options, 17, value, "delay_budget_report_r14_c::type1_e_"); +} + +std::string delay_budget_report_r14_c::type2_e_::to_string() const +{ + switch (value) { + case ms_minus192: + return "msMinus192"; + case ms_minus168: + return "msMinus168"; + case ms_minus144: + return "msMinus144"; + case ms_minus120: + return "msMinus120"; + case ms_minus96: + return "msMinus96"; + case ms_minus72: + return "msMinus72"; + case ms_minus48: + return "msMinus48"; + case ms_minus24: + return "msMinus24"; + case ms0: + return "ms0"; + case ms24: + return "ms24"; + case ms48: + return "ms48"; + case ms72: + return "ms72"; + case ms96: + return "ms96"; + case ms120: + return "ms120"; + case ms144: + return "ms144"; + case ms168: + return "ms168"; + case ms192: + return "ms192"; + default: + invalid_enum_value(value, "delay_budget_report_r14_c::type2_e_"); + } + return ""; +} +int16_t delay_budget_report_r14_c::type2_e_::to_number() const +{ + const static int16_t options[] = {-192, -168, -144, -120, -96, -72, -48, -24, 0, 24, 48, 72, 96, 120, 144, 168, 192}; + return get_enum_number(options, 17, value, "delay_budget_report_r14_c::type2_e_"); +} + +std::string delay_budget_report_r14_c::types::to_string() const +{ + switch (value) { + case type1: + return "type1"; + case type2: + return "type2"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "delay_budget_report_r14_c::types"); + } + return ""; +} +uint8_t delay_budget_report_r14_c::types::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "delay_budget_report_r14_c::types"); +} + +std::string rrc_conn_setup_complete_v1020_ies_s::gummei_type_r10_e_::to_string() const +{ + switch (value) { + case native: + return "native"; + case mapped: + return "mapped"; + default: + invalid_enum_value(value, "rrc_conn_setup_complete_v1020_ies_s::gummei_type_r10_e_"); + } + return ""; +} + +std::string rrc_conn_setup_complete_v1020_ies_s::rn_sf_cfg_req_r10_e_::to_string() const +{ + switch (value) { + case required: + return "required"; + case not_required: + return "notRequired"; + default: + invalid_enum_value(value, "rrc_conn_setup_complete_v1020_ies_s::rn_sf_cfg_req_r10_e_"); + } + return ""; +} + +std::string rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types::to_string() const +{ + switch (value) { + case rstd0_r15: + return "rstd0-r15"; + case rstd1_r15: + return "rstd1-r15"; + case rstd2_r15: + return "rstd2-r15"; + case rstd3_r15: + return "rstd3-r15"; + case rstd4_r15: + return "rstd4-r15"; + case rstd5_r15: + return "rstd5-r15"; + case rstd6_r15: + return "rstd6-r15"; + case rstd7_r15: + return "rstd7-r15"; + case rstd8_r15: + return "rstd8-r15"; + case rstd9_r15: + return "rstd9-r15"; + case rstd10_r15: + return "rstd10-r15"; + case rstd11_r15: + return "rstd11-r15"; + case rstd12_r15: + return "rstd12-r15"; + case rstd13_r15: + return "rstd13-r15"; + case rstd14_r15: + return "rstd14-r15"; + case rstd15_r15: + return "rstd15-r15"; + case rstd16_r15: + return "rstd16-r15"; + case rstd17_r15: + return "rstd17-r15"; + case rstd18_r15: + return "rstd18-r15"; + case rstd19_r15: + return "rstd19-r15"; + case rstd20_r15: + return "rstd20-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); + } + return ""; +} +uint8_t rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types::to_number() const +{ + const static uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; + return get_enum_number(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); +} + +// WLAN-Status-v1430 ::= ENUMERATED +std::string wlan_status_v1430_e::to_string() const +{ + switch (value) { + case suspended: + return "suspended"; + case resumed: + return "resumed"; + default: + invalid_enum_value(value, "wlan_status_v1430_e"); + } + return ""; +} + +std::string fail_report_scg_nr_r15_s::fail_type_r15_e_::to_string() const +{ + switch (value) { + case t310_expiry: + return "t310-Expiry"; + case random_access_problem: + return "randomAccessProblem"; + case rlc_max_num_retx: + return "rlc-MaxNumRetx"; + case scg_change_fail: + return "scg-ChangeFailure"; + case scg_recfg_fail: + return "scg-reconfigFailure"; + case srb3_integrity_fail: + return "srb3-IntegrityFailure"; + default: + invalid_enum_value(value, "fail_report_scg_nr_r15_s::fail_type_r15_e_"); + } + return ""; +} +uint16_t fail_report_scg_nr_r15_s::fail_type_r15_e_::to_number() const +{ + switch (value) { + case t310_expiry: + return 310; + case srb3_integrity_fail: + return 3; + default: + invalid_enum_number(value, "fail_report_scg_nr_r15_s::fail_type_r15_e_"); + } + return 0; +} + +std::string fail_report_scg_r12_s::fail_type_r12_e_::to_string() const +{ + switch (value) { + case t313_expiry: + return "t313-Expiry"; + case random_access_problem: + return "randomAccessProblem"; + case rlc_max_num_retx: + return "rlc-MaxNumRetx"; + case scg_change_fail: + return "scg-ChangeFailure"; + default: + invalid_enum_value(value, "fail_report_scg_r12_s::fail_type_r12_e_"); + } + return ""; +} +uint16_t fail_report_scg_r12_s::fail_type_r12_e_::to_number() const +{ + const static uint16_t options[] = {313}; + return get_enum_number(options, 1, value, "fail_report_scg_r12_s::fail_type_r12_e_"); +} + +std::string meas_results_s::meas_result_neigh_cells_c_::types::to_string() const +{ + switch (value) { + case meas_result_list_eutra: + return "measResultListEUTRA"; + case meas_result_list_utra: + return "measResultListUTRA"; + case meas_result_list_geran: + return "measResultListGERAN"; + case meas_results_cdma2000: + return "measResultsCDMA2000"; + case meas_result_neigh_cell_list_nr_r15: + return "measResultNeighCellListNR-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_results_s::meas_result_neigh_cells_c_::types"); + } + return ""; +} +uint16_t meas_results_s::meas_result_neigh_cells_c_::types::to_number() const +{ + switch (value) { + case meas_results_cdma2000: + return 2000; + default: + invalid_enum_number(value, "meas_results_s::meas_result_neigh_cells_c_::types"); + } + return 0; +} + +std::string rlf_report_r9_s::failed_pcell_id_r10_c_::types::to_string() const +{ + switch (value) { + case cell_global_id_r10: + return "cellGlobalId-r10"; + case pci_arfcn_r10: + return "pci-arfcn-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rlf_report_r9_s::failed_pcell_id_r10_c_::types"); + } + return ""; +} + +std::string rlf_report_r9_s::conn_fail_type_r10_e_::to_string() const +{ + switch (value) { + case rlf: + return "rlf"; + case hof: + return "hof"; + default: + invalid_enum_value(value, "rlf_report_r9_s::conn_fail_type_r10_e_"); + } + return ""; +} + +std::string rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_e_::to_string() const +{ + switch (value) { + case t310_expiry: + return "t310-Expiry"; + case random_access_problem: + return "randomAccessProblem"; + case rlc_max_num_retx: + return "rlc-MaxNumRetx"; + case t312_expiry_r12: + return "t312-Expiry-r12"; + default: + invalid_enum_value(value, "rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_e_"); + } + return ""; +} +uint16_t rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_e_::to_number() const +{ + switch (value) { + case t310_expiry: + return 310; + case t312_expiry_r12: + return 312; + default: + invalid_enum_number(value, "rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_e_"); + } + return 0; +} + +std::string rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::types::to_string() const +{ + switch (value) { + case fdd_r11: + return "fdd-r11"; + case tdd_r11: + return "tdd-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::types"); + } + return ""; +} + +std::string rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::types::to_string() const +{ + switch (value) { + case fdd_r11: + return "fdd-r11"; + case tdd_r11: + return "tdd-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::types"); + } + return ""; +} + +std::string sidelink_ue_info_v1310_ies_s::comm_tx_res_info_req_relay_r13_s_::ue_type_r13_e_::to_string() const +{ + switch (value) { + case relay_ue: + return "relayUE"; + case remote_ue: + return "remoteUE"; + default: + invalid_enum_value(value, "sidelink_ue_info_v1310_ies_s::comm_tx_res_info_req_relay_r13_s_::ue_type_r13_e_"); + } + return ""; +} + +std::string tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_::to_string() const +{ + switch (value) { + case sf40: + return "sf40"; + case sf64: + return "sf64"; + case sf80: + return "sf80"; + case sf128: + return "sf128"; + case sf160: + return "sf160"; + case sf256: + return "sf256"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_"); + } + return ""; +} +uint16_t tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_::to_number() const +{ + const static uint16_t options[] = {40, 64, 80, 128, 160, 256}; + return get_enum_number(options, 6, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_"); +} + +std::string tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_::to_string() const +{ + switch (value) { + case sf20: + return "sf20"; + case sf30: + return "sf30"; + case sf40: + return "sf40"; + case sf60: + return "sf60"; + case sf80: + return "sf80"; + case sf100: + return "sf100"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_"); + } + return ""; +} +uint8_t tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_::to_number() const +{ + const static uint8_t options[] = {20, 30, 40, 60, 80, 100}; + return get_enum_number(options, 6, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_"); +} + +std::string tdm_assist_info_r11_c::types::to_string() const +{ + switch (value) { + case drx_assist_info_r11: + return "drx-AssistanceInfo-r11"; + case idc_sf_pattern_list_r11: + return "idc-SubframePatternList-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "tdm_assist_info_r11_c::types"); + } + return ""; +} + +std::string ueassist_info_v1430_ies_s::rlm_report_r14_s_::rlm_event_r14_e_::to_string() const +{ + switch (value) { + case early_out_of_sync: + return "earlyOutOfSync"; + case early_in_sync: + return "earlyInSync"; + default: + invalid_enum_value(value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::rlm_event_r14_e_"); + } + return ""; +} + +std::string ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_::to_string() const +{ + switch (value) { + case excess_rep1: + return "excessRep1"; + case excess_rep2: + return "excessRep2"; + default: + invalid_enum_value(value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_"); + } + return ""; +} +uint8_t ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_"); +} + +// WLAN-Status-r13 ::= ENUMERATED +std::string wlan_status_r13_e::to_string() const +{ + switch (value) { + case successful_association: + return "successfulAssociation"; + case fail_wlan_radio_link: + return "failureWlanRadioLink"; + case fail_wlan_unavailable: + return "failureWlanUnavailable"; + case fail_timeout: + return "failureTimeout"; + default: + invalid_enum_value(value, "wlan_status_r13_e"); + } + return ""; +} + +std::string failed_lc_ch_info_r15_s::failed_lc_ch_id_r15_s_::cell_group_ind_r15_e_::to_string() const +{ + switch (value) { + case mn: + return "mn"; + case sn: + return "sn"; + default: + invalid_enum_value(value, "failed_lc_ch_info_r15_s::failed_lc_ch_id_r15_s_::cell_group_ind_r15_e_"); + } + return ""; +} + +std::string failed_lc_ch_info_r15_s::fail_type_e_::to_string() const +{ + switch (value) { + case dupl: + return "duplication"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "failed_lc_ch_info_r15_s::fail_type_e_"); + } + return ""; +} + +std::string inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::types::to_string() const +{ + switch (value) { + case start: + return "start"; + case stop: + return "stop"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::types"); + } + return ""; +} + +std::string meas_report_app_layer_r15_ies_s::service_type_e_::to_string() const +{ + switch (value) { + case qoe: + return "qoe"; + case qoemtsi: + return "qoemtsi"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "meas_report_app_layer_r15_ies_s::service_type_e_"); + } + return ""; +} + +std::string proximity_ind_r9_ies_s::type_r9_e_::to_string() const +{ + switch (value) { + case entering: + return "entering"; + case leaving: + return "leaving"; + default: + invalid_enum_value(value, "proximity_ind_r9_ies_s::type_r9_e_"); + } + return ""; +} + +std::string proximity_ind_r9_ies_s::carrier_freq_r9_c_::types::to_string() const +{ + switch (value) { + case eutra_r9: + return "eutra-r9"; + case utra_r9: + return "utra-r9"; + case eutra2_v9e0: + return "eutra2-v9e0"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "proximity_ind_r9_ies_s::carrier_freq_r9_c_::types"); + } + return ""; +} +uint8_t proximity_ind_r9_ies_s::carrier_freq_r9_c_::types::to_number() const +{ + switch (value) { + case eutra2_v9e0: + return 2; + default: + invalid_enum_number(value, "proximity_ind_r9_ies_s::carrier_freq_r9_c_::types"); + } + return 0; +} + +std::string rrc_conn_resume_complete_r13_ies_s::mob_state_r13_e_::to_string() const +{ + switch (value) { + case normal: + return "normal"; + case medium: + return "medium"; + case high: + return "high"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "rrc_conn_resume_complete_r13_ies_s::mob_state_r13_e_"); + } + return ""; +} + +std::string ueassist_info_r11_ies_s::pwr_pref_ind_r11_e_::to_string() const +{ + switch (value) { + case normal: + return "normal"; + case low_pwr_consumption: + return "lowPowerConsumption"; + default: + invalid_enum_value(value, "ueassist_info_r11_ies_s::pwr_pref_ind_r11_e_"); + } + return ""; +} + +std::string ul_info_transfer_r8_ies_s::ded_info_type_c_::types::to_string() const +{ + switch (value) { + case ded_info_nas: + return "dedicatedInfoNAS"; + case ded_info_cdma2000_minus1_xrtt: + return "dedicatedInfoCDMA2000-1XRTT"; + case ded_info_cdma2000_hrpd: + return "dedicatedInfoCDMA2000-HRPD"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_info_transfer_r8_ies_s::ded_info_type_c_::types"); + } + return ""; +} + +std::string csfb_params_request_cdma2000_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case csfb_params_request_cdma2000_r8: + return "csfbParametersRequestCDMA2000-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "csfb_params_request_cdma2000_s::crit_exts_c_::types"); + } + return ""; +} +uint16_t csfb_params_request_cdma2000_s::crit_exts_c_::types::to_number() const +{ + const static uint16_t options[] = {2000}; + return get_enum_number(options, 1, value, "csfb_params_request_cdma2000_s::crit_exts_c_::types"); +} + +std::string counter_check_resp_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case counter_check_resp_r8: + return "counterCheckResponse-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "counter_check_resp_s::crit_exts_c_::types"); + } + return ""; +} + +std::string in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case in_dev_coex_ind_r11: + return "inDeviceCoexIndication-r11"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case inter_freq_rstd_meas_ind_r10: + return "interFreqRSTDMeasurementIndication-r10"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string mbms_count_resp_r10_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case count_resp_r10: + return "countingResponse-r10"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mbms_count_resp_r10_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case interest_ind_r11: + return "interestIndication-r11"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string meas_report_app_layer_r15_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case meas_report_app_layer_r15: + return "measReportAppLayer-r15"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_report_app_layer_r15_s::crit_exts_c_::types"); + } + return ""; +} + +std::string meas_report_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case meas_report_r8: + return "measurementReport-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "meas_report_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string proximity_ind_r9_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case proximity_ind_r9: + return "proximityIndication-r9"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "proximity_ind_r9_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rn_recfg_complete_r10: + return "rnReconfigurationComplete-r10"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string rrc_conn_recfg_complete_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_recfg_complete_r8: + return "rrcConnectionReconfigurationComplete-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_recfg_complete_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_conn_reest_complete_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_reest_complete_r8: + return "rrcConnectionReestablishmentComplete-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_reest_complete_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_conn_resume_complete_r13_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_resume_complete_r13: + return "rrcConnectionResumeComplete-r13"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_resume_complete_r13_s::crit_exts_c_::types"); + } + return ""; +} + +std::string rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case rrc_conn_setup_complete_r8: + return "rrcConnectionSetupComplete-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string scg_fail_info_r12_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case scg_fail_info_r12: + return "scgFailureInformation-r12"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "scg_fail_info_r12_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case scg_fail_info_nr_r15: + return "scgFailureInformationNR-r15"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string security_mode_complete_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case security_mode_complete_r8: + return "securityModeComplete-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "security_mode_complete_s::crit_exts_c_::types"); + } + return ""; +} + +std::string security_mode_fail_s::crit_exts_c_::types::to_string() const +{ + switch (value) { + case security_mode_fail_r8: + return "securityModeFailure-r8"; + case crit_exts_future: + return "criticalExtensionsFuture"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "security_mode_fail_s::crit_exts_c_::types"); + } + return ""; +} + +std::string sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case sidelink_ue_info_r12: + return "sidelinkUEInformation-r12"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ueassist_info_r11_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_assist_info_r11: + return "ueAssistanceInformation-r11"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ueassist_info_r11_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ue_cap_info_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_cap_info_r8: + return "ueCapabilityInformation-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_cap_info_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ue_info_resp_r9_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_info_resp_r9: + return "ueInformationResponse-r9"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_info_resp_r9_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ul_ho_prep_transfer_r8: + return "ulHandoverPreparationTransfer-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ul_info_transfer_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ul_info_transfer_r8: + return "ulInformationTransfer-r8"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_info_transfer_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ul_info_transfer_mrdc_r15: + return "ulInformationTransferMRDC-r15"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case wlan_conn_status_report_r13: + return "wlanConnectionStatusReport-r13"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ul_dcch_msg_type_c::c1_c_::types::to_string() const +{ + switch (value) { + case csfb_params_request_cdma2000: + return "csfbParametersRequestCDMA2000"; + case meas_report: + return "measurementReport"; + case rrc_conn_recfg_complete: + return "rrcConnectionReconfigurationComplete"; + case rrc_conn_reest_complete: + return "rrcConnectionReestablishmentComplete"; + case rrc_conn_setup_complete: + return "rrcConnectionSetupComplete"; + case security_mode_complete: + return "securityModeComplete"; + case security_mode_fail: + return "securityModeFailure"; + case ue_cap_info: + return "ueCapabilityInformation"; + case ul_ho_prep_transfer: + return "ulHandoverPreparationTransfer"; + case ul_info_transfer: + return "ulInformationTransfer"; + case counter_check_resp: + return "counterCheckResponse"; + case ue_info_resp_r9: + return "ueInformationResponse-r9"; + case proximity_ind_r9: + return "proximityIndication-r9"; + case rn_recfg_complete_r10: + return "rnReconfigurationComplete-r10"; + case mbms_count_resp_r10: + return "mbmsCountingResponse-r10"; + case inter_freq_rstd_meas_ind_r10: + return "interFreqRSTDMeasurementIndication-r10"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_dcch_msg_type_c::c1_c_::types"); + } + return ""; +} +uint16_t ul_dcch_msg_type_c::c1_c_::types::to_number() const +{ + const static uint16_t options[] = {2000}; + return get_enum_number(options, 1, value, "ul_dcch_msg_type_c::c1_c_::types"); +} + +std::string ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types::to_string() const +{ + switch (value) { + case ue_assist_info_r11: + return "ueAssistanceInformation-r11"; + case in_dev_coex_ind_r11: + return "inDeviceCoexIndication-r11"; + case mbms_interest_ind_r11: + return "mbmsInterestIndication-r11"; + case scg_fail_info_r12: + return "scgFailureInformation-r12"; + case sidelink_ue_info_r12: + return "sidelinkUEInformation-r12"; + case wlan_conn_status_report_r13: + return "wlanConnectionStatusReport-r13"; + case rrc_conn_resume_complete_r13: + return "rrcConnectionResumeComplete-r13"; + case ul_info_transfer_mrdc_r15: + return "ulInformationTransferMRDC-r15"; + case scg_fail_info_nr_r15: + return "scgFailureInformationNR-r15"; + case meas_report_app_layer_r15: + return "measReportAppLayer-r15"; + case fail_info_r15: + return "failureInformation-r15"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types"); + } + return ""; +} + +std::string ul_dcch_msg_type_c::msg_class_ext_c_::types::to_string() const +{ + switch (value) { + case c2: + return "c2"; + case msg_class_ext_future_r11: + return "messageClassExtensionFuture-r11"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); + } + return ""; +} +uint8_t ul_dcch_msg_type_c::msg_class_ext_c_::types::to_number() const +{ + const static uint8_t options[] = {2}; + return get_enum_number(options, 1, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); +} + +std::string ul_dcch_msg_type_c::types::to_string() const +{ + switch (value) { + case c1: + return "c1"; + case msg_class_ext: + return "messageClassExtension"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ul_dcch_msg_type_c::types"); + } + return ""; +} +uint8_t ul_dcch_msg_type_c::types::to_number() const +{ + const static uint8_t options[] = {1}; + return get_enum_number(options, 1, value, "ul_dcch_msg_type_c::types"); +} + +// MIMO-CapabilityDL-r10 ::= ENUMERATED +std::string mimo_cap_dl_r10_e::to_string() const +{ + switch (value) { + case two_layers: + return "twoLayers"; + case four_layers: + return "fourLayers"; + case eight_layers: + return "eightLayers"; + default: + invalid_enum_value(value, "mimo_cap_dl_r10_e"); + } + return ""; +} +uint8_t mimo_cap_dl_r10_e::to_number() const +{ + const static uint8_t options[] = {2, 4, 8}; + return get_enum_number(options, 3, value, "mimo_cap_dl_r10_e"); +} + +// MIMO-CapabilityUL-r10 ::= ENUMERATED +std::string mimo_cap_ul_r10_e::to_string() const +{ + switch (value) { + case two_layers: + return "twoLayers"; + case four_layers: + return "fourLayers"; + default: + invalid_enum_value(value, "mimo_cap_ul_r10_e"); + } + return ""; +} +uint8_t mimo_cap_ul_r10_e::to_number() const +{ + const static uint8_t options[] = {2, 4}; + return get_enum_number(options, 2, value, "mimo_cap_ul_r10_e"); +} + +std::string band_params_r11_s::supported_csi_proc_r11_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "band_params_r11_s::supported_csi_proc_r11_e_"); + } + return ""; +} +uint8_t band_params_r11_s::supported_csi_proc_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 4}; + return get_enum_number(options, 3, value, "band_params_r11_s::supported_csi_proc_r11_e_"); +} + +std::string intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_"); + } + return ""; +} +uint8_t intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 4}; + return get_enum_number(options, 3, value, "intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_"); +} + +std::string band_params_r13_s::supported_csi_proc_r13_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "band_params_r13_s::supported_csi_proc_r13_e_"); + } + return ""; +} +uint8_t band_params_r13_s::supported_csi_proc_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 4}; + return get_enum_number(options, 3, value, "band_params_r13_s::supported_csi_proc_r13_e_"); +} + +std::string band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types::to_string() const +{ + switch (value) { + case three_entries_r13: + return "threeEntries-r13"; + case four_entries_r13: + return "fourEntries-r13"; + case five_entries_r13: + return "fiveEntries-r13"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, + "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types"); + } + return ""; +} +uint8_t band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types::to_number() const +{ + const static uint8_t options[] = {3, 4, 5}; + return get_enum_number(options, 3, value, + "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types"); +} + +std::string band_params_v1130_s::supported_csi_proc_r11_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "band_params_v1130_s::supported_csi_proc_r11_e_"); + } + return ""; +} +uint8_t band_params_v1130_s::supported_csi_proc_r11_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 4}; + return get_enum_number(options, 3, value, "band_params_v1130_s::supported_csi_proc_r11_e_"); +} + +std::string band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types::to_string() const +{ + switch (value) { + case three_entries_r12: + return "threeEntries-r12"; + case four_entries_r12: + return "fourEntries-r12"; + case five_entries_r12: + return "fiveEntries-r12"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types"); + } + return ""; +} +uint8_t band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types::to_number() const +{ + const static uint8_t options[] = {3, 4, 5}; + return get_enum_number(options, 3, value, + "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types"); +} + +std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n0dot5: + return "n0dot5"; + case n1: + return "n1"; + case n1dot5: + return "n1dot5"; + case n2: + return "n2"; + case n2dot5: + return "n2dot5"; + case n3: + return "n3"; + case n3dot5: + return "n3dot5"; + case n4: + return "n4"; + case n4dot5: + return "n4dot5"; + case n5: + return "n5"; + case n5dot5: + return "n5dot5"; + case n6: + return "n6"; + case n6dot5: + return "n6dot5"; + case n7: + return "n7"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); + } + return ""; +} +float retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; + return get_enum_number(options, 15, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); +} +std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_::to_number_string() const +{ + switch (value) { + case n0: + return "0"; + case n0dot5: + return "0.5"; + case n1: + return "1"; + case n1dot5: + return "1.5"; + case n2: + return "2"; + case n2dot5: + return "2.5"; + case n3: + return "3"; + case n3dot5: + return "3.5"; + case n4: + return "4"; + case n4dot5: + return "4.5"; + case n5: + return "5"; + case n5dot5: + return "5.5"; + case n6: + return "6"; + case n6dot5: + return "6.5"; + case n7: + return "7"; + default: + invalid_enum_number(value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); + } + return ""; +} + +std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n0dot5: + return "n0dot5"; + case n1: + return "n1"; + case n1dot5: + return "n1dot5"; + case n2: + return "n2"; + case n2dot5: + return "n2dot5"; + case n3: + return "n3"; + case n3dot5: + return "n3dot5"; + case n4: + return "n4"; + case n4dot5: + return "n4dot5"; + case n5: + return "n5"; + case n5dot5: + return "n5dot5"; + case n6: + return "n6"; + case n6dot5: + return "n6dot5"; + case n7: + return "n7"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); + } + return ""; +} +float retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_::to_number() const +{ + const static float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; + return get_enum_number(options, 15, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); +} +std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_::to_number_string() const +{ + switch (value) { + case n0: + return "0"; + case n0dot5: + return "0.5"; + case n1: + return "1"; + case n1dot5: + return "1.5"; + case n2: + return "2"; + case n2dot5: + return "2.5"; + case n3: + return "3"; + case n3dot5: + return "3.5"; + case n4: + return "4"; + case n4dot5: + return "4.5"; + case n5: + return "5"; + case n5dot5: + return "5.5"; + case n6: + return "6"; + case n6dot5: + return "6.5"; + case n7: + return "7"; + default: + invalid_enum_number(value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); + } + return ""; +} + +std::string mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_::to_string() const +{ + switch (value) { + case n8: + return "n8"; + case n12: + return "n12"; + case n16: + return "n16"; + case n20: + return "n20"; + case n24: + return "n24"; + case n28: + return "n28"; + default: + invalid_enum_value(value, "mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); + } + return ""; +} +uint8_t mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_::to_number() const +{ + const static uint8_t options[] = {8, 12, 16, 20, 24, 28}; + return get_enum_number(options, 6, value, + "mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); +} + +std::string stti_spt_band_params_r15_s::s_tti_supported_csi_proc_r15_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "stti_spt_band_params_r15_s::s_tti_supported_csi_proc_r15_e_"); + } + return ""; +} +uint8_t stti_spt_band_params_r15_s::s_tti_supported_csi_proc_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 4}; + return get_enum_number(options, 3, value, "stti_spt_band_params_r15_s::s_tti_supported_csi_proc_r15_e_"); +} + +// V2X-BandwidthClass-r14 ::= ENUMERATED +std::string v2x_bw_class_r14_e::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + case d: + return "d"; + case e: + return "e"; + case f: + return "f"; + case c1_v1530: + return "c1-v1530"; + default: + invalid_enum_value(value, "v2x_bw_class_r14_e"); + } + return ""; +} +uint8_t v2x_bw_class_r14_e::to_number() const +{ + switch (value) { + case c1_v1530: + return 1; + default: + invalid_enum_number(value, "v2x_bw_class_r14_e"); + } + return 0; +} + +std::string feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_"); + } + return ""; +} +uint8_t feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 4}; + return get_enum_number(options, 3, value, "feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_"); +} + +std::string irat_params_cdma2000_minus1_xrtt_s::tx_cfg1_xrtt_e_::to_string() const +{ + switch (value) { + case single: + return "single"; + case dual: + return "dual"; + default: + invalid_enum_value(value, "irat_params_cdma2000_minus1_xrtt_s::tx_cfg1_xrtt_e_"); + } + return ""; +} + +std::string irat_params_cdma2000_minus1_xrtt_s::rx_cfg1_xrtt_e_::to_string() const +{ + switch (value) { + case single: + return "single"; + case dual: + return "dual"; + default: + invalid_enum_value(value, "irat_params_cdma2000_minus1_xrtt_s::rx_cfg1_xrtt_e_"); + } + return ""; +} + +std::string irat_params_cdma2000_hrpd_s::tx_cfg_hrpd_e_::to_string() const +{ + switch (value) { + case single: + return "single"; + case dual: + return "dual"; + default: + invalid_enum_value(value, "irat_params_cdma2000_hrpd_s::tx_cfg_hrpd_e_"); + } + return ""; +} + +std::string irat_params_cdma2000_hrpd_s::rx_cfg_hrpd_e_::to_string() const +{ + switch (value) { + case single: + return "single"; + case dual: + return "dual"; + default: + invalid_enum_value(value, "irat_params_cdma2000_hrpd_s::rx_cfg_hrpd_e_"); + } + return ""; +} + +// SupportedBandGERAN ::= ENUMERATED +std::string supported_band_geran_e::to_string() const +{ + switch (value) { + case gsm450: + return "gsm450"; + case gsm480: + return "gsm480"; + case gsm710: + return "gsm710"; + case gsm750: + return "gsm750"; + case gsm810: + return "gsm810"; + case gsm850: + return "gsm850"; + case gsm900_p: + return "gsm900P"; + case gsm900_e: + return "gsm900E"; + case gsm900_r: + return "gsm900R"; + case gsm1800: + return "gsm1800"; + case gsm1900: + return "gsm1900"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "supported_band_geran_e"); + } + return ""; +} + +// SupportedBandUTRA-FDD ::= ENUMERATED +std::string supported_band_utra_fdd_e::to_string() const +{ + switch (value) { + case band_i: + return "bandI"; + case band_ii: + return "bandII"; + case band_iii: + return "bandIII"; + case band_iv: + return "bandIV"; + case band_v: + return "bandV"; + case band_vi: + return "bandVI"; + case band_vii: + return "bandVII"; + case band_viii: + return "bandVIII"; + case band_ix: + return "bandIX"; + case band_x: + return "bandX"; + case band_xi: + return "bandXI"; + case band_xii: + return "bandXII"; + case band_xiii: + return "bandXIII"; + case band_xiv: + return "bandXIV"; + case band_xv: + return "bandXV"; + case band_xvi: + return "bandXVI"; + case band_xvii_minus8a0: + return "bandXVII-8a0"; + case band_xviii_minus8a0: + return "bandXVIII-8a0"; + case band_xix_minus8a0: + return "bandXIX-8a0"; + case band_xx_minus8a0: + return "bandXX-8a0"; + case band_xxi_minus8a0: + return "bandXXI-8a0"; + case band_xxii_minus8a0: + return "bandXXII-8a0"; + case band_xxiii_minus8a0: + return "bandXXIII-8a0"; + case band_xxiv_minus8a0: + return "bandXXIV-8a0"; + case band_xxv_minus8a0: + return "bandXXV-8a0"; + case band_xxvi_minus8a0: + return "bandXXVI-8a0"; + case band_xxvii_minus8a0: + return "bandXXVII-8a0"; + case band_xxviii_minus8a0: + return "bandXXVIII-8a0"; + case band_xxix_minus8a0: + return "bandXXIX-8a0"; + case band_xxx_minus8a0: + return "bandXXX-8a0"; + case band_xxxi_minus8a0: + return "bandXXXI-8a0"; + case band_xxxii_minus8a0: + return "bandXXXII-8a0"; + default: + invalid_enum_value(value, "supported_band_utra_fdd_e"); + } + return ""; +} + +// SupportedBandUTRA-TDD128 ::= ENUMERATED +std::string supported_band_utra_tdd128_e::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + case d: + return "d"; + case e: + return "e"; + case f: + return "f"; + case g: + return "g"; + case h: + return "h"; + case i: + return "i"; + case j: + return "j"; + case k: + return "k"; + case l: + return "l"; + case m: + return "m"; + case n: + return "n"; + case o: + return "o"; + case p: + return "p"; + default: + invalid_enum_value(value, "supported_band_utra_tdd128_e"); + } + return ""; +} + +// SupportedBandUTRA-TDD384 ::= ENUMERATED +std::string supported_band_utra_tdd384_e::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + case d: + return "d"; + case e: + return "e"; + case f: + return "f"; + case g: + return "g"; + case h: + return "h"; + case i: + return "i"; + case j: + return "j"; + case k: + return "k"; + case l: + return "l"; + case m: + return "m"; + case n: + return "n"; + case o: + return "o"; + case p: + return "p"; + default: + invalid_enum_value(value, "supported_band_utra_tdd384_e"); + } + return ""; +} + +// SupportedBandUTRA-TDD768 ::= ENUMERATED +std::string supported_band_utra_tdd768_e::to_string() const +{ + switch (value) { + case a: + return "a"; + case b: + return "b"; + case c: + return "c"; + case d: + return "d"; + case e: + return "e"; + case f: + return "f"; + case g: + return "g"; + case h: + return "h"; + case i: + return "i"; + case j: + return "j"; + case k: + return "k"; + case l: + return "l"; + case m: + return "m"; + case n: + return "n"; + case o: + return "o"; + case p: + return "p"; + default: + invalid_enum_value(value, "supported_band_utra_tdd768_e"); + } + return ""; +} + +// ProcessingTimelineSet-r15 ::= ENUMERATED +std::string processing_timeline_set_r15_e::to_string() const +{ + switch (value) { + case set1: + return "set1"; + case set2: + return "set2"; + default: + invalid_enum_value(value, "processing_timeline_set_r15_e"); + } + return ""; +} +uint8_t processing_timeline_set_r15_e::to_number() const +{ + const static uint8_t options[] = {1, 2}; + return get_enum_number(options, 2, value, "processing_timeline_set_r15_e"); +} + +std::string mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::n_max_res_r14_e_::to_string() const +{ + switch (value) { + case ffs1: + return "ffs1"; + case ffs2: + return "ffs2"; + case ffs3: + return "ffs3"; + case ffs4: + return "ffs4"; + default: + invalid_enum_value(value, "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::n_max_res_r14_e_"); + } + return ""; +} +uint8_t mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::n_max_res_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4}; + return get_enum_number(options, 4, value, + "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::n_max_res_r14_e_"); +} + +std::string mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::n_max_res_r14_e_::to_string() const +{ + switch (value) { + case ffs1: + return "ffs1"; + case ffs2: + return "ffs2"; + case ffs3: + return "ffs3"; + case ffs4: + return "ffs4"; + default: + invalid_enum_value(value, "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::n_max_res_r14_e_"); + } + return ""; +} +uint8_t mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::n_max_res_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4}; + return get_enum_number(options, 4, value, + "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::n_max_res_r14_e_"); +} + +std::string mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_::to_string() const +{ + switch (value) { + case n8: + return "n8"; + case n12: + return "n12"; + case n16: + return "n16"; + case n20: + return "n20"; + case n24: + return "n24"; + case n28: + return "n28"; + default: + invalid_enum_value(value, "mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); + } + return ""; +} +uint8_t mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_::to_number() const +{ + const static uint8_t options[] = {8, 12, 16, 20, 24, 28}; + return get_enum_number(options, 6, value, "mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); +} + +std::string naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_::to_string() const +{ + switch (value) { + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + case n125: + return "n125"; + case n150: + return "n150"; + case n175: + return "n175"; + case n200: + return "n200"; + case n225: + return "n225"; + case n250: + return "n250"; + case n275: + return "n275"; + case n300: + return "n300"; + case n350: + return "n350"; + case n400: + return "n400"; + case n450: + return "n450"; + case n500: + return "n500"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_"); + } + return ""; +} +uint16_t naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_::to_number() const +{ + const static uint16_t options[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; + return get_enum_number(options, 15, value, "naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_"); +} + +std::string pdcp_params_s::max_num_rohc_context_sessions_e_::to_string() const +{ + switch (value) { + case cs2: + return "cs2"; + case cs4: + return "cs4"; + case cs8: + return "cs8"; + case cs12: + return "cs12"; + case cs16: + return "cs16"; + case cs24: + return "cs24"; + case cs32: + return "cs32"; + case cs48: + return "cs48"; + case cs64: + return "cs64"; + case cs128: + return "cs128"; + case cs256: + return "cs256"; + case cs512: + return "cs512"; + case cs1024: + return "cs1024"; + case cs16384: + return "cs16384"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); + } + return ""; +} +uint16_t pdcp_params_s::max_num_rohc_context_sessions_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return get_enum_number(options, 14, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); +} + +std::string pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_::to_string() const +{ + switch (value) { + case cs2: + return "cs2"; + case cs4: + return "cs4"; + case cs8: + return "cs8"; + case cs12: + return "cs12"; + case cs16: + return "cs16"; + case cs24: + return "cs24"; + case cs32: + return "cs32"; + case cs48: + return "cs48"; + case cs64: + return "cs64"; + case cs128: + return "cs128"; + case cs256: + return "cs256"; + case cs512: + return "cs512"; + case cs1024: + return "cs1024"; + case cs16384: + return "cs16384"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_"); + } + return ""; +} +uint16_t pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return get_enum_number(options, 14, value, "pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_"); +} + +std::string phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_::to_string() const +{ + switch (value) { + case bw5: + return "bw5"; + case bw20: + return "bw20"; + default: + invalid_enum_value(value, "phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_"); + } + return ""; +} +uint8_t phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_::to_number() const +{ + const static uint8_t options[] = {5, 20}; + return get_enum_number(options, 2, value, "phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_"); +} + +std::string phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_::to_string() const +{ + switch (value) { + case n0: + return "n0"; + case n1: + return "n1"; + default: + invalid_enum_value(value, "phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_"); + } + return ""; +} +uint8_t phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_::to_number() const +{ + const static uint8_t options[] = {0, 1}; + return get_enum_number(options, 2, value, "phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_"); +} + +std::string +phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::max_layers_slot_or_subslot_pusch_r15_e_::to_string() const +{ + switch (value) { + case one_layer: + return "oneLayer"; + case two_layers: + return "twoLayers"; + case four_layers: + return "fourLayers"; + default: + invalid_enum_value( + value, "phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::max_layers_slot_or_subslot_pusch_r15_e_"); + } + return ""; +} +uint8_t +phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::max_layers_slot_or_subslot_pusch_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number( + options, 3, value, + "phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::max_layers_slot_or_subslot_pusch_r15_e_"); +} + +std::string phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::sps_stti_r15_e_::to_string() const +{ + switch (value) { + case slot: + return "slot"; + case subslot: + return "subslot"; + case slot_and_subslot: + return "slotAndSubslot"; + default: + invalid_enum_value(value, "phy_layer_params_v1530_s::stti_spt_capabilities_r15_s_::sps_stti_r15_e_"); + } + return ""; +} + +std::string supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_::to_string() const +{ + switch (value) { + case class1: + return "class1"; + case class2: + return "class2"; + case class4: + return "class4"; + default: + invalid_enum_value(value, "supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_"); + } + return ""; +} +uint8_t supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 4}; + return get_enum_number(options, 3, value, "supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_"); +} + +std::string sl_params_r12_s::disc_supported_proc_r12_e_::to_string() const +{ + switch (value) { + case n50: + return "n50"; + case n400: + return "n400"; + default: + invalid_enum_value(value, "sl_params_r12_s::disc_supported_proc_r12_e_"); + } + return ""; +} +uint16_t sl_params_r12_s::disc_supported_proc_r12_e_::to_number() const +{ + const static uint16_t options[] = {50, 400}; + return get_enum_number(options, 2, value, "sl_params_r12_s::disc_supported_proc_r12_e_"); +} + +std::string sl_params_v1530_s::slss_supported_tx_freq_r15_e_::to_string() const +{ + switch (value) { + case single: + return "single"; + case multiple: + return "multiple"; + default: + invalid_enum_value(value, "sl_params_v1530_s::slss_supported_tx_freq_r15_e_"); + } + return ""; +} + +std::string sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_e_::to_string() const +{ + switch (value) { + case s_tti1: + return "sTTI1"; + case s_tti2: + return "sTTI2"; + case s_tti3: + return "sTTI3"; + case s_tti4: + return "sTTI4"; + case s_tti6: + return "sTTI6"; + case s_tti8: + return "sTTI8"; + case s_tti12: + return "sTTI12"; + case s_tti16: + return "sTTI16"; + case s_tti20: + return "sTTI20"; + case s_tti40: + return "sTTI40"; + case s_tti60: + return "sTTI60"; + case s_tti80: + return "sTTI80"; + case s_tti120: + return "sTTI120"; + case s_tti240: + return "sTTI240"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_e_"); + } + return ""; +} +uint8_t sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4, 6, 8, 12, 16, 20, 40, 60, 80, 120, 240}; + return get_enum_number(options, 14, value, + "sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_e_"); +} + +std::string laa_params_v1430_s::two_step_sched_timing_info_r14_e_::to_string() const +{ + switch (value) { + case n_plus1: + return "nPlus1"; + case n_plus2: + return "nPlus2"; + case n_plus3: + return "nPlus3"; + default: + invalid_enum_value(value, "laa_params_v1430_s::two_step_sched_timing_info_r14_e_"); + } + return ""; +} +uint8_t laa_params_v1430_s::two_step_sched_timing_info_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3}; + return get_enum_number(options, 3, value, "laa_params_v1430_s::two_step_sched_timing_info_r14_e_"); +} + +std::string pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_::to_string() const +{ + switch (value) { + case cs2: + return "cs2"; + case cs4: + return "cs4"; + case cs8: + return "cs8"; + case cs12: + return "cs12"; + case cs16: + return "cs16"; + case cs24: + return "cs24"; + case cs32: + return "cs32"; + case cs48: + return "cs48"; + case cs64: + return "cs64"; + case cs128: + return "cs128"; + case cs256: + return "cs256"; + case cs512: + return "cs512"; + case cs1024: + return "cs1024"; + case cs16384: + return "cs16384"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_"); + } + return ""; +} +uint16_t pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_::to_number() const +{ + const static uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return get_enum_number(options, 14, value, "pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_"); +} + +std::string mbms_params_v1470_s::mbms_max_bw_r14_c_::types::to_string() const +{ + switch (value) { + case implicit_value: + return "implicitValue"; + case explicit_value: + return "explicitValue"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "mbms_params_v1470_s::mbms_max_bw_r14_c_::types"); + } + return ""; +} + +std::string mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_::to_string() const +{ + switch (value) { + case n3: + return "n3"; + case n6: + return "n6"; + case n9: + return "n9"; + case n12: + return "n12"; + default: + invalid_enum_value(value, "mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_"); + } + return ""; +} +uint8_t mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_::to_number() const +{ + const static uint8_t options[] = {3, 6, 9, 12}; + return get_enum_number(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_"); +} + +std::string mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n2: + return "n2"; + case n3: + return "n3"; + case n4: + return "n4"; + default: + invalid_enum_value(value, "mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_"); + } + return ""; +} +uint8_t mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 2, 3, 4}; + return get_enum_number(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_"); +} + +std::string ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_::to_string() const +{ + switch (value) { + case n16: + return "n16"; + case n17: + return "n17"; + case n18: + return "n18"; + case n19: + return "n19"; + case n20: + return "n20"; + case m2: + return "m2"; + default: + invalid_enum_value(value, "ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_"); + } + return ""; +} +uint8_t ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_::to_number() const +{ + const static uint8_t options[] = {16, 17, 18, 19, 20, 2}; + return get_enum_number(options, 6, value, "ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_"); +} + +std::string ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_::to_string() const +{ + switch (value) { + case n17: + return "n17"; + case m1: + return "m1"; + default: + invalid_enum_value(value, "ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_"); + } + return ""; +} +uint8_t ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_::to_number() const +{ + const static uint8_t options[] = {17, 1}; + return get_enum_number(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_"); +} + +std::string ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_::to_string() const +{ + switch (value) { + case n14: + return "n14"; + case m1: + return "m1"; + default: + invalid_enum_value(value, "ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_"); + } + return ""; +} +uint8_t ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_::to_number() const +{ + const static uint8_t options[] = {14, 1}; + return get_enum_number(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_"); +} + +// AccessStratumRelease ::= ENUMERATED +std::string access_stratum_release_e::to_string() const +{ + switch (value) { + case rel8: + return "rel8"; + case rel9: + return "rel9"; + case rel10: + return "rel10"; + case rel11: + return "rel11"; + case rel12: + return "rel12"; + case rel13: + return "rel13"; + case rel14: + return "rel14"; + case rel15: + return "rel15"; + default: + invalid_enum_value(value, "access_stratum_release_e"); + } + return ""; +} +uint8_t access_stratum_release_e::to_number() const +{ + const static uint8_t options[] = {8, 9, 10, 11, 12, 13, 14, 15}; + return get_enum_number(options, 8, value, "access_stratum_release_e"); +} + +std::string scg_cfg_r12_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case scg_cfg_r12: + return "scg-Config-r12"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "scg_cfg_r12_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string cells_triggered_list_item_c_::pci_utra_c_::types::to_string() const +{ + switch (value) { + case fdd: + return "fdd"; + case tdd: + return "tdd"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cells_triggered_list_item_c_::pci_utra_c_::types"); + } + return ""; +} + +std::string cells_triggered_list_item_c_::types::to_string() const +{ + switch (value) { + case pci_eutra: + return "physCellIdEUTRA"; + case pci_utra: + return "physCellIdUTRA"; + case pci_geran: + return "physCellIdGERAN"; + case pci_cdma2000: + return "physCellIdCDMA2000"; + case wlan_ids_r13: + return "wlan-Identifiers-r13"; + case pci_nr_r15: + return "physCellIdNR-r15"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "cells_triggered_list_item_c_::types"); + } + return ""; +} +uint16_t cells_triggered_list_item_c_::types::to_number() const +{ + switch (value) { + case pci_cdma2000: + return 2000; + default: + invalid_enum_number(value, "cells_triggered_list_item_c_::types"); + } + return 0; +} + +std::string drb_info_scg_r12_s::drb_type_r12_e_::to_string() const +{ + switch (value) { + case split: + return "split"; + case scg: + return "scg"; + default: + invalid_enum_value(value, "drb_info_scg_r12_s::drb_type_r12_e_"); + } + return ""; +} + +std::string ho_cmd_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ho_cmd_r8: + return "handoverCommand-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ho_cmd_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ho_prep_info_v920_ies_s::ue_cfg_release_r9_e_::to_string() const +{ + switch (value) { + case rel9: + return "rel9"; + case rel10: + return "rel10"; + case rel11: + return "rel11"; + case rel12: + return "rel12"; + case v10j0: + return "v10j0"; + case v11e0: + return "v11e0"; + case v1280: + return "v1280"; + case rel13: + return "rel13"; + case rel14: + return "rel14"; + case rel15: + return "rel15"; + default: + invalid_enum_value(value, "ho_prep_info_v920_ies_s::ue_cfg_release_r9_e_"); + } + return ""; +} + +std::string rrm_cfg_s::ue_inactive_time_e_::to_string() const +{ + switch (value) { + case s1: + return "s1"; + case s2: + return "s2"; + case s3: + return "s3"; + case s5: + return "s5"; + case s7: + return "s7"; + case s10: + return "s10"; + case s15: + return "s15"; + case s20: + return "s20"; + case s25: + return "s25"; + case s30: + return "s30"; + case s40: + return "s40"; + case s50: + return "s50"; + case min1: + return "min1"; + case min1s20c: + return "min1s20c"; + case min1s40: + return "min1s40"; + case min2: + return "min2"; + case min2s30: + return "min2s30"; + case min3: + return "min3"; + case min3s30: + return "min3s30"; + case min4: + return "min4"; + case min5: + return "min5"; + case min6: + return "min6"; + case min7: + return "min7"; + case min8: + return "min8"; + case min9: + return "min9"; + case min10: + return "min10"; + case min12: + return "min12"; + case min14: + return "min14"; + case min17: + return "min17"; + case min20: + return "min20"; + case min24: + return "min24"; + case min28: + return "min28"; + case min33: + return "min33"; + case min38: + return "min38"; + case min44: + return "min44"; + case min50: + return "min50"; + case hr1: + return "hr1"; + case hr1min30: + return "hr1min30"; + case hr2: + return "hr2"; + case hr2min30: + return "hr2min30"; + case hr3: + return "hr3"; + case hr3min30: + return "hr3min30"; + case hr4: + return "hr4"; + case hr5: + return "hr5"; + case hr6: + return "hr6"; + case hr8: + return "hr8"; + case hr10: + return "hr10"; + case hr13: + return "hr13"; + case hr16: + return "hr16"; + case hr20: + return "hr20"; + case day1: + return "day1"; + case day1hr12: + return "day1hr12"; + case day2: + return "day2"; + case day2hr12: + return "day2hr12"; + case day3: + return "day3"; + case day4: + return "day4"; + case day5: + return "day5"; + case day7: + return "day7"; + case day10: + return "day10"; + case day14: + return "day14"; + case day19: + return "day19"; + case day24: + return "day24"; + case day30: + return "day30"; + case day_more_than30: + return "dayMoreThan30"; + default: + invalid_enum_value(value, "rrm_cfg_s::ue_inactive_time_e_"); + } + return ""; +} + +std::string ho_prep_info_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ho_prep_info_r8: + return "handoverPreparationInformation-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ho_prep_info_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string tdd_cfg_sl_r12_s::sf_assign_sl_r12_e_::to_string() const +{ + switch (value) { + case none: + return "none"; + case sa0: + return "sa0"; + case sa1: + return "sa1"; + case sa2: + return "sa2"; + case sa3: + return "sa3"; + case sa4: + return "sa4"; + case sa5: + return "sa5"; + case sa6: + return "sa6"; + default: + invalid_enum_value(value, "tdd_cfg_sl_r12_s::sf_assign_sl_r12_e_"); + } + return ""; +} + +std::string mib_sl_s::sl_bw_r12_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "mib_sl_s::sl_bw_r12_e_"); + } + return ""; +} +uint8_t mib_sl_s::sl_bw_r12_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "mib_sl_s::sl_bw_r12_e_"); +} + +std::string mib_sl_v2x_r14_s::sl_bw_r14_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "mib_sl_v2x_r14_s::sl_bw_r14_e_"); + } + return ""; +} +uint8_t mib_sl_v2x_r14_s::sl_bw_r14_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "mib_sl_v2x_r14_s::sl_bw_r14_e_"); +} + +std::string scg_cfg_info_r12_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case scg_cfg_info_r12: + return "scg-ConfigInfo-r12"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "scg_cfg_info_r12_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string sl_precfg_disc_pool_r13_s::disc_period_r13_e_::to_string() const +{ + switch (value) { + case rf4: + return "rf4"; + case rf6: + return "rf6"; + case rf7: + return "rf7"; + case rf8: + return "rf8"; + case rf12: + return "rf12"; + case rf14: + return "rf14"; + case rf16: + return "rf16"; + case rf24: + return "rf24"; + case rf28: + return "rf28"; + case rf32: + return "rf32"; + case rf64: + return "rf64"; + case rf128: + return "rf128"; + case rf256: + return "rf256"; + case rf512: + return "rf512"; + case rf1024: + return "rf1024"; + case spare: + return "spare"; + default: + invalid_enum_value(value, "sl_precfg_disc_pool_r13_s::disc_period_r13_e_"); + } + return ""; +} +uint16_t sl_precfg_disc_pool_r13_s::disc_period_r13_e_::to_number() const +{ + const static uint16_t options[] = {4, 6, 7, 8, 12, 14, 16, 24, 28, 32, 64, 128, 256, 512, 1024}; + return get_enum_number(options, 15, value, "sl_precfg_disc_pool_r13_s::disc_period_r13_e_"); +} + +std::string sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_::to_string() const +{ + switch (value) { + case p25: + return "p25"; + case p50: + return "p50"; + case p75: + return "p75"; + case p100: + return "p100"; + default: + invalid_enum_value(value, "sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_"); + } + return ""; +} +uint8_t sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_::to_number() const +{ + const static uint8_t options[] = {25, 50, 75, 100}; + return get_enum_number(options, 4, value, "sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_"); +} + +std::string sl_precfg_general_r12_s::sl_bw_r12_e_::to_string() const +{ + switch (value) { + case n6: + return "n6"; + case n15: + return "n15"; + case n25: + return "n25"; + case n50: + return "n50"; + case n75: + return "n75"; + case n100: + return "n100"; + default: + invalid_enum_value(value, "sl_precfg_general_r12_s::sl_bw_r12_e_"); + } + return ""; +} +uint8_t sl_precfg_general_r12_s::sl_bw_r12_e_::to_number() const +{ + const static uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return get_enum_number(options, 6, value, "sl_precfg_general_r12_s::sl_bw_r12_e_"); +} + +std::string sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + default: + invalid_enum_value(value, "sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_"); + } + return ""; +} +uint8_t sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_"); +} + +std::string sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + case dbinf: + return "dBinf"; + default: + invalid_enum_value(value, "sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_"); + } + return ""; +} +uint8_t sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_"); +} + +std::string sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_::to_string() const +{ + switch (value) { + case n4: + return "n4"; + case n5: + return "n5"; + case n6: + return "n6"; + case n8: + return "n8"; + case n9: + return "n9"; + case n10: + return "n10"; + case n12: + return "n12"; + case n15: + return "n15"; + case n16: + return "n16"; + case n18: + return "n18"; + case n20: + return "n20"; + case n25: + return "n25"; + case n30: + return "n30"; + case n48: + return "n48"; + case n50: + return "n50"; + case n72: + return "n72"; + case n75: + return "n75"; + case n96: + return "n96"; + case n100: + return "n100"; + case spare13: + return "spare13"; + case spare12: + return "spare12"; + case spare11: + return "spare11"; + case spare10: + return "spare10"; + case spare9: + return "spare9"; + case spare8: + return "spare8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_"); + } + return ""; +} +uint8_t sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_::to_number() const +{ + const static uint8_t options[] = {4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 25, 30, 48, 50, 72, 75, 96, 100}; + return get_enum_number(options, 19, value, "sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_"); +} + +std::string sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_::to_string() const +{ + switch (value) { + case n1: + return "n1"; + case n3: + return "n3"; + case n5: + return "n5"; + case n8: + return "n8"; + case n10: + return "n10"; + case n15: + return "n15"; + case n20: + return "n20"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_"); + } + return ""; +} +uint8_t sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_::to_number() const +{ + const static uint8_t options[] = {1, 3, 5, 8, 10, 15, 20}; + return get_enum_number(options, 7, value, "sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_"); +} + +std::string sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + default: + invalid_enum_value(value, "sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_"); + } + return ""; +} +uint8_t sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_"); +} + +std::string sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_::to_string() const +{ + switch (value) { + case db0: + return "dB0"; + case db3: + return "dB3"; + case db6: + return "dB6"; + case db9: + return "dB9"; + case db12: + return "dB12"; + case dbinf: + return "dBinf"; + default: + invalid_enum_value(value, "sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_"); + } + return ""; +} +uint8_t sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_::to_number() const +{ + const static uint8_t options[] = {0, 3, 6, 9, 12}; + return get_enum_number(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_"); +} + +std::string sl_v2x_precfg_freq_info_r14_s::sync_prio_r14_e_::to_string() const +{ + switch (value) { + case gnss: + return "gnss"; + case enb: + return "enb"; + default: + invalid_enum_value(value, "sl_v2x_precfg_freq_info_r14_s::sync_prio_r14_e_"); + } + return ""; +} + +// SL-V2X-TxProfile-r15 ::= ENUMERATED +std::string sl_v2x_tx_profile_r15_e::to_string() const +{ + switch (value) { + case rel14: + return "rel14"; + case rel15: + return "rel15"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + default: + invalid_enum_value(value, "sl_v2x_tx_profile_r15_e"); + } + return ""; +} +uint8_t sl_v2x_tx_profile_r15_e::to_number() const +{ + const static uint8_t options[] = {14, 15}; + return get_enum_number(options, 2, value, "sl_v2x_tx_profile_r15_e"); +} + +std::string ue_paging_coverage_info_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_paging_coverage_info_r13: + return "uePagingCoverageInformation-r13"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_paging_coverage_info_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_radio_access_cap_info_r8: + return "ueRadioAccessCapabilityInformation-r8"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string ue_radio_paging_info_s::crit_exts_c_::c1_c_::types::to_string() const +{ + switch (value) { + case ue_radio_paging_info_r12: + return "ueRadioPagingInformation-r12"; + case spare7: + return "spare7"; + case spare6: + return "spare6"; + case spare5: + return "spare5"; + case spare4: + return "spare4"; + case spare3: + return "spare3"; + case spare2: + return "spare2"; + case spare1: + return "spare1"; + case nulltype: + return "NULL"; + default: + invalid_enum_value(value, "ue_radio_paging_info_s::crit_exts_c_::c1_c_::types"); + } + return ""; +} + +std::string var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_::to_string() const +{ + switch (value) { + case sec10: + return "sec10"; + case sec30: + return "sec30"; + case sec60: + return "sec60"; + case sec120: + return "sec120"; + case sec180: + return "sec180"; + case sec240: + return "sec240"; + case sec300: + return "sec300"; + default: + invalid_enum_value(value, "var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_"); + } + return ""; +} +uint16_t var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_::to_number() const +{ + const static uint16_t options[] = {10, 30, 60, 120, 180, 240, 300}; + return get_enum_number(options, 7, value, "var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_"); +} diff --git a/lib/src/common/mac_pcap.cc b/lib/src/common/mac_pcap.cc index 1e378b9e2..3eae666eb 100644 --- a/lib/src/common/mac_pcap.cc +++ b/lib/src/common/mac_pcap.cc @@ -103,5 +103,76 @@ void mac_pcap::write_dl_sirnti(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, SRSLTE_SIRNTI, DIRECTION_DOWNLINK, SI_RNTI); } - +void mac_pcap::write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len) +{ + uint8_t pdu[1024]; + bzero(pdu, sizeof(pdu)); + + // Size is limited by PDU buffer and MAC subheader (format 1 < 128 B) + if (input_len > 128 - 7) { + printf("PDU too large.\n"); + return; + } + + // MAC PDU Header (Short BSR) (1:54) (Padding:remainder) [3 subheaders] + // Sub-header (lcid=Short BSR) + // 0... .... = SCH reserved bit: 0x0 + // .0.. .... = Format2: Data length is < 32768 bytes + // ..1. .... = Extension: 0x1 + // ...1 1101 = LCID: Short BSR (0x1d) + // Sub-header (lcid=1, length=54) + // 0... .... = SCH reserved bit: 0x0 + // .0.. .... = Format2: Data length is < 32768 bytes + // ..1. .... = Extension: 0x1 + // ...0 0001 = LCID: 1 (0x01) + // 0... .... = Format: Data length is < 128 bytes + // .011 0110 = Length: 54 (Will be dynamically updated) + // Sub-header (lcid=Padding, length is remainder) + // 0... .... = SCH reserved bit: 0x0 + // .0.. .... = Format2: Data length is < 32768 bytes + // ..0. .... = Extension: 0x0 + // ...1 1111 = LCID: Padding (0x1f) + uint8_t mac_hdr[] = {0x3D, 0x21, 0x36, 0x1F, 0x0C}; + + // Update MAC length + mac_hdr[2] = input_len + 7; // rlc_hdr (2) + pdcp_hdr (1) + MAC (4) + + // AM Header (P) sn=4 + // 1... .... = Frame type: Data PDU (0x1) + // .0.. .... = Re-segmentation Flag: AMD PDU (0x0) + // ..1. .... = Polling Bit: Status report is requested (0x1) + // ...0 0... = Framing Info: First byte begins a RLC SDU and last byte ends a RLC SDU (0x0) + // .... .0.. = Extension: Data field follows from the octet following the fixed part of the header (0x0) + // .... ..00 0000 0100 = Sequence Number: 4 + uint8_t rlc_hdr[] = {0xA0, 0x04}; + + // PDCP-LTE sn=3 + // 000. .... = Reserved: 0 + // ...0 0011 = Seq Num: 3 + uint8_t pdcp_hdr[] = {0x03}; + + uint8_t* pdu_ptr = pdu; + + memcpy(pdu_ptr, mac_hdr, sizeof(mac_hdr)); + pdu_ptr += sizeof(mac_hdr); + memcpy(pdu_ptr, rlc_hdr, sizeof(rlc_hdr)); + pdu_ptr += sizeof(rlc_hdr); + memcpy(pdu_ptr, pdcp_hdr, sizeof(pdcp_hdr)); + pdu_ptr += sizeof(pdcp_hdr); + memcpy(pdu_ptr, input, input_len); + pdu_ptr += input_len; + + // MAC + uint8_t pad = 0x00; + for (uint32_t i = 0; i < 4; i++) { + memcpy(pdu_ptr, &pad, 1); + pdu_ptr += 1; + } + + // Pad + memcpy(pdu_ptr, &pad, 1); + pdu_ptr += 1; + + write_ul_crnti(pdu, pdu_ptr - pdu, 14931, true, 0); +} } diff --git a/lib/src/phy/phch/ra.c b/lib/src/phy/phch/ra.c index 4a904353c..6eb2c8f5a 100644 --- a/lib/src/phy/phch/ra.c +++ b/lib/src/phy/phch/ra.c @@ -189,17 +189,9 @@ int srslte_ra_ul_dci_to_grant_prb_allocation(srslte_ra_ul_dci_t *dci, srslte_ra_ static void ul_dci_to_grant_mcs(srslte_ra_ul_dci_t *dci, srslte_ra_ul_grant_t *grant) { // 8.6.2 First paragraph if (dci->mcs_idx <= 28) { - /* Table 8.6.1-1 on 36.213 */ - if (dci->mcs_idx < 11) { - grant->mcs.mod = SRSLTE_MOD_QPSK; - grant->mcs.tbs = srslte_ra_tbs_from_idx(dci->mcs_idx, grant->L_prb); - } else if (dci->mcs_idx < 21) { - grant->mcs.mod = SRSLTE_MOD_16QAM; - grant->mcs.tbs = srslte_ra_tbs_from_idx(dci->mcs_idx-1, grant->L_prb); - } else if (dci->mcs_idx < 29) { - grant->mcs.mod = SRSLTE_MOD_64QAM; - grant->mcs.tbs = srslte_ra_tbs_from_idx(dci->mcs_idx-2, grant->L_prb); - } else { + grant->mcs.mod = srslte_ra_ul_mod_from_mcs(dci->mcs_idx); + grant->mcs.tbs = srslte_ra_tbs_from_idx(srslte_ra_ul_tbs_idx_from_mcs(dci->mcs_idx), grant->L_prb); + if (grant->mcs.mod >= SRSLTE_MOD_LAST || grant->mcs.tbs < 0) { fprintf(stderr, "Invalid MCS index %d\n", dci->mcs_idx); } } else if (dci->mcs_idx == 29 && dci->cqi_request && grant->L_prb <= 4) { @@ -694,15 +686,26 @@ uint32_t srslte_ra_type2_n_vrb_dl(uint32_t nof_prb, bool ngap_is_1) { } /* Modulation and TBS index table for PDSCH from 3GPP TS 36.213 v10.3.0 table 7.1.7.1-1 */ -int srslte_ra_tbs_idx_from_mcs(uint32_t mcs) { +int srslte_ra_dl_tbs_idx_from_mcs(uint32_t mcs) +{ if(mcs < 29) { - return mcs_tbs_idx_table[mcs]; + return dl_mcs_tbs_idx_table[mcs]; } else { return SRSLTE_ERROR; } } -srslte_mod_t srslte_ra_mod_from_mcs(uint32_t mcs) { +int srslte_ra_ul_tbs_idx_from_mcs(uint32_t mcs) +{ + if (mcs < 29) { + return ul_mcs_tbs_idx_table[mcs]; + } else { + return SRSLTE_ERROR; + } +} + +srslte_mod_t srslte_ra_dl_mod_from_mcs(uint32_t mcs) +{ if (mcs <= 10 || mcs == 29) { return SRSLTE_MOD_QPSK; } else if (mcs <= 17 || mcs == 30) { @@ -712,12 +715,37 @@ srslte_mod_t srslte_ra_mod_from_mcs(uint32_t mcs) { } } -int srslte_ra_mcs_from_tbs_idx(uint32_t tbs_idx) { - for (int i=0;i<29;i++) { - if (tbs_idx == mcs_tbs_idx_table[i]) { - return i; +srslte_mod_t srslte_ra_ul_mod_from_mcs(uint32_t mcs) +{ + /* Table 8.6.1-1 on 36.213 */ + if (mcs <= 10) { + return SRSLTE_MOD_QPSK; + } else if (mcs <= 20) { + return SRSLTE_MOD_16QAM; + } else if (mcs <= 28) { + return SRSLTE_MOD_64QAM; + } else { + return SRSLTE_MOD_LAST; + } +} + +int srslte_ra_dl_mcs_from_tbs_idx(uint32_t tbs_idx) +{ + for (int i = 0; i < 29; i++) { + if (tbs_idx == dl_mcs_tbs_idx_table[i]) { + return i; } - } + } + return SRSLTE_ERROR; +} + +int srslte_ra_ul_mcs_from_tbs_idx(uint32_t tbs_idx) +{ + for (int i = 0; i < 29; i++) { + if (tbs_idx == ul_mcs_tbs_idx_table[i]) { + return i; + } + } return SRSLTE_ERROR; } diff --git a/lib/src/phy/phch/tbs_tables.h b/lib/src/phy/phch/tbs_tables.h index cb219d69c..40a9298e1 100644 --- a/lib/src/phy/phch/tbs_tables.h +++ b/lib/src/phy/phch/tbs_tables.h @@ -30,10 +30,12 @@ const int tbs_format1c_table[32] = { }; /* Modulation and TBS index table for PDSCH from 3GPP TS 36.213 v10.3.0 table 7.1.7.1-1 */ -const int mcs_tbs_idx_table[29] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 9, 10, 11, 12, 13, 14, 15, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26}; +const int dl_mcs_tbs_idx_table[29] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, + 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}; +/* Modulation and TBS index table for PUSCH from 3GPP TS 36.213 v10.3.0 table 8.6.1-1 */ +const int ul_mcs_tbs_idx_table[29] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 23, 24, 25, 26}; /* Transport Block Size from 3GPP TS 36.213 v10.3.0 table 7.1.7.2.1-1 */ const int tbs_table[27][110] = {{ 16, 32, 56, 88, 120, 152, 176, 208, 224, 256, 288, diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index 51d050c1d..fd0c0c908 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -25,12 +25,13 @@ */ -#include #include "srslte/upper/rlc.h" #include "srslte/upper/rlc_tm.h" #include "srslte/upper/rlc_um.h" #include "srslte/upper/rlc_am.h" +using namespace asn1::rrc; + namespace srslte { rlc::rlc() @@ -402,14 +403,15 @@ void rlc::add_bearer(uint32_t lcid) add_bearer(lcid, srslte_rlc_config_t()); } else { // SRB1 and SRB2 are AM - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg = {}; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS45; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_INFINITY; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_INFINITY; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS35; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS0; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + rlc_cfg_c::am_s_* amcfg = &cnfg.am(); + amcfg->ul_am_rlc.t_poll_retx = t_poll_retx_e::ms45; + amcfg->ul_am_rlc.poll_pdu = poll_pdu_e::p_infinity; + amcfg->ul_am_rlc.poll_byte = poll_byte_e::kbinfinity; + amcfg->ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + amcfg->dl_am_rlc.t_reordering = t_reordering_e::ms35; + amcfg->dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms0; add_bearer(lcid, srslte_rlc_config_t(&cnfg)); } } diff --git a/lib/src/upper/rlc_um.cc b/lib/src/upper/rlc_um.cc index 879412e79..55b61f008 100644 --- a/lib/src/upper/rlc_um.cc +++ b/lib/src/upper/rlc_um.cc @@ -32,6 +32,8 @@ #define RX_MOD_BASE(x) (((x)-vr_uh-cfg.rx_window_size)%cfg.rx_mod) +using namespace asn1::rrc; + namespace srslte { rlc_um::rlc_um(uint32_t queue_len) @@ -80,9 +82,9 @@ bool rlc_um::configure(srslte_rlc_config_t cnfg_) // store config cfg = cnfg_.um; - log->warning("%s configured in %s mode: ft_reordering=%d ms, rx_sn_field_length=%u bits, tx_sn_field_length=%u bits\n", - rb_name.c_str(), rlc_mode_text[cnfg_.rlc_mode], - cfg.t_reordering, rlc_umd_sn_size_num[cfg.rx_sn_field_length], rlc_umd_sn_size_num[cfg.rx_sn_field_length]); + log->warning("%s configured in %s: t_reordering=%d ms, rx_sn_field_length=%u bits, tx_sn_field_length=%u bits\n", + rb_name.c_str(), rlc_mode_text[cnfg_.rlc_mode], cfg.t_reordering, + rlc_umd_sn_size_num[cfg.rx_sn_field_length], rlc_umd_sn_size_num[cfg.rx_sn_field_length]); return true; } diff --git a/lib/test/asn1/CMakeLists.txt b/lib/test/asn1/CMakeLists.txt index c573cd291..fc1e6b325 100644 --- a/lib/test/asn1/CMakeLists.txt +++ b/lib/test/asn1/CMakeLists.txt @@ -19,13 +19,25 @@ # add_executable(srslte_asn1_rrc_mcch_test srslte_asn1_rrc_mcch_test.cc) -target_link_libraries(srslte_asn1_rrc_mcch_test srslte_asn1 srslte_common) +target_link_libraries(srslte_asn1_rrc_mcch_test rrc_asn1 srslte_common) add_test(srslte_asn1_rrc_mcch_test srslte_asn1_rrc_mcch_test) add_executable(srslte_asn1_rrc_meas_test srslte_asn1_rrc_meas_test.cc) -target_link_libraries(srslte_asn1_rrc_meas_test srslte_common srslte_phy srslte_asn1) +target_link_libraries(srslte_asn1_rrc_meas_test rrc_asn1 srslte_common) add_test(srslte_asn1_rrc_meas_test srslte_asn1_rrc_meas_test) +add_executable(srslte_asn1_rrc_ul_dcch_test srslte_asn1_rrc_ul_dcch_test.cc) +target_link_libraries(srslte_asn1_rrc_ul_dcch_test rrc_asn1 srslte_common) +add_test(srslte_asn1_rrc_ul_dcch_test srslte_asn1_rrc_ul_dcch_test) + +add_executable(srslte_asn1_rrc_dl_ccch_test srslte_asn1_rrc_dl_ccch_test.cc) +target_link_libraries(srslte_asn1_rrc_dl_ccch_test rrc_asn1 srslte_common) +add_test(srslte_asn1_rrc_dl_ccch_test srslte_asn1_rrc_dl_ccch_test) + +add_executable(srslte_asn1_rrc_dl_dcch_test srslte_asn1_rrc_dl_dcch_test.cc) +target_link_libraries(srslte_asn1_rrc_dl_dcch_test rrc_asn1 srslte_common) +add_test(srslte_asn1_rrc_dl_dcch_test srslte_asn1_rrc_dl_dcch_test) + add_executable(srslte_asn1_m2ap_test srslte_asn1_m2ap_test.cc) target_link_libraries(srslte_asn1_m2ap_test srslte_common srslte_phy srslte_asn1) add_test(srslte_asn1_m2ap_test srslte_asn1_m2ap_test) diff --git a/lib/test/asn1/rrc_meas_test.cc b/lib/test/asn1/rrc_meas_test.cc deleted file mode 100644 index 63a4d61b6..000000000 --- a/lib/test/asn1/rrc_meas_test.cc +++ /dev/null @@ -1,91 +0,0 @@ -/** - * - * \section COPYRIGHT - * - * Copyright 2013-2015 Software Radio Systems Limited - * - * \section LICENSE - * - * This file is part of the srsUE library. - * - * srsUE is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. - * - * srsUE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * A copy of the GNU Affero General Public License can be found in - * the LICENSE file in the top-level directory of this distribution - * and at http://www.gnu.org/licenses/. - * - */ - -#include -#include -#include -#include "srslte/common/log_filter.h" -#include "srslte/asn1/liblte_rrc.h" - - -void basic_test() { - srslte::log_filter log1("RRC"); - log1.set_level(srslte::LOG_LEVEL_DEBUG); - log1.set_hex_limit(128); - - LIBLTE_BIT_MSG_STRUCT bit_buf; - LIBLTE_BIT_MSG_STRUCT bit_buf2; - LIBLTE_BYTE_MSG_STRUCT byte_buf; - LIBLTE_RRC_UL_DCCH_MSG_STRUCT ul_dcch_msg; - - uint32_t rrc_message_len = 18; - uint8_t rrc_message[] = {0x08, 0x10, 0x49, 0x3C, 0x0D, 0x97, 0x89, 0x83, - 0xC0, 0x84, 0x20, 0x82, 0x08, 0x21, 0x00, 0x01, - 0xBC, 0x48}; - - srslte_bit_unpack_vector(rrc_message, bit_buf.msg, rrc_message_len*8); - bit_buf.N_bits = rrc_message_len*8; - liblte_rrc_unpack_ul_dcch_msg((LIBLTE_BIT_MSG_STRUCT*)&bit_buf, &ul_dcch_msg); - - assert(ul_dcch_msg.msg_type == LIBLTE_RRC_UL_DCCH_MSG_TYPE_MEASUREMENT_REPORT); - LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *rep = &ul_dcch_msg.msg.measurement_report; - assert(rep->meas_id == 1); - assert(rep->pcell_rsrp_result == 73); - assert(rep->pcell_rsrq_result == 15); - assert(rep->have_meas_result_neigh_cells); - assert(rep->meas_result_neigh_cells_choice == LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA); - LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA_STRUCT *eutra = &rep->meas_result_neigh_cells.eutra; - assert(eutra->n_result == 1); - assert(eutra->result_eutra_list[0].phys_cell_id == 357); - assert(eutra->result_eutra_list[0].have_cgi_info); - assert(eutra->result_eutra_list[0].cgi_info.have_plmn_identity_list); - assert(eutra->result_eutra_list[0].cgi_info.cell_global_id.plmn_id.mcc == 0xF898); - assert(eutra->result_eutra_list[0].cgi_info.cell_global_id.plmn_id.mnc == 0xFF78); - assert(eutra->result_eutra_list[0].cgi_info.cell_global_id.cell_id == 0x1084104); - assert(eutra->result_eutra_list[0].cgi_info.tracking_area_code == 0x1042); - assert(eutra->result_eutra_list[0].cgi_info.have_plmn_identity_list); - assert(eutra->result_eutra_list[0].cgi_info.n_plmn_identity_list == 1); - assert(eutra->result_eutra_list[0].cgi_info.plmn_identity_list[0].mcc == 0xFFFF); - assert(eutra->result_eutra_list[0].cgi_info.plmn_identity_list[0].mnc == 0xFF00); - assert(eutra->result_eutra_list[0].meas_result.have_rsrp); - assert(eutra->result_eutra_list[0].meas_result.rsrp_result == 60); - assert(eutra->result_eutra_list[0].meas_result.have_rsrp); - assert(eutra->result_eutra_list[0].meas_result.rsrq_result == 18); - - liblte_rrc_pack_ul_dcch_msg(&ul_dcch_msg, (LIBLTE_BIT_MSG_STRUCT*)&bit_buf2); - srslte_bit_pack_vector(bit_buf2.msg, byte_buf.msg, bit_buf2.N_bits); - byte_buf.N_bytes = (bit_buf2.N_bits+7)/8; - log1.info_hex(byte_buf.msg, byte_buf.N_bytes, "UL_DCCH Packed message\n"); - - for(uint32_t i=0; i + +using namespace asn1; +using namespace asn1::rrc; + +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +int rrc_conn_setup_test1() +{ + srslte::log_filter log1("RRC"); + log1.set_level(srslte::LOG_LEVEL_DEBUG); + log1.set_hex_limit(128); + + uint8_t rrc_msg[] = {0x60, 0x12, 0x98, 0x0b, 0xfd, 0xd2, 0x04, 0xfa, 0x18, 0x3e, 0xd5, 0xe6, 0xc2, + 0x59, 0x90, 0xc1, 0xa6, 0x00, 0x01, 0x31, 0x40, 0x42, 0x50, 0x80, 0x00, 0xf8}; + uint32_t rrc_msg_len = sizeof(rrc_msg); + // 6012980bfdd204fa183ed5e6c25990c1a60001314042508000f8 + + bit_ref bref(&rrc_msg[0], sizeof(rrc_msg)); + bit_ref bref0(&rrc_msg[0], sizeof(rrc_msg)); + + dl_ccch_msg_s dl_ccch_msg; + dl_ccch_msg.unpack(bref); + + TESTASSERT(dl_ccch_msg.msg.type() == dl_ccch_msg_type_c::types::c1); + TESTASSERT(dl_ccch_msg.msg.c1().type() == dl_ccch_msg_type_c::c1_c_::types::rrc_conn_setup); + + rrc_conn_setup_s* setup = &dl_ccch_msg.msg.c1().rrc_conn_setup(); + + // FIXME: add test for setup + + rr_cfg_ded_s* cnfg = &setup->crit_exts.c1().rrc_conn_setup_r8().rr_cfg_ded; + TESTASSERT(cnfg->phys_cfg_ded_present); + + // FIXME: add tests for RR config dedicated + + phys_cfg_ded_s* phy_cnfg = &cnfg->phys_cfg_ded; + TESTASSERT(phy_cnfg->cqi_report_cfg_present); + + // Test CQI config + cqi_report_cfg_s* cqi_cfg = &phy_cnfg->cqi_report_cfg; + TESTASSERT(cqi_cfg->cqi_report_periodic_present); + TESTASSERT(cqi_cfg->nom_pdsch_rs_epre_offset == 0); + TESTASSERT(cqi_cfg->cqi_report_periodic.type() == setup_e::setup); + TESTASSERT(cqi_cfg->cqi_report_periodic.setup().cqi_pucch_res_idx == 0); + TESTASSERT(cqi_cfg->cqi_report_periodic.setup().cqi_pmi_cfg_idx == 38); + + // test repacking + uint8_t rrc_msg2[rrc_msg_len]; + bit_ref bref2(&rrc_msg2[0], sizeof(rrc_msg2)); + if (dl_ccch_msg.pack(bref2) != SRSASN_SUCCESS) { + return -1; + } + TESTASSERT(bref.distance(bref0) == bref2.distance(&rrc_msg2[0])); + TESTASSERT(memcmp(rrc_msg2, rrc_msg, rrc_msg_len) == 0); + + return 0; +} + +// Only packing implemented +int rrc_reestablishment_reject_test() +{ + srslte::log_filter log1("RRC"); + log1.set_level(srslte::LOG_LEVEL_DEBUG); + log1.set_hex_limit(128); + + dl_ccch_msg_s dl_ccch_msg; + dl_ccch_msg.msg.set(dl_ccch_msg_type_c::types::c1); + + dl_ccch_msg.msg.c1().set(dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reest_reject); + dl_ccch_msg.msg.c1().rrc_conn_reest_reject().crit_exts.set( + rrc_conn_reest_reject_s::crit_exts_c_::types::rrc_conn_reest_reject_r8); + dl_ccch_msg.msg.c1().rrc_conn_reest_reject().crit_exts.rrc_conn_reest_reject_r8(); + + // test repacking + uint8_t rrc_msg[32]; + bit_ref bref(rrc_msg, sizeof(rrc_msg)); + if (dl_ccch_msg.pack(bref) != SRSASN_SUCCESS) { + return -1; + } + + int actual_len = bref.distance_bytes(rrc_msg); + log1.info_hex(rrc_msg, actual_len, "DL-CCCH message (%d/%zd B)\n", actual_len, sizeof(rrc_msg)); + + return 0; +} + +int main(int argc, char** argv) +{ + TESTASSERT(rrc_conn_setup_test1() == 0); + TESTASSERT(rrc_reestablishment_reject_test() == 0); + return 0; +} \ No newline at end of file diff --git a/lib/test/asn1/srslte_asn1_rrc_dl_dcch_test.cc b/lib/test/asn1/srslte_asn1_rrc_dl_dcch_test.cc new file mode 100644 index 000000000..17fc64cef --- /dev/null +++ b/lib/test/asn1/srslte_asn1_rrc_dl_dcch_test.cc @@ -0,0 +1,84 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2019 Software Radio Systems Limited + * + * \section LICENSE + * + * This file is part of the srsUE library. + * + * srsUE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * srsUE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * A copy of the GNU Affero General Public License can be found in + * the LICENSE file in the top-level directory of this distribution + * and at http://www.gnu.org/licenses/. + * + */ + +#include "../../../srsue/hdr/upper/rrc.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/bcd_helpers.h" +#include "srslte/common/log_filter.h" +#include + +using namespace asn1; +using namespace asn1::rrc; + +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +int rrc_conn_reconfig_ho_test1() +{ + srslte::log_filter log1("RRC"); + log1.set_level(srslte::LOG_LEVEL_DEBUG); + log1.set_hex_limit(128); + + uint8_t rrc_msg[] = {0x20, 0x1b, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x01, 0xa9, 0x08, 0x80, 0x00, 0x00, 0x29, 0x00, + 0x97, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x22, 0x14, 0x00, 0xf8, 0x02, 0x0a, 0xc0, 0x60, + 0x00, 0xa0, 0x0c, 0x80, 0x42, 0x02, 0x9f, 0x43, 0x07, 0xda, 0xbc, 0xf8, 0x4b, 0x32, 0x18, + 0x34, 0xc0, 0x00, 0x2d, 0x68, 0x08, 0x5e, 0x18, 0x00, 0x16, 0x80, 0x00}; + // 20 1b 3f 80 00 00 00 01 a9 08 80 00 00 29 00 97 80 00 00 00 01 04 22 14 00 f8 02 0a c0 60 00 a0 0c 80 42 02 9f 43 + // 07 da bc f8 4b 32 18 34 c0 00 2d 68 08 5e 18 00 16 80 00 + + bit_ref bref(rrc_msg, sizeof(rrc_msg)); + + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.unpack(bref); + + TESTASSERT(dl_dcch_msg.msg.type() == dl_dcch_msg_type_c::types::c1); + TESTASSERT(dl_dcch_msg.msg.c1().type() == dl_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg); + + // assign to stack-allocated variable + asn1::rrc::rrc_conn_recfg_s mob_reconf; + mob_reconf = dl_dcch_msg.msg.c1().rrc_conn_recfg(); + + // decode same message and assign again + bit_ref bref2(rrc_msg, sizeof(rrc_msg)); + dl_dcch_msg_s dl_dcch_msg2; + dl_dcch_msg2.unpack(bref2); + TESTASSERT(dl_dcch_msg2.msg.type() == dl_dcch_msg_type_c::types::c1); + TESTASSERT(dl_dcch_msg2.msg.c1().type() == dl_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg); + mob_reconf = dl_dcch_msg2.msg.c1().rrc_conn_recfg(); + + return 0; +} + +int main(int argc, char** argv) +{ + TESTASSERT(rrc_conn_reconfig_ho_test1() == 0); + return 0; +} diff --git a/lib/test/asn1/srslte_asn1_rrc_mcch_test.cc b/lib/test/asn1/srslte_asn1_rrc_mcch_test.cc index c3a4035c0..6c35386c8 100644 --- a/lib/test/asn1/srslte_asn1_rrc_mcch_test.cc +++ b/lib/test/asn1/srslte_asn1_rrc_mcch_test.cc @@ -24,137 +24,116 @@ * */ -#include -#include "srslte/asn1/liblte_rrc.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/bcd_helpers.h" #include "srslte/common/log_filter.h" -#include "srslte/phy/utils/bit.h" +#include -void pack_test() +using namespace asn1::rrc; + +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +int basic_test() { srslte::log_filter log1("RRC"); log1.set_level(srslte::LOG_LEVEL_DEBUG); log1.set_hex_limit(1024); - uint32_t known_reference_len = 30; - uint8_t known_reference[256] = {0x0d, 0x8f, 0xdf, 0xff, 0xff, 0xff, 0xe2, 0x2f, - 0xfc, 0x38, 0x5e, 0x61, 0xec, 0xa8, 0x00, 0x00, - 0x02, 0x02, 0x10, 0x00, 0x20, 0x05, 0xe6, 0x1e, - 0xca, 0x80, 0x00, 0x00, 0x40, 0x42}; - - LIBLTE_BYTE_MSG_STRUCT byte_buf; - LIBLTE_BIT_MSG_STRUCT bit_buf; - LIBLTE_RRC_MCCH_MSG_STRUCT mcch_msg; - - mcch_msg.commonsf_allocpatternlist_r9_size = 2; - mcch_msg.commonsf_allocpatternlist_r9[0].radio_fr_alloc_offset = 4; - mcch_msg.commonsf_allocpatternlist_r9[0].radio_fr_alloc_period = LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N32; - mcch_msg.commonsf_allocpatternlist_r9[0].subfr_alloc_num_frames = LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE; - mcch_msg.commonsf_allocpatternlist_r9[0].subfr_alloc = 0x3F; - mcch_msg.commonsf_allocpatternlist_r9[1].radio_fr_alloc_offset = 7; - mcch_msg.commonsf_allocpatternlist_r9[1].radio_fr_alloc_period = LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N8; - mcch_msg.commonsf_allocpatternlist_r9[1].subfr_alloc_num_frames = LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_FOUR; - mcch_msg.commonsf_allocpatternlist_r9[1].subfr_alloc = 0xFFFFFF; - - mcch_msg.commonsf_allocperiod_r9 = LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF256; - - mcch_msg.pmch_infolist_r9_size = 2; - - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9_size = 1; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].logicalchannelid_r9 = 1; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].sessionid_r9_present = true; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].sessionid_r9 = 1; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_explicit = true; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_r9.mcc = 0xF987; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_r9.mnc = 0xF654; - mcch_msg.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.serviceid_r9 = 1; - mcch_msg.pmch_infolist_r9[0].pmch_config_r9.datamcs_r9 = 16; - mcch_msg.pmch_infolist_r9[0].pmch_config_r9.mch_schedulingperiod_r9 = LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF1024; - mcch_msg.pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9 = 1535; - - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9_size = 1; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].logicalchannelid_r9 = 2; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].sessionid_r9_present = true; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].sessionid_r9 = 2; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_explicit = true; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_r9.mcc = 0xF987; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_r9.mnc = 0xF654; - mcch_msg.pmch_infolist_r9[1].mbms_sessioninfolist_r9[0].tmgi_r9.serviceid_r9 = 2; - mcch_msg.pmch_infolist_r9[1].pmch_config_r9.datamcs_r9 = 8; - mcch_msg.pmch_infolist_r9[1].pmch_config_r9.mch_schedulingperiod_r9 = LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF8; - mcch_msg.pmch_infolist_r9[1].pmch_config_r9.sf_alloc_end_r9 = 0; - - liblte_rrc_pack_mcch_msg(&mcch_msg, &bit_buf); - liblte_pack(bit_buf.msg, bit_buf.N_bits, byte_buf.msg); - byte_buf.N_bytes = (bit_buf.N_bits+7)/8; + uint8_t known_reference[] = {0x0d, 0x8f, 0xdf, 0xff, 0xff, 0xff, 0xe2, 0x2f, 0xfc, 0x38, + 0x5e, 0x61, 0xec, 0xa8, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, + 0x20, 0x05, 0xe6, 0x1e, 0xca, 0x80, 0x00, 0x00, 0x40, 0x42}; + uint32_t known_reference_len = sizeof(known_reference); + // 0d8fdfffffffe22ffc385e61eca80000020210002005e61eca8000004042 + + asn1::bit_ref bref(&known_reference[0], sizeof(known_reference)); + asn1::bit_ref bref0(&known_reference[0], sizeof(known_reference)); + asn1::rrc::mcch_msg_s mcch_msg; + + mcch_msg.unpack(bref); + + TESTASSERT(mcch_msg.msg.type() == mcch_msg_type_c::types::c1); + TESTASSERT(mcch_msg.msg.c1().type() == mcch_msg_type_c::c1_c_::types::mbsfn_area_cfg_r9); + mbsfn_area_cfg_r9_s* area_cfg_r9 = &mcch_msg.msg.c1().mbsfn_area_cfg_r9(); + TESTASSERT(not area_cfg_r9->non_crit_ext_present); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9.size() == 2); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[0].radioframe_alloc_period == + mbsfn_sf_cfg_s::radioframe_alloc_period_e_::n32); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[0].radioframe_alloc_offset == 4); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[0].sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[0].sf_alloc.one_frame().to_string() == "111111"); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[1].radioframe_alloc_period == + mbsfn_sf_cfg_s::radioframe_alloc_period_e_::n8); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[1].radioframe_alloc_offset == 7); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[1].sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::four_frames); + TESTASSERT(area_cfg_r9->common_sf_alloc_r9[1].sf_alloc.four_frames().to_string() == "111111111111111111111111"); + TESTASSERT(area_cfg_r9->common_sf_alloc_period_r9 == mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_::rf256); + TESTASSERT(area_cfg_r9->pmch_info_list_r9.size() == 2); + TESTASSERT(not area_cfg_r9->pmch_info_list_r9[0].ext); + TESTASSERT(not area_cfg_r9->pmch_info_list_r9[0].pmch_cfg_r9.ext); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].pmch_cfg_r9.sf_alloc_end_r9 == 1535); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].pmch_cfg_r9.data_mcs_r9 == 16); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].pmch_cfg_r9.mch_sched_period_r9 == + pmch_cfg_r9_s::mch_sched_period_r9_e_::rf1024); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9.size() == 1); + TESTASSERT(not area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].ext); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].session_id_r9_present); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.type() == + tmgi_r9_s::plmn_id_r9_c_::types::explicit_value_r9); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0] + .mbms_session_info_list_r9[0] + .tmgi_r9.plmn_id_r9.explicit_value_r9() + .mcc_present); + std::string mccmnc_str = srslte::plmn_id_to_string( + area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.explicit_value_r9()); + TESTASSERT(mccmnc_str == "987654"); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].tmgi_r9.service_id_r9.to_string() == + "000001"); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].session_id_r9.to_string() == "01"); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].lc_ch_id_r9 == 1); + + TESTASSERT(not area_cfg_r9->pmch_info_list_r9[1].ext); + TESTASSERT(not area_cfg_r9->pmch_info_list_r9[1].pmch_cfg_r9.ext); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].pmch_cfg_r9.sf_alloc_end_r9 == 0); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].pmch_cfg_r9.data_mcs_r9 == 8); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].pmch_cfg_r9.mch_sched_period_r9 == + pmch_cfg_r9_s::mch_sched_period_r9_e_::rf8); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9.size() == 1); + TESTASSERT(not area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9[0].ext); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9[0].session_id_r9_present); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.type() == + tmgi_r9_s::plmn_id_r9_c_::types::explicit_value_r9); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1] + .mbms_session_info_list_r9[0] + .tmgi_r9.plmn_id_r9.explicit_value_r9() + .mcc_present); + mccmnc_str = srslte::plmn_id_to_string( + area_cfg_r9->pmch_info_list_r9[0].mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.explicit_value_r9()); + TESTASSERT(mccmnc_str == "987654"); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9[0].tmgi_r9.service_id_r9.to_string() == + "000002"); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9[0].session_id_r9.to_string() == "02"); + TESTASSERT(area_cfg_r9->pmch_info_list_r9[1].mbms_session_info_list_r9[0].lc_ch_id_r9 == 2); //log1.info_hex(byte_buf.msg, byte_buf.N_bytes, "MCCH packed message:"); - assert(byte_buf.N_bytes == known_reference_len); - for(uint32 i=0; i +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/bcd_helpers.h" +#include "srslte/common/log_filter.h" #include #include -#include "srslte/common/log_filter.h" -#include "srslte/asn1/liblte_rrc.h" +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +using namespace asn1; +using namespace asn1::rrc; -void basic_test() { +int basic_test() +{ srslte::log_filter log1("RRC"); log1.set_level(srslte::LOG_LEVEL_DEBUG); log1.set_hex_limit(128); - LIBLTE_BIT_MSG_STRUCT bit_buf; - LIBLTE_BIT_MSG_STRUCT bit_buf2; - LIBLTE_BYTE_MSG_STRUCT byte_buf; - LIBLTE_RRC_UL_DCCH_MSG_STRUCT ul_dcch_msg; + uint8_t rrc_msg[] = {0x08, 0x10, 0x49, 0x3C, 0x0D, 0x97, 0x89, 0x83, 0xC0, + 0x84, 0x20, 0x82, 0x08, 0x21, 0x00, 0x01, 0xBC, 0x48}; + uint32_t rrc_msg_len = sizeof(rrc_msg); + // 0810493C0D978983C084208208210001BC48 - uint32_t rrc_message_len = 18; - uint8_t rrc_message[] = {0x08, 0x10, 0x49, 0x3C, 0x0D, 0x97, 0x89, 0x83, - 0xC0, 0x84, 0x20, 0x82, 0x08, 0x21, 0x00, 0x01, - 0xBC, 0x48}; + bit_ref bref(&rrc_msg[0], sizeof(rrc_msg)); + bit_ref bref0(&rrc_msg[0], sizeof(rrc_msg)); - srslte_bit_unpack_vector(rrc_message, bit_buf.msg, rrc_message_len*8); - bit_buf.N_bits = rrc_message_len*8; - liblte_rrc_unpack_ul_dcch_msg((LIBLTE_BIT_MSG_STRUCT*)&bit_buf, &ul_dcch_msg); + ul_dcch_msg_s ul_dcch_msg; + ul_dcch_msg.unpack(bref); - assert(ul_dcch_msg.msg_type == LIBLTE_RRC_UL_DCCH_MSG_TYPE_MEASUREMENT_REPORT); - LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *rep = &ul_dcch_msg.msg.measurement_report; - assert(rep->meas_id == 1); - assert(rep->pcell_rsrp_result == 73); - assert(rep->pcell_rsrq_result == 15); - assert(rep->have_meas_result_neigh_cells); - assert(rep->meas_result_neigh_cells_choice == LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA); - LIBLTE_RRC_MEAS_RESULT_LIST_EUTRA_STRUCT *eutra = &rep->meas_result_neigh_cells.eutra; - assert(eutra->n_result == 1); - assert(eutra->result_eutra_list[0].phys_cell_id == 357); - assert(eutra->result_eutra_list[0].have_cgi_info); - assert(eutra->result_eutra_list[0].cgi_info.have_plmn_identity_list); - assert(eutra->result_eutra_list[0].cgi_info.cell_global_id.plmn_id.mcc == 0xF898); - assert(eutra->result_eutra_list[0].cgi_info.cell_global_id.plmn_id.mnc == 0xFF78); - assert(eutra->result_eutra_list[0].cgi_info.cell_global_id.cell_id == 0x1084104); - assert(eutra->result_eutra_list[0].cgi_info.tracking_area_code == 0x1042); - assert(eutra->result_eutra_list[0].cgi_info.have_plmn_identity_list); - assert(eutra->result_eutra_list[0].cgi_info.n_plmn_identity_list == 1); - assert(eutra->result_eutra_list[0].cgi_info.plmn_identity_list[0].mcc == 0xFFFF); - assert(eutra->result_eutra_list[0].cgi_info.plmn_identity_list[0].mnc == 0xFF00); - assert(eutra->result_eutra_list[0].meas_result.have_rsrp); - assert(eutra->result_eutra_list[0].meas_result.rsrp_result == 60); - assert(eutra->result_eutra_list[0].meas_result.have_rsrp); - assert(eutra->result_eutra_list[0].meas_result.rsrq_result == 18); + TESTASSERT(ul_dcch_msg.msg.type() == ul_dcch_msg_type_c::types::c1); + TESTASSERT(ul_dcch_msg.msg.c1().type() == ul_dcch_msg_type_c::c1_c_::types::meas_report); - liblte_rrc_pack_ul_dcch_msg(&ul_dcch_msg, (LIBLTE_BIT_MSG_STRUCT*)&bit_buf2); - srslte_bit_pack_vector(bit_buf2.msg, byte_buf.msg, bit_buf2.N_bits); - byte_buf.N_bytes = (bit_buf2.N_bits+7)/8; - log1.info_hex(byte_buf.msg, byte_buf.N_bytes, "UL_DCCH Packed message\n"); + meas_report_s* rep = &ul_dcch_msg.msg.c1().meas_report(); + TESTASSERT(rep->crit_exts.type() == meas_report_s::crit_exts_c_::types::c1); + TESTASSERT(rep->crit_exts.c1().type() == meas_report_s::crit_exts_c_::c1_c_::types::meas_report_r8); + TESTASSERT(not rep->crit_exts.c1().meas_report_r8().non_crit_ext_present); + meas_results_s* meas = &rep->crit_exts.c1().meas_report_r8().meas_results; - for(uint32_t i=0; iext); + TESTASSERT(meas->meas_id == 1); + TESTASSERT(meas->meas_result_pcell.rsrp_result == 73); + TESTASSERT(meas->meas_result_pcell.rsrq_result == 15); + TESTASSERT(meas->meas_result_neigh_cells_present); + TESTASSERT(meas->meas_result_neigh_cells.type() == + meas_results_s::meas_result_neigh_cells_c_::types::meas_result_list_eutra); + meas_result_list_eutra_l& meas_list = meas->meas_result_neigh_cells.meas_result_list_eutra(); + TESTASSERT(meas_list.size() == 1); + TESTASSERT(meas_list[0].pci == 357); + TESTASSERT(meas_list[0].cgi_info_present); + TESTASSERT(meas_list[0].cgi_info.plmn_id_list_present); + TESTASSERT(meas_list[0].cgi_info.cell_global_id.plmn_id.mcc_present); + std::string mccmnc_str = srslte::plmn_id_to_string(meas_list[0].cgi_info.cell_global_id.plmn_id); + TESTASSERT(mccmnc_str == "89878"); + TESTASSERT(meas_list[0].cgi_info.cell_global_id.cell_id.to_number() == 0x1084104); + TESTASSERT(meas_list[0].cgi_info.tac.to_number() == 0x1042); + TESTASSERT(meas_list[0].cgi_info.plmn_id_list.size() == 1); + TESTASSERT(not meas_list[0].cgi_info.plmn_id_list[0].mcc_present); + TESTASSERT(not meas_list[0].meas_result.ext); + TESTASSERT(meas_list[0].meas_result.rsrp_result_present); + TESTASSERT(meas_list[0].meas_result.rsrp_result == 60); + TESTASSERT(meas_list[0].meas_result.rsrq_result_present); + TESTASSERT(meas_list[0].meas_result.rsrq_result == 18); + uint8_t rrc_msg2[rrc_msg_len]; + bit_ref bref2(&rrc_msg2[0], sizeof(rrc_msg2)); + ul_dcch_msg.pack(bref2); + TESTASSERT(bref.distance(bref0) == bref2.distance(&rrc_msg2[0])); + TESTASSERT(memcmp(rrc_msg2, rrc_msg, rrc_msg_len) == 0); + + return 0; +} -int main(int argc, char **argv) { - basic_test(); +int main(int argc, char** argv) +{ + TESTASSERT(basic_test() == 0); + return 0; } diff --git a/lib/test/asn1/srslte_asn1_rrc_ul_dcch_test.cc b/lib/test/asn1/srslte_asn1_rrc_ul_dcch_test.cc new file mode 100644 index 000000000..1c46a981b --- /dev/null +++ b/lib/test/asn1/srslte_asn1_rrc_ul_dcch_test.cc @@ -0,0 +1,174 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2015 Software Radio Systems Limited + * + * \section LICENSE + * + * This file is part of the srsUE library. + * + * srsUE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * srsUE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * A copy of the GNU Affero General Public License can be found in + * the LICENSE file in the top-level directory of this distribution + * and at http://www.gnu.org/licenses/. + * + */ + +#include "../../../srsue/hdr/upper/rrc.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/bcd_helpers.h" +#include "srslte/common/log_filter.h" +#include "srslte/common/mac_pcap.h" +#include + +using namespace asn1::rrc; + +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +int rrc_ue_cap_info_test(srslte::mac_pcap& pcap) +{ + srslte::log_filter log1("RRC"); + log1.set_level(srslte::LOG_LEVEL_DEBUG); + log1.set_hex_limit(128); + + rrc_args_t args = {}; + args.feature_group = 0xe6041c00; + args.nof_supported_bands = 1; + args.supported_bands[0] = 8; + args.ue_category = 4; + + asn1::rrc::ul_dcch_msg_s ul_dcch_msg; + ul_dcch_msg.msg.set(ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(ul_dcch_msg_type_c::c1_c_::types::ue_cap_info); + ul_dcch_msg.msg.c1().ue_cap_info().rrc_transaction_id = 0; + + ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.set(ue_cap_info_s::crit_exts_c_::types::c1); + ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.c1().set(ue_cap_info_s::crit_exts_c_::c1_c_::types::ue_cap_info_r8); + ue_cap_info_r8_ies_s* info = &ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.c1().ue_cap_info_r8(); + info->ue_cap_rat_container_list.resize(1); + info->ue_cap_rat_container_list[0].rat_type = rat_type_e::eutra; + + ue_eutra_cap_s cap; + cap.access_stratum_release = access_stratum_release_e::rel8; + cap.ue_category = (uint8_t)args.ue_category; + cap.pdcp_params.max_num_rohc_context_sessions_present = false; + + cap.phy_layer_params.ue_specific_ref_sigs_supported = false; + cap.phy_layer_params.ue_tx_ant_sel_supported = false; + + cap.rf_params.supported_band_list_eutra.resize(args.nof_supported_bands); + cap.meas_params.band_list_eutra.resize(args.nof_supported_bands); + for (uint32_t i = 0; i < args.nof_supported_bands; i++) { + cap.rf_params.supported_band_list_eutra[i].band_eutra = args.supported_bands[i]; + cap.rf_params.supported_band_list_eutra[i].half_duplex = false; + cap.meas_params.band_list_eutra[i].inter_freq_band_list.resize(1); + cap.meas_params.band_list_eutra[i].inter_freq_band_list[0].inter_freq_need_for_gaps = true; + } + + cap.feature_group_inds_present = true; + cap.feature_group_inds.from_number(args.feature_group); + + uint8_t buf[64]; + asn1::bit_ref bref(buf, sizeof(buf)); + cap.pack(bref); + bref.align_bytes_zero(); + uint32_t cap_len = (uint32_t)bref.distance_bytes(buf); + info->ue_cap_rat_container_list[0].ue_cap_rat_container.resize(cap_len); + memcpy(info->ue_cap_rat_container_list[0].ue_cap_rat_container.data(), buf, cap_len); + log1.debug_hex(buf, cap_len, "UE-Cap (%d/%zd B)\n", cap_len, sizeof(buf)); + + // pack the message + uint8_t byte_buf[16]; + ZERO_OBJECT(byte_buf); + asn1::bit_ref bref3(byte_buf, sizeof(byte_buf)); + ul_dcch_msg.pack(bref3); + bref3.align_bytes_zero(); + + uint32_t len = (uint32_t)bref3.distance_bytes(byte_buf); + log1.debug_hex(byte_buf, len, "UL-DCCH (%d/%zd B)\n", len, sizeof(byte_buf)); + + pcap.write_ul_rrc_pdu(byte_buf, len); + + return 0; +} + +int pack_fail_test() +{ + srslte::log_filter log1("RRC"); + log1.set_level(srslte::LOG_LEVEL_DEBUG); + log1.set_hex_limit(128); + + rrc_args_t args = {}; + args.feature_group = 0xe6041c00; + args.nof_supported_bands = 1; + args.supported_bands[0] = 8; + args.ue_category = 4; + + asn1::rrc::ul_dcch_msg_s ul_dcch_msg; + ul_dcch_msg.msg.set(ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(ul_dcch_msg_type_c::c1_c_::types::ue_cap_info); + ul_dcch_msg.msg.c1().ue_cap_info().rrc_transaction_id = 0; + + ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.set(ue_cap_info_s::crit_exts_c_::types::c1); + ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.c1().set(ue_cap_info_s::crit_exts_c_::c1_c_::types::ue_cap_info_r8); + ue_cap_info_r8_ies_s* info = &ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.c1().ue_cap_info_r8(); + info->ue_cap_rat_container_list.resize(1); + info->ue_cap_rat_container_list[0].rat_type = rat_type_e::eutra; + + ue_eutra_cap_s cap; + cap.access_stratum_release = access_stratum_release_e::rel8; + cap.ue_category = (uint8_t)args.ue_category; + cap.pdcp_params.max_num_rohc_context_sessions_present = false; + + cap.phy_layer_params.ue_specific_ref_sigs_supported = false; + cap.phy_layer_params.ue_tx_ant_sel_supported = false; + + cap.rf_params.supported_band_list_eutra.resize(args.nof_supported_bands); + cap.meas_params.band_list_eutra.resize(args.nof_supported_bands); + for (uint32_t i = 0; i < args.nof_supported_bands; i++) { + cap.rf_params.supported_band_list_eutra[i].band_eutra = args.supported_bands[i]; + cap.rf_params.supported_band_list_eutra[i].half_duplex = false; + cap.meas_params.band_list_eutra[i].inter_freq_band_list.resize(1); + cap.meas_params.band_list_eutra[i].inter_freq_band_list[0].inter_freq_need_for_gaps = true; + } + + cap.feature_group_inds_present = true; + cap.feature_group_inds.from_number(args.feature_group); + + uint8_t buff[3]; + asn1::bit_ref bref(buff, sizeof(buff)); + if (ul_dcch_msg.pack(bref) != asn1::SRSASN_SUCCESS) { + fprintf(stderr, "Error while packing message.\n"); + return -1; + } + + return 0; +} + +int main(int argc, char** argv) +{ + srslte::mac_pcap pcap; + pcap.open("ul_dcch.pcap"); + + TESTASSERT(rrc_ue_cap_info_test(pcap) == 0); + TESTASSERT(pack_fail_test() == -1); + + pcap.close(); + return 0; +} \ No newline at end of file diff --git a/lib/test/phy/phy_dl_test.c b/lib/test/phy/phy_dl_test.c index 6ed22c5d9..b2ba9c996 100644 --- a/lib/test/phy/phy_dl_test.c +++ b/lib/test/phy/phy_dl_test.c @@ -398,7 +398,7 @@ int main(int argc, char **argv) { ret = SRSLTE_SUCCESS; } - printf("%ld were transmitted, %ld bits were received.\n", tx_nof_bits, rx_nof_bits); + printf("%zd were transmitted, %zd bits were received.\n", tx_nof_bits, rx_nof_bits); printf("[Rates in Mbps] Granted Processed\n"); printf(" eNb: %5.1f %5.1f\n", (float) tx_nof_bits / (float) nof_subframes / 1000.0f, diff --git a/lib/test/upper/CMakeLists.txt b/lib/test/upper/CMakeLists.txt index da8740727..7abbacf90 100644 --- a/lib/test/upper/CMakeLists.txt +++ b/lib/test/upper/CMakeLists.txt @@ -27,11 +27,11 @@ target_link_libraries(rlc_am_control_test srslte_upper srslte_phy) add_test(rlc_am_control_test rlc_am_control_test) add_executable(rlc_am_test rlc_am_test.cc) -target_link_libraries(rlc_am_test srslte_upper srslte_phy srslte_common) +target_link_libraries(rlc_am_test srslte_upper srslte_phy srslte_common rrc_asn1) add_test(rlc_am_test rlc_am_test) add_executable(rlc_stress_test rlc_stress_test.cc) -target_link_libraries(rlc_stress_test srslte_upper srslte_phy srslte_common ${Boost_LIBRARIES}) +target_link_libraries(rlc_stress_test srslte_upper srslte_phy srslte_common rrc_asn1 ${Boost_LIBRARIES}) add_test(rlc_am_stress_test rlc_stress_test --mode=AM --loglevel 1 --sdu_gen_delay 250) add_test(rlc_um_stress_test rlc_stress_test --mode=UM --loglevel 1) add_test(rlc_tm_stress_test rlc_stress_test --mode=TM --loglevel 1 --random_opp=false) @@ -41,7 +41,7 @@ target_link_libraries(rlc_um_data_test srslte_upper srslte_phy srslte_common) add_test(rlc_um_data_test rlc_um_data_test) add_executable(rlc_um_test rlc_um_test.cc) -target_link_libraries(rlc_um_test srslte_upper srslte_phy) +target_link_libraries(rlc_um_test srslte_upper srslte_phy rrc_asn1) add_test(rlc_um_test rlc_um_test) diff --git a/lib/test/upper/rlc_am_test.cc b/lib/test/upper/rlc_am_test.cc index 8d1b653df..907fb1128 100644 --- a/lib/test/upper/rlc_am_test.cc +++ b/lib/test/upper/rlc_am_test.cc @@ -37,6 +37,7 @@ using namespace srsue; using namespace srslte; +using namespace asn1::rrc; class mac_dummy_timers :public srslte::mac_interface_timers @@ -163,14 +164,14 @@ bool basic_test() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -258,14 +259,14 @@ bool concat_test() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -338,14 +339,14 @@ bool segment_test(bool in_seq_rx) rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -446,14 +447,14 @@ bool retx_test() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -553,14 +554,14 @@ bool resegment_test_1() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -673,14 +674,14 @@ bool resegment_test_2() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -790,14 +791,14 @@ bool resegment_test_3() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -902,14 +903,14 @@ bool resegment_test_4() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -1014,14 +1015,14 @@ bool resegment_test_5() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -1128,14 +1129,14 @@ bool resegment_test_6() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -1276,14 +1277,14 @@ bool resegment_test_7() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -1463,14 +1464,14 @@ bool resegment_test_8() rlc1.init(&log1, 1, &tester, &tester, &timers); rlc2.init(&log2, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -1621,14 +1622,14 @@ bool reset_test() rlc1.init(&log1, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; @@ -1677,14 +1678,14 @@ bool stop_test() rlc1.init(&log1, 1, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; - cnfg.dl_am_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_am_rlc.t_status_prohibit = LIBLTE_RRC_T_STATUS_PROHIBIT_MS5; - cnfg.ul_am_rlc.max_retx_thresh = LIBLTE_RRC_MAX_RETX_THRESHOLD_T4; - cnfg.ul_am_rlc.poll_byte = LIBLTE_RRC_POLL_BYTE_KB25; - cnfg.ul_am_rlc.poll_pdu = LIBLTE_RRC_POLL_PDU_P4; - cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::am); + cnfg.am().dl_am_rlc.t_reordering = t_reordering_e::ms5; + cnfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_e::ms5; + cnfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_e_::t4; + cnfg.am().ul_am_rlc.poll_byte = poll_byte_e::kb25; + cnfg.am().ul_am_rlc.poll_pdu = poll_pdu_e::p4; + cnfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_e::ms5; if (not rlc1.configure(&cnfg)) { return -1; diff --git a/lib/test/upper/rlc_um_test.cc b/lib/test/upper/rlc_um_test.cc index cbeb2d3f6..07176dd46 100644 --- a/lib/test/upper/rlc_um_test.cc +++ b/lib/test/upper/rlc_um_test.cc @@ -34,6 +34,7 @@ using namespace srslte; using namespace srsue; +using namespace asn1::rrc; class mac_dummy_timers :public srslte::mac_interface_timers @@ -124,11 +125,11 @@ void basic_test() rlc1.init(&log1, 3, &tester, &tester, &timers); rlc2.init(&log2, 3, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_BI; - cnfg.dl_um_bi_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10; - cnfg.ul_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::um_bi_dir); + cnfg.um_bi_dir().dl_um_rlc.t_reordering = t_reordering_e::ms5; + cnfg.um_bi_dir().dl_um_rlc.sn_field_len = sn_field_len_e::size10; + cnfg.um_bi_dir().ul_um_rlc.sn_field_len = sn_field_len_e::size10; assert(rlc1.configure(&cnfg) == true); assert(rlc2.configure(&cnfg) == true); @@ -194,11 +195,11 @@ void loss_test() rlc1.init(&log1, 3, &tester, &tester, &timers); rlc2.init(&log2, 3, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_BI; - cnfg.dl_um_bi_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10; - cnfg.ul_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::um_bi_dir); + cnfg.um_bi_dir().dl_um_rlc.t_reordering = t_reordering_e::ms5; + cnfg.um_bi_dir().dl_um_rlc.sn_field_len = sn_field_len_e::size10; + cnfg.um_bi_dir().ul_um_rlc.sn_field_len = sn_field_len_e::size10; rlc1.configure(&cnfg); rlc2.configure(&cnfg); @@ -338,11 +339,11 @@ void reassmble_test() rlc1.init(&log1, 3, &tester, &tester, &timers); rlc2.init(&log2, 3, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_BI; - cnfg.dl_um_bi_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE5; - cnfg.ul_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::um_bi_dir); + cnfg.um_bi_dir().dl_um_rlc.t_reordering = t_reordering_e::ms5; + cnfg.um_bi_dir().dl_um_rlc.sn_field_len = sn_field_len_e::size5; + cnfg.um_bi_dir().ul_um_rlc.sn_field_len = sn_field_len_e::size5; rlc1.configure(&cnfg); rlc2.configure(&cnfg); @@ -451,11 +452,11 @@ void reassmble_test2() rlc1.init(&log1, 3, &tester, &tester, &timers); rlc2.init(&log2, 3, &tester, &tester, &timers); - LIBLTE_RRC_RLC_CONFIG_STRUCT cnfg; - cnfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_BI; - cnfg.dl_um_bi_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS5; - cnfg.dl_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE5; - cnfg.ul_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE5; + rlc_cfg_c cnfg; + cnfg.set(rlc_cfg_c::types::um_bi_dir); + cnfg.um_bi_dir().dl_um_rlc.t_reordering = t_reordering_e::ms5; + cnfg.um_bi_dir().dl_um_rlc.sn_field_len = sn_field_len_e::size5; + cnfg.um_bi_dir().ul_um_rlc.sn_field_len = sn_field_len_e::size5; rlc1.configure(&cnfg); rlc2.configure(&cnfg); diff --git a/srsenb/hdr/enb.h b/srsenb/hdr/enb.h index ee0859625..b975ce7e4 100644 --- a/srsenb/hdr/enb.h +++ b/srsenb/hdr/enb.h @@ -213,19 +213,19 @@ private: rf_metrics_t rf_metrics; srslte::LOG_LEVEL_ENUM level(std::string l); - - bool check_srslte_version(); - int parse_sib1(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *data); - int parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *data, bool *mbsfn_section_present); - int parse_sib3(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *data); - int parse_sib4(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data); - int parse_sib9(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *data); - int parse_sib13(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *data); - int parse_sibs(all_args_t *args, rrc_cfg_t *rrc_cfg, phy_cfg_t *phy_config_common); + + // bool check_srslte_version(); + int parse_sib1(std::string filename, asn1::rrc::sib_type1_s* data); + int parse_sib2(std::string filename, asn1::rrc::sib_type2_s* data); + int parse_sib3(std::string filename, asn1::rrc::sib_type3_s* data); + int parse_sib4(std::string filename, asn1::rrc::sib_type4_s* data); + int parse_sib9(std::string filename, asn1::rrc::sib_type9_s* data); + int parse_sib13(std::string filename, asn1::rrc::sib_type13_r9_s* data); + int parse_sibs(all_args_t* args, rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_config_common); int parse_rr(all_args_t *args, rrc_cfg_t *rrc_cfg); - int parse_drb(all_args_t *args, rrc_cfg_t *rrc_cfg); - bool sib_is_present(LIBLTE_RRC_SCHEDULING_INFO_STRUCT *sched_info, uint32_t nof_sched_info, LIBLTE_RRC_SIB_TYPE_ENUM sib_num); - int parse_cell_cfg(all_args_t *args, srslte_cell_t *cell); + int parse_drb(all_args_t *args, rrc_cfg_t *rrc_cfg); + bool sib_is_present(const asn1::rrc::sched_info_list_l& l, asn1::rrc::sib_type_e sib_num); + int parse_cell_cfg(all_args_t* args, srslte_cell_t* cell); std::string get_build_mode(); std::string get_build_info(); diff --git a/srsenb/hdr/mac/mac.h b/srsenb/hdr/mac/mac.h index ed7726803..8aee46560 100644 --- a/srsenb/hdr/mac/mac.h +++ b/srsenb/hdr/mac/mac.h @@ -70,9 +70,9 @@ public: /******** Interface from PHY (PHY -> MAC) ****************/ int sr_detected(uint32_t tti, uint16_t rnti); - int rach_detected(uint32_t tti, uint32_t preamble_idx, uint32_t time_adv); - - int set_dl_ant_info(uint16_t rnti, LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *dl_ant_info); + int rach_detected(uint32_t tti, uint32_t preamble_idx, uint32_t time_adv); + + int set_dl_ant_info(uint16_t rnti, asn1::rrc::phys_cfg_ded_s::ant_info_c_* dl_ant_info); int ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value); int pmi_info(uint32_t tti, uint16_t rnti, uint32_t pmi_value); @@ -115,7 +115,8 @@ public: uint32_t get_current_tti(); void get_metrics(mac_metrics_t metrics[ENB_METRICS_MAX_USERS]); - void write_mcch(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, LIBLTE_RRC_MCCH_MSG_STRUCT *mcch); + void write_mcch(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s* mcch); + private: static const int MAX_LOCATIONS = 20; @@ -181,10 +182,10 @@ private: const static int mcch_payload_len = 3000; //TODO FIND OUT MAX LENGTH int current_mcch_length; uint8_t mcch_payload_buffer[mcch_payload_len]; - LIBLTE_RRC_MCCH_MSG_STRUCT mcch; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT sib2; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT sib13; - + asn1::rrc::mcch_msg_s mcch; + asn1::rrc::sib_type2_s sib2; + asn1::rrc::sib_type13_r9_s sib13; + const static int mtch_payload_len = 10000; uint8_t mtch_payload_buffer[mtch_payload_len]; diff --git a/srsenb/hdr/mac/scheduler.h b/srsenb/hdr/mac/scheduler.h index f4889c5e7..7099341c4 100644 --- a/srsenb/hdr/mac/scheduler.h +++ b/srsenb/hdr/mac/scheduler.h @@ -110,8 +110,8 @@ public: int dl_rlc_buffer_state(uint16_t rnti, uint32_t lc_id, uint32_t tx_queue, uint32_t retx_queue); int dl_mac_buffer_state(uint16_t rnti, uint32_t ce_code); - - int dl_ant_info(uint16_t rnti, LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *dedicated); + + int dl_ant_info(uint16_t rnti, asn1::rrc::phys_cfg_ded_s::ant_info_c_* dedicated); int dl_ack_info(uint32_t tti, uint16_t rnti, uint32_t tb_idx, bool ack); int dl_rach_info(uint32_t tti, uint32_t ra_id, uint16_t rnti, uint32_t estimated_size); int dl_ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value); diff --git a/srsenb/hdr/mac/scheduler_ue.h b/srsenb/hdr/mac/scheduler_ue.h index 202ef8bd0..032f86acb 100644 --- a/srsenb/hdr/mac/scheduler_ue.h +++ b/srsenb/hdr/mac/scheduler_ue.h @@ -32,6 +32,7 @@ #include "srslte/interfaces/sched_interface.h" #include "scheduler_harq.h" +#include "srslte/asn1/rrc_asn1.h" namespace srsenb { @@ -76,7 +77,7 @@ public: void ul_phr(int phr); void mac_buffer_state(uint32_t ce_code); void ul_recv_len(uint32_t lcid, uint32_t len); - void set_dl_ant_info(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *dedicated); + void set_dl_ant_info(asn1::rrc::phys_cfg_ded_s::ant_info_c_* dedicated); void set_ul_cqi(uint32_t tti, uint32_t cqi, uint32_t ul_ch_code); void set_dl_ri(uint32_t tti, uint32_t ri); void set_dl_pmi(uint32_t tti, uint32_t ri); @@ -150,8 +151,9 @@ private: bool is_sr_triggered(); int alloc_pdu(int tbs, sched_interface::dl_sched_pdu_t* pdu); - static uint32_t format1_count_prb(uint32_t bitmask, uint32_t cell_nof_prb); - static int cqi_to_tbs(uint32_t cqi, uint32_t nof_prb, uint32_t nof_re, uint32_t max_mcs, uint32_t max_Qm, uint32_t *mcs); + static uint32_t format1_count_prb(uint32_t bitmask, uint32_t cell_nof_prb); + static int cqi_to_tbs(uint32_t cqi, uint32_t nof_prb, uint32_t nof_re, uint32_t max_mcs, uint32_t max_Qm, bool is_ul, + uint32_t* mcs); int alloc_tbs_dl(uint32_t nof_prb, uint32_t nof_re, uint32_t req_bytes, int *mcs); int alloc_tbs_ul(uint32_t nof_prb, uint32_t nof_re, uint32_t req_bytes, int *mcs); int alloc_tbs(uint32_t nof_prb, uint32_t nof_re, uint32_t req_bytes, bool is_ul, int *mcs); @@ -209,8 +211,7 @@ private: ul_harq_proc ul_harq[SCHED_MAX_HARQ_PROC]; bool phy_config_dedicated_enabled; - LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT dl_ant_info; - + asn1::rrc::phys_cfg_ded_s::ant_info_c_ dl_ant_info; }; } diff --git a/srsenb/hdr/parser.h b/srsenb/hdr/parser.h index 90425203f..8f9df75a4 100644 --- a/srsenb/hdr/parser.h +++ b/srsenb/hdr/parser.h @@ -294,6 +294,13 @@ public: *val = t; return r; } + static bool lookupValue(Setting& root, const char* name, float* val) + { + double t; + bool r = root.lookupValue(name, t); + *val = t; + return r; + } static bool lookupValue(Setting &root, const char *name, bool *val) { bool t; bool r = root.lookupValue(name, t); diff --git a/srsenb/hdr/phy/phch_worker.h b/srsenb/hdr/phy/phch_worker.h index 24e27a181..7e3c428d8 100644 --- a/srsenb/hdr/phy/phch_worker.h +++ b/srsenb/hdr/phy/phch_worker.h @@ -61,11 +61,9 @@ public: void set_conf_dedicated_ack(uint16_t rnti, bool rrc_completed); - - void set_config_dedicated(uint16_t rnti, - srslte_refsignal_srs_cfg_t *srs_cfg, - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated); - + + void set_config_dedicated(uint16_t rnti, srslte_refsignal_srs_cfg_t* srs_cfg, asn1::rrc::phys_cfg_ded_s* dedicated); + uint32_t get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]); private: @@ -106,9 +104,12 @@ private: public: ue() : I_sr(0), I_sr_en(false), cqi_en(false), pucch_cqi_ack(false), pmi_idx(0), has_grant_tti(0), dedicated_ack(false), ri_idx(0), ri_en(false), rnti(0) { - bzero(&dedicated, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); bzero(&phich_info, sizeof(srslte_enb_ul_phich_info_t)); bzero(&metrics, sizeof(phy_metrics_t)); + dedicated.ant_info_present = true; + dedicated.ant_info.set(asn1::rrc::phys_cfg_ded_s::ant_info_c_::types::explicit_value); + dedicated.ant_info.explicit_value().tx_mode.value = asn1::rrc::ant_info_ded_s::tx_mode_e_::tm1; + dedicated.ant_info.explicit_value().ue_tx_ant_sel.set(asn1::rrc::setup_e::release); } uint32_t I_sr; uint32_t pmi_idx; @@ -116,9 +117,9 @@ private: bool I_sr_en; bool cqi_en; bool ri_en; - bool pucch_cqi_ack; - int has_grant_tti; - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT dedicated; + bool pucch_cqi_ack; + int has_grant_tti; + asn1::rrc::phys_cfg_ded_s dedicated; bool dedicated_ack; uint32_t rnti; srslte_enb_ul_phich_info_t phich_info; diff --git a/srsenb/hdr/phy/phy.h b/srsenb/hdr/phy/phy.h index c1221b2ae..ea6c86afa 100644 --- a/srsenb/hdr/phy/phy.h +++ b/srsenb/hdr/phy/phy.h @@ -27,29 +27,29 @@ #ifndef SRSENB_PHY_H #define SRSENB_PHY_H +#include "phch_common.h" +#include "phch_worker.h" #include "srslte/common/log.h" #include "srslte/common/log_filter.h" -#include "txrx.h" -#include "phch_worker.h" -#include "phch_common.h" -#include "srslte/radio/radio.h" -#include "srslte/interfaces/enb_interfaces.h" #include "srslte/common/task_dispatcher.h" #include "srslte/common/trace.h" +#include "srslte/interfaces/enb_interfaces.h" #include "srslte/interfaces/enb_metrics_interface.h" +#include "srslte/radio/radio.h" +#include "txrx.h" +#include namespace srsenb { typedef struct { - srslte_cell_t cell; - LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT prach_cnfg; - LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT pdsch_cnfg; - LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT pusch_cnfg; - LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT pucch_cnfg; - LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT srs_ul_cnfg; -} phy_cfg_t; + srslte_cell_t cell; + asn1::rrc::prach_cfg_sib_s prach_cnfg; + asn1::rrc::pdsch_cfg_common_s pdsch_cnfg; + asn1::rrc::pusch_cfg_common_s pusch_cnfg; + asn1::rrc::pucch_cfg_common_s pucch_cnfg; + asn1::rrc::srs_ul_cfg_common_c srs_ul_cnfg; +} phy_cfg_t; - class phy : public phy_interface_mac, public phy_interface_rrc { @@ -65,15 +65,15 @@ public: void rem_rnti(uint16_t rnti); /*RRC-PHY interface*/ - void configure_mbsfn(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, LIBLTE_RRC_MCCH_MSG_STRUCT mcch); + void configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s mcch); static uint32_t tti_to_SFN(uint32_t tti); static uint32_t tti_to_subf(uint32_t tti); void start_plot(); void set_conf_dedicated_ack(uint16_t rnti, bool dedicated_ack); - void set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated); - + void set_config_dedicated(uint16_t rnti, asn1::rrc::phys_cfg_ded_s* dedicated); + void get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]); private: diff --git a/srsenb/hdr/upper/rrc.h b/srsenb/hdr/upper/rrc.h index b4eb93f66..a8892593a 100644 --- a/srsenb/hdr/upper/rrc.h +++ b/srsenb/hdr/upper/rrc.h @@ -27,28 +27,29 @@ #ifndef SRSENB_RRC_H #define SRSENB_RRC_H -#include -#include +#include "common_enb.h" +#include "rrc_metrics.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/block_queue.h" #include "srslte/common/buffer_pool.h" #include "srslte/common/common.h" -#include "srslte/common/block_queue.h" +#include "srslte/common/log.h" #include "srslte/common/threads.h" #include "srslte/common/timeout.h" -#include "srslte/common/log.h" #include "srslte/interfaces/enb_interfaces.h" -#include "common_enb.h" -#include "rrc_metrics.h" +#include +#include namespace srsenb { -typedef struct { - uint32_t period; - LIBLTE_RRC_DSR_TRANS_MAX_ENUM dsr_max; - uint32_t nof_prb; - uint32_t sf_mapping[80]; - uint32_t nof_subframes; -} rrc_cfg_sr_t; - +struct rrc_cfg_sr_t { + uint32_t period; + asn1::rrc::sched_request_cfg_c::setup_s_::dsr_trans_max_e_ dsr_max; + uint32_t nof_prb; + uint32_t sf_mapping[80]; + uint32_t nof_subframes; +}; + typedef enum { RRC_CFG_CQI_MODE_PERIODIC = 0, RRC_CFG_CQI_MODE_APERIODIC, @@ -67,27 +68,28 @@ typedef struct { } rrc_cfg_cqi_t; typedef struct { - bool configured; - LIBLTE_RRC_UL_SPECIFIC_PARAMETERS_STRUCT lc_cfg; - LIBLTE_RRC_PDCP_CONFIG_STRUCT pdcp_cfg; - LIBLTE_RRC_RLC_CONFIG_STRUCT rlc_cfg; + bool configured; + asn1::rrc::lc_ch_cfg_s::ul_specific_params_s_ lc_cfg; + asn1::rrc::pdcp_cfg_s pdcp_cfg; + asn1::rrc::rlc_cfg_c rlc_cfg; } rrc_cfg_qci_t; #define MAX_NOF_QCI 10 typedef struct { - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_STRUCT sibs[LIBLTE_RRC_MAX_SIB]; - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT mac_cnfg; - - LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT pusch_cfg; - LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT antenna_info; - LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM pdsch_cfg; - rrc_cfg_sr_t sr_cfg; - rrc_cfg_cqi_t cqi_cfg; - rrc_cfg_qci_t qci_cfg[MAX_NOF_QCI]; - srslte_cell_t cell; - bool enable_mbsfn; - uint32_t inactivity_timeout_ms; + asn1::rrc::sib_type1_s sib1; + asn1::rrc::sib_info_item_c sibs[ASN1_RRC_MAX_SIB]; + asn1::rrc::mac_main_cfg_s mac_cnfg; + + asn1::rrc::pusch_cfg_ded_s pusch_cfg; + asn1::rrc::ant_info_ded_s antenna_info; + asn1::rrc::pdsch_cfg_ded_s::p_a_e_ pdsch_cfg; + rrc_cfg_sr_t sr_cfg; + rrc_cfg_cqi_t cqi_cfg; + rrc_cfg_qci_t qci_cfg[MAX_NOF_QCI]; + srslte_cell_t cell; + bool enable_mbsfn; + uint32_t inactivity_timeout_ms; }rrc_cfg_t; static const char rrc_state_text[RRC_STATE_N_ITEMS][100] = {"IDLE", @@ -121,10 +123,10 @@ public: bzero(&sr_sched, sizeof(sr_sched)); bzero(&cqi_sched, sizeof(cqi_sched)); - bzero(&cfg, sizeof(cfg)); - bzero(&sib2, sizeof(sib2)); - bzero(&paging_mutex, sizeof(paging_mutex)); - + bzero(&cfg.sr_cfg, sizeof(cfg.sr_cfg)); + bzero(&cfg.cqi_cfg, sizeof(cfg.cqi_cfg)); + bzero(&cfg.qci_cfg, sizeof(cfg.qci_cfg)); + bzero(&cfg.cell, sizeof(cfg.cell)); } void init(rrc_cfg_t *cfg, @@ -161,10 +163,15 @@ public: // rrc_interface_pdcp void write_pdu(uint16_t rnti, uint32_t lcid, srslte::byte_buffer_t *pdu); - - void parse_sibs(); + + void parse_sibs(); uint32_t get_nof_users(); + // logging + typedef enum { Rx = 0, Tx } direction_t; + template + void log_rrc_message(const std::string& source, direction_t dir, const srslte::byte_buffer_t* pdu, const T& msg); + // Notifier for user connect class connect_notifier { public: @@ -208,13 +215,13 @@ public: void send_ue_cap_enquiry(); void parse_ul_dcch(uint32_t lcid, srslte::byte_buffer_t* pdu); - void handle_rrc_con_req(LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *msg); - void handle_rrc_con_reest_req(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *msg); - void handle_rrc_con_setup_complete(LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *msg, srslte::byte_buffer_t *pdu); - void handle_rrc_reconf_complete(LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *msg, srslte::byte_buffer_t *pdu); - void handle_security_mode_complete(LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *msg); - void handle_security_mode_failure(LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *msg); - void handle_ue_cap_info(LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *msg); + void handle_rrc_con_req(asn1::rrc::rrc_conn_request_s* msg); + void handle_rrc_con_reest_req(asn1::rrc::rrc_conn_reest_request_r8_ies_s* msg); + void handle_rrc_con_setup_complete(asn1::rrc::rrc_conn_setup_complete_s* msg, srslte::byte_buffer_t* pdu); + void handle_rrc_reconf_complete(asn1::rrc::rrc_conn_recfg_complete_s* msg, srslte::byte_buffer_t* pdu); + void handle_security_mode_complete(asn1::rrc::security_mode_complete_s* msg); + void handle_security_mode_failure(asn1::rrc::security_mode_fail_s* msg); + void handle_ue_cap_info(asn1::rrc::ue_cap_info_s* msg); void set_bitrates(LIBLTE_S1AP_UEAGGREGATEMAXIMUMBITRATE_STRUCT *rates); void set_security_capabilities(LIBLTE_S1AP_UESECURITYCAPABILITIES_STRUCT *caps); @@ -230,19 +237,19 @@ public: void notify_s1ap_ue_ctxt_setup_complete(); void notify_s1ap_ue_erab_setup_response(LIBLTE_S1AP_E_RABTOBESETUPLISTBEARERSUREQ_STRUCT *e); - int sr_allocate(uint32_t period, uint32_t *I_sr, uint32_t *N_pucch_sr); - void sr_get(uint32_t *I_sr, uint32_t *N_pucch_sr); + int sr_allocate(uint32_t period, uint8_t* I_sr, uint16_t* N_pucch_sr); + void sr_get(uint8_t* I_sr, uint16_t* N_pucch_sr); int sr_free(); - int cqi_allocate(uint32_t period, uint32_t *pmi_idx, uint32_t *n_pucch); - void cqi_get(uint32_t *pmi_idx, uint32_t *n_pucch); - int cqi_free(); + int cqi_allocate(uint32_t period, uint16_t* pmi_idx, uint16_t* n_pucch); + void cqi_get(uint16_t* pmi_idx, uint16_t* n_pucch); + int cqi_free(); - void send_dl_ccch(LIBLTE_RRC_DL_CCCH_MSG_STRUCT *dl_ccch_msg); - void send_dl_dcch(LIBLTE_RRC_DL_DCCH_MSG_STRUCT *dl_dcch_msg, srslte::byte_buffer_t *pdu = NULL); + void send_dl_ccch(asn1::rrc::dl_ccch_msg_s* dl_ccch_msg); + void send_dl_dcch(asn1::rrc::dl_dcch_msg_s* dl_dcch_msg, srslte::byte_buffer_t* pdu = NULL); uint16_t rnti; - rrc *parent; + rrc* parent; bool connect_notified; @@ -251,7 +258,7 @@ public: struct timeval t_last_activity; - LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM establishment_cause; + asn1::rrc::establishment_cause_e establishment_cause; // S-TMSI for this UE bool has_tmsi; @@ -262,8 +269,8 @@ public: uint8_t transaction_id; rrc_state_t state; - std::map srbs; - std::map drbs; + std::map srbs; + std::map drbs; uint8_t k_enb[32]; // Provided by MME uint8_t k_rrc_enc[32]; @@ -276,7 +283,7 @@ public: LIBLTE_S1AP_UEAGGREGATEMAXIMUMBITRATE_STRUCT bitrates; LIBLTE_S1AP_UESECURITYCAPABILITIES_STRUCT security_capabilities; - LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT eutra_capabilities; + asn1::rrc::ue_eutra_cap_s eutra_capabilities; typedef struct { uint8_t id; @@ -296,21 +303,19 @@ public: bool cqi_allocated; int cqi_sched_sf_idx; int cqi_sched_prb_idx; - int get_drbid_config(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb, int drbid); + int get_drbid_config(asn1::rrc::drb_to_add_mod_s* drb, int drbid); bool nas_pending; srslte::byte_buffer_t erab_info; }; - private: - std::map users; - std::map pending_paging; + std::map pending_paging; - activity_monitor act_monitor; - - LIBLTE_BYTE_MSG_STRUCT sib_buffer[LIBLTE_RRC_MAX_SIB]; + activity_monitor act_monitor; + + std::vector sib_buffer; // user connect notifier connect_notifier *cnotifier; @@ -319,7 +324,7 @@ private: void process_rl_failure(uint16_t rnti); void rem_user(uint16_t rnti); uint32_t generate_sibs(); - void configure_mbsfn_sibs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13); + void configure_mbsfn_sibs(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13); void config_mac(); void parse_ul_dcch(uint16_t rnti, uint32_t lcid, srslte::byte_buffer_t *pdu); @@ -333,17 +338,16 @@ private: srslte::CIPHERING_ALGORITHM_ID_ENUM cipher_algo, srslte::INTEGRITY_ALGORITHM_ID_ENUM integ_algo); - srslte::byte_buffer_pool *pool; - srslte::bit_buffer_t bit_buf; - srslte::bit_buffer_t bit_buf_paging; + srslte::byte_buffer_pool* pool; + srslte::byte_buffer_t byte_buf_paging; - phy_interface_rrc *phy; - mac_interface_rrc *mac; - rlc_interface_rrc *rlc; - pdcp_interface_rrc *pdcp; - gtpu_interface_rrc *gtpu; - s1ap_interface_rrc *s1ap; - srslte::log *rrc_log; + phy_interface_rrc* phy; + mac_interface_rrc* mac; + rlc_interface_rrc* rlc; + pdcp_interface_rrc* pdcp; + gtpu_interface_rrc* gtpu; + s1ap_interface_rrc* s1ap; + srslte::log* rrc_log; typedef struct{ uint16_t rnti; @@ -361,18 +365,17 @@ private: static const int RRC_THREAD_PRIO = 65; srslte::block_queue rx_pdu_queue; - typedef struct { - uint32_t nof_users[100][80]; - } sr_sched_t; - + struct sr_sched_t { + uint32_t nof_users[100][80]; + }; - sr_sched_t sr_sched; - sr_sched_t cqi_sched; - LIBLTE_RRC_MCCH_MSG_STRUCT mcch; - bool enable_mbms; - rrc_cfg_t cfg; - uint32_t nof_si_messages; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT sib2; + sr_sched_t sr_sched; + sr_sched_t cqi_sched; + asn1::rrc::mcch_msg_s mcch; + bool enable_mbms; + rrc_cfg_t cfg; + uint32_t nof_si_messages; + asn1::rrc::sib_type2_s sib2; void run_thread(); void rem_user_thread(uint16_t rnti); diff --git a/srsenb/rr.conf.example b/srsenb/rr.conf.example index e819cf4e4..2d913f314 100644 --- a/srsenb/rr.conf.example +++ b/srsenb/rr.conf.example @@ -2,7 +2,7 @@ mac_cnfg = { phr_cnfg = { - dl_pathloss_change = "3dB"; // Valid: 1, 3, 6 or INFINITY + dl_pathloss_change = "dB3"; // Valid: 1, 3, 6 or INFINITY periodic_phr_timer = 50; prohibit_phr_timer = 0; }; diff --git a/srsenb/sib.conf.example b/srsenb/sib.conf.example index 80b2894f6..5fb91e2c8 100644 --- a/srsenb/sib.conf.example +++ b/srsenb/sib.conf.example @@ -1,16 +1,16 @@ sib1 = { intra_freq_reselection = "Allowed"; - q_rx_lev_min = -130; + q_rx_lev_min = -65; //p_max = 3; - cell_barred = "Not Barred" + cell_barred = "NotBarred" si_window_length = 20; sched_info = ( { si_periodicity = 16; - si_mapping_info = []; // comma-separated array of SIB-indexes (from 3 to 13). - // Leave empty or commented to just scheduler sib2 + si_mapping_info = []; // comma-separated array of SIB-indexes (from 3 to 13). + // Leave empty or commented to just scheduler sib2 } ); system_info_value_tag = 0; @@ -89,9 +89,9 @@ sib2 = format_2a = 2; format_2b = 2; }; - delta_preamble_msg3 = 8; + delta_preamble_msg3 = 6; }; - ul_cp_length = "Normal"; + ul_cp_length = "len1"; }; ue_timers_and_constants = @@ -103,7 +103,7 @@ sib2 = t311 = 1000; // in ms n311 = 1; }; - + freqInfo = { ul_carrier_freq_present = true; diff --git a/srsenb/sib.conf.mbsfn.example b/srsenb/sib.conf.mbsfn.example index 588ba71d1..1d00e96af 100644 --- a/srsenb/sib.conf.mbsfn.example +++ b/srsenb/sib.conf.mbsfn.example @@ -3,14 +3,14 @@ sib1 = intra_freq_reselection = "Allowed"; q_rx_lev_min = -130; //p_max = 3; - cell_barred = "Not Barred" + cell_barred = "NotBarred" si_window_length = 20; sched_info = ( { si_periodicity = 16; - si_mapping_info = [13]; // comma-separated array of SIB-indexes (from 3 to 13). - // Leave empty or commented to just scheduler sib2 + si_mapping_info = [13]; // comma-separated array of SIB-indexes (from 3 to 13). + // Leave empty or commented to just scheduler sib2 } ); system_info_value_tag = 0; @@ -23,9 +23,9 @@ sib2 = rach_cnfg = { num_ra_preambles = 52; - preamble_init_rx_target_pwr = -108; + preamble_init_rx_target_pwr = -104; pwr_ramping_step = 6; // in dB - preamble_trans_max = 7; + preamble_trans_max = 10; ra_resp_win_size = 10; // in ms mac_con_res_timer = 64; // in ms max_harq_msg3_tx = 4; @@ -53,14 +53,14 @@ sib2 = pdsch_cnfg = { p_b = 0; - rs_power = -4; + rs_power = 0; }; pusch_cnfg = { n_sb = 1; hopping_mode = "inter-subframe"; pusch_hopping_offset = 2; - enable_64_qam = false; + enable_64_qam = false; // 64QAM PUSCH is not currently enabled ul_rs = { cyclic_shift = 0; @@ -71,27 +71,27 @@ sib2 = }; pucch_cnfg = { - delta_pucch_shift = 1; - n_rb_cqi = 1; + delta_pucch_shift = 2; + n_rb_cqi = 2; n_cs_an = 0; - n1_pucch_an = 2; + n1_pucch_an = 12; }; ul_pwr_ctrl = { - p0_nominal_pusch = -108; - alpha = 1.0; - p0_nominal_pucch = -88; + p0_nominal_pusch = -85; + alpha = 0.7; + p0_nominal_pucch = -107; delta_flist_pucch = { - format_1 = 2; + format_1 = 0; format_1b = 3; - format_2 = 0; - format_2a = 0; - format_2b = 0; + format_2 = 1; + format_2a = 2; + format_2b = 2; }; - delta_preamble_msg3 = 4; + delta_preamble_msg3 = 6; }; - ul_cp_length = "Normal"; + ul_cp_length = "len1"; }; ue_timers_and_constants = @@ -103,7 +103,7 @@ sib2 = t311 = 1000; // in ms n311 = 1; }; - + freqInfo = { ul_carrier_freq_present = true; @@ -111,13 +111,12 @@ sib2 = additional_spectrum_emission = 1; }; - mbsfnSubframeConfigList = + mbsfnSubframeConfigList = { - radioframeAllocationPeriod = "1"; - subframeAllocationNumFrames = "1"; + radioframeAllocationPeriod = 1; + subframeAllocationNumFrames = 1; radioframeAllocationOffset = 0; - subframeAllocation = 63; - + subframeAllocation = 63; }; time_alignment_timer = "INFINITY"; // use "sf500", "sf750", etc. @@ -127,23 +126,20 @@ sib13 = { mbsfn_notification_config = { - mbsfn_notification_repetition_coeff = "2"; + mbsfn_notification_repetition_coeff = "n2"; mbsfn_notification_offset = 0; mbsfn_notification_sf_index = 1; }; mbsfn_area_info_list_size = 1; mbsfn_area_info_list = { - non_mbsfn_region_length = "2"; - mcch_repetition_period = "64"; - mcch_modification_period = "512"; - signalling_mcs = "2"; + non_mbsfn_region_length = "s2"; + mcch_repetition_period = "rf64"; + mcch_modification_period = "rf512"; + signalling_mcs = "n2"; mbsfn_area_id = 1; notification_indicator = 0; mcch_offset = 0; sf_alloc_info = 32; }; - - }; - diff --git a/srsenb/src/CMakeLists.txt b/srsenb/src/CMakeLists.txt index 8eb14a0fd..a9aa61957 100644 --- a/srsenb/src/CMakeLists.txt +++ b/srsenb/src/CMakeLists.txt @@ -23,6 +23,7 @@ target_link_libraries(srsenb srsenb_upper srslte_phy srslte_upper srslte_radio + rrc_asn1 ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${SEC_LIBRARIES} diff --git a/srsenb/src/enb.cc b/srsenb/src/enb.cc index acd07177f..6e7dd4af8 100644 --- a/srsenb/src/enb.cc +++ b/srsenb/src/enb.cc @@ -154,9 +154,9 @@ bool enb::init(all_args_t *args_) return false; } - uint32_t prach_freq_offset = rrc_cfg.sibs[1].sib.sib2.rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset; + uint32_t prach_freq_offset = rrc_cfg.sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset; - if(cell_cfg.nof_prb>10) { + if (cell_cfg.nof_prb > 10) { if (prach_freq_offset + 6 > cell_cfg.nof_prb - SRSLTE_MAX(rrc_cfg.cqi_cfg.nof_prb, rrc_cfg.sr_cfg.nof_prb)) { fprintf(stderr, "Invalid PRACH configuration: frequency offset=%d outside bandwidth limits\n", prach_freq_offset); return false; @@ -168,15 +168,16 @@ bool enb::init(all_args_t *args_) return false; } } else { // 6 PRB case - if (prach_freq_offset+6 > cell_cfg.nof_prb) { - fprintf(stderr, "Invalid PRACH configuration: frequency interval=(%d, %d) does not fit into the eNB PRBs=(0,%d)\n", - prach_freq_offset, prach_freq_offset+6, cell_cfg.nof_prb); + if (prach_freq_offset + 6 > cell_cfg.nof_prb) { + fprintf(stderr, + "Invalid PRACH configuration: frequency interval=(%d, %d) does not fit into the eNB PRBs=(0,%d)\n", + prach_freq_offset, prach_freq_offset + 6, cell_cfg.nof_prb); return false; } } rrc_cfg.inactivity_timeout_ms = args->expert.rrc_inactivity_timer; - rrc_cfg.enable_mbsfn = args->expert.enable_mbsfn; + rrc_cfg.enable_mbsfn = args->expert.enable_mbsfn; // Copy cell struct to rrc and phy memcpy(&rrc_cfg.cell, &cell_cfg, sizeof(srslte_cell_t)); diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 3ddb3d9f7..b1cfc96df 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -24,947 +24,693 @@ * */ -#include "srslte/asn1/liblte_common.h" -#include "srslte/asn1/liblte_rrc.h" +//#include +//#include +//#include +//#include #include "srsenb/hdr/cfg_parser.h" #include "srslte/srslte.h" -#include "srsenb/hdr/parser.h" #include "enb_cfg_parser.h" +using namespace asn1::rrc; + namespace srsenb { -int enb::parse_cell_cfg(all_args_t *args, srslte_cell_t *cell) { +int enb::parse_cell_cfg(all_args_t* args, srslte_cell_t* cell) +{ cell->id = args->enb.pci; - cell->cp = SRSLTE_CP_NORM; + cell->cp = SRSLTE_CP_NORM; cell->nof_ports = args->enb.nof_ports; - cell->nof_prb = args->enb.n_prb; - - LIBLTE_RRC_PHICH_CONFIG_STRUCT phichcfg; - + cell->nof_prb = args->enb.n_prb; + + phich_cfg_s phichcfg; + parser::section phy_cnfg("phy_cnfg"); parser::section phich_cnfg("phich_cnfg"); phy_cnfg.add_subsection(&phich_cnfg); - phich_cnfg.add_field( - new parser::field_enum_str - ("duration", &phichcfg.dur, liblte_rrc_phich_duration_text, LIBLTE_RRC_PHICH_DURATION_N_ITEMS) - ); - phich_cnfg.add_field( - new parser::field_enum_str - ("resources", &phichcfg.res, liblte_rrc_phich_resource_text, LIBLTE_RRC_PHICH_RESOURCE_N_ITEMS) - ); + phich_cnfg.add_field(make_asn1_enum_str_parser("duration", &phichcfg.phich_dur)); + phich_cnfg.add_field(make_asn1_enum_number_str_parser("resources", &phichcfg.phich_res)); parser::parse_section(args->enb_files.rr_config, &phy_cnfg); - cell->phich_length = (srslte_phich_length_t) (int) phichcfg.dur; - cell->phich_resources = (srslte_phich_resources_t) (int) phichcfg.res; - + cell->phich_length = (srslte_phich_length_t)(int)phichcfg.phich_dur; + cell->phich_resources = (srslte_phich_resources_t)(int)phichcfg.phich_res; + if (!srslte_cell_isvalid(cell)) { fprintf(stderr, "Invalid cell parameters: nof_prb=%d, cell_id=%d\n", args->enb.n_prb, args->enb.s1ap.cell_id); - return -1; + return -1; } - - return 0; + + return 0; } -int field_sched_info::parse(libconfig::Setting &root) +int field_sched_info::parse(libconfig::Setting& root) { - data->N_sched_info = root.getLength(); - for (uint32_t i=0;iN_sched_info;i++) { - uint32_t periodicity = 0; - if (!root[i].lookupValue("si_periodicity", periodicity)) { + data->sched_info_list.resize((uint32_t)root.getLength()); + for (uint32_t i = 0; i < data->sched_info_list.size(); i++) { + if (not parse_enum_by_number(data->sched_info_list[i].si_periodicity, "si_periodicity", root[i])) { fprintf(stderr, "Missing field si_periodicity in sched_info=%d\n", i); - return -1; - } - int k=0; - while(ksched_info[i].si_periodicity = (LIBLTE_RRC_SI_PERIODICITY_ENUM) k; if (root[i].exists("si_mapping_info")) { - data->sched_info[i].N_sib_mapping_info = root[i]["si_mapping_info"].getLength(); - if (data->sched_info[i].N_sib_mapping_info < LIBLTE_RRC_MAX_SIB) { - for (uint32_t j=0;jsched_info[i].N_sib_mapping_info;j++) { + data->sched_info_list[i].sib_map_info.resize((uint32_t)root[i]["si_mapping_info"].getLength()); + if (data->sched_info_list[i].sib_map_info.size() < ASN1_RRC_MAX_SIB) { + for (uint32_t j = 0; j < data->sched_info_list[i].sib_map_info.size(); j++) { uint32_t sib_index = root[i]["si_mapping_info"][j]; if (sib_index >= 3 && sib_index <= 13) { - data->sched_info[i].sib_mapping_info[j].sib_type = (LIBLTE_RRC_SIB_TYPE_ENUM) (sib_index-3); + data->sched_info_list[i].sib_map_info[j].value = (sib_type_e::options)(sib_index - 3); } else { fprintf(stderr, "Invalid SIB index %d for si_mapping_info=%d in sched_info=%d\n", sib_index, j, i); - return -1; + return -1; } - } + } } else { - fprintf(stderr, "Number of si_mapping_info values exceeds maximum (%d)\n", LIBLTE_RRC_MAX_SIB); - return -1; + fprintf(stderr, "Number of si_mapping_info values exceeds maximum (%d)\n", ASN1_RRC_MAX_SIB); + return -1; } } else { - data->sched_info[i].N_sib_mapping_info = 0; + data->sched_info_list[i].sib_map_info.resize(0); } } - return 0; + return 0; } - -int field_intra_neigh_cell_list::parse(libconfig::Setting &root) +int field_intra_neigh_cell_list::parse(libconfig::Setting& root) { - data->intra_freq_neigh_cell_list_size = root.getLength(); - for (uint32_t i=0;iintra_freq_neigh_cell_list_size && iintra_freq_neigh_cell_list.resize((uint32_t)root.getLength()); + data->intra_freq_neigh_cell_list_present = data->intra_freq_neigh_cell_list.size() > 0; + for (uint32_t i = 0; i < data->intra_freq_neigh_cell_list.size() && i < ASN1_RRC_MAX_CELL_INTRA; i++) { + if (not parse_enum_by_number(data->intra_freq_neigh_cell_list[i].q_offset_cell, "q_offset_range", root[i])) { fprintf(stderr, "Missing field q_offset_range in neigh_cell=%d\n", i); - return -1; - } - - int k=0; - while(kintra_freq_neigh_cell_list[i].q_offset_range = (LIBLTE_RRC_Q_OFFSET_RANGE_ENUM) k; - - int phys_cell_id = 0; + + int phys_cell_id = 0; if (!root[i].lookupValue("phys_cell_id", phys_cell_id)) { fprintf(stderr, "Missing field phys_cell_id in neigh_cell=%d\n", i); - return -1; + return -1; } - data->intra_freq_neigh_cell_list[i].phys_cell_id = (uint16) phys_cell_id; + data->intra_freq_neigh_cell_list[i].pci = (uint16)phys_cell_id; } - return 0; + return 0; } -int field_intra_black_cell_list::parse(libconfig::Setting &root) +int field_intra_black_cell_list::parse(libconfig::Setting& root) { - data->intra_freq_black_cell_list_size = root.getLength(); - for (uint32_t i=0;iintra_freq_black_cell_list_size && iintra_freq_black_cell_list.resize((uint32_t)root.getLength()); + data->intra_freq_black_cell_list_present = data->intra_freq_neigh_cell_list.size() > 0; + for (uint32_t i = 0; i < data->intra_freq_black_cell_list.size() && i < ASN1_RRC_MAX_CELL_BLACK; i++) { + if (not parse_enum_by_number(data->intra_freq_black_cell_list[i].range, "range", root[i])) { fprintf(stderr, "Missing field range in black_cell=%d\n", i); - return -1; + return -1; } - - int k=0; - while(kintra_freq_black_cell_list[i].range = (LIBLTE_RRC_PHYS_CELL_ID_RANGE_ENUM) k; - - int start = 0; + data->intra_freq_black_cell_list[i].range_present = true; + + int start = 0; if (!root[i].lookupValue("start", start)) { fprintf(stderr, "Missing field start in black_cell=%d\n", i); - return -1; + return -1; } - data->intra_freq_black_cell_list[i].start = (uint16) start; + data->intra_freq_black_cell_list[i].start = (uint16)start; } - return 0; + return 0; } - -int enb::parse_sib1(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *data) -{ +int enb::parse_sib1(std::string filename, sib_type1_s* data) +{ parser::section sib1("sib1"); - sib1.add_field( - new parser::field_enum_str - ("intra_freq_reselection", &data->intra_freq_reselection, liblte_rrc_intra_freq_reselection_text, LIBLTE_RRC_INTRA_FREQ_RESELECTION_N_ITEMS) - ); - sib1.add_field( - new parser::field("q_rx_lev_min", &data->q_rx_lev_min) - ); - sib1.add_field( - new parser::field("p_max", &data->p_max, &data->p_max_present) - ); - sib1.add_field( - new parser::field_enum_str - ("cell_barred", &data->cell_barred, liblte_rrc_cell_barred_text, LIBLTE_RRC_CELL_BARRED_N_ITEMS) - ); - sib1.add_field( - new parser::field_enum_num - ("si_window_length", &data->si_window_length, liblte_rrc_si_window_length_num, LIBLTE_RRC_SI_WINDOW_LENGTH_N_ITEMS) - ); - sib1.add_field( - new parser::field("system_info_value_tag", &data->system_info_value_tag) - ); - - // sched_info subsection uses a custom field class + sib1.add_field(make_asn1_enum_str_parser("intra_freq_reselection", &data->cell_access_related_info.intra_freq_resel)); + sib1.add_field(new parser::field("q_rx_lev_min", &data->cell_sel_info.q_rx_lev_min)); + sib1.add_field(new parser::field("p_max", &data->p_max, &data->p_max_present)); + sib1.add_field(make_asn1_enum_str_parser("cell_barred", &data->cell_access_related_info.cell_barred)); + sib1.add_field(make_asn1_enum_number_parser("si_window_length", &data->si_win_len)); + sib1.add_field(new parser::field("system_info_value_tag", &data->sys_info_value_tag)); + + // sched_info subsection uses a custom field class parser::section sched_info("sched_info"); sib1.add_subsection(&sched_info); sched_info.add_field(new field_sched_info(data)); - - // Run parser with single section + + // Run parser with single section return parser::parse_section(filename, &sib1); } -int enb::parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *data, bool *mbsfn_section_present) -{ +bool extract_sf_alloc(mbsfn_sf_cfg_s::sf_alloc_c_* store_ptr, const char* name, Setting& root) +{ + uint32_t alloc; + if (root.lookupValue(name, alloc)) { + switch (store_ptr->type()) { + case mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame: + store_ptr->one_frame().from_number(alloc); + break; + case mbsfn_sf_cfg_s::sf_alloc_c_::types::four_frames: + store_ptr->four_frames().from_number(alloc); + break; + default: + return false; + } + return true; + } + return false; +} + +int mbsfn_sf_cfg_list_parser::parse(Setting& root) +{ + if (not root.exists("mbsfnSubframeConfigList")) { + *enabled = false; + mbsfn_list->resize(0); + return 0; + } + int len = 1; + if (root.exists("mbsfnSubframeConfigListLength")) { + root.lookupValue("mbsfnSubframeConfigListLength", len); + } + if (len <= 0) { + *enabled = false; + mbsfn_list->resize(0); + return 0; + } + if (len > 1) { + fprintf(stderr, "Only mbsfnSubframeConfigListLengths of size 1 are supported\n"); + return -1; + } + *enabled = true; + mbsfn_list->resize(len); + + field_asn1_choice_number c("subframeAllocation", "subframeAllocationNumFrames", + &extract_sf_alloc, &(*mbsfn_list)[0].sf_alloc); + c.parse(root["mbsfnSubframeConfigList"]); + + parser::field f("radioframeAllocationOffset", &(*mbsfn_list)[0].radioframe_alloc_offset); + f.parse(root["mbsfnSubframeConfigList"]); + + field_asn1_enum_number e("radioframeAllocationPeriod", + &(*mbsfn_list)[0].radioframe_alloc_period); + e.parse(root["mbsfnSubframeConfigList"]); + + // FIXME: Did you forget subframeAllocationNumFrames? + + return 0; +} + +int enb::parse_sib2(std::string filename, sib_type2_s* data) +{ parser::section sib2("sib2"); - sib2.add_field( - new parser::field_enum_str - ("time_alignment_timer", &data->time_alignment_timer, - liblte_rrc_time_alignment_timer_text, LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS) - ); - - parser::section mbsfnSubframeConfigList("mbsfnSubframeConfigList"); - sib2.add_subsection(&mbsfnSubframeConfigList); - - mbsfnSubframeConfigList.set_optional(mbsfn_section_present); - - mbsfnSubframeConfigList.add_field( - new parser::field - ("subframeAllocation", &data->mbsfn_subfr_cnfg_list[0].subfr_alloc) - ); - - mbsfnSubframeConfigList.add_field( - new parser::field - ("radioframeAllocationOffset", &data->mbsfn_subfr_cnfg_list[0].radio_fr_alloc_offset) - ); - - mbsfnSubframeConfigList.add_field( - new parser::field_enum_str - ("subframeAllocationNumFrames", &data->mbsfn_subfr_cnfg_list[0].subfr_alloc_num_frames, - liblte_rrc_subframe_allocation_num_frames_text,LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_N_ITEMS) - ); - - mbsfnSubframeConfigList.add_field( - new parser::field_enum_str - ("radioframeAllocationPeriod", &data->mbsfn_subfr_cnfg_list[0].radio_fr_alloc_period, - liblte_rrc_radio_frame_allocation_period_text, LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N_ITEMS) - ); - + sib2.add_field(make_asn1_enum_str_parser("time_alignment_timer", &data->time_align_timer_common)); + sib2.add_field(new mbsfn_sf_cfg_list_parser(&data->mbsfn_sf_cfg_list, &data->mbsfn_sf_cfg_list_present)); + parser::section freqinfo("freqInfo"); sib2.add_subsection(&freqinfo); - freqinfo.add_field( - new parser::field - ("additional_spectrum_emission", &data->additional_spectrum_emission) - ); - freqinfo.add_field( - new parser::field ("ul_carrier_freq_present", &data->arfcn_value_eutra.present) - ); - freqinfo.add_field( - new parser::field ("ul_bw_present", &data->ul_bw.present) - ); - - // AC barring configuration + freqinfo.add_field(new parser::field("additional_spectrum_emission", &data->freq_info.add_spec_emission)); + freqinfo.add_field(new parser::field("ul_carrier_freq_present", &data->freq_info.ul_carrier_freq_present)); + freqinfo.add_field(new parser::field("ul_bw_present", &data->freq_info.ul_bw_present)); + + // AC barring configuration parser::section acbarring("ac_barring"); sib2.add_subsection(&acbarring); - acbarring.set_optional(&data->ac_barring_info_present); + acbarring.set_optional(&data->ac_barr_info_present); + + acbarring.add_field(new parser::field("ac_barring_for_emergency", &data->ac_barr_info.ac_barr_for_emergency)); - acbarring.add_field( - new parser::field("ac_barring_for_emergency", &data->ac_barring_for_emergency) - ); - parser::section acbarring_signalling("ac_barring_for_mo_signalling"); acbarring.add_subsection(&acbarring_signalling); - acbarring_signalling.set_optional(&data->ac_barring_for_mo_signalling.enabled); - - acbarring_signalling.add_field( - new parser::field_enum_num - ("factor", &data->ac_barring_for_mo_signalling.factor, - liblte_rrc_ac_barring_factor_num, LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS) - ); + acbarring_signalling.set_optional(&data->ac_barr_info.ac_barr_for_mo_sig_present); + acbarring_signalling.add_field( - new parser::field_enum_num - ("time", &data->ac_barring_for_mo_signalling.time, - liblte_rrc_ac_barring_time_num, LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS) - ); + make_asn1_enum_number_str_parser("factor", &data->ac_barr_info.ac_barr_for_mo_sig.ac_barr_factor)); acbarring_signalling.add_field( - new parser::field("for_special_ac", &data->ac_barring_for_mo_signalling.for_special_ac) - ); + make_asn1_enum_number_parser("time", &data->ac_barr_info.ac_barr_for_mo_sig.ac_barr_time)); + acbarring_signalling.add_field(make_asn1_bitstring_number_parser( + "for_special_ac", &data->ac_barr_info.ac_barr_for_mo_sig.ac_barr_for_special_ac)); parser::section acbarring_data("ac_barring_for_mo_data"); acbarring.add_subsection(&acbarring_data); - acbarring_data.set_optional(&data->ac_barring_for_mo_data.enabled); - - acbarring_data.add_field( - new parser::field_enum_num - ("factor", &data->ac_barring_for_mo_data.factor, - liblte_rrc_ac_barring_factor_num, LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS) - ); - acbarring_data.add_field( - new parser::field_enum_num - ("time", &data->ac_barring_for_mo_data.time, - liblte_rrc_ac_barring_time_num, LIBLTE_RRC_AC_BARRING_FACTOR_N_ITEMS) - ); + acbarring_data.set_optional(&data->ac_barr_info.ac_barr_for_mo_data_present); + acbarring_data.add_field( - new parser::field("for_special_ac", &data->ac_barring_for_mo_data.for_special_ac) - ); - - - // UE timers and constants + make_asn1_enum_number_str_parser("factor", &data->ac_barr_info.ac_barr_for_mo_data.ac_barr_factor)); + acbarring_data.add_field(make_asn1_enum_number_parser("fime", &data->ac_barr_info.ac_barr_for_mo_data.ac_barr_time)); + acbarring_data.add_field(make_asn1_bitstring_number_parser( + "for_special_ac", &data->ac_barr_info.ac_barr_for_mo_data.ac_barr_for_special_ac)); + + // UE timers and constants parser::section uetimers("ue_timers_and_constants"); sib2.add_subsection(&uetimers); - uetimers.add_field( - new parser::field_enum_num - ("t300", &data->ue_timers_and_constants.t300, liblte_rrc_t300_num, LIBLTE_RRC_T300_N_ITEMS) - ); - uetimers.add_field( - new parser::field_enum_num - ("t301", &data->ue_timers_and_constants.t301, liblte_rrc_t301_num, LIBLTE_RRC_T301_N_ITEMS) - ); - uetimers.add_field( - new parser::field_enum_num - ("t310", &data->ue_timers_and_constants.t310, liblte_rrc_t310_num, LIBLTE_RRC_T310_N_ITEMS) - ); - uetimers.add_field( - new parser::field_enum_num - ("n310", &data->ue_timers_and_constants.n310, liblte_rrc_n310_num, LIBLTE_RRC_N310_N_ITEMS) - ); - uetimers.add_field( - new parser::field_enum_num - ("t311", &data->ue_timers_and_constants.t311, liblte_rrc_t311_num, LIBLTE_RRC_T311_N_ITEMS) - ); - uetimers.add_field( - new parser::field_enum_num - ("n311", &data->ue_timers_and_constants.n311, liblte_rrc_n311_num, LIBLTE_RRC_N311_N_ITEMS) - ); - - - - - // Radio-resource configuration section + uetimers.add_field(make_asn1_enum_number_parser("t300", &data->ue_timers_and_consts.t300)); + uetimers.add_field(make_asn1_enum_number_parser("t301", &data->ue_timers_and_consts.t301)); + uetimers.add_field(make_asn1_enum_number_parser("t310", &data->ue_timers_and_consts.t310)); + uetimers.add_field(make_asn1_enum_number_parser("n310", &data->ue_timers_and_consts.n310)); + uetimers.add_field(make_asn1_enum_number_parser("t311", &data->ue_timers_and_consts.t311)); + uetimers.add_field(make_asn1_enum_number_parser("n311", &data->ue_timers_and_consts.n311)); + + // Radio-resource configuration section parser::section rr_config("rr_config_common_sib"); sib2.add_subsection(&rr_config); - - rr_config.add_field( - new parser::field_enum_str - ("ul_cp_length", &data->rr_config_common_sib.ul_cp_length, - liblte_rrc_ul_cp_length_text, LIBLTE_RRC_UL_CP_LENGTH_N_ITEMS) - ); - - // RACH configuration + rr_cfg_common_sib_s* rr_cfg_common = &data->rr_cfg_common; + + rr_config.add_field(make_asn1_enum_str_parser("ul_cp_length", &rr_cfg_common->ul_cp_len)); + + // RACH configuration parser::section rach_cnfg("rach_cnfg"); rr_config.add_subsection(&rach_cnfg); rach_cnfg.add_field( - new parser::field_enum_num - ("num_ra_preambles", &data->rr_config_common_sib.rach_cnfg.num_ra_preambles, - liblte_rrc_number_of_ra_preambles_num, LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N_ITEMS) - ); - rach_cnfg.add_field( - new parser::field_enum_num - ("preamble_init_rx_target_pwr", &data->rr_config_common_sib.rach_cnfg.preamble_init_rx_target_pwr, - liblte_rrc_preamble_initial_received_target_power_num, LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_N_ITEMS) - ); - rach_cnfg.add_field( - new parser::field_enum_num - ("pwr_ramping_step", &data->rr_config_common_sib.rach_cnfg.pwr_ramping_step, - liblte_rrc_power_ramping_step_num, LIBLTE_RRC_POWER_RAMPING_STEP_N_ITEMS) - ); - rach_cnfg.add_field( - new parser::field_enum_num - ("preamble_trans_max", &data->rr_config_common_sib.rach_cnfg.preamble_trans_max, - liblte_rrc_preamble_trans_max_num, LIBLTE_RRC_PREAMBLE_TRANS_MAX_N_ITEMS) - ); + make_asn1_enum_number_parser("num_ra_preambles", &rr_cfg_common->rach_cfg_common.preamb_info.nof_ra_preambs)); + rach_cnfg.add_field(make_asn1_enum_number_parser( + "preamble_init_rx_target_pwr", &rr_cfg_common->rach_cfg_common.pwr_ramp_params.preamb_init_rx_target_pwr)); rach_cnfg.add_field( - new parser::field_enum_num - ("ra_resp_win_size", &data->rr_config_common_sib.rach_cnfg.ra_resp_win_size, - liblte_rrc_ra_response_window_size_num, LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_N_ITEMS) - ); - rach_cnfg.add_field( - new parser::field_enum_num - ("mac_con_res_timer", &data->rr_config_common_sib.rach_cnfg.mac_con_res_timer, - liblte_rrc_mac_contention_resolution_timer_num, LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_N_ITEMS) - ); - rach_cnfg.add_field( - new parser::field("max_harq_msg3_tx", &data->rr_config_common_sib.rach_cnfg.max_harq_msg3_tx) - ); - + make_asn1_enum_number_parser("pwr_ramping_step", &rr_cfg_common->rach_cfg_common.pwr_ramp_params.pwr_ramp_step)); + rach_cnfg.add_field(make_asn1_enum_number_parser( + "preamble_trans_max", &rr_cfg_common->rach_cfg_common.ra_supervision_info.preamb_trans_max)); + rach_cnfg.add_field(make_asn1_enum_number_parser( + "ra_resp_win_size", &rr_cfg_common->rach_cfg_common.ra_supervision_info.ra_resp_win_size)); + rach_cnfg.add_field(make_asn1_enum_number_parser( + "mac_con_res_timer", &rr_cfg_common->rach_cfg_common.ra_supervision_info.mac_contention_resolution_timer)); + rach_cnfg.add_field(new parser::field("max_harq_msg3_tx", &rr_cfg_common->rach_cfg_common.max_harq_msg3_tx)); + parser::section groupa_cnfg("preambles_group_a_cnfg"); rach_cnfg.add_subsection(&groupa_cnfg); - groupa_cnfg.set_optional(&data->rr_config_common_sib.rach_cnfg.preambles_group_a_cnfg.present); - groupa_cnfg.add_field( - new parser::field_enum_num - ("size_of_ra", &data->rr_config_common_sib.rach_cnfg.preambles_group_a_cnfg.size_of_ra, - liblte_rrc_size_of_ra_preambles_group_a_num, LIBLTE_RRC_SIZE_OF_RA_PREAMBLES_GROUP_A_N_ITEMS) - ); - groupa_cnfg.add_field( - new parser::field_enum_num - ("msg_size", &data->rr_config_common_sib.rach_cnfg.preambles_group_a_cnfg.msg_size, - liblte_rrc_message_size_group_a_num, LIBLTE_RRC_MESSAGE_SIZE_GROUP_A_N_ITEMS) - ); - groupa_cnfg.add_field( - new parser::field_enum_num - ("msg_pwr_offset_group_b", &data->rr_config_common_sib.rach_cnfg.preambles_group_a_cnfg.msg_pwr_offset_group_b, - liblte_rrc_message_power_offset_group_b_num, LIBLTE_RRC_MESSAGE_POWER_OFFSET_GROUP_B_N_ITEMS) - ); - - - - // BCCH configuration + groupa_cnfg.set_optional(&rr_cfg_common->rach_cfg_common.preamb_info.preambs_group_a_cfg_present); + rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_* group_acfg = + &rr_cfg_common->rach_cfg_common.preamb_info.preambs_group_a_cfg; + groupa_cnfg.add_field(make_asn1_enum_number_parser("size_of_ra", &group_acfg->size_of_ra_preambs_group_a)); + groupa_cnfg.add_field(make_asn1_enum_number_parser("msg_size", &group_acfg->msg_size_group_a)); + groupa_cnfg.add_field(make_asn1_enum_number_parser("msg_pwr_offset_group_b", &group_acfg->msg_pwr_offset_group_b)); + // rr_cfg_common->rach_cfg_common.preamb_info.nof_ra_preambs = FIXME: ??? + + // BCCH configuration parser::section bcch_cnfg("bcch_cnfg"); rr_config.add_subsection(&bcch_cnfg); bcch_cnfg.add_field( - new parser::field_enum_num - ("modification_period_coeff", &data->rr_config_common_sib.bcch_cnfg.modification_period_coeff, - liblte_rrc_modification_period_coeff_num, LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N_ITEMS) - ); - - // PCCH configuration + make_asn1_enum_number_parser("modification_period_coeff", &rr_cfg_common->bcch_cfg.mod_period_coeff)); + + // PCCH configuration parser::section pcch_cnfg("pcch_cnfg"); rr_config.add_subsection(&pcch_cnfg); pcch_cnfg.add_field( - new parser::field_enum_num - ("default_paging_cycle", &data->rr_config_common_sib.pcch_cnfg.default_paging_cycle, - liblte_rrc_default_paging_cycle_num, LIBLTE_RRC_DEFAULT_PAGING_CYCLE_N_ITEMS) - ); - pcch_cnfg.add_field( - new parser::field_enum_str - ("nB", &data->rr_config_common_sib.pcch_cnfg.nB, - liblte_rrc_nb_text, LIBLTE_RRC_NB_N_ITEMS) - ); + make_asn1_enum_number_parser("default_paging_cycle", &rr_cfg_common->pcch_cfg.default_paging_cycle)); + pcch_cnfg.add_field(make_asn1_enum_number_str_parser("nB", &rr_cfg_common->pcch_cfg.nb)); - // PRACH configuration + // PRACH configuration parser::section prach_cnfg("prach_cnfg"); rr_config.add_subsection(&prach_cnfg); - prach_cnfg.add_field( - new parser::field("root_sequence_index", &data->rr_config_common_sib.prach_cnfg.root_sequence_index) - ); + prach_cnfg.add_field(new parser::field("root_sequence_index", &rr_cfg_common->prach_cfg.root_seq_idx)); parser::section prach_cnfg_info("prach_cnfg_info"); prach_cnfg.add_subsection(&prach_cnfg_info); prach_cnfg_info.add_field( - new parser::field("high_speed_flag", &data->rr_config_common_sib.prach_cnfg.prach_cnfg_info.high_speed_flag) - ); - prach_cnfg_info.add_field( - new parser::field("prach_config_index", &data->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_config_index) - ); + new parser::field("high_speed_flag", &rr_cfg_common->prach_cfg.prach_cfg_info.high_speed_flag)); prach_cnfg_info.add_field( - new parser::field("prach_freq_offset", &data->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset) - ); + new parser::field("prach_config_index", &rr_cfg_common->prach_cfg.prach_cfg_info.prach_cfg_idx)); prach_cnfg_info.add_field( - new parser::field("zero_correlation_zone_config", &data->rr_config_common_sib.prach_cnfg.prach_cnfg_info.zero_correlation_zone_config) - ); - - // PDSCH configuration + new parser::field("prach_freq_offset", &rr_cfg_common->prach_cfg.prach_cfg_info.prach_freq_offset)); + prach_cnfg_info.add_field(new parser::field( + "zero_correlation_zone_config", &rr_cfg_common->prach_cfg.prach_cfg_info.zero_correlation_zone_cfg)); + + // PDSCH configuration parser::section pdsch_cnfg("pdsch_cnfg"); rr_config.add_subsection(&pdsch_cnfg); - pdsch_cnfg.add_field( - new parser::field("p_b", &data->rr_config_common_sib.pdsch_cnfg.p_b) - ); - pdsch_cnfg.add_field( - new parser::field("rs_power", &data->rr_config_common_sib.pdsch_cnfg.rs_power) - ); - - // PUSCH configuration + pdsch_cnfg.add_field(new parser::field("p_b", &rr_cfg_common->pdsch_cfg_common.p_b)); + pdsch_cnfg.add_field(new parser::field("rs_power", &rr_cfg_common->pdsch_cfg_common.ref_sig_pwr)); + + // PUSCH configuration parser::section pusch_cnfg("pusch_cnfg"); rr_config.add_subsection(&pusch_cnfg); + pusch_cnfg.add_field(new parser::field("n_sb", &rr_cfg_common->pusch_cfg_common.pusch_cfg_basic.n_sb)); pusch_cnfg.add_field( - new parser::field("n_sb", &data->rr_config_common_sib.pusch_cnfg.n_sb) - ); - pusch_cnfg.add_field( - new parser::field_enum_str - ("hopping_mode", &data->rr_config_common_sib.pusch_cnfg.hopping_mode, - liblte_rrc_hopping_mode_text, LIBLTE_RRC_HOOPPING_MODE_N_ITEMS) - ); - pusch_cnfg.add_field( - new parser::field - ("pusch_hopping_offset", &data->rr_config_common_sib.pusch_cnfg.pusch_hopping_offset) - ); + make_asn1_enum_str_parser("hopping_mode", &rr_cfg_common->pusch_cfg_common.pusch_cfg_basic.hop_mode)); + pusch_cnfg.add_field(new parser::field("pusch_hopping_offset", + &rr_cfg_common->pusch_cfg_common.pusch_cfg_basic.pusch_hop_offset)); pusch_cnfg.add_field( - new parser::field - ("enable_64_qam", &data->rr_config_common_sib.pusch_cnfg.enable_64_qam) - ); + new parser::field("enable_64_qam", &rr_cfg_common->pusch_cfg_common.pusch_cfg_basic.enable64_qam)); - // PUSCH-ULRS configuration + // PUSCH-ULRS configuration parser::section ulrs_cnfg("ul_rs"); pusch_cnfg.add_subsection(&ulrs_cnfg); ulrs_cnfg.add_field( - new parser::field - ("cyclic_shift", &data->rr_config_common_sib.pusch_cnfg.ul_rs.cyclic_shift) - ); - ulrs_cnfg.add_field( - new parser::field - ("group_assignment_pusch", &data->rr_config_common_sib.pusch_cnfg.ul_rs.group_assignment_pusch) - ); - ulrs_cnfg.add_field( - new parser::field - ("group_hopping_enabled", &data->rr_config_common_sib.pusch_cnfg.ul_rs.group_hopping_enabled) - ); - ulrs_cnfg.add_field( - new parser::field - ("sequence_hopping_enabled", &data->rr_config_common_sib.pusch_cnfg.ul_rs.sequence_hopping_enabled) - ); - - // PUCCH configuration + new parser::field("cyclic_shift", &rr_cfg_common->pusch_cfg_common.ul_ref_sigs_pusch.cyclic_shift)); + ulrs_cnfg.add_field(new parser::field("group_assignment_pusch", + &rr_cfg_common->pusch_cfg_common.ul_ref_sigs_pusch.group_assign_pusch)); + ulrs_cnfg.add_field(new parser::field("group_hopping_enabled", + &rr_cfg_common->pusch_cfg_common.ul_ref_sigs_pusch.group_hop_enabled)); + ulrs_cnfg.add_field(new parser::field("sequence_hopping_enabled", + &rr_cfg_common->pusch_cfg_common.ul_ref_sigs_pusch.seq_hop_enabled)); + + // PUCCH configuration parser::section pucch_cnfg("pucch_cnfg"); rr_config.add_subsection(&pucch_cnfg); pucch_cnfg.add_field( - new parser::field_enum_num - ("delta_pucch_shift", &data->rr_config_common_sib.pucch_cnfg.delta_pucch_shift, - liblte_rrc_delta_pucch_shift_num,LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS) - ); - pucch_cnfg.add_field( - new parser::field - ("n_rb_cqi", &data->rr_config_common_sib.pucch_cnfg.n_rb_cqi) - ); - pucch_cnfg.add_field( - new parser::field - ("n_cs_an", &data->rr_config_common_sib.pucch_cnfg.n_cs_an) - ); - pucch_cnfg.add_field( - new parser::field - ("n1_pucch_an", &data->rr_config_common_sib.pucch_cnfg.n1_pucch_an) - ); + make_asn1_enum_number_parser("delta_pucch_shift", &rr_cfg_common->pucch_cfg_common.delta_pucch_shift)); + pucch_cnfg.add_field(new parser::field("n_rb_cqi", &rr_cfg_common->pucch_cfg_common.n_rb_cqi)); + pucch_cnfg.add_field(new parser::field("n_cs_an", &rr_cfg_common->pucch_cfg_common.n_cs_an)); + pucch_cnfg.add_field(new parser::field("n1_pucch_an", &rr_cfg_common->pucch_cfg_common.n1_pucch_an)); - // UL PWR Ctrl configuration + // UL PWR Ctrl configuration parser::section ul_pwr_ctrl("ul_pwr_ctrl"); rr_config.add_subsection(&ul_pwr_ctrl); ul_pwr_ctrl.add_field( - new parser::field - ("p0_nominal_pusch", &data->rr_config_common_sib.ul_pwr_ctrl.p0_nominal_pusch) - ); - ul_pwr_ctrl.add_field( - new parser::field_enum_num - ("alpha", &data->rr_config_common_sib.ul_pwr_ctrl.alpha, - liblte_rrc_ul_power_control_alpha_num, LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_N_ITEMS) - ); + new parser::field("p0_nominal_pusch", &rr_cfg_common->ul_pwr_ctrl_common.p0_nominal_pusch)); + ul_pwr_ctrl.add_field(make_asn1_enum_number_parser("alpha", &rr_cfg_common->ul_pwr_ctrl_common.alpha)); ul_pwr_ctrl.add_field( - new parser::field - ("p0_nominal_pucch", &data->rr_config_common_sib.ul_pwr_ctrl.p0_nominal_pucch) - ); + new parser::field("p0_nominal_pucch", &rr_cfg_common->ul_pwr_ctrl_common.p0_nominal_pucch)); ul_pwr_ctrl.add_field( - new parser::field - ("delta_preamble_msg3", &data->rr_config_common_sib.ul_pwr_ctrl.delta_preamble_msg3) - ); + new parser::field("delta_preamble_msg3", &rr_cfg_common->ul_pwr_ctrl_common.delta_preamb_msg3)); - // Delta Flist PUCCH + // Delta Flist PUCCH parser::section delta_flist("delta_flist_pucch"); ul_pwr_ctrl.add_subsection(&delta_flist); - delta_flist.add_field( - new parser::field_enum_num - ("format_1", &data->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_1, - liblte_rrc_delta_f_pucch_format_1_num, LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_N_ITEMS) - ); - delta_flist.add_field( - new parser::field_enum_num - ("format_1b", &data->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_1b, - liblte_rrc_delta_f_pucch_format_1b_num, LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_N_ITEMS) - ); - delta_flist.add_field( - new parser::field_enum_num - ("format_2", &data->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_2, - liblte_rrc_delta_f_pucch_format_2_num, LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_N_ITEMS) - ); - delta_flist.add_field( - new parser::field_enum_num - ("format_2a", &data->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_2a, - liblte_rrc_delta_f_pucch_format_2a_num, LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_N_ITEMS) - ); - delta_flist.add_field( - new parser::field_enum_num - ("format_2b", &data->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_2b, - liblte_rrc_delta_f_pucch_format_2b_num, LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_N_ITEMS) - ); - - // Run parser with single section + delta_flist.add_field(make_asn1_enum_number_parser( + "format_1", &rr_cfg_common->ul_pwr_ctrl_common.delta_flist_pucch.delta_f_pucch_format1)); + delta_flist.add_field(make_asn1_enum_number_parser( + "format_1b", &rr_cfg_common->ul_pwr_ctrl_common.delta_flist_pucch.delta_f_pucch_format1b)); + delta_flist.add_field(make_asn1_enum_number_parser( + "format_2", &rr_cfg_common->ul_pwr_ctrl_common.delta_flist_pucch.delta_f_pucch_format2)); + delta_flist.add_field(make_asn1_enum_number_parser( + "format_2a", &rr_cfg_common->ul_pwr_ctrl_common.delta_flist_pucch.delta_f_pucch_format2a)); + delta_flist.add_field(make_asn1_enum_number_parser( + "format_2b", &rr_cfg_common->ul_pwr_ctrl_common.delta_flist_pucch.delta_f_pucch_format2b)); + + // Run parser with single section return parser::parse_section(filename, &sib2); } -int enb::parse_sib3(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *data) -{ +int enb::parse_sib3(std::string filename, sib_type3_s* data) +{ parser::section sib3("sib3"); - + // CellReselectionInfoCommon parser::section resel_common("cell_reselection_common"); sib3.add_subsection(&resel_common); - resel_common.add_field( - new parser::field_enum_num - ("q_hyst", &data->q_hyst, - liblte_rrc_q_hyst_num, LIBLTE_RRC_Q_HYST_N_ITEMS) - ); - + resel_common.add_field(make_asn1_enum_number_parser("q_hyst", &data->cell_resel_info_common.q_hyst)); + parser::section speed_resel("speed_state_resel_params"); resel_common.add_subsection(&speed_resel); - resel_common.set_optional(&data->speed_state_resel_params.present); - - + resel_common.set_optional(&data->cell_resel_info_common.speed_state_resel_pars_present); + sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_* resel_pars = + &data->cell_resel_info_common.speed_state_resel_pars; + parser::section q_hyst_sf("q_hyst_sf"); speed_resel.add_subsection(&q_hyst_sf); - q_hyst_sf.add_field( - new parser::field_enum_num - ("medium", &data->speed_state_resel_params.q_hyst_sf.medium, - liblte_rrc_sf_medium_num, LIBLTE_RRC_SF_MEDIUM_N_ITEMS) - ); - q_hyst_sf.add_field( - new parser::field_enum_num - ("high", &data->speed_state_resel_params.q_hyst_sf.high, - liblte_rrc_sf_high_num, LIBLTE_RRC_SF_HIGH_N_ITEMS) - ); - - + q_hyst_sf.add_field(make_asn1_enum_number_parser("medium", &resel_pars->q_hyst_sf.sf_medium)); + q_hyst_sf.add_field(make_asn1_enum_number_parser("high", &resel_pars->q_hyst_sf.sf_high)); + parser::section mob_params("mobility_state_params"); speed_resel.add_subsection(&mob_params); + mob_params.add_field(make_asn1_enum_number_parser("t_eval", &resel_pars->mob_state_params.t_eval)); + mob_params.add_field(make_asn1_enum_number_parser("t_hyst_normal", &resel_pars->mob_state_params.t_hyst_normal)); mob_params.add_field( - new parser::field_enum_num - ("t_eval", &data->speed_state_resel_params.mobility_state_params.t_eval, - liblte_rrc_t_evaluation_num, LIBLTE_RRC_T_EVALUATION_N_ITEMS) - ); - mob_params.add_field( - new parser::field_enum_num - ("t_hyst_normal", &data->speed_state_resel_params.mobility_state_params.t_hyst_normal, - liblte_rrc_t_hyst_normal_num, LIBLTE_RRC_T_HYST_NORMAL_N_ITEMS) - ); - mob_params.add_field( - new parser::field - ("n_cell_change_medium", &data->speed_state_resel_params.mobility_state_params.n_cell_change_medium) - ); + new parser::field("n_cell_change_medium", &resel_pars->mob_state_params.n_cell_change_medium)); mob_params.add_field( - new parser::field - ("n_cell_change_high", &data->speed_state_resel_params.mobility_state_params.n_cell_change_high) - ); + new parser::field("n_cell_change_high", &resel_pars->mob_state_params.n_cell_change_high)); // CellReselectionServingFreqInfo parser::section resel_serving("cell_reselection_serving"); sib3.add_subsection(&resel_serving); + sib_type3_s::cell_resel_serving_freq_info_s_* freqinfo = &data->cell_resel_serving_freq_info; + + resel_serving.add_field(new parser::field("s_non_intra_search", &freqinfo->s_non_intra_search, + &freqinfo->s_non_intra_search_present)); + resel_serving.add_field(new parser::field("thresh_serving_low", &freqinfo->thresh_serving_low)); + resel_serving.add_field(new parser::field("cell_resel_prio", &freqinfo->cell_resel_prio)); - resel_serving.add_field( - new parser::field ("s_non_intra_search", &data->s_non_intra_search, &data->s_non_intra_search_present) - ); - resel_serving.add_field( - new parser::field("thresh_serving_low", &data->thresh_serving_low) - ); - resel_serving.add_field( - new parser::field("cell_resel_prio", &data->cell_resel_prio) - ); - - // intraFreqCellReselectionInfo parser::section intra_freq("intra_freq_reselection"); sib3.add_subsection(&intra_freq); - - intra_freq.add_field( - new parser::field("q_rx_lev_min", &data->q_rx_lev_min) - ); - intra_freq.add_field( - new parser::field("p_max", &data->p_max, &data->p_max_present) - ); - intra_freq.add_field( - new parser::field("s_intra_search", &data->s_intra_search, &data->s_intra_search_present) - ); - intra_freq.add_field( - new parser::field_enum_num - ("allowed_meas_bw", &data->allowed_meas_bw, - liblte_rrc_allowed_meas_bandwidth_num, LIBLTE_RRC_ALLOWED_MEAS_BANDWIDTH_N_ITEMS, - &data->allowed_meas_bw_present) - ); - intra_freq.add_field( - new parser::field("presence_ant_port_1", &data->presence_ant_port_1) - ); - intra_freq.add_field( - new parser::field("neigh_cell_cnfg", &data->neigh_cell_cnfg) - ); + sib_type3_s::intra_freq_cell_resel_info_s_* intrafreq = &data->intra_freq_cell_resel_info; + + intra_freq.add_field(new parser::field("q_rx_lev_min", &intrafreq->q_rx_lev_min)); + intra_freq.add_field(new parser::field("p_max", &intrafreq->p_max, &intrafreq->p_max_present)); intra_freq.add_field( - new parser::field("t_resel_eutra", &data->t_resel_eutra) - ); + new parser::field("s_intra_search", &intrafreq->s_intra_search, &intrafreq->s_intra_search_present)); + intra_freq.add_field(make_asn1_enum_number_parser("allowed_meas_bw", &intrafreq->allowed_meas_bw, + &intrafreq->allowed_meas_bw_present)); + intra_freq.add_field(new parser::field("presence_ant_port_1", &intrafreq->presence_ant_port1)); + intra_freq.add_field(make_asn1_bitstring_number_parser("neigh_cell_cnfg", &intrafreq->neigh_cell_cfg)); + intra_freq.add_field(new parser::field("t_resel_eutra", &intrafreq->t_resel_eutra)); + parser::section t_resel_eutra_sf("t_resel_eutra_sf"); intra_freq.add_subsection(&t_resel_eutra_sf); - t_resel_eutra_sf.set_optional(&data->t_resel_eutra_sf_present); - - t_resel_eutra_sf.add_field( - new parser::field_enum_num - ("sf_medium", &data->t_resel_eutra_sf.sf_medium, - liblte_rrc_sssf_medium_num, LIBLTE_RRC_SSSF_MEDIUM_N_ITEMS) - ); - t_resel_eutra_sf.add_field( - new parser::field_enum_num - ("sf_high", &data->t_resel_eutra_sf.sf_high, - liblte_rrc_sssf_high_num, LIBLTE_RRC_SSSF_HIGH_N_ITEMS) - ); - - // Run parser with single section + t_resel_eutra_sf.set_optional(&intrafreq->t_resel_eutra_sf_present); + + t_resel_eutra_sf.add_field(make_asn1_enum_number_str_parser("sf_medium", &intrafreq->t_resel_eutra_sf.sf_medium)); + t_resel_eutra_sf.add_field(make_asn1_enum_number_str_parser("sf_high", &intrafreq->t_resel_eutra_sf.sf_high)); + + // Run parser with single section return parser::parse_section(filename, &sib3); } -int enb::parse_sib4(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data) -{ +int enb::parse_sib4(std::string filename, sib_type4_s* data) +{ parser::section sib4("sib4"); - - // csg-PhysCellIdRange + + // csg-PhysCellIdRange parser::section csg_range("csg_phys_cell_id_range"); sib4.add_subsection(&csg_range); - csg_range.set_optional(&data->csg_phys_cell_id_range_present); - csg_range.add_field( - new parser::field_enum_num - ("range", &data->csg_phys_cell_id_range.range, - liblte_rrc_phys_cell_id_range_num, LIBLTE_RRC_PHYS_CELL_ID_RANGE_N_ITEMS) - ); - csg_range.add_field( - new parser::field("start", &data->csg_phys_cell_id_range.start) - ); + csg_range.set_optional(&data->csg_pci_range_present); + csg_range.add_field(make_asn1_enum_number_parser("range", &data->csg_pci_range.range)); + csg_range.add_field(new parser::field("start", &data->csg_pci_range.start)); // intraFreqNeighCellList parser::section intra_neigh("intra_freq_neigh_cell_list"); sib4.add_subsection(&intra_neigh); - bool dummy_bool = false; + bool dummy_bool = false; intra_neigh.set_optional(&dummy_bool); - intra_neigh.add_field(new field_intra_neigh_cell_list(data)); + intra_neigh.add_field(new field_intra_neigh_cell_list(data)); // intraFreqBlackCellList parser::section intra_black("intra_freq_black_cell_list"); sib4.add_subsection(&intra_black); intra_black.set_optional(&dummy_bool); - intra_black.add_field(new field_intra_black_cell_list(data)); + intra_black.add_field(new field_intra_black_cell_list(data)); - // Run parser with single section + // Run parser with single section return parser::parse_section(filename, &sib4); } - -uint32_t HexToBytes(const std::string& str, uint8_t *char_value, uint32_t buff_len) { - uint32_t i=0; - for (i = 0; i < str.length() && i("hnb_name", &hnb_name, &name_enabled)); sib9.add_field(new parser::field("hex_value", &hex_value, &hex_enabled)); - // Run parser with single section + // Run parser with single section if (!parser::parse_section(filename, &sib9)) { - data->hnb_name_present = true; + data->hnb_name_present = true; if (name_enabled) { - strncpy((char*) data->hnb_name, hnb_name.c_str(), 47); - data->hnb_name[47] = 0; - data->hnb_name_size = strnlen(hnb_name.c_str(), 48); + data->hnb_name.resize(SRSLTE_MIN((uint32_t)hnb_name.size(), 48)); + memcpy(data->hnb_name.data(), hnb_name.c_str(), data->hnb_name.size()); } else if (hex_enabled) { - data->hnb_name_size = HexToBytes(hex_value, data->hnb_name, 48); + if (hex_value.size() > 48) { + hex_value.resize(48); + } + data->hnb_name.from_string(hex_value); } else { - data->hnb_name_present = false; + data->hnb_name_present = false; } - return 0; + return 0; } else { return -1; } } -int enb::parse_sib13(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *data) +int enb::parse_sib13(std::string filename, sib_type13_r9_s* data) { parser::section sib13("sib13"); - - sib13.add_field( - new parser::field - ("mbsfn_area_info_list_size", &data->mbsfn_area_info_list_r9_size) - ); - + + sib13.add_field(make_asn1_seqof_size_parser("mbsfn_area_info_list_size", &data->mbsfn_area_info_list_r9)); + parser::section mbsfn_notification_config("mbsfn_notification_config"); sib13.add_subsection(&mbsfn_notification_config); - - - mbsfn_notification_config.add_field( - new parser::field_enum_str - ("mbsfn_notification_repetition_coeff", &data->mbsfn_notification_config.repetition_coeff, liblte_rrc_notification_repetition_coeff_r9_text,LIBLTE_RRC_NOTIFICATION_REPETITION_COEFF_R9_N_ITEMS) - ); - - mbsfn_notification_config.add_field( - new parser::field - ("mbsfn_notification_offset", &data->mbsfn_notification_config.offset) - ); - - mbsfn_notification_config.add_field( - new parser::field - ("mbsfn_notification_sf_index", &data->mbsfn_notification_config.sf_index) - ); - - - parser::section mbsfn_area_info_list("mbsfn_area_info_list"); - sib13.add_subsection(&mbsfn_area_info_list); - - mbsfn_area_info_list.add_field( - new parser::field_enum_str - ("non_mbsfn_region_length", &data->mbsfn_area_info_list_r9[0].non_mbsfn_region_length, - liblte_rrc_non_mbsfn_region_length_text,LIBLTE_RRC_NON_MBSFN_REGION_LENGTH_N_ITEMS) - ); - - mbsfn_area_info_list.add_field( - new parser::field_enum_str - ("mcch_repetition_period", &data->mbsfn_area_info_list_r9[0].mcch_repetition_period_r9, - liblte_rrc_mcch_repetition_period_r9_text,LIBLTE_RRC_MCCH_REPETITION_PERIOD_N_ITEMS) - ); - - - mbsfn_area_info_list.add_field( - new parser::field_enum_str - ("mcch_modification_period", &data->mbsfn_area_info_list_r9[0].mcch_modification_period_r9, - liblte_rrc_mcch_modification_period_r9_text,LIBLTE_RRC_MCCH_MODIFICATION_PERIOD_N_ITEMS) - ); - - mbsfn_area_info_list.add_field( - new parser::field_enum_str - ("signalling_mcs", &data->mbsfn_area_info_list_r9[0].signalling_mcs_r9, - liblte_rrc_mcch_signalling_mcs_r9_text,LIBLTE_RRC_MCCH_SIGNALLING_MCS_N_ITEMS) - ); - - - mbsfn_area_info_list.add_field( - new parser::field - ("mbsfn_area_id", &data->mbsfn_area_info_list_r9[0].mbsfn_area_id_r9) - ); - - mbsfn_area_info_list.add_field( - new parser::field - ("notification_indicator", &data->mbsfn_area_info_list_r9[0].notification_indicator_r9) - ); - - mbsfn_area_info_list.add_field( - new parser::field - ("mcch_offset", &data->mbsfn_area_info_list_r9[0].mcch_offset_r9) - ); - - mbsfn_area_info_list.add_field( - new parser::field - ("sf_alloc_info", &data->mbsfn_area_info_list_r9[0].sf_alloc_info_r9) - ); + + mbsfn_notification_config.add_field( + make_asn1_enum_str_parser("mbsfn_notification_repetition_coeff", &data->notif_cfg_r9.notif_repeat_coeff_r9)); + + mbsfn_notification_config.add_field( + new parser::field("mbsfn_notification_offset", &data->notif_cfg_r9.notif_offset_r9)); + + mbsfn_notification_config.add_field( + new parser::field("mbsfn_notification_sf_index", &data->notif_cfg_r9.notif_sf_idx_r9)); + + sib13.add_field(new mbsfn_area_info_list_parser(&data->mbsfn_area_info_list_r9, NULL)); + return parser::parse_section(filename, &sib13); } +int mbsfn_area_info_list_parser::parse(Setting& root) +{ + if (not root.exists("mbsfn_area_info_list")) { + if (enabled) { + *enabled = false; + } + mbsfn_list->resize(0); + return 0; + } + + mbsfn_list->resize(1); + if (enabled) { + *enabled = true; + } + mbsfn_area_info_r9_s* mbsfn_item = &(*mbsfn_list)[0]; + + field_asn1_enum_str fieldlen("non_mbsfn_region_length", + &mbsfn_item->non_mbsfn_region_len); + fieldlen.parse(root["mbsfn_area_info_list"]); + + field_asn1_enum_str repeat( + "mcch_repetition_period", &mbsfn_item->mcch_cfg_r9.mcch_repeat_period_r9); + repeat.parse(root["mbsfn_area_info_list"]); + + field_asn1_enum_str mod( + "mcch_modification_period", &mbsfn_item->mcch_cfg_r9.mcch_mod_period_r9); + mod.parse(root["mbsfn_area_info_list"]); + + field_asn1_enum_str sig("signalling_mcs", + &mbsfn_item->mcch_cfg_r9.sig_mcs_r9); + sig.parse(root["mbsfn_area_info_list"]); + + parser::field areaid("mbsfn_area_id", &mbsfn_item->mbsfn_area_id_r9); + areaid.parse(root["mbsfn_area_info_list"]); + + parser::field notif_ind("notification_indicator", &mbsfn_item->notif_ind_r9); + notif_ind.parse(root["mbsfn_area_info_list"]); + + parser::field offset("mcch_offset", &mbsfn_item->mcch_cfg_r9.mcch_offset_r9); + offset.parse(root["mbsfn_area_info_list"]); + + field_asn1_bitstring_number, uint8_t> alloc_info("sf_alloc_info", + &mbsfn_item->mcch_cfg_r9.sf_alloc_info_r9); + alloc_info.parse(root["mbsfn_area_info_list"]); + + return 0; +} -int enb::parse_sibs(all_args_t *args, rrc_cfg_t *rrc_cfg, phy_cfg_t *phy_config_common) +int enb::parse_sibs(all_args_t* args, rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_config_common) { - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1 = &rrc_cfg->sibs[0].sib.sib1; - rrc_cfg->sibs[0].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2 = &rrc_cfg->sibs[1].sib.sib2; - rrc_cfg->sibs[1].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3 = &rrc_cfg->sibs[2].sib.sib3; - rrc_cfg->sibs[2].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *sib4 = &rrc_cfg->sibs[3].sib.sib4; - rrc_cfg->sibs[3].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *sib9 = &rrc_cfg->sibs[8].sib.sib9; - rrc_cfg->sibs[8].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13 = &rrc_cfg->sibs[12].sib.sib13; - rrc_cfg->sibs[12].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13; - - // Read SIB1 configuration from file - bzero(sib1, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT)); + // FIXME: Leave 0 blank for now + rrc_cfg->sibs[1].set(asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib2); + rrc_cfg->sibs[2].set(asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib3); + rrc_cfg->sibs[3].set(asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib4); + rrc_cfg->sibs[8].set(asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib9); + rrc_cfg->sibs[12].set( + asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib13_v920); // TODO: Confirm it matches with old + // LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13 + sib_type2_s* sib2 = &rrc_cfg->sibs[1].sib2(); + sib_type3_s* sib3 = &rrc_cfg->sibs[2].sib3(); + sib_type4_s* sib4 = &rrc_cfg->sibs[3].sib4(); + sib_type9_s* sib9 = &rrc_cfg->sibs[8].sib9(); + sib_type13_r9_s* sib13 = &rrc_cfg->sibs[12].sib13_v920(); + + sib_type1_s* sib1 = &rrc_cfg->sib1; if (parse_sib1(args->enb_files.sib_config, sib1)) { - return -1; + return -1; } - - // Fill rest of data from enb config - sib1->cell_id = (args->enb.s1ap.enb_id << 8) + args->enb.s1ap.cell_id; - sib1->tracking_area_code = args->enb.s1ap.tac; - sib1->freq_band_indicator = srslte_band_get_band(args->rf.dl_earfcn); - sib1->N_plmn_ids = 1; - sib1->plmn_id[0].id.mcc = args->enb.s1ap.mcc; - sib1->plmn_id[0].id.mnc = args->enb.s1ap.mnc; - sib1->plmn_id[0].resv_for_oper = LIBLTE_RRC_NOT_RESV_FOR_OPER; - sib1->cell_barred = LIBLTE_RRC_CELL_NOT_BARRED; - sib1->q_rx_lev_min_offset = 0; - + + // Fill rest of data from enb config + sib_type1_s::cell_access_related_info_s_* cell_access = &sib1->cell_access_related_info; + cell_access->cell_id.from_number((args->enb.s1ap.enb_id << 8u) + args->enb.s1ap.cell_id); + cell_access->tac.from_number(args->enb.s1ap.tac); + sib1->freq_band_ind = (uint8_t)srslte_band_get_band(args->rf.dl_earfcn); + std::string mnc_str; + if (not srslte::mnc_to_string(args->enb.s1ap.mnc, &mnc_str)) { + ERROR("The provided mnc=%d is not valid", args->enb.s1ap.mnc); + return -1; + } + std::string mcc_str; + if (not srslte::mcc_to_string(args->enb.s1ap.mcc, &mcc_str)) { + ERROR("The provided mnc=%d is not valid", args->enb.s1ap.mcc); + return -1; + } + cell_access->plmn_id_list.resize(1); + if (not srslte::string_to_plmn_id(cell_access->plmn_id_list[0].plmn_id, mcc_str + mnc_str)) { + ERROR("Could not convert %s to a plmn_id\n", (mcc_str + mnc_str).c_str()); + return -1; + } + cell_access->plmn_id_list[0].cell_reserved_for_oper = plmn_id_info_s::cell_reserved_for_oper_e_::not_reserved; + sib1->cell_sel_info.q_rx_lev_min_offset = 0; + // Generate SIB2 - bzero(sib2, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT)); - bool mbsfn_section_present = false; - if (parse_sib2(args->enb_files.sib_config, sib2, &mbsfn_section_present)) { - return -1; + if (parse_sib2(args->enb_files.sib_config, sib2)) { + return -1; } - + // SRS not yet supported - sib2->rr_config_common_sib.srs_ul_cnfg.present = false; - if (sib2->ul_bw.present) { - switch(args->enb.n_prb) { - case 6: - sib2->ul_bw.bw = LIBLTE_RRC_UL_BW_N6; - break; - case 15: - sib2->ul_bw.bw = LIBLTE_RRC_UL_BW_N15; - break; - case 25: - sib2->ul_bw.bw = LIBLTE_RRC_UL_BW_N25; - break; - case 50: - sib2->ul_bw.bw = LIBLTE_RRC_UL_BW_N50; - break; - case 75: - sib2->ul_bw.bw = LIBLTE_RRC_UL_BW_N75; - break; - case 100: - sib2->ul_bw.bw = LIBLTE_RRC_UL_BW_N100; - break; - } + sib2->rr_cfg_common.srs_ul_cfg_common.set(srs_ul_cfg_common_c::types::release); + if (sib2->freq_info.ul_bw_present) { + asn1::number_to_enum(sib2->freq_info.ul_bw, args->enb.n_prb); } - if (sib2->arfcn_value_eutra.present) { - sib2->arfcn_value_eutra.value = args->rf.ul_earfcn; + if (sib2->freq_info.ul_carrier_freq_present) { + sib2->freq_info.ul_carrier_freq = (uint16_t)args->rf.ul_earfcn; } // Update MBSFN list counter. Only 1 supported - if (mbsfn_section_present && args->expert.enable_mbsfn) { - sib2->mbsfn_subfr_cnfg_list_size = 1; + if (not args->expert.enable_mbsfn) { + sib2->mbsfn_sf_cfg_list_present = false; + sib2->mbsfn_sf_cfg_list.resize(0); + } else { + // verify SIB13 is available + if (not sib_is_present(sib1->sched_info_list, sib_type_e::sib_type13_v920)) { + fprintf(stderr, "SIB13 not present in sched_info.\n"); + return -1; + } } // Generate SIB3 if defined in mapping info - if (sib_is_present(sib1->sched_info, sib1->N_sched_info, LIBLTE_RRC_SIB_TYPE_3)) { - bzero(sib3, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT)); + if (sib_is_present(sib1->sched_info_list, sib_type_e::sib_type3)) { if (parse_sib3(args->enb_files.sib_config, sib3)) { - return -1; - } + return -1; + } } - // Generate SIB4 if defined in mapping info - if (sib_is_present(sib1->sched_info, sib1->N_sched_info, LIBLTE_RRC_SIB_TYPE_4)) { - bzero(sib4, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT)); + // Generate SIB4 if defined in mapping info + if (sib_is_present(sib1->sched_info_list, sib_type_e::sib_type4)) { if (parse_sib4(args->enb_files.sib_config, sib4)) { - return -1; - } + return -1; + } } - // Generate SIB9 if defined in mapping info - if (sib_is_present(sib1->sched_info, sib1->N_sched_info, LIBLTE_RRC_SIB_TYPE_9)) { - bzero(sib9, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT)); + // Generate SIB9 if defined in mapping info + if (sib_is_present(sib1->sched_info_list, sib_type_e::sib_type9)) { if (parse_sib9(args->enb_files.sib_config, sib9)) { - return -1; - } + return -1; + } } - - if (sib_is_present(sib1->sched_info, sib1->N_sched_info, LIBLTE_RRC_SIB_TYPE_13_v920)) { - bzero(sib13, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT)); + + if (sib_is_present(sib1->sched_info_list, sib_type_e::sib_type13_v920)) { if (parse_sib13(args->enb_files.sib_config, sib13)) { - return -1; - } + return -1; + } } - // Copy PHY common configuration - bzero(phy_config_common, sizeof(phy_cfg_t)); - memcpy(&phy_config_common->prach_cnfg, &sib2->rr_config_common_sib.prach_cnfg, sizeof(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT)); - memcpy(&phy_config_common->pdsch_cnfg, &sib2->rr_config_common_sib.pdsch_cnfg, sizeof(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT)); - memcpy(&phy_config_common->pusch_cnfg, &sib2->rr_config_common_sib.pusch_cnfg, sizeof(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT)); - memcpy(&phy_config_common->pucch_cnfg, &sib2->rr_config_common_sib.pucch_cnfg, sizeof(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT)); - memcpy(&phy_config_common->srs_ul_cnfg, &sib2->rr_config_common_sib.srs_ul_cnfg, sizeof(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT)); - - return 0; + + // Copy PHY common configuration + bzero(&phy_config_common->cell, sizeof(phy_config_common->cell)); + phy_config_common->prach_cnfg = sib2->rr_cfg_common.prach_cfg; + phy_config_common->pdsch_cnfg = sib2->rr_cfg_common.pdsch_cfg_common; + phy_config_common->pusch_cnfg = sib2->rr_cfg_common.pusch_cfg_common; + phy_config_common->pucch_cnfg = sib2->rr_cfg_common.pucch_cfg_common; + phy_config_common->srs_ul_cnfg = sib2->rr_cfg_common.srs_ul_cfg_common; + + return 0; } -bool enb::sib_is_present(LIBLTE_RRC_SCHEDULING_INFO_STRUCT *sched_info, uint32_t nof_sched_info, LIBLTE_RRC_SIB_TYPE_ENUM sib_num) +bool enb::sib_is_present(const sched_info_list_l& l, sib_type_e sib_num) { - for (uint32_t i=0;ienb.transmission_mode < 1 || args->enb.transmission_mode > 4) { ERROR("Invalid transmission mode (%d). Only indexes 1-4 are implemented.\n", args->enb.transmission_mode); @@ -979,88 +725,52 @@ int enb::parse_rr(all_args_t* args, rrc_cfg_t* rrc_cfg) return SRSLTE_ERROR; } - bzero(&rrc_cfg->antenna_info, sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT)); - rrc_cfg->antenna_info.tx_mode = (LIBLTE_RRC_TRANSMISSION_MODE_ENUM) (args->enb.transmission_mode - 1); + rrc_cfg->antenna_info.tx_mode = (ant_info_ded_s::tx_mode_e_::options)(args->enb.transmission_mode - 1); - if (rrc_cfg->antenna_info.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3) { - rrc_cfg->antenna_info.ue_tx_antenna_selection_setup = LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_OPEN_LOOP; - rrc_cfg->antenna_info.ue_tx_antenna_selection_setup_present = false; + rrc_cfg->antenna_info.ue_tx_ant_sel.set(ant_info_ded_s::ue_tx_ant_sel_c_::types::setup); + if (rrc_cfg->antenna_info.tx_mode == ant_info_ded_s::tx_mode_e_::tm3) { + rrc_cfg->antenna_info.ue_tx_ant_sel.setup().value = ant_info_ded_s::ue_tx_ant_sel_c_::setup_e_::open_loop; - rrc_cfg->antenna_info.codebook_subset_restriction_choice = LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM3; - rrc_cfg->antenna_info.codebook_subset_restriction = 0b11; - rrc_cfg->antenna_info.codebook_subset_restriction_present = true; - } else if (rrc_cfg->antenna_info.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { - rrc_cfg->antenna_info.ue_tx_antenna_selection_setup = LIBLTE_RRC_UE_TX_ANTENNA_SELECTION_CLOSED_LOOP; - rrc_cfg->antenna_info.ue_tx_antenna_selection_setup_present = true; + rrc_cfg->antenna_info.codebook_subset_restrict_present = true; + rrc_cfg->antenna_info.codebook_subset_restrict.set( + ant_info_ded_s::codebook_subset_restrict_c_::types::n2_tx_ant_tm3); + rrc_cfg->antenna_info.codebook_subset_restrict.n2_tx_ant_tm3().from_number(0b11); + } else if (rrc_cfg->antenna_info.tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { + rrc_cfg->antenna_info.ue_tx_ant_sel.setup().value = ant_info_ded_s::ue_tx_ant_sel_c_::setup_e_::closed_loop; - rrc_cfg->antenna_info.codebook_subset_restriction_choice = LIBLTE_RRC_CODEBOOK_SUBSET_RESTRICTION_N2_TM4; - rrc_cfg->antenna_info.codebook_subset_restriction = 0b111111; - rrc_cfg->antenna_info.codebook_subset_restriction_present = true; + rrc_cfg->antenna_info.codebook_subset_restrict_present = true; + rrc_cfg->antenna_info.codebook_subset_restrict.set( + ant_info_ded_s::codebook_subset_restrict_c_::types::n2_tx_ant_tm4); + rrc_cfg->antenna_info.codebook_subset_restrict.n2_tx_ant_tm4().from_number(0b111111); } /* Parse power allocation */ - rrc_cfg->pdsch_cfg = LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS; - for (int i = 0; i < LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS; i++) { - if (args->enb.p_a == liblte_rrc_pdsch_config_p_a_num[i]) { - rrc_cfg->pdsch_cfg = (LIBLTE_RRC_PDSCH_CONFIG_P_A_ENUM) i; - } - } - if (rrc_cfg->pdsch_cfg == LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS) { + if (not asn1::number_to_enum(rrc_cfg->pdsch_cfg, args->enb.p_a)) { ERROR("Invalid p_a value (%f) only -6, -4.77, -3, -1.77, 0, 1, 2, 3 values allowed.", args->enb.p_a); return SRSLTE_ERROR; } /* MAC config section */ parser::section mac_cnfg("mac_cnfg"); - parser::section phr_cnfg("phr_cnfg"); mac_cnfg.add_subsection(&phr_cnfg); - mac_cnfg.set_optional(&rrc_cfg->mac_cnfg.phr_cnfg.setup_present); - phr_cnfg.add_field( - new parser::field_enum_str - ("dl_pathloss_change", &rrc_cfg->mac_cnfg.phr_cnfg.dl_pathloss_change, - liblte_rrc_dl_pathloss_change_text, LIBLTE_RRC_DL_PATHLOSS_CHANGE_N_ITEMS) - ); - phr_cnfg.add_field( - new parser::field_enum_num - ("periodic_phr_timer", &rrc_cfg->mac_cnfg.phr_cnfg.periodic_phr_timer, - liblte_rrc_periodic_phr_timer_num, LIBLTE_RRC_PERIODIC_PHR_TIMER_N_ITEMS) - ); - phr_cnfg.add_field( - new parser::field_enum_num - ("prohibit_phr_timer", &rrc_cfg->mac_cnfg.phr_cnfg.prohibit_phr_timer, - liblte_rrc_prohibit_phr_timer_num, LIBLTE_RRC_PROHIBIT_PHR_TIMER_N_ITEMS) - ); - + rrc_cfg->mac_cnfg.phr_cfg.set( + mac_main_cfg_s::phr_cfg_c_::types::release); // default is release if "phr_cnfg" is not found + mac_cnfg.add_field(new phr_cnfg_parser(&rrc_cfg->mac_cnfg.phr_cfg)); + // mac_cnfg.add_field(new phr_cnfg_parser(&rrc_cfg->mac_cnfg.phr_cfg)); + parser::section ulsch_cnfg("ulsch_cnfg"); mac_cnfg.add_subsection(&ulsch_cnfg); - - rrc_cfg->mac_cnfg.ulsch_cnfg.tti_bundling = false; - ulsch_cnfg.add_field( - new parser::field_enum_num - ("max_harq_tx", &rrc_cfg->mac_cnfg.ulsch_cnfg.max_harq_tx, - liblte_rrc_max_harq_tx_num, LIBLTE_RRC_MAX_HARQ_TX_N_ITEMS, - &rrc_cfg->mac_cnfg.ulsch_cnfg.max_harq_tx_present) - ); - ulsch_cnfg.add_field( - new parser::field_enum_num - ("periodic_bsr_timer", &rrc_cfg->mac_cnfg.ulsch_cnfg.periodic_bsr_timer, - liblte_rrc_periodic_bsr_timer_num, LIBLTE_RRC_PERIODIC_BSR_TIMER_N_ITEMS, - &rrc_cfg->mac_cnfg.ulsch_cnfg.periodic_bsr_timer_present) - ); - - ulsch_cnfg.add_field( - new parser::field_enum_num - ("retx_bsr_timer", &rrc_cfg->mac_cnfg.ulsch_cnfg.retx_bsr_timer, - liblte_rrc_retransmission_bsr_timer_num, LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_N_ITEMS) - ); - - mac_cnfg.add_field( - new parser::field_enum_num - ("time_alignment_timer", &rrc_cfg->mac_cnfg.time_alignment_timer, - liblte_rrc_time_alignment_timer_num, LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS) - ); + rrc_cfg->mac_cnfg.ul_sch_cfg.tti_bundling = false; + ulsch_cnfg.add_field(make_asn1_enum_number_parser("max_harq_tx", &rrc_cfg->mac_cnfg.ul_sch_cfg.max_harq_tx, + &rrc_cfg->mac_cnfg.ul_sch_cfg.max_harq_tx_present)); + ulsch_cnfg.add_field(make_asn1_enum_number_parser("periodic_bsr_timer", + &rrc_cfg->mac_cnfg.ul_sch_cfg.periodic_bsr_timer, + &rrc_cfg->mac_cnfg.ul_sch_cfg.periodic_bsr_timer_present)); + ulsch_cnfg.add_field(make_asn1_enum_number_parser("retx_bsr_timer", &rrc_cfg->mac_cnfg.ul_sch_cfg.retx_bsr_timer)); + + mac_cnfg.add_field(make_asn1_enum_number_parser("time_alignment_timer", &rrc_cfg->mac_cnfg.time_align_timer_ded)); /* PHY config section */ parser::section phy_cfg("phy_cnfg"); @@ -1068,35 +778,28 @@ int enb::parse_rr(all_args_t* args, rrc_cfg_t* rrc_cfg) parser::section pusch_cnfg_ded("pusch_cnfg_ded"); phy_cfg.add_subsection(&pusch_cnfg_ded); - pusch_cnfg_ded.add_field(new parser::field ("beta_offset_ack_idx", &rrc_cfg->pusch_cfg.beta_offset_ack_idx)); - pusch_cnfg_ded.add_field(new parser::field ("beta_offset_ri_idx", &rrc_cfg->pusch_cfg.beta_offset_ri_idx)); - pusch_cnfg_ded.add_field(new parser::field ("beta_offset_cqi_idx", &rrc_cfg->pusch_cfg.beta_offset_cqi_idx)); - + pusch_cnfg_ded.add_field(new parser::field("beta_offset_ack_idx", &rrc_cfg->pusch_cfg.beta_offset_ack_idx)); + pusch_cnfg_ded.add_field(new parser::field("beta_offset_ri_idx", &rrc_cfg->pusch_cfg.beta_offset_ri_idx)); + pusch_cnfg_ded.add_field(new parser::field("beta_offset_cqi_idx", &rrc_cfg->pusch_cfg.beta_offset_cqi_idx)); + parser::section sched_request_cnfg("sched_request_cnfg"); phy_cfg.add_subsection(&sched_request_cnfg); - sched_request_cnfg.add_field( - new parser::field_enum_num - ("dsr_trans_max", &rrc_cfg->sr_cfg.dsr_max, - liblte_rrc_dsr_trans_max_num, LIBLTE_RRC_DSR_TRANS_MAX_N_ITEMS) - ); - sched_request_cnfg.add_field(new parser::field ("period", &rrc_cfg->sr_cfg.period)); - sched_request_cnfg.add_field(new parser::field ("nof_prb", &rrc_cfg->sr_cfg.nof_prb)); + sched_request_cnfg.add_field(make_asn1_enum_number_parser("dsr_trans_max", &rrc_cfg->sr_cfg.dsr_max)); + sched_request_cnfg.add_field(new parser::field("period", &rrc_cfg->sr_cfg.period)); + sched_request_cnfg.add_field(new parser::field("nof_prb", &rrc_cfg->sr_cfg.nof_prb)); sched_request_cnfg.add_field(new field_sf_mapping(rrc_cfg->sr_cfg.sf_mapping, &rrc_cfg->sr_cfg.nof_subframes)); - + parser::section cqi_report_cnfg("cqi_report_cnfg"); phy_cfg.add_subsection(&cqi_report_cnfg); - cqi_report_cnfg.add_field( - new parser::field_enum_str - ("mode", &rrc_cfg->cqi_cfg.mode, - rrc_cfg_cqi_mode_text, RRC_CFG_CQI_MODE_N_ITEMS) - ); - cqi_report_cnfg.add_field(new parser::field ("period", &rrc_cfg->cqi_cfg.period)); - cqi_report_cnfg.add_field(new parser::field ("nof_prb", &rrc_cfg->cqi_cfg.nof_prb)); - cqi_report_cnfg.add_field(new parser::field ("simultaneousAckCQI", &rrc_cfg->cqi_cfg.simultaneousAckCQI)); + cqi_report_cnfg.add_field(new parser::field_enum_str( + "mode", &rrc_cfg->cqi_cfg.mode, rrc_cfg_cqi_mode_text, RRC_CFG_CQI_MODE_N_ITEMS)); + cqi_report_cnfg.add_field(new parser::field("period", &rrc_cfg->cqi_cfg.period)); + cqi_report_cnfg.add_field(new parser::field("nof_prb", &rrc_cfg->cqi_cfg.nof_prb)); + cqi_report_cnfg.add_field(new parser::field("simultaneousAckCQI", &rrc_cfg->cqi_cfg.simultaneousAckCQI)); cqi_report_cnfg.add_field(new field_sf_mapping(rrc_cfg->cqi_cfg.sf_mapping, &rrc_cfg->cqi_cfg.nof_subframes)); - + // Run parser with two sections parser p(args->enb_files.rr_config); p.add_section(&mac_cnfg); @@ -1104,214 +807,204 @@ int enb::parse_rr(all_args_t* args, rrc_cfg_t* rrc_cfg) return p.parse(); } -int field_sf_mapping::parse(libconfig::Setting &root) +int field_sf_mapping::parse(libconfig::Setting& root) { *nof_subframes = root["subframe"].getLength(); - for (uint32_t i=0;i<*nof_subframes;i++) { + for (uint32_t i = 0; i < *nof_subframes; i++) { sf_mapping[i] = root["subframe"][i]; } - return 0; + return 0; } +int phr_cnfg_parser::parse(libconfig::Setting& root) +{ + if (not root.exists("phr_cnfg")) { + phr_cfg->set(mac_main_cfg_s::phr_cfg_c_::types::release); + return 0; + } + phr_cfg->set(mac_main_cfg_s::phr_cfg_c_::types::setup); + mac_main_cfg_s::phr_cfg_c_::setup_s_& s = phr_cfg->setup(); + if (not parse_enum_by_str(s.dl_pathloss_change, "dl_pathloss_change", root["phr_cnfg"])) { + return -1; + } + if (not parse_enum_by_number(s.periodic_phr_timer, "periodic_phr_timer", root["phr_cnfg"])) { + return -1; + } + if (not parse_enum_by_number(s.prohibit_phr_timer, "prohibit_phr_timer", root["phr_cnfg"])) { + return -1; + } + return 0; +} - - - - -int enb::parse_drb(all_args_t* args, rrc_cfg_t* rrc_cfg) +int enb::parse_drb(all_args_t* args, rrc_cfg_t* rrc_cfg) { parser::section qci("qci_config"); qci.add_field(new field_qci(rrc_cfg->qci_cfg)); return parser::parse_section(args->enb_files.drb_config, &qci); } -int field_qci::parse(libconfig::Setting &root) +int field_qci::parse(libconfig::Setting& root) { - uint32_t nof_qci = root.getLength(); - - bzero(cfg, sizeof(rrc_cfg_qci_t)*MAX_NOF_QCI); - - for (uint32_t i=0;iconfigured = false; + } + + for (uint32_t i = 0; i < nof_qci; i++) { + libconfig::Setting& q = root[i]; + + uint32_t qci = q["qci"]; + + // Parse PDCP section if (!q.exists("pdcp_config")) { fprintf(stderr, "Error section pdcp_config not found for qci=%d\n", qci); - return -1; - } - parser::field_enum_num discard_timer - ("discard_timer", &cfg[qci].pdcp_cfg.discard_timer, - liblte_rrc_discard_timer_num, LIBLTE_RRC_DISCARD_TIMER_N_ITEMS); - if (discard_timer.parse(q["pdcp_config"])) { - cfg[qci].pdcp_cfg.discard_timer_present = false; - } else { - cfg[qci].pdcp_cfg.discard_timer_present = true; + return -1; } - parser::field_enum_num pdcp_sn_size - ("pdcp_sn_size", &cfg[qci].pdcp_cfg.rlc_um_pdcp_sn_size, - liblte_rrc_pdcp_sn_size_num, LIBLTE_RRC_PDCP_SN_SIZE_N_ITEMS); - - if (pdcp_sn_size.parse(q["pdcp_config"])) { - cfg[qci].pdcp_cfg.rlc_um_pdcp_sn_size_present = false; - } else { - cfg[qci].pdcp_cfg.rlc_um_pdcp_sn_size_present = true; - } - - if (q["pdcp_config"].lookupValue("status_report_required", cfg[qci].pdcp_cfg.rlc_am_status_report_required)) { - cfg[qci].pdcp_cfg.rlc_am_status_report_required_present = true; + field_asn1_enum_number discard_timer( + "discard_timer", &cfg[qci].pdcp_cfg.discard_timer, &cfg[qci].pdcp_cfg.discard_timer_present); + discard_timer.parse(q["pdcp_config"]); + + field_asn1_enum_number pdcp_sn_size( + "pdcp_sn_size", &cfg[qci].pdcp_cfg.rlc_um.pdcp_sn_size, &cfg[qci].pdcp_cfg.rlc_um_present); + pdcp_sn_size.parse(q["pdcp_config"]); + + if (q["pdcp_config"].lookupValue("status_report_required", cfg[qci].pdcp_cfg.rlc_am.status_report_required)) { + cfg[qci].pdcp_cfg.rlc_am_present = true; } else { - cfg[qci].pdcp_cfg.rlc_am_status_report_required_present = false; + cfg[qci].pdcp_cfg.rlc_am_present = false; } + cfg[qci].pdcp_cfg.hdr_compress.set(pdcp_cfg_s::hdr_compress_c_::types::not_used); - // Parse RLC section + // Parse RLC section + rlc_cfg_c* rlc_cfg = &cfg[qci].rlc_cfg; if (q["rlc_config"].exists("ul_am")) { - cfg[qci].rlc_cfg.rlc_mode = LIBLTE_RRC_RLC_MODE_AM; + rlc_cfg->set(rlc_cfg_c::types::am); } else if (q["rlc_config"].exists("ul_um") && q["rlc_config"].exists("dl_um")) { - cfg[qci].rlc_cfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_BI; + rlc_cfg->set(rlc_cfg_c::types::um_bi_dir); } else if (q["rlc_config"].exists("ul_um") && !q["rlc_config"].exists("dl_um")) { - cfg[qci].rlc_cfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_UNI_UL; + rlc_cfg->set(rlc_cfg_c::types::um_uni_dir_ul); } else if (!q["rlc_config"].exists("ul_um") && q["rlc_config"].exists("dl_um")) { - cfg[qci].rlc_cfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_UNI_DL; + rlc_cfg->set(rlc_cfg_c::types::um_uni_dir_dl); } else { fprintf(stderr, "Invalid combination of UL/DL UM/AM for qci=%d\n", qci); - return -1; + return -1; } - - // Parse RLC-UM section + + // Parse RLC-UM section if (q["rlc_config"].exists("ul_um")) { - - LIBLTE_RRC_UL_UM_RLC_STRUCT *rlc_cfg = &cfg[qci].rlc_cfg.ul_um_bi_rlc; - if (cfg[qci].rlc_cfg.rlc_mode == LIBLTE_RRC_RLC_MODE_UM_UNI_UL) { - rlc_cfg = &cfg[qci].rlc_cfg.ul_um_bi_rlc; + + ul_um_rlc_s* um_rlc; + if (rlc_cfg->type() == rlc_cfg_c::types::um_uni_dir_ul) { + um_rlc = &rlc_cfg->um_uni_dir_ul().ul_um_rlc; + } else { + um_rlc = &rlc_cfg->um_bi_dir().ul_um_rlc; } - - parser::field_enum_num sn_field_len - ("sn_field_length", &rlc_cfg->sn_field_len, - liblte_rrc_sn_field_length_num, LIBLTE_RRC_SN_FIELD_LENGTH_N_ITEMS); + + field_asn1_enum_number sn_field_len("sn_field_length", &um_rlc->sn_field_len); if (sn_field_len.parse(q["rlc_config"]["ul_um"])) { fprintf(stderr, "Error can't find sn_field_length in section ul_um\n"); } } - + if (q["rlc_config"].exists("dl_um")) { - - LIBLTE_RRC_DL_UM_RLC_STRUCT *rlc_cfg = &cfg[qci].rlc_cfg.dl_um_bi_rlc; - if (cfg[qci].rlc_cfg.rlc_mode == LIBLTE_RRC_RLC_MODE_UM_UNI_DL) { - rlc_cfg = &cfg[qci].rlc_cfg.dl_um_bi_rlc; + + dl_um_rlc_s* um_rlc; + if (rlc_cfg->type() == rlc_cfg_c::types::um_uni_dir_dl) { + um_rlc = &rlc_cfg->um_uni_dir_dl().dl_um_rlc; + } else { + um_rlc = &rlc_cfg->um_bi_dir().dl_um_rlc; } - - parser::field_enum_num sn_field_len - ("sn_field_length", &rlc_cfg->sn_field_len, - liblte_rrc_sn_field_length_num, LIBLTE_RRC_SN_FIELD_LENGTH_N_ITEMS); + + field_asn1_enum_number sn_field_len("sn_field_length", &um_rlc->sn_field_len); if (sn_field_len.parse(q["rlc_config"]["dl_um"])) { fprintf(stderr, "Error can't find sn_field_length in section dl_um\n"); } - - parser::field_enum_num t_reordering - ("t_reordering", &rlc_cfg->t_reordering, - liblte_rrc_t_reordering_num, LIBLTE_RRC_T_REORDERING_N_ITEMS); + + field_asn1_enum_number t_reordering("t_reordering", &um_rlc->t_reordering); if (t_reordering.parse(q["rlc_config"]["dl_um"])) { fprintf(stderr, "Error can't find t_reordering in section dl_um\n"); } - } - - // Parse RLC-AM section + } + + // Parse RLC-AM section if (q["rlc_config"].exists("ul_am")) { - LIBLTE_RRC_UL_AM_RLC_STRUCT *rlc_cfg = &cfg[qci].rlc_cfg.ul_am_rlc; - - parser::field_enum_num t_poll_retx - ("t_poll_retx", &rlc_cfg->t_poll_retx, - liblte_rrc_t_poll_retransmit_num, LIBLTE_RRC_T_POLL_RETRANSMIT_N_ITEMS); + ul_am_rlc_s* am_rlc = &rlc_cfg->am().ul_am_rlc; + + field_asn1_enum_number t_poll_retx("t_poll_retx", &am_rlc->t_poll_retx); if (t_poll_retx.parse(q["rlc_config"]["ul_am"])) { fprintf(stderr, "Error can't find t_poll_retx in section ul_am\n"); } - - parser::field_enum_num poll_pdu - ("poll_pdu", &rlc_cfg->poll_pdu, - liblte_rrc_poll_pdu_num, LIBLTE_RRC_POLL_PDU_N_ITEMS); + + field_asn1_enum_number poll_pdu("poll_pdu", &am_rlc->poll_pdu); if (poll_pdu.parse(q["rlc_config"]["ul_am"])) { fprintf(stderr, "Error can't find poll_pdu in section ul_am\n"); } - parser::field_enum_num poll_byte - ("poll_byte", &rlc_cfg->poll_byte, - liblte_rrc_poll_byte_num, LIBLTE_RRC_POLL_BYTE_N_ITEMS); + field_asn1_enum_number poll_byte("poll_byte", &am_rlc->poll_byte); if (poll_byte.parse(q["rlc_config"]["ul_am"])) { fprintf(stderr, "Error can't find poll_byte in section ul_am\n"); } - parser::field_enum_num max_retx_thresh - ("max_retx_thresh", &rlc_cfg->max_retx_thresh, - liblte_rrc_max_retx_threshold_num, LIBLTE_RRC_MAX_RETX_THRESHOLD_N_ITEMS); + field_asn1_enum_number max_retx_thresh("max_retx_thresh", + &am_rlc->max_retx_thres); if (max_retx_thresh.parse(q["rlc_config"]["ul_am"])) { fprintf(stderr, "Error can't find max_retx_thresh in section ul_am\n"); } } - - if (q["rlc_config"].exists("dl_am")) { - LIBLTE_RRC_DL_AM_RLC_STRUCT *rlc_cfg = &cfg[qci].rlc_cfg.dl_am_rlc; - - parser::field_enum_num t_reordering - ("t_reordering", &rlc_cfg->t_reordering, - liblte_rrc_t_reordering_num, LIBLTE_RRC_T_REORDERING_N_ITEMS); + + if (q["rlc_config"].exists("dl_am")) { + dl_am_rlc_s* am_rlc = &rlc_cfg->am().dl_am_rlc; + + field_asn1_enum_number t_reordering("t_reordering", &am_rlc->t_reordering); if (t_reordering.parse(q["rlc_config"]["dl_am"])) { fprintf(stderr, "Error can't find t_reordering in section dl_am\n"); } - - parser::field_enum_num t_status_prohibit - ("t_status_prohibit", &rlc_cfg->t_status_prohibit, - liblte_rrc_t_status_prohibit_num, LIBLTE_RRC_T_STATUS_PROHIBIT_N_ITEMS); + + field_asn1_enum_number t_status_prohibit("t_status_prohibit", &am_rlc->t_status_prohibit); if (t_status_prohibit.parse(q["rlc_config"]["dl_am"])) { fprintf(stderr, "Error can't find t_status_prohibit in section dl_am\n"); } - } - + } - // Parse logical channel configuration section + // Parse logical channel configuration section if (!q.exists("logical_channel_config")) { fprintf(stderr, "Error section logical_channel_config not found for qci=%d\n", qci); - return -1; + return -1; } - LIBLTE_RRC_UL_SPECIFIC_PARAMETERS_STRUCT *lc_cfg = &cfg[qci].lc_cfg; - parser::field priority ("priority", &lc_cfg->priority); + lc_ch_cfg_s::ul_specific_params_s_* lc_cfg = &cfg[qci].lc_cfg; + + parser::field priority("priority", &lc_cfg->prio); if (priority.parse(q["logical_channel_config"])) { fprintf(stderr, "Error can't find logical_channel_config in section priority\n"); } - - parser::field_enum_num prioritized_bit_rate - ("prioritized_bit_rate", &lc_cfg->prioritized_bit_rate, - liblte_rrc_prioritized_bit_rate_num, LIBLTE_RRC_PRIORITIZED_BIT_RATE_N_ITEMS); - if (prioritized_bit_rate.parse(q["logical_channel_config"])) { + + field_asn1_enum_number prioritised_bit_rate( + "prioritized_bit_rate", &lc_cfg->prioritised_bit_rate); + if (prioritised_bit_rate.parse(q["logical_channel_config"])) { fprintf(stderr, "Error can't find prioritized_bit_rate in section logical_channel_config\n"); } - parser::field_enum_num bucket_size_duration - ("bucket_size_duration", &lc_cfg->bucket_size_duration, - liblte_rrc_bucket_size_duration_num, LIBLTE_RRC_BUCKET_SIZE_DURATION_N_ITEMS); + field_asn1_enum_number bucket_size_duration( + "bucket_size_duration", &lc_cfg->bucket_size_dur); if (bucket_size_duration.parse(q["logical_channel_config"])) { fprintf(stderr, "Error can't find bucket_size_duration in section logical_channel_config\n"); } - parser::field log_chan_group ("log_chan_group", &lc_cfg->log_chan_group); + parser::field log_chan_group("log_chan_group", &lc_cfg->lc_ch_group); if (log_chan_group.parse(q["logical_channel_config"])) { - lc_cfg->log_chan_group_present = false; + lc_cfg->lc_ch_group_present = false; } else { - lc_cfg->log_chan_group_present = true; + lc_cfg->lc_ch_group_present = true; } - - - - cfg[qci].configured = true; + cfg[qci].configured = true; } - - return 0; -} + return 0; } + +} // namespace srsenb diff --git a/srsenb/src/enb_cfg_parser.h b/srsenb/src/enb_cfg_parser.h index 912c9bf19..ba6d0d05d 100644 --- a/srsenb/src/enb_cfg_parser.h +++ b/srsenb/src/enb_cfg_parser.h @@ -36,7 +36,7 @@ #include "srsenb/hdr/parser.h" #include "srsenb/hdr/upper/rrc.h" -#include "srslte/asn1/liblte_rrc.h" +#include "srslte/asn1/asn1_utils.h" namespace srsenb { @@ -45,43 +45,43 @@ using namespace libconfig; class field_sched_info : public parser::field_itf { public: - field_sched_info(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *data_) { data = data_; } + field_sched_info(asn1::rrc::sib_type1_s* data_) { data = data_; } ~field_sched_info() {} int parse(Setting &root); const char* get_name() { return "sched_info"; } -private: - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *data; +private: + asn1::rrc::sib_type1_s* data; }; class field_intra_neigh_cell_list : public parser::field_itf { public: - field_intra_neigh_cell_list(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data_) { data = data_; } + field_intra_neigh_cell_list(asn1::rrc::sib_type4_s* data_) { data = data_; } ~field_intra_neigh_cell_list(){} - int parse(Setting &root); + int parse(Setting& root); const char* get_name() { return "intra_neigh_cell_list"; } -private: - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data; +private: + asn1::rrc::sib_type4_s* data; }; class field_intra_black_cell_list : public parser::field_itf { public: - field_intra_black_cell_list(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data_) { data = data_; } + field_intra_black_cell_list(asn1::rrc::sib_type4_s* data_) { data = data_; } ~field_intra_black_cell_list(){} int parse(Setting &root); const char* get_name() { return "intra_black_cell_list"; } -private: - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data; +private: + asn1::rrc::sib_type4_s* data; }; class field_sf_mapping : public parser::field_itf @@ -113,7 +113,432 @@ private: rrc_cfg_qci_t *cfg; }; +// ASN1 parsers + +class field_asn1 : public parser::field_itf +{ +public: + field_asn1(const char* name_, bool* enabled_value_ = NULL) + { + name = name_; + enabled_value = enabled_value_; + } + + const char* get_name() { return name; } + + int parse(Setting& root) + { + if (root.exists(name)) { + + if (enabled_value) { + *enabled_value = true; + } + return parse_value(root); + } else { + if (enabled_value) { + *enabled_value = false; + return 0; + } else { + return -1; + } + } + } + + virtual int parse_value(Setting& root) = 0; + +protected: + const char* name; + bool* enabled_value; +}; + +template +class field_asn1_seqof_size : public field_asn1 +{ + ListType* store_ptr; +public: + field_asn1_seqof_size(const char* name_, ListType* store_ptr_, bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_) + { + } + + int parse_value(Setting& root) + { + uint32_t size_val; + if (root.lookupValue(name, size_val)) { + store_ptr->resize(size_val); + return 0; + } + return -1; + } +}; + +template +field_asn1_seqof_size* make_asn1_seqof_size_parser(const char* name, ListType* store_ptr, + bool* enabled = NULL) +{ + return new field_asn1_seqof_size(name, store_ptr, enabled); +} + +template +class field_asn1_choice_type_number : public field_asn1 +{ + ChoiceType* store_ptr; + +public: + field_asn1_choice_type_number(const char* name_, ChoiceType* store_ptr_, bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_) + { + } + + int parse_value(Setting& root) + { + NumberType val; + if (root.lookupValue(name, val)) { + typename ChoiceType::types type; + bool found = asn1::number_to_enum(type, val); + if (not found) { + fprintf(stderr, "Invalid option: %s for field \"%s\"\n", val.c_str(), name); + fprintf(stderr, "Valid options: %d", ChoiceType::types(0).to_number()); + for (uint32_t i = 1; i < ChoiceType::types::nof_types; i++) { + fprintf(stderr, ", %s", ChoiceType::types(i).to_number()); + } + fprintf(stderr, "\n"); + return -1; + } + store_ptr->set(type); + return 0; + } + return -1; + } +}; + +template +bool parse_enum_by_number(EnumType& enum_val, const char* name, Setting& root) +{ + typename EnumType::number_type val; + if (parser::lookupValue(root, name, &val)) { + bool found = asn1::number_to_enum(enum_val, val); + if (not found) { + std::ostringstream ss; + ss << val; + fprintf(stderr, "Invalid option: %s for field \"%s\"\n", ss.str().c_str(), name); + ss.str(""); + ss << EnumType((typename EnumType::options)0).to_number(); + fprintf(stderr, "Valid options: %s", ss.str().c_str()); + for (uint32_t i = 1; i < EnumType::nof_types; i++) { + ss.str(""); + ss << EnumType((typename EnumType::options)i).to_number(); + fprintf(stderr, ", %s", ss.str().c_str()); + } + fprintf(stderr, "\n"); + return false; + } + return true; + } else { + std::string str_val; + if (parser::lookupValue(root, name, &str_val)) { + fprintf(stderr, "Expected a number for field %s but received a string %s\n", name, str_val.c_str()); + } + } + return false; +} + +template +bool parse_enum_by_number_str(EnumType& enum_val, const char* name, Setting& root) +{ + std::string val; + if (parser::lookupValue(root, name, &val)) { + bool found = asn1::number_string_to_enum(enum_val, val); + if (not found) { + fprintf(stderr, "PARSER ERROR: Invalid option: \"%s\" for field \"%s\"\n", val.c_str(), name); + fprintf(stderr, "Valid options: \"%s\"", EnumType((typename EnumType::options)0).to_number_string().c_str()); + for (uint32_t i = 1; i < EnumType::nof_types; i++) { + fprintf(stderr, ", \"%s\"", EnumType((typename EnumType::options)i).to_number_string().c_str()); + } + fprintf(stderr, "\n"); + return false; + } + return true; + } + return false; +} + +template +bool nowhitespace_string_to_enum(EnumType& e, const std::string& s) +{ + std::string s_nows = s; + std::transform(s_nows.begin(), s_nows.end(), s_nows.begin(), ::tolower); + s_nows.erase(std::remove(s_nows.begin(), s_nows.end(), ' '), s_nows.end()); + s_nows.erase(std::remove(s_nows.begin(), s_nows.end(), '-'), s_nows.end()); + for (uint32_t i = 0; i < EnumType::nof_types; ++i) { + e = (typename EnumType::options)i; + std::string s_nows2 = e.to_string(); + std::transform(s_nows2.begin(), s_nows2.end(), s_nows2.begin(), ::tolower); + s_nows2.erase(std::remove(s_nows2.begin(), s_nows2.end(), ' '), s_nows2.end()); + s_nows2.erase(std::remove(s_nows2.begin(), s_nows2.end(), '-'), s_nows2.end()); + if (s_nows2 == s_nows) { + return true; + } + } + return false; +} + +template +bool parse_enum_by_str(EnumType& enum_val, const char* name, Setting& root) +{ + std::string val; + if (root.lookupValue(name, val)) { + bool found = nowhitespace_string_to_enum(enum_val, val); + if (not found) { + fprintf(stderr, "PARSER ERROR: Invalid option: \"%s\" for field \"%s\"\n", val.c_str(), name); + fprintf(stderr, "Valid options: \"%s\"", EnumType((typename EnumType::options)0).to_string().c_str()); + for (uint32_t i = 1; i < EnumType::nof_types; i++) { + fprintf(stderr, ", \"%s\"", EnumType((typename EnumType::options)i).to_string().c_str()); + } + fprintf(stderr, "\n"); + return false; + } + return true; + } + return false; +} + +template +class field_asn1_enum_number : public field_asn1 +{ + EnumType* store_ptr; + +public: + field_asn1_enum_number(const char* name_, EnumType* store_ptr_, bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_) + { + } + + int parse_value(Setting& root) + { + bool found = parse_enum_by_number(*store_ptr, name, root); + return found ? 0 : -1; + } +}; + +template +field_asn1_enum_number* make_asn1_enum_number_parser(const char* name, EnumType* store_ptr, + bool* enabled = NULL) +{ + return new field_asn1_enum_number(name, store_ptr, enabled); +} + +template +class field_asn1_enum_str : public field_asn1 +{ + EnumType* store_ptr; + +public: + field_asn1_enum_str(const char* name_, EnumType* store_ptr_, bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_) + { + } + + int parse_value(Setting& root) + { + bool found = parse_enum_by_str(*store_ptr, name, root); + return found ? 0 : -1; + } +}; + +template +field_asn1_enum_str* make_asn1_enum_str_parser(const char* name, EnumType* store_ptr, bool* enabled = NULL) +{ + return new field_asn1_enum_str(name, store_ptr, enabled); +} + +template +class field_asn1_enum_number_str : public field_asn1 +{ + EnumType* store_ptr; + +public: + field_asn1_enum_number_str(const char* name_, EnumType* store_ptr_, bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_) + { + } + + int parse_value(Setting& root) + { + bool found = parse_enum_by_number_str(*store_ptr, name, root); + return found ? 0 : -1; + } +}; + +template +field_asn1_enum_number_str* make_asn1_enum_number_str_parser(const char* name, EnumType* store_ptr, + bool* enabled = NULL) +{ + return new field_asn1_enum_number_str(name, store_ptr, enabled); +} + +template +class field_asn1_choice_str : public field_asn1 +{ +public: + typedef bool (*func_ptr)(ChoiceType*, const char*, Setting&); + field_asn1_choice_str(const char* name_, const char* choicetypename_, func_ptr f_, ChoiceType* store_ptr_, + bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_), + choicetypename(choicetypename_), + f(f_) + { + } + + int parse_value(Setting& root) + { + typename ChoiceType::types type; + bool found = parse_enum_by_str(type, choicetypename, root); + if (not found) { + return -1; + } + store_ptr->set(type); + if (f(store_ptr, name, root)) { + return 0; + } + return -1; + } + +private: + ChoiceType* store_ptr; + const char* choicetypename; + func_ptr f; +}; + +template +field_asn1_choice_str* make_asn1_choice_str_parser(const char* name, const char* choicetypename, + ChoiceType* store_ptr, FuncOper f, bool* enabled = NULL) +{ + return new field_asn1_choice_str(name, choicetypename, f, store_ptr, enabled); +} + +template +class field_asn1_choice_number : public field_asn1 +{ +public: + typedef bool (*func_ptr)(ChoiceType*, const char*, Setting&); + field_asn1_choice_number(const char* name_, const char* choicetypename_, func_ptr f_, ChoiceType* store_ptr_, + bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_), + choicetypename(choicetypename_), + f(f_) + { + } + + int parse_value(Setting& root) + { + typename ChoiceType::types type; + bool found = parse_enum_by_number(type, choicetypename, root); + if (not found) { + return -1; + } + store_ptr->set(type); + if (f(store_ptr, name, root)) { + return 0; + } + return -1; + } + +private: + ChoiceType* store_ptr; + const char* choicetypename; + func_ptr f; +}; + +template +class field_asn1_bitstring_number : public field_asn1 +{ + BitString* store_ptr; + +public: + field_asn1_bitstring_number(const char* name_, BitString* store_ptr_, bool* enabled_value_ = NULL) : + field_asn1(name_, enabled_value_), + store_ptr(store_ptr_) + { + } + + int parse_value(Setting& root) + { + NumType val; + if (parser::lookupValue(root, name, &val)) { + store_ptr->from_number(val); + return true; + } else { + std::string str_val; + if (parser::lookupValue(root, name, &str_val)) { + fprintf(stderr, "PARSER ERROR: Expected number for field %s but got the string \"%s\"\n", name, + str_val.c_str()); + } + } + return false; + } +}; + +template +field_asn1_bitstring_number* make_asn1_bitstring_number_parser(const char* name, + BitString* store_ptr) +{ + return new field_asn1_bitstring_number(name, store_ptr); +} + +class phr_cnfg_parser : public parser::field_itf +{ +public: + phr_cnfg_parser(asn1::rrc::mac_main_cfg_s::phr_cfg_c_* phr_cfg_) { phr_cfg = phr_cfg_; } + ~phr_cnfg_parser() {} + int parse(Setting& root); + const char* get_name() { return "phr_cnfg"; } + +private: + asn1::rrc::mac_main_cfg_s::phr_cfg_c_* phr_cfg; +}; + +class mbsfn_sf_cfg_list_parser : public parser::field_itf +{ +public: + mbsfn_sf_cfg_list_parser(asn1::rrc::mbsfn_sf_cfg_list_l* mbsfn_list_, bool* enabled_) : + mbsfn_list(mbsfn_list_), + enabled(enabled_) + { + } + ~mbsfn_sf_cfg_list_parser() {} + int parse(Setting& root); + const char* get_name() { return "mbsfnSubframeConfigList"; } + +private: + asn1::rrc::mbsfn_sf_cfg_list_l* mbsfn_list; + bool* enabled; +}; + +class mbsfn_area_info_list_parser : public parser::field_itf +{ +public: + mbsfn_area_info_list_parser(asn1::rrc::mbsfn_area_info_list_r9_l* mbsfn_list_, bool* enabled_) : + mbsfn_list(mbsfn_list_), + enabled(enabled_) + { + } + ~mbsfn_area_info_list_parser() {} + int parse(Setting& root); + const char* get_name() { return "mbsfn_area_info_list"; } + +private: + asn1::rrc::mbsfn_area_info_list_r9_l* mbsfn_list; + bool* enabled; +}; } #endif diff --git a/srsenb/src/mac/mac.cc b/srsenb/src/mac/mac.cc index 3673ce1b0..48e02620b 100644 --- a/srsenb/src/mac/mac.cc +++ b/srsenb/src/mac/mac.cc @@ -39,6 +39,7 @@ #include "srsenb/hdr/mac/mac.h" //#define WRITE_SIB_PCAP +using namespace asn1::rrc; namespace srsenb { @@ -365,7 +366,8 @@ int mac::crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc) return ret; } -int mac::set_dl_ant_info(uint16_t rnti, LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *dl_ant_info) { +int mac::set_dl_ant_info(uint16_t rnti, phys_cfg_ded_s::ant_info_c_* dl_ant_info) +{ log_h->step(tti); int ret = -1; @@ -654,7 +656,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res) void mac::build_mch_sched(uint32_t tbs) { - int sfs_per_sched_period = mcch.pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9; + int sfs_per_sched_period = mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].pmch_cfg_r9.sf_alloc_end_r9; int bytes_per_sf = tbs/8 - 6;// leave 6 bytes for header int total_space_avail_bytes = sfs_per_sched_period*bytes_per_sf; @@ -691,8 +693,8 @@ int mac::get_mch_sched(bool is_mcch, dl_sched_t *dl_sched_res) srslte_ra_mcs_t mcs; srslte_ra_mcs_t mcs_data; - mcs.idx = this->sib13.mbsfn_area_info_list_r9[0].signalling_mcs_r9; - mcs_data.idx = this->mcch.pmch_infolist_r9[0].pmch_config_r9.datamcs_r9; + mcs.idx = this->sib13.mbsfn_area_info_list_r9[0].mcch_cfg_r9.sig_mcs_r9; + mcs_data.idx = this->mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].pmch_cfg_r9.data_mcs_r9; srslte_dl_fill_ra_mcs(&mcs, this->cell_config.cell.nof_prb); srslte_dl_fill_ra_mcs(&mcs_data, this->cell_config.cell.nof_prb); if(is_mcch){ @@ -961,29 +963,22 @@ bool mac::process_pdus() return ret; } - -void mac::write_mcch(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13, LIBLTE_RRC_MCCH_MSG_STRUCT *mcch) +void mac::write_mcch(sib_type2_s* sib2, sib_type13_r9_s* sib13, mcch_msg_s* mcch) { - bzero(&mcch_payload_buffer[0],sizeof(uint8_t)*3000); - - - LIBLTE_BIT_MSG_STRUCT bitbuffer; - liblte_rrc_pack_mcch_msg(mcch, &bitbuffer); - memcpy(&this->mcch ,mcch, sizeof(LIBLTE_RRC_MCCH_MSG_STRUCT)); - mch.num_mtch_sched = this->mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9_size; - for(uint32_t i = 0; i < mch.num_mtch_sched; i++){ - mch.mtch_sched[i].lcid = this->mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[i].logicalchannelid_r9; + this->mcch = *mcch; + mch.num_mtch_sched = this->mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].mbms_session_info_list_r9.size(); + for (uint32_t i = 0; i < mch.num_mtch_sched; ++i) { + mch.mtch_sched[i].lcid = + this->mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].mbms_session_info_list_r9[i].lc_ch_id_r9; } + this->sib2 = *sib2; + this->sib13 = *sib13; - memcpy(&this->sib2,sib2, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT)); - memcpy(&this->sib2,sib13, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT)); // TODO: consolidate relevant parts into 1 struct - current_mcch_length = floor(bitbuffer.N_bits/8); - if(bitbuffer.N_bits%8 != 0) { - current_mcch_length++; - } - int rlc_header_len = 1; + const int rlc_header_len = 1; + asn1::bit_ref bref(&mcch_payload_buffer[rlc_header_len], sizeof(mcch_payload_buffer) - rlc_header_len); + mcch->pack(bref); + current_mcch_length = bref.distance_bytes(&mcch_payload_buffer[1]); current_mcch_length = current_mcch_length + rlc_header_len; - srslte_bit_pack_vector(&bitbuffer.msg[0], &mcch_payload_buffer[rlc_header_len], bitbuffer.N_bits); ue_db[SRSLTE_MRNTI] = new ue; ue_db[SRSLTE_MRNTI]->config(SRSLTE_MRNTI, cell.nof_prb, &scheduler, rrc_h, rlc_h, log_h); diff --git a/srsenb/src/mac/scheduler.cc b/srsenb/src/mac/scheduler.cc index cac75af2d..837546ec8 100644 --- a/srsenb/src/mac/scheduler.cc +++ b/srsenb/src/mac/scheduler.cc @@ -285,7 +285,8 @@ int sched::dl_mac_buffer_state(uint16_t rnti, uint32_t ce_code) return ret; } -int sched::dl_ant_info(uint16_t rnti, LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *dl_ant_info) { +int sched::dl_ant_info(uint16_t rnti, asn1::rrc::phys_cfg_ded_s::ant_info_c_* dl_ant_info) +{ int ret = 0; pthread_rwlock_rdlock(&rwlock); if (ue_db.count(rnti)) { diff --git a/srsenb/src/mac/scheduler_ue.cc b/srsenb/src/mac/scheduler_ue.cc index 9405c0457..131571f75 100644 --- a/srsenb/src/mac/scheduler_ue.cc +++ b/srsenb/src/mac/scheduler_ue.cc @@ -59,7 +59,6 @@ sched_ue::sched_ue() : dl_next_alloc(NULL), ul_next_alloc(NULL), has_pucch(false bzero(&dci_locations, sizeof(dci_locations)); bzero(&dl_harq, sizeof(dl_harq)); bzero(&ul_harq, sizeof(ul_harq)); - bzero(&dl_ant_info, sizeof(dl_ant_info)); pthread_mutex_init(&mutex, NULL); reset(); @@ -425,10 +424,10 @@ void sched_ue::set_dl_cqi(uint32_t tti, uint32_t cqi) pthread_mutex_unlock(&mutex); } -void sched_ue::set_dl_ant_info(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT *d) +void sched_ue::set_dl_ant_info(asn1::rrc::phys_cfg_ded_s::ant_info_c_* d) { pthread_mutex_lock(&mutex); - memcpy(&dl_ant_info, d, sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT)); + dl_ant_info = *d; pthread_mutex_unlock(&mutex); } @@ -500,12 +499,12 @@ int sched_ue::generate_format1(dl_harq_proc *h, uint32_t nof_ctrl_symbols = cfi+(cell.nof_prb<10?1:0); uint32_t nof_re = srslte_ra_dl_grant_nof_re(&grant, cell, sf_idx, nof_ctrl_symbols); if(need_conres_ce and cell.nof_prb<10) { // SRB0 Tx. Use a higher MCS for the PRACH to fit in 6 PRBs - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(4), nof_prb)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_dl_tbs_idx_from_mcs(4), nof_prb) / 8; mcs = 4; } else if (fixed_mcs_dl < 0) { tbs = alloc_tbs_dl(nof_prb, nof_re, req_bytes, &mcs); } else { - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(fixed_mcs_dl), nof_prb)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_dl_tbs_idx_from_mcs(fixed_mcs_dl), nof_prb) / 8; mcs = fixed_mcs_dl; } @@ -622,7 +621,7 @@ int sched_ue::generate_format2a_unlocked(dl_harq_proc *h, if (fixed_mcs_dl < 0) { tbs = alloc_tbs_dl(nof_prb, nof_re, req_bytes, &mcs); } else { - tbs = srslte_ra_tbs_from_idx((uint32_t) srslte_ra_tbs_idx_from_mcs((uint32_t) fixed_mcs_dl), nof_prb) / 8; + tbs = srslte_ra_tbs_from_idx((uint32_t)srslte_ra_dl_tbs_idx_from_mcs((uint32_t)fixed_mcs_dl), nof_prb) / 8; mcs = fixed_mcs_dl; } h->new_tx(tb, tti, mcs, tbs, data->dci_location.ncce); @@ -712,7 +711,7 @@ int sched_ue::generate_format0(ul_harq_proc *h, bool is_newtx = true; if (h->get_rar_mcs(&mcs)) { - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(mcs), allocation.L)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_ul_tbs_idx_from_mcs(mcs), allocation.L) / 8; h->new_tx(tti, mcs, tbs); } else if (h->is_empty(0)) { @@ -723,7 +722,7 @@ int sched_ue::generate_format0(ul_harq_proc *h, if (fixed_mcs_ul < 0) { tbs = alloc_tbs_ul(allocation.L, nof_re, req_bytes, &mcs); } else { - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(fixed_mcs_ul), allocation.L)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_ul_tbs_idx_from_mcs(fixed_mcs_ul), allocation.L) / 8; mcs = fixed_mcs_ul; } @@ -732,7 +731,7 @@ int sched_ue::generate_format0(ul_harq_proc *h, } else { h->new_retx(0, tti, &mcs, NULL); is_newtx = false; - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(mcs), allocation.L)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_ul_tbs_idx_from_mcs(mcs), allocation.L) / 8; } data->rnti = rnti; @@ -936,7 +935,7 @@ uint32_t sched_ue::get_required_prb_dl(uint32_t req_bytes, uint32_t nof_ctrl_sym if(fixed_mcs_dl < 0) { tbs = alloc_tbs_dl(n+1, nof_re, 0, &mcs); } else { - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(fixed_mcs_dl), n+1)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_dl_tbs_idx_from_mcs(fixed_mcs_dl), n + 1) / 8; } if (tbs > 0) { nbytes = tbs; @@ -970,7 +969,7 @@ uint32_t sched_ue::get_required_prb_ul(uint32_t req_bytes) if (fixed_mcs_ul < 0) { tbs = alloc_tbs_ul(n, nof_re, 0, &mcs); } else { - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(fixed_mcs_ul), n)/8; + tbs = srslte_ra_tbs_from_idx(srslte_ra_ul_tbs_idx_from_mcs(fixed_mcs_ul), n) / 8; } if (tbs > 0) { nbytes = tbs; @@ -1059,22 +1058,21 @@ srslte_dci_format_t sched_ue::get_dci_format() { if (phy_config_dedicated_enabled) { /* FIXME: Assumes UE-Specific Search Space (Not common) */ - switch (dl_ant_info.tx_mode) { - case LIBLTE_RRC_TRANSMISSION_MODE_1: - case LIBLTE_RRC_TRANSMISSION_MODE_2: + switch (dl_ant_info.explicit_value().tx_mode) { + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm1: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm2: ret = SRSLTE_DCI_FORMAT1; break; - case LIBLTE_RRC_TRANSMISSION_MODE_3: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm3: ret = SRSLTE_DCI_FORMAT2A; break; - case LIBLTE_RRC_TRANSMISSION_MODE_4: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm4: ret = SRSLTE_DCI_FORMAT2; break; - case LIBLTE_RRC_TRANSMISSION_MODE_5: - case LIBLTE_RRC_TRANSMISSION_MODE_6: - case LIBLTE_RRC_TRANSMISSION_MODE_7: - case LIBLTE_RRC_TRANSMISSION_MODE_8: - case LIBLTE_RRC_TRANSMISSION_MODE_N_ITEMS: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm5: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm6: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm7: + case asn1::rrc::ant_info_ded_s::tx_mode_e_::tm8_v920: default: Warning("Incorrect transmission mode (rnti=%04x)\n", rnti); } @@ -1156,7 +1154,9 @@ uint32_t sched_ue::format1_count_prb(uint32_t bitmask, uint32_t cell_nof_prb) { return nof_prb; } -int sched_ue::cqi_to_tbs(uint32_t cqi, uint32_t nof_prb, uint32_t nof_re, uint32_t max_mcs, uint32_t max_Qm, uint32_t *mcs) { +int sched_ue::cqi_to_tbs(uint32_t cqi, uint32_t nof_prb, uint32_t nof_re, uint32_t max_mcs, uint32_t max_Qm, bool is_ul, + uint32_t* mcs) +{ float max_coderate = srslte_cqi_to_coderate(cqi); int sel_mcs = max_mcs+1; float coderate = 99; @@ -1165,11 +1165,12 @@ int sched_ue::cqi_to_tbs(uint32_t cqi, uint32_t nof_prb, uint32_t nof_re, uint32 int tbs = 0; do { - sel_mcs--; - uint32_t tbs_idx = srslte_ra_tbs_idx_from_mcs(sel_mcs); + sel_mcs--; + uint32_t tbs_idx = (is_ul) ? srslte_ra_ul_tbs_idx_from_mcs(sel_mcs) : srslte_ra_dl_tbs_idx_from_mcs(sel_mcs); tbs = srslte_ra_tbs_from_idx(tbs_idx, nof_prb); coderate = srslte_coderate(tbs, nof_re); - Qm = SRSLTE_MIN(max_Qm, srslte_mod_bits_x_symbol(srslte_ra_mod_from_mcs(sel_mcs))); + srslte_mod_t mod = (is_ul) ? srslte_ra_ul_mod_from_mcs(sel_mcs) : srslte_ra_dl_mod_from_mcs(sel_mcs); + Qm = SRSLTE_MIN(max_Qm, srslte_mod_bits_x_symbol(mod)); eff_coderate = coderate/Qm; } while((sel_mcs > 0 && coderate > max_coderate) || eff_coderate > 0.930); if (mcs) { @@ -1210,12 +1211,13 @@ int sched_ue::alloc_tbs(uint32_t nof_prb, uint32_t max_Qm = is_ul?4:6; // Allow 16-QAM in PUSCH Only // TODO: Compute real spectral efficiency based on PUSCH-UCI configuration - int tbs = cqi_to_tbs(cqi, nof_prb, nof_re, max_mcs, max_Qm, &sel_mcs)/8; + int tbs = cqi_to_tbs(cqi, nof_prb, nof_re, max_mcs, max_Qm, is_ul, &sel_mcs) / 8; /* If less bytes are requested, lower the MCS */ if (tbs > (int) req_bytes && req_bytes > 0) { - uint32_t req_tbs_idx = srslte_ra_tbs_to_table_idx(req_bytes*8, nof_prb); - uint32_t req_mcs = srslte_ra_mcs_from_tbs_idx(req_tbs_idx); + int req_tbs_idx = srslte_ra_tbs_to_table_idx(req_bytes * 8, nof_prb); + int req_mcs = (is_ul) ? srslte_ra_ul_mcs_from_tbs_idx(req_tbs_idx) : srslte_ra_dl_mcs_from_tbs_idx(req_tbs_idx); + if (req_mcs < sel_mcs) { sel_mcs = req_mcs; tbs = srslte_ra_tbs_from_idx(req_tbs_idx, nof_prb)/8; @@ -1224,7 +1226,8 @@ int sched_ue::alloc_tbs(uint32_t nof_prb, // Avoid the unusual case n_prb=1, mcs=6 tbs=328 (used in voip) if (nof_prb == 1 && sel_mcs == 6) { sel_mcs--; - tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(sel_mcs), nof_prb)/8; + uint32_t tbs_idx = (is_ul) ? srslte_ra_ul_tbs_idx_from_mcs(sel_mcs) : srslte_ra_dl_tbs_idx_from_mcs(sel_mcs); + tbs = srslte_ra_tbs_from_idx(tbs_idx, nof_prb) / 8; } if (mcs && tbs >= 0) { diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index 8cb3e1550..0067a38f2 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -62,6 +62,7 @@ void parse_args(all_args_t *args, int argc, char* argv[]) { // Command line only options bpo::options_description general("General options"); + // clang-format off general.add_options() ("help,h", "Produce help message") ("version,v", "Print version information and exit") @@ -86,26 +87,26 @@ void parse_args(all_args_t *args, int argc, char* argv[]) { ("enb.tm", bpo::value(&args->enb.transmission_mode)->default_value(1), "Transmission mode (1-8)") ("enb.p_a", bpo::value(&args->enb.p_a)->default_value(0.0f), "Power allocation rho_a (-6, -4.77, -3, -1.77, 0, 1, 2, 3)") - ("enb_files.sib_config", bpo::value(&args->enb_files.sib_config)->default_value("sib.conf"), "SIB configuration files") - ("enb_files.rr_config", bpo::value(&args->enb_files.rr_config)->default_value("rr.conf"), "RR configuration files") - ("enb_files.drb_config", bpo::value(&args->enb_files.drb_config)->default_value("drb.conf"), "DRB configuration files") + ("enb_files.sib_config", bpo::value(&args->enb_files.sib_config)->default_value("sib.conf"), "SIB configuration files") + ("enb_files.rr_config", bpo::value(&args->enb_files.rr_config)->default_value("rr.conf"), "RR configuration files") + ("enb_files.drb_config", bpo::value(&args->enb_files.drb_config)->default_value("drb.conf"), "DRB configuration files") - ("rf.dl_earfcn", bpo::value(&args->rf.dl_earfcn)->default_value(3400), "Downlink EARFCN") - ("rf.ul_earfcn", bpo::value(&args->rf.ul_earfcn)->default_value(0), "Uplink EARFCN (Default based on Downlink EARFCN)") - ("rf.rx_gain", bpo::value(&args->rf.rx_gain)->default_value(50), "Front-end receiver gain") - ("rf.tx_gain", bpo::value(&args->rf.tx_gain)->default_value(70), "Front-end transmitter gain") - ("rf.dl_freq", bpo::value(&args->rf.dl_freq)->default_value(-1), "Downlink Frequency (if positive overrides EARFCN)") - ("rf.ul_freq", bpo::value(&args->rf.ul_freq)->default_value(-1), "Uplink Frequency (if positive overrides EARFCN)") + ("rf.dl_earfcn", bpo::value(&args->rf.dl_earfcn)->default_value(3400), "Downlink EARFCN") + ("rf.ul_earfcn", bpo::value(&args->rf.ul_earfcn)->default_value(0), "Uplink EARFCN (Default based on Downlink EARFCN)") + ("rf.rx_gain", bpo::value(&args->rf.rx_gain)->default_value(50), "Front-end receiver gain") + ("rf.tx_gain", bpo::value(&args->rf.tx_gain)->default_value(70), "Front-end transmitter gain") + ("rf.dl_freq", bpo::value(&args->rf.dl_freq)->default_value(-1), "Downlink Frequency (if positive overrides EARFCN)") + ("rf.ul_freq", bpo::value(&args->rf.ul_freq)->default_value(-1), "Uplink Frequency (if positive overrides EARFCN)") - ("rf.device_name", bpo::value(&args->rf.device_name)->default_value("auto"), "Front-end device name") - ("rf.device_args", bpo::value(&args->rf.device_args)->default_value("auto"), "Front-end device arguments") - ("rf.time_adv_nsamples", bpo::value(&args->rf.time_adv_nsamples)->default_value("auto"), "Transmission time advance") - ("rf.burst_preamble_us", bpo::value(&args->rf.burst_preamble)->default_value("auto"), "Transmission time advance") + ("rf.device_name", bpo::value(&args->rf.device_name)->default_value("auto"), "Front-end device name") + ("rf.device_args", bpo::value(&args->rf.device_args)->default_value("auto"), "Front-end device arguments") + ("rf.time_adv_nsamples", bpo::value(&args->rf.time_adv_nsamples)->default_value("auto"), "Transmission time advance") + ("rf.burst_preamble_us", bpo::value(&args->rf.burst_preamble)->default_value("auto"), "Transmission time advance") - ("pcap.enable", bpo::value(&args->pcap.enable)->default_value(false), "Enable MAC packet captures for wireshark") - ("pcap.filename", bpo::value(&args->pcap.filename)->default_value("ue.pcap"), "MAC layer capture filename") + ("pcap.enable", bpo::value(&args->pcap.enable)->default_value(false), "Enable MAC packet captures for wireshark") + ("pcap.filename", bpo::value(&args->pcap.filename)->default_value("ue.pcap"), "MAC layer capture filename") - ("gui.enable", bpo::value(&args->gui.enable)->default_value(false), "Enable GUI plots") + ("gui.enable", bpo::value(&args->gui.enable)->default_value(false), "Enable GUI plots") ("log.phy_level", bpo::value(&args->log.phy_level), "PHY log level") ("log.phy_hex_limit", bpo::value(&args->log.phy_hex_limit), "PHY log hex dump limit") @@ -130,97 +131,39 @@ void parse_args(all_args_t *args, int argc, char* argv[]) { ("log.file_max_size", bpo::value(&args->log.file_max_size)->default_value(-1), "Maximum file size (in kilobytes). When passed, multiple files are created. Default -1 (single file)") /* MCS section */ - ("scheduler.pdsch_mcs", - bpo::value(&args->expert.mac.sched.pdsch_mcs)->default_value(-1), - "Optional fixed PDSCH MCS (ignores reported CQIs if specified)") - ("scheduler.pdsch_max_mcs", - bpo::value(&args->expert.mac.sched.pdsch_max_mcs)->default_value(-1), - "Optional PDSCH MCS limit") - ("scheduler.pusch_mcs", - bpo::value(&args->expert.mac.sched.pusch_mcs)->default_value(-1), - "Optional fixed PUSCH MCS (ignores reported CQIs if specified)") - ("scheduler.pusch_max_mcs", - bpo::value(&args->expert.mac.sched.pusch_max_mcs)->default_value(-1), - "Optional PUSCH MCS limit") - ("scheduler.nof_ctrl_symbols", - bpo::value(&args->expert.mac.sched.nof_ctrl_symbols)->default_value(3), - "Number of control symbols") + ("scheduler.pdsch_mcs", bpo::value(&args->expert.mac.sched.pdsch_mcs)->default_value(-1), "Optional fixed PDSCH MCS (ignores reported CQIs if specified)") + ("scheduler.pdsch_max_mcs", bpo::value(&args->expert.mac.sched.pdsch_max_mcs)->default_value(-1), "Optional PDSCH MCS limit") + ("scheduler.pusch_mcs", bpo::value(&args->expert.mac.sched.pusch_mcs)->default_value(-1), "Optional fixed PUSCH MCS (ignores reported CQIs if specified)") + ("scheduler.pusch_max_mcs", bpo::value(&args->expert.mac.sched.pusch_max_mcs)->default_value(-1), "Optional PUSCH MCS limit") + ("scheduler.nof_ctrl_symbols", bpo::value(&args->expert.mac.sched.nof_ctrl_symbols)->default_value(3), "Number of control symbols") /* Expert section */ - ("expert.metrics_period_secs", - bpo::value(&args->expert.metrics_period_secs)->default_value(1.0), - "Periodicity for metrics in seconds") - - ("expert.metrics_csv_enable", - bpo::value(&args->expert.metrics_csv_enable)->default_value(false), - "Write metrics to CSV file") - - ("expert.metrics_csv_filename", - bpo::value(&args->expert.metrics_csv_filename)->default_value("/tmp/enb_metrics.csv"), - "Metrics CSV filename") - - ("expert.pregenerate_signals", - bpo::value(&args->expert.phy.pregenerate_signals)->default_value(false), - "Pregenerate uplink signals after attach. Improves CPU performance.") - - ("expert.pusch_max_its", - bpo::value(&args->expert.phy.pusch_max_its)->default_value(8), - "Maximum number of turbo decoder iterations") - - ("expert.pusch_8bit_decoder", - bpo::value(&args->expert.phy.pusch_8bit_decoder)->default_value(false), - "Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental)") - - ("expert.tx_amplitude", - bpo::value(&args->expert.phy.tx_amplitude)->default_value(0.6), - "Transmit amplitude factor") - - ("expert.nof_phy_threads", - bpo::value(&args->expert.phy.nof_phy_threads)->default_value(2), - "Number of PHY threads") - - ("expert.link_failure_nof_err", - bpo::value(&args->expert.mac.link_failure_nof_err)->default_value(100), - "Number of PUSCH failures after which a radio-link failure is triggered") - - ("expert.max_prach_offset_us", - bpo::value(&args->expert.phy.max_prach_offset_us)->default_value(30), - "Maximum allowed RACH offset (in us)") - - ("expert.equalizer_mode", - bpo::value(&args->expert.phy.equalizer_mode)->default_value("mmse"), - "Equalizer mode") - - ("expert.estimator_fil_w", - bpo::value(&args->expert.phy.estimator_fil_w)->default_value(0.1), - "Chooses the coefficients for the 3-tap channel estimator centered filter.") - - ("expert.rrc_inactivity_timer", - bpo::value(&args->expert.rrc_inactivity_timer)->default_value(60000), - "Inactivity timer in ms") - - ("expert.enable_mbsfn", - bpo::value(&args->expert.enable_mbsfn)->default_value(false), - "Enables MBMS in the eNB") - - ("expert.print_buffer_state", - bpo::value(&args->expert.print_buffer_state)->default_value(false), - "Prints on the console the buffer state every 10 seconds") - - ("expert.m1u_multiaddr", - bpo::value(&args->expert.m1u_multiaddr)->default_value("239.255.0.1"), - "M1-U Multicast address the eNB joins.") - - ("expert.m1u_if_addr", - bpo::value(&args->expert.m1u_if_addr)->default_value("127.0.1.201"), - "IP address of the interface the eNB will listen for M1-U traffic.") + ("expert.metrics_period_secs", bpo::value(&args->expert.metrics_period_secs)->default_value(1.0), "Periodicity for metrics in seconds") + ("expert.metrics_csv_enable", bpo::value(&args->expert.metrics_csv_enable)->default_value(false), "Write metrics to CSV file") + ("expert.metrics_csv_filename", bpo::value(&args->expert.metrics_csv_filename)->default_value("/tmp/enb_metrics.csv"), "Metrics CSV filename") + ("expert.pregenerate_signals", bpo::value(&args->expert.phy.pregenerate_signals)->default_value(false), "Pregenerate uplink signals after attach. Improves CPU performance.") + ("expert.pusch_max_its", bpo::value(&args->expert.phy.pusch_max_its)->default_value(8), "Maximum number of turbo decoder iterations") + ("expert.pusch_8bit_decoder", bpo::value(&args->expert.phy.pusch_8bit_decoder)->default_value(false), "Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental)") + ("expert.tx_amplitude", bpo::value(&args->expert.phy.tx_amplitude)->default_value(0.6), "Transmit amplitude factor") + ("expert.nof_phy_threads", bpo::value(&args->expert.phy.nof_phy_threads)->default_value(2), "Number of PHY threads") + ("expert.link_failure_nof_err", bpo::value(&args->expert.mac.link_failure_nof_err)->default_value(100), "Number of PUSCH failures after which a radio-link failure is triggered") + ("expert.max_prach_offset_us", bpo::value(&args->expert.phy.max_prach_offset_us)->default_value(30), "Maximum allowed RACH offset (in us)") + ("expert.equalizer_mode", bpo::value(&args->expert.phy.equalizer_mode)->default_value("mmse"), "Equalizer mode") + ("expert.estimator_fil_w", bpo::value(&args->expert.phy.estimator_fil_w)->default_value(0.1), "Chooses the coefficients for the 3-tap channel estimator centered filter.") + ("expert.rrc_inactivity_timer", bpo::value(&args->expert.rrc_inactivity_timer)->default_value(60000), "Inactivity timer in ms") + ("expert.enable_mbsfn", bpo::value(&args->expert.enable_mbsfn)->default_value(false), "Enables MBMS in the eNB") + ("expert.print_buffer_state", bpo::value(&args->expert.print_buffer_state)->default_value(false), "Prints on the console the buffer state every 10 seconds") + ("expert.m1u_multiaddr", bpo::value(&args->expert.m1u_multiaddr)->default_value("239.255.0.1"), "M1-U Multicast address the eNB joins.") + ("expert.m1u_if_addr", bpo::value(&args->expert.m1u_if_addr)->default_value("127.0.1.201"), "IP address of the interface the eNB will listen for M1-U traffic.") ; // Positional options - config file location bpo::options_description position("Positional options"); position.add_options() - ("config_file", bpo::value< string >(&config_file), "eNodeB configuration file") + ("config_file", bpo::value< string >(&config_file), "eNodeB configuration file") ; + + // clang-format on bpo::positional_options_description p; p.add("config_file", -1); diff --git a/srsenb/src/phy/phch_common.cc b/srsenb/src/phy/phch_common.cc index 29c0254a3..2323a7ab3 100644 --- a/srsenb/src/phy/phch_common.cc +++ b/srsenb/src/phy/phch_common.cc @@ -24,10 +24,11 @@ * */ -#include "srslte/common/threads.h" +#include "srsenb/hdr/phy/txrx.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/log.h" +#include "srslte/common/threads.h" #include -#include "srsenb/hdr/phy/txrx.h" #include @@ -36,8 +37,8 @@ #define Info(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->debug(fmt, ##__VA_ARGS__) -using namespace std; - +using namespace std; +using namespace asn1::rrc; namespace srsenb { @@ -80,8 +81,8 @@ void phch_common::reset() { bool phch_common::init(srslte_cell_t *cell_, srslte::radio* radio_h_, mac_interface_phy *mac_) { radio = radio_h_; - mac = mac_; - memcpy(&cell, cell_, sizeof(srslte_cell_t)); + mac = mac_; + cell = *cell_; pthread_mutex_init(&user_mutex, NULL); @@ -250,8 +251,8 @@ int phch_common::ue_db_get_last_ul_tbs(uint16_t rnti, uint32_t tti) { void phch_common::configure_mbsfn(phy_interface_rrc::phy_cfg_mbsfn_t *cfg) { - memcpy(&mbsfn, cfg, sizeof(phy_interface_rrc::phy_cfg_mbsfn_t)); - + mbsfn = *cfg; + build_mch_table(); build_mcch_table(); sib13_configured = true; @@ -260,10 +261,15 @@ void phch_common::configure_mbsfn(phy_interface_rrc::phy_cfg_mbsfn_t *cfg) void phch_common::build_mch_table() { - // First reset tables - bzero(&mch_table[0], sizeof(uint8_t)*40); + // First reset tables + ZERO_OBJECT(mcch_table); + // 40 element table represents 4 frames (40 subframes) - generate_mch_table(&mch_table[0], mbsfn.mbsfn_subfr_cnfg.subfr_alloc,(LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE == mbsfn.mbsfn_subfr_cnfg.subfr_alloc_num_frames)?1:4); + if (mbsfn.mbsfn_subfr_cnfg.sf_alloc.type().value == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) { + generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.one_frame().to_number(), 1); + } else { + generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.four_frames().to_number(), 4); + } // Debug std::stringstream ss; ss << "|"; @@ -274,9 +280,9 @@ void phch_common::build_mch_table() void phch_common::build_mcch_table() { - bzero(&mcch_table[0], sizeof(uint8_t)*10); + ZERO_OBJECT(mcch_table); - generate_mcch_table(&mcch_table[0], mbsfn.mbsfn_area_info.sf_alloc_info_r9); + generate_mcch_table(mcch_table, static_cast(mbsfn.mbsfn_area_info.mcch_cfg_r9.sf_alloc_info_r9.to_number())); std::stringstream ss; ss << "|"; @@ -296,16 +302,15 @@ bool phch_common::is_mcch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) sf = phy_tti%10; if(sib13_configured) { - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *subfr_cnfg = &mbsfn.mbsfn_subfr_cnfg; - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *area_info = &mbsfn.mbsfn_area_info; + mbsfn_area_info_r9_s* area_info = &mbsfn.mbsfn_area_info; - offset = area_info->mcch_offset_r9; - period = liblte_rrc_mcch_repetition_period_r9_num[area_info->mcch_repetition_period_r9]; + offset = area_info->mcch_cfg_r9.mcch_offset_r9; + period = area_info->mcch_cfg_r9.mcch_repeat_period_r9.to_number(); if((sfn%period == offset) && mcch_table[sf] > 0) { cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; - cfg->non_mbsfn_region_length = liblte_rrc_non_mbsfn_region_length_num[area_info->non_mbsfn_region_length]; - cfg->mbsfn_mcs = liblte_rrc_mcch_signalling_mcs_r9_num[area_info->signalling_mcs_r9]; + cfg->non_mbsfn_region_length = area_info->non_mbsfn_region_len.to_number(); + cfg->mbsfn_mcs = area_info->mcch_cfg_r9.sig_mcs_r9.to_number(); cfg->mbsfn_encode = true; cfg->is_mcch = true; return true; @@ -336,25 +341,25 @@ bool phch_common::is_mch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) } // Not MCCH, check for MCH - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *subfr_cnfg = &mbsfn.mbsfn_subfr_cnfg; - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *area_info = &mbsfn.mbsfn_area_info; + mbsfn_sf_cfg_s* subfr_cnfg = &mbsfn.mbsfn_subfr_cnfg; + mbsfn_area_info_r9_s* area_info = &mbsfn.mbsfn_area_info; - offset = subfr_cnfg->radio_fr_alloc_offset; - period = liblte_rrc_radio_frame_allocation_period_num[subfr_cnfg->radio_fr_alloc_period]; + offset = subfr_cnfg->radioframe_alloc_offset; + period = subfr_cnfg->radioframe_alloc_period.to_number(); - if (LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE == subfr_cnfg->subfr_alloc_num_frames) { + if (subfr_cnfg->sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) { if ((sfn%period == offset) && (mch_table[sf] > 0)) { if (sib13_configured) { cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; - cfg->non_mbsfn_region_length = liblte_rrc_non_mbsfn_region_length_num[area_info->non_mbsfn_region_length]; + cfg->non_mbsfn_region_length = area_info->non_mbsfn_region_len.to_number(); if (mcch_configured) { // Iterate through PMCH configs to see which one applies in the current frame - LIBLTE_RRC_MCCH_MSG_STRUCT *mcch = &mbsfn.mcch; - uint32_t sf_alloc_idx = sfn%liblte_rrc_mbsfn_common_sf_alloc_period_r9_num[mcch->commonsf_allocperiod_r9]; - for (uint32_t i=0; ipmch_infolist_r9_size; i++) { + mbsfn_area_cfg_r9_s* area_r9 = &mbsfn.mcch.msg.c1().mbsfn_area_cfg_r9(); + uint32_t sf_alloc_idx = sfn % area_r9->common_sf_alloc_period_r9.to_number(); + for (uint32_t i = 0; i < area_r9->pmch_info_list_r9.size(); i++) { //if(sf_alloc_idx < mch_period_stop) { - cfg->mbsfn_mcs = mcch->pmch_infolist_r9[i].pmch_config_r9.datamcs_r9; - cfg->mbsfn_encode = true; + cfg->mbsfn_mcs = area_r9->pmch_info_list_r9[i].pmch_cfg_r9.data_mcs_r9; + cfg->mbsfn_encode = true; //} } @@ -362,14 +367,14 @@ bool phch_common::is_mch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) } return true; } - } else if (LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_FOUR == subfr_cnfg->subfr_alloc_num_frames) { + } else if (subfr_cnfg->sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::four_frames) { uint8_t idx = sfn%period; if ((idx >= offset) && (idx < offset+4)) { if (mch_table[(idx*10)+sf] > 0){ if (sib13_configured) { cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; - cfg->non_mbsfn_region_length = liblte_rrc_non_mbsfn_region_length_num[area_info->non_mbsfn_region_length]; - // TODO: check for MCCH configuration, set MCS and decode + cfg->non_mbsfn_region_length = area_info->non_mbsfn_region_len.to_number(); + // TODO: check for MCCH configuration, set MCS and decode } return true; diff --git a/srsenb/src/phy/phch_worker.cc b/srsenb/src/phy/phch_worker.cc index 103cc6961..4815f841a 100644 --- a/srsenb/src/phy/phch_worker.cc +++ b/srsenb/src/phy/phch_worker.cc @@ -36,7 +36,8 @@ #define Info(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->debug(fmt, ##__VA_ARGS__) -using namespace std; +using namespace std; +using namespace asn1::rrc; // Enable this to log SI //#define LOG_THIS(a) 1 @@ -225,7 +226,6 @@ void phch_worker::set_time(uint32_t tti_, uint32_t tx_worker_cnt_, srslte_timest int phch_worker::add_rnti(uint16_t rnti) { - if (srslte_enb_dl_add_rnti(&enb_dl, rnti)) { return -1; } @@ -254,12 +254,10 @@ void phch_worker::set_conf_dedicated_ack(uint16_t rnti, bool ack){ pthread_mutex_unlock(&mutex); } -void phch_worker::set_config_dedicated(uint16_t rnti, - srslte_refsignal_srs_cfg_t *srs_cfg, - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) +void phch_worker::set_config_dedicated(uint16_t rnti, srslte_refsignal_srs_cfg_t* srs_cfg, phys_cfg_ded_s* dedicated) { - bool pucch_cqi_ack = dedicated->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi; - bool pucch_ri = dedicated->cqi_report_cnfg.report_periodic.ri_cnfg_idx_present; + bool pucch_cqi_ack = dedicated->cqi_report_cfg.cqi_report_periodic.setup().simul_ack_nack_and_cqi; + bool pucch_ri = dedicated->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present; pthread_mutex_lock(&mutex); if (ue_db.count(rnti)) { @@ -267,26 +265,27 @@ void phch_worker::set_config_dedicated(uint16_t rnti, srslte_uci_cfg_t uci_cfg; ZERO_OBJECT(uci_cfg); - if (dedicated->pusch_cnfg_ded_present && dedicated->sched_request_cnfg_present) { - uci_cfg.I_offset_ack = dedicated->pusch_cnfg_ded.beta_offset_ack_idx; - uci_cfg.I_offset_cqi = dedicated->pusch_cnfg_ded.beta_offset_cqi_idx; - uci_cfg.I_offset_ri = dedicated->pusch_cnfg_ded.beta_offset_ri_idx; + if (dedicated->pusch_cfg_ded_present && dedicated->sched_request_cfg_present) { + uci_cfg.I_offset_ack = dedicated->pusch_cfg_ded.beta_offset_ack_idx; + uci_cfg.I_offset_cqi = dedicated->pusch_cfg_ded.beta_offset_cqi_idx; + uci_cfg.I_offset_ri = dedicated->pusch_cfg_ded.beta_offset_ri_idx; srslte_pucch_sched_t pucch_sched; ZERO_OBJECT(pucch_sched); pucch_sched.N_pucch_1 = phy->pucch_cfg.n1_pucch_an; - pucch_sched.n_pucch_2 = dedicated->cqi_report_cnfg.report_periodic.pucch_resource_idx; - pucch_sched.n_pucch_sr = dedicated->sched_request_cnfg.sr_pucch_resource_idx; + pucch_sched.n_pucch_2 = dedicated->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx; + pucch_sched.n_pucch_sr = dedicated->sched_request_cfg.setup().sr_pucch_res_idx; srslte_enb_ul_cfg_ue(&enb_ul, rnti, &uci_cfg, &pucch_sched, srs_cfg); - ue_db[rnti].I_sr = dedicated->sched_request_cnfg.sr_cnfg_idx; + ue_db[rnti].I_sr = dedicated->sched_request_cfg.setup().sr_cfg_idx; ue_db[rnti].I_sr_en = true; } /* CQI Reporting */ - if (dedicated->cqi_report_cnfg.report_periodic_setup_present) { - ue_db[rnti].pmi_idx = dedicated->cqi_report_cnfg.report_periodic.pmi_cnfg_idx; + if (dedicated->cqi_report_cfg.cqi_report_periodic_present and + dedicated->cqi_report_cfg.cqi_report_periodic.type() == setup_e::setup) { + ue_db[rnti].pmi_idx = dedicated->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx; ue_db[rnti].cqi_en = true; ue_db[rnti].pucch_cqi_ack = pucch_cqi_ack; } else { @@ -295,34 +294,31 @@ void phch_worker::set_config_dedicated(uint16_t rnti, } /* RI reporting */ - if (pucch_ri) { - ue_db[rnti].ri_idx = dedicated->cqi_report_cnfg.report_periodic.ri_cnfg_idx; + if (pucch_ri and dedicated->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present) { + ue_db[rnti].ri_idx = dedicated->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx; ue_db[rnti].ri_en = true; } else { ue_db[rnti].ri_idx = 0; ue_db[rnti].ri_en = false; } - if (dedicated->antenna_info_present) { + if (dedicated->ant_info_present) { /* If default antenna info then follow 3GPP 36.331 clause 9.2.4 Default physical channel configuration */ - if (dedicated->antenna_info_default_value) { + if (dedicated->ant_info.type() == phys_cfg_ded_s::ant_info_c_::types::default_value) { + ue_db[rnti].dedicated.ant_info.set(phys_cfg_ded_s::ant_info_c_::types::explicit_value); if (enb_dl.cell.nof_ports == 1) { - ue_db[rnti].dedicated.antenna_info_explicit_value.tx_mode = LIBLTE_RRC_TRANSMISSION_MODE_1; + ue_db[rnti].dedicated.ant_info.explicit_value().tx_mode = ant_info_ded_s::tx_mode_e_::tm1; } else { - ue_db[rnti].dedicated.antenna_info_explicit_value.tx_mode = LIBLTE_RRC_TRANSMISSION_MODE_2; + ue_db[rnti].dedicated.ant_info.explicit_value().tx_mode = ant_info_ded_s::tx_mode_e_::tm2; } - ue_db[rnti].dedicated.antenna_info_explicit_value.codebook_subset_restriction_present = false; - ue_db[rnti].dedicated.antenna_info_explicit_value.ue_tx_antenna_selection_setup_present = false; + ue_db[rnti].dedicated.ant_info.explicit_value().ue_tx_ant_sel.set(setup_e::release); ue_db[rnti].ri_idx = 0; ue_db[rnti].ri_en = false; } else { /* Physical channel reconfiguration according to 3GPP 36.331 clause 5.3.10.6 */ - memcpy(&ue_db[rnti].dedicated.antenna_info_explicit_value, - &dedicated->antenna_info_explicit_value, - sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT)); - if (dedicated->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_3 && - dedicated->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_4 && - ue_db[rnti].ri_en) { + ue_db[rnti].dedicated.ant_info.explicit_value() = dedicated->ant_info.explicit_value(); + if (dedicated->ant_info.explicit_value().tx_mode != ant_info_ded_s::tx_mode_e_::tm3 && + dedicated->ant_info.explicit_value().tx_mode != ant_info_ded_s::tx_mode_e_::tm4 && ue_db[rnti].ri_en) { ue_db[rnti].ri_idx = 0; ue_db[rnti].ri_en = false; } @@ -330,9 +326,9 @@ void phch_worker::set_config_dedicated(uint16_t rnti, } /* Set PDSCH power allocation */ - if (dedicated->pdsch_cnfg_ded_present) { - ue_db[rnti].dedicated.pdsch_cnfg_ded_present = true; - ue_db[rnti].dedicated.pdsch_cnfg_ded = dedicated->pdsch_cnfg_ded; + if (dedicated->pdsch_cfg_ded_present) { + ue_db[rnti].dedicated.pdsch_cfg_ded_present = true; + ue_db[rnti].dedicated.pdsch_cfg_ded = dedicated->pdsch_cfg_ded; } } else { Error("Setting config dedicated: rnti=0x%x does not exist\n", rnti); @@ -554,21 +550,23 @@ int phch_worker::decode_pusch(srslte_enb_ul_pusch_t *grants, uint32_t nof_pusch) } else if (ue_db[rnti].cqi_en && srslte_cqi_send(ue_db[rnti].pmi_idx, tti_rx)) { cqi_value.type = SRSLTE_CQI_TYPE_WIDEBAND; cqi_enabled = true; - if (ue_db[rnti].dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + if (ue_db[rnti].dedicated.ant_info_present and + ue_db[rnti].dedicated.ant_info.type() == phys_cfg_ded_s::ant_info_c_::types::explicit_value and + ue_db[rnti].dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { cqi_value.wideband.pmi_present = true; cqi_value.wideband.rank_is_not_one = phy->ue_db_get_ri(rnti) > 0; } } else if (grants[i].grant.cqi_request) { cqi_value.type = SRSLTE_CQI_TYPE_SUBBAND_HL; - if (ue_db[rnti].dedicated.antenna_info_present && ( - ue_db[rnti].dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3 || - ue_db[rnti].dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4 - )) { + if (ue_db[rnti].dedicated.ant_info_present && + (ue_db[rnti].dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm3 || + ue_db[rnti].dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm4)) { cqi_value.subband_hl.ri_present = true; } cqi_value.subband_hl.N = (phy->cell.nof_prb > 7) ? srslte_cqi_hl_get_no_subbands(phy->cell.nof_prb) : 0; cqi_value.subband_hl.four_antenna_ports = (phy->cell.nof_ports == 4); - cqi_value.subband_hl.pmi_present = (ue_db[rnti].dedicated.cqi_report_cnfg.report_mode_aperiodic == LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31); + cqi_value.subband_hl.pmi_present = + (ue_db[rnti].dedicated.cqi_report_cfg.cqi_report_mode_aperiodic == cqi_report_mode_aperiodic_e::rm31); cqi_value.subband_hl.rank_is_not_one = phy->ue_db_get_ri(rnti) > 0; cqi_enabled = true; } @@ -756,8 +754,14 @@ int phch_worker::decode_pucch() srslte_cqi_value_t cqi_value; ZERO_OBJECT(cqi_value); - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *dedicated = &ue_db[rnti].dedicated; - LIBLTE_RRC_TRANSMISSION_MODE_ENUM tx_mode = dedicated->antenna_info_explicit_value.tx_mode; + phys_cfg_ded_s* dedicated = &ue_db[rnti].dedicated; + ant_info_ded_s::tx_mode_e_ tx_mode; + if (dedicated->ant_info.type() == phys_cfg_ded_s::ant_info_c_::types::explicit_value) { + tx_mode = dedicated->ant_info.explicit_value().tx_mode; + } else { + tx_mode.value = ant_info_ded_s::tx_mode_e_::tm2; + Warning("Tx mode not yet set\n"); + } if (ue_db[rnti].cqi_en && (ue_db[rnti].pucch_cqi_ack || !needs_ack[0] || !needs_ack[1])) { if (ue_db[rnti].ri_en && srslte_ri_send(ue_db[rnti].pmi_idx, ue_db[rnti].ri_idx, tti_rx)) { @@ -768,7 +772,7 @@ int phch_worker::decode_pucch() needs_pucch = true; needs_cqi = true; cqi_value.type = SRSLTE_CQI_TYPE_WIDEBAND; - if (tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + if (tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { cqi_value.wideband.pmi_present = true; cqi_value.wideband.rank_is_not_one = phy->ue_db_get_ri(rnti) > 0; } @@ -1013,9 +1017,9 @@ int phch_worker::encode_pdsch(srslte_enb_dl_pdsch_t *grants, uint32_t nof_grants /* Set power allocation */ float rho_a = ((enb_dl.cell.nof_ports == 1) ? 1.0f : sqrtf(2.0f)), rho_b = 1.0f; - uint32_t pdsch_cnfg_ded = ue_db[rnti].dedicated.pdsch_cnfg_ded; - if (pdsch_cnfg_ded < (uint32_t) LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS) { - float rho_a_db = liblte_rrc_pdsch_config_p_a_num[pdsch_cnfg_ded]; + pdsch_cfg_ded_s::p_a_e_ pdsch_cnfg_ded = ue_db[rnti].dedicated.pdsch_cfg_ded.p_a; + if (pdsch_cnfg_ded < (uint32_t)pdsch_cfg_ded_s::p_a_e_::nof_types) { + float rho_a_db = pdsch_cnfg_ded.to_number(); rho_a *= powf(10.0f, rho_a_db / 20.0f); } if (phy->pdsch_p_b < 4) { diff --git a/srsenb/src/phy/phy.cc b/srsenb/src/phy/phy.cc index 3b8c2839d..deee93ba6 100644 --- a/srsenb/src/phy/phy.cc +++ b/srsenb/src/phy/phy.cc @@ -41,8 +41,8 @@ #define Info(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->debug(fmt, ##__VA_ARGS__) -using namespace std; - +using namespace std; +using namespace asn1::rrc; namespace srsenb { @@ -59,27 +59,31 @@ void phy::parse_config(phy_cfg_t* cfg) { // PRACH configuration - prach_cfg.config_idx = cfg->prach_cnfg.prach_cnfg_info.prach_config_index; - prach_cfg.hs_flag = cfg->prach_cnfg.prach_cnfg_info.high_speed_flag; - prach_cfg.root_seq_idx = cfg->prach_cnfg.root_sequence_index; - prach_cfg.zero_corr_zone = cfg->prach_cnfg.prach_cnfg_info.zero_correlation_zone_config; - prach_cfg.freq_offset = cfg->prach_cnfg.prach_cnfg_info.prach_freq_offset; - - // PUSCH DMRS configuration - workers_common.pusch_cfg.cyclic_shift = cfg->pusch_cnfg.ul_rs.cyclic_shift; - workers_common.pusch_cfg.delta_ss = cfg->pusch_cnfg.ul_rs.group_assignment_pusch; - workers_common.pusch_cfg.group_hopping_en = cfg->pusch_cnfg.ul_rs.group_hopping_enabled; - workers_common.pusch_cfg.sequence_hopping_en = cfg->pusch_cnfg.ul_rs.sequence_hopping_enabled; - - // PUSCH hopping configuration - workers_common.hopping_cfg.hop_mode = cfg->pusch_cnfg.hopping_mode == LIBLTE_RRC_HOPPING_MODE_INTRA_AND_INTER_SUBFRAME ? - srslte_pusch_hopping_cfg_t::SRSLTE_PUSCH_HOP_MODE_INTRA_SF : - srslte_pusch_hopping_cfg_t::SRSLTE_PUSCH_HOP_MODE_INTER_SF; ; - workers_common.hopping_cfg.n_sb = cfg->pusch_cnfg.n_sb; - workers_common.hopping_cfg.hopping_offset = cfg->pusch_cnfg.pusch_hopping_offset; - - // PUCCH configuration - workers_common.pucch_cfg.delta_pucch_shift = liblte_rrc_delta_pucch_shift_num[cfg->pucch_cnfg.delta_pucch_shift%LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS]; + prach_cfg.config_idx = cfg->prach_cnfg.prach_cfg_info.prach_cfg_idx; + prach_cfg.hs_flag = cfg->prach_cnfg.prach_cfg_info.high_speed_flag; + prach_cfg.root_seq_idx = cfg->prach_cnfg.root_seq_idx; + prach_cfg.zero_corr_zone = cfg->prach_cnfg.prach_cfg_info.zero_correlation_zone_cfg; + prach_cfg.freq_offset = cfg->prach_cnfg.prach_cfg_info.prach_freq_offset; + + // PUSCH DMRS configuration + workers_common.pusch_cfg.cyclic_shift = cfg->pusch_cnfg.ul_ref_sigs_pusch.cyclic_shift; + workers_common.pusch_cfg.delta_ss = cfg->pusch_cnfg.ul_ref_sigs_pusch.group_assign_pusch; + workers_common.pusch_cfg.group_hopping_en = cfg->pusch_cnfg.ul_ref_sigs_pusch.group_hop_enabled; + workers_common.pusch_cfg.sequence_hopping_en = cfg->pusch_cnfg.ul_ref_sigs_pusch.seq_hop_enabled; + + // PUSCH hopping configuration + workers_common.hopping_cfg.hop_mode = + cfg->pusch_cnfg.pusch_cfg_basic.hop_mode == + asn1::rrc::pusch_cfg_common_s::pusch_cfg_basic_s_::hop_mode_e_::intra_and_inter_sub_frame + ? srslte_pusch_hopping_cfg_t::SRSLTE_PUSCH_HOP_MODE_INTRA_SF + : srslte_pusch_hopping_cfg_t::SRSLTE_PUSCH_HOP_MODE_INTER_SF; + ; + workers_common.hopping_cfg.n_sb = cfg->pusch_cnfg.pusch_cfg_basic.n_sb; + workers_common.hopping_cfg.hopping_offset = cfg->pusch_cnfg.pusch_cfg_basic.pusch_hop_offset; + + // PUCCH configuration + workers_common.pucch_cfg.delta_pucch_shift = + cfg->pucch_cnfg.delta_pucch_shift.to_number(); // FIXME: Why was it a % operator before? workers_common.pucch_cfg.N_cs = cfg->pucch_cnfg.n_cs_an; workers_common.pucch_cfg.n_rb_2 = cfg->pucch_cnfg.n_rb_cqi; workers_common.pucch_cfg.srs_configured = false; @@ -222,32 +226,36 @@ void phy::set_conf_dedicated_ack(uint16_t rnti, bool ack) } } -void phy::set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) +void phy::set_config_dedicated(uint16_t rnti, phys_cfg_ded_s* dedicated) { for (uint32_t i=0;imbsfn_subfr_cnfg_list_size > 1) { - Warning("SIB2 has %d MBSFN subframe configs - only 1 supported\n", sib2->mbsfn_subfr_cnfg_list_size); - } - if(sib2->mbsfn_subfr_cnfg_list_size > 0) { - memcpy(&phy_rrc_config.mbsfn.mbsfn_subfr_cnfg, &sib2->mbsfn_subfr_cnfg_list[0], sizeof(LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT)); - } - - memcpy(&phy_rrc_config.mbsfn.mbsfn_notification_cnfg, &sib13->mbsfn_notification_config, sizeof(LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT)); - if(sib13->mbsfn_area_info_list_r9_size > 1) { - Warning("SIB13 has %d MBSFN area info elements - only 1 supported\n", sib13->mbsfn_area_info_list_r9_size); + if (sib2->mbsfn_sf_cfg_list_present) { + if (sib2->mbsfn_sf_cfg_list.size() == 0) { + Warning("SIB2 does not have any MBSFN config although it was set as present\n"); + } else { + if (sib2->mbsfn_sf_cfg_list.size() > 1) { + Warning("SIB2 has %d MBSFN subframe configs - only 1 supported\n", sib2->mbsfn_sf_cfg_list.size()); + } + phy_rrc_config.mbsfn.mbsfn_subfr_cnfg = sib2->mbsfn_sf_cfg_list[0]; + } } - if(sib13->mbsfn_area_info_list_r9_size > 0) { - memcpy(&phy_rrc_config.mbsfn.mbsfn_area_info, &sib13->mbsfn_area_info_list_r9[0], sizeof(LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT)); + + phy_rrc_config.mbsfn.mbsfn_notification_cnfg = sib13->notif_cfg_r9; + if (sib13->mbsfn_area_info_list_r9.size() > 0) { + if (sib13->mbsfn_area_info_list_r9.size() > 1) { + Warning("SIB13 has %d MBSFN area info elements - only 1 supported\n", sib13->mbsfn_area_info_list_r9.size()); + } + phy_rrc_config.mbsfn.mbsfn_area_info = sib13->mbsfn_area_info_list_r9[0]; } - - memcpy(&phy_rrc_config.mbsfn.mcch, &mcch, sizeof(LIBLTE_RRC_MCCH_MSG_STRUCT)); - + + phy_rrc_config.mbsfn.mcch = mcch; + workers_common.configure_mbsfn(&phy_rrc_config.mbsfn); } diff --git a/srsenb/src/upper/rrc.cc b/srsenb/src/upper/rrc.cc index c7297cb37..6ea7c6866 100644 --- a/srsenb/src/upper/rrc.cc +++ b/srsenb/src/upper/rrc.cc @@ -24,18 +24,21 @@ * */ -#include "srslte/interfaces/sched_interface.h" -#include "srslte/asn1/liblte_rrc.h" #include "srsenb/hdr/upper/rrc.h" -#include "srslte/srslte.h" +#include "srslte/asn1/asn1_utils.h" #include "srslte/asn1/liblte_mme.h" +#include "srslte/common/bcd_helpers.h" #include "srslte/common/int_helpers.h" +#include "srslte/interfaces/sched_interface.h" +#include "srslte/srslte.h" using srslte::byte_buffer_t; using srslte::bit_buffer_t; using srslte::uint32_to_uint8; using srslte::uint8_to_uint32; +using namespace asn1::rrc; + namespace srsenb { void rrc::init(rrc_cfg_t *cfg_, @@ -59,10 +62,11 @@ void rrc::init(rrc_cfg_t *cfg_, running = false; pool = srslte::byte_buffer_pool::get_instance(); - memcpy(&cfg, cfg_, sizeof(rrc_cfg_t)); + cfg = *cfg_; - if(cfg.sibs[12].sib_type == LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13 && cfg_->enable_mbsfn) { - configure_mbsfn_sibs(&cfg.sibs[1].sib.sib2,&cfg.sibs[12].sib.sib13); + if (cfg.sibs[12].type() == asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib13_v920 && + cfg_->enable_mbsfn) { + configure_mbsfn_sibs(&cfg.sibs[1].sib2(), &cfg.sibs[12].sib13_v920()); } nof_si_messages = generate_sibs(); @@ -129,8 +133,8 @@ void rrc::get_metrics(rrc_metrics_t &m) void rrc::read_pdu_bcch_dlsch(uint32_t sib_index, uint8_t* payload) { - if (sib_index < LIBLTE_RRC_MAX_SIB) { - memcpy(payload, sib_buffer[sib_index].msg, sib_buffer[sib_index].N_bytes); + if (sib_index < ASN1_RRC_MAX_SIB) { + memcpy(payload, sib_buffer[sib_index]->msg, sib_buffer[sib_index]->N_bytes); } } @@ -156,6 +160,21 @@ uint32_t rrc::get_nof_users() { return users.size(); } +template +void rrc::log_rrc_message(const std::string& source, const direction_t dir, const srslte::byte_buffer_t* pdu, + const T& msg) +{ + if (rrc_log->get_level() == srslte::LOG_LEVEL_INFO) { + rrc_log->info("%s - %s %s\n", source.c_str(), dir == Tx ? "Tx" : "Rx", msg.msg.c1().type().to_string().c_str()); + } else if (rrc_log->get_level() >= srslte::LOG_LEVEL_DEBUG) { + asn1::json_writer json_writer; + msg.to_json(json_writer); + rrc_log->debug_hex(pdu->msg, pdu->N_bytes, "%s - %s %s\n", source.c_str(), dir == Tx ? "Tx" : "Rx", + msg.msg.c1().type().to_string().c_str()); + rrc_log->debug("Content:\n%s\n", json_writer.to_string().c_str()); + } +} + void rrc::max_retx_attempted(uint16_t rnti) { @@ -183,8 +202,9 @@ void rrc::add_user(uint16_t rnti) cfg.direction = SECURITY_DIRECTION_DOWNLINK; uint32_t teid_in = 1; - for(uint32_t i = 0; i add_bearer_mrb(SRSLTE_MRNTI,lcid); pdcp->add_bearer(SRSLTE_MRNTI,lcid,cfg); gtpu->add_bearer(SRSLTE_MRNTI,lcid, 1, 1, &teid_in); @@ -231,20 +251,27 @@ void rrc::write_pdu(uint16_t rnti, uint32_t lcid, byte_buffer_t* pdu) *******************************************************************************/ void rrc::write_dl_info(uint16_t rnti, byte_buffer_t* sdu) { - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - bzero(&dl_dcch_msg, sizeof(LIBLTE_RRC_DL_DCCH_MSG_STRUCT)); + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg_type_c::c1_c_* msg_c1 = &dl_dcch_msg.msg.c1(); pthread_mutex_lock(&user_mutex); if (users.count(rnti) == 1) { - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_DL_INFO_TRANSFER; - memcpy(dl_dcch_msg.msg.dl_info_transfer.dedicated_info.msg, sdu->msg, sdu->N_bytes); - dl_dcch_msg.msg.dl_info_transfer.dedicated_info.N_bytes = sdu->N_bytes; - + msg_c1->set(dl_dcch_msg_type_c::c1_c_::types::dl_info_transfer); + // msg_c1->dl_info_transfer().rrc_transaction_id = ; + msg_c1->dl_info_transfer().crit_exts.set(dl_info_transfer_s::crit_exts_c_::types::c1); + msg_c1->dl_info_transfer().crit_exts.c1().set(dl_info_transfer_s::crit_exts_c_::c1_c_::types::dl_info_transfer_r8); + dl_info_transfer_r8_ies_s* dl_info_r8 = &msg_c1->dl_info_transfer().crit_exts.c1().dl_info_transfer_r8(); + dl_info_r8->non_crit_ext_present = false; + dl_info_r8->ded_info_type.set(dl_info_transfer_r8_ies_s::ded_info_type_c_::types::ded_info_nas); + dl_info_r8->ded_info_type.ded_info_nas().resize(sdu->N_bytes); + memcpy(msg_c1->dl_info_transfer().crit_exts.c1().dl_info_transfer_r8().ded_info_type.ded_info_nas().data(), + sdu->msg, sdu->N_bytes); + sdu->reset(); users[rnti].send_dl_dcch(&dl_dcch_msg, sdu); - } else { rrc_log->error("Rx SDU for unknown rnti=0x%x\n", rnti); } @@ -401,88 +428,95 @@ bool rrc::is_paging_opportunity(uint32_t tti, uint32_t *payload_len) } pthread_mutex_lock(&paging_mutex); - - LIBLTE_RRC_PCCH_MSG_STRUCT pcch_msg; - bzero(&pcch_msg, sizeof(LIBLTE_RRC_PCCH_MSG_STRUCT)); - + + asn1::rrc::pcch_msg_s pcch_msg; + pcch_msg.msg.set(pcch_msg_type_c::types::c1); + pcch_msg.msg.c1().set(pcch_msg_type_c::c1_c_::types::paging); + paging_s* paging_rec = &pcch_msg.msg.c1().paging(); + // Default paging cycle, should get DRX from user - uint32_t T = liblte_rrc_default_paging_cycle_num[cfg.sibs[1].sib.sib2.rr_config_common_sib.pcch_cnfg.default_paging_cycle]; - uint32_t Nb = T*liblte_rrc_nb_num[cfg.sibs[1].sib.sib2.rr_config_common_sib.pcch_cnfg.nB]; + uint32_t T = cfg.sibs[1].sib2().rr_cfg_common.pcch_cfg.default_paging_cycle.to_number(); + uint32_t Nb = T * cfg.sibs[1].sib2().rr_cfg_common.pcch_cfg.nb; uint32_t N = T1?Nb/T:1; uint32_t sfn = tti/10; std::vector ue_to_remove; - - int n=0; - for(std::map::iterator iter=pending_paging.begin(); n < LIBLTE_RRC_MAX_PAGE_REC && iter!=pending_paging.end(); ++iter) { - LIBLTE_S1AP_UEPAGINGID_STRUCT u = (LIBLTE_S1AP_UEPAGINGID_STRUCT) iter->second; - uint32_t ueid = ((uint32_t) iter->first)%1024; - uint32_t i_s = (ueid/N) % Ns; - - if ((sfn % T) == (T/N) * (ueid % N)) { - - int sf_idx = sf_pattern[i_s%4][(Ns-1)%4]; + + int n = 0; + for (std::map::iterator iter = pending_paging.begin(); + n < ASN1_RRC_MAX_PAGE_REC && iter != pending_paging.end(); ++iter) { + LIBLTE_S1AP_UEPAGINGID_STRUCT u = (LIBLTE_S1AP_UEPAGINGID_STRUCT)iter->second; + uint32_t ueid = ((uint32_t)iter->first) % 1024; + uint32_t i_s = (ueid / N) % Ns; + + if ((sfn % T) == (T / N) * (ueid % N)) { + + int sf_idx = sf_pattern[i_s % 4][(Ns - 1) % 4]; if (sf_idx < 0) { rrc_log->error("SF pattern is N/A for Ns=%d, i_s=%d, imsi_decimal=%d\n", Ns, i_s, ueid); - } else if ((uint32_t) sf_idx == (tti%10)) { + } else if ((uint32_t)sf_idx == (tti % 10)) { + paging_rec->paging_record_list_present = true; + paging_record_s paging_elem; if (u.choice_type == LIBLTE_S1AP_UEPAGINGID_CHOICE_IMSI) { - pcch_msg.paging_record_list[n].ue_identity.ue_identity_type = LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_IMSI; - memcpy(pcch_msg.paging_record_list[n].ue_identity.imsi, u.choice.iMSI.buffer, u.choice.iMSI.n_octets); - pcch_msg.paging_record_list[n].ue_identity.imsi_size = u.choice.iMSI.n_octets; + paging_elem.ue_id.set(paging_ue_id_c::types::imsi); + paging_elem.ue_id.imsi().resize(u.choice.iMSI.n_octets); + memcpy(paging_elem.ue_id.imsi().data(), u.choice.iMSI.buffer, u.choice.iMSI.n_octets); printf("Warning IMSI paging not tested\n"); } else { - pcch_msg.paging_record_list[n].ue_identity.ue_identity_type = LIBLTE_RRC_PAGING_UE_IDENTITY_TYPE_S_TMSI; - pcch_msg.paging_record_list[n].ue_identity.s_tmsi.mmec = u.choice.s_TMSI.mMEC.buffer[0]; - uint32_t m_tmsi = 0; - for (int i=0;ipaging_record_list.push_back(paging_elem); ue_to_remove.push_back(ueid); n++; rrc_log->info("Assembled paging for ue_id=%d, tti=%d\n", ueid, tti); } } - } - - for (uint32_t i=0;i 0) { - pcch_msg.paging_record_list_size = n; - liblte_rrc_pack_pcch_msg(&pcch_msg, (LIBLTE_BIT_MSG_STRUCT*)&bit_buf_paging); - uint32_t N_bytes = (bit_buf_paging.N_bits-1)/8+1; + + if (paging_rec->paging_record_list.size() > 0) { + asn1::bit_ref bref(byte_buf_paging.msg, byte_buf_paging.N_bytes); + pcch_msg.pack(bref); + uint32_t N_bits = (uint32_t)bref.distance(byte_buf_paging.msg); + byte_buf_paging.N_bytes = (N_bits - 1) / 8 + 1; if (payload_len) { - *payload_len = N_bytes; + *payload_len = byte_buf_paging.N_bytes; } - rrc_log->info("Assembling PCCH payload with %d UE identities, payload_len=%d bytes, nbits=%d\n", - pcch_msg.paging_record_list_size, N_bytes, bit_buf_paging.N_bits); - return true; - } - - return false; + rrc_log->info("Assembling PCCH payload with %d UE identities, payload_len=%d bytes, nbits=%d\n", + paging_rec->paging_record_list.size(), byte_buf_paging.N_bytes, N_bits); + log_rrc_message("PCCH-Message", Tx, &byte_buf_paging, pcch_msg); + + return true; + } + + return false; } -void rrc::read_pdu_pcch(uint8_t *payload, uint32_t buffer_size) +void rrc::read_pdu_pcch(uint8_t* payload, uint32_t buffer_size) { pthread_mutex_lock(&paging_mutex); - uint32_t N_bytes = (bit_buf_paging.N_bits-1)/8+1; - if (N_bytes <= buffer_size) { - srslte_bit_pack_vector(bit_buf_paging.msg, payload, bit_buf_paging.N_bits); + if (byte_buf_paging.N_bytes <= buffer_size) { + memcpy(payload, byte_buf_paging.msg, byte_buf_paging.N_bytes); } pthread_mutex_unlock(&paging_mutex); } - /******************************************************************************* Private functions All private functions are not mutexed and must be called from a mutexed enviornment @@ -494,34 +528,42 @@ void rrc::parse_ul_ccch(uint16_t rnti, byte_buffer_t *pdu) uint16_t old_rnti = 0; if (pdu) { - LIBLTE_RRC_UL_CCCH_MSG_STRUCT ul_ccch_msg; - bzero(&ul_ccch_msg, sizeof(LIBLTE_RRC_UL_CCCH_MSG_STRUCT)); + ul_ccch_msg_s ul_ccch_msg; + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; - liblte_rrc_unpack_ul_ccch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &ul_ccch_msg); + ul_ccch_msg.unpack(bref); - rrc_log->info_hex(pdu->msg, pdu->N_bytes, - "SRB0 - Rx: %s", - liblte_rrc_ul_ccch_msg_type_text[ul_ccch_msg.msg_type]); + log_rrc_message("SRB0", Rx, pdu, ul_ccch_msg); - switch (ul_ccch_msg.msg_type) { - case LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ: + switch (ul_ccch_msg.msg.c1().type()) { + case ul_ccch_msg_type_c::c1_c_::types::rrc_conn_request: if (users.count(rnti)) { - users[rnti].handle_rrc_con_req(&ul_ccch_msg.msg.rrc_con_req); + users[rnti].handle_rrc_con_req(&ul_ccch_msg.msg.c1().rrc_conn_request()); } else { rrc_log->error("Received ConnectionSetup for rnti=0x%x without context\n", rnti); } break; - case LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ: + case ul_ccch_msg_type_c::c1_c_::types::rrc_conn_reest_request: rrc_log->debug("rnti=0x%x, phyid=0x%x, smac=0x%x, cause=%s\n", - ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti, - ul_ccch_msg.msg.rrc_con_reest_req.ue_id.phys_cell_id, - ul_ccch_msg.msg.rrc_con_reest_req.ue_id.short_mac_i, - liblte_rrc_con_reest_req_cause_text[ul_ccch_msg.msg.rrc_con_reest_req.cause] - ); + (uint32_t)ul_ccch_msg.msg.c1() + .rrc_conn_reest_request() + .crit_exts.rrc_conn_reest_request_r8() + .ue_id.c_rnti.to_number(), + ul_ccch_msg.msg.c1().rrc_conn_reest_request().crit_exts.rrc_conn_reest_request_r8().ue_id.pci, + (uint32_t)ul_ccch_msg.msg.c1() + .rrc_conn_reest_request() + .crit_exts.rrc_conn_reest_request_r8() + .ue_id.short_mac_i.to_number(), + ul_ccch_msg.msg.c1() + .rrc_conn_reest_request() + .crit_exts.rrc_conn_reest_request_r8() + .reest_cause.to_string() + .c_str()); if (users[rnti].is_idle()) { - old_rnti = ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti; + old_rnti = (uint16_t)ul_ccch_msg.msg.c1() + .rrc_conn_reest_request() + .crit_exts.rrc_conn_reest_request_r8() + .ue_id.c_rnti.to_number(); if (users.count(old_rnti)) { rrc_log->error("Not supported: ConnectionReestablishment for rnti=0x%x. Sending Connection Reject\n", old_rnti); users[rnti].send_connection_reest_rej(); @@ -630,17 +672,18 @@ void rrc::config_mac() sched_interface::cell_cfg_t sched_cfg; bzero(&sched_cfg, sizeof(sched_interface::cell_cfg_t)); for (uint32_t i=0;iN_bytes; if (i == 0) { sched_cfg.sibs[i].period_rf = 8; // SIB1 is always 8 rf } else { - sched_cfg.sibs[i].period_rf = liblte_rrc_si_periodicity_num[cfg.sibs[0].sib.sib1.sched_info[i-1].si_periodicity]; + sched_cfg.sibs[i].period_rf = cfg.sib1.sched_info_list[i - 1].si_periodicity.to_number(); } } - sched_cfg.si_window_ms = liblte_rrc_si_window_length_num[cfg.sibs[0].sib.sib1.si_window_length]; - sched_cfg.prach_rar_window = liblte_rrc_ra_response_window_size_num[cfg.sibs[1].sib.sib2.rr_config_common_sib.rach_cnfg.ra_resp_win_size]; - sched_cfg.prach_freq_offset = cfg.sibs[1].sib.sib2.rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset; - sched_cfg.maxharq_msg3tx = cfg.sibs[1].sib.sib2.rr_config_common_sib.rach_cnfg.max_harq_msg3_tx; + sched_cfg.si_window_ms = cfg.sib1.si_win_len.to_number(); + sched_cfg.prach_rar_window = + cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.ra_supervision_info.ra_resp_win_size.to_number(); + sched_cfg.prach_freq_offset = cfg.sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset; + sched_cfg.maxharq_msg3tx = cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.max_harq_msg3_tx; sched_cfg.nrb_pucch = SRSLTE_MAX(cfg.sr_cfg.nof_prb, cfg.cqi_cfg.nof_prb); rrc_log->info("Allocating %d PRBs for PUCCH\n", sched_cfg.nrb_pucch); @@ -655,100 +698,100 @@ void rrc::config_mac() uint32_t rrc::generate_sibs() { // nof_messages includes SIB2 by default, plus all configured SIBs - uint32_t nof_messages = 1+cfg.sibs[0].sib.sib1.N_sched_info; - LIBLTE_RRC_SCHEDULING_INFO_STRUCT *sched_info = cfg.sibs[0].sib.sib1.sched_info; + uint32_t nof_messages = 1 + cfg.sib1.sched_info_list.size(); + sched_info_list_l& sched_info = cfg.sib1.sched_info_list; // msg is array of SI messages, each SI message msg[i] may contain multiple SIBs // all SIBs in a SI message msg[i] share the same periodicity - LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT *msg = (LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT*)calloc(nof_messages+1, sizeof(LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT)); + asn1::dyn_array msg(nof_messages + 1); // Copy SIB1 to first SI message - msg[0].N_sibs = 1; - memcpy(&msg[0].sibs[0], &cfg.sibs[0], sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_STRUCT)); + msg[0].msg.set(bcch_dl_sch_msg_type_c::types::c1); + msg[0].msg.c1().set(bcch_dl_sch_msg_type_c::c1_c_::types::sib_type1); + msg[0].msg.c1().sib_type1() = cfg.sib1; // Copy rest of SIBs - for (uint32_t sched_info_elem = 0; sched_info_elem < nof_messages; sched_info_elem++) { + for (uint32_t sched_info_elem = 0; sched_info_elem < nof_messages - 1; sched_info_elem++) { uint32_t msg_index = sched_info_elem + 1; // first msg is SIB1, therefore start with second - uint32_t current_msg_element_offset = 0; - msg[msg_index].N_sibs = 0; + msg[msg_index].msg.set(bcch_dl_sch_msg_type_c::types::c1); + msg[msg_index].msg.c1().set(bcch_dl_sch_msg_type_c::c1_c_::types::sys_info); + msg[msg_index].msg.c1().sys_info().crit_exts.set(sys_info_s::crit_exts_c_::types::sys_info_r8); + sys_info_r8_ies_s::sib_type_and_info_l_& sib_list = + msg[msg_index].msg.c1().sys_info().crit_exts.sys_info_r8().sib_type_and_info; // SIB2 always in second SI message if (msg_index == 1) { - msg[msg_index].N_sibs++; - memcpy(&msg[msg_index].sibs[0], &cfg.sibs[1], sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_STRUCT)); - current_msg_element_offset = 1; // make sure "other SIBs" do not overwrite this SIB2 + sib_list.push_back(cfg.sibs[1]); // Save SIB2 - memcpy(&sib2, &cfg.sibs[1].sib.sib2, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT)); - } else { - current_msg_element_offset = 0; // no SIB2, no offset + sib2 = cfg.sibs[1].sib2(); } // Add other SIBs to this message, if any - for (uint32_t mapping = 0; mapping < sched_info[sched_info_elem].N_sib_mapping_info; mapping++) { - msg[msg_index].N_sibs++; - // current_msg_element_offset skips SIB2 if necessary - memcpy(&msg[msg_index].sibs[mapping + current_msg_element_offset], - &cfg.sibs[(int) sched_info[sched_info_elem].sib_mapping_info[mapping].sib_type+2], - sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_STRUCT)); + for (uint32_t mapping = 0; mapping < sched_info[sched_info_elem].sib_map_info.size(); mapping++) { + sib_list.push_back(cfg.sibs[(int)sched_info[sched_info_elem].sib_map_info[mapping] + 2]); } } // Pack payload for all messages for (uint32_t msg_index = 0; msg_index < nof_messages; msg_index++) { - LIBLTE_BIT_MSG_STRUCT bitbuffer; - liblte_rrc_pack_bcch_dlsch_msg(&msg[msg_index], &bitbuffer); - srslte_bit_pack_vector(bitbuffer.msg, sib_buffer[msg_index].msg, bitbuffer.N_bits); - sib_buffer[msg_index].N_bytes = (bitbuffer.N_bits-1)/8+1; + srslte::byte_buffer_t* sib = pool_allocate; + asn1::bit_ref bref(sib->msg, sib->get_tailroom()); + asn1::bit_ref bref0 = bref; + msg[msg_index].pack(bref); + sib->N_bytes = static_cast((bref.distance(bref0) - 1) / 8 + 1); + sib_buffer.push_back(sib); + + // Log SIBs in JSON format + log_rrc_message("SIB payload", Tx, sib_buffer[msg_index], msg[msg_index]); } - free(msg); return nof_messages; } -void rrc::configure_mbsfn_sibs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13) +void rrc::configure_mbsfn_sibs(sib_type2_s* sib2, sib_type13_r9_s* sib13) { // Temp assignment of MCCH, this will eventually come from a cfg file - mcch.pmch_infolist_r9_size = 1; - mcch.commonsf_allocpatternlist_r9_size = 1; - mcch.commonsf_allocperiod_r9 = LIBLTE_RRC_MBSFN_COMMON_SF_ALLOC_PERIOD_R9_RF64; - mcch.commonsf_allocpatternlist_r9[0].radio_fr_alloc_offset = 0; - mcch.commonsf_allocpatternlist_r9[0].radio_fr_alloc_period = LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N1; - mcch.commonsf_allocpatternlist_r9[0].subfr_alloc = 32+31; - mcch.commonsf_allocpatternlist_r9[0].subfr_alloc_num_frames = LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE; - - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9_size = 1; - - - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].logicalchannelid_r9 = 1; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].sessionid_r9 = 0; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].sessionid_r9_present = true; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_explicit = true; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_r9.mcc = 0; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_id_r9.mnc = 3; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.plmn_index_r9 = 0; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[0].tmgi_r9.serviceid_r9 = 0; - - if(mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9_size > 1) { - - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].logicalchannelid_r9 = 2; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].sessionid_r9 = 1; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].sessionid_r9_present = true; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].tmgi_r9.plmn_id_explicit = true; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].tmgi_r9.plmn_id_r9.mcc = 0; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].tmgi_r9.plmn_id_r9.mnc = 3; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].tmgi_r9.plmn_index_r9 = 0; - mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9[1].tmgi_r9.serviceid_r9 = 1; - - } - mcch.pmch_infolist_r9[0].pmch_config_r9.datamcs_r9 = 10; - mcch.pmch_infolist_r9[0].pmch_config_r9.mch_schedulingperiod_r9 = LIBLTE_RRC_MCH_SCHEDULING_PERIOD_R9_RF64; - mcch.pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9 = 64*6; - - - - phy->configure_mbsfn(sib2,sib13,mcch); - mac->write_mcch(sib2,sib13,&mcch); + mcch.msg.set(mcch_msg_type_c::types::c1); + mcch.msg.c1().set(mcch_msg_type_c::c1_c_::types::mbsfn_area_cfg_r9); + mbsfn_area_cfg_r9_s& area_cfg_r9 = mcch.msg.c1().mbsfn_area_cfg_r9(); + area_cfg_r9.common_sf_alloc_period_r9 = mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_::rf64; + area_cfg_r9.common_sf_alloc_r9.resize(1); + mbsfn_sf_cfg_s* sf_alloc_item = &area_cfg_r9.common_sf_alloc_r9[0]; + sf_alloc_item->radioframe_alloc_offset = 0; + sf_alloc_item->radioframe_alloc_period = mbsfn_sf_cfg_s::radioframe_alloc_period_e_::n1; + sf_alloc_item->sf_alloc.set(mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame); + sf_alloc_item->sf_alloc.one_frame().from_number(32 + 31); + + area_cfg_r9.pmch_info_list_r9.resize(1); + pmch_info_r9_s* pmch_item = &area_cfg_r9.pmch_info_list_r9[0]; + pmch_item->mbms_session_info_list_r9.resize(1); + + pmch_item->mbms_session_info_list_r9[0].lc_ch_id_r9 = 1; + pmch_item->mbms_session_info_list_r9[0].session_id_r9_present = true; + pmch_item->mbms_session_info_list_r9[0].session_id_r9[0] = 0; + pmch_item->mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.set(tmgi_r9_s::plmn_id_r9_c_::types::explicit_value_r9); + pmch_item->mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.explicit_value_r9().mcc_present = true; + srslte::string_to_plmn_id(pmch_item->mbms_session_info_list_r9[0].tmgi_r9.plmn_id_r9.explicit_value_r9(), "00003"); + uint8_t byte[] = {0x0, 0x0, 0x0}; + memcpy(&pmch_item->mbms_session_info_list_r9[0].tmgi_r9.service_id_r9[0], &byte[0], 3); + + if (pmch_item->mbms_session_info_list_r9.size() > 1) { + pmch_item->mbms_session_info_list_r9[1].lc_ch_id_r9 = 2; + pmch_item->mbms_session_info_list_r9[1].session_id_r9_present = true; + pmch_item->mbms_session_info_list_r9[1].session_id_r9[0] = 1; + pmch_item->mbms_session_info_list_r9[1].tmgi_r9.plmn_id_r9.set(tmgi_r9_s::plmn_id_r9_c_::types::explicit_value_r9); + srslte::string_to_plmn_id(pmch_item->mbms_session_info_list_r9[1].tmgi_r9.plmn_id_r9.explicit_value_r9(), "00003"); + byte[2] = 1; + memcpy(&pmch_item->mbms_session_info_list_r9[1].tmgi_r9.service_id_r9[0], &byte[0], + 3); // FIXME: Check if service is set to 1 + } + pmch_item->pmch_cfg_r9.data_mcs_r9 = 10; + pmch_item->pmch_cfg_r9.mch_sched_period_r9 = pmch_cfg_r9_s::mch_sched_period_r9_e_::rf64; + pmch_item->pmch_cfg_r9.sf_alloc_end_r9 = 64 * 6; + + phy->configure_mbsfn(sib2, sib13, mcch); + mac->write_mcch(sib2, sib13, &mcch); } void rrc::configure_security(uint16_t rnti, @@ -936,7 +979,6 @@ bool rrc::ue::is_idle() { bool rrc::ue::is_timeout() { - if (!parent) { return false; } @@ -952,7 +994,8 @@ bool rrc::ue::is_timeout() switch(state) { case RRC_STATE_IDLE: deadline_s = 0; - deadline_us = (parent->sib2.rr_config_common_sib.rach_cnfg.max_harq_msg3_tx + 1)* 8 * 1000; + deadline_us = + static_cast((parent->sib2.rr_cfg_common.rach_cfg_common.max_harq_msg3_tx + 1) * 16 * 1000); deadline_str = "RRCConnectionSetup"; break; case RRC_STATE_WAIT_FOR_CON_SETUP_COMPLETE: @@ -990,137 +1033,150 @@ bool rrc::ue::is_timeout() void rrc::ue::parse_ul_dcch(uint32_t lcid, byte_buffer_t *pdu) { - set_activity(); - LIBLTE_RRC_UL_DCCH_MSG_STRUCT ul_dcch_msg; - bzero(&ul_dcch_msg, sizeof(LIBLTE_RRC_UL_DCCH_MSG_STRUCT)); - - srslte_bit_unpack_vector(pdu->msg, parent->bit_buf.msg, pdu->N_bytes*8); - parent->bit_buf.N_bits = pdu->N_bytes*8; - liblte_rrc_unpack_ul_dcch_msg((LIBLTE_BIT_MSG_STRUCT*)&parent->bit_buf, &ul_dcch_msg); + ul_dcch_msg_s ul_dcch_msg; + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); + ul_dcch_msg.unpack(bref); + + parent->log_rrc_message(rb_id_text[lcid], Rx, pdu, ul_dcch_msg); - parent->rrc_log->info_hex(pdu->msg, pdu->N_bytes, - "%s - Rx %s\n", - rb_id_text[lcid], liblte_rrc_ul_dcch_msg_type_text[ul_dcch_msg.msg_type]); - transaction_id = 0; pdu->reset(); - - switch(ul_dcch_msg.msg_type) { - case LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_SETUP_COMPLETE: - handle_rrc_con_setup_complete(&ul_dcch_msg.msg.rrc_con_setup_complete, pdu); - break; - case LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_INFO_TRANSFER: - memcpy(pdu->msg, ul_dcch_msg.msg.ul_info_transfer.dedicated_info.msg, ul_dcch_msg.msg.ul_info_transfer.dedicated_info.N_bytes); - pdu->N_bytes = ul_dcch_msg.msg.ul_info_transfer.dedicated_info.N_bytes; + + transaction_id = 0; + + switch (ul_dcch_msg.msg.c1().type()) { + case ul_dcch_msg_type_c::c1_c_::types::rrc_conn_setup_complete: + handle_rrc_con_setup_complete(&ul_dcch_msg.msg.c1().rrc_conn_setup_complete(), pdu); + break; + case ul_dcch_msg_type_c::c1_c_::types::ul_info_transfer: + pdu->N_bytes = ul_dcch_msg.msg.c1() + .ul_info_transfer() + .crit_exts.c1() + .ul_info_transfer_r8() + .ded_info_type.ded_info_nas() + .size(); + memcpy(pdu->msg, + ul_dcch_msg.msg.c1() + .ul_info_transfer() + .crit_exts.c1() + .ul_info_transfer_r8() + .ded_info_type.ded_info_nas() + .data(), + pdu->N_bytes); parent->s1ap->write_pdu(rnti, pdu); break; - case LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_RECONFIG_COMPLETE: - handle_rrc_reconf_complete(&ul_dcch_msg.msg.rrc_con_reconfig_complete, pdu); + case ul_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg_complete: + handle_rrc_reconf_complete(&ul_dcch_msg.msg.c1().rrc_conn_recfg_complete(), pdu); parent->rrc_log->console("User 0x%x connected\n", rnti); - state = RRC_STATE_REGISTERED; + state = RRC_STATE_REGISTERED; break; - case LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_COMPLETE: - handle_security_mode_complete(&ul_dcch_msg.msg.security_mode_complete); + case ul_dcch_msg_type_c::c1_c_::types::security_mode_complete: + handle_security_mode_complete(&ul_dcch_msg.msg.c1().security_mode_complete()); // Skipping send_ue_cap_enquiry() procedure for now // state = RRC_STATE_WAIT_FOR_UE_CAP_INFO; notify_s1ap_ue_ctxt_setup_complete(); send_connection_reconf(pdu); state = RRC_STATE_WAIT_FOR_CON_RECONF_COMPLETE; break; - case LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_FAILURE: - handle_security_mode_failure(&ul_dcch_msg.msg.security_mode_failure); + case ul_dcch_msg_type_c::c1_c_::types::security_mode_fail: + handle_security_mode_failure(&ul_dcch_msg.msg.c1().security_mode_fail()); break; - case LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_CAPABILITY_INFO: - handle_ue_cap_info(&ul_dcch_msg.msg.ue_capability_info); + case ul_dcch_msg_type_c::c1_c_::types::ue_cap_info: + handle_ue_cap_info(&ul_dcch_msg.msg.c1().ue_cap_info()); send_connection_reconf(pdu); state = RRC_STATE_WAIT_FOR_CON_RECONF_COMPLETE; break; default: - parent->rrc_log->error("Msg: %s not supported\n", liblte_rrc_ul_dcch_msg_type_text[ul_dcch_msg.msg_type]); + parent->rrc_log->error("Msg: %s not supported\n", ul_dcch_msg.msg.c1().type().to_string().c_str()); break; } } -void rrc::ue::handle_rrc_con_req(LIBLTE_RRC_CONNECTION_REQUEST_STRUCT *msg) +void rrc::ue::handle_rrc_con_req(rrc_conn_request_s* msg) { if (not parent->s1ap->is_mme_connected()) { - parent->rrc_log->error("MME isn't connected. Sending Connection Reject.\n"); - parent->rrc_log->console("MME isn't connected. Sending Connection Reject.\n"); + parent->rrc_log->error("MME isn't connected. Sending Connection Reject\n"); send_connection_reject(); } set_activity(); - - if(msg->ue_id_type == LIBLTE_RRC_CON_REQ_UE_ID_TYPE_S_TMSI) { - mmec = msg->ue_id.s_tmsi.mmec; - m_tmsi = msg->ue_id.s_tmsi.m_tmsi; + rrc_conn_request_r8_ies_s* msg_r8 = &msg->crit_exts.rrc_conn_request_r8(); + + if (msg_r8->ue_id.type() == init_ue_id_c::types::s_tmsi) { + mmec = (uint8_t)msg_r8->ue_id.s_tmsi().mmec.to_number(); + m_tmsi = (uint32_t)msg_r8->ue_id.s_tmsi().m_tmsi.to_number(); has_tmsi = true; } - establishment_cause = msg->cause; + establishment_cause = msg_r8->establishment_cause; send_connection_setup(); state = RRC_STATE_WAIT_FOR_CON_SETUP_COMPLETE; } -void rrc::ue::handle_rrc_con_reest_req(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_REQUEST_STRUCT *msg) +void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_r8_ies_s* msg) { //TODO: Check Short-MAC-I value parent->rrc_log->error("Not Supported: ConnectionReestablishment. \n"); } -void rrc::ue::handle_rrc_con_setup_complete(LIBLTE_RRC_CONNECTION_SETUP_COMPLETE_STRUCT *msg, srslte::byte_buffer_t *pdu) +void rrc::ue::handle_rrc_con_setup_complete(rrc_conn_setup_complete_s* msg, srslte::byte_buffer_t* pdu) { parent->rrc_log->info("RRCConnectionSetupComplete transaction ID: %d\n", msg->rrc_transaction_id); + rrc_conn_setup_complete_r8_ies_s* msg_r8 = &msg->crit_exts.c1().rrc_conn_setup_complete_r8(); // TODO: msg->selected_plmn_id - used to select PLMN from SIB1 list // TODO: if(msg->registered_mme_present) - the indicated MME should be used from a pool - memcpy(pdu->msg, msg->dedicated_info_nas.msg, msg->dedicated_info_nas.N_bytes); - pdu->N_bytes = msg->dedicated_info_nas.N_bytes; + pdu->N_bytes = msg_r8->ded_info_nas.size(); + memcpy(pdu->msg, msg_r8->ded_info_nas.data(), pdu->N_bytes); // Acknowledge Dedicated Configuration parent->phy->set_conf_dedicated_ack(rnti, true); parent->mac->phy_config_enabled(rnti, true); if(has_tmsi) { - parent->s1ap->initial_ue(rnti, (LIBLTE_S1AP_RRC_ESTABLISHMENT_CAUSE_ENUM)establishment_cause, pdu, m_tmsi, mmec); + parent->s1ap->initial_ue(rnti, (LIBLTE_S1AP_RRC_ESTABLISHMENT_CAUSE_ENUM)establishment_cause.value, pdu, m_tmsi, + mmec); } else { - parent->s1ap->initial_ue(rnti, (LIBLTE_S1AP_RRC_ESTABLISHMENT_CAUSE_ENUM)establishment_cause, pdu); + parent->s1ap->initial_ue(rnti, (LIBLTE_S1AP_RRC_ESTABLISHMENT_CAUSE_ENUM)establishment_cause.value, pdu); } state = RRC_STATE_WAIT_FOR_CON_RECONF_COMPLETE; } -void rrc::ue::handle_rrc_reconf_complete(LIBLTE_RRC_CONNECTION_RECONFIGURATION_COMPLETE_STRUCT *msg, srslte::byte_buffer_t *pdu) +void rrc::ue::handle_rrc_reconf_complete(rrc_conn_recfg_complete_s* msg, srslte::byte_buffer_t* pdu) { parent->rrc_log->info("RRCReconfigurationComplete transaction ID: %d\n", msg->rrc_transaction_id); - // Acknowledge Dedicated Configuration parent->phy->set_conf_dedicated_ack(rnti, true); parent->mac->phy_config_enabled(rnti, true); } -void rrc::ue::handle_security_mode_complete(LIBLTE_RRC_SECURITY_MODE_COMPLETE_STRUCT *msg) +void rrc::ue::handle_security_mode_complete(security_mode_complete_s* msg) { parent->rrc_log->info("SecurityModeComplete transaction ID: %d\n", msg->rrc_transaction_id); } -void rrc::ue::handle_security_mode_failure(LIBLTE_RRC_SECURITY_MODE_FAILURE_STRUCT *msg) +void rrc::ue::handle_security_mode_failure(security_mode_fail_s* msg) { parent->rrc_log->info("SecurityModeFailure transaction ID: %d\n", msg->rrc_transaction_id); } -void rrc::ue::handle_ue_cap_info(LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *msg) +void rrc::ue::handle_ue_cap_info(ue_cap_info_s* msg) { parent->rrc_log->info("UECapabilityInformation transaction ID: %d\n", msg->rrc_transaction_id); - for(uint32_t i=0; iN_ue_caps; i++) { - if(msg->ue_capability_rat[i].rat_type != LIBLTE_RRC_RAT_TYPE_EUTRA) { + ue_cap_info_r8_ies_s* msg_r8 = &msg->crit_exts.c1().ue_cap_info_r8(); + + for (uint32_t i = 0; i < msg_r8->ue_cap_rat_container_list.size(); i++) { + if (msg_r8->ue_cap_rat_container_list[i].rat_type != rat_type_e::eutra) { parent->rrc_log->warning("Not handling UE capability information for RAT type %s\n", - liblte_rrc_rat_type_text[msg->ue_capability_rat[i].rat_type]); + msg_r8->ue_cap_rat_container_list[i].rat_type.to_string().c_str()); } else { - memcpy(&eutra_capabilities, &msg->ue_capability_rat[0], sizeof(LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT)); - parent->rrc_log->info("UE rnti: 0x%x category: %d\n", rnti, msg->ue_capability_rat[0].eutra_capability.ue_category); + asn1::bit_ref bref(msg_r8->ue_cap_rat_container_list[0].ue_cap_rat_container.data(), + msg_r8->ue_cap_rat_container_list[0].ue_cap_rat_container.size()); + eutra_capabilities.unpack(bref); + parent->rrc_log->info("UE rnti: 0x%x category: %d\n", rnti, eutra_capabilities.ue_category); } } @@ -1145,15 +1201,11 @@ void rrc::ue::set_security_key(uint8_t* key, uint32_t length) memcpy(k_enb, key, length); parent->rrc_log->info_hex(k_enb, 32, "Key eNodeB (k_enb)"); // Select algos (TODO: use security capabilities and config preferences) - cipher_algo = srslte::CIPHERING_ALGORITHM_ID_EEA0; + cipher_algo = srslte::CIPHERING_ALGORITHM_ID_EEA0; // FIXME: Should i keep this type??? integ_algo = srslte::INTEGRITY_ALGORITHM_ID_128_EIA1; // Generate K_rrc_enc and K_rrc_int - security_generate_k_rrc( k_enb, - cipher_algo, - integ_algo, - k_rrc_enc, - k_rrc_int); + srslte::security_generate_k_rrc(k_enb, cipher_algo, integ_algo, k_rrc_enc, k_rrc_int); // Generate K_up_enc and K_up_int security_generate_k_up( k_enb, @@ -1307,126 +1359,143 @@ void rrc::ue::notify_s1ap_ue_erab_setup_response(LIBLTE_S1AP_E_RABTOBESETUPLISTB void rrc::ue::send_connection_reest_rej() { - LIBLTE_RRC_DL_CCCH_MSG_STRUCT dl_ccch_msg; - bzero(&dl_ccch_msg, sizeof(LIBLTE_RRC_DL_CCCH_MSG_STRUCT)); - - dl_ccch_msg.msg_type = LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST_REJ; - + dl_ccch_msg_s dl_ccch_msg; + + dl_ccch_msg.msg.set(dl_ccch_msg_type_c::types::c1); + dl_ccch_msg.msg.c1().set(dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reest_reject); + dl_ccch_msg.msg.c1().rrc_conn_reest_reject().crit_exts.set( + rrc_conn_reest_reject_s::crit_exts_c_::types::rrc_conn_reest_reject_r8); + send_dl_ccch(&dl_ccch_msg); } void rrc::ue::send_connection_reject() { - LIBLTE_RRC_DL_CCCH_MSG_STRUCT dl_ccch_msg; - bzero(&dl_ccch_msg, sizeof(LIBLTE_RRC_DL_CCCH_MSG_STRUCT)); + dl_ccch_msg_s dl_ccch_msg; + + dl_ccch_msg.msg.set(dl_ccch_msg_type_c::types::c1); + dl_ccch_msg.msg.c1().set(dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reject); - dl_ccch_msg.msg_type = LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REJ; - dl_ccch_msg.msg.rrc_con_rej.wait_time = 10; + dl_ccch_msg.msg.c1().rrc_conn_reject().crit_exts.set(rrc_conn_reject_s::crit_exts_c_::types::c1); + dl_ccch_msg.msg.c1().rrc_conn_reject().crit_exts.c1().set( + rrc_conn_reject_s::crit_exts_c_::c1_c_::types::rrc_conn_reject_r8); + dl_ccch_msg.msg.c1().rrc_conn_reject().crit_exts.c1().rrc_conn_reject_r8().wait_time = 10; send_dl_ccch(&dl_ccch_msg); } void rrc::ue::send_connection_setup(bool is_setup) { - LIBLTE_RRC_DL_CCCH_MSG_STRUCT dl_ccch_msg; - bzero(&dl_ccch_msg, sizeof(LIBLTE_RRC_DL_CCCH_MSG_STRUCT)); - - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT* rr_cfg = NULL; + dl_ccch_msg_s dl_ccch_msg; + dl_ccch_msg.msg.set(dl_ccch_msg_type_c::types::c1); + + rr_cfg_ded_s* rr_cfg = NULL; if (is_setup) { - dl_ccch_msg.msg_type = LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_SETUP; - dl_ccch_msg.msg.rrc_con_setup.rrc_transaction_id = (transaction_id++)%4; - rr_cfg = &dl_ccch_msg.msg.rrc_con_setup.rr_cnfg; + dl_ccch_msg.msg.c1().set(dl_ccch_msg_type_c::c1_c_::types::rrc_conn_setup); + dl_ccch_msg.msg.c1().rrc_conn_setup().rrc_transaction_id = (uint8_t)((transaction_id++) % 4); + dl_ccch_msg.msg.c1().rrc_conn_setup().crit_exts.set(rrc_conn_setup_s::crit_exts_c_::types::c1); + dl_ccch_msg.msg.c1().rrc_conn_setup().crit_exts.c1().set( + rrc_conn_setup_s::crit_exts_c_::c1_c_::types::rrc_conn_setup_r8); + dl_ccch_msg.msg.c1().rrc_conn_setup().crit_exts.c1().rrc_conn_setup_r8(); + rr_cfg = &dl_ccch_msg.msg.c1().rrc_conn_setup().crit_exts.c1().rrc_conn_setup_r8().rr_cfg_ded; } else { - dl_ccch_msg.msg_type = LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST; - dl_ccch_msg.msg.rrc_con_reest.rrc_transaction_id = (transaction_id++)%4; - rr_cfg = &dl_ccch_msg.msg.rrc_con_reest.rr_cnfg; - } - - // Add SRB1 to cfg - rr_cfg->srb_to_add_mod_list_size = 1; - rr_cfg->srb_to_add_mod_list[0].srb_id = 1; - rr_cfg->srb_to_add_mod_list[0].lc_cnfg_present = true; - rr_cfg->srb_to_add_mod_list[0].lc_default_cnfg_present = true; - rr_cfg->srb_to_add_mod_list[0].rlc_cnfg_present = true; - rr_cfg->srb_to_add_mod_list[0].rlc_default_cnfg_present = true; + dl_ccch_msg.msg.c1().set(dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reest); + dl_ccch_msg.msg.c1().rrc_conn_reest().rrc_transaction_id = (uint8_t)((transaction_id++) % 4); + dl_ccch_msg.msg.c1().rrc_conn_reest().crit_exts.set(rrc_conn_reest_s::crit_exts_c_::types::c1); + dl_ccch_msg.msg.c1().rrc_conn_reest().crit_exts.c1().set( + rrc_conn_reest_s::crit_exts_c_::c1_c_::types::rrc_conn_reest_r8); + rr_cfg = &dl_ccch_msg.msg.c1().rrc_conn_reest().crit_exts.c1().rrc_conn_reest_r8().rr_cfg_ded; + } + + // Add SRB1 to cfg + rr_cfg->srb_to_add_mod_list_present = true; + rr_cfg->srb_to_add_mod_list.resize(1); + rr_cfg->srb_to_add_mod_list[0].srb_id = 1; + rr_cfg->srb_to_add_mod_list[0].lc_ch_cfg_present = true; + rr_cfg->srb_to_add_mod_list[0].lc_ch_cfg.set(srb_to_add_mod_s::lc_ch_cfg_c_::types::default_value); + rr_cfg->srb_to_add_mod_list[0].rlc_cfg_present = true; + rr_cfg->srb_to_add_mod_list[0].rlc_cfg.set(srb_to_add_mod_s::rlc_cfg_c_::types::default_value); // mac-MainConfig - rr_cfg->mac_main_cnfg_present = true; - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_cfg = &rr_cfg->mac_main_cnfg.explicit_value; - mac_cfg->ulsch_cnfg_present = true; - memcpy(&mac_cfg->ulsch_cnfg, &parent->cfg.mac_cnfg.ulsch_cnfg, sizeof(LIBLTE_RRC_ULSCH_CONFIG_STRUCT)); - mac_cfg->drx_cnfg_present = false; - mac_cfg->phr_cnfg_present = true; - memcpy(&mac_cfg->phr_cnfg, &parent->cfg.mac_cnfg.phr_cnfg, sizeof(LIBLTE_RRC_PHR_CONFIG_STRUCT)); - mac_cfg->time_alignment_timer = parent->cfg.mac_cnfg.time_alignment_timer; - + rr_cfg->mac_main_cfg_present = true; + rr_cfg->mac_main_cfg.set(rr_cfg_ded_s::mac_main_cfg_c_::types::explicit_value); + mac_main_cfg_s* mac_cfg = &rr_cfg->mac_main_cfg.explicit_value(); + mac_cfg->ul_sch_cfg_present = true; + mac_cfg->ul_sch_cfg = parent->cfg.mac_cnfg.ul_sch_cfg; + mac_cfg->phr_cfg_present = true; + mac_cfg->phr_cfg = parent->cfg.mac_cnfg.phr_cfg; + mac_cfg->time_align_timer_ded = parent->cfg.mac_cnfg.time_align_timer_ded; + // physicalConfigDedicated - rr_cfg->phy_cnfg_ded_present = true; - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cfg = &rr_cfg->phy_cnfg_ded; - bzero(phy_cfg, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); - phy_cfg->pusch_cnfg_ded_present = true; - memcpy(&phy_cfg->pusch_cnfg_ded, &parent->cfg.pusch_cfg, sizeof(LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT)); - phy_cfg->sched_request_cnfg_present = true; - phy_cfg->sched_request_cnfg.setup_present = true; - phy_cfg->sched_request_cnfg.dsr_trans_max = parent->cfg.sr_cfg.dsr_max; - - phy_cfg->antenna_info_default_value = true; - phy_cfg->antenna_info_present = false; + rr_cfg->phys_cfg_ded_present = true; + phys_cfg_ded_s* phy_cfg = &rr_cfg->phys_cfg_ded; + phy_cfg->pusch_cfg_ded_present = true; + phy_cfg->pusch_cfg_ded = parent->cfg.pusch_cfg; + phy_cfg->sched_request_cfg_present = true; + phy_cfg->sched_request_cfg.set(sched_request_cfg_c::types::setup); + phy_cfg->sched_request_cfg.setup().dsr_trans_max = parent->cfg.sr_cfg.dsr_max; + + // phy_cfg->ant_info_present = false; + // phy_cfg->ant_info.set(phys_cfg_ded_s::ant_info_c_::types::default_value); + // set default antenna config + phy_cfg->ant_info_present = true; + phy_cfg->ant_info.set(phys_cfg_ded_s::ant_info_c_::types::explicit_value); + phy_cfg->ant_info.explicit_value().tx_mode.value = ant_info_ded_s::tx_mode_e_::tm1; + phy_cfg->ant_info.explicit_value().ue_tx_ant_sel.set(setup_e::release); if (is_setup) { - if (sr_allocate(parent->cfg.sr_cfg.period, &phy_cfg->sched_request_cnfg.sr_cnfg_idx, &phy_cfg->sched_request_cnfg.sr_pucch_resource_idx)) { + if (sr_allocate(parent->cfg.sr_cfg.period, &phy_cfg->sched_request_cfg.setup().sr_cfg_idx, + &phy_cfg->sched_request_cfg.setup().sr_pucch_res_idx)) { parent->rrc_log->error("Allocating SR resources for rnti=%d\n", rnti); return; } } else { - phy_cfg->sched_request_cnfg.sr_cnfg_idx = sr_I; - phy_cfg->sched_request_cnfg.sr_pucch_resource_idx = sr_N_pucch; + phy_cfg->sched_request_cfg.setup().sr_cfg_idx = (uint8_t)sr_I; + phy_cfg->sched_request_cfg.setup().sr_pucch_res_idx = (uint16_t)sr_N_pucch; } // Power control phy_cfg->ul_pwr_ctrl_ded_present = true; phy_cfg->ul_pwr_ctrl_ded.p0_ue_pusch = 0; - phy_cfg->ul_pwr_ctrl_ded.delta_mcs_en = LIBLTE_RRC_DELTA_MCS_ENABLED_EN0; - phy_cfg->ul_pwr_ctrl_ded.accumulation_en = true; - phy_cfg->ul_pwr_ctrl_ded.p0_ue_pucch = 0, - phy_cfg->ul_pwr_ctrl_ded.p_srs_offset = 3; + phy_cfg->ul_pwr_ctrl_ded.delta_mcs_enabled = ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_::en0; + phy_cfg->ul_pwr_ctrl_ded.accumulation_enabled = true; + phy_cfg->ul_pwr_ctrl_ded.p0_ue_pucch = 0, phy_cfg->ul_pwr_ctrl_ded.p_srs_offset = 3; // PDSCH - phy_cfg->pdsch_cnfg_ded_present = true; - phy_cfg->pdsch_cnfg_ded = parent->cfg.pdsch_cfg; + phy_cfg->pdsch_cfg_ded_present = true; + phy_cfg->pdsch_cfg_ded.p_a = parent->cfg.pdsch_cfg; // PUCCH - phy_cfg->pucch_cnfg_ded_present = true; - phy_cfg->pucch_cnfg_ded.ack_nack_repetition_n1_pucch_an = 0; + phy_cfg->pucch_cfg_ded_present = true; + phy_cfg->pucch_cfg_ded.ack_nack_repeat.set(pucch_cfg_ded_s::ack_nack_repeat_c_::types::setup); + phy_cfg->pucch_cfg_ded.ack_nack_repeat.setup().n1_pucch_an_rep = 0; - phy_cfg->cqi_report_cnfg_present = true; + phy_cfg->cqi_report_cfg_present = true; if(parent->cfg.cqi_cfg.mode == RRC_CFG_CQI_MODE_APERIODIC) { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic_present = true; - phy_cfg->cqi_report_cnfg.report_mode_aperiodic = LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM30; + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic_present = true; + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic = cqi_report_mode_aperiodic_e::rm30; } else { - phy_cfg->cqi_report_cnfg.report_periodic_present = true; - phy_cfg->cqi_report_cnfg.report_periodic_setup_present = true; - phy_cfg->cqi_report_cnfg.report_periodic.format_ind_periodic = LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_WIDEBAND_CQI; - phy_cfg->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi = false; + phy_cfg->cqi_report_cfg.cqi_report_periodic_present = true; + phy_cfg->cqi_report_cfg.cqi_report_periodic.set(setup_e::setup); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_format_ind_periodic.set( + cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types::wideband_cqi); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().simul_ack_nack_and_cqi = false; if (is_setup) { - if (cqi_allocate(parent->cfg.cqi_cfg.period, - &phy_cfg->cqi_report_cnfg.report_periodic.pmi_cnfg_idx, - &phy_cfg->cqi_report_cnfg.report_periodic.pucch_resource_idx)) - { + if (cqi_allocate(parent->cfg.cqi_cfg.period, &phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx, + &phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx)) { parent->rrc_log->error("Allocating CQI resources for rnti=%d\n", rnti); return; } } else { - phy_cfg->cqi_report_cnfg.report_periodic.pucch_resource_idx = cqi_pucch; - phy_cfg->cqi_report_cnfg.report_periodic.pmi_cnfg_idx = cqi_idx; + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx = (uint16_t)cqi_pucch; + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx = (uint16_t)cqi_idx; } } - phy_cfg->cqi_report_cnfg.nom_pdsch_rs_epre_offset = 0; - - + phy_cfg->cqi_report_cfg.nom_pdsch_rs_epre_offset = 0; + // Add SRB1 to Scheduler srsenb::sched_interface::ue_cfg_t sched_cfg; bzero(&sched_cfg, sizeof(srsenb::sched_interface::ue_cfg_t)); - sched_cfg.maxharq_tx = liblte_rrc_max_harq_tx_num[parent->cfg.mac_cnfg.ulsch_cnfg.max_harq_tx]; + sched_cfg.maxharq_tx = parent->cfg.mac_cnfg.ul_sch_cfg.max_harq_tx.to_number(); sched_cfg.continuous_pusch = false; sched_cfg.aperiodic_cqi_period = parent->cfg.cqi_cfg.mode == RRC_CFG_CQI_MODE_APERIODIC?parent->cfg.cqi_cfg.period:0; sched_cfg.ue_bearers[0].direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH; @@ -1437,11 +1506,11 @@ void rrc::ue::send_connection_setup(bool is_setup) sched_cfg.cqi_pucch = cqi_pucch; sched_cfg.cqi_idx = cqi_idx; sched_cfg.cqi_enabled = parent->cfg.cqi_cfg.mode == RRC_CFG_CQI_MODE_PERIODIC; - sched_cfg.pucch_cfg.delta_pucch_shift = liblte_rrc_delta_pucch_shift_num[parent->sib2.rr_config_common_sib.pucch_cnfg.delta_pucch_shift%LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS]; - sched_cfg.pucch_cfg.N_cs = parent->sib2.rr_config_common_sib.pucch_cnfg.n_cs_an; - sched_cfg.pucch_cfg.n_rb_2 = parent->sib2.rr_config_common_sib.pucch_cnfg.n_rb_cqi; - sched_cfg.pucch_cfg.n1_pucch_an = parent->sib2.rr_config_common_sib.pucch_cnfg.n1_pucch_an; - + sched_cfg.pucch_cfg.delta_pucch_shift = parent->sib2.rr_cfg_common.pucch_cfg_common.delta_pucch_shift.to_number(); + sched_cfg.pucch_cfg.N_cs = parent->sib2.rr_cfg_common.pucch_cfg_common.n_cs_an; + sched_cfg.pucch_cfg.n_rb_2 = parent->sib2.rr_cfg_common.pucch_cfg_common.n_rb_cqi; + sched_cfg.pucch_cfg.n1_pucch_an = parent->sib2.rr_cfg_common.pucch_cfg_common.n1_pucch_an; + // Configure MAC parent->mac->ue_cfg(rnti, &sched_cfg); @@ -1458,14 +1527,15 @@ void rrc::ue::send_connection_setup(bool is_setup) // Configure PHY layer parent->phy->set_config_dedicated(rnti, phy_cfg); parent->phy->set_conf_dedicated_ack(rnti, false); - parent->mac->set_dl_ant_info(rnti, &phy_cfg->antenna_info_explicit_value); + parent->mac->set_dl_ant_info(rnti, &phy_cfg->ant_info); parent->mac->phy_config_enabled(rnti, false); - - rr_cfg->drb_to_add_mod_list_size = 0; - rr_cfg->drb_to_release_list_size = 0; - rr_cfg->rlf_timers_and_constants_present = false; - rr_cfg->sps_cnfg_present = false; - + + rr_cfg->drb_to_add_mod_list_present = false; + rr_cfg->drb_to_release_list_present = false; + rr_cfg->rlf_timers_and_consts_r9_present = false; + rr_cfg->sps_cfg_present = false; + // rr_cfg->rlf_timers_and_constants_present = false; + send_dl_ccch(&dl_ccch_msg); } @@ -1476,20 +1546,24 @@ void rrc::ue::send_connection_reest() void rrc::ue::send_connection_release() { - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RELEASE; - dl_dcch_msg.msg.rrc_con_release.rrc_transaction_id = (transaction_id++)%4; - dl_dcch_msg.msg.rrc_con_release.release_cause = LIBLTE_RRC_RELEASE_CAUSE_OTHER; - + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg.msg.c1().set(dl_dcch_msg_type_c::c1_c_::types::rrc_conn_release); + dl_dcch_msg.msg.c1().rrc_conn_release().rrc_transaction_id = (uint8_t)((transaction_id++) % 4); + dl_dcch_msg.msg.c1().rrc_conn_release().crit_exts.set(rrc_conn_release_s::crit_exts_c_::types::c1); + dl_dcch_msg.msg.c1().rrc_conn_release().crit_exts.c1().set( + rrc_conn_release_s::crit_exts_c_::c1_c_::types::rrc_conn_release_r8); + dl_dcch_msg.msg.c1().rrc_conn_release().crit_exts.c1().rrc_conn_release_r8().release_cause = release_cause_e::other; + send_dl_dcch(&dl_dcch_msg); } -int rrc::ue::get_drbid_config(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb, int drb_id) +int rrc::ue::get_drbid_config(drb_to_add_mod_s* drb, int drb_id) { - uint32_t lc_id = drb_id + 2; - uint32_t erab_id = lc_id + 2; - uint32_t qci = erabs[erab_id].qos_params.qCI.QCI; - + uint32_t lc_id = (uint32_t)(drb_id + 2); + uint32_t erab_id = lc_id + 2; + uint32_t qci = erabs[erab_id].qos_params.qCI.QCI; + if (qci >= MAX_NOF_QCI) { parent->rrc_log->error("Invalid QCI=%d for ERAB_id=%d, DRB_id=%d\n", qci, erab_id, drb_id); return -1; @@ -1499,78 +1573,75 @@ int rrc::ue::get_drbid_config(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb, int drb_id) parent->rrc_log->error("QCI=%d not configured\n", qci); return -1; } - - // Add DRB1 to the message - drb->drb_id = drb_id; - drb->lc_id = lc_id; - drb->lc_id_present = true; - drb->eps_bearer_id = erab_id; - drb->eps_bearer_id_present = true; - - drb->lc_cnfg_present = true; - drb->lc_cnfg.ul_specific_params_present = true; - drb->lc_cnfg.log_chan_sr_mask_present = false; - drb->lc_cnfg.ul_specific_params.log_chan_group_present = true; - memcpy(&drb->lc_cnfg.ul_specific_params, &parent->cfg.qci_cfg[qci].lc_cfg, sizeof(LIBLTE_RRC_UL_SPECIFIC_PARAMETERS_STRUCT)); - - drb->pdcp_cnfg_present = true; - memcpy(&drb->pdcp_cnfg, &parent->cfg.qci_cfg[qci].pdcp_cfg, sizeof(LIBLTE_RRC_PDCP_CONFIG_STRUCT)); - drb->rlc_cnfg_present = true; - memcpy(&drb->rlc_cnfg, &parent->cfg.qci_cfg[qci].rlc_cfg, sizeof(LIBLTE_RRC_RLC_CONFIG_STRUCT)); - + // Add DRB1 to the message + drb->drb_id = (uint8_t)drb_id; + drb->lc_ch_id_present = true; + drb->lc_ch_id = (uint8_t)lc_id; + drb->eps_bearer_id = (uint8_t)erab_id; + drb->eps_bearer_id_present = true; + + drb->lc_ch_cfg_present = true; + drb->lc_ch_cfg.ul_specific_params_present = true; + drb->lc_ch_cfg.ul_specific_params.lc_ch_group_present = true; + drb->lc_ch_cfg.ul_specific_params = parent->cfg.qci_cfg[qci].lc_cfg; + + drb->pdcp_cfg_present = true; + drb->pdcp_cfg = parent->cfg.qci_cfg[qci].pdcp_cfg; + + drb->rlc_cfg_present = true; + drb->rlc_cfg = parent->cfg.qci_cfg[qci].rlc_cfg; + return 0; } void rrc::ue::send_connection_reconf_upd(srslte::byte_buffer_t *pdu) { - - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - bzero(&dl_dcch_msg, sizeof(LIBLTE_RRC_DL_DCCH_MSG_STRUCT)); - - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG; - dl_dcch_msg.msg.rrc_con_reconfig.rrc_transaction_id = (transaction_id++)%4; - - LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT* rr_cfg = &dl_dcch_msg.msg.rrc_con_reconfig.rr_cnfg_ded; - - dl_dcch_msg.msg.rrc_con_reconfig.rr_cnfg_ded_present = true; - - rr_cfg->phy_cnfg_ded_present = true; - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cfg = &rr_cfg->phy_cnfg_ded; - bzero(phy_cfg, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); - phy_cfg->sched_request_cnfg_present = true; - phy_cfg->sched_request_cnfg.setup_present = true; - phy_cfg->sched_request_cnfg.dsr_trans_max = parent->cfg.sr_cfg.dsr_max; - - phy_cfg->cqi_report_cnfg_present = true; + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg.msg.c1().set(dl_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg); + rrc_conn_recfg_s* rrc_conn_recfg = &dl_dcch_msg.msg.c1().rrc_conn_recfg(); + rrc_conn_recfg->rrc_transaction_id = (uint8_t)((transaction_id++) % 4); + rrc_conn_recfg->crit_exts.set(rrc_conn_recfg_s::crit_exts_c_::types::c1); + rrc_conn_recfg->crit_exts.c1().set(rrc_conn_recfg_s::crit_exts_c_::c1_c_::types::rrc_conn_recfg_r8); + + rrc_conn_recfg->crit_exts.c1().rrc_conn_recfg_r8().rr_cfg_ded_present = true; + rr_cfg_ded_s* rr_cfg = &rrc_conn_recfg->crit_exts.c1().rrc_conn_recfg_r8().rr_cfg_ded; + + rr_cfg->phys_cfg_ded_present = true; + phys_cfg_ded_s* phy_cfg = &rr_cfg->phys_cfg_ded; + phy_cfg->sched_request_cfg_present = true; + phy_cfg->sched_request_cfg.set(sched_request_cfg_c::types::setup); + phy_cfg->sched_request_cfg.setup().dsr_trans_max = parent->cfg.sr_cfg.dsr_max; + + phy_cfg->cqi_report_cfg_present = true; if (cqi_allocated) { - cqi_get(&phy_cfg->cqi_report_cnfg.report_periodic.pmi_cnfg_idx, - &phy_cfg->cqi_report_cnfg.report_periodic.pucch_resource_idx); - phy_cfg->cqi_report_cnfg.report_periodic_present = true; - phy_cfg->cqi_report_cnfg.report_periodic_setup_present = true; - phy_cfg->cqi_report_cnfg.report_periodic.format_ind_periodic = - LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_WIDEBAND_CQI; - phy_cfg->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi = parent->cfg.cqi_cfg.simultaneousAckCQI; - if (parent->cfg.antenna_info.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3 || - parent->cfg.antenna_info.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { - phy_cfg->cqi_report_cnfg.report_periodic.ri_cnfg_idx_present = true; - phy_cfg->cqi_report_cnfg.report_periodic.ri_cnfg_idx = 483; /* TODO: HARDCODED! Add to UL scheduler */ + phy_cfg->cqi_report_cfg.cqi_report_periodic_present = true; + phy_cfg->cqi_report_cfg.cqi_report_periodic.set(cqi_report_periodic_c::types::setup); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_format_ind_periodic.set( + cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types::wideband_cqi); + cqi_get(&phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx, + &phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().simul_ack_nack_and_cqi = parent->cfg.cqi_cfg.simultaneousAckCQI; + if (parent->cfg.antenna_info.tx_mode == ant_info_ded_s::tx_mode_e_::tm3 || + parent->cfg.antenna_info.tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present = true; + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx = 483; /* TODO: HARDCODED! Add to UL scheduler */ } else { - phy_cfg->cqi_report_cnfg.report_periodic.ri_cnfg_idx_present = false; + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present = false; } } else { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic_present = true; - if (phy_cfg->antenna_info_present && - parent->cfg.antenna_info.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic = LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31; + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic_present = true; + if (phy_cfg->ant_info_present && parent->cfg.antenna_info.tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic = cqi_report_mode_aperiodic_e::rm31; } else { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic = LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM30; + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic = cqi_report_mode_aperiodic_e::rm30; } } parent->phy->set_config_dedicated(rnti, phy_cfg); - sr_get(&phy_cfg->sched_request_cnfg.sr_cnfg_idx, &phy_cfg->sched_request_cnfg.sr_pucch_resource_idx); - + sr_get(&phy_cfg->sched_request_cfg.setup().sr_cfg_idx, &phy_cfg->sched_request_cfg.setup().sr_pucch_res_idx); + pdu->reset(); send_dl_dcch(&dl_dcch_msg, pdu); @@ -1581,81 +1652,82 @@ void rrc::ue::send_connection_reconf_upd(srslte::byte_buffer_t *pdu) void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu) { - - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG; - dl_dcch_msg.msg.rrc_con_reconfig.rrc_transaction_id = (transaction_id++)%4; - - LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT* conn_reconf = &dl_dcch_msg.msg.rrc_con_reconfig; - conn_reconf->rr_cnfg_ded_present = true; - conn_reconf->rr_cnfg_ded.mac_main_cnfg_present = false; - conn_reconf->rr_cnfg_ded.phy_cnfg_ded_present = false; - conn_reconf->rr_cnfg_ded.rlf_timers_and_constants_present = false; - conn_reconf->rr_cnfg_ded.sps_cnfg_present = false; - conn_reconf->rr_cnfg_ded.drb_to_release_list_size = 0; - conn_reconf->meas_cnfg_present = false; - conn_reconf->mob_ctrl_info_present = false; - conn_reconf->sec_cnfg_ho_present = false; - - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cfg = &conn_reconf->rr_cnfg_ded.phy_cnfg_ded; - bzero(phy_cfg, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); - conn_reconf->rr_cnfg_ded.phy_cnfg_ded_present = true; + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg.msg.c1().set(dl_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg); + dl_dcch_msg.msg.c1().rrc_conn_recfg().rrc_transaction_id = (uint8_t)((transaction_id++) % 4); + dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.set(rrc_conn_recfg_s::crit_exts_c_::types::c1); + dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().set( + rrc_conn_recfg_s::crit_exts_c_::c1_c_::types::rrc_conn_recfg_r8); - if (parent->cfg.antenna_info.tx_mode > LIBLTE_RRC_TRANSMISSION_MODE_1) { - memcpy(&phy_cfg->antenna_info_explicit_value, &parent->cfg.antenna_info, - sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT)); - phy_cfg->antenna_info_present = true; - phy_cfg->antenna_info_default_value = false; + rrc_conn_recfg_r8_ies_s* conn_reconf = &dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().rrc_conn_recfg_r8(); + conn_reconf->rr_cfg_ded_present = true; + + conn_reconf->rr_cfg_ded.phys_cfg_ded_present = true; + phys_cfg_ded_s* phy_cfg = &conn_reconf->rr_cfg_ded.phys_cfg_ded; + + if (parent->cfg.antenna_info.tx_mode > ant_info_ded_s::tx_mode_e_::tm1) { + phy_cfg->ant_info_present = true; + phy_cfg->ant_info.set(phys_cfg_ded_s::ant_info_c_::types::explicit_value); + phy_cfg->ant_info.explicit_value() = parent->cfg.antenna_info; + } else { + phy_cfg->ant_info_present = true; + phy_cfg->ant_info.set(phys_cfg_ded_s::ant_info_c_::types::explicit_value); + phy_cfg->ant_info.explicit_value().tx_mode.value = ant_info_ded_s::tx_mode_e_::tm1; + phy_cfg->ant_info.explicit_value().ue_tx_ant_sel.set(setup_e::release); } // Configure PHY layer - phy_cfg->cqi_report_cnfg_present = true; - if(parent->cfg.cqi_cfg.mode == RRC_CFG_CQI_MODE_APERIODIC) { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic_present = true; - if (phy_cfg->antenna_info_present && - phy_cfg->antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic = LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31; + phy_cfg->cqi_report_cfg_present = true; + if (parent->cfg.cqi_cfg.mode == RRC_CFG_CQI_MODE_APERIODIC) { + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic_present = true; + if (phy_cfg->ant_info_present and + phy_cfg->ant_info.explicit_value().tx_mode.value == ant_info_ded_s::tx_mode_e_::tm4) { + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic = cqi_report_mode_aperiodic_e::rm31; } else { - phy_cfg->cqi_report_cnfg.report_mode_aperiodic = LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM30; + phy_cfg->cqi_report_cfg.cqi_report_mode_aperiodic = cqi_report_mode_aperiodic_e::rm30; } } else { - cqi_get(&phy_cfg->cqi_report_cnfg.report_periodic.pmi_cnfg_idx, - &phy_cfg->cqi_report_cnfg.report_periodic.pucch_resource_idx); - phy_cfg->cqi_report_cnfg.report_periodic_present = true; - phy_cfg->cqi_report_cnfg.report_periodic_setup_present = true; - phy_cfg->cqi_report_cnfg.report_periodic.format_ind_periodic = LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_WIDEBAND_CQI; - phy_cfg->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi = parent->cfg.cqi_cfg.simultaneousAckCQI; - if (phy_cfg->antenna_info_present && - (phy_cfg->antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3 || - phy_cfg->antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4)) { - phy_cfg->cqi_report_cnfg.report_periodic.ri_cnfg_idx_present = true; - phy_cfg->cqi_report_cnfg.report_periodic.ri_cnfg_idx = 483; + phy_cfg->cqi_report_cfg.cqi_report_periodic_present = true; + phy_cfg->cqi_report_cfg.cqi_report_periodic.set(cqi_report_periodic_c::types::setup); + cqi_get(&phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx, + &phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_format_ind_periodic.set( + cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types::wideband_cqi); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().simul_ack_nack_and_cqi = parent->cfg.cqi_cfg.simultaneousAckCQI; + if (phy_cfg->ant_info_present and + ((phy_cfg->ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm3) || + (phy_cfg->ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm4))) { + phy_cfg->cqi_report_cfg.cqi_report_periodic.set(cqi_report_periodic_c::types::setup); + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present = true; + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx = 483; } else { - phy_cfg->cqi_report_cnfg.report_periodic.ri_cnfg_idx_present = false; + phy_cfg->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present = false; } } - phy_cfg->cqi_report_cnfg.nom_pdsch_rs_epre_offset = 0; + phy_cfg->cqi_report_cfg.nom_pdsch_rs_epre_offset = 0; parent->phy->set_config_dedicated(rnti, phy_cfg); parent->phy->set_conf_dedicated_ack(rnti, false); - parent->mac->set_dl_ant_info(rnti, &phy_cfg->antenna_info_explicit_value); + parent->mac->set_dl_ant_info(rnti, &phy_cfg->ant_info); parent->mac->phy_config_enabled(rnti, false); - // Add SRB2 to the message - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list_size = 1; - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list[0].srb_id = 2; - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list[0].lc_cnfg_present = true; - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list[0].lc_default_cnfg_present = true; - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list[0].rlc_cnfg_present = true; - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list[0].rlc_default_cnfg_present = true; - - // Get DRB1 configuration - if (get_drbid_config(&conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[0], 1)) { + // Add SRB2 to the message + conn_reconf->rr_cfg_ded.srb_to_add_mod_list_present = true; + conn_reconf->rr_cfg_ded.srb_to_add_mod_list.resize(1); + conn_reconf->rr_cfg_ded.srb_to_add_mod_list[0].srb_id = 2; + conn_reconf->rr_cfg_ded.srb_to_add_mod_list[0].lc_ch_cfg_present = true; + conn_reconf->rr_cfg_ded.srb_to_add_mod_list[0].lc_ch_cfg.set(srb_to_add_mod_s::lc_ch_cfg_c_::types::default_value); + conn_reconf->rr_cfg_ded.srb_to_add_mod_list[0].rlc_cfg_present = true; + conn_reconf->rr_cfg_ded.srb_to_add_mod_list[0].rlc_cfg.set(srb_to_add_mod_s::rlc_cfg_c_::types::default_value); + + // Get DRB1 configuration + conn_reconf->rr_cfg_ded.drb_to_add_mod_list_present = true; + conn_reconf->rr_cfg_ded.drb_to_add_mod_list.resize(1); + if (get_drbid_config(&conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0], 1)) { parent->rrc_log->error("Getting DRB1 configuration\n"); printf("The QCI %d for DRB1 is invalid or not configured.\n", erabs[5].qos_params.qCI.QCI); return; - } else { - conn_reconf->rr_cnfg_ded.drb_to_add_mod_list_size = 1; } // Add SRB2 and DRB1 to the scheduler @@ -1663,7 +1735,7 @@ void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu) bearer_cfg.direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH; bearer_cfg.group = 0; parent->mac->bearer_ue_cfg(rnti, 2, &bearer_cfg); - bearer_cfg.group = conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[0].lc_cnfg.ul_specific_params.log_chan_group; + bearer_cfg.group = conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].lc_ch_cfg.ul_specific_params.lc_ch_group; parent->mac->bearer_ue_cfg(rnti, 3, &bearer_cfg); // Configure SRB2 in RLC and PDCP @@ -1678,13 +1750,14 @@ void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu) parent->pdcp->add_bearer(rnti, 2, pdcp_cnfg); // Configure DRB1 in RLC - parent->rlc->add_bearer(rnti, 3, &conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[0].rlc_cnfg); + parent->rlc->add_bearer(rnti, 3, &conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].rlc_cfg); // Configure DRB1 in PDCP pdcp_cnfg.is_control = false; pdcp_cnfg.is_data = true; - if (conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[0].pdcp_cnfg.rlc_um_pdcp_sn_size_present) { - if(LIBLTE_RRC_PDCP_SN_SIZE_7_BITS == conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[0].pdcp_cnfg.rlc_um_pdcp_sn_size) { + if (conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].pdcp_cfg.rlc_um_present) { + if (conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].pdcp_cfg.rlc_um.pdcp_sn_size.value == + pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::len7bits) { pdcp_cnfg.sn_len = 7; } } @@ -1694,16 +1767,16 @@ void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu) // Add NAS Attach accept if(nas_pending){ - parent->rrc_log->debug("Adding NAS message to connection reconfiguration\n"); - conn_reconf->N_ded_info_nas = 1; - parent->rrc_log->info_hex(erab_info.buffer, erab_info.N_bytes, "connection_reconf erab_info -> nas_info rnti 0x%x\n", rnti); - conn_reconf->ded_info_nas_list[0].N_bytes = erab_info.N_bytes; - memcpy(conn_reconf->ded_info_nas_list[0].msg, erab_info.buffer, erab_info.N_bytes); + conn_reconf->ded_info_nas_list_present = true; + conn_reconf->ded_info_nas_list.resize(1); + conn_reconf->ded_info_nas_list[0].resize(erab_info.N_bytes); + memcpy(conn_reconf->ded_info_nas_list[0].data(), erab_info.buffer, erab_info.N_bytes); } else { parent->rrc_log->debug("Not adding NAS message to connection reconfiguration\n"); - conn_reconf->N_ded_info_nas = 0; + conn_reconf->ded_info_nas_list.resize(0); } + // Reuse same PDU pdu->reset(); @@ -1716,22 +1789,15 @@ void rrc::ue::send_connection_reconf_new_bearer(LIBLTE_S1AP_E_RABTOBESETUPLISTBE { srslte::byte_buffer_t *pdu = pool_allocate; - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG; - dl_dcch_msg.msg.rrc_con_reconfig.rrc_transaction_id = (transaction_id++)%4; - - LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT* conn_reconf = &dl_dcch_msg.msg.rrc_con_reconfig; - conn_reconf->rr_cnfg_ded_present = true; - conn_reconf->rr_cnfg_ded.mac_main_cnfg_present = false; - conn_reconf->rr_cnfg_ded.phy_cnfg_ded_present = false; - conn_reconf->rr_cnfg_ded.rlf_timers_and_constants_present = false; - conn_reconf->rr_cnfg_ded.sps_cnfg_present = false; - conn_reconf->rr_cnfg_ded.drb_to_release_list_size = 0; - conn_reconf->rr_cnfg_ded.srb_to_add_mod_list_size = 0; - conn_reconf->rr_cnfg_ded.drb_to_add_mod_list_size = 0; - conn_reconf->meas_cnfg_present = false; - conn_reconf->mob_ctrl_info_present = false; - conn_reconf->sec_cnfg_ho_present = false; + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg.msg.c1().set(dl_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg); + dl_dcch_msg.msg.c1().rrc_conn_recfg().rrc_transaction_id = (uint8_t)((transaction_id++) % 4); + + dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.set(rrc_conn_recfg_s::crit_exts_c_::types::c1); + dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().set( + rrc_conn_recfg_s::crit_exts_c_::c1_c_::types::rrc_conn_recfg_r8); + rrc_conn_recfg_r8_ies_s* conn_reconf = &dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().rrc_conn_recfg_r8(); for(uint32_t i=0; ilen; i++) { LIBLTE_S1AP_E_RABTOBESETUPITEMBEARERSUREQ_STRUCT *erab = &e->buffer[i]; @@ -1739,12 +1805,11 @@ void rrc::ue::send_connection_reconf_new_bearer(LIBLTE_S1AP_E_RABTOBESETUPLISTBE uint8_t lcid = id - 2; // Map e.g. E-RAB 5 to LCID 3 (==DRB1) // Get DRB configuration - if (get_drbid_config(&conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[i], lcid-2)) { + drb_to_add_mod_s drb_item; + if (get_drbid_config(&drb_item, lcid - 2)) { parent->rrc_log->error("Getting DRB configuration\n"); printf("ERROR: The QCI %d is invalid or not configured.\n", erabs[lcid+4].qos_params.qCI.QCI); return; - } else { - conn_reconf->rr_cnfg_ded.drb_to_add_mod_list_size++; } // Add DRB to the scheduler @@ -1753,90 +1818,102 @@ void rrc::ue::send_connection_reconf_new_bearer(LIBLTE_S1AP_E_RABTOBESETUPLISTBE parent->mac->bearer_ue_cfg(rnti, lcid, &bearer_cfg); // Configure DRB in RLC - parent->rlc->add_bearer(rnti, lcid, &conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[i].rlc_cnfg); + parent->rlc->add_bearer(rnti, lcid, &drb_item.rlc_cfg); // Configure DRB in PDCP srslte::srslte_pdcp_config_t pdcp_config; - pdcp_config.bearer_id = conn_reconf->rr_cnfg_ded.drb_to_add_mod_list[i].drb_id; + pdcp_config.bearer_id = drb_item.drb_id; pdcp_config.is_data = true; pdcp_config.direction = SECURITY_DIRECTION_DOWNLINK; parent->pdcp->add_bearer(rnti, lcid, pdcp_config); + // DRB has already been configured in GTPU through bearer setup + conn_reconf->rr_cfg_ded.drb_to_add_mod_list.push_back(drb_item); + // Add NAS message parent->rrc_log->info_hex(erab_info.buffer, erab_info.N_bytes, "reconf_new_bearer erab_info -> nas_info rnti 0x%x\n", rnti); - conn_reconf->ded_info_nas_list[conn_reconf->N_ded_info_nas].N_bytes = erab_info.N_bytes; - memcpy(conn_reconf->ded_info_nas_list[conn_reconf->N_ded_info_nas].msg, erab_info.buffer, erab_info.N_bytes); - conn_reconf->N_ded_info_nas++; + asn1::dyn_octstring octstr(erab_info.N_bytes); + memcpy(octstr.data(), erab_info.msg, erab_info.N_bytes); + conn_reconf->ded_info_nas_list.push_back(octstr); } + conn_reconf->rr_cfg_ded.drb_to_add_mod_list_present = conn_reconf->rr_cfg_ded.drb_to_add_mod_list.size() > 0; + conn_reconf->ded_info_nas_list_present = conn_reconf->ded_info_nas_list.size() > 0; send_dl_dcch(&dl_dcch_msg, pdu); } void rrc::ue::send_security_mode_command() { - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_SECURITY_MODE_COMMAND; + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg.msg.c1().set(dl_dcch_msg_type_c::c1_c_::types::security_mode_cmd); - LIBLTE_RRC_SECURITY_MODE_COMMAND_STRUCT* comm = &dl_dcch_msg.msg.security_mode_cmd; - comm->rrc_transaction_id = (transaction_id++)%4; + security_mode_cmd_s* comm = &dl_dcch_msg.msg.c1().security_mode_cmd(); + comm->rrc_transaction_id = (uint8_t)((transaction_id++) % 4); // TODO: select these based on UE capabilities and preference order - comm->sec_algs.cipher_alg = (LIBLTE_RRC_CIPHERING_ALGORITHM_ENUM)cipher_algo; - comm->sec_algs.int_alg = (LIBLTE_RRC_INTEGRITY_PROT_ALGORITHM_ENUM)integ_algo; + comm->crit_exts.set(security_mode_cmd_s::crit_exts_c_::types::c1); + comm->crit_exts.c1().set(security_mode_cmd_s::crit_exts_c_::c1_c_::types::security_mode_cmd_r8); + comm->crit_exts.c1().security_mode_cmd_r8().security_cfg_smc.security_algorithm_cfg.ciphering_algorithm = + (ciphering_algorithm_r12_e::options)cipher_algo; + comm->crit_exts.c1().security_mode_cmd_r8().security_cfg_smc.security_algorithm_cfg.integrity_prot_algorithm = + (security_algorithm_cfg_s::integrity_prot_algorithm_e_::options)integ_algo; send_dl_dcch(&dl_dcch_msg); } void rrc::ue::send_ue_cap_enquiry() { - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - dl_dcch_msg.msg_type = LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_CAPABILITY_ENQUIRY; + dl_dcch_msg_s dl_dcch_msg; + dl_dcch_msg.msg.set(dl_dcch_msg_type_c::types::c1); + dl_dcch_msg.msg.c1().set(dl_dcch_msg_type_c::c1_c_::types::ue_cap_enquiry); - LIBLTE_RRC_UE_CAPABILITY_ENQUIRY_STRUCT* enq = &dl_dcch_msg.msg.ue_cap_enquiry; - enq->rrc_transaction_id = (transaction_id++)%4; + ue_cap_enquiry_s* enq = &dl_dcch_msg.msg.c1().ue_cap_enquiry(); + enq->rrc_transaction_id = (uint8_t)((transaction_id++) % 4); - enq->N_ue_cap_reqs = 1; - enq->ue_capability_request[0] = LIBLTE_RRC_RAT_TYPE_EUTRA; + enq->crit_exts.set(ue_cap_enquiry_s::crit_exts_c_::types::c1); + enq->crit_exts.c1().set(ue_cap_enquiry_s::crit_exts_c_::c1_c_::types::ue_cap_enquiry_r8); + enq->crit_exts.c1().ue_cap_enquiry_r8().ue_cap_request.resize(1); + enq->crit_exts.c1().ue_cap_enquiry_r8().ue_cap_request[0].value = rat_type_e::eutra; send_dl_dcch(&dl_dcch_msg); } -/********************** HELPERS ***************************/ +/********************** HELPERS ***************************/ -void rrc::ue::send_dl_ccch(LIBLTE_RRC_DL_CCCH_MSG_STRUCT *dl_ccch_msg) +void rrc::ue::send_dl_ccch(dl_ccch_msg_s* dl_ccch_msg) { - // Allocate a new PDU buffer, pack the message and send to PDCP - byte_buffer_t *pdu = pool_allocate; + // Allocate a new PDU buffer, pack the message and send to PDCP + byte_buffer_t* pdu = pool_allocate_blocking; if (pdu) { - liblte_rrc_pack_dl_ccch_msg(dl_ccch_msg, (LIBLTE_BIT_MSG_STRUCT*) &parent->bit_buf); - srslte_bit_pack_vector(parent->bit_buf.msg, pdu->msg, parent->bit_buf.N_bits); - pdu->N_bytes = 1+(parent->bit_buf.N_bits-1)/8; - parent->rrc_log->info_hex(pdu->msg, pdu->N_bytes, - "SRB0 - rnti=0x%x, Sending: %s\n", - rnti, - liblte_rrc_dl_ccch_msg_type_text[dl_ccch_msg->msg_type]); - + asn1::bit_ref bref(pdu->msg, pdu->get_tailroom()); + dl_ccch_msg->pack(bref); + pdu->N_bytes = 1u + (uint32_t)bref.distance_bytes(pdu->msg); + + char buf[32]; + sprintf(buf, "SRB0 - rnti=0x%x", rnti); + parent->log_rrc_message(buf, Tx, pdu, *dl_ccch_msg); + parent->pdcp->write_sdu(rnti, RB_ID_SRB0, pdu); - } else { parent->rrc_log->error("Allocating pdu\n"); } } -void rrc::ue::send_dl_dcch(LIBLTE_RRC_DL_DCCH_MSG_STRUCT *dl_dcch_msg, byte_buffer_t *pdu) +void rrc::ue::send_dl_dcch(dl_dcch_msg_s* dl_dcch_msg, byte_buffer_t* pdu) { if (!pdu) { - pdu = pool_allocate; + pdu = pool_allocate_blocking; } if (pdu) { - liblte_rrc_pack_dl_dcch_msg(dl_dcch_msg, (LIBLTE_BIT_MSG_STRUCT*) &parent->bit_buf); - srslte_bit_pack_vector(parent->bit_buf.msg, pdu->msg, parent->bit_buf.N_bits); - pdu->N_bytes = 1+(parent->bit_buf.N_bits-1)/8; - parent->rrc_log->info_hex(pdu->msg, pdu->N_bytes, - "SRB1 - rnti=0x%x, Sending: %s\n", - rnti, - liblte_rrc_dl_dcch_msg_type_text[dl_dcch_msg->msg_type]); - + asn1::bit_ref bref(pdu->msg, pdu->get_tailroom()); + dl_dcch_msg->pack(bref); + pdu->N_bytes = 1u + (uint32_t)bref.distance_bytes(pdu->msg); + + char buf[32]; + sprintf(buf, "SRB0 - rnti=0x%x", rnti); + parent->log_rrc_message(buf, Tx, pdu, *dl_dcch_msg); + parent->pdcp->write_sdu(rnti, RB_ID_SRB1, pdu); } else { @@ -1857,17 +1934,17 @@ int rrc::ue::sr_free() return 0; } -void rrc::ue::sr_get(uint32_t *I_sr, uint32_t *N_pucch_sr) +void rrc::ue::sr_get(uint8_t* I_sr, uint16_t* N_pucch_sr) { *I_sr = sr_I; *N_pucch_sr = sr_N_pucch; } -int rrc::ue::sr_allocate(uint32_t period, uint32_t *I_sr, uint32_t *N_pucch_sr) +int rrc::ue::sr_allocate(uint32_t period, uint8_t* I_sr, uint16_t* N_pucch_sr) { uint32_t c = SRSLTE_CP_ISNORM(parent->cfg.cell.cp)?3:2; - uint32_t delta_pucch_shift = liblte_rrc_delta_pucch_shift_num[parent->sib2.rr_config_common_sib.pucch_cnfg.delta_pucch_shift]; - + uint32_t delta_pucch_shift = parent->sib2.rr_cfg_common.pucch_cfg_common.delta_pucch_shift.to_number(); + uint32_t max_users = 12*c/delta_pucch_shift; // Find freq-time resources with least number of users @@ -1901,9 +1978,9 @@ int rrc::ue::sr_allocate(uint32_t period, uint32_t *I_sr, uint32_t *N_pucch_sr) } // Compute N_pucch_sr - *N_pucch_sr = i_min*max_users + parent->sr_sched.nof_users[i_min][j_min]; - if (parent->sib2.rr_config_common_sib.pucch_cnfg.n_cs_an) { - *N_pucch_sr += parent->sib2.rr_config_common_sib.pucch_cnfg.n_cs_an; + *N_pucch_sr = i_min*max_users + parent->sr_sched.nof_users[i_min][j_min]; + if (parent->sib2.rr_cfg_common.pucch_cfg_common.n_cs_an) { + *N_pucch_sr += parent->sib2.rr_cfg_common.pucch_cfg_common.n_cs_an; } // Allocate user @@ -1933,17 +2010,17 @@ int rrc::ue::cqi_free() return 0; } -void rrc::ue::cqi_get(uint32_t *pmi_idx, uint32_t *n_pucch) +void rrc::ue::cqi_get(uint16_t* pmi_idx, uint16_t* n_pucch) { *pmi_idx = cqi_idx; *n_pucch = cqi_pucch; } -int rrc::ue::cqi_allocate(uint32_t period, uint32_t *pmi_idx, uint32_t *n_pucch) +int rrc::ue::cqi_allocate(uint32_t period, uint16_t* pmi_idx, uint16_t* n_pucch) { uint32_t c = SRSLTE_CP_ISNORM(parent->cfg.cell.cp)?3:2; - uint32_t delta_pucch_shift = liblte_rrc_delta_pucch_shift_num[parent->sib2.rr_config_common_sib.pucch_cnfg.delta_pucch_shift]; - + uint32_t delta_pucch_shift = parent->sib2.rr_cfg_common.pucch_cfg_common.delta_pucch_shift.to_number(); + uint32_t max_users = 12*c/delta_pucch_shift; // Find freq-time resources with least number of users @@ -1992,9 +2069,9 @@ int rrc::ue::cqi_allocate(uint32_t period, uint32_t *pmi_idx, uint32_t *n_pucch) } // Compute n_pucch_2 - *n_pucch = i_min*max_users + parent->cqi_sched.nof_users[i_min][j_min]; - if (parent->sib2.rr_config_common_sib.pucch_cnfg.n_cs_an) { - *n_pucch += parent->sib2.rr_config_common_sib.pucch_cnfg.n_cs_an; + *n_pucch = i_min*max_users + parent->cqi_sched.nof_users[i_min][j_min]; + if (parent->sib2.rr_cfg_common.pucch_cfg_common.n_cs_an) { + *n_pucch += parent->sib2.rr_cfg_common.pucch_cfg_common.n_cs_an; } // Allocate user diff --git a/srsenb/test/mac/CMakeLists.txt b/srsenb/test/mac/CMakeLists.txt index 9048b4e59..fbfea5c32 100644 --- a/srsenb/test/mac/CMakeLists.txt +++ b/srsenb/test/mac/CMakeLists.txt @@ -5,5 +5,6 @@ target_link_libraries(scheduler_test srsenb_mac srsenb_phy srslte_common srslte_phy + rrc_asn1 ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/srsenb/test/upper/CMakeLists.txt b/srsenb/test/upper/CMakeLists.txt index 243da5cdf..f04fe27c0 100644 --- a/srsenb/test/upper/CMakeLists.txt +++ b/srsenb/test/upper/CMakeLists.txt @@ -1,17 +1,4 @@ -# IP tx/rx program test -add_executable(ip_test_enb ip_test.cc) -target_link_libraries(ip_test_enb srsenb_upper - srsenb_mac - srsenb_phy - srslte_common - srslte_phy - srslte_upper - srslte_radio - ${CMAKE_THREAD_LIBS_INIT} - ${Boost_LIBRARIES} - ${SEC_LIBRARIES}) - # Simple PLMN -> MCC/MNC test add_executable(plmn_test plmn_test.cc) -target_link_libraries(plmn_test srsenb_upper srslte_asn1 ) +target_link_libraries(plmn_test rrc_asn1) diff --git a/srsenb/test/upper/ip_test.cc b/srsenb/test/upper/ip_test.cc deleted file mode 100644 index b6480d288..000000000 --- a/srsenb/test/upper/ip_test.cc +++ /dev/null @@ -1,684 +0,0 @@ -/** - * - * \section COPYRIGHT - * - * Copyright 2013-2017 Software Radio Systems Limited - * - * \section LICENSE - * - * This file is part of srsLTE. - * - * srsUE is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. - * - * srsUE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * A copy of the GNU Affero General Public License can be found in - * the LICENSE file in the top-level directory of this distribution - * and at http://www.gnu.org/licenses/. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "srsenb/hdr/mac/mac.h" -#include "srsenb/hdr/phy/phy.h" -#include "srslte/common/threads.h" -#include "srslte/interfaces/enb_interfaces.h" -#include "srslte/common/common.h" -#include "srslte/common/buffer_pool.h" -#include "srslte/common/logger_file.h" -#include "srslte/common/log_filter.h" -#include "srslte/upper/rlc.h" -#include "srslte/radio/radio.h" -#include "srslte/phy/utils/debug.h" - -#define START_TUNTAP -#define USE_RADIO - -/********************************************************************** - * Program arguments processing - ***********************************************************************/ - -#define LCID 3 - -typedef struct { - float rx_freq; - float tx_freq; - float rx_gain; - float tx_gain; - bool enable_gui; - int time_adv; - std::string ip_address; -}prog_args_t; - -uint32_t srsapps_verbose = 1; - -prog_args_t prog_args; - -void args_default(prog_args_t *args) { - args->rx_freq = 2.505e9; - args->tx_freq = 2.625e9; - args->rx_gain = 50.0; - args->tx_gain = 70.0; - args->enable_gui = false; - args->time_adv = -1; // calibrated for b210 - args->ip_address = "192.168.3.1"; -} - -void usage(prog_args_t *args, char *prog) { - printf("Usage: %s [gGIrfFdv] \n", prog); - printf("\t-f RX frequency [Default %.1f MHz]\n", args->rx_freq/1e6); - printf("\t-F TX frequency [Default %.1f MHz]\n", args->tx_freq/1e6); - printf("\t-g RX gain [Default %.1f]\n", args->rx_gain); - printf("\t-G TX gain [Default %.1f]\n", args->tx_gain); - printf("\t-I IP address [Default %s]\n", args->ip_address.c_str()); - printf("\t-t time advance (in samples) [Default %d]\n", args->time_adv); - printf("\t-d Enable gui [Default disabled]\n"); - printf("\t-v [increase verbosity, default none]\n"); -} - -void parse_args(prog_args_t *args, int argc, char **argv) { - int opt; - args_default(args); - while ((opt = getopt(argc, argv, "gGfFItdv")) != -1) { - switch (opt) { - case 'd': - args->enable_gui = true; - break; - case 'g': - args->rx_gain = atof(argv[optind]); - break; - case 'G': - args->tx_gain = atof(argv[optind]); - break; - case 'f': - args->rx_freq = atof(argv[optind]); - break; - case 'F': - args->tx_freq = atof(argv[optind]); - break; - case 'I': - args->ip_address = argv[optind]; - break; - case 't': - args->time_adv = atoi(argv[optind]); - break; - case 'v': - srsapps_verbose++; - break; - default: - usage(args, argv[0]); - exit(-1); - } - } - if (args->rx_freq < 0 || args->tx_freq < 0) { - usage(args, argv[0]); - exit(-1); - } -} - -LIBLTE_BYTE_MSG_STRUCT sib_buffer[2]; - -int setup_if_addr(char *ip_addr); - -class tester : public srsue::pdcp_interface_rlc, - public srsue::rrc_interface_rlc, - public srsue::ue_interface, - public srsenb::rlc_interface_mac, - public srsenb::rrc_interface_mac, - public thread -{ -public: - - tester() { - rnti = 0; - } - - void init(srslte::rlc *rlc_, srsenb::mac *mac_, srsenb::phy *phy_, srslte::log *log_h_, std::string ip_address) { - log_h = log_h_; - rlc = rlc_; - mac = mac_; - phy = phy_; - - tun_fd = 0; - -#ifdef START_TUNTAP - if (init_tuntap((char*) ip_address.c_str())) { - log_h->error("Initiating IP address\n"); - } -#endif - - pool = srslte::byte_buffer_pool::get_instance(); - - // Start reader thread - running=true; - start(); - } - - void write_pdu_bcch_bch(srslte::byte_buffer_t *sdu) {} - void write_pdu_bcch_dlsch(srslte::byte_buffer_t *sdu) {} - void write_pdu_pcch(srslte::byte_buffer_t *sdu) {} - void write_pdu_mch(uint32_t lcid, srslte::byte_buffer_t *pdu){} - void max_retx_attempted(){} - void add_user(uint16_t rnti) {} - void release_user(uint16_t rnti) {} - void upd_user(uint16_t rnti, uint16_t old_rnti) {} - void set_activity_user(uint16_t rnti) {} - bool is_paging_opportunity(uint32_t tti, uint32_t *payload_len) {return false;} - void read_pdu_pcch(uint8_t* payload, uint32_t buffer_size) {} - std::string get_rb_name(uint32_t lcid) { return std::string("lcid"); } - - void write_pdu(uint32_t lcid, srslte::byte_buffer_t *sdu) - { - int n = write(tun_fd, sdu->msg, sdu->N_bytes); - if (n != (int) sdu->N_bytes) { - log_h->error("TUN/TAP write failure n=%d, nof_bytes=%d\n", n, sdu->N_bytes); - return; - } - log_h->debug_hex(sdu->msg, sdu->N_bytes, - "Wrote %d bytes to TUN/TAP\n", - sdu->N_bytes); - pool->deallocate(sdu); - } - - int read_pdu(uint16_t rnti, uint32_t lcid, uint8_t *payload, uint32_t nof_bytes) - { - return rlc->read_pdu(lcid, payload, nof_bytes); - } - - void read_pdu_bcch_dlsch(uint32_t sib_index, uint8_t payload[srsenb::sched_interface::MAX_SIB_PAYLOAD_LEN]) - { - if (sib_index < 2) { - memcpy(payload, sib_buffer[sib_index].msg, sib_buffer[sib_index].N_bytes); - } - } - - void write_pdu(uint16_t rnti, uint32_t lcid, uint8_t *payload, uint32_t nof_bytes) - { - srslte::byte_buffer_t *sdu = NULL; - log_h->info("Received PDU rnti=0x%x, lcid=%d, nof_bytes=%d\n", rnti, lcid, nof_bytes); - switch(lcid) { - case LCID: - rlc->write_pdu(lcid, payload, nof_bytes); - break; - case 0: - log_h->info("Received ConnectionRequest from rnti=0x%x\n", rnti); - - // Configure User in MAC - srsenb::sched_interface::ue_cfg_t uecfg; - bzero(&uecfg, sizeof(srsenb::sched_interface::ue_cfg_t)); - uecfg.maxharq_tx = 5; - uecfg.continuous_pusch = false; - uecfg.ue_bearers[0].direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH; - uecfg.ue_bearers[LCID].direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH; - mac->ue_cfg(rnti, &uecfg); - - // configure DRB1 as UM - LIBLTE_RRC_RLC_CONFIG_STRUCT cfg; - bzero(&cfg, sizeof(LIBLTE_RRC_RLC_CONFIG_STRUCT)); - cfg.rlc_mode = LIBLTE_RRC_RLC_MODE_UM_BI; - cfg.dl_um_bi_rlc.t_reordering = LIBLTE_RRC_T_REORDERING_MS100; - cfg.dl_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10; - cfg.ul_um_bi_rlc.sn_field_len = LIBLTE_RRC_SN_FIELD_LENGTH_SIZE10; - rlc->add_bearer(LCID, &cfg); - - // Send dummy ConnectionSetup. MAC will send contention resolution ID automatically. - log_h->info("Sending ConnectionSetup\n"); - sdu = pool_allocate; - sdu->msg[0] = 0xab; - sdu->N_bytes = 1; - rlc->write_sdu(0, sdu); - - // Indicate RLC status to mac - mac->rlc_buffer_state(rnti, 0, 1, 0); - - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT dedicated; - bzero(&dedicated, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); - dedicated.pusch_cnfg_ded.beta_offset_ack_idx = 5; - dedicated.pusch_cnfg_ded.beta_offset_ri_idx = 12; - dedicated.pusch_cnfg_ded.beta_offset_cqi_idx = 15; - dedicated.pusch_cnfg_ded_present = true; - dedicated.sched_request_cnfg.dsr_trans_max = LIBLTE_RRC_DSR_TRANS_MAX_N4; - dedicated.sched_request_cnfg.sr_pucch_resource_idx = 0; - dedicated.sched_request_cnfg.sr_cnfg_idx = 35; - dedicated.sched_request_cnfg_present = true; - phy->set_config_dedicated(rnti, &dedicated); - - usleep(500); - break; - default: - log_h->error("Received message for lcid=%d\n", lcid); - break; - } - } - - void rl_failure(uint16_t rnti) - { - log_h->console("Disconnecting rnti=0x%x.\n", rnti); - mac->ue_rem(rnti); - rlc->reset(); - } - -private: - int tun_fd; - bool running; - srslte::log *log_h; - srslte::byte_buffer_pool *pool; - srslte::rlc *rlc; - srsenb::mac *mac; - srsenb::phy *phy; - uint16_t rnti; - bool read_enable; - - int init_tuntap(char *ip_address) { - read_enable = true; - tun_fd = setup_if_addr(ip_address); - if (tun_fd<0) { - fprintf(stderr, "Error setting up IP %s\n", ip_address); - return -1; - } - printf("Created tun/tap interface at IP %s\n", ip_address); - return 0; - } - - void run_thread() { - struct iphdr *ip_pkt; - uint32_t idx = 0; - int32_t N_bytes = 0; - srslte::byte_buffer_t *pdu = pool_allocate; - - log_h->info("TUN/TAP reader thread running\n"); - - int first=1; - while(running) { - if (tun_fd > 0) { - pdu->msg[0] = 0x0; - N_bytes = read(tun_fd, &pdu->msg[idx], SRSLTE_MAX_BUFFER_SIZE_BYTES-SRSLTE_BUFFER_HEADER_OFFSET - idx); - } - if(N_bytes > 0) - { - if (read_enable && pdu->msg[0] != 0x60) { - - pdu->N_bytes = idx + N_bytes; - ip_pkt = (struct iphdr*)pdu->msg; - - log_h->debug_hex(pdu->msg, pdu->N_bytes, - "Read %d bytes from TUN/TAP\n", - N_bytes); - - // Check if entire packet was received - if(ntohs(ip_pkt->tot_len) == pdu->N_bytes) - { - // Send PDU directly to RLC - pdu->set_timestamp(); - rlc->write_sdu(LCID, pdu); - - // Indicate RLC status to mac - mac->rlc_buffer_state(rnti, LCID, rlc->get_buffer_state(LCID), 0); - - pdu = pool_allocate; - idx = 0; - } else{ - idx += N_bytes; - } - } - }else{ - log_h->error("Failed to read from TUN interface - gw receive thread exiting.\n"); - break; - } - } - } -}; - - -// Create classes -srslte::logger_file logger; -srslte::log_filter log_phy; -srslte::log_filter log_mac; -srslte::log_filter log_rlc; -srslte::log_filter log_tester; -srsenb::phy my_phy; -srsenb::mac my_mac; -srslte::rlc my_rlc; -srslte::radio my_radio; - -// Local classes for testing -tester my_tester; - - -void generate_cell_configuration(srsenb::sched_interface::cell_cfg_t *mac_cfg, srsenb::phy_cfg_t *phy_cfg) -{ - // Main cell configuration - srslte_cell_t cell; - cell.id = 0; - cell.cp = SRSLTE_CP_NORM; - cell.nof_ports = 1; - cell.nof_prb = 25; - cell.phich_length = SRSLTE_PHICH_NORM; - cell.phich_resources = SRSLTE_PHICH_R_1; - - // Generate SIB1 - LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT msg[2]; - bzero(&msg[0], sizeof(LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT)); - bzero(&msg[1], sizeof(LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT)); - - msg[0].N_sibs = 1; - msg[0].sibs[0].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1 = &msg[0].sibs[0].sib.sib1; - - sib1->cell_id = 0x1234; - sib1->tracking_area_code = 0x1234; - sib1->freq_band_indicator = 2; - sib1->N_plmn_ids = 1; - sib1->plmn_id[0].id.mcc = 1; - sib1->plmn_id[0].id.mnc = 1; - sib1->plmn_id[0].resv_for_oper = LIBLTE_RRC_NOT_RESV_FOR_OPER; - sib1->cell_barred = LIBLTE_RRC_CELL_NOT_BARRED; - sib1->intra_freq_reselection = LIBLTE_RRC_INTRA_FREQ_RESELECTION_ALLOWED; - sib1->q_rx_lev_min = -140; - sib1->q_rx_lev_min_offset = 1; - sib1->p_max = 10; - sib1->p_max_present = true; - sib1->si_window_length = LIBLTE_RRC_SI_WINDOW_LENGTH_MS40; - sib1->N_sched_info = 1; - sib1->sched_info[0].si_periodicity = LIBLTE_RRC_SI_PERIODICITY_RF16; - sib1->sched_info[0].N_sib_mapping_info = 0; - sib1->system_info_value_tag = 8; - - // Generate SIB2 - msg[1].N_sibs = 2; - msg[1].sibs[0].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2; - msg[1].sibs[1].sib_type = LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2 = &msg[1].sibs[0].sib.sib2; - - // RACH configuration - sib2->rr_config_common_sib.rach_cnfg.num_ra_preambles = LIBLTE_RRC_NUMBER_OF_RA_PREAMBLES_N64; - sib2->rr_config_common_sib.rach_cnfg.preambles_group_a_cnfg.present = false; - sib2->rr_config_common_sib.rach_cnfg.preamble_init_rx_target_pwr = LIBLTE_RRC_PREAMBLE_INITIAL_RECEIVED_TARGET_POWER_DBM_N90; - sib2->rr_config_common_sib.rach_cnfg.pwr_ramping_step = LIBLTE_RRC_POWER_RAMPING_STEP_DB6; - sib2->rr_config_common_sib.rach_cnfg.preamble_trans_max = LIBLTE_RRC_PREAMBLE_TRANS_MAX_N10; - sib2->rr_config_common_sib.rach_cnfg.ra_resp_win_size = LIBLTE_RRC_RA_RESPONSE_WINDOW_SIZE_SF10; - sib2->rr_config_common_sib.rach_cnfg.mac_con_res_timer = LIBLTE_RRC_MAC_CONTENTION_RESOLUTION_TIMER_SF40; - sib2->rr_config_common_sib.rach_cnfg.max_harq_msg3_tx = 4; - - // BCCH - sib2->rr_config_common_sib.bcch_cnfg.modification_period_coeff = LIBLTE_RRC_MODIFICATION_PERIOD_COEFF_N16; - - // PCCH - sib2->rr_config_common_sib.pcch_cnfg.default_paging_cycle = LIBLTE_RRC_DEFAULT_PAGING_CYCLE_RF128; - sib2->rr_config_common_sib.pcch_cnfg.nB = LIBLTE_RRC_NB_ONE_THIRTY_SECOND_T; - - // PRACH Configuration - sib2->rr_config_common_sib.prach_cnfg.root_sequence_index = 41; - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.high_speed_flag = false; - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_config_index = 4; - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset = 2; - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.zero_correlation_zone_config = 11; - - // PDSCH configuration - sib2->rr_config_common_sib.pdsch_cnfg.p_b = 0; - sib2->rr_config_common_sib.pdsch_cnfg.rs_power = -5; - - // PUSCH configuration - sib2->rr_config_common_sib.pusch_cnfg.n_sb = 1; - sib2->rr_config_common_sib.pusch_cnfg.hopping_mode = LIBLTE_RRC_HOPPING_MODE_INTER_SUBFRAME; - sib2->rr_config_common_sib.pusch_cnfg.pusch_hopping_offset = 4; - sib2->rr_config_common_sib.pusch_cnfg.enable_64_qam = false; - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.cyclic_shift = 0; - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.group_assignment_pusch = 0; - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.group_hopping_enabled = false; - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.sequence_hopping_enabled = false; - - // PUCCH configuration - sib2->rr_config_common_sib.pucch_cnfg.delta_pucch_shift = LIBLTE_RRC_DELTA_PUCCH_SHIFT_DS2; - sib2->rr_config_common_sib.pucch_cnfg.n_rb_cqi = 2; - sib2->rr_config_common_sib.pucch_cnfg.n_cs_an = 0; - sib2->rr_config_common_sib.pucch_cnfg.n1_pucch_an = 12; - - // SRS configuration - sib2->rr_config_common_sib.srs_ul_cnfg.present = false; - - // UL power control - sib2->rr_config_common_sib.ul_pwr_ctrl.p0_nominal_pusch = -80; - sib2->rr_config_common_sib.ul_pwr_ctrl.alpha = LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_1; - sib2->rr_config_common_sib.ul_pwr_ctrl.p0_nominal_pucch = -80; - sib2->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_1 = LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_0; - sib2->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_1b = LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_5; - sib2->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_2 = LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_2; - sib2->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_2a = LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_2; - sib2->rr_config_common_sib.ul_pwr_ctrl.delta_flist_pucch.format_2b = LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_2; - sib2->rr_config_common_sib.ul_pwr_ctrl.delta_preamble_msg3 = 4; - - sib2->rr_config_common_sib.ul_cp_length = LIBLTE_RRC_UL_CP_LENGTH_1; - - sib2->ue_timers_and_constants.t300 = LIBLTE_RRC_T300_MS1000; - sib2->ue_timers_and_constants.t301 = LIBLTE_RRC_T301_MS1000; - sib2->ue_timers_and_constants.n310 = LIBLTE_RRC_N310_N10; - sib2->ue_timers_and_constants.t311 = LIBLTE_RRC_T311_MS1000; - sib2->ue_timers_and_constants.n311 = LIBLTE_RRC_N311_N1; - - sib2->time_alignment_timer = LIBLTE_RRC_TIME_ALIGNMENT_TIMER_INFINITY; - sib2->additional_spectrum_emission = 1; - sib2->arfcn_value_eutra.present = false; - sib2->ul_bw.present = false; - - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3 = &msg[1].sibs[1].sib.sib3; - - bzero(sib3, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT)); - sib3->q_hyst = LIBLTE_RRC_Q_HYST_DB_2; - sib3->s_non_intra_search = 6; - sib3->s_non_intra_search_present = true; - sib3->thresh_serving_low = 4; - sib3->cell_resel_prio = 6; - sib3->q_rx_lev_min = -122; - sib3->p_max = 23; - sib3->p_max_present = true; - sib3->s_intra_search = 10; - sib3->s_intra_search_present = true; - sib3->presence_ant_port_1 = true; - sib3->neigh_cell_cnfg = 1; - sib3->t_resel_eutra = 1; - - // Genreate payload - LIBLTE_BIT_MSG_STRUCT bitbuffer[2]; - for (int i=0;i<2;i++) { - liblte_rrc_pack_bcch_dlsch_msg(&msg[i], &bitbuffer[i]); - srslte_bit_pack_vector(bitbuffer[i].msg, sib_buffer[i].msg, bitbuffer[i].N_bits); - sib_buffer[i].N_bytes = (bitbuffer[i].N_bits-1)/8+1; - } - - // Fill MAC scheduler configuration - bzero(mac_cfg, sizeof(srsenb::sched_interface::cell_cfg_t)); - memcpy(&mac_cfg->cell, &cell, sizeof(srslte_cell_t)); - mac_cfg->sibs[0].len = sib_buffer[0].N_bytes; - mac_cfg->sibs[0].period_rf = 8; // Fixed to 8 rf - mac_cfg->sibs[1].len = sib_buffer[1].N_bytes; - mac_cfg->sibs[1].period_rf = liblte_rrc_si_periodicity_num[sib1->sched_info[0].si_periodicity]; - mac_cfg->si_window_ms = liblte_rrc_si_window_length_num[sib1->si_window_length]; - - - mac_cfg->prach_rar_window = liblte_rrc_ra_response_window_size_num[sib2->rr_config_common_sib.rach_cnfg.ra_resp_win_size]; - - // Copy PHY common configuration - bzero(phy_cfg, sizeof(srsenb::phy_cfg_t)); - memcpy(&phy_cfg->cell, &cell, sizeof(srslte_cell_t)); - memcpy(&phy_cfg->prach_cnfg, &sib2->rr_config_common_sib.prach_cnfg, sizeof(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT)); - memcpy(&phy_cfg->pdsch_cnfg, &sib2->rr_config_common_sib.pdsch_cnfg, sizeof(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT)); - memcpy(&phy_cfg->pusch_cnfg, &sib2->rr_config_common_sib.pusch_cnfg, sizeof(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT)); - memcpy(&phy_cfg->pucch_cnfg, &sib2->rr_config_common_sib.pucch_cnfg, sizeof(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT)); - memcpy(&phy_cfg->srs_ul_cnfg, &sib2->rr_config_common_sib.srs_ul_cnfg, sizeof(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT)); -} - -int main(int argc, char *argv[]) -{ - - parse_args(&prog_args, argc, argv); - - logger.init("/tmp/ip_test.log"); - log_phy.init("PHY ", &logger, true); - log_mac.init("MAC ", &logger, true); - log_rlc.init("RLC ", &logger); - log_tester.init("TEST", &logger); - logger.log("\n\n"); - - if (srsapps_verbose == 1) { - log_phy.set_level(srslte::LOG_LEVEL_INFO); - log_phy.set_hex_limit(100); - log_mac.set_level(srslte::LOG_LEVEL_DEBUG); - log_mac.set_hex_limit(100); - log_rlc.set_level(srslte::LOG_LEVEL_DEBUG); - log_rlc.set_hex_limit(1000); - log_tester.set_level(srslte::LOG_LEVEL_DEBUG); - log_tester.set_hex_limit(100); - printf("Log level info\n"); - } - if (srsapps_verbose == 2) { - log_phy.set_level(srslte::LOG_LEVEL_DEBUG); - log_phy.set_hex_limit(100); - log_mac.set_level(srslte::LOG_LEVEL_DEBUG); - log_mac.set_hex_limit(100); - log_rlc.set_level(srslte::LOG_LEVEL_DEBUG); - log_rlc.set_hex_limit(100); - log_tester.set_level(srslte::LOG_LEVEL_DEBUG); - log_tester.set_hex_limit(100); - srslte_verbose = SRSLTE_VERBOSE_DEBUG; - printf("Log level debug\n"); - } - - // Init Radio and PHY -#ifdef USE_RADIO - my_radio.init(); -#else - my_radio.init(NULL, (char*) "dummy"); -#endif - my_radio.set_tx_freq(prog_args.tx_freq); - my_radio.set_tx_gain(prog_args.tx_gain); - my_radio.set_rx_freq(prog_args.rx_freq); - my_radio.set_rx_gain(prog_args.rx_gain); - //my_radio.set_tx_adv_neg(true); - if (prog_args.time_adv >= 0) { - printf("Setting TA=%d samples\n", prog_args.time_adv); - my_radio.set_tx_adv(prog_args.time_adv); - } - - // Configuure cell - srsenb::phy_cfg_t phy_cfg; - srsenb::sched_interface::cell_cfg_t mac_cfg; - srsenb::mac_args_t mac_args; - srsenb::phy_args_t phy_args; - - mac_args.link_failure_nof_err = 10; - phy_args.equalizer_mode = "mmse"; - phy_args.estimator_fil_w = 0.2; - phy_args.max_prach_offset_us = 50; - phy_args.nof_phy_threads = 1; - phy_args.pusch_max_its = 5; - - generate_cell_configuration(&mac_cfg, &phy_cfg); - - my_phy.init(&phy_args, &phy_cfg, &my_radio, &my_mac, &log_phy); - my_mac.init(&mac_args, &mac_cfg.cell, &my_phy, &my_tester, &my_tester, &log_mac); - my_rlc.init(&my_tester, &my_tester, &my_tester, &log_rlc, &my_mac, 0 /* SRB0 */); - my_tester.init(&my_rlc, &my_mac, &my_phy, &log_tester, prog_args.ip_address); - - if (prog_args.enable_gui) { - sleep(1); - my_phy.start_plot(); - } - - bool running = true; - while(running) { - printf("Main running\n"); - sleep(1); - } - my_phy.stop(); - my_mac.stop(); -} - - - - -/******************* This is copied from srsue gw **********************/ -int setup_if_addr(char *ip_addr) -{ - char *dev = (char*) "tun_srsenb"; - int sock = -1; - - // Construct the TUN device - int tun_fd = open("/dev/net/tun", O_RDWR); - if(0 > tun_fd) - { - perror("open"); - return SRSLTE_ERROR; - } - - struct ifreq ifr; - - memset(&ifr, 0, sizeof(ifr)); - ifr.ifr_flags = IFF_TUN | IFF_NO_PI; - strncpy(ifr.ifr_ifrn.ifrn_name, dev, IFNAMSIZ); - if(0 > ioctl(tun_fd, TUNSETIFF, &ifr)) - { - perror("ioctl1"); - goto clean_exit; - } - - // Bring up the interface - sock = socket(AF_INET, SOCK_DGRAM, 0); - if(0 > ioctl(sock, SIOCGIFFLAGS, &ifr)) - { - perror("socket"); - goto clean_exit; - } - ifr.ifr_flags |= IFF_UP | IFF_RUNNING; - if(0 > ioctl(sock, SIOCSIFFLAGS, &ifr)) - { - perror("ioctl2"); - goto clean_exit; - } - - // Setup the IP address - sock = socket(AF_INET, SOCK_DGRAM, 0); - ifr.ifr_addr.sa_family = AF_INET; - ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr = inet_addr(ip_addr); - if(0 > ioctl(sock, SIOCSIFADDR, &ifr)) - { - perror("ioctl"); - goto clean_exit; - } - ifr.ifr_netmask.sa_family = AF_INET; - ((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr.s_addr = inet_addr("255.255.255.0"); - if(0 > ioctl(sock, SIOCSIFNETMASK, &ifr)) - { - perror("ioctl"); - goto clean_exit; - } - shutdown(sock, SHUT_RDWR); - - return(tun_fd); - -clean_exit: - if (sock != -1) { - shutdown(sock, SHUT_RDWR); - } - if (tun_fd != -1) { - close(tun_fd); - } - return SRSLTE_ERROR; -} diff --git a/srsenb/test/upper/plmn_test.cc b/srsenb/test/upper/plmn_test.cc index 448931129..f46e629b3 100644 --- a/srsenb/test/upper/plmn_test.cc +++ b/srsenb/test/upper/plmn_test.cc @@ -7,49 +7,77 @@ * */ -#include #include "srsenb/hdr/upper/common_enb.h" -#include "srslte/asn1/liblte_rrc.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/bcd_helpers.h" +#include -void rrc_plmn_test() +using namespace asn1::rrc; + +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +int rrc_plmn_test() { - LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_in, plmn_out; - plmn_in.mcc = 0xF123; - plmn_in.mnc = 0xFF45; + plmn_id_s plmn_in, plmn_out; + uint8_t ref[3] = {0x89, 0x19, 0x14}; + uint8_t byte_buf[4]; // 2-digit MNC test - uint8_t bit_buf[32]; - uint8_t *ie_ptr = bit_buf; - - liblte_rrc_pack_plmn_identity_ie(&plmn_in, &ie_ptr); - uint8_t byte_buf[4]; - liblte_pack(bit_buf, 22, byte_buf); - uint8_t ref[3] = {0x89, 0x19, 0x05}; - for(int i=0;i<3;i++) { - assert(ref[i] == byte_buf[i]); - } - ie_ptr = bit_buf; - liblte_rrc_unpack_plmn_identity_ie(&ie_ptr, &plmn_out); - assert(plmn_in.mcc == plmn_out.mcc); - assert(plmn_in.mnc == plmn_out.mnc); + asn1::bit_ref bref_out(&ref[0], sizeof(ref)); + asn1::bit_ref bref_out0(&ref[0], sizeof(ref)); + + plmn_out.unpack(bref_out); + + TESTASSERT(plmn_out.mcc_present); + uint16_t mcc, mnc; + srslte::bytes_to_mcc(&plmn_out.mcc[0], &mcc); + srslte::bytes_to_mnc(&plmn_out.mnc[0], &mnc, plmn_out.mnc.size()); + TESTASSERT(mcc == 0xF123); + TESTASSERT(mnc == 0xFF45); + + // Test MCC/MNC --> vector + plmn_in.mcc_present = plmn_out.mcc_present; + TESTASSERT(srslte::mcc_to_bytes(mcc, &plmn_in.mcc[0])); + TESTASSERT(srslte::mnc_to_bytes(mnc, plmn_in.mnc)); + TESTASSERT(plmn_in.mcc_present == plmn_out.mcc_present); + TESTASSERT(plmn_in.mcc == plmn_out.mcc); + TESTASSERT(plmn_in.mnc == plmn_out.mnc); + + // Test plmn --> string + std::string mccmnc_str = srslte::plmn_id_to_string(plmn_in); + TESTASSERT(mccmnc_str == "12345"); + + asn1::bit_ref bref_in(&byte_buf[0], sizeof(byte_buf)); + asn1::bit_ref bref_in0(&byte_buf[0], sizeof(byte_buf)); + plmn_out.pack(bref_in); + + TESTASSERT(bref_in.distance(&byte_buf[0]) == bref_out.distance(bref_out0)); + TESTASSERT(memcmp(&ref[0], &byte_buf[0], sizeof(ref)) == 0); // 3-digit MNC test - plmn_in.mnc = 0xF456; - ie_ptr = bit_buf; - liblte_rrc_pack_plmn_identity_ie(&plmn_in, &ie_ptr); - liblte_pack(bit_buf, 26, byte_buf); - uint8_t ref2[4] = {0x89, 0x1D, 0x15, 0x02}; - for(int i=0;i<3;i++) { - assert(ref2[i] == byte_buf[i]); - } - ie_ptr = bit_buf; - liblte_rrc_unpack_plmn_identity_ie(&ie_ptr, &plmn_out); - assert(plmn_in.mcc == plmn_out.mcc); - assert(plmn_in.mnc == plmn_out.mnc); + TESTASSERT(srslte::mnc_to_bytes(0xF456, plmn_in.mnc)); + bref_in = asn1::bit_ref(&byte_buf[0], sizeof(byte_buf)); + plmn_in.pack(bref_in); + uint8_t ref2[4] = {0x89, 0x1D, 0x15, 0x80}; + TESTASSERT(bref_in.distance(bref_in0) == (1 + 3 * 4 + 1 + 3 * 4)); + TESTASSERT(memcmp(&byte_buf[0], &ref2[0], sizeof(ref)) == 0); + + bref_out = asn1::bit_ref(&ref2[0], sizeof(ref2)); + plmn_out.unpack(bref_out); + TESTASSERT(plmn_in.mcc_present == plmn_out.mcc_present); + TESTASSERT(plmn_in.mcc == plmn_out.mcc); + TESTASSERT(plmn_in.mnc == plmn_out.mnc); + + return 0; } -void s1ap_plmn_test() +int s1ap_plmn_test() { uint16_t mcc = 0xF123; uint16_t mnc = 0xFF45; @@ -57,22 +85,24 @@ void s1ap_plmn_test() // 2-digit MNC test srslte::s1ap_mccmnc_to_plmn(mcc, mnc, &plmn); - assert(plmn == 0x21F354); + TESTASSERT(plmn == 0x21F354); srslte::s1ap_plmn_to_mccmnc(plmn, &mcc, &mnc); - assert(mcc == 0xF123); - assert(mnc == 0xFF45); + TESTASSERT(mcc == 0xF123); + TESTASSERT(mnc == 0xFF45); // 3-digit MNC test mnc = 0xF456; srslte::s1ap_mccmnc_to_plmn(mcc, mnc, &plmn); - assert(plmn == 0x214365); + TESTASSERT(plmn == 0x216354); srslte::s1ap_plmn_to_mccmnc(plmn, &mcc, &mnc); - assert(mcc == 0xF123); - assert(mnc == 0xF456); + TESTASSERT(mcc == 0xF123); + TESTASSERT(mnc == 0xF456); + return 0; } int main(int argc, char **argv) { - rrc_plmn_test(); - s1ap_plmn_test(); + TESTASSERT(rrc_plmn_test() == 0); + TESTASSERT(s1ap_plmn_test() == 0); + return 0; } diff --git a/srsepc/src/hss/hss.cc b/srsepc/src/hss/hss.cc index 431c407c1..959c04206 100644 --- a/srsepc/src/hss/hss.cc +++ b/srsepc/src/hss/hss.cc @@ -158,7 +158,7 @@ hss::read_db_file(std::string db_filename) if(split.size() != column_size) { m_hss_log->error("Error parsing UE database. Wrong number of columns in .csv\n"); - m_hss_log->error("Columns: %lu, Expected %d.\n",split.size(),column_size); + m_hss_log->error("Columns: %zd, Expected %d.\n", split.size(), column_size); return false; } hss_ue_ctx_t *ue_ctx = new hss_ue_ctx_t; diff --git a/srsue/hdr/mac/mac.h b/srsue/hdr/mac/mac.h index f2800f3b1..2853296ba 100644 --- a/srsue/hdr/mac/mac.h +++ b/srsue/hdr/mac/mac.h @@ -27,21 +27,22 @@ #ifndef SRSUE_MAC_H #define SRSUE_MAC_H -#include "srslte/common/log.h" +#include "demux.h" #include "dl_harq.h" -#include "ul_harq.h" -#include "srslte/common/timers.h" #include "mac_metrics.h" -#include "proc_ra.h" -#include "proc_sr.h" +#include "mux.h" #include "proc_bsr.h" #include "proc_phr.h" -#include "mux.h" -#include "demux.h" +#include "proc_ra.h" +#include "proc_sr.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/log.h" #include "srslte/common/mac_pcap.h" -#include "srslte/interfaces/ue_interfaces.h" -#include "srslte/common/tti_sync_cv.h" #include "srslte/common/threads.h" +#include "srslte/common/timers.h" +#include "srslte/common/tti_sync_cv.h" +#include "srslte/interfaces/ue_interfaces.h" +#include "ul_harq.h" namespace srsue { @@ -89,9 +90,9 @@ public: /******** set/get MAC configuration ****************/ void set_config(mac_cfg_t *mac_cfg); void get_config(mac_cfg_t *mac_cfg); - void set_config_main(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *main_cfg); - void set_config_rach(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT *rach_cfg, uint32_t prach_config_index); - void set_config_sr(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT *sr_cfg); + void set_config_main(asn1::rrc::mac_main_cfg_s* main_cfg); + void set_config_rach(asn1::rrc::rach_cfg_common_s* rach_cfg, uint32_t prach_config_index); + void set_config_sr(asn1::rrc::sched_request_cfg_c* sr_cfg); void set_contention_id(uint64_t uecri); void start_noncont_ho(uint32_t preamble_index, uint32_t prach_mask); diff --git a/srsue/hdr/mac/proc_ra.h b/srsue/hdr/mac/proc_ra.h index 833173b75..5742c2373 100644 --- a/srsue/hdr/mac/proc_ra.h +++ b/srsue/hdr/mac/proc_ra.h @@ -133,12 +133,12 @@ private: uint32_t nof_preambles; uint32_t nof_groupA_preambles; uint32_t nof_groupB_preambles; - uint32_t messagePowerOffsetGroupB; + int32_t messagePowerOffsetGroupB; uint32_t messageSizeGroupA; uint32_t responseWindowSize; uint32_t powerRampingStep; uint32_t preambleTransMax; - uint32_t iniReceivedTargetPower; + int32_t iniReceivedTargetPower; int delta_preamble_db; uint32_t contentionResolutionTimer; uint32_t maskIndex; diff --git a/srsue/hdr/phy/phy.h b/srsue/hdr/phy/phy.h index 04599c11a..72ba883d8 100644 --- a/srsue/hdr/phy/phy.h +++ b/srsue/hdr/phy/phy.h @@ -123,15 +123,15 @@ public: /* Get/Set PHY parameters interface from RRC */ void get_config(phy_cfg_t *phy_cfg); - void set_config(phy_cfg_t *phy_cfg); - void set_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *dedicated); - void set_config_common(phy_cfg_common_t *common); - void set_config_tdd(LIBLTE_RRC_TDD_CONFIG_STRUCT *tdd); + void set_config(phy_cfg_t *phy_cfg); + void set_config_dedicated(asn1::rrc::phys_cfg_ded_s* dedicated); + void set_config_common(phy_cfg_common_t *common); + void set_config_tdd(asn1::rrc::tdd_cfg_s* tdd); void set_config_64qam_en(bool enable); - void set_config_mbsfn_sib2(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2); - void set_config_mbsfn_sib13(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13); - void set_config_mbsfn_mcch(LIBLTE_RRC_MCCH_MSG_STRUCT *mcch); - + void set_config_mbsfn_sib2(asn1::rrc::sib_type2_s* sib2); + void set_config_mbsfn_sib13(asn1::rrc::sib_type13_r9_s* sib13); + void set_config_mbsfn_mcch(asn1::rrc::mcch_msg_s* mcch); + /*Set MAC->PHY MCH period stopping point*/ void set_mch_period_stop(uint32_t stop); diff --git a/srsue/hdr/phy/prach.h b/srsue/hdr/phy/prach.h index 06d8f61cf..51dc7fc56 100644 --- a/srsue/hdr/phy/prach.h +++ b/srsue/hdr/phy/prach.h @@ -52,7 +52,7 @@ namespace srsue { signal_buffer = NULL; } ~prach(); - void init(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *config, uint32_t max_prb, phy_args_t *args, srslte::log *log_h); + void init(asn1::rrc::prach_cfg_sib_s* config, uint32_t max_prb, phy_args_t* args, srslte::log* log_h); bool set_cell(srslte_cell_t cell); bool prepare_to_send(uint32_t preamble_idx, int allowed_subframe = -1, float target_power_dbm = -1); bool is_ready_to_send(uint32_t current_tti); @@ -63,10 +63,10 @@ namespace srsue { private: const static int MAX_LEN_SF = 3; - - LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *config; - phy_args_t *args; - + + asn1::rrc::prach_cfg_sib_s* config; + phy_args_t* args; + srslte::log *log_h; int preamble_idx; int allowed_subframe; diff --git a/srsue/hdr/upper/gw.h b/srsue/hdr/upper/gw.h index 7ab51b962..7550dd9ad 100644 --- a/srsue/hdr/upper/gw.h +++ b/srsue/hdr/upper/gw.h @@ -81,9 +81,9 @@ private: bool running; bool run_enable; - int32 tun_fd; + int32_t tun_fd; struct ifreq ifr; - int32 sock; + int32_t sock; bool if_up; uint32_t current_ip_addr; diff --git a/srsue/hdr/upper/nas.h b/srsue/hdr/upper/nas.h index d2921b118..6b09a5e5e 100644 --- a/srsue/hdr/upper/nas.h +++ b/srsue/hdr/upper/nas.h @@ -82,7 +82,7 @@ public: emm_state_t get_state(); // RRC interface - void paging(LIBLTE_RRC_S_TMSI_STRUCT *ue_identiy); + void paging(asn1::rrc::s_tmsi_s* ue_identiy); void set_barring(barring_t barring); void write_pdu(uint32_t lcid, byte_buffer_t *pdu); uint32_t get_k_enb_count(); @@ -111,11 +111,11 @@ private: nas_interface_rrc::barring_t current_barring; - bool plmn_is_selected; - LIBLTE_RRC_PLMN_IDENTITY_STRUCT current_plmn; - LIBLTE_RRC_PLMN_IDENTITY_STRUCT home_plmn; + bool plmn_is_selected; + asn1::rrc::plmn_id_s current_plmn; + asn1::rrc::plmn_id_s home_plmn; - std::vector known_plmns; + std::vector known_plmns; LIBLTE_MME_EMM_INFORMATION_MSG_STRUCT emm_info; diff --git a/srsue/hdr/upper/pcsc_usim.h b/srsue/hdr/upper/pcsc_usim.h index 862b740f1..743443065 100644 --- a/srsue/hdr/upper/pcsc_usim.h +++ b/srsue/hdr/upper/pcsc_usim.h @@ -74,7 +74,7 @@ public: bool get_imsi_vec(uint8_t* imsi_, uint32_t n); bool get_imei_vec(uint8_t* imei_, uint32_t n); - bool get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id); + bool get_home_plmn_id(asn1::rrc::plmn_id_s* home_plmn_id); auth_result_t generate_authentication_response(uint8_t *rand, uint8_t *autn_enb, diff --git a/srsue/hdr/upper/rrc.h b/srsue/hdr/upper/rrc.h index 080f36451..fa5ec6e26 100644 --- a/srsue/hdr/upper/rrc.h +++ b/srsue/hdr/upper/rrc.h @@ -30,22 +30,24 @@ #include "pthread.h" #include "rrc_common.h" +#include "srslte/common/bcd_helpers.h" +#include "srslte/common/block_queue.h" #include "srslte/common/buffer_pool.h" -#include "srslte/common/log.h" #include "srslte/common/common.h" -#include "srslte/interfaces/ue_interfaces.h" +#include "srslte/common/log.h" #include "srslte/common/security.h" #include "srslte/common/threads.h" -#include "srslte/common/block_queue.h" +#include "srslte/interfaces/ue_interfaces.h" #include #include #include +#define SRSLTE_RRC_N_BANDS 43 typedef struct { uint32_t ue_category; uint32_t feature_group; - uint8_t supported_bands[LIBLTE_RRC_BAND_N_ITEMS]; + uint8_t supported_bands[SRSLTE_RRC_N_BANDS]; uint32_t nof_supported_bands; }rrc_args_t; @@ -69,10 +71,12 @@ class cell_t bool greater(cell_t *x) { return rsrp > x->rsrp || isnan(rsrp); } - bool plmn_equals(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) { + bool plmn_equals(asn1::rrc::plmn_id_s plmn_id) + { if (has_valid_sib1) { - for (uint32_t i = 0; i < sib1.N_plmn_ids; i++) { - if (plmn_id.mcc == sib1.plmn_id[i].id.mcc && plmn_id.mnc == sib1.plmn_id[i].id.mnc) { + for (uint32_t i = 0; i < sib1.cell_access_related_info.plmn_id_list.size(); i++) { + if (plmn_id.mcc == sib1.cell_access_related_info.plmn_id_list[i].plmn_id.mcc && + plmn_id.mnc == sib1.cell_access_related_info.plmn_id_list[i].plmn_id.mnc) { return true; } } @@ -82,26 +86,27 @@ class cell_t uint32_t nof_plmns() { if (has_valid_sib1) { - return sib1.N_plmn_ids; + return sib1.cell_access_related_info.plmn_id_list.size(); } else { return 0; } } - LIBLTE_RRC_PLMN_IDENTITY_STRUCT get_plmn(uint32_t idx) { - if (idx < sib1.N_plmn_ids && has_valid_sib1) { - return sib1.plmn_id[idx].id; + asn1::rrc::plmn_id_s get_plmn(uint32_t idx) + { + if (idx < sib1.cell_access_related_info.plmn_id_list.size() && has_valid_sib1) { + return sib1.cell_access_related_info.plmn_id_list[idx].plmn_id; } else { - LIBLTE_RRC_PLMN_IDENTITY_STRUCT null; - null.mnc = 0; - null.mcc = 0; + asn1::rrc::plmn_id_s null; + bzero(&null.mcc[0], sizeof(null.mcc)); + bzero(&null.mnc[0], sizeof(null.mnc)); return null; } } uint16_t get_tac() { if (has_valid_sib1) { - return sib1.tracking_area_code; + return (uint16_t)sib1.cell_access_related_info.tac.to_number(); } else { return 0; } @@ -147,20 +152,24 @@ class cell_t return rsrp; } - void set_sib1(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1) { - memcpy(&this->sib1, sib1, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT)); + void set_sib1(asn1::rrc::sib_type1_s* sib1_) + { + sib1 = *sib1_; has_valid_sib1 = true; } - void set_sib2(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2) { - memcpy(&this->sib2, sib2, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT)); + void set_sib2(asn1::rrc::sib_type2_s* sib2_) + { + sib2 = *sib2_; has_valid_sib2 = true; } - void set_sib3(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3) { - memcpy(&this->sib3, sib3, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT)); + void set_sib3(asn1::rrc::sib_type3_s* sib3_) + { + sib3 = *sib3_; has_valid_sib3 = true; } - void set_sib13(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13) { - memcpy(&this->sib13, sib13, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT)); + void set_sib13(asn1::rrc::sib_type13_r9_s* sib13_) + { + sib13 = *sib13_; has_valid_sib13 = true; } @@ -172,22 +181,12 @@ class cell_t return t[0].tv_sec; } - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1ptr() { - return &sib1; - } - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2ptr() { - return &sib2; - } - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3ptr() { - return &sib3; - } - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13ptr() { - return &sib13; - } + asn1::rrc::sib_type1_s* sib1ptr() { return &sib1; } + asn1::rrc::sib_type2_s* sib2ptr() { return &sib2; } + asn1::rrc::sib_type3_s* sib3ptr() { return &sib3; } + asn1::rrc::sib_type13_r9_s* sib13ptr() { return &sib13; } - uint32_t get_cell_id() { - return sib1.cell_id; - } + uint32_t get_cell_id() { return (uint32_t)sib1.cell_access_related_info.cell_id.to_number(); } bool has_sib1() { return has_valid_sib1; @@ -224,31 +223,38 @@ class cell_t } uint16_t get_mcc() { + uint16_t mcc; if (has_valid_sib1) { - if (sib1.N_plmn_ids > 0) { - return sib1.plmn_id[0].id.mcc; + if (sib1.cell_access_related_info.plmn_id_list.size() > 0) { + if (srslte::bytes_to_mcc(&sib1.cell_access_related_info.plmn_id_list[0].plmn_id.mcc[0], &mcc)) { + return mcc; + } } } return 0; } uint16_t get_mnc() { + uint16_t mnc; if (has_valid_sib1) { - if (sib1.N_plmn_ids > 0) { - return sib1.plmn_id[0].id.mnc; + if (sib1.cell_access_related_info.plmn_id_list.size() > 0) { + if (srslte::bytes_to_mnc(&sib1.cell_access_related_info.plmn_id_list[0].plmn_id.mnc[0], &mnc, + sib1.cell_access_related_info.plmn_id_list[0].plmn_id.mnc.size())) { + return mnc; + } } } return 0; } phy_interface_rrc::phy_cell_t phy_cell; - bool in_sync; - bool has_mcch; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT sib1; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT sib2; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT sib3; - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT sib13; - LIBLTE_RRC_MCCH_MSG_STRUCT mcch; + bool in_sync; + bool has_mcch; + asn1::rrc::sib_type1_s sib1; + asn1::rrc::sib_type2_s sib2; + asn1::rrc::sib_type3_s sib3; + asn1::rrc::sib_type13_r9_s sib13; + asn1::rrc::mcch_msg_s mcch; private: float rsrp; @@ -261,14 +267,13 @@ private: bool has_valid_sib13; }; -class rrc - :public rrc_interface_nas - ,public rrc_interface_phy - ,public rrc_interface_mac - ,public rrc_interface_pdcp - ,public rrc_interface_rlc - ,public srslte::timer_callback - ,public thread +class rrc : public rrc_interface_nas, + public rrc_interface_phy, + public rrc_interface_mac, + public rrc_interface_pdcp, + public rrc_interface_rlc, + public srslte::timer_callback, + public thread { public: rrc(); @@ -291,8 +296,12 @@ public: // Timeout callback interface void timer_expired(uint32_t timeout_id); - void liblte_rrc_log(char *str); - + void srslte_rrc_log(const char* str); + + typedef enum { Rx = 0, Tx } direction_t; + template + void log_rrc_message(const std::string source, const direction_t dir, const byte_buffer_t* pdu, const T& msg); + void print_mbms(); bool mbms_service_start(uint32_t serv, uint32_t port); @@ -302,10 +311,9 @@ public: uint16_t get_mcc(); uint16_t get_mnc(); int plmn_search(found_plmn_t found_plmns[MAX_FOUND_PLMNS]); - void plmn_select(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id); - bool connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause, - srslte::byte_buffer_t *dedicatedInfoNAS); - void set_ue_idenity(LIBLTE_RRC_S_TMSI_STRUCT s_tmsi); + void plmn_select(asn1::rrc::plmn_id_s plmn_id); + bool connection_request(asn1::rrc::establishment_cause_e cause, srslte::byte_buffer_t* dedicated_info_nas); + void set_ue_idenity(asn1::rrc::s_tmsi_s s_tmsi); // PHY interface void in_sync(); @@ -356,25 +364,24 @@ private: nas_interface_rrc *nas; usim_interface_rrc *usim; gw_interface_rrc *gw; - - LIBLTE_RRC_UL_DCCH_MSG_STRUCT ul_dcch_msg; - LIBLTE_RRC_UL_CCCH_MSG_STRUCT ul_ccch_msg; - LIBLTE_RRC_DL_CCCH_MSG_STRUCT dl_ccch_msg; - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - byte_buffer_t *dedicatedInfoNAS; + asn1::rrc::ul_dcch_msg_s ul_dcch_msg; + asn1::rrc::ul_ccch_msg_s ul_ccch_msg; + asn1::rrc::dl_ccch_msg_s dl_ccch_msg; + asn1::rrc::dl_dcch_msg_s dl_dcch_msg; + + byte_buffer_t* dedicated_info_nas; - byte_buffer_t* byte_align_and_pack(); void send_ul_ccch_msg(); void send_ul_dcch_msg(uint32_t lcid); srslte::bit_buffer_t bit_buf; pthread_mutex_t mutex; - rrc_state_t state; + rrc_state_t state, last_state; uint8_t transaction_id; - LIBLTE_RRC_S_TMSI_STRUCT ueIdentity; - bool ueIdentity_configured; + asn1::rrc::s_tmsi_s ue_identity; + bool ue_identity_configured; bool drb_up; @@ -387,7 +394,7 @@ private: phy_interface_rrc::phy_cfg_t previous_phy_cfg; mac_interface_rrc::mac_cfg_t previous_mac_cfg; bool pending_mob_reconf; - LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT mob_reconf; + asn1::rrc::rrc_conn_recfg_s mob_reconf; uint8_t k_rrc_enc[32]; uint8_t k_rrc_int[32]; @@ -397,8 +404,8 @@ private: srslte::CIPHERING_ALGORITHM_ID_ENUM cipher_algo; srslte::INTEGRITY_ALGORITHM_ID_ENUM integ_algo; - std::map srbs; - std::map drbs; + std::map srbs; + std::map drbs; // RRC constants and timers srslte::mac_interface_timers *mac_timers; @@ -461,12 +468,15 @@ private: bool go_idle; bool go_rlf; + uint32_t rlc_flush_counter; + uint32_t rlc_flush_timeout; + // Measurements sub-class class rrc_meas { public: void init(rrc *parent); void reset(); - bool parse_meas_config(LIBLTE_RRC_MEAS_CONFIG_STRUCT *meas_config); + bool parse_meas_config(asn1::rrc::meas_cfg_s* meas_config); void new_phy_meas(uint32_t earfcn, uint32_t pci, float rsrp, float rsrq, uint32_t tti); void run_tti(uint32_t tti); bool timer_expired(uint32_t timer_id); @@ -496,7 +506,7 @@ private: uint32_t amount; quantity_t trigger_quantity; quantity_t report_quantity; - LIBLTE_RRC_EVENT_EUTRA_STRUCT event; + asn1::rrc::eutra_event_s event; enum {EVENT, PERIODIC} trigger_type; } report_cfg_t; @@ -547,9 +557,8 @@ private: bool find_earfcn_cell(uint32_t earfcn, uint32_t pci, meas_obj_t **object, int *cell_idx); float range_to_value(quantity_t quant, uint8_t range); uint8_t value_to_range(quantity_t quant, float value); - bool process_event(LIBLTE_RRC_EVENT_EUTRA_STRUCT *event, uint32_t tti, - bool enter_condition, bool exit_condition, - meas_t *m, meas_value_t *cell); + bool process_event(asn1::rrc::eutra_event_s* event, uint32_t tti, bool enter_condition, bool exit_condition, + meas_t* m, meas_value_t* cell); void generate_report(uint32_t meas_id); }; @@ -597,66 +606,66 @@ private: phy_interface_rrc::cell_search_ret_t cell_search(); - LIBLTE_RRC_PLMN_IDENTITY_STRUCT selected_plmn_id; + asn1::rrc::plmn_id_s selected_plmn_id; bool plmn_is_selected; bool security_is_activated; // RLC interface - void max_retx_attempted(); + void max_retx_attempted(); // Senders - void send_con_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause); - void send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause); - void send_con_restablish_complete(); - void send_con_setup_complete(byte_buffer_t *nas_msg); - void send_ul_info_transfer(byte_buffer_t *nas_msg); - void send_security_mode_complete(); - void send_rrc_con_reconfig_complete(); - void send_rrc_ue_cap_info(); + void send_con_request(asn1::rrc::establishment_cause_e cause); + void send_con_restablish_request(asn1::rrc::reest_cause_e cause); + void send_con_restablish_complete(); + void send_con_setup_complete(byte_buffer_t* nas_msg); + void send_ul_info_transfer(byte_buffer_t* nas_msg); + void send_security_mode_complete(); + void send_rrc_con_reconfig_complete(); + void send_rrc_ue_cap_info(); // Parsers - void process_pdu(uint32_t lcid, byte_buffer_t *pdu); - void parse_dl_ccch(byte_buffer_t *pdu); - void parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu); - void parse_dl_info_transfer(uint32_t lcid, byte_buffer_t *pdu); + void process_pdu(uint32_t lcid, byte_buffer_t* pdu); + void parse_dl_ccch(byte_buffer_t* pdu); + void parse_dl_dcch(uint32_t lcid, byte_buffer_t* pdu); + void parse_dl_info_transfer(uint32_t lcid, byte_buffer_t* pdu); // Helpers - bool con_reconfig(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig); - void con_reconfig_failed(); - bool con_reconfig_ho(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig); - bool ho_prepare(); - void ho_failed(); - void rrc_connection_release(); - void radio_link_failure(); - void leave_connected(); - void stop_timers(); - - void apply_rr_config_common_dl(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *config); - void apply_rr_config_common_ul(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *config); - void handle_sib1(); - void handle_sib2(); - void handle_sib3(); - void handle_sib13(); - - void apply_sib2_configs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2); - void apply_sib13_configs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13); - void handle_con_setup(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *setup); - void handle_con_reest(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *setup); - void handle_rrc_con_reconfig(uint32_t lcid, LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig); - void add_srb(LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT *srb_cnfg); - void add_drb(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb_cnfg); - void release_drb(uint32_t drb_id); - void add_mrb(uint32_t lcid, uint32_t port); - bool apply_rr_config_dedicated(LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT *cnfg); - void apply_phy_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cnfg, bool apply_defaults); - void apply_mac_config_dedicated(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_cfg, bool apply_defaults); - - // Helpers for setting default values - void set_phy_default_pucch_srs(); - void set_phy_default(); - void set_mac_default(); - void set_rrc_default(); + bool con_reconfig(asn1::rrc::rrc_conn_recfg_s* reconfig); + void con_reconfig_failed(); + bool con_reconfig_ho(asn1::rrc::rrc_conn_recfg_s* reconfig); + bool ho_prepare(); + void ho_failed(); + void rrc_connection_release(); + void radio_link_failure(); + void leave_connected(); + void stop_timers(); + + void apply_rr_config_common_dl(asn1::rrc::rr_cfg_common_s* config); + void apply_rr_config_common_ul(asn1::rrc::rr_cfg_common_s* config); + void handle_sib1(); + void handle_sib2(); + void handle_sib3(); + void handle_sib13(); + + void apply_sib2_configs(asn1::rrc::sib_type2_s* sib2); + void apply_sib13_configs(asn1::rrc::sib_type13_r9_s* sib13); + void handle_con_setup(asn1::rrc::rrc_conn_setup_s* setup); + void handle_con_reest(asn1::rrc::rrc_conn_reest_s* setup); + void handle_rrc_con_reconfig(uint32_t lcid, asn1::rrc::rrc_conn_recfg_s* reconfig); + void add_srb(asn1::rrc::srb_to_add_mod_s* srb_cnfg); + void add_drb(asn1::rrc::drb_to_add_mod_s* drb_cnfg); + void release_drb(uint32_t drb_id); + void add_mrb(uint32_t lcid, uint32_t port); + bool apply_rr_config_dedicated(asn1::rrc::rr_cfg_ded_s* cnfg); + void apply_phy_config_dedicated(asn1::rrc::phys_cfg_ded_s* phy_cnfg, bool apply_defaults); + void apply_mac_config_dedicated(asn1::rrc::mac_main_cfg_s* mac_cfg, bool apply_defaults); + + // Helpers for setting default values + void set_phy_default_pucch_srs(); + void set_phy_default(); + void set_mac_default(); + void set_rrc_default(); }; } // namespace srsue diff --git a/srsue/hdr/upper/usim.h b/srsue/hdr/upper/usim.h index f436f47a6..f9730f73f 100644 --- a/srsue/hdr/upper/usim.h +++ b/srsue/hdr/upper/usim.h @@ -50,7 +50,7 @@ public: bool get_imsi_vec(uint8_t* imsi_, uint32_t n); bool get_imei_vec(uint8_t* imei_, uint32_t n); - bool get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id); + bool get_home_plmn_id(asn1::rrc::plmn_id_s* home_plmn_id); auth_result_t generate_authentication_response(uint8_t *rand, uint8_t *autn_enb, diff --git a/srsue/hdr/upper/usim_base.h b/srsue/hdr/upper/usim_base.h index b9a6ee44c..ee54cda7c 100644 --- a/srsue/hdr/upper/usim_base.h +++ b/srsue/hdr/upper/usim_base.h @@ -71,7 +71,7 @@ public: virtual bool get_imsi_vec(uint8_t* imsi_, uint32_t n) = 0; virtual bool get_imei_vec(uint8_t* imei_, uint32_t n) = 0; - virtual bool get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id) = 0; + virtual bool get_home_plmn_id(asn1::rrc::plmn_id_s* home_plmn_id) = 0; virtual auth_result_t generate_authentication_response(uint8_t *rand, uint8_t *autn_enb, diff --git a/srsue/src/CMakeLists.txt b/srsue/src/CMakeLists.txt index 0755a6490..f6a561c14 100644 --- a/srsue/src/CMakeLists.txt +++ b/srsue/src/CMakeLists.txt @@ -39,6 +39,7 @@ target_link_libraries(srsue srsue_mac srslte_phy srslte_upper srslte_radio + rrc_asn1 ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/srsue/src/mac/mac.cc b/srsue/src/mac/mac.cc index 516d1d97f..169177062 100644 --- a/srsue/src/mac/mac.cc +++ b/srsue/src/mac/mac.cc @@ -38,6 +38,7 @@ #include "srsue/hdr/mac/mac.h" #include "srslte/common/pcap.h" +using namespace asn1::rrc; namespace srsue { @@ -279,7 +280,7 @@ void mac::new_grant_dl(mac_interface_phy::mac_grant_t grant, mac_interface_phy:: ra_procedure.new_grant_dl(grant, action); } else if (grant.rnti_type == SRSLTE_RNTI_PCH) { - memcpy(&action->phy_grant, &grant.phy_grant, sizeof(srslte_phy_grant_t)); + action->phy_grant = grant.phy_grant; action->generate_ack = false; action->decode_enabled[0] = true; action->decode_enabled[1] = false; @@ -340,7 +341,7 @@ void mac::new_grant_ul_ack(mac_interface_phy::mac_grant_t grant, bool ack, mac_i void mac::new_mch_dl(srslte_ra_dl_grant_t phy_grant, tb_action_dl_t *action) { - memcpy(&action->phy_grant, &phy_grant, sizeof(srslte_phy_grant_t)); + action->phy_grant.dl = phy_grant; action->generate_ack = false; action->decode_enabled[0] = true; srslte_softbuffer_rx_reset_cb(&mch_softbuffer, 1); @@ -372,10 +373,8 @@ void mac::setup_timers() timer_alignment); } - int value = - liblte_rrc_time_alignment_timer_num[config.main.time_alignment_timer]; - log_h->info("Set MAC Time Alignment Timer (0x%x) to: %d value: %d \n", - timer_alignment, config.main.time_alignment_timer, value); + int value = config.main.time_align_timer_ded.to_number(); + log_h->info("Set MAC Time Alignment Timer (0x%x) to %d \n", timer_alignment, value); if (value > 0) { timers.get(timer_alignment)->set(this, value); } @@ -403,7 +402,7 @@ void mac::timer_alignment_expire() { void mac::get_rntis(ue_rnti_t* rntis) { - memcpy(rntis, &uernti, sizeof(ue_rnti_t)); + *rntis = uernti; } void mac::set_ho_rnti(uint16_t crnti, uint16_t target_pci) { @@ -432,7 +431,7 @@ void mac::start_cont_ho() void mac::get_config(mac_cfg_t* mac_cfg) { - memcpy(mac_cfg, &config, sizeof(mac_cfg_t)); + *mac_cfg = config; } void mac::set_mbsfn_config(uint32_t nof_mbsfn_services) @@ -444,25 +443,25 @@ void mac::set_mbsfn_config(uint32_t nof_mbsfn_services) void mac::set_config(mac_cfg_t* mac_cfg) { - memcpy(&config, mac_cfg, sizeof(mac_cfg_t)); + config = *mac_cfg; setup_timers(); } -void mac::set_config_main(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT* main_cfg) +void mac::set_config_main(mac_main_cfg_s* main_cfg) { - memcpy(&config.main, main_cfg, sizeof(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT)); + config.main = *main_cfg; setup_timers(); } -void mac::set_config_rach(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT* rach_cfg, uint32_t prach_config_index) +void mac::set_config_rach(rach_cfg_common_s* rach_cfg, uint32_t prach_config_index) { - memcpy(&config.rach, rach_cfg, sizeof(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT)); + config.rach = *rach_cfg; config.prach_config_index = prach_config_index; } -void mac::set_config_sr(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT* sr_cfg) +void mac::set_config_sr(sched_request_cfg_c* sr_cfg) { - memcpy(&config.sr, sr_cfg, sizeof(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT)); + config.sr = *sr_cfg; } void mac::setup_lcid(uint32_t lcid, uint32_t lcg, uint32_t priority, int PBR_x_tti, uint32_t BSD) @@ -566,12 +565,6 @@ void mac::pdu_process::run_thread() } } - - - - - - } diff --git a/srsue/src/mac/proc_bsr.cc b/srsue/src/mac/proc_bsr.cc index 9b29c9128..5c3029279 100644 --- a/srsue/src/mac/proc_bsr.cc +++ b/srsue/src/mac/proc_bsr.cc @@ -89,7 +89,7 @@ void bsr_proc::timer_expired(uint32_t timer_id) { } } else if (timer_id == timer_retx_id) { // Enable reTx of SR only if periodic timer is not infinity - int periodic = liblte_rrc_periodic_bsr_timer_num[mac_cfg->main.ulsch_cnfg.periodic_bsr_timer]; + int periodic = mac_cfg->main.ul_sch_cfg.periodic_bsr_timer.to_number(); if (periodic >= 0) { triggered_bsr_type = REGULAR; Debug("BSR: Triggering BSR reTX\n"); @@ -224,16 +224,16 @@ void bsr_proc::step(uint32_t tti) { if (!initiated) { return; - } - - int periodic = liblte_rrc_periodic_bsr_timer_num[mac_cfg->main.ulsch_cnfg.periodic_bsr_timer]; + } + + int periodic = mac_cfg->main.ul_sch_cfg.periodic_bsr_timer.to_number(); if (periodic > 0 && (uint32_t)periodic != timers_db->get(timer_periodic_id)->get_timeout()) { timers_db->get(timer_periodic_id)->set(this, periodic); timers_db->get(timer_periodic_id)->run(); Info("BSR: Configured timer periodic %d ms\n", periodic); - } - int retx = liblte_rrc_retransmission_bsr_timer_num[mac_cfg->main.ulsch_cnfg.retx_bsr_timer]; + } + int retx = mac_cfg->main.ul_sch_cfg.retx_bsr_timer.to_number(); if (retx > 0 && (uint32_t)retx != timers_db->get(timer_retx_id)->get_timeout()) { timers_db->get(timer_retx_id)->set(this, retx); diff --git a/srsue/src/mac/proc_phr.cc b/srsue/src/mac/proc_phr.cc index 69a5c0de3..7635968df 100644 --- a/srsue/src/mac/proc_phr.cc +++ b/srsue/src/mac/proc_phr.cc @@ -58,15 +58,21 @@ void phr_proc::init(phy_interface_mac* phy_h_, srslte::log* log_h_, mac_interfac void phr_proc::reset() { - phr_is_triggered = false; + timers_db->get(timer_periodic_id)->stop(); + timers_db->get(timer_prohibit_id)->stop(); + phr_is_triggered = false; timer_periodic_value = -2; timer_prohibit_value = -2; - dl_pathloss_change = -2; + dl_pathloss_change = -2; } bool phr_proc::pathloss_changed() { - - int min_change = liblte_rrc_dl_pathloss_change_num[mac_cfg->main.phr_cnfg.dl_pathloss_change]; + if (not mac_cfg->main.phr_cfg_present or mac_cfg->main.phr_cfg.type() == asn1::rrc::setup_e::release) { + log_h->error("Pathloss has changed but phr_cfg is not present.\n"); + return false; + } + + int min_change = mac_cfg->main.phr_cfg.setup().dl_pathloss_change.to_number(); int cur_pathloss_db = (int) phy_h->get_pathloss_db(); if (abs(cur_pathloss_db - last_pathloss_db) > min_change && min_change > 0) { @@ -79,17 +85,16 @@ bool phr_proc::pathloss_changed() { void phr_proc::start_timer() { timers_db->get(timer_periodic_id)->run(); -} +} -/* Trigger PHR when timers exire */ +/* Trigger PHR when timers exires */ void phr_proc::timer_expired(uint32_t timer_id) { - if(timer_id == timer_periodic_id) { + if (timer_id == timer_periodic_id) { timers_db->get(timer_periodic_id)->reset(); timers_db->get(timer_periodic_id)->run(); Debug("PHR: Triggered by timer periodic (timer expired).\n"); phr_is_triggered = true; } else if (timer_id == timer_prohibit_id) { - int pathloss_db = liblte_rrc_dl_pathloss_change_num[mac_cfg->main.phr_cnfg.dl_pathloss_change]; if (pathloss_changed()) { Info("PHR: Triggered by pathloss difference. cur_pathloss_db=%d (timer expired)\n", last_pathloss_db); phr_is_triggered = true; @@ -103,11 +108,11 @@ void phr_proc::step(uint32_t tti) { if (!initiated) { return; - } - - if (mac_cfg->main.phr_cnfg.setup_present) { - int cfg_timer_periodic = liblte_rrc_periodic_phr_timer_num[mac_cfg->main.phr_cnfg.periodic_phr_timer]; - + } + + if (mac_cfg->main.phr_cfg.type() == asn1::rrc::setup_e::setup) { + int cfg_timer_periodic = mac_cfg->main.phr_cfg.setup().periodic_phr_timer.to_number(); + // Setup timers and trigger PHR when configuration changed by higher layers if (timer_periodic_value != cfg_timer_periodic && cfg_timer_periodic > 0) { @@ -120,20 +125,20 @@ void phr_proc::step(uint32_t tti) } - int cfg_timer_prohibit = liblte_rrc_prohibit_phr_timer_num[mac_cfg->main.phr_cnfg.prohibit_phr_timer]; + if (mac_cfg->main.phr_cfg_present) { + int cfg_timer_prohibit = mac_cfg->main.phr_cfg.setup().prohibit_phr_timer.to_number(); - if (timer_prohibit_value != cfg_timer_prohibit && cfg_timer_prohibit > 0) - { - timer_prohibit_value = cfg_timer_prohibit; - timers_db->get(timer_prohibit_id)->set(this, timer_prohibit_value); - timers_db->get(timer_prohibit_id)->run(); - Info("PHR: Configured timer prohibit %d ms\n", timer_prohibit_value); - phr_is_triggered = true; - } - if (pathloss_changed() && timers_db->get(timer_prohibit_id)->is_expired()) - { - Info("PHR: Triggered by pathloss difference. cur_pathloss_db=%d\n", last_pathloss_db); - phr_is_triggered = true; + if (timer_prohibit_value != cfg_timer_prohibit && cfg_timer_prohibit > 0) { + timer_prohibit_value = cfg_timer_prohibit; + timers_db->get(timer_prohibit_id)->set(this, timer_prohibit_value); + timers_db->get(timer_prohibit_id)->run(); + Info("PHR: Configured timer prohibit %d ms\n", timer_prohibit_value); + phr_is_triggered = true; + } + if (pathloss_changed() && timers_db->get(timer_prohibit_id)->is_expired()) { + Info("PHR: Triggered by pathloss difference. cur_pathloss_db=%d\n", last_pathloss_db); + phr_is_triggered = true; + } } } diff --git a/srsue/src/mac/proc_ra.cc b/srsue/src/mac/proc_ra.cc index 8710c9e1e..8a4bbb47e 100644 --- a/srsue/src/mac/proc_ra.cc +++ b/srsue/src/mac/proc_ra.cc @@ -29,9 +29,10 @@ #define Info(fmt, ...) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) log_h->debug(fmt, ##__VA_ARGS__) -#include -#include +#include // for printing uint64_t #include +#include +#include #include "srsue/hdr/mac/proc_ra.h" #include "srsue/hdr/mac/mac.h" @@ -104,9 +105,9 @@ void ra_proc::read_params() { preambleIndex = 0; // pass when called from higher layers for non-contention based RA maskIndex = 0; // same } - nof_preambles = liblte_rrc_number_of_ra_preambles_num[mac_cfg->rach.num_ra_preambles]; - if (mac_cfg->rach.preambles_group_a_cnfg.present) { - nof_groupA_preambles = liblte_rrc_size_of_ra_preambles_group_a_num[mac_cfg->rach.preambles_group_a_cnfg.size_of_ra]; + nof_preambles = mac_cfg->rach.preamb_info.nof_ra_preambs.to_number(); + if (mac_cfg->rach.preamb_info.preambs_group_a_cfg_present) { + nof_groupA_preambles = mac_cfg->rach.preamb_info.preambs_group_a_cfg.size_of_ra_preambs_group_a.to_number(); } else { nof_groupA_preambles = nof_preambles; } @@ -117,14 +118,14 @@ void ra_proc::read_params() { nof_groupB_preambles = nof_preambles - nof_groupA_preambles; if (nof_groupB_preambles) { - messagePowerOffsetGroupB= liblte_rrc_message_power_offset_group_b_num[mac_cfg->rach.preambles_group_a_cnfg.msg_pwr_offset_group_b]; - messageSizeGroupA = liblte_rrc_message_size_group_a_num[mac_cfg->rach.preambles_group_a_cnfg.msg_size]; + messagePowerOffsetGroupB = mac_cfg->rach.preamb_info.preambs_group_a_cfg.msg_pwr_offset_group_b.to_number(); + messageSizeGroupA = mac_cfg->rach.preamb_info.preambs_group_a_cfg.msg_size_group_a.to_number(); } - responseWindowSize = liblte_rrc_ra_response_window_size_num[mac_cfg->rach.ra_resp_win_size]; - powerRampingStep = liblte_rrc_power_ramping_step_num[mac_cfg->rach.pwr_ramping_step]; - preambleTransMax = liblte_rrc_preamble_trans_max_num[mac_cfg->rach.preamble_trans_max]; - iniReceivedTargetPower = liblte_rrc_preamble_initial_received_target_power_num[mac_cfg->rach.preamble_init_rx_target_pwr]; - contentionResolutionTimer = liblte_rrc_mac_contention_resolution_timer_num[mac_cfg->rach.mac_con_res_timer]; + responseWindowSize = mac_cfg->rach.ra_supervision_info.ra_resp_win_size.to_number(); + powerRampingStep = mac_cfg->rach.pwr_ramp_params.pwr_ramp_step.to_number(); + preambleTransMax = mac_cfg->rach.ra_supervision_info.preamb_trans_max.to_number(); + iniReceivedTargetPower = mac_cfg->rach.pwr_ramp_params.preamb_init_rx_target_pwr.to_number(); + contentionResolutionTimer = mac_cfg->rach.ra_supervision_info.mac_contention_resolution_timer.to_number(); delta_preamble_db = delta_preamble_db_table[configIndex%5]; @@ -453,7 +454,7 @@ bool ra_proc::contention_resolution_id_received(uint64_t rx_contention_id) { uecri_successful = true; state = COMPLETION; } else { - rInfo("Transmitted UE Contention Id differs from received Contention ID (0x%lx != 0x%lx)\n", + rInfo("Transmitted UE Contention Id differs from received Contention ID (0x%" PRIu64 " != 0x%" PRIu64 ")\n", transmitted_contention_id, rx_contention_id); // Discard MAC PDU uecri_successful = false; diff --git a/srsue/src/mac/proc_sr.cc b/srsue/src/mac/proc_sr.cc index 57cd8bdd5..e699b7611 100644 --- a/srsue/src/mac/proc_sr.cc +++ b/srsue/src/mac/proc_sr.cc @@ -44,7 +44,9 @@ void sr_proc::init(phy_interface_mac* phy_h_, rrc_interface_mac *rrc_, srslte::l rrc = rrc_; mac_cfg = mac_cfg_; phy_h = phy_h_; - initiated = true; + initiated = true; + dsr_transmax = 0; + sr_counter = 0; do_ra = false; } @@ -75,7 +77,7 @@ void sr_proc::step(uint32_t tti) { if (initiated) { if (is_pending_sr) { - if (mac_cfg->sr.setup_present) { + if (mac_cfg->sr.type() == asn1::rrc::setup_e::setup) { if (sr_counter < dsr_transmax) { if (sr_counter == 0 || need_tx(tti)) { sr_counter++; @@ -120,8 +122,10 @@ void sr_proc::start() sr_counter = 0; is_pending_sr = true; } - dsr_transmax = liblte_rrc_dsr_trans_max_num[mac_cfg->sr.dsr_trans_max]; - Debug("SR: Starting Procedure. dsrTransMax=%d\n", dsr_transmax); + if (mac_cfg->sr.type() == asn1::rrc::setup_e::setup) { + dsr_transmax = mac_cfg->sr.setup().dsr_trans_max.to_number(); + Info("SR: Starting Procedure. dsrTransMax=%d\n", dsr_transmax); + } } } diff --git a/srsue/src/main.cc b/srsue/src/main.cc index a70887d50..214d2ef10 100644 --- a/srsue/src/main.cc +++ b/srsue/src/main.cc @@ -54,7 +54,8 @@ namespace bpo = boost::program_options; ***********************************************************************/ string config_file; -void parse_args(all_args_t *args, int argc, char *argv[]) { +void parse_args(all_args_t* args, int argc, char* argv[]) +{ // Command line only options bpo::options_description general("General options"); @@ -65,6 +66,7 @@ void parse_args(all_args_t *args, int argc, char *argv[]) { // Command line or config file options bpo::options_description common("Configuration options"); + // clang-format off common.add_options() ("rf.dl_earfcn", bpo::value(&args->rf.dl_earfcn)->default_value("3400"), "Downlink EARFCN list") ("rf.freq_offset", bpo::value(&args->rf.freq_offset)->default_value(0), "(optional) Frequency offset") @@ -317,6 +319,8 @@ void parse_args(all_args_t *args, int argc, char *argv[]) { bpo::options_description position("Positional options"); position.add_options() ("config_file", bpo::value(&config_file), "UE configuration file"); + // clang-format on + bpo::positional_options_description p; p.add("config_file", -1); @@ -370,14 +374,11 @@ void parse_args(all_args_t *args, int argc, char *argv[]) { exit(1); } - //Check conflicting OP/OPc options and which is being used - if (vm.count("usim.op") && !vm["usim.op"].defaulted() && - vm.count("usim.opc") && !vm["usim.opc"].defaulted()) - { + // Check conflicting OP/OPc options and which is being used + if (vm.count("usim.op") && !vm["usim.op"].defaulted() && vm.count("usim.opc") && !vm["usim.opc"].defaulted()) { cout << "Conflicting options OP and OPc. Please configure either one or the other." << endl; exit(1); - } - else { + } else { args->usim.using_op = vm.count("usim.op"); } @@ -412,7 +413,6 @@ void parse_args(all_args_t *args, int argc, char *argv[]) { } } - // Apply all_hex_limit to any unset layers if (vm.count("log.all_hex_limit")) { if (!vm.count("log.phy_hex_limit")) { @@ -442,24 +442,26 @@ void parse_args(all_args_t *args, int argc, char *argv[]) { } } -static int sigcnt = 0; -static bool running = true; -static bool do_metrics = false; +static int sigcnt = 0; +static bool running = true; +static bool do_metrics = false; metrics_stdout metrics_screen; -static bool show_mbms = false; -static bool mbms_service_start = false; -uint32_t serv, port; +static bool show_mbms = false; +static bool mbms_service_start = false; +uint32_t serv, port; -void sig_int_handler(int signo) { +void sig_int_handler(int signo) +{ sigcnt++; running = false; - printf("Stopping srsUE... Press Ctrl+C %d more times to force stop\n", 10-sigcnt); + printf("Stopping srsUE... Press Ctrl+C %d more times to force stop\n", 10 - sigcnt); if (sigcnt >= 10) { exit(-1); } } -void *input_loop(void *m) { +void* input_loop(void* m) +{ string key; while (running) { getline(cin, key); @@ -475,37 +477,35 @@ void *input_loop(void *m) { cout << "Enter t to restart trace." << endl; } metrics_screen.toggle_print(do_metrics); - } else - if (0 == key.compare("q")) { + } else if (0 == key.compare("q")) { running = false; - } - else if (0 == key.compare("mbms")) { - show_mbms = true; - } else if (key.find("mbms_service_start") != string::npos) { - char *dup = strdup(key.c_str()); - strtok(dup, " "); - char *s = strtok(NULL, " "); - char* p = strtok(NULL, " "); - if(NULL == s) { - cout << "Usage: mbms_service_start " << endl; - goto free_mem; - } - serv = atoi(s); - if(NULL == p) { - cout << "Usage: mbms_service_start " << endl; - goto free_mem; + } else if (0 == key.compare("mbms")) { + show_mbms = true; + } else if (key.find("mbms_service_start") != string::npos) { + char* dup = strdup(key.c_str()); + strtok(dup, " "); + char* s = strtok(NULL, " "); + char* p = strtok(NULL, " "); + if (NULL == s) { + cout << "Usage: mbms_service_start " << endl; + goto free_mem; + } + serv = atoi(s); + if (NULL == p) { + cout << "Usage: mbms_service_start " << endl; + goto free_mem; + } + port = atoi(p); + mbms_service_start = true; + free_mem: + free(dup); } - port = atoi(p); - mbms_service_start = true; -free_mem: - free(dup); } - } } return NULL; } -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { srslte::metrics_hub metricshub; signal(SIGINT, sig_int_handler); @@ -517,7 +517,7 @@ int main(int argc, char *argv[]) parse_args(&args, argc, argv); srsue_instance_type_t type = LTE; - ue_base *ue = ue_base::get_instance(type); + ue_base* ue = ue_base::get_instance(type); if (!ue) { cout << "Error creating UE instance." << endl << endl; exit(1); @@ -555,28 +555,27 @@ int main(int argc, char *argv[]) ue->start_plot(); } // Auto-start MBMS service by default - if(args.expert.mbms_service > -1){ - serv = args.expert.mbms_service; - port = 4321; + if (args.expert.mbms_service > -1) { + serv = args.expert.mbms_service; + port = 4321; mbms_service_start = true; } } - int cnt=0; + int cnt = 0; while (running) { - // - if(mbms_service_start) { - if(ue->mbms_service_start(serv, port)){ + if (mbms_service_start) { + if (ue->mbms_service_start(serv, port)) { mbms_service_start = false; } } - if(show_mbms) { + if (show_mbms) { show_mbms = false; ue->print_mbms(); } if (args.expert.print_buffer_state) { cnt++; - if (cnt==10) { - cnt=0; + if (cnt == 10) { + cnt = 0; ue->print_pool(); } } diff --git a/srsue/src/phy/phch_common.cc b/srsue/src/phy/phch_common.cc index 49ad139cc..38b29af55 100644 --- a/srsue/src/phy/phch_common.cc +++ b/srsue/src/phy/phch_common.cc @@ -24,17 +24,20 @@ * */ +#include "srsue/hdr/phy/phch_common.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/srslte.h" #include -#include #include -#include "srslte/srslte.h" -#include "srsue/hdr/phy/phch_common.h" +#include #define Error(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->error(fmt, ##__VA_ARGS__) #define Warning(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->warning(fmt, ##__VA_ARGS__) #define Info(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->debug(fmt, ##__VA_ARGS__) +using namespace asn1::rrc; + namespace srsue { cf_t zeros[50000]; @@ -153,8 +156,8 @@ bool phch_common::get_pending_rar(uint32_t tti, srslte_dci_rar_grant_t *rar_gran { if (rar_grant_pending && tti >= rar_grant_tti) { if (rar_grant_) { - rar_grant_pending = false; - memcpy(rar_grant_, &rar_grant, sizeof(srslte_dci_rar_grant_t)); + rar_grant_pending = false; + *rar_grant_ = rar_grant; } return true; } @@ -391,7 +394,13 @@ void phch_common::build_mch_table() bzero(&mch_table[0], sizeof(uint8_t)*40); // 40 element table represents 4 frames (40 subframes) - generate_mch_table(&mch_table[0], config->mbsfn.mbsfn_subfr_cnfg.subfr_alloc,(LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE == config->mbsfn.mbsfn_subfr_cnfg.subfr_alloc_num_frames)?1:4); + if (config->mbsfn.mbsfn_subfr_cnfg.sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) { + generate_mch_table(&mch_table[0], (uint32_t)config->mbsfn.mbsfn_subfr_cnfg.sf_alloc.one_frame().to_number(), 1u); + } else if (config->mbsfn.mbsfn_subfr_cnfg.sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::four_frames) { + generate_mch_table(&mch_table[0], (uint32_t)config->mbsfn.mbsfn_subfr_cnfg.sf_alloc.four_frames().to_number(), 4u); + } else { + log_h->error("The subframe config has not been set for MBSFN\n"); + } // Debug @@ -407,7 +416,7 @@ void phch_common::build_mcch_table() { // First reset tables bzero(&mcch_table[0], sizeof(uint8_t)*10); - generate_mcch_table(&mcch_table[0], config->mbsfn.mbsfn_area_info.sf_alloc_info_r9); + generate_mcch_table(&mcch_table[0], (uint32_t)config->mbsfn.mbsfn_area_info.mcch_cfg_r9.sf_alloc_info_r9.to_number()); // Debug std::stringstream ss; ss << "|"; @@ -433,58 +442,59 @@ void phch_common::set_mch_period_stop(uint32_t stop) } -bool phch_common::is_mch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) +bool phch_common::is_mch_subframe(subframe_cfg_t* cfg, uint32_t phy_tti) { - uint32_t sfn; // System Frame Number - uint8_t sf; // Subframe + uint32_t sfn; // System Frame Number + uint8_t sf; // Subframe uint8_t offset; uint8_t period; - sfn = phy_tti/10; - sf = phy_tti%10; + sfn = phy_tti / 10; + sf = phy_tti % 10; // Set some defaults - cfg->mbsfn_area_id = 0; - cfg->non_mbsfn_region_length = 1; - cfg->mbsfn_mcs = 2; - cfg->mbsfn_decode = false; - cfg->is_mcch = false; + cfg->mbsfn_area_id = 0; + cfg->non_mbsfn_region_length = 1; + cfg->mbsfn_mcs = 2; + cfg->mbsfn_decode = false; + cfg->is_mcch = false; // Check for MCCH - if(is_mcch_subframe(cfg, phy_tti)) { + if (is_mcch_subframe(cfg, phy_tti)) { cfg->is_mcch = true; return true; } - + // Not MCCH, check for MCH - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *subfr_cnfg = &config->mbsfn.mbsfn_subfr_cnfg; - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *area_info = &config->mbsfn.mbsfn_area_info; - offset = subfr_cnfg->radio_fr_alloc_offset; - period = liblte_rrc_radio_frame_allocation_period_num[subfr_cnfg->radio_fr_alloc_period]; - - if(LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ONE == subfr_cnfg->subfr_alloc_num_frames) { - if((sfn%period == offset) && (mch_table[sf] > 0)) { - if(sib13_configured) { - cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; - cfg->non_mbsfn_region_length = liblte_rrc_non_mbsfn_region_length_num[area_info->non_mbsfn_region_length]; - if(mcch_configured) { + mbsfn_sf_cfg_s* subfr_cnfg = &config->mbsfn.mbsfn_subfr_cnfg; + mbsfn_area_info_r9_s* area_info = &config->mbsfn.mbsfn_area_info; + offset = subfr_cnfg->radioframe_alloc_offset; + period = subfr_cnfg->radioframe_alloc_period.to_number(); + + if (subfr_cnfg->sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) { + if ((sfn % period == offset) && (mch_table[sf] > 0)) { + if (sib13_configured) { + cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; + cfg->non_mbsfn_region_length = area_info->non_mbsfn_region_len.to_number(); + if (mcch_configured) { // Iterate through PMCH configs to see which one applies in the current frame - LIBLTE_RRC_MCCH_MSG_STRUCT *mcch = &config->mbsfn.mcch; - uint32_t mbsfn_per_frame = mcch->pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9/liblte_rrc_mch_scheduling_period_r9_num[mcch->pmch_infolist_r9[0].pmch_config_r9.mch_schedulingperiod_r9]; - uint32_t frame_alloc_idx = sfn%liblte_rrc_mbsfn_common_sf_alloc_period_r9_num[mcch->commonsf_allocperiod_r9]; - uint32_t sf_alloc_idx = frame_alloc_idx*mbsfn_per_frame + ((sf<4)?sf-1:sf-3); + mbsfn_area_cfg_r9_s* mcch = &config->mbsfn.mcch.msg.c1().mbsfn_area_cfg_r9(); + uint32_t mbsfn_per_frame = mcch->pmch_info_list_r9[0].pmch_cfg_r9.sf_alloc_end_r9 / + mcch->pmch_info_list_r9[0].pmch_cfg_r9.mch_sched_period_r9.to_number(); + uint32_t frame_alloc_idx = sfn % mcch->common_sf_alloc_period_r9.to_number(); + uint32_t sf_alloc_idx = frame_alloc_idx * mbsfn_per_frame + ((sf < 4) ? sf - 1 : sf - 3); pthread_mutex_lock(&mtch_mutex); - while(!have_mtch_stop) { + while (!have_mtch_stop) { pthread_cond_wait(&mtch_cvar, &mtch_mutex); } pthread_mutex_unlock(&mtch_mutex); - for(uint32_t i=0; ipmch_infolist_r9_size; i++) { - if(sf_alloc_idx <= mch_period_stop) { - //trigger conditional variable, has ot be untriggered by mtch stop location - cfg->mbsfn_mcs = mcch->pmch_infolist_r9[i].pmch_config_r9.datamcs_r9; + for (uint32_t i = 0; i < mcch->pmch_info_list_r9.size(); i++) { + if (sf_alloc_idx <= mch_period_stop) { + // trigger conditional variable, has ot be untriggered by mtch stop location + cfg->mbsfn_mcs = mcch->pmch_info_list_r9[i].pmch_cfg_r9.data_mcs_r9; cfg->mbsfn_decode = true; } else { - //have_mtch_stop = false; + // have_mtch_stop = false; } } Debug("MCH subframe TTI:%d\n", phy_tti); @@ -492,47 +502,47 @@ bool phch_common::is_mch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) } return true; } - }else if(LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_FOUR == subfr_cnfg->subfr_alloc_num_frames) { - uint8_t idx = sfn%period; - if((idx >= offset) && (idx < offset+4)) { - if(mch_table[(idx*10)+sf] > 0){ - if(sib13_configured) { - cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; - cfg->non_mbsfn_region_length = liblte_rrc_non_mbsfn_region_length_num[area_info->non_mbsfn_region_length]; - // TODO: check for MCCH configuration, set MCS and decode - + } else if (subfr_cnfg->sf_alloc.type() == mbsfn_sf_cfg_s::sf_alloc_c_::types::four_frames) { + uint8_t idx = sfn % period; + if ((idx >= offset) && (idx < offset + 4)) { + if (mch_table[(idx * 10) + sf] > 0) { + if (sib13_configured) { + cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; + cfg->non_mbsfn_region_length = area_info->non_mbsfn_region_len.to_number(); + // TODO: check for MCCH configuration, set MCS and decode } return true; } } + } else { + log_h->error("The subframe allocation type is not yet configured\n"); } return false; } -bool phch_common::is_mcch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) +bool phch_common::is_mcch_subframe(subframe_cfg_t* cfg, uint32_t phy_tti) { - uint32_t sfn; // System Frame Number - uint8_t sf; // Subframe + uint32_t sfn; // System Frame Number + uint8_t sf; // Subframe uint8_t offset; - uint8_t period; + uint16_t period; - sfn = phy_tti/10; - sf = phy_tti%10; + sfn = phy_tti / 10; + sf = (uint8_t)(phy_tti % 10); - if(sib13_configured) { - LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT *subfr_cnfg = &config->mbsfn.mbsfn_subfr_cnfg; - LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT *area_info = &config->mbsfn.mbsfn_area_info; + if (sib13_configured) { + mbsfn_area_info_r9_s* area_info = &config->mbsfn.mbsfn_area_info; - offset = area_info->mcch_offset_r9; - period = liblte_rrc_mcch_repetition_period_r9_num[area_info->mcch_repetition_period_r9]; + offset = area_info->mcch_cfg_r9.mcch_offset_r9; + period = area_info->mcch_cfg_r9.mcch_repeat_period_r9.to_number(); - if((sfn%period == offset) && mcch_table[sf] > 0) { - cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; - cfg->non_mbsfn_region_length = liblte_rrc_non_mbsfn_region_length_num[area_info->non_mbsfn_region_length]; - cfg->mbsfn_mcs = liblte_rrc_mcch_signalling_mcs_r9_num[area_info->signalling_mcs_r9]; - cfg->mbsfn_decode = true; - have_mtch_stop = false; + if ((sfn % period == offset) && mcch_table[sf] > 0) { + cfg->mbsfn_area_id = area_info->mbsfn_area_id_r9; + cfg->non_mbsfn_region_length = area_info->non_mbsfn_region_len.to_number(); + cfg->mbsfn_mcs = area_info->mcch_cfg_r9.sig_mcs_r9.to_number(); + cfg->mbsfn_decode = true; + have_mtch_stop = false; Debug("MCCH subframe TTI:%d\n", phy_tti); return true; } @@ -542,10 +552,11 @@ bool phch_common::is_mcch_subframe(subframe_cfg_t *cfg, uint32_t phy_tti) void phch_common::get_sf_config(subframe_cfg_t *cfg, uint32_t phy_tti) { - if(is_mch_subframe(cfg, phy_tti)) { - cfg->sf_type = SUBFRAME_TYPE_MBSFN; - }else{ - cfg->sf_type = SUBFRAME_TYPE_REGULAR; + cfg->sf_type = SUBFRAME_TYPE_REGULAR; + if (sib13_configured) { + if (is_mch_subframe(cfg, phy_tti)) { + cfg->sf_type = SUBFRAME_TYPE_MBSFN; + } } } diff --git a/srsue/src/phy/phch_recv.cc b/srsue/src/phy/phch_recv.cc index d2be66cf2..55f5aa0bf 100644 --- a/srsue/src/phy/phch_recv.cc +++ b/srsue/src/phy/phch_recv.cc @@ -188,7 +188,7 @@ phy_interface_rrc::cell_search_ret_t phch_recv::cell_search(phy_interface_rrc::p pthread_mutex_lock(&rrc_mutex); // Move state to IDLE - Info("Cell Search: Start EARFCN index=%u/%lu\n", cellsearch_earfcn_index, earfcn.size()); + Info("Cell Search: Start EARFCN index=%u/%zd\n", cellsearch_earfcn_index, earfcn.size()); phy_state.go_idle(); if (current_earfcn != (int) earfcn[cellsearch_earfcn_index]) { diff --git a/srsue/src/phy/phch_worker.cc b/srsue/src/phy/phch_worker.cc index 9d02d3267..77dd753fd 100644 --- a/srsue/src/phy/phch_worker.cc +++ b/srsue/src/phy/phch_worker.cc @@ -29,7 +29,6 @@ #include "srsue/hdr/phy/phch_worker.h" #include "srslte/srslte.h" #include "srslte/interfaces/ue_interfaces.h" -#include "srslte/asn1/liblte_rrc.h" #define Error(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->error(fmt, ##__VA_ARGS__) #define Warning(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->warning(fmt, ##__VA_ARGS__) @@ -51,6 +50,7 @@ static int plot_worker_id = -1; #endif /*********************************************/ +using namespace asn1::rrc; namespace srsue { @@ -288,7 +288,7 @@ void phch_worker::work_imp() // Average RSSI over all symbols (make sure SF length is non-zero) float rssi_dbm = SRSLTE_SF_LEN_PRB(cell.nof_prb) > 0 ? (10*log10(srslte_vec_avg_power_cf(signal_buffer[0], SRSLTE_SF_LEN_PRB(cell.nof_prb))) + 30) : 0; - if (isnormal(rssi_dbm)) { + if (std::isnormal(rssi_dbm)) { phy->avg_rssi_dbm = SRSLTE_VEC_EMA(rssi_dbm, phy->avg_rssi_dbm, phy->args->snr_ema_coeff); } @@ -520,7 +520,7 @@ void phch_worker::work_imp() } void phch_worker::compute_ri(uint8_t *ri, uint8_t *pmi, float *sinr) { - if (phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3) { + if (phy->config->dedicated.ant_info.explicit_value().tx_mode == asn1::rrc::ant_info_ded_s::tx_mode_e_::tm3) { if (ue_dl.nof_rx_antennas > 1) { /* If 2 ort more receiving antennas, select RI */ float cn = 0.0f; @@ -535,7 +535,7 @@ void phch_worker::compute_ri(uint8_t *ri, uint8_t *pmi, float *sinr) { } } uci_data.uci_ri_len = 1; - } else if (phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + } else if (phy->config->dedicated.ant_info.explicit_value().tx_mode == asn1::rrc::ant_info_ded_s::tx_mode_e_::tm4) { if (sinr) { srslte_ue_dl_ri_pmi_select(&ue_dl, ri, pmi, sinr); Debug("TM4 ri=%d; pmi=%d; SINR=%.1fdB\n", ue_dl.ri, ue_dl.pmi[ue_dl.ri], 10*log10f(ue_dl.sinr[ue_dl.ri][ue_dl.pmi[ue_dl.ri]])); @@ -623,12 +623,12 @@ bool phch_worker::decode_pdcch_dl(srsue::mac_interface_phy::mac_grant_t* grant) Debug("Looking for RNTI=0x%x\n", dl_rnti); } - if (srslte_ue_dl_find_dl_dci_type(&ue_dl, phy->config->dedicated.antenna_info_explicit_value.tx_mode, cfi, tti%10, + if (srslte_ue_dl_find_dl_dci_type(&ue_dl, phy->config->dedicated.ant_info.explicit_value().tx_mode, cfi, tti % 10, dl_rnti, type, &dci_msg) != 1) { if (type == SRSLTE_RNTI_RAR) { Debug("RAR not found, SNR=%.1f dB, tti=%d, cfi=%d, tx_mode=%d, cell_id=%d\n", - 10*log10(srslte_chest_dl_get_snr(&ue_dl.chest)), tti, cfi, - phy->config->dedicated.antenna_info_explicit_value.tx_mode, cell.id); + 10 * log10(srslte_chest_dl_get_snr(&ue_dl.chest)), tti, cfi, + phy->config->dedicated.ant_info.explicit_value().tx_mode.value, cell.id); } return false; } @@ -704,16 +704,16 @@ int phch_worker::decode_pdsch(srslte_ra_dl_grant_t *grant, uint8_t *payload[SRSL } uint32_t nof_tb = SRSLTE_RA_DL_GRANT_NOF_TB(grant); - switch(phy->config->dedicated.antenna_info_explicit_value.tx_mode) { + switch (phy->config->dedicated.ant_info.explicit_value().tx_mode.value) { /* Implemented Tx Modes */ - case LIBLTE_RRC_TRANSMISSION_MODE_1: + case ant_info_ded_s::tx_mode_e_::tm1: mimo_type = SRSLTE_MIMO_TYPE_SINGLE_ANTENNA; if (nof_tb != 1) { Error("Wrong number of transport blocks (%d) for single antenna.", nof_tb); valid_config = false; } break; - case LIBLTE_RRC_TRANSMISSION_MODE_2: + case ant_info_ded_s::tx_mode_e_::tm2: if (cell.nof_ports > 1) { mimo_type = SRSLTE_MIMO_TYPE_TX_DIVERSITY; } else { @@ -724,7 +724,7 @@ int phch_worker::decode_pdsch(srslte_ra_dl_grant_t *grant, uint8_t *payload[SRSL valid_config = false; } break; - case LIBLTE_RRC_TRANSMISSION_MODE_3: + case ant_info_ded_s::tx_mode_e_::tm3: if (nof_tb == 1) { mimo_type = SRSLTE_MIMO_TYPE_TX_DIVERSITY; } else if (ue_dl.nof_rx_antennas > 1 && nof_tb == 2) { @@ -735,7 +735,7 @@ int phch_worker::decode_pdsch(srslte_ra_dl_grant_t *grant, uint8_t *payload[SRSL valid_config = false; } break; - case LIBLTE_RRC_TRANSMISSION_MODE_4: + case ant_info_ded_s::tx_mode_e_::tm4: if (nof_tb == 1) { mimo_type = (grant->pinfo == 0) ? SRSLTE_MIMO_TYPE_TX_DIVERSITY : SRSLTE_MIMO_TYPE_SPATIAL_MULTIPLEX; } else if (ue_dl.nof_rx_antennas > 1 && nof_tb == 2) { @@ -748,24 +748,23 @@ int phch_worker::decode_pdsch(srslte_ra_dl_grant_t *grant, uint8_t *payload[SRSL break; /* Not implemented cases */ - case LIBLTE_RRC_TRANSMISSION_MODE_5: - case LIBLTE_RRC_TRANSMISSION_MODE_6: - case LIBLTE_RRC_TRANSMISSION_MODE_7: - case LIBLTE_RRC_TRANSMISSION_MODE_8: - Error("Not implemented Tx mode (%d)\n", phy->config->dedicated.antenna_info_explicit_value.tx_mode); + case ant_info_ded_s::tx_mode_e_::tm5: + case ant_info_ded_s::tx_mode_e_::tm6: + case ant_info_ded_s::tx_mode_e_::tm7: + case ant_info_ded_s::tx_mode_e_::tm8_v920: + Error("Not implemented Tx mode (%d)\n", phy->config->dedicated.ant_info.explicit_value().tx_mode.value); break; /* Error cases */ - case LIBLTE_RRC_TRANSMISSION_MODE_N_ITEMS: default: - Error("Wrong Tx mode (%d)\n", phy->config->dedicated.antenna_info_explicit_value.tx_mode); + Error("Wrong Tx mode (%d)\n", phy->config->dedicated.ant_info.explicit_value().tx_mode.value); valid_config = false; } /* Set power allocation according to 3GPP 36.213 clause 5.2 Downlink power allocation */ float rho_a = 1.0f, rho_b = 1.0f; - if (phy->config->dedicated.pdsch_cnfg_ded < LIBLTE_RRC_PDSCH_CONFIG_P_A_N_ITEMS) { - float rho_a_db = liblte_rrc_pdsch_config_p_a_num[(int) phy->config->dedicated.pdsch_cnfg_ded]; + if (phy->config->dedicated.pdsch_cfg_ded_present) { + float rho_a_db = phy->config->dedicated.pdsch_cfg_ded.p_a.to_number(); rho_a = powf(10.0f, rho_a_db / 20.0f) * ((cell.nof_ports == 1) ? 1.0f : sqrtf(2.0f)); } if (phy->config->common.pdsch_cnfg.p_b < 4) { @@ -811,7 +810,7 @@ int phch_worker::decode_pdsch(srslte_ra_dl_grant_t *grant, uint8_t *payload[SRSL #endif char pinfo_str[16] = {0}; - if (phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + if (phy->config->dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { snprintf(pinfo_str, 15, ", pinfo=%x", grant->pinfo); } @@ -1113,7 +1112,7 @@ void phch_worker::set_uci_periodic_cqi() if (cqi_max >= 0 && cqi_report.wideband.wideband_cqi > cqi_max) { cqi_report.wideband.wideband_cqi = cqi_max; } - if (phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + if (phy->config->dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { cqi_report.wideband.pmi_present = true; cqi_report.wideband.pmi = phy->last_pmi; cqi_report.wideband.rank_is_not_one = (phy->last_ri != 0); @@ -1132,12 +1131,12 @@ void phch_worker::set_uci_aperiodic_cqi() { float sinr_db = ue_dl.sinr[phy->last_ri % SRSLTE_MAX_LAYERS][phy->last_pmi%SRSLTE_MAX_CODEBOOKS]; - if (phy->config->dedicated.cqi_report_cnfg.report_mode_aperiodic_present) { + if (phy->config->dedicated.cqi_report_cfg.cqi_report_mode_aperiodic_present) { /* Compute RI, PMI and SINR */ compute_ri(&phy->last_ri, &phy->last_pmi, &sinr_db); - switch(phy->config->dedicated.cqi_report_cnfg.report_mode_aperiodic) { - case LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM30: + switch (phy->config->dedicated.cqi_report_cfg.cqi_report_mode_aperiodic.value) { + case cqi_report_mode_aperiodic_e::rm30: /* only Higher Layer-configured subband feedback support right now, according to TS36.213 section 7.2.1 - A UE shall report a wideband CQI value which is calculated assuming transmission on set S subbands - The UE shall also report one subband CQI value for each set S subband. The subband CQI @@ -1168,8 +1167,8 @@ void phch_worker::set_uci_aperiodic_cqi() srslte_cqi_to_str(uci_data.uci_cqi, uci_data.uci_cqi_len, cqi_str, SRSLTE_CQI_STR_MAX_CHAR); /* Set RI = 1 */ - if (phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3 || - phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + if (phy->config->dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm3 || + phy->config->dedicated.ant_info.explicit_value().tx_mode == ant_info_ded_s::tx_mode_e_::tm4) { uci_data.uci_ri = phy->last_ri; uci_data.uci_ri_len = 1; } else { @@ -1180,7 +1179,7 @@ void phch_worker::set_uci_aperiodic_cqi() cqi_str, (uci_data.uci_ri_len)?((uci_data.uci_ri == 0)?"ri=0, ":"ri=1, "):"", phy->avg_snr_db_cqi, cqi_report.subband_hl.N); } break; - case LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31: + case cqi_report_mode_aperiodic_e::rm31: /* only Higher Layer-configured subband feedback support right now, according to TS36.213 section 7.2.1 - A single precoding matrix is selected from the codebook subset assuming transmission on set S subbands - A UE shall report one subband CQI value per codeword for each set S subband which are calculated assuming @@ -1239,8 +1238,8 @@ void phch_worker::set_uci_aperiodic_cqi() } break; default: - Warning("Received CQI request but mode %s is not supported\n", - liblte_rrc_cqi_report_mode_aperiodic_text[phy->config->dedicated.cqi_report_cnfg.report_mode_aperiodic]); + Warning("Received CQI request but mode %s is not supported\n", + phy->config->dedicated.cqi_report_cfg.cqi_report_mode_aperiodic.to_string().c_str()); break; } } else { @@ -1429,41 +1428,41 @@ void phch_worker::set_ul_params(bool pregen_disabled) { pthread_mutex_lock(&mutex); - phy_interface_rrc::phy_cfg_common_t *common = &phy->config->common; - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *dedicated = &phy->config->dedicated; - + phy_interface_rrc::phy_cfg_common_t* common = &phy->config->common; + phys_cfg_ded_s* dedicated = &phy->config->dedicated; + Info("Setting new params worker_id=%d, pregen_disabled=%d\n", get_id(), pregen_disabled); /* PUSCH DMRS signal configuration */ - bzero(&dmrs_cfg, sizeof(srslte_refsignal_dmrs_pusch_cfg_t)); - dmrs_cfg.group_hopping_en = common->pusch_cnfg.ul_rs.group_hopping_enabled; - dmrs_cfg.sequence_hopping_en = common->pusch_cnfg.ul_rs.sequence_hopping_enabled; - dmrs_cfg.cyclic_shift = common->pusch_cnfg.ul_rs.cyclic_shift; - dmrs_cfg.delta_ss = common->pusch_cnfg.ul_rs.group_assignment_pusch; - + dmrs_cfg.group_hopping_en = common->pusch_cnfg.ul_ref_sigs_pusch.group_hop_enabled; + dmrs_cfg.sequence_hopping_en = common->pusch_cnfg.ul_ref_sigs_pusch.seq_hop_enabled; + dmrs_cfg.cyclic_shift = common->pusch_cnfg.ul_ref_sigs_pusch.cyclic_shift; + dmrs_cfg.delta_ss = common->pusch_cnfg.ul_ref_sigs_pusch.group_assign_pusch; + /* PUSCH Hopping configuration */ - bzero(&pusch_hopping, sizeof(srslte_pusch_hopping_cfg_t)); - pusch_hopping.n_sb = common->pusch_cnfg.n_sb; - pusch_hopping.hop_mode = common->pusch_cnfg.hopping_mode == LIBLTE_RRC_HOPPING_MODE_INTRA_AND_INTER_SUBFRAME ? - pusch_hopping.SRSLTE_PUSCH_HOP_MODE_INTRA_SF : - pusch_hopping.SRSLTE_PUSCH_HOP_MODE_INTER_SF; - pusch_hopping.hopping_offset = common->pusch_cnfg.pusch_hopping_offset; + pusch_hopping.n_sb = common->pusch_cnfg.pusch_cfg_basic.n_sb; + pusch_hopping.hop_mode = common->pusch_cnfg.pusch_cfg_basic.hop_mode.value == + pusch_cfg_common_s::pusch_cfg_basic_s_::hop_mode_e_::intra_and_inter_sub_frame + ? pusch_hopping.SRSLTE_PUSCH_HOP_MODE_INTRA_SF + : pusch_hopping.SRSLTE_PUSCH_HOP_MODE_INTER_SF; + pusch_hopping.hopping_offset = common->pusch_cnfg.pusch_cfg_basic.pusch_hop_offset; /* PUSCH UCI configuration */ - bzero(&uci_cfg, sizeof(srslte_uci_cfg_t)); - uci_cfg.I_offset_ack = dedicated->pusch_cnfg_ded.beta_offset_ack_idx; - uci_cfg.I_offset_cqi = dedicated->pusch_cnfg_ded.beta_offset_cqi_idx; - uci_cfg.I_offset_ri = dedicated->pusch_cnfg_ded.beta_offset_ri_idx; - - /* PUCCH configuration */ + uci_cfg.I_offset_ack = dedicated->pusch_cfg_ded.beta_offset_ack_idx; + uci_cfg.I_offset_cqi = dedicated->pusch_cfg_ded.beta_offset_cqi_idx; + uci_cfg.I_offset_ri = dedicated->pusch_cfg_ded.beta_offset_ri_idx; + + /* PUCCH configuration */ bzero(&pucch_cfg, sizeof(srslte_pucch_cfg_t)); - pucch_cfg.delta_pucch_shift = liblte_rrc_delta_pucch_shift_num[common->pucch_cnfg.delta_pucch_shift%LIBLTE_RRC_DELTA_PUCCH_SHIFT_N_ITEMS]; + pucch_cfg.delta_pucch_shift = common->pucch_cnfg.delta_pucch_shift.to_number(); pucch_cfg.N_cs = common->pucch_cnfg.n_cs_an; pucch_cfg.n_rb_2 = common->pucch_cnfg.n_rb_cqi; - pucch_cfg.srs_configured = dedicated->srs_ul_cnfg_ded.setup_present; + pucch_cfg.srs_configured = dedicated->srs_ul_cfg_ded_present and + dedicated->srs_ul_cfg_ded.type() == setup_e::setup and + common->srs_ul_cnfg.type().value == setup_e::setup; if (pucch_cfg.srs_configured) { - pucch_cfg.srs_cs_subf_cfg = liblte_rrc_srs_subfr_config_num[common->srs_ul_cnfg.subfr_cnfg%LIBLTE_RRC_SRS_SUBFR_CONFIG_N_ITEMS]; - pucch_cfg.srs_simul_ack = common->srs_ul_cnfg.ack_nack_simul_tx; + pucch_cfg.srs_cs_subf_cfg = common->srs_ul_cnfg.setup().srs_sf_cfg.to_number(); + pucch_cfg.srs_simul_ack = common->srs_ul_cnfg.setup().ack_nack_srs_simul_tx; } /* PUCCH Scheduling configuration */ @@ -1473,39 +1472,56 @@ void phch_worker::set_ul_params(bool pregen_disabled) pucch_sched.n_pucch_1[2] = 0; pucch_sched.n_pucch_1[3] = 0; pucch_sched.N_pucch_1 = common->pucch_cnfg.n1_pucch_an; - pucch_sched.n_pucch_2 = dedicated->cqi_report_cnfg.report_periodic.pucch_resource_idx; - pucch_sched.n_pucch_sr = dedicated->sched_request_cnfg.sr_pucch_resource_idx; + if (dedicated->cqi_report_cfg.cqi_report_periodic_present and + dedicated->cqi_report_cfg.cqi_report_periodic.type().value == setup_e::setup) { + pucch_sched.n_pucch_2 = dedicated->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx; + } else { + // FIXME: put is_pucch_configured flag here? + pucch_sched.n_pucch_2 = 0; + } + + /* SR configuration */ + if (dedicated->sched_request_cfg_present and dedicated->sched_request_cfg.type() == setup_e::setup) { + I_sr = dedicated->sched_request_cfg.setup().sr_cfg_idx; + pucch_sched.n_pucch_sr = dedicated->sched_request_cfg.setup().sr_pucch_res_idx; + sr_configured = true; + } else { + pucch_sched.n_pucch_sr = 0; + sr_configured = false; + } /* SRS Configuration */ bzero(&srs_cfg, sizeof(srslte_refsignal_srs_cfg_t)); - srs_cfg.configured = dedicated->srs_ul_cnfg_ded.setup_present; - if (pucch_cfg.srs_configured) { - srs_cfg.subframe_config = liblte_rrc_srs_subfr_config_num[common->srs_ul_cnfg.subfr_cnfg%LIBLTE_RRC_SRS_SUBFR_CONFIG_N_ITEMS]; - srs_cfg.bw_cfg = liblte_rrc_srs_bw_config_num[common->srs_ul_cnfg.bw_cnfg%LIBLTE_RRC_SRS_BW_CONFIG_N_ITEMS]; - srs_cfg.I_srs = dedicated->srs_ul_cnfg_ded.srs_cnfg_idx; - srs_cfg.B = dedicated->srs_ul_cnfg_ded.srs_bandwidth; - srs_cfg.b_hop = dedicated->srs_ul_cnfg_ded.srs_hopping_bandwidth; - srs_cfg.n_rrc = dedicated->srs_ul_cnfg_ded.freq_domain_pos; - srs_cfg.k_tc = dedicated->srs_ul_cnfg_ded.tx_comb; - srs_cfg.n_srs = dedicated->srs_ul_cnfg_ded.cyclic_shift; + srs_cfg.configured = dedicated->srs_ul_cfg_ded_present and dedicated->srs_ul_cfg_ded.type() == setup_e::setup and + common->srs_ul_cnfg.type() == setup_e::setup; + if (srs_cfg.configured) { + srs_cfg.subframe_config = common->srs_ul_cnfg.setup().srs_sf_cfg.to_number(); + srs_cfg.bw_cfg = common->srs_ul_cnfg.setup().srs_bw_cfg.to_number(); + srs_cfg.I_srs = dedicated->srs_ul_cfg_ded.setup().srs_cfg_idx; + srs_cfg.B = dedicated->srs_ul_cfg_ded.setup().srs_bw; + srs_cfg.b_hop = dedicated->srs_ul_cfg_ded.setup().srs_hop_bw; + srs_cfg.n_rrc = dedicated->srs_ul_cfg_ded.setup().freq_domain_position; + srs_cfg.k_tc = dedicated->srs_ul_cfg_ded.setup().tx_comb; + srs_cfg.n_srs = dedicated->srs_ul_cfg_ded.setup().cyclic_shift; } /* UL power control configuration */ bzero(&power_ctrl, sizeof(srslte_ue_ul_powerctrl_t)); power_ctrl.p0_nominal_pusch = common->ul_pwr_ctrl.p0_nominal_pusch; - power_ctrl.alpha = liblte_rrc_ul_power_control_alpha_num[common->ul_pwr_ctrl.alpha%LIBLTE_RRC_UL_POWER_CONTROL_ALPHA_N_ITEMS]; + power_ctrl.alpha = common->ul_pwr_ctrl.alpha.to_number(); power_ctrl.p0_nominal_pucch = common->ul_pwr_ctrl.p0_nominal_pucch; - power_ctrl.delta_f_pucch[0] = liblte_rrc_delta_f_pucch_format_1_num[common->ul_pwr_ctrl.delta_flist_pucch.format_1%LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1_N_ITEMS]; - power_ctrl.delta_f_pucch[1] = liblte_rrc_delta_f_pucch_format_1b_num[common->ul_pwr_ctrl.delta_flist_pucch.format_1b%LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_1B_N_ITEMS]; - power_ctrl.delta_f_pucch[2] = liblte_rrc_delta_f_pucch_format_2_num[common->ul_pwr_ctrl.delta_flist_pucch.format_2%LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2_N_ITEMS]; - power_ctrl.delta_f_pucch[3] = liblte_rrc_delta_f_pucch_format_2a_num[common->ul_pwr_ctrl.delta_flist_pucch.format_2a%LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2A_N_ITEMS]; - power_ctrl.delta_f_pucch[4] = liblte_rrc_delta_f_pucch_format_2b_num[common->ul_pwr_ctrl.delta_flist_pucch.format_2b%LIBLTE_RRC_DELTA_F_PUCCH_FORMAT_2B_N_ITEMS]; - - power_ctrl.delta_preamble_msg3 = common->ul_pwr_ctrl.delta_preamble_msg3; - + power_ctrl.delta_f_pucch[0] = common->ul_pwr_ctrl.delta_flist_pucch.delta_f_pucch_format1.to_number(); + power_ctrl.delta_f_pucch[1] = common->ul_pwr_ctrl.delta_flist_pucch.delta_f_pucch_format1b.to_number(); + power_ctrl.delta_f_pucch[2] = common->ul_pwr_ctrl.delta_flist_pucch.delta_f_pucch_format2.to_number(); + power_ctrl.delta_f_pucch[3] = common->ul_pwr_ctrl.delta_flist_pucch.delta_f_pucch_format2a.to_number(); + power_ctrl.delta_f_pucch[4] = common->ul_pwr_ctrl.delta_flist_pucch.delta_f_pucch_format2b.to_number(); + + power_ctrl.delta_preamble_msg3 = common->ul_pwr_ctrl.delta_preamb_msg3; + power_ctrl.p0_ue_pusch = dedicated->ul_pwr_ctrl_ded.p0_ue_pusch; - power_ctrl.delta_mcs_based = dedicated->ul_pwr_ctrl_ded.delta_mcs_en==LIBLTE_RRC_DELTA_MCS_ENABLED_EN0; - power_ctrl.acc_enabled = dedicated->ul_pwr_ctrl_ded.accumulation_en; + power_ctrl.delta_mcs_based = + dedicated->ul_pwr_ctrl_ded.delta_mcs_enabled == ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_::en0; + power_ctrl.acc_enabled = dedicated->ul_pwr_ctrl_ded.accumulation_enabled; power_ctrl.p0_ue_pucch = dedicated->ul_pwr_ctrl_ded.p0_ue_pucch; power_ctrl.p_srs_offset = dedicated->ul_pwr_ctrl_ded.p_srs_offset; @@ -1513,24 +1529,26 @@ void phch_worker::set_ul_params(bool pregen_disabled) /* CQI configuration */ bzero(&period_cqi, sizeof(srslte_cqi_periodic_cfg_t)); - period_cqi.configured = dedicated->cqi_report_cnfg.report_periodic_setup_present; - period_cqi.pmi_idx = dedicated->cqi_report_cnfg.report_periodic.pmi_cnfg_idx; - period_cqi.simul_cqi_ack = dedicated->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi; - period_cqi.format_is_subband = dedicated->cqi_report_cnfg.report_periodic.format_ind_periodic == - LIBLTE_RRC_CQI_FORMAT_INDICATOR_PERIODIC_SUBBAND_CQI; - period_cqi.subband_size = dedicated->cqi_report_cnfg.report_periodic.format_ind_periodic_subband_k; - - if (dedicated->cqi_report_cnfg.report_periodic.ri_cnfg_idx_present) { - period_cqi.ri_idx = dedicated->cqi_report_cnfg.report_periodic.ri_cnfg_idx; - period_cqi.ri_idx_present = true; - } else { - period_cqi.ri_idx_present = false; + period_cqi.configured = dedicated->cqi_report_cfg.cqi_report_periodic_present and + dedicated->cqi_report_cfg.cqi_report_periodic.type() == setup_e::setup; + if (period_cqi.configured) { + period_cqi.pmi_idx = dedicated->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx; + period_cqi.simul_cqi_ack = dedicated->cqi_report_cfg.cqi_report_periodic.setup().simul_ack_nack_and_cqi; + period_cqi.format_is_subband = + dedicated->cqi_report_cfg.cqi_report_periodic.setup().cqi_format_ind_periodic.type().value == + cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types::subband_cqi; + if (period_cqi.format_is_subband) { + period_cqi.subband_size = + dedicated->cqi_report_cfg.cqi_report_periodic.setup().cqi_format_ind_periodic.subband_cqi().k; + } + if (dedicated->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx_present) { + period_cqi.ri_idx = dedicated->cqi_report_cfg.cqi_report_periodic.setup().ri_cfg_idx; + period_cqi.ri_idx_present = true; + } else { + period_cqi.ri_idx_present = false; + } } - /* SR configuration */ - I_sr = dedicated->sched_request_cnfg.sr_cnfg_idx; - sr_configured = true; - pthread_mutex_unlock(&mutex); if (pregen_enabled && !pregen_disabled) { @@ -1616,7 +1634,7 @@ void phch_worker::update_measurements() // Average RSRQ over DEFAULT_MEAS_PERIOD_MS then sent to RRC float rsrq_db = 10*log10(srslte_chest_dl_get_rsrq(&ue_dl.chest)); - if (isnormal(rsrq_db)) { + if (std::isnormal(rsrq_db)) { if (!(tti%phy->pcell_report_period) || !phy->avg_rsrq_db) { phy->avg_rsrq_db = rsrq_db; } else { @@ -1626,7 +1644,7 @@ void phch_worker::update_measurements() // Average RSRP taken from CRS float rsrp_lin = srslte_chest_dl_get_rsrp(&ue_dl.chest); - if (isnormal(rsrp_lin)) { + if (std::isnormal(rsrp_lin)) { if (!phy->avg_rsrp) { phy->avg_rsrp = SRSLTE_VEC_EMA(rsrp_lin, phy->avg_rsrp, snr_ema_coeff); } else { @@ -1638,7 +1656,7 @@ void phch_worker::update_measurements() float rsrp_dbm = 10*log10(rsrp_lin) + 30 - phy->rx_gain_offset; // Serving cell RSRP measurements are averaged over DEFAULT_MEAS_PERIOD_MS then sent to RRC - if (isnormal(rsrp_dbm)) { + if (std::isnormal(rsrp_dbm)) { if (!(tti%phy->pcell_report_period) || !phy->avg_rsrp_dbm) { phy->avg_rsrp_dbm = rsrp_dbm; } else { @@ -1652,12 +1670,12 @@ void phch_worker::update_measurements() } // Compute PL - float tx_crs_power = phy->config->common.pdsch_cnfg.rs_power; + float tx_crs_power = phy->config->common.pdsch_cnfg.ref_sig_pwr; phy->pathloss = tx_crs_power - phy->avg_rsrp_dbm; // Average noise float cur_noise = srslte_chest_dl_get_noise_estimate(&ue_dl.chest); - if (isnormal(cur_noise)) { + if (std::isnormal(cur_noise)) { if (!phy->avg_noise) { phy->avg_noise = cur_noise; } else { diff --git a/srsue/src/phy/phy.cc b/srsue/src/phy/phy.cc index 50bec5f09..47cd99e11 100644 --- a/srsue/src/phy/phy.cc +++ b/srsue/src/phy/phy.cc @@ -43,10 +43,8 @@ #define Info(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->debug(fmt, ##__VA_ARGS__) - - -using namespace std; - +using namespace std; +using namespace asn1::rrc; namespace srsue { @@ -219,8 +217,8 @@ void phy::get_metrics(phy_metrics_t &m) { workers_common.get_dl_metrics(m.dl); workers_common.get_ul_metrics(m.ul); workers_common.get_sync_metrics(m.sync); - int dl_tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(m.dl.mcs), workers_common.get_nof_prb()); - int ul_tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(m.ul.mcs), workers_common.get_nof_prb()); + int dl_tbs = srslte_ra_tbs_from_idx(srslte_ra_dl_tbs_idx_from_mcs(m.dl.mcs), workers_common.get_nof_prb()); + int ul_tbs = srslte_ra_tbs_from_idx(srslte_ra_ul_tbs_idx_from_mcs(m.ul.mcs), workers_common.get_nof_prb()); m.dl.mabr_mbps = dl_tbs/1000.0; // TBS is bits/ms - convert to mbps m.ul.mabr_mbps = ul_tbs/1000.0; // TBS is bits/ms - convert to mbps Info("PHY: MABR estimates. DL: %4.6f Mbps. UL: %4.6f Mbps.\n", m.dl.mabr_mbps, m.ul.mabr_mbps); @@ -422,12 +420,12 @@ uint32_t phy::tti_to_subf(uint32_t tti) { void phy::get_config(phy_interface_rrc::phy_cfg_t* phy_cfg) { - memcpy(phy_cfg, &config, sizeof(phy_cfg_t)); + *phy_cfg = config; } void phy::set_config(phy_interface_rrc::phy_cfg_t* phy_cfg) { - memcpy(&config, phy_cfg, sizeof(phy_cfg_t)); + config = *phy_cfg; } void phy::set_config_64qam_en(bool enable) @@ -437,47 +435,49 @@ void phy::set_config_64qam_en(bool enable) void phy::set_config_common(phy_interface_rrc::phy_cfg_common_t* common) { - memcpy(&config.common, common, sizeof(phy_cfg_common_t)); + config.common = *common; } -void phy::set_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) +void phy::set_config_dedicated(phys_cfg_ded_s* dedicated) { - memcpy(&config.dedicated, dedicated, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); + config.dedicated = *dedicated; } -void phy::set_config_tdd(LIBLTE_RRC_TDD_CONFIG_STRUCT* tdd) +void phy::set_config_tdd(tdd_cfg_s* tdd) { - memcpy(&config.common.tdd_cnfg, tdd, sizeof(LIBLTE_RRC_TDD_CONFIG_STRUCT)); + config.common.tdd_cnfg = *tdd; } -void phy::set_config_mbsfn_sib2(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2) +void phy::set_config_mbsfn_sib2(sib_type2_s* sib2) { - if(sib2->mbsfn_subfr_cnfg_list_size > 1) { - Warning("SIB2 has %d MBSFN subframe configs - only 1 supported\n", sib2->mbsfn_subfr_cnfg_list_size); + if (sib2->mbsfn_sf_cfg_list_present and sib2->mbsfn_sf_cfg_list.size() > 1) { + Warning("SIB2 has %d MBSFN subframe configs - only 1 supported\n", sib2->mbsfn_sf_cfg_list.size()); } - if(sib2->mbsfn_subfr_cnfg_list_size > 0) { - memcpy(&config.mbsfn.mbsfn_subfr_cnfg, &sib2->mbsfn_subfr_cnfg_list[0], sizeof(LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT)); + if (sib2->mbsfn_sf_cfg_list_present and sib2->mbsfn_sf_cfg_list.size() > 0) { + config.mbsfn.mbsfn_subfr_cnfg = sib2->mbsfn_sf_cfg_list[0]; workers_common.build_mch_table(); } } -void phy::set_config_mbsfn_sib13(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13) +void phy::set_config_mbsfn_sib13(sib_type13_r9_s* sib13) { - memcpy(&config.mbsfn.mbsfn_notification_cnfg, &sib13->mbsfn_notification_config, sizeof(LIBLTE_RRC_MBSFN_NOTIFICATION_CONFIG_STRUCT)); - if(sib13->mbsfn_area_info_list_r9_size > 1) { - Warning("SIB13 has %d MBSFN area info elements - only 1 supported\n", sib13->mbsfn_area_info_list_r9_size); + config.mbsfn.mbsfn_notification_cnfg = sib13->notif_cfg_r9; + if (sib13->mbsfn_area_info_list_r9.size() > 1) { + Warning("SIB13 has %d MBSFN area info elements - only 1 supported\n", sib13->mbsfn_area_info_list_r9.size()); } - if(sib13->mbsfn_area_info_list_r9_size > 0) { - memcpy(&config.mbsfn.mbsfn_area_info, &sib13->mbsfn_area_info_list_r9[0], sizeof(LIBLTE_RRC_MBSFN_AREA_INFO_STRUCT)); + if (sib13->mbsfn_area_info_list_r9.size() > 0) { + config.mbsfn.mbsfn_area_info = sib13->mbsfn_area_info_list_r9[0]; workers_common.build_mcch_table(); } } -void phy::set_config_mbsfn_mcch(LIBLTE_RRC_MCCH_MSG_STRUCT *mcch) +void phy::set_config_mbsfn_mcch(mcch_msg_s* mcch) { - memcpy(&config.mbsfn.mcch, mcch, sizeof(LIBLTE_RRC_MCCH_MSG_STRUCT)); - mac->set_mbsfn_config(config.mbsfn.mcch.pmch_infolist_r9[0].mbms_sessioninfolist_r9_size); - workers_common.set_mch_period_stop(config.mbsfn.mcch.pmch_infolist_r9[0].pmch_config_r9.sf_alloc_end_r9); + config.mbsfn.mcch = *mcch; + mac->set_mbsfn_config( + config.mbsfn.mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].mbms_session_info_list_r9.size()); + workers_common.set_mch_period_stop( + config.mbsfn.mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].pmch_cfg_r9.sf_alloc_end_r9); workers_common.set_mcch(); } diff --git a/srsue/src/phy/prach.cc b/srsue/src/phy/prach.cc index 3c230b688..74e425cb8 100644 --- a/srsue/src/phy/prach.cc +++ b/srsue/src/phy/prach.cc @@ -39,6 +39,8 @@ #define Info(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->info(fmt, ##__VA_ARGS__) #define Debug(fmt, ...) if (SRSLTE_DEBUG_ENABLED) log_h->debug(fmt, ##__VA_ARGS__) +using namespace asn1::rrc; + namespace srsue { @@ -57,7 +59,7 @@ prach::~prach() { } } -void prach::init(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT *config_, uint32_t max_prb, phy_args_t *args_, srslte::log* log_h_) +void prach::init(prach_cfg_sib_s* config_, uint32_t max_prb, phy_args_t* args_, srslte::log* log_h_) { log_h = log_h_; config = config_; @@ -92,14 +94,14 @@ bool prach::set_cell(srslte_cell_t cell_) if (mem_initiated) { // TODO: Check if other PRACH parameters changed if (cell_.id != cell.id || !cell_initiated) { - memcpy(&cell, &cell_, sizeof(srslte_cell_t)); + cell = cell_; preamble_idx = -1; - uint32_t configIdx = config->prach_cnfg_info.prach_config_index; - uint32_t rootSeq = config->root_sequence_index; - uint32_t zeroCorrConfig = config->prach_cnfg_info.zero_correlation_zone_config; - uint32_t freq_offset = config->prach_cnfg_info.prach_freq_offset; - bool highSpeed = config->prach_cnfg_info.high_speed_flag; + uint32_t configIdx = config->prach_cfg_info.prach_cfg_idx; + uint32_t rootSeq = config->root_seq_idx; + uint32_t zeroCorrConfig = config->prach_cfg_info.zero_correlation_zone_cfg; + uint32_t freq_offset = config->prach_cfg_info.prach_freq_offset; + bool highSpeed = config->prach_cfg_info.high_speed_flag; if (6 + freq_offset > cell.nof_prb) { log_h->console("Error no space for PRACH: frequency offset=%d, N_rb_ul=%d\n", freq_offset, cell.nof_prb); diff --git a/srsue/src/ue.cc b/srsue/src/ue.cc index 534f92c5f..0356531a8 100644 --- a/srsue/src/ue.cc +++ b/srsue/src/ue.cc @@ -260,7 +260,6 @@ bool ue::init(all_args_t *args_) { printf("Waiting PHY to initialize...\n"); phy.wait_initialize(); - phy.configure_ul_params(); // Enable AGC once PHY is initialized if (args->rf.rx_gain < 0) { diff --git a/srsue/src/upper/nas.cc b/srsue/src/upper/nas.cc index 15ac80f23..10e152da5 100644 --- a/srsue/src/upper/nas.cc +++ b/srsue/src/upper/nas.cc @@ -24,19 +24,19 @@ * */ - -#include -#include -#include -#include -#include -#include -#include "srslte/asn1/liblte_rrc.h" #include "srsue/hdr/upper/nas.h" -#include "srslte/common/security.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/bcd_helpers.h" +#include "srslte/common/security.h" +#include +#include +#include +#include +#include +#include using namespace srslte; +using namespace asn1::rrc; namespace srsue { @@ -72,8 +72,11 @@ void nas::init(usim_interface_nas *usim_, if (!usim->get_home_plmn_id(&home_plmn)) { nas_log->error("Getting Home PLMN Id from USIM. Defaulting to 001-01\n"); - home_plmn.mcc = 61441; // This is 001 - home_plmn.mnc = 65281; // This is 01 + uint16_t mcc = 61441; // This is 001 + uint16_t mnc = 65281; // This is 01 + home_plmn.mcc_present = true; + srslte::mcc_to_bytes(mcc, &home_plmn.mcc[0]); + srslte::mnc_to_bytes(mnc, home_plmn.mnc); } cfg = cfg_; @@ -200,7 +203,8 @@ bool nas::is_attached() { return state == EMM_STATE_REGISTERED; } -void nas::paging(LIBLTE_RRC_S_TMSI_STRUCT *ue_identiy) { +void nas::paging(s_tmsi_s* ue_identiy) +{ if (state == EMM_STATE_REGISTERED) { nas_log->info("Received paging: requesting RRC connection establishment\n"); if (rrc_connect()) { @@ -240,14 +244,14 @@ bool nas::rrc_connect() { // Provide UE-Identity to RRC if have one if (have_guti) { - LIBLTE_RRC_S_TMSI_STRUCT s_tmsi; - s_tmsi.mmec = ctxt.guti.mme_code; - s_tmsi.m_tmsi = ctxt.guti.m_tmsi; + s_tmsi_s s_tmsi; + s_tmsi.mmec.from_number(ctxt.guti.mme_code); + s_tmsi.m_tmsi.from_number(ctxt.guti.m_tmsi); rrc->set_ue_idenity(s_tmsi); } // Set establishment cause - LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM establish_cause = LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_SIGNALLING; + establishment_cause_e establish_cause = establishment_cause_e::mo_sig; if (rrc->connection_request(establish_cause, dedicatedInfoNAS)) { @@ -631,9 +635,9 @@ void nas::parse_attach_accept(uint32_t lcid, byte_buffer_t *pdu) { memcpy(&ctxt.guti, &attach_accept.guti.guti, sizeof(LIBLTE_MME_EPS_MOBILE_ID_GUTI_STRUCT)); have_guti = true; // Update RRC UE-Idenity - LIBLTE_RRC_S_TMSI_STRUCT s_tmsi; - s_tmsi.mmec = ctxt.guti.mme_code; - s_tmsi.m_tmsi = ctxt.guti.m_tmsi; + s_tmsi_s s_tmsi; + s_tmsi.mmec.from_number(ctxt.guti.mme_code); + s_tmsi.m_tmsi.from_number(ctxt.guti.m_tmsi); rrc->set_ue_idenity(s_tmsi); } if (attach_accept.lai_present) {} @@ -1391,7 +1395,7 @@ void nas::send_detach_request(bool switch_off) if (rrc->is_connected()) { rrc->write_sdu(pdu); } else { - rrc->connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_SIGNALLING, pdu); + rrc->connection_request(establishment_cause_e::mo_sig, pdu); } } diff --git a/srsue/src/upper/pcsc_usim.cc b/srsue/src/upper/pcsc_usim.cc index 0375a9fe7..736fec085 100644 --- a/srsue/src/upper/pcsc_usim.cc +++ b/srsue/src/upper/pcsc_usim.cc @@ -33,6 +33,7 @@ #define CHECK_SIM_PIN 1 using namespace srslte; +using namespace asn1::rrc; namespace srsue{ @@ -164,7 +165,7 @@ bool pcsc_usim::get_imei_vec(uint8_t* imei_, uint32_t n) return true; } -bool pcsc_usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id) +bool pcsc_usim::get_home_plmn_id(plmn_id_s* home_plmn_id) { if (!initiated) { fprintf(stderr, "USIM not initiated!\n"); @@ -174,20 +175,22 @@ bool pcsc_usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id) uint8_t imsi_vec[15]; get_imsi_vec(imsi_vec, 15); - std::ostringstream mcc_str, mnc_str; + std::ostringstream plmn_str; int mcc_len = 3; for (int i=0;imcc); - string_to_mnc(mnc_str.str(), &home_plmn_id->mnc); + if (not string_to_plmn_id(*home_plmn_id, plmn_str.str())) { + log->error("Error reading home PLMN from SIM.\n"); + return false; + } log->info("Read Home PLMN Id=%s\n", plmn_id_to_string(*home_plmn_id).c_str()); diff --git a/srsue/src/upper/rrc.cc b/srsue/src/upper/rrc.cc index 620057cba..1edf6aedf 100644 --- a/srsue/src/upper/rrc.cc +++ b/srsue/src/upper/rrc.cc @@ -24,21 +24,20 @@ * */ - -#include -#include -#include -#include -#include -#include // for printing uint64_t -#include -#include #include "srsue/hdr/upper/rrc.h" -#include "srslte/asn1/liblte_rrc.h" -#include "srslte/common/security.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/bcd_helpers.h" +#include "srslte/common/security.h" +#include +#include +#include // for printing uint64_t +#include +#include +#include +#include using namespace srslte; +using namespace asn1::rrc; namespace srsue { @@ -49,13 +48,16 @@ const static uint32_t required_sibs[NOF_REQUIRED_SIBS] = {0,1,2,12}; // SIB1, SI Base functions *******************************************************************************/ -rrc::rrc() - :state(RRC_STATE_IDLE) - ,drb_up(false) - ,serving_cell(NULL) +rrc::rrc() : + state(RRC_STATE_IDLE), + last_state(RRC_STATE_CONNECTED), + drb_up(false), + serving_cell(NULL), + rlc_flush_timeout(2000), + rlc_flush_counter(0) { - n310_cnt = 0; - n311_cnt = 0; + n310_cnt = 0; + n311_cnt = 0; serving_cell = new cell_t(); neighbour_cells.reserve(NOF_NEIGHBOUR_CELLS); initiated = false; @@ -76,89 +78,40 @@ rrc::~rrc() } } -static void liblte_rrc_handler(void *ctx, char *str) { +static void srslte_rrc_handler(asn1::srsasn_logger_level_t level, void* ctx, const char* str) +{ rrc *r = (rrc *) ctx; - r->liblte_rrc_log(str); + r->srslte_rrc_log(str); // FIXME use log level } -void rrc::liblte_rrc_log(char *str) { +void rrc::srslte_rrc_log(const char* str) +{ if (rrc_log) { rrc_log->warning("[ASN]: %s\n", str); } else { printf("[ASN]: %s\n", str); } } -void rrc::print_mbms() -{ - if(rrc_log) { - if(serving_cell->has_mcch) { - LIBLTE_RRC_MCCH_MSG_STRUCT msg; - memcpy(&msg, &serving_cell->mcch, sizeof(LIBLTE_RRC_MCCH_MSG_STRUCT)); - std::stringstream ss; - for(uint32_t i=0;imbms_sessioninfolist_r9_size; j++) { - LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT *sess = &pmch->mbms_sessioninfolist_r9[j]; - ss << " Service ID: " << sess->tmgi_r9.serviceid_r9; - if(sess->sessionid_r9_present) { - ss << ", Session ID: " << (uint32_t)sess->sessionid_r9; - } - if(sess->tmgi_r9.plmn_id_explicit) { - std::string tmp; - if(mcc_to_string(sess->tmgi_r9.plmn_id_r9.mcc, &tmp)) { - ss << ", MCC: " << tmp; - } - if(mnc_to_string(sess->tmgi_r9.plmn_id_r9.mnc, &tmp)) { - ss << ", MNC: " << tmp; - } - } else { - ss << ", PLMN index: " << (uint32_t)sess->tmgi_r9.plmn_index_r9; - } - ss << ", LCID: " << (uint32_t)sess->logicalchannelid_r9; - ss << std::endl; - } - } - //rrc_log->console(ss.str()); - std::cout << ss.str(); - } else { - rrc_log->console("MCCH not available for current cell\n"); - } - } -} -bool rrc::mbms_service_start(uint32_t serv, uint32_t port) +template +void rrc::log_rrc_message(const std::string source, const direction_t dir, const byte_buffer_t* pdu, const T& msg) { - bool ret = false; - - if(serving_cell->has_mcch) { - LIBLTE_RRC_MCCH_MSG_STRUCT msg; - memcpy(&msg, &serving_cell->mcch, sizeof(LIBLTE_RRC_MCCH_MSG_STRUCT)); - for(uint32_t i=0;imbms_sessioninfolist_r9_size; j++) { - LIBLTE_RRC_MBMS_SESSION_INFO_R9_STRUCT *sess = &pmch->mbms_sessioninfolist_r9[j]; - if(serv == sess->tmgi_r9.serviceid_r9) { - rrc_log->console("MBMS service started. Service id:%d, port: %d\n", serv, port); - ret = true; - add_mrb(sess->logicalchannelid_r9, port); - } - } - } + if (rrc_log->get_level() == srslte::LOG_LEVEL_INFO) { + rrc_log->info("%s - %s %s (%d B)\n", source.c_str(), (dir == Rx) ? "Rx" : "Tx", + msg.msg.c1().type().to_string().c_str(), pdu->N_bytes); + } else if (rrc_log->get_level() >= srslte::LOG_LEVEL_DEBUG) { + asn1::json_writer json_writer; + msg.to_json(json_writer); + rrc_log->debug_hex(pdu->msg, pdu->N_bytes, "%s - %s %s (%d B)\n", source.c_str(), (dir == Rx) ? "Rx" : "Tx", + msg.msg.c1().type().to_string().c_str(), pdu->N_bytes); + rrc_log->debug("Content:\n%s\n", json_writer.to_string().c_str()); } - return ret; } - -void rrc::init(phy_interface_rrc *phy_, - mac_interface_rrc *mac_, - rlc_interface_rrc *rlc_, - pdcp_interface_rrc *pdcp_, - nas_interface_rrc *nas_, - usim_interface_rrc *usim_, - gw_interface_rrc *gw_, - mac_interface_timers *mac_timers_, - srslte::log *rrc_log_) { +void rrc::init(phy_interface_rrc* phy_, mac_interface_rrc* mac_, rlc_interface_rrc* rlc_, pdcp_interface_rrc* pdcp_, + nas_interface_rrc* nas_, usim_interface_rrc* usim_, gw_interface_rrc* gw_, + mac_interface_timers* mac_timers_, srslte::log* rrc_log_) +{ pool = byte_buffer_pool::get_instance(); phy = phy_; mac = mac_; @@ -190,13 +143,13 @@ void rrc::init(phy_interface_rrc *phy_, t311 = mac_timers->timer_get_unique_id(); t304 = mac_timers->timer_get_unique_id(); - dedicatedInfoNAS = NULL; - ueIdentity_configured = false; + dedicated_info_nas = NULL; + ue_identity_configured = false; transaction_id = 0; - // Register logging handler with liblte_rrc - liblte_rrc_log_register_handler(this, liblte_rrc_handler); + // Register logging handler with asn1 rrc + asn1::rrc::rrc_log_register_handler(this, srslte_rrc_handler); cell_clean_cnt = 0; @@ -284,8 +237,13 @@ void rrc::run_tti(uint32_t tti) { // Process pending PHY measurements in IDLE/CONNECTED process_phy_meas(); + // Log state changes + if (state != last_state) { + rrc_log->debug("State %s\n", rrc_state_text[state]); + last_state = state; + } + // Run state machine - rrc_log->debug("State %s\n", rrc_state_text[state]); switch (state) { case RRC_STATE_IDLE: @@ -323,13 +281,18 @@ void rrc::run_tti(uint32_t tti) { } measurements.run_tti(tti); if (go_idle) { - go_idle = false; - leave_connected(); + // wait for max. 2s for RLC on SRB1 to be flushed + if (not rlc->has_data(RB_ID_SRB1) || ++rlc_flush_counter > rlc_flush_timeout) { + go_idle = false; + leave_connected(); + } else { + rrc_log->debug("Postponing transition to RRC IDLE (%d ms < %d ms)\n", rlc_flush_counter, rlc_flush_timeout); + } } if (go_rlf) { go_rlf = false; // Initiate connection re-establishment procedure after RLF - send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_OTHER_FAILURE); + send_con_restablish_request(asn1::rrc::reest_cause_e::other_fail); } break; default:break; @@ -422,7 +385,8 @@ int rrc::plmn_search(found_plmn_t found_plmns[MAX_FOUND_PLMNS]) /* This is the NAS interface. When NAS requests to select a PLMN we have to * connect to either register or because there is pending higher layer traffic. */ -void rrc::plmn_select(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) { +void rrc::plmn_select(asn1::rrc::plmn_id_s plmn_id) +{ plmn_is_selected = true; selected_plmn_id = plmn_id; @@ -437,8 +401,7 @@ void rrc::plmn_select(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) { * it. Sends connectionRequest message and returns if message transmitted successfully. * It does not wait until completition of Connection Establishment procedure */ -bool rrc::connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause, - srslte::byte_buffer_t *dedicatedInfoNAS) +bool rrc::connection_request(asn1::rrc::establishment_cause_e cause, srslte::byte_buffer_t* dedicated_info_nas) { if (!plmn_is_selected) { @@ -486,11 +449,11 @@ bool rrc::connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause, send_con_request(cause); // Save dedicatedInfoNAS SDU - if (this->dedicatedInfoNAS) { + if (this->dedicated_info_nas) { rrc_log->warning("Received a new dedicatedInfoNAS SDU but there was one still in queue. Removing it\n"); - pool->deallocate(this->dedicatedInfoNAS); + pool->deallocate(this->dedicated_info_nas); } - this->dedicatedInfoNAS = dedicatedInfoNAS; + this->dedicated_info_nas = dedicated_info_nas; // Wait until t300 stops due to RRCConnectionSetup/Reject or expiry while (mac_timers->timer_get(t300)->is_running()) { @@ -533,18 +496,20 @@ bool rrc::connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause, if (!ret) { rrc_log->warning("Could not estblish connection. Deallocating dedicatedInfoNAS PDU\n"); - pool->deallocate(this->dedicatedInfoNAS); - this->dedicatedInfoNAS = NULL; + pool->deallocate(this->dedicated_info_nas); + this->dedicated_info_nas = NULL; } pthread_mutex_unlock(&mutex); return ret; } -void rrc::set_ue_idenity(LIBLTE_RRC_S_TMSI_STRUCT s_tmsi) { - ueIdentity_configured = true; - ueIdentity = s_tmsi; - rrc_log->info("Set ue-Identity to 0x%x:0x%x\n", ueIdentity.mmec, ueIdentity.m_tmsi); +void rrc::set_ue_idenity(asn1::rrc::s_tmsi_s s_tmsi) +{ + ue_identity_configured = true; + ue_identity = s_tmsi; + rrc_log->info("Set ue-Identity to 0x%" PRIu64 ":0x%" PRIu64 "\n", ue_identity.mmec.to_number(), + ue_identity.m_tmsi.to_number()); } /* Retrieves all required SIB or configures them if already retrieved before @@ -622,7 +587,7 @@ void rrc::new_phy_meas(float rsrp, float rsrq, uint32_t tti, int earfcn_i, int p void rrc::process_phy_meas() { phy_meas_t m; while(phy_meas_q.try_pop(&m)) { - rrc_log->debug("MEAS: Processing measurement. %lu measurements in queue\n", phy_meas_q.size()); + rrc_log->debug("MEAS: Processing measurement. %zd measurements in queue\n", phy_meas_q.size()); process_new_phy_meas(m); } } @@ -762,20 +727,20 @@ bool rrc::si_acquire(uint32_t sib_index) // Instruct MAC to look for SIB2..13 if (serving_cell->has_sib1()) { - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1 = serving_cell->sib1ptr(); + asn1::rrc::sib_type1_s* sib1 = serving_cell->sib1ptr(); // SIB2 scheduling if (sib_index == 1) { - period = liblte_rrc_si_periodicity_num[sib1->sched_info[0].si_periodicity]; + period = sib1->sched_info_list[0].si_periodicity.to_number(); sched_index = 0; } else { // SIB3+ scheduling Section 5.2.3 if (sib_index >= 2) { bool found = false; - for (uint32_t i=0;iN_sched_info && !found;i++) { - for (uint32_t j=0;jsched_info[i].N_sib_mapping_info && !found;j++) { - if ((uint32_t) sib1->sched_info[i].sib_mapping_info[j].sib_type == sib_index - 2) { - period = liblte_rrc_si_periodicity_num[sib1->sched_info[i].si_periodicity]; + for (uint32_t i = 0; i < sib1->sched_info_list.size() && !found; i++) { + for (uint32_t j = 0; j < sib1->sched_info_list[i].sib_map_info.size() && !found; j++) { + if (sib1->sched_info_list[i].sib_map_info[j].to_number() == sib_index - 2) { + period = sib1->sched_info_list[i].si_periodicity.to_number(); sched_index = i; found = true; } @@ -787,23 +752,21 @@ bool rrc::si_acquire(uint32_t sib_index) } } } - si_win_len = liblte_rrc_si_window_length_num[sib1->si_window_length]; - x = sched_index*si_win_len; - sf = x%10; - offset = x/10; + si_win_len = sib1->si_win_len.to_number(); + x = sched_index * si_win_len; + sf = x % 10; + offset = x / 10; tti = mac->get_current_tti(); si_win_start = sib_start_tti(tti, period, offset, sf); - si_win_len = liblte_rrc_si_window_length_num[sib1->si_window_length]; - if (last_win_start == 0 || - (srslte_tti_interval(tti, last_win_start) > period*5 && srslte_tti_interval(tti, last_win_start) < 1000)) - { + if (last_win_start == 0 || (srslte_tti_interval(tti, last_win_start) > period * 5 && + srslte_tti_interval(tti, last_win_start) < 1000)) { last_win_start = si_win_start; - instruct_phy = true; + instruct_phy = true; } } else { - rrc_log->error("Trying to receive SIB%d but SIB1 not received\n", sib_index+1); + rrc_log->error("Trying to receive SIB%d but SIB1 not received\n", sib_index + 1); } } @@ -1014,8 +977,8 @@ void rrc::set_serving_cell(uint32_t cell_idx) { // Set new serving cell serving_cell = new_serving_cell; - rrc_log->info("Setting serving cell idx=%d, earfcn=%d, PCI=%d, nof_neighbours=%lu\n", - cell_idx, serving_cell->get_earfcn(), serving_cell->get_pci(), neighbour_cells.size()); + rrc_log->info("Setting serving cell idx=%d, earfcn=%d, PCI=%d, nof_neighbours=%zd\n", cell_idx, + serving_cell->get_earfcn(), serving_cell->get_pci(), neighbour_cells.size()); } else { rrc_log->error("Setting invalid serving cell idx %d\n", cell_idx); @@ -1123,7 +1086,7 @@ bool rrc::add_neighbour_cell(phy_interface_rrc::phy_cell_t phy_cell, float rsrp) rrc_log->info("Adding PCI=%d, earfcn=%d, cell_idx=%d\n", phy_cell.cell.id, phy_cell.earfcn, cell_idx); // If exists, update RSRP if provided, sort again and return - if (cell_idx >= 0 && isnormal(rsrp)) { + if (cell_idx >= 0 && std::isnormal(rsrp)) { neighbour_cells[cell_idx]->set_rsrp(rsrp); sort_neighbour_cells(); return true; @@ -1144,6 +1107,74 @@ int rrc::find_neighbour_cell(uint32_t earfcn, uint32_t pci) { return -1; } +/******************************************************************************* + * + * + * + * eMBMS Related Functions + * + * + * + *******************************************************************************/ + +void rrc::print_mbms() +{ + if (!rrc_log) { + return; + } + + if (!serving_cell->has_mcch) { + rrc_log->console("MCCH not available for current cell\n"); + return; + } + + asn1::rrc::mcch_msg_type_c msg = serving_cell->mcch.msg; + std::stringstream ss; + for (uint32_t i = 0; i < msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9.size(); i++) { + ss << "PMCH: " << i << std::endl; + pmch_info_r9_s* pmch = &msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[i]; + for (uint32_t j = 0; j < pmch->mbms_session_info_list_r9.size(); j++) { + mbms_session_info_r9_s* sess = &pmch->mbms_session_info_list_r9[j]; + ss << " Service ID: " << sess->tmgi_r9.service_id_r9.to_string(); + if (sess->session_id_r9_present) { + ss << ", Session ID: " << sess->session_id_r9.to_string(); + } + if (sess->tmgi_r9.plmn_id_r9.type() == tmgi_r9_s::plmn_id_r9_c_::types::explicit_value_r9) { + ss << ", MCC: " << mcc_bytes_to_string(sess->tmgi_r9.plmn_id_r9.explicit_value_r9().mcc); + ss << ", MNC: " << mnc_bytes_to_string(sess->tmgi_r9.plmn_id_r9.explicit_value_r9().mnc); + } else { + ss << ", PLMN index: " << sess->tmgi_r9.plmn_id_r9.plmn_idx_r9(); + } + ss << ", LCID: " << sess->lc_ch_id_r9 << std::endl; + } + } + // rrc_log->console(ss.str().c_str()); + std::cout << ss.str(); + return; +} + +bool rrc::mbms_service_start(uint32_t serv, uint32_t port) +{ + bool ret = false; + if (!serving_cell->has_mcch) { + rrc_log->error("MCCH not available at MBMS Service Start\n"); + return ret; + } + + asn1::rrc::mcch_msg_type_c msg = serving_cell->mcch.msg; + for (uint32_t i = 0; i < msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9.size(); i++) { + pmch_info_r9_s* pmch = &msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[i]; + for (uint32_t j = 0; j < pmch->mbms_session_info_list_r9.size(); j++) { + mbms_session_info_r9_s* sess = &pmch->mbms_session_info_list_r9[j]; + if (serv == sess->tmgi_r9.service_id_r9.to_number()) { + rrc_log->console("MBMS service started. Service id:%d, port: %d\n", serv, port); + ret = true; + add_mrb(sess->lc_ch_id_r9, port); + } + } + } + return ret; +} /******************************************************************************* * @@ -1231,41 +1262,42 @@ void rrc::timer_expired(uint32_t timeout_id) { * *******************************************************************************/ -void rrc::send_con_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause) { +void rrc::send_con_request(asn1::rrc::establishment_cause_e cause) +{ rrc_log->debug("Preparing RRC Connection Request\n"); - bzero(&ul_ccch_msg, sizeof(LIBLTE_RRC_UL_CCCH_MSG_STRUCT)); // Prepare ConnectionRequest packet - ul_ccch_msg.msg_type = LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ; - - if (ueIdentity_configured) { - ul_ccch_msg.msg.rrc_con_req.ue_id_type = LIBLTE_RRC_CON_REQ_UE_ID_TYPE_S_TMSI; - ul_ccch_msg.msg.rrc_con_req.ue_id.s_tmsi.m_tmsi = ueIdentity.m_tmsi; - ul_ccch_msg.msg.rrc_con_req.ue_id.s_tmsi.mmec = ueIdentity.mmec; + ul_ccch_msg.msg.set(asn1::rrc::ul_ccch_msg_type_c::types::c1); + ul_ccch_msg.msg.c1().set(asn1::rrc::ul_ccch_msg_type_c::c1_c_::types::rrc_conn_request); + ul_ccch_msg.msg.c1().rrc_conn_request().crit_exts.set( + asn1::rrc::rrc_conn_request_s::crit_exts_c_::types::rrc_conn_request_r8); + rrc_conn_request_r8_ies_s* rrc_conn_req = &ul_ccch_msg.msg.c1().rrc_conn_request().crit_exts.rrc_conn_request_r8(); + + if (ue_identity_configured) { + rrc_conn_req->ue_id.set(asn1::rrc::init_ue_id_c::types::s_tmsi); + rrc_conn_req->ue_id.s_tmsi() = ue_identity; } else { - ul_ccch_msg.msg.rrc_con_req.ue_id_type = LIBLTE_RRC_CON_REQ_UE_ID_TYPE_RANDOM_VALUE; + rrc_conn_req->ue_id.set(asn1::rrc::init_ue_id_c::types::random_value); // TODO use proper RNG uint64_t random_id = 0; for (uint i = 0; i < 5; i++) { // fill random ID bytewise, 40 bits = 5 bytes random_id |= ( (uint64_t)rand() & 0xFF ) << i*8; } - ul_ccch_msg.msg.rrc_con_req.ue_id.random = random_id; + rrc_conn_req->ue_id.random_value().from_number(random_id); } - - ul_ccch_msg.msg.rrc_con_req.cause = cause; + rrc_conn_req->establishment_cause = cause; send_ul_ccch_msg(); } /* RRC connection re-establishment procedure (5.3.7) */ -void rrc::send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause) +void rrc::send_con_restablish_request(asn1::rrc::reest_cause_e cause) { - bzero(&ul_ccch_msg, sizeof(LIBLTE_RRC_UL_CCCH_MSG_STRUCT)); - uint16_t crnti; uint16_t pci; uint32_t cellid; - if (cause == LIBLTE_RRC_CON_REEST_REQ_CAUSE_HANDOVER_FAILURE) { + + if (cause == asn1::rrc::reest_cause_e::ho_fail) { crnti = ho_src_rnti; pci = ho_src_cell.get_pci(); cellid = ho_src_cell.get_cell_id(); @@ -1278,20 +1310,18 @@ void rrc::send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause) } // Compute shortMAC-I - uint8_t varShortMAC[128], varShortMAC_packed[16]; - bzero(varShortMAC, 128); + uint8_t varShortMAC_packed[16]; bzero(varShortMAC_packed, 16); - uint8_t *msg_ptr = varShortMAC; + asn1::bit_ref bref(varShortMAC_packed, sizeof(varShortMAC_packed)); // ASN.1 encode VarShortMAC-Input - liblte_rrc_pack_cell_identity_ie(cellid, &msg_ptr); - liblte_rrc_pack_phys_cell_id_ie(pci, &msg_ptr); - liblte_rrc_pack_c_rnti_ie(crnti, &msg_ptr); - - // byte align (already zero-padded) - uint32_t N_bits = (uint32_t) (msg_ptr-varShortMAC); + var_short_mac_input_s varmac; + varmac.cell_id.from_number(cellid); + varmac.pci = pci; + varmac.c_rnti.from_number(crnti); + varmac.pack(bref); + uint32_t N_bits = (uint32_t)bref.distance(varShortMAC_packed); uint32_t N_bytes = ((N_bits-1)/8+1); - srslte_bit_pack_vector(varShortMAC, varShortMAC_packed, N_bytes*8); rrc_log->info("Encoded varShortMAC: cellId=0x%x, PCI=%d, rnti=0x%x (%d bytes, %d bits)\n", cellid, pci, crnti, N_bytes, N_bits); @@ -1322,11 +1352,17 @@ void rrc::send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause) } // Prepare ConnectionRestalishmentRequest packet - ul_ccch_msg.msg_type = LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ; - ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti = crnti; - ul_ccch_msg.msg.rrc_con_reest_req.ue_id.phys_cell_id = pci; - ul_ccch_msg.msg.rrc_con_reest_req.ue_id.short_mac_i = mac_key[2] << 8 | mac_key[3]; - ul_ccch_msg.msg.rrc_con_reest_req.cause = cause; + ul_ccch_msg.msg.set(asn1::rrc::ul_ccch_msg_type_c::types::c1); + ul_ccch_msg.msg.c1().set(asn1::rrc::ul_ccch_msg_type_c::c1_c_::types::rrc_conn_reest_request); + ul_ccch_msg.msg.c1().rrc_conn_reest_request().crit_exts.set( + asn1::rrc::rrc_conn_reest_request_s::crit_exts_c_::types::rrc_conn_reest_request_r8); + rrc_conn_reest_request_r8_ies_s* rrc_conn_reest_req = + &ul_ccch_msg.msg.c1().rrc_conn_reest_request().crit_exts.rrc_conn_reest_request_r8(); + + rrc_conn_reest_req->ue_id.c_rnti.from_number(crnti); + rrc_conn_reest_req->ue_id.pci = pci; + rrc_conn_reest_req->ue_id.short_mac_i.from_number(mac_key[2] << 8 | mac_key[3]); + rrc_conn_reest_req->reest_cause = cause; rrc_log->info("Initiating RRC Connection Reestablishment Procedure\n"); rrc_log->console("RRC Connection Reestablishment\n"); @@ -1346,7 +1382,6 @@ void rrc::send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause) if (mac_timers->timer_get(t311)->is_running()) { // Actions following cell reselection while T311 is running 5.3.7.3 rrc_log->info("Cell Selection finished. Initiating transmission of RRC Connection Reestablishment Request\n"); - liblte_rrc_pack_ul_ccch_msg(&ul_ccch_msg, (LIBLTE_BIT_MSG_STRUCT *) &bit_buf); mac_timers->timer_get(t301)->reset(); mac_timers->timer_get(t301)->run(); @@ -1361,54 +1396,67 @@ void rrc::send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_ENUM cause) go_idle = true; } } else { - rrc_log->info("Selected cell no longer suitable for camping (in_sync=%s). Going to IDLE\n", serving_cell->in_sync?"yes":"no"); + rrc_log->info("Selected cell no longer suitable for camping (in_sync=%s). Going to IDLE\n", + serving_cell->in_sync ? "yes" : "no"); go_idle = true; } } void rrc::send_con_restablish_complete() { - bzero(&ul_dcch_msg, sizeof(LIBLTE_RRC_UL_DCCH_MSG_STRUCT)); rrc_log->debug("Preparing RRC Connection Reestablishment Complete\n"); - rrc_log->console("RRC Connected\n"); // Prepare ConnectionSetupComplete packet - ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_REEST_COMPLETE; - ul_dcch_msg.msg.rrc_con_reest_complete.rrc_transaction_id = transaction_id; + ul_dcch_msg.msg.set(asn1::rrc::ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(asn1::rrc::ul_dcch_msg_type_c::c1_c_::types::rrc_conn_reest_complete); + ul_dcch_msg.msg.c1().rrc_conn_reest_complete().crit_exts.set( + asn1::rrc::rrc_conn_reest_complete_s::crit_exts_c_::types::rrc_conn_reest_complete_r8); + + ul_dcch_msg.msg.c1().rrc_conn_reest_complete().rrc_transaction_id = transaction_id; send_ul_dcch_msg(RB_ID_SRB1); } void rrc::send_con_setup_complete(byte_buffer_t *nas_msg) { - bzero(&ul_dcch_msg, sizeof(LIBLTE_RRC_UL_DCCH_MSG_STRUCT)); rrc_log->debug("Preparing RRC Connection Setup Complete\n"); // Prepare ConnectionSetupComplete packet - ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_SETUP_COMPLETE; - ul_dcch_msg.msg.rrc_con_setup_complete.registered_mme_present = false; - ul_dcch_msg.msg.rrc_con_setup_complete.rrc_transaction_id = transaction_id; - ul_dcch_msg.msg.rrc_con_setup_complete.selected_plmn_id = 1; - memcpy(ul_dcch_msg.msg.rrc_con_setup_complete.dedicated_info_nas.msg, nas_msg->msg, nas_msg->N_bytes); - ul_dcch_msg.msg.rrc_con_setup_complete.dedicated_info_nas.N_bytes = nas_msg->N_bytes; + ul_dcch_msg.msg.set(asn1::rrc::ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(asn1::rrc::ul_dcch_msg_type_c::c1_c_::types::rrc_conn_setup_complete); + ul_dcch_msg.msg.c1().rrc_conn_setup_complete().crit_exts.set( + asn1::rrc::rrc_conn_setup_complete_s::crit_exts_c_::types::c1); + ul_dcch_msg.msg.c1().rrc_conn_setup_complete().crit_exts.c1().set( + asn1::rrc::rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::types::rrc_conn_setup_complete_r8); + rrc_conn_setup_complete_r8_ies_s* rrc_conn_setup_complete = + &ul_dcch_msg.msg.c1().rrc_conn_setup_complete().crit_exts.c1().rrc_conn_setup_complete_r8(); + + ul_dcch_msg.msg.c1().rrc_conn_setup_complete().rrc_transaction_id = transaction_id; + + rrc_conn_setup_complete->sel_plmn_id = 1; + rrc_conn_setup_complete->ded_info_nas.resize(nas_msg->N_bytes); + memcpy(rrc_conn_setup_complete->ded_info_nas.data(), nas_msg->msg, nas_msg->N_bytes); // TODO Check! pool->deallocate(nas_msg); - send_ul_dcch_msg(RB_ID_SRB1); } -void rrc::send_ul_info_transfer(byte_buffer_t *nas_msg) { - bzero(&ul_dcch_msg, sizeof(LIBLTE_RRC_UL_DCCH_MSG_STRUCT)); - +void rrc::send_ul_info_transfer(byte_buffer_t* nas_msg) +{ uint32_t lcid = rlc->has_bearer(RB_ID_SRB2) ? RB_ID_SRB2 : RB_ID_SRB1; - rrc_log->debug("%s Preparing UL Info Transfer\n", get_rb_name(lcid).c_str()); + // Prepare UL INFO packet + ul_dcch_msg.msg.set(asn1::rrc::ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(asn1::rrc::ul_dcch_msg_type_c::c1_c_::types::ul_info_transfer); + ul_dcch_msg.msg.c1().ul_info_transfer().crit_exts.set(asn1::rrc::ul_info_transfer_s::crit_exts_c_::types::c1); + ul_dcch_msg.msg.c1().ul_info_transfer().crit_exts.c1().set( + asn1::rrc::ul_info_transfer_s::crit_exts_c_::c1_c_::types::ul_info_transfer_r8); + ul_info_transfer_r8_ies_s* rrc_ul_info_transfer = + &ul_dcch_msg.msg.c1().ul_info_transfer().crit_exts.c1().ul_info_transfer_r8(); - // Prepare RX INFO packet - ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_UL_INFO_TRANSFER; - ul_dcch_msg.msg.ul_info_transfer.dedicated_info_type = LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_NAS; - memcpy(ul_dcch_msg.msg.ul_info_transfer.dedicated_info.msg, nas_msg->msg, nas_msg->N_bytes); - ul_dcch_msg.msg.ul_info_transfer.dedicated_info.N_bytes = nas_msg->N_bytes; + rrc_ul_info_transfer->ded_info_type.set(asn1::rrc::ul_info_transfer_r8_ies_s::ded_info_type_c_::types::ded_info_nas); + rrc_ul_info_transfer->ded_info_type.ded_info_nas().resize(nas_msg->N_bytes); + memcpy(rrc_ul_info_transfer->ded_info_type.ded_info_nas().data(), nas_msg->msg, nas_msg->N_bytes); // TODO Check! pool->deallocate(nas_msg); @@ -1416,43 +1464,51 @@ void rrc::send_ul_info_transfer(byte_buffer_t *nas_msg) { } void rrc::send_security_mode_complete() { - bzero(&ul_dcch_msg, sizeof(LIBLTE_RRC_UL_DCCH_MSG_STRUCT)); rrc_log->debug("Preparing Security Mode Complete\n"); - ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_SECURITY_MODE_COMPLETE; - ul_dcch_msg.msg.security_mode_complete.rrc_transaction_id = transaction_id; + // Prepare Security Mode Command Complete + ul_dcch_msg.msg.set(asn1::rrc::ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(asn1::rrc::ul_dcch_msg_type_c::c1_c_::types::security_mode_complete); + ul_dcch_msg.msg.c1().security_mode_complete().crit_exts.set( + asn1::rrc::security_mode_complete_s::crit_exts_c_::types::security_mode_complete_r8); + + ul_dcch_msg.msg.c1().security_mode_complete().rrc_transaction_id = transaction_id; send_ul_dcch_msg(RB_ID_SRB1); } void rrc::send_rrc_con_reconfig_complete() { - bzero(&ul_dcch_msg, sizeof(LIBLTE_RRC_UL_DCCH_MSG_STRUCT)); rrc_log->debug("Preparing RRC Connection Reconfig Complete\n"); - ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_RRC_CON_RECONFIG_COMPLETE; - ul_dcch_msg.msg.rrc_con_reconfig_complete.rrc_transaction_id = transaction_id; + ul_dcch_msg.msg.set(asn1::rrc::ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(asn1::rrc::ul_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg_complete); + ul_dcch_msg.msg.c1().rrc_conn_recfg_complete().crit_exts.set( + asn1::rrc::rrc_conn_recfg_complete_s::crit_exts_c_::types::rrc_conn_recfg_complete_r8); + + ul_dcch_msg.msg.c1().rrc_conn_recfg_complete().rrc_transaction_id = transaction_id; send_ul_dcch_msg(RB_ID_SRB1); } bool rrc::ho_prepare() { if (pending_mob_reconf) { - rrc_log->info("Processing HO command to target PCell=%d\n", mob_reconf.mob_ctrl_info.target_pci); + asn1::rrc::rrc_conn_recfg_r8_ies_s* mob_reconf_r8 = &mob_reconf.crit_exts.c1().rrc_conn_recfg_r8(); + asn1::rrc::mob_ctrl_info_s* mob_ctrl_info = &mob_reconf_r8->mob_ctrl_info; + rrc_log->info("Processing HO command to target PCell=%d\n", mob_ctrl_info->target_pci); - int target_cell_idx = find_neighbour_cell(serving_cell->get_earfcn(), mob_reconf.mob_ctrl_info.target_pci); + int target_cell_idx = find_neighbour_cell(serving_cell->get_earfcn(), mob_ctrl_info->target_pci); if (target_cell_idx < 0) { - rrc_log->console("Received HO command to unknown PCI=%d\n", mob_reconf.mob_ctrl_info.target_pci); - rrc_log->error("Could not find target cell earfcn=%d, pci=%d\n", - serving_cell->get_earfcn(), - mob_reconf.mob_ctrl_info.target_pci); + rrc_log->console("Received HO command to unknown PCI=%d\n", mob_ctrl_info->target_pci); + rrc_log->error("Could not find target cell earfcn=%d, pci=%d\n", serving_cell->get_earfcn(), + mob_ctrl_info->target_pci); return false; } // Section 5.3.5.4 mac_timers->timer_get(t310)->stop(); - mac_timers->timer_get(t304)->set(this, liblte_rrc_t304_num[mob_reconf.mob_ctrl_info.t304]); - if (mob_reconf.mob_ctrl_info.carrier_freq_eutra_present && - mob_reconf.mob_ctrl_info.carrier_freq_eutra.dl_carrier_freq != serving_cell->get_earfcn()) { + mac_timers->timer_get(t304)->set(this, mob_ctrl_info->t304.to_number()); + if (mob_ctrl_info->carrier_freq_present && + mob_ctrl_info->carrier_freq.dl_carrier_freq != serving_cell->get_earfcn()) { rrc_log->error("Received mobilityControlInfo for inter-frequency handover\n"); return false; } @@ -1472,8 +1528,8 @@ bool rrc::ho_prepare() { mac->reset(); phy->reset(); - mac->set_ho_rnti(mob_reconf.mob_ctrl_info.new_ue_id, mob_reconf.mob_ctrl_info.target_pci); - apply_rr_config_common_dl(&mob_reconf.mob_ctrl_info.rr_cnfg_common); + mac->set_ho_rnti(mob_ctrl_info->new_ue_id.to_number(), mob_ctrl_info->target_pci); + apply_rr_config_common_dl(&mob_ctrl_info->rr_cfg_common); if (!phy->cell_select(&neighbour_cells[target_cell_idx]->phy_cell)) { rrc_log->error("Could not synchronize with target cell pci=%d. Trying to return to source PCI\n", @@ -1483,36 +1539,35 @@ bool rrc::ho_prepare() { set_serving_cell(target_cell_idx); - if (mob_reconf.mob_ctrl_info.rach_cnfg_ded_present) { + if (mob_ctrl_info->rach_cfg_ded_present) { rrc_log->info("Starting non-contention based RA with preamble_idx=%d, mask_idx=%d\n", - mob_reconf.mob_ctrl_info.rach_cnfg_ded.preamble_index, - mob_reconf.mob_ctrl_info.rach_cnfg_ded.prach_mask_index); - mac->start_noncont_ho(mob_reconf.mob_ctrl_info.rach_cnfg_ded.preamble_index, - mob_reconf.mob_ctrl_info.rach_cnfg_ded.prach_mask_index); + mob_ctrl_info->rach_cfg_ded.ra_preamb_idx, mob_ctrl_info->rach_cfg_ded.ra_prach_mask_idx); + mac->start_noncont_ho(mob_ctrl_info->rach_cfg_ded.ra_preamb_idx, mob_ctrl_info->rach_cfg_ded.ra_prach_mask_idx); } else { rrc_log->info("Starting contention-based RA\n"); mac->start_cont_ho(); } int ncc = -1; - if (mob_reconf.sec_cnfg_ho_present) { - ncc = mob_reconf.sec_cnfg_ho.intra_lte.next_hop_chaining_count; - if (mob_reconf.sec_cnfg_ho.intra_lte.key_change_ind) { + if (mob_reconf_r8->security_cfg_ho_present) { + ncc = mob_reconf_r8->security_cfg_ho.ho_type.intra_lte().next_hop_chaining_count; + if (mob_reconf_r8->security_cfg_ho.ho_type.intra_lte().key_change_ind) { rrc_log->console("keyChangeIndicator in securityConfigHO not supported\n"); return false; } - if (mob_reconf.sec_cnfg_ho.intra_lte.sec_alg_cnfg_present) { - cipher_algo = (CIPHERING_ALGORITHM_ID_ENUM) mob_reconf.sec_cnfg_ho.intra_lte.sec_alg_cnfg.cipher_alg; - integ_algo = (INTEGRITY_ALGORITHM_ID_ENUM) mob_reconf.sec_cnfg_ho.intra_lte.sec_alg_cnfg.int_alg; + if (mob_reconf_r8->security_cfg_ho.ho_type.intra_lte().security_algorithm_cfg_present) { + cipher_algo = (CIPHERING_ALGORITHM_ID_ENUM)mob_reconf_r8->security_cfg_ho.ho_type.intra_lte() + .security_algorithm_cfg.ciphering_algorithm.to_number(); + integ_algo = (INTEGRITY_ALGORITHM_ID_ENUM)mob_reconf_r8->security_cfg_ho.ho_type.intra_lte() + .security_algorithm_cfg.integrity_prot_algorithm.to_number(); rrc_log->info("Changed Ciphering to %s and Integrity to %s\n", ciphering_algorithm_id_text[cipher_algo], integrity_algorithm_id_text[integ_algo]); } } - usim->generate_as_keys_ho(mob_reconf.mob_ctrl_info.target_pci, phy->get_current_earfcn(), - ncc, - k_rrc_enc, k_rrc_int, k_up_enc, k_up_int, cipher_algo, integ_algo); + usim->generate_as_keys_ho(mob_ctrl_info->target_pci, phy->get_current_earfcn(), ncc, k_rrc_enc, k_rrc_int, k_up_enc, + k_up_int, cipher_algo, integ_algo); pdcp->config_security_all(k_rrc_enc, k_rrc_int, cipher_algo, integ_algo); send_rrc_con_reconfig_complete(); @@ -1521,20 +1576,21 @@ bool rrc::ho_prepare() { } void rrc::ho_ra_completed(bool ra_successful) { - if (pending_mob_reconf) { + if (pending_mob_reconf) { + asn1::rrc::rrc_conn_recfg_r8_ies_s* mob_reconf_r8 = &mob_reconf.crit_exts.c1().rrc_conn_recfg_r8(); if (ra_successful) { measurements.ho_finish(); - if (mob_reconf.meas_cnfg_present) { - measurements.parse_meas_config(&mob_reconf.meas_cnfg); + if (mob_reconf_r8->meas_cfg_present) { + measurements.parse_meas_config(&mob_reconf_r8->meas_cfg); } mac_timers->timer_get(t304)->stop(); - apply_rr_config_common_ul(&mob_reconf.mob_ctrl_info.rr_cnfg_common); - if (mob_reconf.rr_cnfg_ded_present) { - apply_rr_config_dedicated(&mob_reconf.rr_cnfg_ded); + apply_rr_config_common_ul(&mob_reconf_r8->mob_ctrl_info.rr_cfg_common); + if (mob_reconf_r8->rr_cfg_ded_present) { + apply_rr_config_dedicated(&mob_reconf_r8->rr_cfg_ded); } } // T304 will expiry and send ho_failure @@ -1548,36 +1604,38 @@ void rrc::ho_ra_completed(bool ra_successful) { } } -bool rrc::con_reconfig_ho(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig) +bool rrc::con_reconfig_ho(asn1::rrc::rrc_conn_recfg_s* reconfig) { - if (reconfig->mob_ctrl_info.target_pci == phy->get_current_pci()) { + asn1::rrc::rrc_conn_recfg_r8_ies_s* mob_reconf_r8 = &reconfig->crit_exts.c1().rrc_conn_recfg_r8(); + if (mob_reconf_r8->mob_ctrl_info.target_pci == phy->get_current_pci()) { rrc_log->console("Warning: Received HO command to own cell\n"); rrc_log->warning("Received HO command to own cell\n"); return false; } - rrc_log->info("Received HO command to target PCell=%d\n", reconfig->mob_ctrl_info.target_pci); - rrc_log->console("Received HO command to target PCell=%d, NCC=%d\n", - reconfig->mob_ctrl_info.target_pci, reconfig->sec_cnfg_ho.intra_lte.next_hop_chaining_count); + rrc_log->info("Received HO command to target PCell=%d\n", mob_reconf_r8->mob_ctrl_info.target_pci); + rrc_log->console("Received HO command to target PCell=%d, NCC=%d\n", mob_reconf_r8->mob_ctrl_info.target_pci, + mob_reconf_r8->security_cfg_ho.ho_type.intra_lte().next_hop_chaining_count); // store mobilityControlInfo - memcpy(&mob_reconf, reconfig, sizeof(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT)); + mob_reconf = *reconfig; pending_mob_reconf = true; ho_start = true; - return true; } // Handle RRC Reconfiguration without MobilityInformation Section 5.3.5.3 -bool rrc::con_reconfig(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig) { - if (reconfig->rr_cnfg_ded_present) { - if (!apply_rr_config_dedicated(&reconfig->rr_cnfg_ded)) { +bool rrc::con_reconfig(asn1::rrc::rrc_conn_recfg_s* reconfig) +{ + asn1::rrc::rrc_conn_recfg_r8_ies_s* reconfig_r8 = &reconfig->crit_exts.c1().rrc_conn_recfg_r8(); + if (reconfig_r8->rr_cfg_ded_present) { + if (!apply_rr_config_dedicated(&reconfig_r8->rr_cfg_ded)) { return false; } } - if (reconfig->meas_cnfg_present) { - if (!measurements.parse_meas_config(&reconfig->meas_cnfg)) { + if (reconfig_r8->meas_cfg_present) { + if (!measurements.parse_meas_config(&reconfig_r8->meas_cfg)) { return false; } } @@ -1585,11 +1643,11 @@ bool rrc::con_reconfig(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig) { send_rrc_con_reconfig_complete(); byte_buffer_t *nas_sdu; - for (uint32_t i = 0; i < reconfig->N_ded_info_nas; i++) { - nas_sdu = pool_allocate_blocking; + for (uint32_t i = 0; i < reconfig_r8->ded_info_nas_list.size(); i++) { + nas_sdu = pool_allocate; if (nas_sdu) { - memcpy(nas_sdu->msg, &reconfig->ded_info_nas_list[i].msg, reconfig->ded_info_nas_list[i].N_bytes); - nas_sdu->N_bytes = reconfig->ded_info_nas_list[i].N_bytes; + memcpy(nas_sdu->msg, reconfig_r8->ded_info_nas_list[i].data(), reconfig_r8->ded_info_nas_list[i].size()); + nas_sdu->N_bytes = reconfig_r8->ded_info_nas_list[i].size(); nas->write_pdu(RB_ID_SRB1, nas_sdu); } else { rrc_log->error("Fatal Error: Couldn't allocate PDU in handle_rrc_con_reconfig().\n"); @@ -1600,8 +1658,9 @@ bool rrc::con_reconfig(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig) { } // HO failure from T304 expiry 5.3.5.6 -void rrc::ho_failed() { - send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_HANDOVER_FAILURE); +void rrc::ho_failed() +{ + send_con_restablish_request(asn1::rrc::reest_cause_e::ho_fail); } // Reconfiguration failure or Section 5.3.5.5 @@ -1613,18 +1672,19 @@ void rrc::con_reconfig_failed() if (security_is_activated) { // Start the Reestablishment Procedure - send_con_restablish_request(LIBLTE_RRC_CON_REEST_REQ_CAUSE_RECONFIG_FAILURE); + send_con_restablish_request(asn1::rrc::reest_cause_e::recfg_fail); } else { go_idle = true; } } -void rrc::handle_rrc_con_reconfig(uint32_t lcid, LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig) +void rrc::handle_rrc_con_reconfig(uint32_t lcid, asn1::rrc::rrc_conn_recfg_s* reconfig) { phy->get_config(&previous_phy_cfg); mac->get_config(&previous_mac_cfg); - if (reconfig->mob_ctrl_info_present) { + asn1::rrc::rrc_conn_recfg_r8_ies_s* reconfig_r8 = &reconfig->crit_exts.c1().rrc_conn_recfg_r8(); + if (reconfig_r8->mob_ctrl_info_present) { if (!con_reconfig_ho(reconfig)) { con_reconfig_failed(); } @@ -1648,6 +1708,7 @@ void rrc::leave_connected() rrc_log->console("RRC IDLE\n"); rrc_log->info("Leaving RRC_CONNECTED state\n"); state = RRC_STATE_IDLE; + rlc_flush_counter = 0; drb_up = false; security_is_activated = false; measurements.reset(); @@ -1694,58 +1755,71 @@ void rrc::write_pdu_bcch_bch(byte_buffer_t *pdu) { void rrc::write_pdu_bcch_dlsch(byte_buffer_t *pdu) { mac->clear_rntis(); - rrc_log->info_hex(pdu->msg, pdu->N_bytes, "BCCH DLSCH message received."); - rrc_log->info("BCCH DLSCH message Stack latency: %ld us\n", pdu->get_latency_us()); - LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT dlsch_msg; - ZERO_OBJECT(dlsch_msg); + asn1::rrc::bcch_dl_sch_msg_s dlsch_msg; + asn1::bit_ref dlsch_bref(pdu->msg, pdu->N_bytes); + asn1::SRSASN_CODE err = dlsch_msg.unpack(dlsch_bref); + if (err != asn1::SRSASN_SUCCESS) { + rrc_log->error("Could not unpack BCCH DL-SCH message.\n"); + return; + } - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; + log_rrc_message("BCCH", Rx, pdu, dlsch_msg); pool->deallocate(pdu); - liblte_rrc_unpack_bcch_dlsch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &dlsch_msg); - for(uint32_t i=0; iinfo("Processing SIB%d (%d/%d)\n", liblte_rrc_sys_info_block_type_num[dlsch_msg.sibs[i].sib_type], i, dlsch_msg.N_sibs); - - if (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1 == dlsch_msg.sibs[i].sib_type) { - serving_cell->set_sib1(&dlsch_msg.sibs[i].sib.sib1); - handle_sib1(); - } else if (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2 == dlsch_msg.sibs[i].sib_type && !serving_cell->has_sib2()) { - serving_cell->set_sib2(&dlsch_msg.sibs[i].sib.sib2); - handle_sib2(); - } else if (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3 == dlsch_msg.sibs[i].sib_type && !serving_cell->has_sib3()) { - serving_cell->set_sib3(&dlsch_msg.sibs[i].sib.sib3); - handle_sib3(); - }else if (LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13 == dlsch_msg.sibs[i].sib_type && !serving_cell->has_sib13()) { - serving_cell->set_sib13(&dlsch_msg.sibs[i].sib.sib13); - handle_sib13(); + if (dlsch_msg.msg.c1().type() == bcch_dl_sch_msg_type_c::c1_c_::types::sib_type1) { + rrc_log->info("Processing SIB1 (1/1)\n"); + serving_cell->set_sib1(&dlsch_msg.msg.c1().sib_type1()); + handle_sib1(); + } else { + sys_info_r8_ies_s::sib_type_and_info_l_& sib_list = + dlsch_msg.msg.c1().sys_info().crit_exts.sys_info_r8().sib_type_and_info; + for (uint32_t i = 0; i < sib_list.size(); ++i) { + rrc_log->info("Processing SIB%d (%d/%d)\n", sib_list[i].type().to_number(), i, sib_list.size()); + switch (sib_list[i].type().value) { + case sib_info_item_c::types::sib2: + if (not serving_cell->has_sib2()) { + serving_cell->set_sib2(&sib_list[i].sib2()); + } + handle_sib2(); + break; + case sib_info_item_c::types::sib3: + if (not serving_cell->has_sib3()) { + serving_cell->set_sib3(&sib_list[i].sib3()); + } + handle_sib3(); + break; + case sib_info_item_c::types::sib13_v920: + if (not serving_cell->has_sib13()) { + serving_cell->set_sib13(&sib_list[i].sib13_v920()); + } + handle_sib13(); + break; + default: + rrc_log->warning("SIB%d is not supported\n", sib_list[i].type().to_number()); + } } } } void rrc::handle_sib1() { - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *sib1 = serving_cell->sib1ptr(); - rrc_log->info("SIB1 received, CellID=%d, si_window=%d, sib2_period=%d\n", - serving_cell->get_cell_id()&0xfff, - liblte_rrc_si_window_length_num[sib1->si_window_length], - liblte_rrc_si_periodicity_num[sib1->sched_info[0].si_periodicity]); + sib_type1_s* sib1 = serving_cell->sib1ptr(); + rrc_log->info("SIB1 received, CellID=%d, si_window=%d, sib2_period=%d\n", serving_cell->get_cell_id() & 0xfff, + sib1->si_win_len.to_number(), sib1->sched_info_list[0].si_periodicity.to_number()); // Print SIB scheduling info uint32_t i,j; - for(i=0;iN_sched_info;i++){ - for(j=0;jsched_info[i].N_sib_mapping_info;j++){ - LIBLTE_RRC_SIB_TYPE_ENUM t = sib1->sched_info[i].sib_mapping_info[j].sib_type; - LIBLTE_RRC_SI_PERIODICITY_ENUM p = sib1->sched_info[i].si_periodicity; - rrc_log->debug("SIB scheduling info, sib_type=%d, si_periodicity=%d\n", - liblte_rrc_sib_type_num[t], - liblte_rrc_si_periodicity_num[p]); + for (uint32_t i = 0; i < sib1->sched_info_list.size(); ++i) { + sched_info_s::si_periodicity_e_ p = sib1->sched_info_list[i].si_periodicity; + for (uint32_t j = 0; j < sib1->sched_info_list[i].sib_map_info.size(); ++j) { + sib_type_e t = sib1->sched_info_list[i].sib_map_info[j]; + rrc_log->debug("SIB scheduling info, sib_type=%d, si_periodicity=%d\n", t.to_number(), p.to_number()); } } // Set TDD Config - if(sib1->tdd) { - phy->set_config_tdd(&sib1->tdd_cnfg); + if (sib1->tdd_cfg_present) { + phy->set_config_tdd(&sib1->tdd_cfg); } } @@ -1761,36 +1835,29 @@ void rrc::handle_sib3() { rrc_log->info("SIB3 received\n"); - LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *sib3 = serving_cell->sib3ptr(); + sib_type3_s* sib3 = serving_cell->sib3ptr(); // cellReselectionInfoCommon - cell_resel_cfg.q_hyst = liblte_rrc_q_hyst_num[sib3->q_hyst]; + cell_resel_cfg.q_hyst = sib3->cell_resel_info_common.q_hyst.to_number(); // cellReselectionServingFreqInfo - cell_resel_cfg.threshservinglow = sib3->thresh_serving_low; + cell_resel_cfg.threshservinglow = sib3->thresh_serving_low_q_r9; // TODO: Check first if present // intraFreqCellReselectionInfo - cell_resel_cfg.Qrxlevmin = sib3->q_rx_lev_min; - if (sib3->s_intra_search_present) { - cell_resel_cfg.s_intrasearchP = sib3->s_intra_search; + cell_resel_cfg.Qrxlevmin = sib3->intra_freq_cell_resel_info.q_rx_lev_min; + if (sib3->intra_freq_cell_resel_info.s_intra_search_present) { + cell_resel_cfg.s_intrasearchP = sib3->intra_freq_cell_resel_info.s_intra_search; } else { cell_resel_cfg.s_intrasearchP = INFINITY; } - } void rrc::handle_sib13() { rrc_log->info("SIB13 received\n"); - -// mac->set_config_mbsfn_sib13(&serving_cell->sib13.mbsfn_area_info_list_r9[0], -// serving_cell->sib13.mbsfn_area_info_list_r9_size, -// &serving_cell->sib13.mbsfn_notification_config); + apply_sib13_configs(serving_cell->sib13ptr()); } - - - /******************************************************************************* * * @@ -1809,31 +1876,29 @@ void rrc::write_pdu_pcch(byte_buffer_t *pdu) { void rrc::process_pcch(byte_buffer_t *pdu) { if (pdu->N_bytes > 0 && pdu->N_bytes < SRSLTE_MAX_BUFFER_SIZE_BITS) { - rrc_log->info_hex(pdu->msg, pdu->N_bytes, "PCCH message received %d bytes\n", pdu->N_bytes); - rrc_log->info("PCCH message Stack latency: %ld us\n", pdu->get_latency_us()); - - LIBLTE_RRC_PCCH_MSG_STRUCT pcch_msg; - ZERO_OBJECT(pcch_msg); - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; + pcch_msg_s pcch_msg; + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); + pcch_msg.unpack(bref); + log_rrc_message("PCCH", Rx, pdu, pcch_msg); pool->deallocate(pdu); - liblte_rrc_unpack_pcch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &pcch_msg); - if (pcch_msg.paging_record_list_size > LIBLTE_RRC_MAX_PAGE_REC) { - pcch_msg.paging_record_list_size = LIBLTE_RRC_MAX_PAGE_REC; + paging_s* paging = &pcch_msg.msg.c1().paging(); + if (paging->paging_record_list.size() > ASN1_RRC_MAX_PAGE_REC) { + paging->paging_record_list.resize(ASN1_RRC_MAX_PAGE_REC); } - if (!ueIdentity_configured) { + if (not ue_identity_configured) { rrc_log->warning("Received paging message but no ue-Identity is configured\n"); return; } - LIBLTE_RRC_S_TMSI_STRUCT *s_tmsi_paged; - for (uint32_t i = 0; i < pcch_msg.paging_record_list_size; i++) { - s_tmsi_paged = &pcch_msg.paging_record_list[i].ue_identity.s_tmsi; - rrc_log->info("Received paging (%d/%d) for UE %x:%x\n", i + 1, pcch_msg.paging_record_list_size, - pcch_msg.paging_record_list[i].ue_identity.s_tmsi.mmec, - pcch_msg.paging_record_list[i].ue_identity.s_tmsi.m_tmsi); - if (ueIdentity.mmec == s_tmsi_paged->mmec && ueIdentity.m_tmsi == s_tmsi_paged->m_tmsi) { + + s_tmsi_s* s_tmsi_paged; + for (uint32_t i = 0; i < paging->paging_record_list.size(); i++) { + s_tmsi_paged = &paging->paging_record_list[i].ue_id.s_tmsi(); + rrc_log->info("Received paging (%d/%d) for UE %" PRIu64 ":%" PRIu64 "\n", i + 1, + paging->paging_record_list.size(), paging->paging_record_list[i].ue_id.s_tmsi().mmec.to_number(), + paging->paging_record_list[i].ue_id.s_tmsi().m_tmsi.to_number()); + if (ue_identity.mmec == s_tmsi_paged->mmec && ue_identity.m_tmsi == s_tmsi_paged->m_tmsi) { if (RRC_STATE_IDLE == state) { rrc_log->info("S-TMSI match in paging message\n"); rrc_log->console("S-TMSI match in paging message\n"); @@ -1846,34 +1911,29 @@ void rrc::process_pcch(byte_buffer_t *pdu) { } } - if (pcch_msg.system_info_modification_present) { - if (pcch_msg.system_info_modification == LIBLTE_RRC_SYSTEM_INFO_MODIFICATION_TRUE) { - rrc_log->info("Received System Information notifcation update request.\n"); - // invalidate and then update all SIBs of serving cell - serving_cell->reset_sibs(); - if (configure_serving_cell()) { - rrc_log->info("All SIBs of serving cell obtained successfully\n"); - } else { - rrc_log->error("While obtaining SIBs of serving cell.\n"); - } + if (paging->sys_info_mod_present) { + rrc_log->info("Received System Information notifcation update request.\n"); + // invalidate and then update all SIBs of serving cell + serving_cell->reset_sibs(); + if (configure_serving_cell()) { + rrc_log->info("All SIBs of serving cell obtained successfully\n"); + } else { + rrc_log->error("While obtaining SIBs of serving cell.\n"); } } } } - void rrc::write_pdu_mch(uint32_t lcid, srslte::byte_buffer_t *pdu) { if (pdu->N_bytes > 0 && pdu->N_bytes < SRSLTE_MAX_BUFFER_SIZE_BITS) { - rrc_log->info_hex(pdu->msg, pdu->N_bytes, "MCH message received %d bytes on lcid:%d\n", pdu->N_bytes, lcid); - rrc_log->info("MCH message Stack latency: %ld us\n", pdu->get_latency_us()); //TODO: handle MCCH notifications and update MCCH if(0 == lcid && !serving_cell->has_mcch) { - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; - liblte_rrc_unpack_mcch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &serving_cell->mcch); + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); + serving_cell->mcch.unpack(bref); serving_cell->has_mcch = true; phy->set_config_mbsfn_mcch(&serving_cell->mcch); + log_rrc_message("MCH", Rx, pdu, serving_cell->mcch); } pool->deallocate(pdu); @@ -1884,9 +1944,6 @@ void rrc::write_pdu_mch(uint32_t lcid, srslte::byte_buffer_t *pdu) - - - /******************************************************************************* * * @@ -1895,56 +1952,57 @@ void rrc::write_pdu_mch(uint32_t lcid, srslte::byte_buffer_t *pdu) * * *******************************************************************************/ -byte_buffer_t* rrc::byte_align_and_pack() -{ - // Byte align and pack the message bits for PDCP - if ((bit_buf.N_bits % 8) != 0) { - for (uint32_t i = 0; i < 8 - (bit_buf.N_bits % 8); i++) - bit_buf.msg[bit_buf.N_bits + i] = 0; - bit_buf.N_bits += 8 - (bit_buf.N_bits % 8); - } +void rrc::send_ul_ccch_msg() +{ // Reset and reuse sdu buffer if provided byte_buffer_t *pdcp_buf = pool_allocate_blocking; - if (pdcp_buf) { - srslte_bit_pack_vector(bit_buf.msg, pdcp_buf->msg, bit_buf.N_bits); - pdcp_buf->N_bytes = bit_buf.N_bits / 8; - pdcp_buf->set_timestamp(); - } else { + if (not pdcp_buf) { rrc_log->error("Fatal Error: Couldn't allocate PDU in byte_align_and_pack().\n"); + return; } - return pdcp_buf; -} - -void rrc::send_ul_ccch_msg() -{ - liblte_rrc_pack_ul_ccch_msg(&ul_ccch_msg, (LIBLTE_BIT_MSG_STRUCT *) &bit_buf); - byte_buffer_t *pdu = byte_align_and_pack(); - if (pdu) { - // Set UE contention resolution ID in MAC - uint64_t uecri = 0; - uint8_t *ue_cri_ptr = (uint8_t *) &uecri; - uint32_t nbytes = 6; - for (uint32_t i = 0; i < nbytes; i++) { - ue_cri_ptr[nbytes - i - 1] = pdu->msg[i]; - } - rrc_log->debug("Setting UE contention resolution ID: %" PRIu64 "\n", uecri); - mac->set_contention_id(uecri); + asn1::bit_ref bref(pdcp_buf->msg, pdcp_buf->get_tailroom()); + ul_ccch_msg.pack(bref); + bref.align_bytes_zero(); + pdcp_buf->N_bytes = (uint32_t)bref.distance_bytes(pdcp_buf->msg); + pdcp_buf->set_timestamp(); - rrc_log->info("Sending %s\n", liblte_rrc_ul_ccch_msg_type_text[ul_ccch_msg.msg_type]); - pdcp->write_sdu(RB_ID_SRB0, pdu); + // Set UE contention resolution ID in MAC + uint64_t uecri = 0; + uint8_t* ue_cri_ptr = (uint8_t*)&uecri; + uint32_t nbytes = 6; + for (uint32_t i = 0; i < nbytes; i++) { + ue_cri_ptr[nbytes - i - 1] = pdcp_buf->msg[i]; } + + rrc_log->debug("Setting UE contention resolution ID: %" PRIu64 "\n", uecri); + mac->set_contention_id(uecri); + + uint32_t lcid = RB_ID_SRB0; + log_rrc_message(get_rb_name(lcid).c_str(), Tx, pdcp_buf, ul_ccch_msg); + + pdcp->write_sdu(lcid, pdcp_buf); } void rrc::send_ul_dcch_msg(uint32_t lcid) { - liblte_rrc_pack_ul_dcch_msg(&ul_dcch_msg, (LIBLTE_BIT_MSG_STRUCT *) &bit_buf); - byte_buffer_t *pdu = byte_align_and_pack(); - if (pdu) { - rrc_log->info_hex(pdu->msg, pdu->N_bytes, "%s Sending %s\n", get_rb_name(lcid).c_str(), liblte_rrc_ul_dcch_msg_type_text[ul_dcch_msg.msg_type]); - pdcp->write_sdu(lcid, pdu); + // Reset and reuse sdu buffer if provided + byte_buffer_t* pdcp_buf = pool_allocate_blocking; + if (not pdcp_buf) { + rrc_log->error("Fatal Error: Couldn't allocate PDU in byte_align_and_pack().\n"); + return; } + + asn1::bit_ref bref(pdcp_buf->msg, pdcp_buf->get_tailroom()); + ul_dcch_msg.pack(bref); + bref.align_bytes_zero(); + pdcp_buf->N_bytes = (uint32_t)bref.distance_bytes(pdcp_buf->msg); + pdcp_buf->set_timestamp(); + + log_rrc_message(get_rb_name(lcid).c_str(), Tx, pdcp_buf, ul_dcch_msg); + + pdcp->write_sdu(lcid, pdcp_buf); } void rrc::write_sdu(byte_buffer_t *sdu) { @@ -1953,28 +2011,23 @@ void rrc::write_sdu(byte_buffer_t *sdu) { rrc_log->warning("Received ULInformationTransfer SDU when in IDLE\n"); return; } - rrc_log->info_hex(sdu->msg, sdu->N_bytes, "TX SDU"); send_ul_info_transfer(sdu); } -void rrc::write_pdu(uint32_t lcid, byte_buffer_t *pdu) { - rrc_log->info_hex(pdu->msg, pdu->N_bytes, "RX %s PDU", get_rb_name(lcid).c_str()); - +void rrc::write_pdu(uint32_t lcid, byte_buffer_t* pdu) +{ // If the message contains a ConnectionSetup, acknowledge the transmission to avoid blocking of paging procedure if (lcid == 0) { // FIXME: We unpack and process this message twice to check if it's ConnectionSetup - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; - bzero(&dl_ccch_msg, sizeof(LIBLTE_RRC_DL_CCCH_MSG_STRUCT)); - liblte_rrc_unpack_dl_ccch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &dl_ccch_msg); - if (dl_ccch_msg.msg_type == LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_SETUP) { + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); + dl_ccch_msg.unpack(bref); + if (dl_ccch_msg.msg.c1().type() == dl_ccch_msg_type_c::c1_c_::types::rrc_conn_setup) { // Must enter CONNECT before stopping T300 state = RRC_STATE_CONNECTED; mac_timers->timer_get(t300)->stop(); mac_timers->timer_get(t302)->stop(); rrc_log->console("RRC Connected\n"); - } } @@ -1982,9 +2035,8 @@ void rrc::write_pdu(uint32_t lcid, byte_buffer_t *pdu) { cmd_msg_t msg; msg.pdu = pdu; msg.command = cmd_msg_t::PDU; - msg.lcid = lcid; + msg.lcid = (uint16_t)lcid; cmd_q.push(msg); - } void rrc::process_pdu(uint32_t lcid, byte_buffer_t *pdu) @@ -2003,90 +2055,86 @@ void rrc::process_pdu(uint32_t lcid, byte_buffer_t *pdu) } } -void rrc::parse_dl_ccch(byte_buffer_t *pdu) { - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; +void rrc::parse_dl_ccch(byte_buffer_t* pdu) +{ + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); + dl_ccch_msg.unpack(bref); + log_rrc_message(get_rb_name(RB_ID_SRB0).c_str(), Rx, pdu, dl_ccch_msg); pool->deallocate(pdu); - bzero(&dl_ccch_msg, sizeof(LIBLTE_RRC_DL_CCCH_MSG_STRUCT)); - liblte_rrc_unpack_dl_ccch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &dl_ccch_msg); - rrc_log->info("SRB0 - Received %s\n", - liblte_rrc_dl_ccch_msg_type_text[dl_ccch_msg.msg_type]); - - switch (dl_ccch_msg.msg_type) { - case LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REJ: + dl_ccch_msg_type_c::c1_c_* c1 = &dl_ccch_msg.msg.c1(); + switch (dl_ccch_msg.msg.c1().type().value) { + case dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reject: { // 5.3.3.8 - rrc_log->info("Received ConnectionReject. Wait time: %d\n", - dl_ccch_msg.msg.rrc_con_rej.wait_time); - rrc_log->console("Received ConnectionReject. Wait time: %d\n", - dl_ccch_msg.msg.rrc_con_rej.wait_time); + rrc_conn_reject_r8_ies_s* reject_r8 = &c1->rrc_conn_reject().crit_exts.c1().rrc_conn_reject_r8(); + rrc_log->info("Received ConnectionReject. Wait time: %d\n", reject_r8->wait_time); + rrc_log->console("Received ConnectionReject. Wait time: %d\n", reject_r8->wait_time); mac_timers->timer_get(t300)->stop(); - if (dl_ccch_msg.msg.rrc_con_rej.wait_time) { + if (reject_r8->wait_time) { nas->set_barring(nas_interface_rrc::BARRING_ALL); - mac_timers->timer_get(t302)->set(this, dl_ccch_msg.msg.rrc_con_rej.wait_time*1000); + mac_timers->timer_get(t302)->set(this, reject_r8->wait_time * 1000u); mac_timers->timer_get(t302)->run(); } else { // Perform the actions upon expiry of T302 if wait time is zero nas->set_barring(nas_interface_rrc::BARRING_NONE); go_idle = true; } + } break; + case dl_ccch_msg_type_c::c1_c_::types::rrc_conn_setup: + transaction_id = c1->rrc_conn_setup().rrc_transaction_id; + handle_con_setup(&c1->rrc_conn_setup()); break; - case LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_SETUP: - rrc_log->info("ConnectionSetup received\n"); - transaction_id = dl_ccch_msg.msg.rrc_con_setup.rrc_transaction_id; - handle_con_setup(&dl_ccch_msg.msg.rrc_con_setup); - break; - case LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST: - rrc_log->info("ConnectionReestablishment received\n"); + case dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reest: rrc_log->console("Reestablishment OK\n"); - transaction_id = dl_ccch_msg.msg.rrc_con_reest.rrc_transaction_id; - handle_con_reest(&dl_ccch_msg.msg.rrc_con_reest); + transaction_id = c1->rrc_conn_reest().rrc_transaction_id; + handle_con_reest(&c1->rrc_conn_reest()); break; /* Reception of RRCConnectionReestablishmentReject 5.3.7.8 */ - case LIBLTE_RRC_DL_CCCH_MSG_TYPE_RRC_CON_REEST_REJ: - rrc_log->info("ConnectionReestablishmentReject received\n"); + case dl_ccch_msg_type_c::c1_c_::types::rrc_conn_reest_reject: rrc_log->console("Reestablishment Reject\n"); go_idle = true; break; default: + rrc_log->error("The provided DL-CCCH message type is not recognized\n"); break; } } -void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { - srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8); - bit_buf.N_bits = pdu->N_bytes * 8; - bzero(&dl_dcch_msg, sizeof(dl_dcch_msg)); - liblte_rrc_unpack_dl_dcch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &dl_dcch_msg); - - rrc_log->info("%s - Received %s\n", - get_rb_name(lcid).c_str(), - liblte_rrc_dl_dcch_msg_type_text[dl_dcch_msg.msg_type]); - +void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t* pdu) +{ + asn1::bit_ref bref(pdu->msg, pdu->N_bytes); + dl_dcch_msg.unpack(bref); + log_rrc_message(get_rb_name(lcid).c_str(), Rx, pdu, dl_dcch_msg); pool->deallocate(pdu); - switch (dl_dcch_msg.msg_type) { - case LIBLTE_RRC_DL_DCCH_MSG_TYPE_DL_INFO_TRANSFER: + dl_dcch_msg_type_c::c1_c_* c1 = &dl_dcch_msg.msg.c1(); + switch (dl_dcch_msg.msg.c1().type().value) { + case dl_dcch_msg_type_c::c1_c_::types::dl_info_transfer: pdu = pool_allocate_blocking; if (!pdu) { rrc_log->error("Fatal error: out of buffers in pool\n"); return; } - memcpy(pdu->msg, dl_dcch_msg.msg.dl_info_transfer.dedicated_info.msg, - dl_dcch_msg.msg.dl_info_transfer.dedicated_info.N_bytes); - pdu->N_bytes = dl_dcch_msg.msg.dl_info_transfer.dedicated_info.N_bytes; + pdu->N_bytes = c1->dl_info_transfer().crit_exts.c1().dl_info_transfer_r8().ded_info_type.ded_info_nas().size(); + memcpy(pdu->msg, c1->dl_info_transfer().crit_exts.c1().dl_info_transfer_r8().ded_info_type.ded_info_nas().data(), + pdu->N_bytes); nas->write_pdu(lcid, pdu); break; - case LIBLTE_RRC_DL_DCCH_MSG_TYPE_SECURITY_MODE_COMMAND: - transaction_id = dl_dcch_msg.msg.security_mode_cmd.rrc_transaction_id; - - cipher_algo = (CIPHERING_ALGORITHM_ID_ENUM) dl_dcch_msg.msg.security_mode_cmd.sec_algs.cipher_alg; - integ_algo = (INTEGRITY_ALGORITHM_ID_ENUM) dl_dcch_msg.msg.security_mode_cmd.sec_algs.int_alg; - - rrc_log->info("Received Security Mode Command eea: %s, eia: %s\n", - ciphering_algorithm_id_text[cipher_algo], + case dl_dcch_msg_type_c::c1_c_::types::security_mode_cmd: + transaction_id = c1->security_mode_cmd().rrc_transaction_id; + + cipher_algo = (CIPHERING_ALGORITHM_ID_ENUM)c1->security_mode_cmd() + .crit_exts.c1() + .security_mode_cmd_r8() + .security_cfg_smc.security_algorithm_cfg.ciphering_algorithm.value; + integ_algo = (INTEGRITY_ALGORITHM_ID_ENUM)c1->security_mode_cmd() + .crit_exts.c1() + .security_mode_cmd_r8() + .security_cfg_smc.security_algorithm_cfg.integrity_prot_algorithm.value; + + rrc_log->info("Received Security Mode Command eea: %s, eia: %s\n", ciphering_algorithm_id_text[cipher_algo], integrity_algorithm_id_text[integ_algo]); // Generate AS security keys @@ -2094,10 +2142,11 @@ void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { nas->get_k_asme(k_asme, 32); rrc_log->debug_hex(k_asme, 32, "UE K_asme"); rrc_log->debug("Generating K_enb with UL NAS COUNT: %d\n", nas->get_k_enb_count()); - usim->generate_as_keys(k_asme, nas->get_k_enb_count(), k_rrc_enc, k_rrc_int, k_up_enc, k_up_int, cipher_algo, integ_algo); + usim->generate_as_keys(k_asme, nas->get_k_enb_count(), k_rrc_enc, k_rrc_int, k_up_enc, k_up_int, cipher_algo, + integ_algo); rrc_log->info_hex(k_rrc_enc, 32, "RRC encryption key - k_rrc_enc"); rrc_log->info_hex(k_rrc_int, 32, "RRC integrity key - k_rrc_int"); - rrc_log->info_hex(k_up_enc, 32, "UP encryption key - k_up_enc"); + rrc_log->info_hex(k_up_enc, 32, "UP encryption key - k_up_enc"); security_is_activated = true; @@ -2107,35 +2156,28 @@ void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { send_security_mode_complete(); pdcp->enable_encryption(lcid); break; - case LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RECONFIG: - transaction_id = dl_dcch_msg.msg.rrc_con_reconfig.rrc_transaction_id; - handle_rrc_con_reconfig(lcid, &dl_dcch_msg.msg.rrc_con_reconfig); + case dl_dcch_msg_type_c::c1_c_::types::rrc_conn_recfg: + transaction_id = c1->rrc_conn_recfg().rrc_transaction_id; + handle_rrc_con_reconfig(lcid, &c1->rrc_conn_recfg()); break; - case LIBLTE_RRC_DL_DCCH_MSG_TYPE_UE_CAPABILITY_ENQUIRY: - transaction_id = dl_dcch_msg.msg.ue_cap_enquiry.rrc_transaction_id; - for (uint32_t i = 0; i < dl_dcch_msg.msg.ue_cap_enquiry.N_ue_cap_reqs; i++) { - if (LIBLTE_RRC_RAT_TYPE_EUTRA == dl_dcch_msg.msg.ue_cap_enquiry.ue_capability_request[i]) { + case dl_dcch_msg_type_c::c1_c_::types::ue_cap_enquiry: + transaction_id = c1->ue_cap_enquiry().rrc_transaction_id; + for (uint32_t i = 0; i < c1->ue_cap_enquiry().crit_exts.c1().ue_cap_enquiry_r8().ue_cap_request.size(); i++) { + if (c1->ue_cap_enquiry().crit_exts.c1().ue_cap_enquiry_r8().ue_cap_request[i] == rat_type_e::eutra) { send_rrc_ue_cap_info(); break; } } break; - case LIBLTE_RRC_DL_DCCH_MSG_TYPE_RRC_CON_RELEASE: + case dl_dcch_msg_type_c::c1_c_::types::rrc_conn_release: rrc_connection_release(); break; default: + rrc_log->error("The provided DL-CCCH message type is not recognized or supported\n"); break; } } - - - - - - - - /******************************************************************************* * * @@ -2145,71 +2187,60 @@ void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { * * *******************************************************************************/ -void rrc::enable_capabilities() { - bool enable_ul_64 = args.ue_category >= 5 && serving_cell->sib2ptr()->rr_config_common_sib.pusch_cnfg.enable_64_qam; +void rrc::enable_capabilities() +{ + bool enable_ul_64 = + args.ue_category >= 5 && serving_cell->sib2ptr()->rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.enable64_qam; rrc_log->info("%s 64QAM PUSCH\n", enable_ul_64 ? "Enabling" : "Disabling"); phy->set_config_64qam_en(enable_ul_64); } -void rrc::send_rrc_ue_cap_info() { +void rrc::send_rrc_ue_cap_info() +{ rrc_log->debug("Preparing UE Capability Info\n"); - ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_UE_CAPABILITY_INFO; - ul_dcch_msg.msg.ue_capability_info.rrc_transaction_id = transaction_id; - - LIBLTE_RRC_UE_CAPABILITY_INFORMATION_STRUCT *info = &ul_dcch_msg.msg.ue_capability_info; - info->N_ue_caps = 1; - info->ue_capability_rat[0].rat_type = LIBLTE_RRC_RAT_TYPE_EUTRA; - - LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *cap = &info->ue_capability_rat[0].eutra_capability; - cap->access_stratum_release = LIBLTE_RRC_ACCESS_STRATUM_RELEASE_REL8; - cap->ue_category = args.ue_category; - - cap->pdcp_params.max_rohc_ctxts_present = false; - cap->pdcp_params.supported_rohc_profiles[0] = false; - cap->pdcp_params.supported_rohc_profiles[1] = false; - cap->pdcp_params.supported_rohc_profiles[2] = false; - cap->pdcp_params.supported_rohc_profiles[3] = false; - cap->pdcp_params.supported_rohc_profiles[4] = false; - cap->pdcp_params.supported_rohc_profiles[5] = false; - cap->pdcp_params.supported_rohc_profiles[6] = false; - cap->pdcp_params.supported_rohc_profiles[7] = false; - cap->pdcp_params.supported_rohc_profiles[8] = false; - - cap->phy_params.specific_ref_sigs_supported = false; - cap->phy_params.tx_antenna_selection_supported = false; - - cap->rf_params.N_supported_band_eutras = args.nof_supported_bands; - cap->meas_params.N_band_list_eutra = args.nof_supported_bands; - for (uint32_t i=0;irf_params.supported_band_eutra[i].band_eutra = args.supported_bands[i]; - cap->rf_params.supported_band_eutra[i].half_duplex = false; - cap->meas_params.band_list_eutra[i].N_inter_freq_need_for_gaps = 1; - cap->meas_params.band_list_eutra[i].inter_freq_need_for_gaps[0] = true; - } - - cap->feature_group_indicator_present = true; - cap->feature_group_indicator = args.feature_group; - cap->inter_rat_params.utra_fdd_present = false; - cap->inter_rat_params.utra_tdd128_present = false; - cap->inter_rat_params.utra_tdd384_present = false; - cap->inter_rat_params.utra_tdd768_present = false; - cap->inter_rat_params.geran_present = false; - cap->inter_rat_params.cdma2000_hrpd_present = false; - cap->inter_rat_params.cdma2000_1xrtt_present = false; + ul_dcch_msg.msg.set(ul_dcch_msg_type_c::types::c1); + ul_dcch_msg.msg.c1().set(ul_dcch_msg_type_c::c1_c_::types::ue_cap_info); + ul_dcch_msg.msg.c1().ue_cap_info().rrc_transaction_id = transaction_id; + + ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.set(ue_cap_info_s::crit_exts_c_::types::c1); + ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.c1().set(ue_cap_info_s::crit_exts_c_::c1_c_::types::ue_cap_info_r8); + ue_cap_info_r8_ies_s* info = &ul_dcch_msg.msg.c1().ue_cap_info().crit_exts.c1().ue_cap_info_r8(); + info->ue_cap_rat_container_list.resize(1); + info->ue_cap_rat_container_list[0].rat_type = rat_type_e::eutra; + + ue_eutra_cap_s cap; + cap.access_stratum_release = access_stratum_release_e::rel8; + cap.ue_category = (uint8_t)args.ue_category; + cap.pdcp_params.max_num_rohc_context_sessions_present = false; + + cap.phy_layer_params.ue_specific_ref_sigs_supported = false; + cap.phy_layer_params.ue_tx_ant_sel_supported = false; + + cap.rf_params.supported_band_list_eutra.resize(args.nof_supported_bands); + cap.meas_params.band_list_eutra.resize(args.nof_supported_bands); + for (uint32_t i = 0; i < args.nof_supported_bands; i++) { + cap.rf_params.supported_band_list_eutra[i].band_eutra = args.supported_bands[i]; + cap.rf_params.supported_band_list_eutra[i].half_duplex = false; + cap.meas_params.band_list_eutra[i].inter_freq_band_list.resize(1); + cap.meas_params.band_list_eutra[i].inter_freq_band_list[0].inter_freq_need_for_gaps = true; + } + + cap.feature_group_inds_present = true; + cap.feature_group_inds.from_number(args.feature_group); + + // Pack caps and copy to cap info + uint8_t buf[64]; + asn1::bit_ref bref(buf, sizeof(buf)); + cap.pack(bref); + bref.align_bytes_zero(); + uint32_t cap_len = (uint32_t)bref.distance_bytes(buf); + info->ue_cap_rat_container_list[0].ue_cap_rat_container.resize(cap_len); + memcpy(info->ue_cap_rat_container_list[0].ue_cap_rat_container.data(), buf, cap_len); send_ul_dcch_msg(RB_ID_SRB1); } - - - - - - - - - /******************************************************************************* * * @@ -2220,275 +2251,276 @@ void rrc::send_rrc_ue_cap_info() { * *******************************************************************************/ -void rrc::apply_rr_config_common_dl(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *config) { +void rrc::apply_rr_config_common_dl(rr_cfg_common_s* config) +{ mac_interface_rrc::mac_cfg_t mac_cfg; mac->get_config(&mac_cfg); - if (config->rach_cnfg_present) { - memcpy(&mac_cfg.rach, &config->rach_cnfg, sizeof(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT)); - mac_cfg.ul_harq_params.max_harq_msg3_tx = config->rach_cnfg.max_harq_msg3_tx; + if (config->rach_cfg_common_present) { + mac_cfg.rach = config->rach_cfg_common; + mac_cfg.ul_harq_params.max_harq_msg3_tx = config->rach_cfg_common.max_harq_msg3_tx; } - mac_cfg.prach_config_index = config->prach_cnfg.root_sequence_index; + mac_cfg.prach_config_index = config->prach_cfg.root_seq_idx; mac->set_config(&mac_cfg); phy_interface_rrc::phy_cfg_t phy_cfg; phy->get_config(&phy_cfg); - phy_interface_rrc::phy_cfg_common_t *common = &phy_cfg.common; + phy_interface_rrc::phy_cfg_common_t* common = &phy_cfg.common; - if (config->pdsch_cnfg_present) { - memcpy(&common->pdsch_cnfg, &config->pdsch_cnfg, sizeof(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT)); + if (config->pdsch_cfg_common_present) { + common->pdsch_cnfg = config->pdsch_cfg_common; } - common->prach_cnfg.root_sequence_index = config->prach_cnfg.root_sequence_index; - if (config->prach_cnfg.prach_cnfg_info_present) { - memcpy(&common->prach_cnfg.prach_cnfg_info, &config->prach_cnfg.prach_cnfg_info, sizeof(LIBLTE_RRC_PRACH_CONFIG_INFO_STRUCT)); + common->prach_cnfg.root_seq_idx = config->prach_cfg.root_seq_idx; + if (config->prach_cfg.prach_cfg_info_present) { + common->prach_cnfg.prach_cfg_info = config->prach_cfg.prach_cfg_info; } phy->set_config_common(common); } -void rrc::apply_rr_config_common_ul(LIBLTE_RRC_RR_CONFIG_COMMON_STRUCT *config) { +void rrc::apply_rr_config_common_ul(rr_cfg_common_s* config) +{ phy_interface_rrc::phy_cfg_t phy_cfg; phy->get_config(&phy_cfg); - phy_interface_rrc::phy_cfg_common_t *common = &phy_cfg.common; + phy_interface_rrc::phy_cfg_common_t* common = &phy_cfg.common; - memcpy(&common->pusch_cnfg, &config->pusch_cnfg, sizeof(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT)); - if (config->pucch_cnfg_present) { - memcpy(&common->pucch_cnfg, &config->pucch_cnfg, sizeof(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT)); + common->pusch_cnfg = config->pusch_cfg_common; + if (config->pucch_cfg_common_present) { + common->pucch_cnfg = config->pucch_cfg_common; } - if (config->ul_pwr_ctrl_present) { - memcpy(&common->ul_pwr_ctrl, &config->ul_pwr_ctrl, sizeof(LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT)); + if (config->ul_pwr_ctrl_common_present) { + common->ul_pwr_ctrl = config->ul_pwr_ctrl_common; } - if (config->srs_ul_cnfg.present) { - memcpy(&common->srs_ul_cnfg, &config->srs_ul_cnfg, sizeof(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT)); - } else { - // default is release - common->srs_ul_cnfg.present = false; + if (config->srs_ul_cfg_common_present) { + common->srs_ul_cnfg = config->srs_ul_cfg_common; } phy->set_config_common(common); phy->configure_ul_params(); } -void rrc::apply_sib2_configs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2) { +void rrc::apply_sib2_configs(sib_type2_s* sib2) +{ // Apply RACH timeAlginmentTimer configuration mac_interface_rrc::mac_cfg_t cfg; mac->get_config(&cfg); - cfg.main.time_alignment_timer = sib2->time_alignment_timer; - memcpy(&cfg.rach, &sib2->rr_config_common_sib.rach_cnfg, sizeof(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT)); - cfg.prach_config_index = sib2->rr_config_common_sib.prach_cnfg.root_sequence_index; + cfg.main.time_align_timer_ded = sib2->time_align_timer_common; + cfg.rach = sib2->rr_cfg_common.rach_cfg_common; + cfg.prach_config_index = sib2->rr_cfg_common.prach_cfg.root_seq_idx; cfg.ul_harq_params.max_harq_msg3_tx = cfg.rach.max_harq_msg3_tx; // Apply MBSFN configuration -// cfg.mbsfn_subfr_cnfg_list_size = sib2->mbsfn_subfr_cnfg_list_size; -// for(uint8_t i=0;imbsfn_subfr_cnfg_list_size;i++) { -// memcpy(&cfg.mbsfn_subfr_cnfg_list[i], &sib2->mbsfn_subfr_cnfg_list[i], sizeof(LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT)); -// } - - // Set MBSFN configs + // cfg.mbsfn_subfr_cnfg_list_size = sib2->mbsfn_subfr_cnfg_list_size; + // for(uint8_t i=0;imbsfn_subfr_cnfg_list_size;i++) { + // memcpy(&cfg.mbsfn_subfr_cnfg_list[i], &sib2->mbsfn_subfr_cnfg_list[i], + // sizeof(LIBLTE_RRC_MBSFN_SUBFRAME_CONFIG_STRUCT)); + // } + + // Set MBSFN configs phy->set_config_mbsfn_sib2(sib2); mac->set_config(&cfg); rrc_log->info("Set RACH ConfigCommon: NofPreambles=%d, ResponseWindow=%d, ContentionResolutionTimer=%d ms\n", - liblte_rrc_number_of_ra_preambles_num[sib2->rr_config_common_sib.rach_cnfg.num_ra_preambles], - liblte_rrc_ra_response_window_size_num[sib2->rr_config_common_sib.rach_cnfg.ra_resp_win_size], - liblte_rrc_mac_contention_resolution_timer_num[sib2->rr_config_common_sib.rach_cnfg.mac_con_res_timer]); + sib2->rr_cfg_common.rach_cfg_common.preamb_info.nof_ra_preambs.to_number(), + sib2->rr_cfg_common.rach_cfg_common.ra_supervision_info.ra_resp_win_size.to_number(), + sib2->rr_cfg_common.rach_cfg_common.ra_supervision_info.mac_contention_resolution_timer.to_number()); // Apply PHY RR Config Common phy_interface_rrc::phy_cfg_common_t common; - memcpy(&common.pdsch_cnfg, &sib2->rr_config_common_sib.pdsch_cnfg, sizeof(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT)); - memcpy(&common.pusch_cnfg, &sib2->rr_config_common_sib.pusch_cnfg, sizeof(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT)); - memcpy(&common.pucch_cnfg, &sib2->rr_config_common_sib.pucch_cnfg, sizeof(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT)); - memcpy(&common.ul_pwr_ctrl, &sib2->rr_config_common_sib.ul_pwr_ctrl, - sizeof(LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT)); - memcpy(&common.prach_cnfg, &sib2->rr_config_common_sib.prach_cnfg, sizeof(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT)); - if (sib2->rr_config_common_sib.srs_ul_cnfg.present) { - memcpy(&common.srs_ul_cnfg, &sib2->rr_config_common_sib.srs_ul_cnfg, - sizeof(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT)); - } else { - // default is release - common.srs_ul_cnfg.present = false; - } + common.pdsch_cnfg = sib2->rr_cfg_common.pdsch_cfg_common; + common.pusch_cnfg = sib2->rr_cfg_common.pusch_cfg_common; + common.pucch_cnfg = sib2->rr_cfg_common.pucch_cfg_common; + common.ul_pwr_ctrl = sib2->rr_cfg_common.ul_pwr_ctrl_common; + common.prach_cnfg = sib2->rr_cfg_common.prach_cfg; + common.srs_ul_cnfg = sib2->rr_cfg_common.srs_ul_cfg_common; phy->set_config_common(&common); phy->configure_ul_params(); rrc_log->info("Set PUSCH ConfigCommon: HopOffset=%d, RSGroup=%d, RSNcs=%d, N_sb=%d\n", - sib2->rr_config_common_sib.pusch_cnfg.pusch_hopping_offset, - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.group_assignment_pusch, - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.cyclic_shift, - sib2->rr_config_common_sib.pusch_cnfg.n_sb); + sib2->rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.pusch_hop_offset, + sib2->rr_cfg_common.pusch_cfg_common.ul_ref_sigs_pusch.group_assign_pusch, + sib2->rr_cfg_common.pusch_cfg_common.ul_ref_sigs_pusch.cyclic_shift, + sib2->rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.n_sb); rrc_log->info("Set PUCCH ConfigCommon: DeltaShift=%d, CyclicShift=%d, N1=%d, NRB=%d\n", - liblte_rrc_delta_pucch_shift_num[sib2->rr_config_common_sib.pucch_cnfg.delta_pucch_shift], - sib2->rr_config_common_sib.pucch_cnfg.n_cs_an, - sib2->rr_config_common_sib.pucch_cnfg.n1_pucch_an, - sib2->rr_config_common_sib.pucch_cnfg.n_rb_cqi); + sib2->rr_cfg_common.pucch_cfg_common.delta_pucch_shift.to_number(), + sib2->rr_cfg_common.pucch_cfg_common.n_cs_an, sib2->rr_cfg_common.pucch_cfg_common.n1_pucch_an, + sib2->rr_cfg_common.pucch_cfg_common.n_rb_cqi); rrc_log->info("Set PRACH ConfigCommon: SeqIdx=%d, HS=%s, FreqOffset=%d, ZC=%d, ConfigIndex=%d\n", - sib2->rr_config_common_sib.prach_cnfg.root_sequence_index, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.high_speed_flag ? "yes" : "no", - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.zero_correlation_zone_config, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_config_index); - - rrc_log->info("Set SRS ConfigCommon: BW-Configuration=%d, SF-Configuration=%d, ACKNACK=%s\n", - liblte_rrc_srs_bw_config_num[sib2->rr_config_common_sib.srs_ul_cnfg.bw_cnfg], - liblte_rrc_srs_subfr_config_num[sib2->rr_config_common_sib.srs_ul_cnfg.subfr_cnfg], - sib2->rr_config_common_sib.srs_ul_cnfg.ack_nack_simul_tx ? "yes" : "no"); - - mac_timers->timer_get(t300)->set(this, liblte_rrc_t300_num[sib2->ue_timers_and_constants.t300]); - mac_timers->timer_get(t301)->set(this, liblte_rrc_t301_num[sib2->ue_timers_and_constants.t301]); - mac_timers->timer_get(t310)->set(this, liblte_rrc_t310_num[sib2->ue_timers_and_constants.t310]); - mac_timers->timer_get(t311)->set(this, liblte_rrc_t311_num[sib2->ue_timers_and_constants.t311]); - N310 = liblte_rrc_n310_num[sib2->ue_timers_and_constants.n310]; - N311 = liblte_rrc_n311_num[sib2->ue_timers_and_constants.n311]; - - rrc_log->info("Set Constants and Timers: N310=%d, N311=%d, t300=%d, t301=%d, t310=%d, t311=%d\n", - N310, N311, mac_timers->timer_get(t300)->get_timeout(), mac_timers->timer_get(t301)->get_timeout(), + sib2->rr_cfg_common.prach_cfg.root_seq_idx, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.high_speed_flag ? "yes" : "no", + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.zero_correlation_zone_cfg, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.prach_cfg_idx); + + if (sib2->rr_cfg_common.srs_ul_cfg_common.type() == setup_e::setup) { + rrc_log->info("Set SRS ConfigCommon: BW-Configuration=%d, SF-Configuration=%d, ACKNACK=%s\n", + sib2->rr_cfg_common.srs_ul_cfg_common.setup().srs_bw_cfg.to_number(), + sib2->rr_cfg_common.srs_ul_cfg_common.setup().srs_sf_cfg.to_number(), + sib2->rr_cfg_common.srs_ul_cfg_common.setup().ack_nack_srs_simul_tx ? "yes" : "no"); + } + + mac_timers->timer_get(t300)->set(this, sib2->ue_timers_and_consts.t300.to_number()); + mac_timers->timer_get(t301)->set(this, sib2->ue_timers_and_consts.t301.to_number()); + mac_timers->timer_get(t310)->set(this, sib2->ue_timers_and_consts.t310.to_number()); + mac_timers->timer_get(t311)->set(this, sib2->ue_timers_and_consts.t311.to_number()); + N310 = sib2->ue_timers_and_consts.n310.to_number(); + N311 = sib2->ue_timers_and_consts.n311.to_number(); + + rrc_log->info("Set Constants and Timers: N310=%d, N311=%d, t300=%d, t301=%d, t310=%d, t311=%d\n", N310, N311, + mac_timers->timer_get(t300)->get_timeout(), mac_timers->timer_get(t301)->get_timeout(), mac_timers->timer_get(t310)->get_timeout(), mac_timers->timer_get(t311)->get_timeout()); - } -void rrc::apply_sib13_configs(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_13_STRUCT *sib13) +void rrc::apply_sib13_configs(sib_type13_r9_s* sib13) { - phy->set_config_mbsfn_sib13(&serving_cell->sib13); + phy->set_config_mbsfn_sib13(sib13); add_mrb(0, 0); // Add MRB0 } // Go through all information elements and apply defaults (9.2.4) if not defined -void rrc::apply_phy_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *phy_cnfg, bool apply_defaults) { +void rrc::apply_phy_config_dedicated(phys_cfg_ded_s* phy_cnfg, bool apply_defaults) +{ // Get current configuration - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT *current_cfg; + phys_cfg_ded_s* current_cfg; phy_interface_rrc::phy_cfg_t c; phy->get_config(&c); current_cfg = &c.dedicated; - if (phy_cnfg->pucch_cnfg_ded_present) { - memcpy(¤t_cfg->pucch_cnfg_ded, &phy_cnfg->pucch_cnfg_ded, sizeof(LIBLTE_RRC_PUCCH_CONFIG_DEDICATED_STRUCT)); + current_cfg->pucch_cfg_ded_present = true; + if (phy_cnfg->pucch_cfg_ded_present) { + current_cfg->pucch_cfg_ded = phy_cnfg->pucch_cfg_ded; } else if (apply_defaults) { - current_cfg->pucch_cnfg_ded.tdd_ack_nack_feedback_mode = LIBLTE_RRC_TDD_ACK_NACK_FEEDBACK_MODE_BUNDLING; - current_cfg->pucch_cnfg_ded.ack_nack_repetition_setup_present = false; + current_cfg->pucch_cfg_ded.tdd_ack_nack_feedback_mode_present = true; + current_cfg->pucch_cfg_ded.tdd_ack_nack_feedback_mode = pucch_cfg_ded_s::tdd_ack_nack_feedback_mode_e_::bundling; + current_cfg->pucch_cfg_ded.ack_nack_repeat.set(setup_e::release); } - if (phy_cnfg->pusch_cnfg_ded_present) { - memcpy(¤t_cfg->pusch_cnfg_ded, &phy_cnfg->pusch_cnfg_ded, sizeof(LIBLTE_RRC_PUSCH_CONFIG_DEDICATED_STRUCT)); + current_cfg->pusch_cfg_ded_present = true; + if (phy_cnfg->pusch_cfg_ded_present) { + current_cfg->pusch_cfg_ded = phy_cnfg->pusch_cfg_ded; } else if (apply_defaults) { - current_cfg->pusch_cnfg_ded.beta_offset_ack_idx = 10; - current_cfg->pusch_cnfg_ded.beta_offset_ri_idx = 12; - current_cfg->pusch_cnfg_ded.beta_offset_cqi_idx = 15; + current_cfg->pusch_cfg_ded.beta_offset_ack_idx = 10; + current_cfg->pusch_cfg_ded.beta_offset_ri_idx = 12; + current_cfg->pusch_cfg_ded.beta_offset_cqi_idx = 15; } + current_cfg->ul_pwr_ctrl_ded_present = true; if (phy_cnfg->ul_pwr_ctrl_ded_present) { - memcpy(¤t_cfg->ul_pwr_ctrl_ded, &phy_cnfg->ul_pwr_ctrl_ded, - sizeof(LIBLTE_RRC_UL_POWER_CONTROL_DEDICATED_STRUCT)); + current_cfg->ul_pwr_ctrl_ded = phy_cnfg->ul_pwr_ctrl_ded; } else if (apply_defaults) { - current_cfg->ul_pwr_ctrl_ded.p0_ue_pusch = 0; - current_cfg->ul_pwr_ctrl_ded.delta_mcs_en = LIBLTE_RRC_DELTA_MCS_ENABLED_EN0; - current_cfg->ul_pwr_ctrl_ded.accumulation_en = true; - current_cfg->ul_pwr_ctrl_ded.p0_ue_pucch = 0; - current_cfg->ul_pwr_ctrl_ded.p_srs_offset = 7; - } - if (phy_cnfg->ul_pwr_ctrl_ded.filter_coeff_present) { - current_cfg->ul_pwr_ctrl_ded.filter_coeff = phy_cnfg->ul_pwr_ctrl_ded.filter_coeff; + current_cfg->ul_pwr_ctrl_ded.p0_ue_pusch = 0; + current_cfg->ul_pwr_ctrl_ded.delta_mcs_enabled = ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_::en0; + current_cfg->ul_pwr_ctrl_ded.accumulation_enabled = true; + current_cfg->ul_pwr_ctrl_ded.p0_ue_pucch = 0; + current_cfg->ul_pwr_ctrl_ded.p_srs_offset = 7; + } + current_cfg->ul_pwr_ctrl_ded.filt_coef_present = true; + if (phy_cnfg->ul_pwr_ctrl_ded.filt_coef_present) { + current_cfg->ul_pwr_ctrl_ded.filt_coef = phy_cnfg->ul_pwr_ctrl_ded.filt_coef; } else { - current_cfg->ul_pwr_ctrl_ded.filter_coeff = LIBLTE_RRC_FILTER_COEFFICIENT_FC4; + current_cfg->ul_pwr_ctrl_ded.filt_coef = filt_coef_e::fc4; } - if (phy_cnfg->tpc_pdcch_cnfg_pucch_present) { - memcpy(¤t_cfg->tpc_pdcch_cnfg_pucch, &phy_cnfg->tpc_pdcch_cnfg_pucch, - sizeof(LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT)); + current_cfg->tpc_pdcch_cfg_pucch_present = true; + if (phy_cnfg->tpc_pdcch_cfg_pucch_present) { + current_cfg->tpc_pdcch_cfg_pucch = phy_cnfg->tpc_pdcch_cfg_pucch; } else if (apply_defaults) { - current_cfg->tpc_pdcch_cnfg_pucch.setup_present = false; + current_cfg->tpc_pdcch_cfg_pucch.set(setup_e::release); } - if (phy_cnfg->tpc_pdcch_cnfg_pusch_present) { - memcpy(¤t_cfg->tpc_pdcch_cnfg_pusch, &phy_cnfg->tpc_pdcch_cnfg_pusch, - sizeof(LIBLTE_RRC_TPC_PDCCH_CONFIG_STRUCT)); + current_cfg->tpc_pdcch_cfg_pusch_present = true; + if (phy_cnfg->tpc_pdcch_cfg_pusch_present) { + current_cfg->tpc_pdcch_cfg_pusch = phy_cnfg->tpc_pdcch_cfg_pusch; } else { - current_cfg->tpc_pdcch_cnfg_pusch.setup_present = false; - } - if (phy_cnfg->cqi_report_cnfg_present) { - if (phy_cnfg->cqi_report_cnfg.report_periodic_present) { - memcpy(¤t_cfg->cqi_report_cnfg.report_periodic, &phy_cnfg->cqi_report_cnfg.report_periodic, - sizeof(LIBLTE_RRC_CQI_REPORT_PERIODIC_STRUCT)); - current_cfg->cqi_report_cnfg.report_periodic_setup_present = phy_cnfg->cqi_report_cnfg.report_periodic_setup_present; + current_cfg->tpc_pdcch_cfg_pusch.set(setup_e::release); + } + if (phy_cnfg->cqi_report_cfg_present) { + if (phy_cnfg->cqi_report_cfg.cqi_report_periodic_present and + phy_cnfg->cqi_report_cfg.cqi_report_periodic.type() == setup_e::setup) { + current_cfg->cqi_report_cfg_present = true; + current_cfg->cqi_report_cfg.cqi_report_periodic_present = true; + current_cfg->cqi_report_cfg.cqi_report_periodic = phy_cnfg->cqi_report_cfg.cqi_report_periodic; } else if (apply_defaults) { - current_cfg->cqi_report_cnfg.report_periodic_setup_present = false; + current_cfg->cqi_report_cfg.cqi_report_periodic.set(setup_e::release); } - if (phy_cnfg->cqi_report_cnfg.report_mode_aperiodic_present) { - current_cfg->cqi_report_cnfg.report_mode_aperiodic = phy_cnfg->cqi_report_cnfg.report_mode_aperiodic; - current_cfg->cqi_report_cnfg.report_mode_aperiodic_present = phy_cnfg->cqi_report_cnfg.report_mode_aperiodic_present; - } else if (apply_defaults) { - current_cfg->cqi_report_cnfg.report_mode_aperiodic_present = false; + if (phy_cnfg->cqi_report_cfg.cqi_report_mode_aperiodic_present) { + current_cfg->cqi_report_cfg.cqi_report_mode_aperiodic_present = true; + current_cfg->cqi_report_cfg.cqi_report_mode_aperiodic = phy_cnfg->cqi_report_cfg.cqi_report_mode_aperiodic; } - current_cfg->cqi_report_cnfg.nom_pdsch_rs_epre_offset = phy_cnfg->cqi_report_cnfg.nom_pdsch_rs_epre_offset; + current_cfg->cqi_report_cfg.nom_pdsch_rs_epre_offset = phy_cnfg->cqi_report_cfg.nom_pdsch_rs_epre_offset; } - if (phy_cnfg->srs_ul_cnfg_ded_present && phy_cnfg->srs_ul_cnfg_ded.setup_present) { - memcpy(¤t_cfg->srs_ul_cnfg_ded, &phy_cnfg->srs_ul_cnfg_ded, - sizeof(LIBLTE_RRC_SRS_UL_CONFIG_DEDICATED_STRUCT)); + if (phy_cnfg->srs_ul_cfg_ded_present and phy_cnfg->srs_ul_cfg_ded.type() == setup_e::setup) { + current_cfg->srs_ul_cfg_ded_present = true; + current_cfg->srs_ul_cfg_ded = phy_cnfg->srs_ul_cfg_ded; } else if (apply_defaults) { - current_cfg->srs_ul_cnfg_ded.setup_present = false; - } - if (phy_cnfg->antenna_info_present) { - if (!phy_cnfg->antenna_info_default_value) { - if (phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_1 && - phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_2 && - phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_3 && - phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_4) { + current_cfg->srs_ul_cfg_ded.set(setup_e::release); + } + current_cfg->ant_info_present = true; + current_cfg->ant_info.set(phys_cfg_ded_s::ant_info_c_::types::explicit_value); + if (phy_cnfg->ant_info_present) { + if (phy_cnfg->ant_info.type() == phys_cfg_ded_s::ant_info_c_::types::explicit_value) { + if (phy_cnfg->ant_info.explicit_value().tx_mode != ant_info_ded_s::tx_mode_e_::tm1 and + phy_cnfg->ant_info.explicit_value().tx_mode != ant_info_ded_s::tx_mode_e_::tm2 and + phy_cnfg->ant_info.explicit_value().tx_mode != ant_info_ded_s::tx_mode_e_::tm3 and + phy_cnfg->ant_info.explicit_value().tx_mode != ant_info_ded_s::tx_mode_e_::tm4) { rrc_log->error("Transmission mode TM%s not currently supported by srsUE\n", - liblte_rrc_transmission_mode_text[phy_cnfg->antenna_info_explicit_value.tx_mode]); + phy_cnfg->ant_info.explicit_value().tx_mode.to_string().c_str()); } - memcpy(¤t_cfg->antenna_info_explicit_value, &phy_cnfg->antenna_info_explicit_value, - sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT)); + current_cfg->ant_info.explicit_value() = phy_cnfg->ant_info.explicit_value(); } else if (apply_defaults) { - current_cfg->antenna_info_explicit_value.tx_mode = LIBLTE_RRC_TRANSMISSION_MODE_2; - current_cfg->antenna_info_explicit_value.codebook_subset_restriction_present = false; - current_cfg->antenna_info_explicit_value.ue_tx_antenna_selection_setup_present = false; + current_cfg->ant_info.explicit_value().tx_mode = ant_info_ded_s::tx_mode_e_::tm2; + current_cfg->ant_info.explicit_value().codebook_subset_restrict_present = false; + current_cfg->ant_info.explicit_value().ue_tx_ant_sel.set(setup_e::release); } } else if (apply_defaults) { - current_cfg->antenna_info_explicit_value.tx_mode = LIBLTE_RRC_TRANSMISSION_MODE_2; - current_cfg->antenna_info_explicit_value.codebook_subset_restriction_present = false; - current_cfg->antenna_info_explicit_value.ue_tx_antenna_selection_setup_present = false; + current_cfg->ant_info.explicit_value().tx_mode = ant_info_ded_s::tx_mode_e_::tm2; + current_cfg->ant_info.explicit_value().codebook_subset_restrict_present = false; + current_cfg->ant_info.explicit_value().ue_tx_ant_sel.set(setup_e::release); } - if (phy_cnfg->sched_request_cnfg_present) { - memcpy(¤t_cfg->sched_request_cnfg, &phy_cnfg->sched_request_cnfg, - sizeof(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT)); + if (phy_cnfg->sched_request_cfg_present and phy_cnfg->sched_request_cfg.type() == setup_e::setup) { + current_cfg->sched_request_cfg_present = true; + current_cfg->sched_request_cfg = phy_cnfg->sched_request_cfg; } else if (apply_defaults) { - current_cfg->sched_request_cnfg.setup_present = false; + current_cfg->sched_request_cfg.set(setup_e::release); } - if (phy_cnfg->pdsch_cnfg_ded_present) { - current_cfg->pdsch_cnfg_ded = phy_cnfg->pdsch_cnfg_ded; - rrc_log->info("Set PDSCH-Config=%s (present)\n", liblte_rrc_pdsch_config_p_a_text[(int) current_cfg->pdsch_cnfg_ded]); + current_cfg->pdsch_cfg_ded_present = true; + if (phy_cnfg->pdsch_cfg_ded_present) { + current_cfg->pdsch_cfg_ded = phy_cnfg->pdsch_cfg_ded; + rrc_log->info("Set PDSCH-Config=%s (present)\n", current_cfg->pdsch_cfg_ded.p_a.to_string().c_str()); } else if (apply_defaults) { - current_cfg->pdsch_cnfg_ded = LIBLTE_RRC_PDSCH_CONFIG_P_A_DB_0; - rrc_log->info("Set PDSCH-Config=%s (default)\n", liblte_rrc_pdsch_config_p_a_text[(int) current_cfg->pdsch_cnfg_ded]); + current_cfg->pdsch_cfg_ded.p_a = pdsch_cfg_ded_s::p_a_e_::db0; + rrc_log->info("Set PDSCH-Config=%s (default)\n", current_cfg->pdsch_cfg_ded.p_a.to_string().c_str()); } - if (phy_cnfg->cqi_report_cnfg_present) { - if (phy_cnfg->cqi_report_cnfg.report_periodic_present) { - rrc_log->info("Set cqi-PUCCH-ResourceIndex=%d, cqi-pmi-ConfigIndex=%d, cqi-FormatIndicatorPeriodic=%s\n", - current_cfg->cqi_report_cnfg.report_periodic.pucch_resource_idx, - current_cfg->cqi_report_cnfg.report_periodic.pmi_cnfg_idx, - liblte_rrc_cqi_format_indicator_periodic_text[current_cfg->cqi_report_cnfg.report_periodic.format_ind_periodic]); + if (phy_cnfg->cqi_report_cfg_present) { + if (phy_cnfg->cqi_report_cfg.cqi_report_periodic_present and + phy_cnfg->cqi_report_cfg.cqi_report_periodic.type() == setup_e::setup) { + rrc_log->info( + "Set cqi-PUCCH-ResourceIndex=%d, cqi-pmi-ConfigIndex=%d, cqi-FormatIndicatorPeriodic=%s\n", + current_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx, + current_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx, + current_cfg->cqi_report_cfg.cqi_report_periodic.setup().cqi_format_ind_periodic.type().to_string().c_str()); } - if (phy_cnfg->cqi_report_cnfg.report_mode_aperiodic_present) { + if (phy_cnfg->cqi_report_cfg.cqi_report_mode_aperiodic_present) { rrc_log->info("Set cqi-ReportModeAperiodic=%s\n", - liblte_rrc_cqi_report_mode_aperiodic_text[current_cfg->cqi_report_cnfg.report_mode_aperiodic]); + current_cfg->cqi_report_cfg.cqi_report_mode_aperiodic.to_string().c_str()); } - } - if (phy_cnfg->sched_request_cnfg_present) { + if (current_cfg->sched_request_cfg_present and current_cfg->sched_request_cfg.type() == setup_e::setup) { rrc_log->info("Set PHY config ded: SR-n_pucch=%d, SR-ConfigIndex=%d, SR-TransMax=%d\n", - current_cfg->sched_request_cnfg.sr_pucch_resource_idx, - current_cfg->sched_request_cnfg.sr_cnfg_idx, - liblte_rrc_dsr_trans_max_num[current_cfg->sched_request_cnfg.dsr_trans_max]); + current_cfg->sched_request_cfg.setup().sr_pucch_res_idx, + current_cfg->sched_request_cfg.setup().sr_cfg_idx, + current_cfg->sched_request_cfg.setup().dsr_trans_max.to_number()); } - if (current_cfg->srs_ul_cnfg_ded_present) { + if (current_cfg->srs_ul_cfg_ded_present and current_cfg->srs_ul_cfg_ded.type() == setup_e::setup) { rrc_log->info("Set PHY config ded: SRS-ConfigIndex=%d, SRS-bw=%s, SRS-Nrcc=%d, SRS-hop=%s, SRS-Ncs=%s\n", - current_cfg->srs_ul_cnfg_ded.srs_cnfg_idx, - liblte_rrc_srs_bandwidth_text[current_cfg->srs_ul_cnfg_ded.srs_bandwidth], - current_cfg->srs_ul_cnfg_ded.freq_domain_pos, - liblte_rrc_srs_hopping_bandwidth_text[current_cfg->srs_ul_cnfg_ded.srs_hopping_bandwidth], - liblte_rrc_cyclic_shift_text[current_cfg->srs_ul_cnfg_ded.cyclic_shift]); + current_cfg->srs_ul_cfg_ded.setup().srs_cfg_idx, + current_cfg->srs_ul_cfg_ded.setup().srs_bw.to_string().c_str(), + current_cfg->srs_ul_cfg_ded.setup().freq_domain_position, + current_cfg->srs_ul_cfg_ded.setup().srs_hop_bw.to_string().c_str(), + current_cfg->srs_ul_cfg_ded.setup().cyclic_shift.to_string().c_str()); } phy->set_config_dedicated(current_cfg); @@ -2497,41 +2529,41 @@ void rrc::apply_phy_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT phy->configure_ul_params(); } -void rrc::apply_mac_config_dedicated(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_cnfg, bool apply_defaults) { +void rrc::apply_mac_config_dedicated(mac_main_cfg_s* mac_cnfg, bool apply_defaults) +{ // Set Default MAC main configuration (9.2.2) - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT default_cfg; - bzero(&default_cfg, sizeof(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT)); - default_cfg.ulsch_cnfg.max_harq_tx = LIBLTE_RRC_MAX_HARQ_TX_N5; - default_cfg.ulsch_cnfg.periodic_bsr_timer = LIBLTE_RRC_PERIODIC_BSR_TIMER_INFINITY; - default_cfg.ulsch_cnfg.retx_bsr_timer = LIBLTE_RRC_RETRANSMISSION_BSR_TIMER_SF2560; - default_cfg.ulsch_cnfg.tti_bundling = false; - default_cfg.drx_cnfg.setup_present = false; - default_cfg.phr_cnfg.setup_present = false; - default_cfg.time_alignment_timer = LIBLTE_RRC_TIME_ALIGNMENT_TIMER_INFINITY; - + mac_main_cfg_s default_cfg; + default_cfg.ul_sch_cfg_present = true; + default_cfg.ul_sch_cfg.max_harq_tx = mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_::n5; + default_cfg.ul_sch_cfg.periodic_bsr_timer = periodic_bsr_timer_r12_e::infinity; + default_cfg.ul_sch_cfg.retx_bsr_timer = retx_bsr_timer_r12_e::sf2560; + default_cfg.ul_sch_cfg.tti_bundling = false; + default_cfg.drx_cfg.set(setup_e::release); + default_cfg.phr_cfg.set(setup_e::release); + default_cfg.time_align_timer_ded = time_align_timer_e::infinity; if (!apply_defaults) { - if (mac_cnfg->ulsch_cnfg_present) { - if (mac_cnfg->ulsch_cnfg.max_harq_tx_present) { - default_cfg.ulsch_cnfg.max_harq_tx = mac_cnfg->ulsch_cnfg.max_harq_tx; - default_cfg.ulsch_cnfg.max_harq_tx_present = true; + if (mac_cnfg->ul_sch_cfg_present) { + if (mac_cnfg->ul_sch_cfg.max_harq_tx_present) { + default_cfg.ul_sch_cfg.max_harq_tx = mac_cnfg->ul_sch_cfg.max_harq_tx; + default_cfg.ul_sch_cfg.max_harq_tx_present = true; } - if (mac_cnfg->ulsch_cnfg.periodic_bsr_timer_present) { - default_cfg.ulsch_cnfg.periodic_bsr_timer = mac_cnfg->ulsch_cnfg.periodic_bsr_timer; - default_cfg.ulsch_cnfg.periodic_bsr_timer_present = true; + if (mac_cnfg->ul_sch_cfg.periodic_bsr_timer_present) { + default_cfg.ul_sch_cfg.periodic_bsr_timer = mac_cnfg->ul_sch_cfg.periodic_bsr_timer; + default_cfg.ul_sch_cfg.periodic_bsr_timer_present = true; } - default_cfg.ulsch_cnfg.retx_bsr_timer = mac_cnfg->ulsch_cnfg.retx_bsr_timer; - default_cfg.ulsch_cnfg.tti_bundling = mac_cnfg->ulsch_cnfg.tti_bundling; + default_cfg.ul_sch_cfg.retx_bsr_timer = mac_cnfg->ul_sch_cfg.retx_bsr_timer; + default_cfg.ul_sch_cfg.tti_bundling = mac_cnfg->ul_sch_cfg.tti_bundling; } - if (mac_cnfg->drx_cnfg_present) { - memcpy(&default_cfg.drx_cnfg, &mac_cnfg->drx_cnfg, sizeof(LIBLTE_RRC_DRX_CONFIG_STRUCT)); - default_cfg.drx_cnfg_present = true; + if (mac_cnfg->drx_cfg_present) { + default_cfg.drx_cfg = mac_cnfg->drx_cfg; + default_cfg.drx_cfg_present = true; } - if (mac_cnfg->phr_cnfg_present) { - memcpy(&default_cfg.phr_cnfg, &mac_cnfg->phr_cnfg, sizeof(LIBLTE_RRC_PHR_CONFIG_STRUCT)); - default_cfg.phr_cnfg_present = true; + if (mac_cnfg->phr_cfg_present) { + default_cfg.phr_cfg = mac_cnfg->phr_cfg; + default_cfg.phr_cfg_present = true; } - default_cfg.time_alignment_timer = mac_cnfg->time_alignment_timer; + default_cfg.time_align_timer_ded = mac_cnfg->time_align_timer_ded; } // Setup MAC configuration @@ -2540,78 +2572,81 @@ void rrc::apply_mac_config_dedicated(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_cnfg // Update UL HARQ config mac_interface_rrc::mac_cfg_t cfg; mac->get_config(&cfg); - cfg.ul_harq_params.max_harq_tx = liblte_rrc_max_harq_tx_num[default_cfg.ulsch_cnfg.max_harq_tx]; + cfg.ul_harq_params.max_harq_tx = default_cfg.ul_sch_cfg.max_harq_tx.to_number(); mac->set_config(&cfg); rrc_log->info("Set MAC main config: harq-MaxReTX=%d, bsr-TimerReTX=%d, bsr-TimerPeriodic=%d\n", - liblte_rrc_max_harq_tx_num[default_cfg.ulsch_cnfg.max_harq_tx], - liblte_rrc_retransmission_bsr_timer_num[default_cfg.ulsch_cnfg.retx_bsr_timer], - liblte_rrc_periodic_bsr_timer_num[default_cfg.ulsch_cnfg.periodic_bsr_timer]); - if (default_cfg.phr_cnfg_present) { + default_cfg.ul_sch_cfg.max_harq_tx.to_number(), default_cfg.ul_sch_cfg.retx_bsr_timer.to_number(), + default_cfg.ul_sch_cfg.periodic_bsr_timer.to_number()); + if (default_cfg.phr_cfg_present and default_cfg.phr_cfg.type() == setup_e::setup) { rrc_log->info("Set MAC PHR config: periodicPHR-Timer=%d, prohibitPHR-Timer=%d, dl-PathlossChange=%d\n", - liblte_rrc_periodic_phr_timer_num[default_cfg.phr_cnfg.periodic_phr_timer], - liblte_rrc_prohibit_phr_timer_num[default_cfg.phr_cnfg.prohibit_phr_timer], - liblte_rrc_dl_pathloss_change_num[default_cfg.phr_cnfg.dl_pathloss_change]); + default_cfg.phr_cfg.setup().periodic_phr_timer.to_number(), + default_cfg.phr_cfg.setup().prohibit_phr_timer.to_number(), + default_cfg.phr_cfg.setup().dl_pathloss_change.to_number()); } } -bool rrc::apply_rr_config_dedicated(LIBLTE_RRC_RR_CONFIG_DEDICATED_STRUCT *cnfg) { - if (cnfg->phy_cnfg_ded_present) { - apply_phy_config_dedicated(&cnfg->phy_cnfg_ded, false); +bool rrc::apply_rr_config_dedicated(rr_cfg_ded_s* cnfg) +{ + if (cnfg->phys_cfg_ded_present) { + apply_phy_config_dedicated(&cnfg->phys_cfg_ded, false); // Apply SR configuration to MAC - if (cnfg->phy_cnfg_ded.sched_request_cnfg_present) { - mac->set_config_sr(&cnfg->phy_cnfg_ded.sched_request_cnfg); + if (cnfg->phys_cfg_ded.sched_request_cfg_present) { + mac->set_config_sr(&cnfg->phys_cfg_ded.sched_request_cfg); } } - if (cnfg->mac_main_cnfg_present) { - apply_mac_config_dedicated(&cnfg->mac_main_cnfg.explicit_value, cnfg->mac_main_cnfg.default_value); + if (cnfg->mac_main_cfg_present) { + apply_mac_config_dedicated(&cnfg->mac_main_cfg.explicit_value(), + cnfg->mac_main_cfg.type() == rr_cfg_ded_s::mac_main_cfg_c_::types::default_value); } - if (cnfg->sps_cnfg_present) { + if (cnfg->sps_cfg_present) { //TODO } - if (cnfg->rlf_timers_and_constants_present) { - mac_timers->timer_get(t301)->set(this, liblte_rrc_t301_num[cnfg->rlf_timers_and_constants.t301]); - mac_timers->timer_get(t310)->set(this, liblte_rrc_t310_num[cnfg->rlf_timers_and_constants.t310]); - mac_timers->timer_get(t311)->set(this, liblte_rrc_t311_num[cnfg->rlf_timers_and_constants.t311]); - N310 = liblte_rrc_n310_num[cnfg->rlf_timers_and_constants.n310]; - N311 = liblte_rrc_n311_num[cnfg->rlf_timers_and_constants.n311]; + if (cnfg->rlf_timers_and_consts_r9_present and cnfg->rlf_timers_and_consts_r9->type() == setup_e::setup) { + mac_timers->timer_get(t301)->set(this, cnfg->rlf_timers_and_consts_r9->setup().t301_r9.to_number()); + mac_timers->timer_get(t310)->set(this, cnfg->rlf_timers_and_consts_r9->setup().t310_r9.to_number()); + mac_timers->timer_get(t311)->set(this, cnfg->rlf_timers_and_consts_r9->setup().t311_r9.to_number()); + N310 = cnfg->rlf_timers_and_consts_r9->setup().n310_r9.to_number(); + N311 = cnfg->rlf_timers_and_consts_r9->setup().n311_r9.to_number(); rrc_log->info("Updated Constants and Timers: N310=%d, N311=%d, t300=%u, t301=%u, t310=%u, t311=%u\n", N310, N311, mac_timers->timer_get(t300)->get_timeout(), mac_timers->timer_get(t301)->get_timeout(), mac_timers->timer_get(t310)->get_timeout(), mac_timers->timer_get(t311)->get_timeout()); } - for (uint32_t i = 0; i < cnfg->srb_to_add_mod_list_size; i++) { + for (uint32_t i = 0; i < cnfg->srb_to_add_mod_list.size(); i++) { // TODO: handle SRB modification add_srb(&cnfg->srb_to_add_mod_list[i]); } - for (uint32_t i = 0; i < cnfg->drb_to_release_list_size; i++) { + for (uint32_t i = 0; i < cnfg->drb_to_release_list.size(); i++) { release_drb(cnfg->drb_to_release_list[i]); } - for (uint32_t i = 0; i < cnfg->drb_to_add_mod_list_size; i++) { + for (uint32_t i = 0; i < cnfg->drb_to_add_mod_list.size(); i++) { // TODO: handle DRB modification add_drb(&cnfg->drb_to_add_mod_list[i]); } return true; } -void rrc::handle_con_setup(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *setup) { +void rrc::handle_con_setup(rrc_conn_setup_s* setup) +{ // Apply the Radio Resource configuration - apply_rr_config_dedicated(&setup->rr_cnfg); + apply_rr_config_dedicated(&setup->crit_exts.c1().rrc_conn_setup_r8().rr_cfg_ded); nas->set_barring(nas_interface_rrc::BARRING_NONE); - if (dedicatedInfoNAS) { - send_con_setup_complete(dedicatedInfoNAS); - dedicatedInfoNAS = NULL; // deallocated Inside! + if (dedicated_info_nas) { + send_con_setup_complete(dedicated_info_nas); + dedicated_info_nas = NULL; // deallocated Inside! } else { rrc_log->error("Pending to transmit a ConnectionSetupComplete but no dedicatedInfoNAS was in queue\n"); } } /* Reception of RRCConnectionReestablishment by the UE 5.3.7.5 */ -void rrc::handle_con_reest(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *setup) { +void rrc::handle_con_reest(rrc_conn_reest_s* setup) +{ mac_timers->timer_get(t301)->stop(); @@ -2619,14 +2654,14 @@ void rrc::handle_con_reest(LIBLTE_RRC_CONNECTION_REESTABLISHMENT_STRUCT *setup) rlc->reestablish(); // Apply the Radio Resource configuration - apply_rr_config_dedicated(&setup->rr_cnfg); + apply_rr_config_dedicated(&setup->crit_exts.c1().rrc_conn_reest_r8().rr_cfg_ded); // Send ConnectionSetupComplete message send_con_restablish_complete(); } - -void rrc::add_srb(LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT *srb_cnfg) { +void rrc::add_srb(srb_to_add_mod_s* srb_cnfg) +{ // Setup PDCP srslte_pdcp_config_t pdcp_cfg; pdcp_cfg.is_control = true; @@ -2639,11 +2674,11 @@ void rrc::add_srb(LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT *srb_cnfg) { } // Setup RLC - if (srb_cnfg->rlc_cnfg_present) { - if (srb_cnfg->rlc_default_cnfg_present) { + if (srb_cnfg->rlc_cfg_present) { + if (srb_cnfg->rlc_cfg.type() == srb_to_add_mod_s::rlc_cfg_c_::types::default_value) { rlc->add_bearer(srb_cnfg->srb_id); }else{ - rlc->add_bearer(srb_cnfg->srb_id, srslte_rlc_config_t(&srb_cnfg->rlc_explicit_cnfg)); + rlc->add_bearer(srb_cnfg->srb_id, srslte_rlc_config_t(&srb_cnfg->rlc_cfg.explicit_value())); } } @@ -2653,21 +2688,21 @@ void rrc::add_srb(LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT *srb_cnfg) { int prioritized_bit_rate = -1; int bucket_size_duration = -1; - if (srb_cnfg->lc_cnfg_present) { - if (srb_cnfg->lc_default_cnfg_present) { + if (srb_cnfg->lc_ch_cfg_present) { + if (srb_cnfg->lc_ch_cfg.type() == srb_to_add_mod_s::lc_ch_cfg_c_::types::default_value) { if (RB_ID_SRB2 == srb_cnfg->srb_id) priority = 3; } else { - if (srb_cnfg->lc_explicit_cnfg.log_chan_sr_mask_present) { + if (srb_cnfg->lc_ch_cfg.explicit_value().lc_ch_sr_mask_r9_present) { //TODO } - if (srb_cnfg->lc_explicit_cnfg.ul_specific_params_present) { - if (srb_cnfg->lc_explicit_cnfg.ul_specific_params.log_chan_group_present) - log_chan_group = srb_cnfg->lc_explicit_cnfg.ul_specific_params.log_chan_group; + if (srb_cnfg->lc_ch_cfg.explicit_value().ul_specific_params_present) { + if (srb_cnfg->lc_ch_cfg.explicit_value().ul_specific_params.lc_ch_group_present) + log_chan_group = srb_cnfg->lc_ch_cfg.explicit_value().ul_specific_params.lc_ch_group; - priority = srb_cnfg->lc_explicit_cnfg.ul_specific_params.priority; - prioritized_bit_rate = liblte_rrc_prioritized_bit_rate_num[srb_cnfg->lc_explicit_cnfg.ul_specific_params.prioritized_bit_rate]; - bucket_size_duration = liblte_rrc_bucket_size_duration_num[srb_cnfg->lc_explicit_cnfg.ul_specific_params.bucket_size_duration]; + priority = srb_cnfg->lc_ch_cfg.explicit_value().ul_specific_params.prio; + prioritized_bit_rate = srb_cnfg->lc_ch_cfg.explicit_value().ul_specific_params.prioritised_bit_rate.to_number(); + bucket_size_duration = srb_cnfg->lc_ch_cfg.explicit_value().ul_specific_params.bucket_size_dur.to_number(); } } mac->setup_lcid(srb_cnfg->srb_id, log_chan_group, priority, prioritized_bit_rate, bucket_size_duration); @@ -2677,17 +2712,16 @@ void rrc::add_srb(LIBLTE_RRC_SRB_TO_ADD_MOD_STRUCT *srb_cnfg) { rrc_log->info("Added radio bearer %s\n", get_rb_name(srb_cnfg->srb_id).c_str()); } -void rrc::add_drb(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb_cnfg) { +void rrc::add_drb(drb_to_add_mod_s* drb_cnfg) +{ - if (!drb_cnfg->pdcp_cnfg_present || - !drb_cnfg->rlc_cnfg_present || - !drb_cnfg->lc_cnfg_present) { + if (!drb_cnfg->pdcp_cfg_present || !drb_cnfg->rlc_cfg_present || !drb_cnfg->lc_ch_cfg_present) { rrc_log->error("Cannot add DRB - incomplete configuration\n"); return; } uint32_t lcid = 0; - if (drb_cnfg->lc_id_present) { - lcid = drb_cnfg->lc_id; + if (drb_cnfg->lc_ch_id_present) { + lcid = drb_cnfg->lc_ch_id; } else { lcid = RB_ID_SRB2 + drb_cnfg->drb_id; rrc_log->warning("LCID not present, using %d\n", lcid); @@ -2697,8 +2731,8 @@ void rrc::add_drb(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb_cnfg) { srslte_pdcp_config_t pdcp_cfg; pdcp_cfg.is_data = true; pdcp_cfg.bearer_id = drb_cnfg->drb_id; - if (drb_cnfg->pdcp_cnfg.rlc_um_pdcp_sn_size_present) { - if (LIBLTE_RRC_PDCP_SN_SIZE_7_BITS == drb_cnfg->pdcp_cnfg.rlc_um_pdcp_sn_size) { + if (drb_cnfg->pdcp_cfg.rlc_um_present) { + if (drb_cnfg->pdcp_cfg.rlc_um.pdcp_sn_size == pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::len7bits) { pdcp_cfg.sn_len = 7; } } @@ -2707,28 +2741,28 @@ void rrc::add_drb(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb_cnfg) { pdcp->enable_encryption(lcid); // Setup RLC - rlc->add_bearer(lcid, srslte_rlc_config_t(&drb_cnfg->rlc_cnfg)); + rlc->add_bearer(lcid, srslte_rlc_config_t(&drb_cnfg->rlc_cfg)); // Setup MAC uint8_t log_chan_group = 0; uint8_t priority = 1; int prioritized_bit_rate = -1; int bucket_size_duration = -1; - if (drb_cnfg->lc_cnfg.ul_specific_params_present) { - if (drb_cnfg->lc_cnfg.ul_specific_params.log_chan_group_present) { - log_chan_group = drb_cnfg->lc_cnfg.ul_specific_params.log_chan_group; + if (drb_cnfg->lc_ch_cfg.ul_specific_params_present) { + if (drb_cnfg->lc_ch_cfg.ul_specific_params.lc_ch_group_present) { + log_chan_group = drb_cnfg->lc_ch_cfg.ul_specific_params.lc_ch_group; } else { rrc_log->warning("LCG not present, setting to 0\n"); } - priority = drb_cnfg->lc_cnfg.ul_specific_params.priority; - prioritized_bit_rate = liblte_rrc_prioritized_bit_rate_num[drb_cnfg->lc_cnfg.ul_specific_params.prioritized_bit_rate]; + priority = drb_cnfg->lc_ch_cfg.ul_specific_params.prio; + prioritized_bit_rate = drb_cnfg->lc_ch_cfg.ul_specific_params.prioritised_bit_rate.to_number(); if (prioritized_bit_rate > 0) { rrc_log->warning("PBR>0 currently not supported. Setting it to Inifinty\n"); prioritized_bit_rate = -1; } - bucket_size_duration = liblte_rrc_bucket_size_duration_num[drb_cnfg->lc_cnfg.ul_specific_params.bucket_size_duration]; + bucket_size_duration = drb_cnfg->lc_ch_cfg.ul_specific_params.bucket_size_dur.to_number(); } mac->setup_lcid(lcid, log_chan_group, priority, prioritized_bit_rate, bucket_size_duration); @@ -2764,29 +2798,26 @@ void rrc::set_phy_default_pucch_srs() { phy->get_config(¤t_cfg); // Set defaults to CQI, SRS and SR - current_cfg.dedicated.cqi_report_cnfg_present = false; - current_cfg.dedicated.srs_ul_cnfg_ded_present = false; - current_cfg.dedicated.sched_request_cnfg_present = false; + current_cfg.dedicated.cqi_report_cfg_present = false; + current_cfg.dedicated.srs_ul_cfg_ded_present = false; + current_cfg.dedicated.sched_request_cfg_present = false; apply_phy_config_dedicated(¤t_cfg.dedicated, true); // Release SR configuration from MAC - LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT cfg; - bzero(&cfg, sizeof(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT)); + sched_request_cfg_c cfg; mac->set_config_sr(&cfg); } void rrc::set_phy_default() { - LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT defaults; - bzero(&defaults, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT)); + phys_cfg_ded_s defaults; apply_phy_config_dedicated(&defaults, true); } void rrc::set_mac_default() { apply_mac_config_dedicated(NULL, true); - LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT sr_cfg; - bzero(&sr_cfg, sizeof(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT)); - sr_cfg.setup_present = false; + sched_request_cfg_c sr_cfg; + sr_cfg.set(setup_e::release); mac->set_config_sr(&sr_cfg); } @@ -2834,8 +2865,8 @@ void rrc::rrc_meas::init(rrc *parent) { void rrc::rrc_meas::reset() { - filter_k_rsrp = liblte_rrc_filter_coefficient_num[LIBLTE_RRC_FILTER_COEFFICIENT_FC4]; - filter_k_rsrq = liblte_rrc_filter_coefficient_num[LIBLTE_RRC_FILTER_COEFFICIENT_FC4]; + filter_k_rsrp = filt_coef_e(filt_coef_e::fc4).to_number(); + filter_k_rsrq = filt_coef_e(filt_coef_e::fc4).to_number(); // FIXME: Turn struct into a class and use destructor std::map::iterator iter = active.begin(); @@ -2953,42 +2984,44 @@ bool rrc::rrc_meas::find_earfcn_cell(uint32_t earfcn, uint32_t pci, meas_obj_t * /* Generate report procedure 5.5.5 */ void rrc::rrc_meas::generate_report(uint32_t meas_id) { - parent->ul_dcch_msg.msg_type = LIBLTE_RRC_UL_DCCH_MSG_TYPE_MEASUREMENT_REPORT; - LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT *report = &parent->ul_dcch_msg.msg.measurement_report; - - bzero(report, sizeof(LIBLTE_RRC_MEASUREMENT_REPORT_STRUCT)); + parent->ul_dcch_msg.msg.set(ul_dcch_msg_type_c::types::c1); + parent->ul_dcch_msg.msg.c1().set(ul_dcch_msg_type_c::c1_c_::types::meas_report); + parent->ul_dcch_msg.msg.c1().meas_report().crit_exts.set(meas_report_s::crit_exts_c_::types::c1); + parent->ul_dcch_msg.msg.c1().meas_report().crit_exts.c1().set( + meas_report_s::crit_exts_c_::c1_c_::types::meas_report_r8); + meas_results_s* report = &parent->ul_dcch_msg.msg.c1().meas_report().crit_exts.c1().meas_report_r8().meas_results; meas_t *m = &active[meas_id]; report_cfg_t *cfg = &reports_cfg[m->report_id]; - report->meas_id = meas_id; - report->pcell_rsrp_result = value_to_range(RSRP, pcell_measurement.ms[RSRP]); - report->pcell_rsrq_result = value_to_range(RSRQ, pcell_measurement.ms[RSRQ]); + report->meas_id = (uint8_t)meas_id; + report->meas_result_pcell.rsrp_result = value_to_range(RSRP, pcell_measurement.ms[RSRP]); + report->meas_result_pcell.rsrq_result = value_to_range(RSRQ, pcell_measurement.ms[RSRQ]); log_h->info("MEAS: Generate report MeasId=%d, nof_reports_send=%d, Pcell rsrp=%f rsrq=%f\n", report->meas_id, m->nof_reports_sent, pcell_measurement.ms[RSRP], pcell_measurement.ms[RSRQ]); + report->meas_result_neigh_cells.set(meas_results_s::meas_result_neigh_cells_c_::types::meas_result_list_eutra); + meas_result_list_eutra_l& neigh_list = report->meas_result_neigh_cells.meas_result_list_eutra(); // TODO: report up to 8 best cells for (std::map::iterator cell = m->cell_values.begin(); cell != m->cell_values.end(); ++cell) { - if (cell->second.triggered && report->meas_result_neigh_cells.eutra.n_result < 8) - { - LIBLTE_RRC_MEAS_RESULT_EUTRA_STRUCT *rc = &report->meas_result_neigh_cells.eutra.result_eutra_list[report->meas_result_neigh_cells.eutra.n_result]; + if (cell->second.triggered and neigh_list.size() <= 8) { + meas_result_eutra_s rc; - rc->phys_cell_id = cell->first; - rc->meas_result.have_rsrp = cfg->report_quantity==RSRP || cfg->report_quantity==BOTH; - rc->meas_result.have_rsrq = cfg->report_quantity==RSRQ || cfg->report_quantity==BOTH; - rc->meas_result.rsrp_result = value_to_range(RSRP, cell->second.ms[RSRP]); - rc->meas_result.rsrq_result = value_to_range(RSRQ, cell->second.ms[RSRQ]); + rc.pci = (uint16_t)cell->first; + rc.meas_result.rsrp_result_present = cfg->report_quantity == RSRP || cfg->report_quantity == BOTH; + rc.meas_result.rsrq_result_present = cfg->report_quantity == RSRQ || cfg->report_quantity == BOTH; + rc.meas_result.rsrp_result = value_to_range(RSRP, cell->second.ms[RSRP]); + rc.meas_result.rsrq_result = value_to_range(RSRQ, cell->second.ms[RSRQ]); - log_h->info("MEAS: Adding to report neighbour=%d, pci=%d, rsrp=%f, rsrq=%f\n", - report->meas_result_neigh_cells.eutra.n_result, rc->phys_cell_id, - cell->second.ms[RSRP], cell->second.ms[RSRQ]); + log_h->info("MEAS: Adding to report neighbour=%d, pci=%d, rsrp=%f, rsrq=%f\n", neigh_list.size(), rc.pci, + cell->second.ms[RSRP], cell->second.ms[RSRQ]); - report->meas_result_neigh_cells.eutra.n_result++; + neigh_list.push_back(rc); } } - report->have_meas_result_neigh_cells = report->meas_result_neigh_cells.eutra.n_result > 0; + report->meas_result_neigh_cells_present = neigh_list.size() > 0; m->nof_reports_sent++; mac_timers->timer_get(m->periodic_timer)->stop(); @@ -3007,9 +3040,8 @@ void rrc::rrc_meas::generate_report(uint32_t meas_id) } /* Handle entering/leaving event conditions 5.5.4.1 */ -bool rrc::rrc_meas::process_event(LIBLTE_RRC_EVENT_EUTRA_STRUCT *event, uint32_t tti, - bool enter_condition, bool exit_condition, - meas_t *m, meas_value_t *cell) +bool rrc::rrc_meas::process_event(eutra_event_s* event, uint32_t tti, bool enter_condition, bool exit_condition, + meas_t* m, meas_value_t* cell) { bool generate_report = false; if (enter_condition && (!m->triggered || !cell->triggered)) { @@ -3031,7 +3063,8 @@ bool rrc::rrc_meas::process_event(LIBLTE_RRC_EVENT_EUTRA_STRUCT *event, uint32_t cell->triggered = false; mac_timers->timer_get(m->periodic_timer)->stop(); if (event) { - if (event->event_id == LIBLTE_RRC_EVENT_ID_EUTRA_A3 && event->event_a3.report_on_leave) { + if (event->event_id.type() == eutra_event_s::event_id_c_::types::event_a3 && + event->event_id.event_a3().report_on_leave) { generate_report = true; } } @@ -3070,37 +3103,48 @@ void rrc::rrc_meas::calculate_triggers(uint32_t tti) for (std::map::iterator m = active.begin(); m != active.end(); ++m) { report_cfg_t *cfg = &reports_cfg[m->second.report_id]; - float hyst = 0.5*cfg->event.hysteresis; + double hyst = 0.5 * cfg->event.hysteresis; float Mp = pcell_measurement.ms[cfg->trigger_quantity]; - LIBLTE_RRC_EVENT_ID_EUTRA_ENUM event_id = cfg->event.event_id; - const char *event_str = liblte_rrc_event_id_eutra_text[event_id]; + eutra_event_s::event_id_c_ event_id = cfg->event.event_id; + std::string event_str = event_id.type().to_string(); bool gen_report = false; if (cfg->trigger_type == report_cfg_t::EVENT) { // A1 & A2 are for serving cell only - if (event_id < LIBLTE_RRC_EVENT_ID_EUTRA_A3) { + if (event_id.type().value < eutra_event_s::event_id_c_::types::event_a3) { bool enter_condition; bool exit_condition; - if (event_id == LIBLTE_RRC_EVENT_ID_EUTRA_A1) { - enter_condition = Mp - hyst > range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range); - exit_condition = Mp + hyst < range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range); + if (event_id.type() == eutra_event_s::event_id_c_::types::event_a1) { + uint8_t range; + if (cfg->event.event_id.event_a1().a1_thres.type().value == thres_eutra_c::types::thres_rsrp) { + range = cfg->event.event_id.event_a1().a1_thres.thres_rsrp(); + } else { + range = cfg->event.event_id.event_a1().a1_thres.thres_rsrq(); + } + enter_condition = Mp - hyst > range_to_value(cfg->trigger_quantity, range); + exit_condition = Mp + hyst < range_to_value(cfg->trigger_quantity, range); } else { - enter_condition = Mp + hyst < range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range); - exit_condition = Mp - hyst > range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range); + uint8_t range; + if (cfg->event.event_id.event_a2().a2_thres.type() == thres_eutra_c::types::thres_rsrp) { + range = cfg->event.event_id.event_a2().a2_thres.thres_rsrp(); + } else { + range = cfg->event.event_id.event_a2().a2_thres.thres_rsrq(); + } + enter_condition = Mp + hyst < range_to_value(cfg->trigger_quantity, range); + exit_condition = Mp - hyst > range_to_value(cfg->trigger_quantity, range); } // check only if - gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition, - &m->second, &pcell_measurement); + gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition, &m->second, &pcell_measurement); if (gen_report) { log_h->info("Triggered by A1/A2 event\n"); } - // Rest are evaluated for every cell in frequency + // Rest are evaluated for every cell in frequency } else { meas_obj_t *obj = &objects[m->second.object_id]; for (std::map::iterator cell = obj->found_cells.begin(); cell != obj->found_cells.end(); ++cell) { @@ -3108,28 +3152,45 @@ void rrc::rrc_meas::calculate_triggers(uint32_t tti) float Ofn = obj->q_offset; float Ocn = cell->second.q_offset; float Mn = m->second.cell_values[cell->second.pci].ms[cfg->trigger_quantity]; - float Off=0, th=0, th1=0, th2=0; + double Off = 0; + float th = 0, th1 = 0, th2 = 0; bool enter_condition = false; bool exit_condition = false; - switch (event_id) { - case LIBLTE_RRC_EVENT_ID_EUTRA_A3: - Off = 0.5*cfg->event.event_a3.offset; + uint8_t range, range2; + switch (event_id.type().value) { + case eutra_event_s::event_id_c_::types::event_a3: + Off = 0.5 * cfg->event.event_id.event_a3().a3_offset; enter_condition = Mn + Ofn + Ocn - hyst > Mp + Ofp + Ocp + Off; exit_condition = Mn + Ofn + Ocn + hyst < Mp + Ofp + Ocp + Off; break; - case LIBLTE_RRC_EVENT_ID_EUTRA_A4: - th = range_to_value(cfg->trigger_quantity, cfg->event.event_a4.eutra.range); + case eutra_event_s::event_id_c_::types::event_a4: + if (cfg->event.event_id.event_a4().a4_thres.type() == thres_eutra_c::types::thres_rsrp) { + range = cfg->event.event_id.event_a4().a4_thres.thres_rsrp(); + } else { + range = cfg->event.event_id.event_a4().a4_thres.thres_rsrq(); + } + th = range_to_value(cfg->trigger_quantity, range); enter_condition = Mn + Ofn + Ocn - hyst > th; exit_condition = Mn + Ofn + Ocn + hyst < th; break; - case LIBLTE_RRC_EVENT_ID_EUTRA_A5: - th1 = range_to_value(cfg->trigger_quantity, cfg->event.event_a5.eutra1.range); - th2 = range_to_value(cfg->trigger_quantity, cfg->event.event_a5.eutra2.range); + case eutra_event_s::event_id_c_::types::event_a5: + if (cfg->event.event_id.event_a5().a5_thres1.type() == thres_eutra_c::types::thres_rsrp) { + range = cfg->event.event_id.event_a5().a5_thres1.thres_rsrp(); + } else { + range = cfg->event.event_id.event_a5().a5_thres1.thres_rsrq(); + } + if (cfg->event.event_id.event_a5().a5_thres2.type() == thres_eutra_c::types::thres_rsrp) { + range2 = cfg->event.event_id.event_a5().a5_thres2.thres_rsrp(); + } else { + range2 = cfg->event.event_id.event_a5().a5_thres2.thres_rsrq(); + } + th1 = range_to_value(cfg->trigger_quantity, range); + th2 = range_to_value(cfg->trigger_quantity, range2); enter_condition = (Mp + hyst < th1) && (Mn + Ofn + Ocn - hyst > th2); exit_condition = (Mp - hyst > th1) && (Mn + Ofn + Ocn + hyst < th2); break; default: - log_h->error("Error event %s not implemented\n", event_str); + log_h->error("Error event %s not implemented\n", event_str.c_str()); } gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition, &m->second, &m->second.cell_values[cell->second.pci]); @@ -3232,154 +3293,165 @@ void rrc::rrc_meas::remove_meas_id(std::map::iterator it) { /* Parses MeasConfig object from RRCConnectionReconfiguration message and applies configuration * as per section 5.5.2 */ -bool rrc::rrc_meas::parse_meas_config(LIBLTE_RRC_MEAS_CONFIG_STRUCT *cfg) +bool rrc::rrc_meas::parse_meas_config(meas_cfg_s* cfg) { - // Measurement object removal 5.5.2.4 - for (uint32_t i=0;iN_meas_obj_to_remove;i++) { - objects.erase(cfg->meas_obj_to_remove_list[i]); - remove_meas_object(cfg->meas_obj_to_remove_list[i]); - log_h->info("MEAS: Removed measObjectId=%d\n", cfg->meas_obj_to_remove_list[i]); + for (uint32_t i = 0; i < cfg->meas_obj_to_rem_list.size(); i++) { + objects.erase(cfg->meas_obj_to_rem_list[i]); + remove_meas_object(cfg->meas_obj_to_rem_list[i]); + log_h->info("MEAS: Removed measObjectId=%d\n", cfg->meas_obj_to_rem_list[i]); } // Measurement object addition/modification Section 5.5.2.5 if (cfg->meas_obj_to_add_mod_list_present) { - for (uint32_t i=0;imeas_obj_to_add_mod_list.N_meas_obj;i++) { - if (cfg->meas_obj_to_add_mod_list.meas_obj_list[i].meas_obj_type == LIBLTE_RRC_MEAS_OBJECT_TYPE_EUTRA) { - LIBLTE_RRC_MEAS_OBJECT_EUTRA_STRUCT *src_obj = &cfg->meas_obj_to_add_mod_list.meas_obj_list[i].meas_obj_eutra; + for (uint32_t i = 0; i < cfg->meas_obj_to_add_mod_list.size(); i++) { + if (cfg->meas_obj_to_add_mod_list[i].meas_obj.type() == + meas_obj_to_add_mod_s::meas_obj_c_::types::meas_obj_eutra) { + meas_obj_eutra_s* src_obj = &cfg->meas_obj_to_add_mod_list[i].meas_obj.meas_obj_eutra(); // Access the object if exists or create it - meas_obj_t *dst_obj = &objects[cfg->meas_obj_to_add_mod_list.meas_obj_list[i].meas_obj_id]; + meas_obj_t* dst_obj = &objects[cfg->meas_obj_to_add_mod_list[i].meas_obj_id]; dst_obj->earfcn = src_obj->carrier_freq;; - if (src_obj->offset_freq_not_default) { - dst_obj->q_offset = liblte_rrc_q_offset_range_num[src_obj->offset_freq]; + if (src_obj->offset_freq_present) { + dst_obj->q_offset = src_obj->offset_freq.to_number(); } else { dst_obj->q_offset = 0; } - if (src_obj->black_cells_to_remove_list_present) { - for (uint32_t j=0;jblack_cells_to_remove_list.N_cell_idx;j++) { - dst_obj->meas_cells.erase(src_obj->black_cells_to_remove_list.cell_idx[j]); + if (src_obj->black_cells_to_rem_list_present) { + for (uint32_t j = 0; j < src_obj->black_cells_to_rem_list.size(); j++) { + dst_obj->meas_cells.erase(src_obj->black_cells_to_rem_list[i]); } } - for (uint32_t j=0;jN_cells_to_add_mod;j++) { - dst_obj->meas_cells[src_obj->cells_to_add_mod_list[j].cell_idx].q_offset = liblte_rrc_q_offset_range_num[src_obj->cells_to_add_mod_list[j].cell_offset]; - dst_obj->meas_cells[src_obj->cells_to_add_mod_list[j].cell_idx].pci = src_obj->cells_to_add_mod_list[j].pci; + for (uint32_t j = 0; j < src_obj->cells_to_add_mod_list.size(); j++) { + dst_obj->meas_cells[src_obj->cells_to_add_mod_list[j].cell_idx].q_offset = + src_obj->cells_to_add_mod_list[j].cell_individual_offset.to_number(); + dst_obj->meas_cells[src_obj->cells_to_add_mod_list[j].cell_idx].pci = src_obj->cells_to_add_mod_list[j].pci; log_h->info("MEAS: Added measObjectId=%d, earfcn=%d, q_offset=%f, pci=%d, offset_cell=%f\n", - cfg->meas_obj_to_add_mod_list.meas_obj_list[i].meas_obj_id, dst_obj->earfcn, dst_obj->q_offset, + cfg->meas_obj_to_add_mod_list[i].meas_obj_id, dst_obj->earfcn, dst_obj->q_offset, dst_obj->meas_cells[src_obj->cells_to_add_mod_list[j].cell_idx].pci, dst_obj->meas_cells[src_obj->cells_to_add_mod_list[j].cell_idx].q_offset); - } // Untrigger reports and stop timers - stop_reports_object(cfg->meas_obj_to_add_mod_list.meas_obj_list[i].meas_obj_id); + stop_reports_object(cfg->meas_obj_to_add_mod_list[i].meas_obj_id); // TODO: Blackcells // TODO: meassubframepattern } else { log_h->warning("MEAS: Unsupported MeasObject type %s\n", - liblte_rrc_meas_object_type_text[cfg->meas_obj_to_add_mod_list.meas_obj_list[i].meas_obj_type]); + cfg->meas_obj_to_add_mod_list[i].meas_obj.type().to_string().c_str()); } } } // Reporting configuration removal 5.5.2.6 - for (uint32_t i=0;iN_rep_cnfg_to_remove;i++) { - reports_cfg.erase(cfg->rep_cnfg_to_remove_list[i]); - remove_meas_report(cfg->rep_cnfg_to_remove_list[i]); - log_h->info("MEAS: Removed reportConfigId=%d\n", cfg->rep_cnfg_to_remove_list[i]); + for (uint32_t i = 0; i < cfg->report_cfg_to_rem_list.size(); i++) { + reports_cfg.erase(cfg->report_cfg_to_rem_list[i]); + remove_meas_report(cfg->report_cfg_to_rem_list[i]); + log_h->info("MEAS: Removed reportConfigId=%d\n", cfg->report_cfg_to_rem_list[i]); } // Reporting configuration addition/modification 5.5.2.7 - if (cfg->rep_cnfg_to_add_mod_list_present) { - for (uint32_t i=0;irep_cnfg_to_add_mod_list.N_rep_cnfg;i++) { - if (cfg->rep_cnfg_to_add_mod_list.rep_cnfg_list[i].rep_cnfg_type == LIBLTE_RRC_REPORT_CONFIG_TYPE_EUTRA) { - LIBLTE_RRC_REPORT_CONFIG_EUTRA_STRUCT *src_rep = &cfg->rep_cnfg_to_add_mod_list.rep_cnfg_list[i].rep_cnfg_eutra; + if (cfg->report_cfg_to_add_mod_list_present) { + for (uint32_t i = 0; i < cfg->report_cfg_to_add_mod_list.size(); i++) { + if (cfg->report_cfg_to_add_mod_list[i].report_cfg.type() == + report_cfg_to_add_mod_s::report_cfg_c_::types::report_cfg_eutra) { + report_cfg_eutra_s* src_rep = &cfg->report_cfg_to_add_mod_list[i].report_cfg.report_cfg_eutra(); // Access the object if exists or create it - report_cfg_t *dst_rep = &reports_cfg[cfg->rep_cnfg_to_add_mod_list.rep_cnfg_list[i].rep_cnfg_id]; + report_cfg_t* dst_rep = &reports_cfg[cfg->report_cfg_to_add_mod_list[i].report_cfg_id]; - dst_rep->trigger_type = src_rep->trigger_type==LIBLTE_RRC_TRIGGER_TYPE_EUTRA_EVENT?report_cfg_t::EVENT:report_cfg_t::PERIODIC; - dst_rep->event = src_rep->event; - dst_rep->amount = liblte_rrc_report_amount_num[src_rep->report_amount]; - dst_rep->interval = liblte_rrc_report_interval_num[src_rep->report_interval]; - dst_rep->max_cell = src_rep->max_report_cells; - dst_rep->trigger_quantity = (quantity_t) src_rep->trigger_quantity; - dst_rep->report_quantity = src_rep->report_quantity==LIBLTE_RRC_REPORT_QUANTITY_SAME_AS_TRIGGER_QUANTITY?dst_rep->trigger_quantity:BOTH; - - log_h->info("MEAS: Added reportConfigId=%d, event=%s, amount=%d, interval=%d\n", - cfg->rep_cnfg_to_add_mod_list.rep_cnfg_list[i].rep_cnfg_id, - liblte_rrc_event_id_eutra_text[dst_rep->event.event_id], - dst_rep->amount, dst_rep->interval); + dst_rep->trigger_type = src_rep->trigger_type.type() == report_cfg_eutra_s::trigger_type_c_::types::event + ? report_cfg_t::EVENT + : report_cfg_t::PERIODIC; + if (dst_rep->trigger_type == report_cfg_t::EVENT) { + dst_rep->event = src_rep->trigger_type.event(); + } + dst_rep->amount = (uint8_t)src_rep->report_amount.to_number(); + dst_rep->interval = src_rep->report_interv.to_number(); + dst_rep->max_cell = src_rep->max_report_cells; + dst_rep->trigger_quantity = (quantity_t)src_rep->trigger_quant.value; + dst_rep->report_quantity = src_rep->report_quant == report_cfg_eutra_s::report_quant_e_::same_as_trigger_quant + ? dst_rep->trigger_quantity + : BOTH; + + if (dst_rep->trigger_type == report_cfg_t::EVENT) { + log_h->info("MEAS: Added reportConfigId=%d, event=%s, amount=%d, interval=%d\n", + cfg->report_cfg_to_add_mod_list[i].report_cfg_id, + dst_rep->event.event_id.type().to_string().c_str(), dst_rep->amount, dst_rep->interval); + } else { + log_h->info("MEAS: Added reportConfigId=%d, type=periodical, amount=%d, interval=%d\n", + cfg->report_cfg_to_add_mod_list[i].report_cfg_id, dst_rep->amount, dst_rep->interval); + } // Reset reports counter - for(std::map::iterator iter=active.begin(); iter!=active.end(); ++iter) { - if (iter->second.report_id == cfg->rep_cnfg_to_add_mod_list.rep_cnfg_list[i].rep_cnfg_id) { + for (std::map::iterator iter = active.begin(); iter != active.end(); ++iter) { + if (iter->second.report_id == cfg->report_cfg_to_add_mod_list[i].report_cfg_id) { iter->second.nof_reports_sent = 0; stop_reports(&iter->second); } } } else { - log_h->warning("MEAS: Unsupported reportConfigType %s\n", liblte_rrc_report_config_type_text[cfg->rep_cnfg_to_add_mod_list.rep_cnfg_list[i].rep_cnfg_type]); + log_h->warning("MEAS: Unsupported reportConfigType %s\n", + cfg->report_cfg_to_add_mod_list[i].report_cfg.type().to_string().c_str()); } } } // Quantity configuration 5.5.2.8 - if (cfg->quantity_cnfg_present && cfg->quantity_cnfg.qc_eutra_present) { - if (cfg->quantity_cnfg.qc_eutra.fc_rsrp_not_default) { - filter_k_rsrp = liblte_rrc_filter_coefficient_num[cfg->quantity_cnfg.qc_eutra.fc_rsrp]; + if (cfg->quant_cfg_present && cfg->quant_cfg.quant_cfg_eutra_present) { + if (cfg->quant_cfg.quant_cfg_eutra.filt_coef_rsrp_present) { + filter_k_rsrp = cfg->quant_cfg.quant_cfg_eutra.filt_coef_rsrp.to_number(); } else { - filter_k_rsrp = liblte_rrc_filter_coefficient_num[LIBLTE_RRC_FILTER_COEFFICIENT_FC4]; + filter_k_rsrp = filt_coef_e(filt_coef_e::fc4).to_number(); } - if (cfg->quantity_cnfg.qc_eutra.fc_rsrq_not_default) { - filter_k_rsrq = liblte_rrc_filter_coefficient_num[cfg->quantity_cnfg.qc_eutra.fc_rsrq]; + if (cfg->quant_cfg.quant_cfg_eutra.filt_coef_rsrq_present) { + filter_k_rsrq = cfg->quant_cfg.quant_cfg_eutra.filt_coef_rsrq.to_number(); } else { - filter_k_rsrq = liblte_rrc_filter_coefficient_num[LIBLTE_RRC_FILTER_COEFFICIENT_FC4]; + filter_k_rsrq = filt_coef_e(filt_coef_e::fc4).to_number(); } - filter_a[RSRP] = pow(0.5, (float) filter_k_rsrp/4); - filter_a[RSRQ] = pow(0.5, (float) filter_k_rsrq/4); + filter_a[RSRP] = powf(0.5, (float)filter_k_rsrp / 4); + filter_a[RSRQ] = powf(0.5, (float)filter_k_rsrq / 4); log_h->info("MEAS: Quantity configuration k_rsrp=%d, k_rsrq=%d\n", filter_k_rsrp, filter_k_rsrq); } // Measurement identity removal 5.5.2.2 - for (uint32_t i=0;iN_meas_id_to_remove;i++) { - remove_meas_id(cfg->meas_id_to_remove_list[i]); + for (uint32_t i = 0; i < cfg->meas_id_to_rem_list.size(); i++) { + remove_meas_id(cfg->meas_id_to_rem_list[i]); } log_h->info("nof active measId=%zd\n", active.size()); // Measurement identity addition/modification 5.5.2.3 if (cfg->meas_id_to_add_mod_list_present) { - for (uint32_t i=0;imeas_id_to_add_mod_list.N_meas_id;i++) { - LIBLTE_RRC_MEAS_ID_TO_ADD_MOD_STRUCT *measId = &cfg->meas_id_to_add_mod_list.meas_id_list[i]; + for (uint32_t i = 0; i < cfg->meas_id_to_add_mod_list.size(); i++) { + meas_id_to_add_mod_s* meas_id = &cfg->meas_id_to_add_mod_list[i]; // Stop the timer if the entry exists or create the timer if not bool is_new = false; - if (active.count(measId->meas_id)) { - mac_timers->timer_get(active[measId->meas_id].periodic_timer)->stop(); + if (active.count(meas_id->meas_id)) { + mac_timers->timer_get(active[meas_id->meas_id].periodic_timer)->stop(); } else { - is_new = true; - active[measId->meas_id].periodic_timer = mac_timers->timer_get_unique_id(); + is_new = true; + active[meas_id->meas_id].periodic_timer = mac_timers->timer_get_unique_id(); } - active[measId->meas_id].object_id = measId->meas_obj_id; - active[measId->meas_id].report_id = measId->rep_cnfg_id; - log_h->info("MEAS: %s measId=%d, measObjectId=%d, reportConfigId=%d, timer_id=%u, nof_values=%lu\n", - is_new?"Added":"Updated", measId->meas_id, measId->meas_obj_id, measId->rep_cnfg_id, - active[measId->meas_id].periodic_timer, - active[measId->meas_id].cell_values.size()); + active[meas_id->meas_id].object_id = meas_id->meas_obj_id; + active[meas_id->meas_id].report_id = meas_id->report_cfg_id; + log_h->info("MEAS: %s measId=%d, measObjectId=%d, reportConfigId=%d, timer_id=%u, nof_values=%zd\n", + is_new ? "Added" : "Updated", meas_id->meas_id, meas_id->meas_obj_id, meas_id->report_cfg_id, + active[meas_id->meas_id].periodic_timer, active[meas_id->meas_id].cell_values.size()); } } // S-Measure - if (cfg->s_meas_present) { - if (cfg->s_meas) { + if (cfg->s_measure_present) { + if (cfg->s_measure) { s_measure_enabled = true; - s_measure_value = range_to_value(RSRP, cfg->s_meas); + s_measure_value = range_to_value(RSRP, cfg->s_measure); } else { s_measure_enabled = false; } @@ -3413,7 +3485,7 @@ uint8_t rrc::rrc_meas::value_to_range(quantity_t quant, float value) { if (value < -140) { range = 0; } else if (-140 <= value && value < -44) { - range = 1 + (uint8_t) (value + 140); + range = 1u + (uint8_t)(value + 140); } else { range = 97; } @@ -3422,7 +3494,7 @@ uint8_t rrc::rrc_meas::value_to_range(quantity_t quant, float value) { if (value < -19.5) { range = 0; } else if (-19.5 <= value && value < -3) { - range = 1 + (uint8_t) (2*(value + 19.5)); + range = 1u + (uint8_t)(2 * (value + 19.5)); } else { range = 34; } @@ -3434,14 +3506,15 @@ uint8_t rrc::rrc_meas::value_to_range(quantity_t quant, float value) { return range; } -float rrc::rrc_meas::range_to_value(quantity_t quant, uint8_t range) { +float rrc::rrc_meas::range_to_value(quantity_t quant, uint8_t range) +{ float val = 0; - switch(quant) { + switch (quant) { case RSRP: - val = -140+(float) range; + val = -140 + (float)range; break; case RSRQ: - val = -19.5+(float) range/2; + val = -19.5f + (float)range / 2; break; case BOTH: printf("Error quantity both not supported in range_to_value\n"); diff --git a/srsue/src/upper/usim.cc b/srsue/src/upper/usim.cc index 18df7527e..198a9d032 100644 --- a/srsue/src/upper/usim.cc +++ b/srsue/src/upper/usim.cc @@ -30,6 +30,7 @@ #include "srslte/common/bcd_helpers.h" using namespace srslte; +using namespace asn1::rrc; namespace srsue{ @@ -161,7 +162,7 @@ bool usim::get_imei_vec(uint8_t* imei_, uint32_t n) return true; } -bool usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id) +bool usim::get_home_plmn_id(plmn_id_s* home_plmn_id) { if (!initiated) { fprintf(stderr, "USIM not initiated!\n"); @@ -193,8 +194,7 @@ bool usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id) mnc_str << (int) imsi_vec[i]; } - string_to_mcc(mcc_str.str(), &home_plmn_id->mcc); - string_to_mnc(mnc_str.str(), &home_plmn_id->mnc); + string_to_plmn_id(*home_plmn_id, mcc_str.str() + mnc_str.str()); usim_log->info("Read Home PLMN Id=%s\n", plmn_id_to_string(*home_plmn_id).c_str()); diff --git a/srsue/test/mac/CMakeLists.txt b/srsue/test/mac/CMakeLists.txt index 03407ce07..2aca8ab4b 100644 --- a/srsue/test/mac/CMakeLists.txt +++ b/srsue/test/mac/CMakeLists.txt @@ -19,5 +19,5 @@ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch") add_executable(mac_test mac_test.cc) -target_link_libraries(mac_test srsue_mac srsue_phy srslte_common srslte_phy srslte_radio srslte_asn1 ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +target_link_libraries(mac_test srsue_mac srsue_phy srslte_common srslte_phy srslte_radio srslte_asn1 rrc_asn1 ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/srsue/test/mac/mac_test.cc b/srsue/test/mac/mac_test.cc index 7308831ff..3de2584ba 100644 --- a/srsue/test/mac/mac_test.cc +++ b/srsue/test/mac/mac_test.cc @@ -28,15 +28,15 @@ #include #include -#include "srslte/asn1/liblte_rrc.h" -#include "srslte/radio/radio_multi.h" -#include "srsue/hdr/phy/phy.h" -#include "srslte/interfaces/ue_interfaces.h" +#include "srslte/asn1/rrc_asn1.h" #include "srslte/common/log_filter.h" -#include "srsue/hdr/mac/mac.h" #include "srslte/common/mac_pcap.h" +#include "srslte/interfaces/ue_interfaces.h" +#include "srslte/radio/radio_multi.h" +#include "srsue/hdr/mac/mac.h" +#include "srsue/hdr/phy/phy.h" - +using namespace asn1::rrc; /********************************************************************** * Program arguments processing @@ -112,98 +112,97 @@ uint32_t sib_start_tti(uint32_t tti, uint32_t period, uint32_t x) { return (period*10*(1+tti/(period*10))+x)%10240; // the 1 means next opportunity } -void setup_mac_phy_sib2(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *sib2, srsue::mac *mac, srsue::phy *phy) { +void setup_mac_phy_sib2(sib_type2_s* sib2, srsue::mac* mac, srsue::phy* phy) +{ // Apply RACH configuration srsue::mac_interface_rrc::mac_cfg_t mac_cfg; mac->get_config(&mac_cfg); - memcpy(&mac_cfg.rach, &sib2->rr_config_common_sib.rach_cnfg, sizeof(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT)); + mac_cfg.rach = sib2->rr_cfg_common.rach_cfg_common; mac->set_config(&mac_cfg); - printf("Set RACH ConfigCommon: NofPreambles=%d, ResponseWindow=%d, ContentionResolutionTimer=%d ms, MaxTrials=%d\n", - liblte_rrc_number_of_ra_preambles_num[sib2->rr_config_common_sib.rach_cnfg.num_ra_preambles], - liblte_rrc_ra_response_window_size_num[sib2->rr_config_common_sib.rach_cnfg.ra_resp_win_size], - liblte_rrc_mac_contention_resolution_timer_num[sib2->rr_config_common_sib.rach_cnfg.mac_con_res_timer], - liblte_rrc_preamble_trans_max_num[sib2->rr_config_common_sib.rach_cnfg.preamble_trans_max]); - + printf("Set RACH ConfigCommon: NofPreambles=%d, ResponseWindow=%d, ContentionResolutionTimer=%d ms, MaxTrials=%d\n", + sib2->rr_cfg_common.rach_cfg_common.preamb_info.nof_ra_preambs.to_number(), + sib2->rr_cfg_common.rach_cfg_common.ra_supervision_info.ra_resp_win_size.to_number(), + sib2->rr_cfg_common.rach_cfg_common.ra_supervision_info.mac_contention_resolution_timer.to_number(), + sib2->rr_cfg_common.rach_cfg_common.ra_supervision_info.preamb_trans_max.to_number()); + // Apply PHY RR Config Common - srsue::phy_interface_rrc::phy_cfg_common_t common; - memcpy(&common.pdsch_cnfg, &sib2->rr_config_common_sib.pdsch_cnfg, sizeof(LIBLTE_RRC_PDSCH_CONFIG_COMMON_STRUCT)); - memcpy(&common.pusch_cnfg, &sib2->rr_config_common_sib.pusch_cnfg, sizeof(LIBLTE_RRC_PUSCH_CONFIG_COMMON_STRUCT)); - memcpy(&common.pucch_cnfg, &sib2->rr_config_common_sib.pucch_cnfg, sizeof(LIBLTE_RRC_PUCCH_CONFIG_COMMON_STRUCT)); - memcpy(&common.ul_pwr_ctrl, &sib2->rr_config_common_sib.ul_pwr_ctrl, sizeof(LIBLTE_RRC_UL_POWER_CONTROL_COMMON_STRUCT)); - memcpy(&common.prach_cnfg, &sib2->rr_config_common_sib.prach_cnfg, sizeof(LIBLTE_RRC_PRACH_CONFIG_SIB_STRUCT)); - if (sib2->rr_config_common_sib.srs_ul_cnfg.present) { - memcpy(&common.srs_ul_cnfg, &sib2->rr_config_common_sib.srs_ul_cnfg, sizeof(LIBLTE_RRC_SRS_UL_CONFIG_COMMON_STRUCT)); - } else { - // default is release - common.srs_ul_cnfg.present = false; - } + srsue::phy_interface_rrc::phy_cfg_common_t common; + common.pdsch_cnfg = sib2->rr_cfg_common.pdsch_cfg_common; + common.pusch_cnfg = sib2->rr_cfg_common.pusch_cfg_common; + common.pucch_cnfg = sib2->rr_cfg_common.pucch_cfg_common; + common.ul_pwr_ctrl = sib2->rr_cfg_common.ul_pwr_ctrl_common; + common.prach_cnfg = sib2->rr_cfg_common.prach_cfg; + common.srs_ul_cnfg = sib2->rr_cfg_common.srs_ul_cfg_common; + phy->set_config_common(&common); phy->configure_ul_params(); printf("Set PUSCH ConfigCommon: HopOffset=%d, RSGroup=%d, RSNcs=%d, N_sb=%d\n", - sib2->rr_config_common_sib.pusch_cnfg.pusch_hopping_offset, - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.group_assignment_pusch, - sib2->rr_config_common_sib.pusch_cnfg.ul_rs.cyclic_shift, - sib2->rr_config_common_sib.pusch_cnfg.n_sb); - + sib2->rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.pusch_hop_offset, + sib2->rr_cfg_common.pusch_cfg_common.ul_ref_sigs_pusch.group_assign_pusch, + sib2->rr_cfg_common.pusch_cfg_common.ul_ref_sigs_pusch.cyclic_shift, + sib2->rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.n_sb); + printf("Set PUCCH ConfigCommon: DeltaShift=%d, CyclicShift=%d, N1=%d, NRB=%d\n", - liblte_rrc_delta_pucch_shift_num[sib2->rr_config_common_sib.pucch_cnfg.delta_pucch_shift], - sib2->rr_config_common_sib.pucch_cnfg.n_cs_an, - sib2->rr_config_common_sib.pucch_cnfg.n1_pucch_an, - sib2->rr_config_common_sib.pucch_cnfg.n_rb_cqi); - - printf("Set PRACH ConfigCommon: SeqIdx=%d, HS=%d, FreqOffset=%d, ZC=%d, ConfigIndex=%d\n", - sib2->rr_config_common_sib.prach_cnfg.root_sequence_index, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.high_speed_flag?1:0, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.zero_correlation_zone_config, - sib2->rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_config_index); - - printf("Set SRS ConfigCommon: BW-Configuration=%d, SF-Configuration=%d, ACKNACK=%d\n", - sib2->rr_config_common_sib.srs_ul_cnfg.bw_cnfg, - sib2->rr_config_common_sib.srs_ul_cnfg.subfr_cnfg, - sib2->rr_config_common_sib.srs_ul_cnfg.ack_nack_simul_tx); - + sib2->rr_cfg_common.pucch_cfg_common.delta_pucch_shift.to_number(), + sib2->rr_cfg_common.pucch_cfg_common.n_cs_an, sib2->rr_cfg_common.pucch_cfg_common.n1_pucch_an, + sib2->rr_cfg_common.pucch_cfg_common.n_rb_cqi); + + printf("Set PRACH ConfigCommon: SeqIdx=%d, HS=%d, FreqOffset=%d, ZC=%d, ConfigIndex=%d\n", + sib2->rr_cfg_common.prach_cfg.root_seq_idx, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.high_speed_flag ? 1 : 0, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.zero_correlation_zone_cfg, + sib2->rr_cfg_common.prach_cfg.prach_cfg_info.prach_cfg_idx); + + if (sib2->rr_cfg_common.srs_ul_cfg_common.type() == srs_ul_cfg_common_c::types::setup) { + srs_ul_cfg_common_c::setup_s_* setup = &sib2->rr_cfg_common.srs_ul_cfg_common.setup(); + printf("Set SRS ConfigCommon: BW-Configuration=%d, SF-Configuration=%d, ACKNACK=%d\n", + setup->srs_bw_cfg.to_number(), setup->srs_sf_cfg.to_number(), setup->ack_nack_srs_simul_tx ? 1 : 0); + } } -void process_connsetup(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *msg, srsue::mac *mac, srsue::phy *phy) { - - // FIXME: There's an error parsing the connectionSetup message. This value is hard-coded: - - if (msg->rr_cnfg.phy_cnfg_ded_present) { - phy->set_config_dedicated(&msg->rr_cnfg.phy_cnfg_ded); +void process_connsetup(rrc_conn_setup_s* msg, srsue::mac* mac, srsue::phy* phy) +{ + + // FIXME: There's an error parsing the connectionSetup message. This value is hard-coded: + + rr_cfg_ded_s* rr_ded = &msg->crit_exts.c1().rrc_conn_setup_r8().rr_cfg_ded; + if (rr_ded->phys_cfg_ded_present) { + phy->set_config_dedicated(&rr_ded->phys_cfg_ded); + printf("Set PHY configuration: SR-n_pucch=%d, SR-ConfigIndex=%d, SRS-ConfigIndex=%d, SRS-bw=%d, SRS-Nrcc=%d, " + "SRS-hop=%d, SRS-Ncs=%d\n", + rr_ded->phys_cfg_ded.sched_request_cfg.setup().sr_pucch_res_idx, + rr_ded->phys_cfg_ded.sched_request_cfg.setup().sr_cfg_idx, + rr_ded->phys_cfg_ded.srs_ul_cfg_ded.setup().srs_cfg_idx, + rr_ded->phys_cfg_ded.srs_ul_cfg_ded.setup().srs_bw.to_number(), + rr_ded->phys_cfg_ded.srs_ul_cfg_ded.setup().freq_domain_position, + rr_ded->phys_cfg_ded.srs_ul_cfg_ded.setup().srs_hop_bw.to_number(), + rr_ded->phys_cfg_ded.srs_ul_cfg_ded.setup().cyclic_shift.to_number()); } - printf("Set PHY configuration: SR-n_pucch=%d, SR-ConfigIndex=%d, SRS-ConfigIndex=%d, SRS-bw=%d, SRS-Nrcc=%d, SRS-hop=%d, SRS-Ncs=%d\n", - msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.sr_pucch_resource_idx, - msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.sr_cnfg_idx, - msg->rr_cnfg.phy_cnfg_ded.srs_ul_cnfg_ded.srs_cnfg_idx, - msg->rr_cnfg.phy_cnfg_ded.srs_ul_cnfg_ded.srs_bandwidth, - msg->rr_cnfg.phy_cnfg_ded.srs_ul_cnfg_ded.freq_domain_pos, - msg->rr_cnfg.phy_cnfg_ded.srs_ul_cnfg_ded.srs_hopping_bandwidth, - msg->rr_cnfg.phy_cnfg_ded.srs_ul_cnfg_ded.cyclic_shift); - - srsue::mac_interface_rrc::mac_cfg_t mac_set; + + srsue::mac_interface_rrc::mac_cfg_t mac_set; mac->get_config(&mac_set); - memcpy(&mac_set.main, &msg->rr_cnfg.mac_main_cnfg, sizeof(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT)); + mac_set.main = rr_ded->mac_main_cfg.explicit_value(); // SR is a PHY config but is needed by SR procedure in 36.321 5.4.4 - memcpy(&mac_set.sr, &msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg, sizeof(LIBLTE_RRC_SCHEDULING_REQUEST_CONFIG_STRUCT)); + mac_set.sr = rr_ded->phys_cfg_ded.sched_request_cfg; mac->set_config(&mac_set); - - printf("Set MAC configuration: dsr-TransMAX: %d, harq-MaxReTX=%d, bsr-TimerReTX=%d, bsr-TimerPeriodic=%d\n", - liblte_rrc_dsr_trans_max_num[msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.dsr_trans_max], - liblte_rrc_max_harq_tx_num[msg->rr_cnfg.mac_main_cnfg.explicit_value.ulsch_cnfg.max_harq_tx], - liblte_rrc_retransmission_bsr_timer_num[msg->rr_cnfg.mac_main_cnfg.explicit_value.ulsch_cnfg.retx_bsr_timer], - liblte_rrc_periodic_bsr_timer_num[msg->rr_cnfg.mac_main_cnfg.explicit_value.ulsch_cnfg.periodic_bsr_timer]); - + + printf("Set MAC configuration: dsr-TransMAX: %d, harq-MaxReTX=%d, bsr-TimerReTX=%d, bsr-TimerPeriodic=%d\n", + rr_ded->phys_cfg_ded.sched_request_cfg.setup().dsr_trans_max.to_number(), + rr_ded->mac_main_cfg.explicit_value().ul_sch_cfg.max_harq_tx.to_number(), + rr_ded->mac_main_cfg.explicit_value().ul_sch_cfg.retx_bsr_timer.to_number(), + rr_ded->mac_main_cfg.explicit_value().ul_sch_cfg.periodic_bsr_timer.to_number()); + phy->configure_ul_params(); - + // Setup radio bearers - for (uint32_t i=0;irr_cnfg.srb_to_add_mod_list_size;i++) { - if (msg->rr_cnfg.srb_to_add_mod_list[i].lc_default_cnfg_present) { - printf("Setting up Default Configuration for SRB%d \n", msg->rr_cnfg.srb_to_add_mod_list[i].srb_id); - switch(msg->rr_cnfg.srb_to_add_mod_list[i].srb_id) { + for (uint32_t i = 0; i < rr_ded->srb_to_add_mod_list.size(); i++) { + if (rr_ded->srb_to_add_mod_list[i].lc_ch_cfg_present) { + printf("Setting up Default Configuration for SRB%d \n", rr_ded->srb_to_add_mod_list[i].srb_id); + switch (rr_ded->srb_to_add_mod_list[i].srb_id) { case 1: mac->setup_lcid(1, 0, 1, -1, -1); break; @@ -305,27 +304,35 @@ public: int read_pdu(uint32_t lcid, uint8_t *payload, uint32_t nof_bytes) { if (lcid == 0) { - LIBLTE_RRC_UL_CCCH_MSG_STRUCT ul_ccch_msg; + ul_ccch_msg_s ul_ccch_msg; // Prepare ConnectionRequest packet - ul_ccch_msg.msg_type = LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ; - ul_ccch_msg.msg.rrc_con_req.ue_id_type = LIBLTE_RRC_CON_REQ_UE_ID_TYPE_RANDOM_VALUE; - ul_ccch_msg.msg.rrc_con_req.ue_id.random = 1000; - ul_ccch_msg.msg.rrc_con_req.cause = LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_SIGNALLING; - liblte_rrc_pack_ul_ccch_msg(&ul_ccch_msg, &bit_msg); - - uint64_t uecri=0; - uint8_t *ue_cri_ptr = (uint8_t*) &uecri; - uint32_t nbytes = bit_msg.N_bits/8; - uint8_t *ptr = bit_msg.msg; + ul_ccch_msg.msg.set(ul_ccch_msg_type_c::types::c1); + ul_ccch_msg.msg.c1().set(ul_ccch_msg_type_c::c1_c_::types::rrc_conn_request); + ul_ccch_msg.msg.c1().rrc_conn_request().crit_exts.set( + rrc_conn_request_s::crit_exts_c_::types::rrc_conn_request_r8); + ul_ccch_msg.msg.c1().rrc_conn_request().crit_exts.rrc_conn_request_r8().ue_id.set( + init_ue_id_c::types::random_value); + ul_ccch_msg.msg.c1().rrc_conn_request().crit_exts.rrc_conn_request_r8().ue_id.random_value().from_number(1000); + ul_ccch_msg.msg.c1().rrc_conn_request().crit_exts.rrc_conn_request_r8().establishment_cause = + establishment_cause_e::mo_sig; + + asn1::bit_ref bref(payload, nof_bytes); + + ul_ccch_msg.pack(bref); + uint32_t nbytes = (uint32_t)bref.distance_bytes(payload); + // assert(nbytes<1024); + + uint64_t uecri = 0; + uint8_t* ue_cri_ptr = (uint8_t*)&uecri; + uint8_t* ptr = bit_msg.msg; for (uint32_t i=0;i 0) { - if (dlsch_msg.sibs[0].sib_type == LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1 && !sib1_decoded) { - si_window_len = liblte_rrc_si_window_length_num[dlsch_msg.sibs[0].sib.sib1.si_window_length]; - sib2_period = liblte_rrc_si_periodicity_num[dlsch_msg.sibs[0].sib.sib1.sched_info[0].si_periodicity]; - printf("SIB1 received %d bytes, CellID=%d, si_window=%d, sib2_period=%d\n", - nof_bytes, dlsch_msg.sibs[0].sib.sib1.cell_id&0xfff, si_window_len, sib2_period); - sib1_decoded = true; - mac.clear_rntis(); - } else if (dlsch_msg.sibs[0].sib_type == LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2) { - + bcch_dl_sch_msg_s dlsch_msg; + + asn1::bit_ref bref(payload, nof_bytes); + dlsch_msg.unpack(bref); + + if (dlsch_msg.msg.c1().type().value == bcch_dl_sch_msg_type_c::c1_c_::types::sib_type1) { + si_window_len = dlsch_msg.msg.c1().sib_type1().si_win_len.to_number(); + sib2_period = dlsch_msg.msg.c1().sib_type1().sched_info_list[0].si_periodicity.to_number(); + printf("SIB1 received %d bytes, CellID=%d, si_window=%d, sib2_period=%d\n", nof_bytes, + (uint32_t)dlsch_msg.msg.c1().sib_type1().cell_access_related_info.cell_id.to_number() & 0xfff, + si_window_len, sib2_period); + mac.clear_rntis(); + } else { + sys_info_r8_ies_s::sib_type_and_info_l_& sib_list = + dlsch_msg.msg.c1().sys_info().crit_exts.sys_info_r8().sib_type_and_info; + + if (sib_list.size() > 0 and sib_list[0].type() == sib_info_item_c::types::sib2) { printf("SIB2 received %d bytes\n", nof_bytes); - setup_mac_phy_sib2(&dlsch_msg.sibs[0].sib.sib2, &mac, &phy); - sib2_decoded = true; + setup_mac_phy_sib2(&sib_list[0].sib2(), &mac, &phy); + sib2_decoded = true; mac.clear_rntis(); } } } - + void write_pdu_pcch(uint8_t *payload, uint32_t nof_bytes) {} void write_pdu_mch(uint32_t lcid, uint8_t *payload, uint32_t nof_bytes) {} diff --git a/srsue/test/upper/CMakeLists.txt b/srsue/test/upper/CMakeLists.txt index a099ff4c8..f1e47a8e0 100644 --- a/srsue/test/upper/CMakeLists.txt +++ b/srsue/test/upper/CMakeLists.txt @@ -28,11 +28,11 @@ if(HAVE_PCSC) endif(HAVE_PCSC) add_executable(rrc_reconfig_test rrc_reconfig_test.cc) -target_link_libraries(rrc_reconfig_test srsue_upper srslte_upper srslte_phy) +target_link_libraries(rrc_reconfig_test srsue_upper srslte_upper srslte_phy rrc_asn1) add_test(rrc_reconfig_test rrc_reconfig_test) add_executable(nas_test nas_test.cc) -target_link_libraries(nas_test srsue_upper srslte_upper srslte_phy) +target_link_libraries(nas_test srsue_upper srslte_upper srslte_phy rrc_asn1) add_test(nas_test nas_test) ######################################################################## diff --git a/srsue/test/upper/ip_test.cc b/srsue/test/upper/ip_test.cc index a4f9743cc..553840926 100644 --- a/srsue/test/upper/ip_test.cc +++ b/srsue/test/upper/ip_test.cc @@ -31,6 +31,8 @@ #define USE_RADIO #define PRINT_GW 0 +using namespace asn1::rrc; + /********************************************************************** * Program arguments processing ***********************************************************************/ @@ -181,7 +183,7 @@ public: // Instruct MAC to look for SIB2 usleep(10000); tti = mac->get_current_tti(); - period = liblte_rrc_si_periodicity_num[sib1.sched_info[0].si_periodicity]; + period = sib1.sched_info[0].si_periodicity.to_number(); si_win_start = sib_start_tti(tti, period, 0); si_win_len = liblte_rrc_si_window_length_num[sib1.si_window_length]; @@ -553,9 +555,9 @@ int main(int argc, char *argv[]) my_mac.start_pcap(&mac_pcap); signal(SIGINT, sig_int_handler); } - - // Set MAC defaults - LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT default_cfg; + + // Set MAC defaults + mac_main_cfg_s default_cfg; bzero(&default_cfg, sizeof(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT)); default_cfg.ulsch_cnfg.max_harq_tx = LIBLTE_RRC_MAX_HARQ_TX_N5; default_cfg.ulsch_cnfg.periodic_bsr_timer = LIBLTE_RRC_PERIODIC_BSR_TIMER_INFINITY; diff --git a/srsue/test/upper/nas_test.cc b/srsue/test/upper/nas_test.cc index 2d8c55b1c..88342c225 100644 --- a/srsue/test/upper/nas_test.cc +++ b/srsue/test/upper/nas_test.cc @@ -41,6 +41,7 @@ using namespace srsue; +using namespace asn1::rrc; #define LCID 1 @@ -88,8 +89,9 @@ class rrc_dummy : public rrc_interface_nas { public: rrc_dummy() : last_sdu_len(0) { - plmns.plmn_id.mcc = mcc; - plmns.plmn_id.mnc = mnc; + plmns.plmn_id.mcc_present = true; + mcc_to_bytes(mcc, plmns.plmn_id.mcc.data()); + mnc_to_bytes(mnc, plmns.plmn_id.mnc); plmns.tac = 0xffff; } void write_sdu(byte_buffer_t *sdu) @@ -107,9 +109,10 @@ public: memcpy(found, &plmns, sizeof(found_plmn_t)); return 1; }; - void plmn_select(LIBLTE_RRC_PLMN_IDENTITY_STRUCT plmn_id) {}; - void set_ue_idenity(LIBLTE_RRC_S_TMSI_STRUCT s_tmsi) {} - bool connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_ENUM cause, srslte::byte_buffer_t *sdu) { + void plmn_select(plmn_id_s plmn_id){}; + void set_ue_idenity(s_tmsi_s s_tmsi) {} + bool connection_request(establishment_cause_e cause, srslte::byte_buffer_t* sdu) + { printf("NAS generated SDU (len=%d):\n", sdu->N_bytes); last_sdu_len = sdu->N_bytes; srslte_vec_fprint_byte(stdout, sdu->msg, sdu->N_bytes); diff --git a/srsue/test/upper/rrc_reconfig_test.cc b/srsue/test/upper/rrc_reconfig_test.cc index 5280c338d..ffb3f56da 100644 --- a/srsue/test/upper/rrc_reconfig_test.cc +++ b/srsue/test/upper/rrc_reconfig_test.cc @@ -24,18 +24,28 @@ * */ +#include "srslte/asn1/liblte_mme.h" +#include "srslte/asn1/rrc_asn1.h" +#include "srslte/common/log_filter.h" #include #include -#include "srslte/common/log_filter.h" -#include "srslte/asn1/liblte_rrc.h" -#include "srslte/asn1/liblte_mme.h" + +#define TESTASSERT(cond) \ + { \ + if (!(cond)) { \ + std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \ + return -1; \ + } \ + } + +using namespace asn1; +using namespace asn1::rrc; void nas_test() { srslte::log_filter log1("NAS"); log1.set_level(srslte::LOG_LEVEL_DEBUG); log1.set_hex_limit(-1); - uint32_t nas_message_len = 73; uint8_t nas_message[128] = {0x27, 0x4f, 0xab, 0xef, 0x59, 0x01, 0x07, 0x42, 0x01, 0x49, 0x06, 0x40, 0x00, 0xf1, 0x10, 0x31, 0x32, 0x00, 0x22, 0x52, 0x01, 0xc1, 0x05, 0x07, @@ -46,6 +56,7 @@ void nas_test() { 0x00, 0xf1, 0x10, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x62, 0x17, 0x2c, 0x59, 0x49, 0x64, 0x01, 0x03}; + uint32_t nas_message_len = sizeof(nas_message); uint8 pd; uint8 msg_type; @@ -93,44 +104,65 @@ void nas_test() { } } -void basic_test() { +int basic_test() +{ srslte::log_filter log1("RRC"); log1.set_level(srslte::LOG_LEVEL_DEBUG); log1.set_hex_limit(-1); - LIBLTE_BIT_MSG_STRUCT bit_buf; - LIBLTE_RRC_DL_DCCH_MSG_STRUCT dl_dcch_msg; - - uint32_t rrc_message_len = 147; - uint8_t rrc_message[256] = {0x22, 0x16, 0x95, 0xa0, 0x18, 0x00, 0x05, 0xaa, - 0x50, 0x36, 0x00, 0x61, 0x08, 0x9c, 0xe3, 0x40, - 0xb0, 0x84, 0x4e, 0x71, 0xc0, 0x30, 0x84, 0x6e, - 0x71, 0xe0, 0x70, 0x84, 0x6e, 0x70, 0x6c, 0x63, - 0x1a, 0xc6, 0xb9, 0x8e, 0x7b, 0x1e, 0x84, 0xc0, - 0x01, 0x24, 0x9d, 0x3e, 0xaf, 0xbd, 0x64, 0x04, - 0x1d, 0x08, 0x05, 0x24, 0x19, 0x00, 0x03, 0xc4, - 0x40, 0xc4, 0xc8, 0x00, 0x89, 0x48, 0x07, 0x04, - 0x14, 0x1f, 0xff, 0xff, 0xff, 0xfc, 0x30, 0x2d, - 0xd9, 0xe9, 0xdd, 0xa5, 0xb9, 0xd1, 0x95, 0xc9, - 0xb9, 0x95, 0xd0, 0x14, 0x04, 0x38, 0x38, 0x38, - 0x05, 0x78, 0x13, 0xfb, 0xfa, 0x05, 0x39, 0x40, - 0x2f, 0xd8, 0x03, 0xc4, 0x40, 0x00, 0x08, 0x04, - 0x04, 0x00, 0x01, 0x88, 0x5c, 0xb1, 0x65, 0x25, - 0x90, 0x04, 0x0d, 0xa9, 0xc0, 0x2a, 0x9a, 0x01, - 0x99, 0x3b, 0x01, 0xf5, 0x12, 0xf0, 0x85, 0x0d, - 0x85, 0xef, 0xc0, 0x01, 0xf2, 0x20, 0x60, 0x18, - 0x07, 0x97, 0x09, 0x1f, 0xc3, 0x06, 0x00, 0x81, - 0x00, 0x00, 0x11}; - - srslte_bit_unpack_vector(rrc_message, bit_buf.msg, rrc_message_len*8); - bit_buf.N_bits = rrc_message_len*8; - liblte_rrc_unpack_dl_dcch_msg((LIBLTE_BIT_MSG_STRUCT*)&bit_buf, &dl_dcch_msg); + asn1::rrc::dl_dcch_msg_s dl_dcch_msg; + + uint8_t rrc_msg[256] = { + 0x22, 0x16, 0x95, 0xa0, 0x18, 0x00, 0x05, 0xaa, 0x50, 0x36, 0x00, 0x61, 0x08, 0x9c, 0xe3, 0x40, 0xb0, 0x84, 0x4e, + 0x71, 0xc0, 0x30, 0x84, 0x6e, 0x71, 0xe0, 0x70, 0x84, 0x6e, 0x70, 0x6c, 0x63, 0x1a, 0xc6, 0xb9, 0x8e, 0x7b, 0x1e, + 0x84, 0xc0, 0x01, 0x24, 0x9d, 0x3e, 0xaf, 0xbd, 0x64, 0x04, 0x1d, 0x08, 0x05, 0x24, 0x19, 0x00, 0x03, 0xc4, 0x40, + 0xc4, 0xc8, 0x00, 0x89, 0x48, 0x07, 0x04, 0x14, 0x1f, 0xff, 0xff, 0xff, 0xfc, 0x30, 0x2d, 0xd9, 0xe9, 0xdd, 0xa5, + 0xb9, 0xd1, 0x95, 0xc9, 0xb9, 0x95, 0xd0, 0x14, 0x04, 0x38, 0x38, 0x38, 0x05, 0x78, 0x13, 0xfb, 0xfa, 0x05, 0x39, + 0x40, 0x2f, 0xd8, 0x03, 0xc4, 0x40, 0x00, 0x08, 0x04, 0x04, 0x00, 0x01, 0x88, 0x5c, 0xb1, 0x65, 0x25, 0x90, 0x04, + 0x0d, 0xa9, 0xc0, 0x2a, 0x9a, 0x01, 0x99, 0x3b, 0x01, 0xf5, 0x12, 0xf0, 0x85, 0x0d, 0x85, 0xef, 0xc0, 0x01, 0xf2, + 0x20, 0x60, 0x18, 0x07, 0x97, 0x09, 0x1f, 0xc3, 0x06, 0x00, 0x81, 0x00, 0x00, 0x11}; + uint32_t rrc_msg_len = sizeof(rrc_msg); + + bit_ref bref(&rrc_msg[0], sizeof(rrc_msg)); + bit_ref bref0(&rrc_msg[0], sizeof(rrc_msg)); + + dl_dcch_msg.unpack(bref); + + rrc_conn_recfg_r8_ies_s* reconf_r8 = &dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().rrc_conn_recfg_r8(); + TESTASSERT(reconf_r8->rr_cfg_ded_present); + TESTASSERT(reconf_r8->rr_cfg_ded.mac_main_cfg.type().value == rr_cfg_ded_s::mac_main_cfg_c_::types::explicit_value); + mac_main_cfg_s* mac_cfg = &reconf_r8->rr_cfg_ded.mac_main_cfg.explicit_value(); + TESTASSERT(mac_cfg->ext); + TESTASSERT(mac_cfg->phr_cfg_present); + TESTASSERT(mac_cfg->phr_cfg.type() == setup_e::setup); + TESTASSERT(mac_cfg->sr_prohibit_timer_r9_present); + TESTASSERT(mac_cfg->sr_prohibit_timer_r9 == 0); + + TESTASSERT(reconf_r8->rr_cfg_ded.phys_cfg_ded_present); + TESTASSERT(reconf_r8->rr_cfg_ded.phys_cfg_ded.pdsch_cfg_ded_present); + TESTASSERT(reconf_r8->rr_cfg_ded.phys_cfg_ded.pucch_cfg_ded_present); + TESTASSERT(reconf_r8->rr_cfg_ded.phys_cfg_ded.pusch_cfg_ded_present); + + uint8_t rrc_msg2[rrc_msg_len]; + bit_ref bref2(&rrc_msg2[0], rrc_msg_len); + dl_dcch_msg.pack(bref2); + + // + bref = bit_ref(&rrc_msg2[0], rrc_msg_len); + dl_dcch_msg.unpack(bref); + bref = bit_ref(&rrc_msg[0], rrc_msg_len); + dl_dcch_msg.pack(bref); + uint32_t nof_bytes = (uint32_t)bref.distance_bytes(&rrc_msg[0]); + + TESTASSERT(bref.distance(&rrc_msg[0]) == bref2.distance(&rrc_msg2[0])); + TESTASSERT(memcmp(rrc_msg2, rrc_msg, nof_bytes) == 0); printf("done\n"); + return 0; } int main(int argc, char **argv) { - basic_test(); + TESTASSERT(basic_test() == 0); nas_test(); }